/* admin/style.css - Mobile First - Clean Version */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

body {
    background: #f0f4f8;
    min-height: 100vh;
    padding: 16px;
}

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

/* Header - FIXED */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid #e2e8f0;
}

.header h1 {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 4px;
}

.header p {
    color: #64748b;
    font-size: 14px;
    margin-top: 4px;
}

/* Buttons */
.btn-add {
    background: #0284c7;
    color: white;
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-add:hover {
    background: #0369a1;
    transform: translateY(-2px);
}

/* Tambahkan ini di bagian Buttons pada style.css */

/* Header Actions - Container untuk tombol di header */
.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Tombol Logout di header (icon X) */
.btn-logout-header {
    background: #64748b;
    color: white;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 20px;
    font-weight: bold;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(100, 116, 139, 0.3);
}

.btn-logout-header:hover {
    background: #dc2626;
    transform: scale(1.05);
}

/* Update responsive untuk header actions */
@media (max-width: 600px) {
    .header-actions {
        gap: 8px;
    }
    
    .btn-logout-header {
        width: 38px;
        height: 38px;
        font-size: 18px;
    }
}

.btn-submit {
    width: 100%;
    padding: 18px;
    background: #0284c7;
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    margin-top: 12px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 8px 20px rgba(2, 132, 199, 0.3);
}

.btn-submit:hover {
    background: #0369a1;
    transform: translateY(-2px);
}

.btn-back {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 16px;
    background: #f1f5f9;
    color: #334155;
    border: 1px solid #e2e8f0;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    margin-top: 12px;
    transition: all 0.2s;
}

.btn-edit, .btn-delete {
    padding: 8px 12px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
}

.btn-edit {
    background: #fef3c7;
    color: #92400e;
}

.btn-edit:hover {
    background: #fde68a;
    transform: translateY(-1px);
}

.btn-delete {
    background: #fee2e2;
    color: #991b1b;
}

.btn-delete:hover {
    background: #fecaca;
    transform: translateY(-1px);
}

/* Tombol Logout */
.btn-logout-icon {
    background: #64748b;
    color: white;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.2s;
    box-shadow: 0 2px 8px rgba(100, 116, 139, 0.3);
}

.btn-logout-icon:hover {
    background: #dc2626;
    transform: scale(1.05);
}

/* Cards */
.form-card, .cuti-card {
    background: white;
    border-radius: 24px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    margin-bottom: 16px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.cuti-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.cuti-header {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.cuti-nama {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


.cuti-tanggal {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.cuti-ket {
    background: #f1f5f9;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 14px;
    color: #334155;
    margin: 10px 0;
}

.cuti-aksi {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
}

/* Badge Keperluan */
.keperluan-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 500;
}


.badge-cutitahunan {
    background: #e3f2fd;
    color: #1565c0;
}

.badge-sakit {
    background: #ffebee;
    color: #c62828;
}

.badge-izin {
    background: #fff3e0;
    color: #e65100;
}

.badge-liburnasional {
    background: #e8f5e9;
    color: #2e7d32;
}

.badge-default {
    background: #f5f5f5;
    color: #616161;
}

/* Form elements */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 16px 18px;
    font-size: 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    background: #f8fafc;
    transition: all 0.2s;
    -webkit-appearance: none;
    appearance: none;
}

.form-control:focus {
    outline: none;
    border-color: #0284c7;
    background: white;
    box-shadow: 0 0 0 4px rgba(2, 132, 199, 0.1);
}

select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    background-size: 16px;
}

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

.date-row {
    display: flex;
    gap: 12px;
}

.date-col {
    flex: 1;
}

/* Alerts */
.alert {
    padding: 16px 18px;
    border-radius: 16px;
    margin-bottom: 20px;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.info-note {
    background: #f0f9ff;
    padding: 16px;
    border-radius: 16px;
    margin: 24px 0 8px;
    font-size: 14px;
    color: #0369a1;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Login page */
.login-card {
    background: white;
    border-radius: 32px;
    padding: 32px 24px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    margin-top: 40px;
}

.login-title {
    font-size: 32px;
    font-weight: 800;
    color: #0284c7;
    margin-bottom: 8px;
}

.login-sub {
    color: #64748b;
    margin-bottom: 32px;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 24px;
    color: #94a3b8;
}

.empty-state p {
    margin-top: 16px;
    font-size: 16px;
}

/* ===== RESPONSIVE FIX ===== */
@media (max-width: 600px) {
    .container {
        max-width: 100%;
        padding: 0 8px;
    }
    
    body {
        padding: 12px;
    }
    
    /* Header tetap row, jangan column */
    .header {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .header h1 {
        font-size: 20px;
    }
    
    .btn-add {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .cuti-card {
        padding: 16px;
    }
    
    .cuti-nama {
        font-size: 16px;
    }
    
    .cuti-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .date-row {
        flex-direction: column;
        gap: 20px;
    }
    
    .form-control {
        padding: 14px 16px;
    }
    
    .btn-submit {
        padding: 16px;
        font-size: 17px;
    }
	
}

@media (max-width: 347px) {
    .cuti-tanggal {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .cuti-aksi {
        flex-direction: column;
    }
    
    .btn-edit, .btn-delete {
        justify-content: center;
        width: 100%;
    }
}