/* ============================================
   FORM IZIN STYLES
   ============================================ */

:root {
    --bg-primary: #667eea;
    --bg-secondary: #764ba2;
    --bg-card: rgba(255, 255, 255, 0.95);
    --text-primary: #333;
    --text-secondary: #666;
    --border-color: #e0e0e0;
    --accent-green: #00d26a;
    --accent-red: #ff4757;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    min-height: 100vh;
    padding: 20px;
    color: var(--text-primary);
}

.container {
    max-width: 600px;
    margin: 0 auto;
}

/* Header */
header {
    text-align: center;
    color: white;
    margin-bottom: 30px;
}

header h1 {
    font-size: 2rem;
    margin-bottom: 5px;
}

.subtitle {
    font-size: 1rem;
    opacity: 0.9;
}

/* Form */
#izinForm {
    background: white;
    border-radius: 20px;
    padding: 35px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group input[type="file"],
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--bg-primary);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.form-group input[readonly] {
    background: #f5f5f5;
    color: var(--text-secondary);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group small {
    display: block;
    margin-top: 8px;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Radio Group */
.radio-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.radio-option {
    flex: 1;
    min-width: 120px;
    position: relative;
}

.radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.radio-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 20px;
    background: #f8f9fa;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.radio-option input[type="radio"]:checked+.radio-label {
    background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
    color: white;
    border-color: var(--bg-primary);
}

.radio-label:hover {
    background: #e9ecef;
}

.radio-option input[type="radio"]:checked+.radio-label:hover {
    background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
}

/* Info Banner */
.info-banner {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border: 2px solid #2196f3;
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 20px;
    color: #1565c0;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-banner strong {
    color: #0d47a1;
}

/* File Preview */
.file-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 10px;
}

.file-preview span {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.btn-remove {
    background: var(--accent-red);
    color: white;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-remove:hover {
    background: #e04050;
    transform: scale(1.1);
}

/* Submit Button */
.btn-submit {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

.btn-submit:active {
    transform: translateY(-1px);
}

/* Notification */
.notification {
    margin-top: 20px;
    padding: 16px 20px;
    border-radius: 12px;
    text-align: center;
    display: none;
    font-weight: 500;
}

.notification.show {
    display: block;
}

.notification.success {
    background: #d4edda;
    color: #155724;
    border: 2px solid #c3e6cb;
}

.notification.error {
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
}

/* Footer */
footer {
    text-align: center;
    margin-top: 30px;
    color: white;
}

footer p {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 600px) {
    body {
        padding: 15px;
    }

    header h1 {
        font-size: 1.6rem;
    }

    #izinForm {
        padding: 25px;
    }

    .radio-group {
        flex-direction: column;
    }

    .radio-option {
        min-width: auto;
    }
}

/* Loading State */
.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-submit:disabled::after {
    content: '...';
}

/* ============================================
   RIWAYAT IZIN SECTION
   ============================================ */

.riwayat-izin-section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    margin-top: 25px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.riwayat-izin-section h3 {
    margin-bottom: 20px;
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 600;
}

.riwayat-item {
    padding: 16px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 12px;
    border-left: 4px solid var(--border-color);
    transition: transform 0.2s, box-shadow 0.2s;
}

.riwayat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.riwayat-item:last-child {
    margin-bottom: 0;
}

.riwayat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.riwayat-jenis {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

.riwayat-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-approved {
    background: #d4edda;
    color: #155724;
}

.status-rejected {
    background: #f8d7da;
    color: #721c24;
}

.riwayat-detail {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.riwayat-alasan {
    margin-top: 4px;
    font-style: italic;
    color: #888;
}

.riwayat-empty {
    text-align: center;
    color: var(--text-secondary);
    padding: 20px;
    font-size: 0.95rem;
}

.riwayat-loading {
    text-align: center;
    color: var(--text-secondary);
    padding: 20px;
}

/* Border colors based on status */
.riwayat-item:has(.status-pending) {
    border-left-color: #ffc107;
}

.riwayat-item:has(.status-approved) {
    border-left-color: var(--accent-green);
}

.riwayat-item:has(.status-rejected) {
    border-left-color: var(--accent-red);
}