/* ============================================
   PRESENSI KARYAWAN - CSS STYLESHEET
   Design: Modern, Clean, Mobile-First
   Primary: #1E88E5, Success: #2E7D32, Danger: #C62828
   ============================================ */

/* === RESET & BASE === */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1E88E5;
    --primary-dark: #1565C0;
    --primary-light: #64B5F6;
    --primary-bg: #E3F2FD;
    --success: #2E7D32;
    --success-light: #E8F5E9;
    --danger: #C62828;
    --danger-light: #FFEBEE;
    --warning: #F57F17;
    --warning-light: #FFF8E1;
    --info: #0277BD;
    --info-light: #E1F5FE;
    --bg: #F0F2F5;
    --bg-card: #FFFFFF;
    --text: #1A1A2E;
    --text-secondary: #6B7280;
    --text-muted: #9CA3AF;
    --border: #E5E7EB;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07), 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1), 0 6px 10px rgba(0, 0, 0, 0.08);
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;
    --transition: all 0.2s ease;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
}

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(30, 136, 229, 0.35);
}

.btn-success {
    background: var(--success);
    color: #fff;
}

.btn-success:hover {
    background: #1B5E20;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.35);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
}

.btn-danger:hover {
    background: #B71C1C;
    box-shadow: 0 4px 12px rgba(198, 40, 40, 0.35);
}

.btn-warning {
    background: var(--warning);
    color: #fff;
}

.btn-warning:hover {
    background: #E65100;
}

.btn-info {
    background: var(--info);
    color: #fff;
}

.btn-info:hover {
    background: #01579B;
}

.btn-secondary {
    background: #E5E7EB;
    color: var(--text);
}

.btn-secondary:hover {
    background: #D1D5DB;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
    border-radius: var(--radius);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

.btn-xs {
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 6px;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.btn-group {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

/* === FORM ELEMENTS === */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.form-group label i {
    color: var(--primary);
    margin-right: 4px;
}

.required {
    color: var(--danger);
}

.form-control {
    width: 100%;
    padding: 11px 14px;
    font-family: var(--font);
    font-size: 15px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text);
    transition: var(--transition);
    outline: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.15);
}

.form-control-lg {
    padding: 14px 16px;
    font-size: 16px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 600px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.input-password-wrapper {
    position: relative;
}

.input-password-wrapper .form-control {
    padding-right: 44px;
}

.btn-toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
}

/* === ALERTS === */
.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 16px;
    animation: slideDown 0.3s ease;
}

.alert-success {
    background: var(--success-light);
    color: var(--success);
    border-left: 4px solid var(--success);
}

.alert-danger {
    background: var(--danger-light);
    color: var(--danger);
    border-left: 4px solid var(--danger);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === BADGES === */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: var(--success-light);
    color: var(--success);
}

.badge-danger {
    background: var(--danger-light);
    color: var(--danger);
}

.badge-warning {
    background: var(--warning-light);
    color: var(--warning);
}

.badge-info {
    background: var(--info-light);
    color: var(--info);
}

/* === TABLE === */
.table-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    background: #F8FAFC;
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 14px 16px;
    text-align: left;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.table td {
    padding: 12px 16px;
    border-bottom: 1px solid #F3F4F6;
    font-size: 14px;
    vertical-align: middle;
}

.table tbody tr {
    transition: var(--transition);
}

.table tbody tr:hover {
    background: #F8FAFC;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.table code {
    background: var(--primary-bg);
    color: var(--primary-dark);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
}

.time-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--primary-bg);
    color: var(--primary-dark);
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
}

.table-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 13px;
}

.text-muted {
    color: var(--text-muted);
}

/* === EMPTY STATE === */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.4;
}

.empty-state p {
    font-size: 15px;
    margin-bottom: 16px;
}

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1565C0 0%, #1E88E5 50%, #42A5F5 100%);
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.logo-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    box-shadow: 0 8px 24px rgba(30, 136, 229, 0.3);
}

.logo-circle i {
    font-size: 36px;
    color: #fff;
}

.login-header h1 {
    font-size: 24px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 6px;
}

.login-header p {
    font-size: 14px;
    color: var(--text-secondary);
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form .btn-block {
    margin-top: 8px;
    font-size: 16px;
    padding: 14px;
}

.login-footer {
    text-align: center;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.login-footer p {
    font-size: 12px;
    color: var(--text-muted);
}

/* ============================================
   KARYAWAN LAYOUT
   ============================================ */
.layout-karyawan {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.karyawan-header {
    background: #fff;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    gap: 12px;
}

.karyawan-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.header-icon {
    font-size: 24px;
    color: var(--primary);
}

.header-brand {
    font-size: 18px;
    font-weight: 800;
    color: var(--primary);
}

.karyawan-nav {
    display: flex;
    gap: 6px;
}

.nav-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: var(--transition);
}

.nav-pill:hover {
    background: var(--primary-bg);
    color: var(--primary);
}

.nav-pill.active {
    background: var(--primary);
    color: #fff;
}

.karyawan-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.user-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}

.user-pill i {
    font-size: 20px;
    color: var(--primary);
}

.btn-logout-sm {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--danger);
    background: var(--danger-light);
    font-size: 14px;
    transition: var(--transition);
}

.btn-logout-sm:hover {
    background: var(--danger);
    color: #fff;
}

.karyawan-content {
    flex: 1;
    padding: 20px;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

/* === DASHBOARD KARYAWAN === */
.dashboard-karyawan {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.greeting-card {
    background: linear-gradient(135deg, var(--primary), #42A5F5);
    border-radius: var(--radius);
    padding: 24px;
    color: #fff;
    box-shadow: 0 4px 16px rgba(30, 136, 229, 0.3);
}

.greeting-card h2 {
    font-size: 22px;
    font-weight: 700;
}

.jabatan-text {
    font-size: 14px;
    opacity: 0.9;
    margin-top: 4px;
}

.clock-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 30px 20px;
    text-align: center;
    box-shadow: var(--shadow);
}

.date-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 12px;
}

.clock-display {
    font-size: 56px;
    font-weight: 800;
    color: var(--primary);
    font-variant-numeric: tabular-nums;
    letter-spacing: 2px;
    line-height: 1;
    margin-bottom: 8px;
}

.clock-label {
    font-size: 12px;
    color: var(--text-muted);
}

.attendance-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.btn-attendance {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px 24px;
    border-radius: var(--radius);
    color: #fff;
    font-size: 16px;
    transition: var(--transition);
    cursor: pointer;
    text-decoration: none;
    box-shadow: var(--shadow-md);
}

.btn-attendance i {
    font-size: 28px;
    flex-shrink: 0;
}

.btn-attendance-label {
    font-weight: 700;
    font-size: 18px;
    display: block;
}

.btn-attendance-time {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    opacity: 0.9;
    margin-top: 2px;
}

.btn-masuk {
    background: linear-gradient(135deg, #2E7D32, #43A047);
}

.btn-masuk:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(46, 125, 50, 0.35);
}

.btn-pulang {
    background: linear-gradient(135deg, #C62828, #E53935);
}

.btn-pulang:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(198, 40, 40, 0.35);
}

.btn-attendance.completed {
    opacity: 0.85;
    cursor: default;
    position: relative;
}

.btn-attendance.completed:hover {
    transform: none;
    box-shadow: var(--shadow-md);
}

.btn-attendance.disabled {
    background: #D1D5DB;
    cursor: not-allowed;
    box-shadow: none;
}

.btn-attendance.disabled:hover {
    transform: none;
    box-shadow: none;
}

.quick-info {
    background: var(--info-light);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--info);
}

/* === RIWAYAT PAGE === */
.riwayat-page {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.page-header-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px 24px;
    box-shadow: var(--shadow);
}

.page-header-card h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
}

.page-header-card h2 i {
    color: var(--primary);
    margin-right: 8px;
}

.page-header-card p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.filter-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 16px 20px;
    box-shadow: var(--shadow);
}

.filter-form {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-form-wide .filter-group {
    flex: 1;
    min-width: 160px;
}

.filter-group {
    flex: 1;
    min-width: 120px;
}

.filter-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.filter-group .form-control {
    padding: 9px 12px;
    font-size: 14px;
}

/* ============================================
   ADMIN LAYOUT
   ============================================ */
.layout-admin {
    display: flex;
    min-height: 100vh;
}

/* === SIDEBAR === */
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, #0D47A1 0%, #1565C0 50%, #1976D2 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 200;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 24px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 20px;
    font-weight: 800;
}

.sidebar-logo i {
    font-size: 24px;
}

.sidebar-close {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
}

.sidebar-nav {
    flex: 1;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.75);
    transition: var(--transition);
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    font-weight: 700;
}

/* === SIDEBAR DROPDOWN === */
.nav-item-dropdown {
    cursor: pointer;
    justify-content: space-between;
}
.nav-item-dropdown .fa-chevron-down {
    transition: transform 0.3s ease;
    font-size: 12px;
}
.nav-item-dropdown.open .fa-chevron-down {
    transform: rotate(180deg);
}
.nav-dropdown {
    display: none;
    flex-direction: column;
    padding-left: 20px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
}
.nav-dropdown.show {
    display: flex;
}
.nav-dropdown .nav-item {
    padding: 8px 12px;
    font-size: 13px;
    opacity: 0.85;
}
.nav-dropdown .nav-item:hover, .nav-dropdown .nav-item.active {
    opacity: 1;
    background: transparent;
    color: #fff;
}

.nav-item i {
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

.user-detail {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 13px;
    font-weight: 700;
}

.user-role {
    font-size: 11px;
    opacity: 0.7;
}

.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-logout:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* === MAIN CONTENT === */
.main-content {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
}

.topbar {
    background: #fff;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text);
    cursor: pointer;
    padding: 6px;
}

.page-title {
    font-size: 20px;
    font-weight: 700;
    flex: 1;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.today-date {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.content-wrapper {
    padding: 24px;
    flex: 1;
}

/* === ADMIN DASHBOARD === */
.admin-dashboard {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-left: 4px solid transparent;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-primary {
    border-left-color: var(--primary);
}

.stat-success {
    border-left-color: var(--success);
}

.stat-danger {
    border-left-color: var(--danger);
}

.stat-warning {
    border-left-color: var(--warning);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.stat-primary .stat-icon {
    background: var(--primary-bg);
    color: var(--primary);
}

.stat-success .stat-icon {
    background: var(--success-light);
    color: var(--success);
}

.stat-danger .stat-icon {
    background: var(--danger-light);
    color: var(--danger);
}

.stat-warning .stat-icon {
    background: var(--warning-light);
    color: var(--warning);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 4px;
    font-weight: 500;
}

.chart-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.chart-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
}

.chart-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.chart-header h3 i {
    color: var(--primary);
    margin-right: 8px;
}

.chart-body {
    padding: 20px 24px;
}

/* === MANAJEMEN KARYAWAN === */
.karyawan-manage {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.page-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

/* === FORM PAGE === */
.form-page {
    max-width: 700px;
}

.form-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.form-card-header {
    padding: 18px 24px;
    background: #F8FAFC;
    border-bottom: 1px solid var(--border);
}

.form-card-header h3 {
    font-size: 16px;
    font-weight: 700;
}

.form-card-header h3 i {
    color: var(--primary);
    margin-right: 8px;
}

.form-card-body {
    padding: 24px;
}

/* === REKAP PAGE === */
.rekap-page {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.export-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* === SETTINGS PAGE === */
.settings-section {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.settings-section:last-of-type {
    border-bottom: none;
}

.section-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.section-title i {
    color: var(--primary);
    margin-right: 6px;
}

.section-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 18px;
    line-height: 1.5;
}

.form-help {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.form-help .text-danger {
    color: var(--danger);
    font-weight: 600;
}

.settings-info {
    background: var(--info-light);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin-bottom: 20px;
}

.settings-info .info-item {
    color: var(--info);
    font-size: 13px;
}

.settings-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.preview-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.preview-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.preview-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--text);
}

.preview-pulang {
    color: var(--danger);
}

/* ============================================
   MODALS (KAMERA & FOTO)
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.show {
    display: flex;
    opacity: 1;
}

.modal-box {
    background: #fff;
    width: 100%;
    max-width: 500px;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.modal-overlay.show .modal-box {
    transform: translateY(0);
}

.modal-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #F8FAFC;
}

.modal-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    padding: 4px;
}

.modal-close:hover {
    color: var(--danger);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.step-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* --- KAMERA UI --- */
.camera-wrap {
    width: 100%;
    background: #000;
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.5);
}

.camera-wrap video,
.foto-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
    /* Mirror effect for selfie */
}

.foto-preview-img {
    transform: none;
    /* Removed mirror effect for frozen image */
}

.camera-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #fff;
    gap: 12px;
    background: rgba(0, 0, 0, 0.6);
    text-align: center;
    padding: 20px;
}

.camera-controls {
    margin-top: 16px;
    display: flex;
    justify-content: center;
    gap: 10px;
}

/* --- LOKASI UI --- */
.lokasi-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
}

.lokasi-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--info);
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 12px;
}

.lokasi-result {
    margin-bottom: 12px;
}

.lokasi-ok,
.lokasi-err {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-sm);
}

.lokasi-ok {
    background: var(--success-light);
}

.lokasi-ok i {
    color: var(--success);
    font-size: 20px;
    margin-top: 2px;
}

.lokasi-ok strong {
    color: var(--success);
    font-size: 14px;
    display: block;
}

.lokasi-ok p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
    font-family: monospace;
}

.lokasi-ok small {
    font-size: 11px;
    color: var(--success);
    opacity: 0.8;
}

.lokasi-err {
    background: var(--danger-light);
}

.lokasi-err i {
    color: var(--danger);
    font-size: 20px;
    margin-top: 2px;
}

.lokasi-err strong {
    color: var(--danger);
    font-size: 14px;
    display: block;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: #F8FAFC;
}

/* --- FOTO THUMBNAILS --- */
.selfie-thumb {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: var(--shadow-sm);
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.rekap-selfie-thumb {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s;
    box-shadow: var(--shadow-sm);
}

.rekap-selfie-thumb:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {

    /* Sidebar becomes overlay */
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-close {
        display: block;
    }

    .hamburger {
        display: block;
    }

    .main-content {
        margin-left: 0;
    }

    .content-wrapper {
        padding: 16px;
    }

    .topbar {
        padding: 12px 16px;
    }

    .page-title {
        font-size: 17px;
    }

    .today-date {
        display: none;
    }

    /* Stat cards */
    .stat-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .stat-card {
        padding: 14px;
        flex-direction: column;
        text-align: center;
        gap: 8px;
        border-left: none;
        border-top: 3px solid;
    }

    .stat-primary {
        border-top-color: var(--primary);
    }

    .stat-success {
        border-top-color: var(--success);
    }

    .stat-danger {
        border-top-color: var(--danger);
    }

    .stat-warning {
        border-top-color: var(--warning);
    }

    .stat-value {
        font-size: 24px;
    }

    .stat-icon {
        width: 42px;
        height: 42px;
        font-size: 18px;
    }

    /* Karyawan header */
    .karyawan-header {
        flex-wrap: wrap;
        padding: 10px 14px;
    }

    .karyawan-header-left {
        width: 100%;
        margin-bottom: 8px;
    }

    .header-brand {
        font-size: 14px !important;
        white-space: normal;
        line-height: 1.2;
    }

    .sidebar-logo span {
        font-size: 12px !important;
    }

    .user-pill span {
        display: none;
    }

    /* Clock */
    .clock-display {
        font-size: 44px;
    }

    /* Filter */
    .filter-form {
        flex-direction: column;
    }

    .filter-group {
        width: 100%;
    }

    /* Table */
    .table th,
    .table td {
        padding: 10px 12px;
        font-size: 13px;
    }

    /* Form */
    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .stat-cards {
        grid-template-columns: 1fr;
    }

    .clock-display {
        font-size: 38px;
    }

    .btn-attendance {
        padding: 16px 18px;
    }

    .btn-attendance-label {
        font-size: 16px;
    }

    .login-header h1 {
        font-size: 16px !important;
    }

    .login-logo img {
        width: 60px !important;
    }

    .nav-pill span {
        display: none;
    }

    .karyawan-content {
        padding: 14px;
    }
}

/* Sidebar overlay backdrop */
.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 190;
}

.sidebar-backdrop.show {
    display: block;
}

/* === ANIMATIONS === */
@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.7;
    }
}

.btn-attendance:not(.completed):not(.disabled) {
    animation: pulse 2s ease infinite;
}

.btn-attendance:not(.completed):not(.disabled):hover {
    animation: none;
}

/* === BADGE SECONDARY === */
.badge-secondary {
    background: #F3F4F6;
    color: #6B7280;
}

/* === SEARCHABLE SELECT === */
.searchable-select-wrap {
    position: relative;
}

.searchable-select-input {
    cursor: text;
}

.searchable-select-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    max-height: 220px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #bbb;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.searchable-select-option {
    padding: 4px 8px;
    font-size: 14px;
    cursor: default;
    color: #000;
    line-height: 1.5;
}

.searchable-select-option:hover {
    background: #2563EB;
    color: #fff;
}

/* === PDF EXPORT WRAP === */
.pdf-export-wrap {
    display: flex;
    gap: 6px;
    align-items: center;
}

@media (max-width: 768px) {
    .pdf-export-wrap {
        flex-direction: column;
        align-items: stretch;
    }
}

/* === CUSTOM POPUP MODAL === */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s ease;
    backdrop-filter: blur(4px);
}

.popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

.popup-box {
    background: #fff;
    border-radius: 16px;
    padding: 32px 28px 24px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    transform: scale(0.8) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.popup-overlay.show .popup-box {
    transform: scale(1) translateY(0);
}

.popup-icon {
    font-size: 52px;
    margin-bottom: 12px;
    line-height: 1;
}

.popup-success .popup-icon {
    color: #2E7D32;
}

.popup-error .popup-icon {
    color: #C62828;
}

.popup-warning .popup-icon {
    color: #F57F17;
}

.popup-confirm .popup-icon {
    color: #1E88E5;
}

.popup-title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 8px;
    color: #1a1a2e;
}

.popup-message {
    font-size: 14px;
    color: #555;
    margin: 0 0 24px;
    line-height: 1.5;
}

.popup-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.popup-actions .btn {
    min-width: 110px;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.popup-btn-ok {
    background: #1E88E5;
    color: #fff;
}

.popup-btn-ok:hover {
    background: #1565C0;
    transform: translateY(-1px);
}

.popup-btn-cancel {
    background: #e0e0e0;
    color: #333;
}

.popup-btn-cancel:hover {
    background: #bdbdbd;
}

.popup-success .popup-btn-ok {
    background: #2E7D32;
}

.popup-success .popup-btn-ok:hover {
    background: #1B5E20;
}

.popup-error .popup-btn-ok {
    background: #C62828;
}

.popup-error .popup-btn-ok:hover {
    background: #B71C1C;
}

@media (max-width: 480px) {
    .popup-box {
        padding: 24px 20px 20px;
    }

    .popup-icon {
        font-size: 44px;
    }

    .popup-title {
        font-size: 18px;
    }

    .popup-actions {
        flex-direction: column;
    }

    .popup-actions .btn {
        width: 100%;
    }
}

/* ============================================
   MENU PENGAJUAN (CUTI & DINAS LUAR) - DASHBOARD
   ============================================ */
.menu-pengajuan-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

@media (max-width: 500px) {
    .menu-pengajuan-grid {
        grid-template-columns: 1fr;
    }
}

.menu-pengajuan-box {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 14px;
    text-decoration: none;
    position: relative;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    overflow: hidden;
}

.menu-pengajuan-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.menu-cuti {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    border-color: #66bb6a;
}

.menu-cuti:hover {
    background: linear-gradient(135deg, #c8e6c9, #a5d6a7);
}

.menu-aktivitas {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border-color: #42a5f5;
}

.menu-aktivitas:hover {
    background: linear-gradient(135deg, #bbdefb, #90caf9);
}

.menu-dinas {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    border-color: #42a5f5;
}

.menu-dinas:hover {
    background: linear-gradient(135deg, #bbdefb, #90caf9);
}

.menu-status {
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
    border-color: #ffb74d;
}

.menu-status:hover {
    background: linear-gradient(135deg, #ffe0b2, #ffcc80);
}

.menu-shift {
    background: linear-gradient(135deg, #f3e5f5, #e1bee7);
    border-color: #ba68c8;
}

.menu-shift:hover {
    background: linear-gradient(135deg, #e1bee7, #ce93d8);
}
.menu-shalat {
    background: linear-gradient(135deg, #e0f2f1, #b2dfdb);
    border-color: #4db6ac;
}
.menu-shalat:hover {
    background: linear-gradient(135deg, #b2dfdb, #80cbc4);
}
.menu-bulanan {
    background: linear-gradient(135deg, #e1f5fe, #b3e5fc);
    border-color: #4fc3f7;
}
.menu-bulanan:hover {
    background: linear-gradient(135deg, #b3e5fc, #81d4fa);
}
.menu-tahunan {
    background: linear-gradient(135deg, #f1f8e9, #dcedc8);
    border-color: #9ccc65;
}
.menu-tahunan:hover {
    background: linear-gradient(135deg, #dcedc8, #c5e1a5);
}

.menu-pengajuan-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.menu-cuti .menu-pengajuan-icon {
    background: rgba(46, 125, 50, 0.15);
    color: #2e7d32;
}

.menu-aktivitas .menu-pengajuan-icon {
    background: rgba(21, 101, 192, 0.15);
    color: #1565c0;
}

.menu-dinas .menu-pengajuan-icon {
    background: rgba(21, 101, 192, 0.15);
    color: #1565c0;
}

.menu-status .menu-pengajuan-icon {
    background: rgba(230, 81, 0, 0.15);
    color: #e65100;
}

.menu-shift .menu-pengajuan-icon {
    background: rgba(106, 27, 154, 0.15);
    color: #6a1b9a;
}
.menu-shalat .menu-pengajuan-icon {
    background: rgba(0, 121, 107, 0.15);
    color: #00796b;
}
.menu-bulanan .menu-pengajuan-icon {
    background: rgba(2, 119, 189, 0.15);
    color: #0277bd;
}
.menu-tahunan .menu-pengajuan-icon {
    background: rgba(85, 139, 47, 0.15);
    color: #558b2f;
}

.menu-pengajuan-info {
    flex: 1;
    min-width: 0;
}

.menu-pengajuan-info h4 {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 2px;
    color: #1a1a2e;
}

.menu-pengajuan-info p {
    font-size: 12px;
    color: #546e7a;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.menu-pengajuan-badge {
    background: #e53935;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.menu-pengajuan-arrow {
    color: #90a4ae;
    font-size: 12px;
    flex-shrink: 0;
}

/* ============================================
   FORM PENGAJUAN PAGE (CUTI & DINAS)
   ============================================ */
.form-pengajuan-page {
    max-width: 600px;
    margin: 0 auto;
}

.form-page-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border);
}

.form-page-header h2 {
    font-size: 18px;
    font-weight: 800;
    color: #1a1a2e;
    margin: 0;
    letter-spacing: 0.5px;
}

.btn-back {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #f1f5f9;
    color: #334155;
    font-size: 16px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.btn-back:hover {
    background: #e2e8f0;
    color: #1e293b;
}

.form-pengajuan {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-section {
    margin-bottom: 20px;
}

.form-section-title {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 12px;
}

.form-sublabel {
    display: block;
    font-size: 13px;
    color: #64748b;
    margin-bottom: 6px;
    font-weight: 500;
}

.form-select {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    background: #fff;
    color: #334155;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 20px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.form-select:focus {
    outline: none;
    border-color: #1e88e5;
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.12);
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    background: #fff;
    color: #334155;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #1e88e5;
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.12);
}

.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    background: #fff;
    color: #334155;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.form-textarea:focus {
    outline: none;
    border-color: #1e88e5;
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.12);
}

.form-pengajuan .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media (max-width: 480px) {
    .form-pengajuan .form-row {
        grid-template-columns: 1fr;
    }
}

.form-note {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 13px;
    color: #0369a1;
    line-height: 1.5;
    margin-bottom: 20px;
}

.form-note i {
    margin-right: 6px;
    color: #0284c7;
}

.form-note-sm {
    font-size: 12px;
    color: #64748b;
    margin-top: 10px;
    line-height: 1.5;
}

.form-note-sm i {
    color: #94a3b8;
    margin-right: 4px;
}

.btn-submit-form {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 14px 24px;
    background: linear-gradient(135deg, #1e88e5, #1565c0);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(30, 136, 229, 0.3);
}

.btn-submit-form:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 136, 229, 0.4);
}

/* --- LOKASI DINAS BOX --- */
.lokasi-dinas-box {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
}

.btn-buka-peta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: transparent;
    color: #1e88e5;
    border: 2px solid #1e88e5;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 14px;
}

.btn-buka-peta:hover {
    background: #1e88e5;
    color: #fff;
}

.koordinat-display {
    font-size: 14px;
    color: #64748b;
    font-family: monospace;
    padding: 8px 0;
}

.lokasi-dinas-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #1e88e5;
    font-size: 14px;
    font-weight: 500;
    padding: 10px 0;
}

.lokasi-dinas-result {
    margin-top: 10px;
}

.lokasi-dinas-ok,
.lokasi-dinas-err {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
}

.lokasi-dinas-ok {
    background: #e8f5e9;
    color: #2e7d32;
}

.lokasi-dinas-err {
    background: #ffebee;
    color: #c62828;
}

/* --- RIWAYAT SECTION --- */
.riwayat-section {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 2px solid var(--border);
}

.riwayat-section h3 {
    font-size: 16px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 16px;
}

.riwayat-section h3 i {
    color: #1e88e5;
    margin-right: 8px;
}

.riwayat-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.riwayat-item {
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.riwayat-item:hover {
    border-color: #cbd5e1;
}

.riwayat-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #f1f5f9;
}

.riwayat-jenis {
    font-weight: 700;
    font-size: 13px;
    color: #1a1a2e;
}

.riwayat-status {
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-menunggu {
    background: #fff3e0;
    color: #e65100;
}

.status-disetujui {
    background: #e8f5e9;
    color: #2e7d32;
}

.status-ditolak {
    background: #ffebee;
    color: #c62828;
}

.riwayat-item-body {
    padding: 12px 16px;
}

.riwayat-item-body p {
    font-size: 13px;
    color: #475569;
    margin: 0 0 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.riwayat-item-body p i {
    color: #94a3b8;
    width: 16px;
    text-align: center;
    font-size: 12px;
    flex-shrink: 0;
}

.riwayat-item-body p:last-child {
    margin-bottom: 0;
}

.riwayat-keterangan {
    color: #64748b !important;
    font-style: italic;
}

.riwayat-date {
    color: #94a3b8 !important;
    font-size: 12px !important;
}

/* --- ADMIN PENGAJUAN TABLE --- */
.pengajuan-admin-page {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.pengajuan-filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.pengajuan-filter-bar .form-control {
    max-width: 200px;
}

.status-badge-menunggu {
    background: #fff3e0;
    color: #e65100;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge-disetujui {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.status-badge-ditolak {
    background: #ffebee;
    color: #c62828;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.btn-approve {
    background: #2e7d32;
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-approve:hover {
    background: #1b5e20;
}

.btn-reject {
    background: #c62828;
    color: #fff;
    border: none;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-reject:hover {
    background: #b71c1c;
}

/* ============================================
   NOTIFICATION BELL
   ============================================ */
.notif-bell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #64748b;
    font-size: 18px;
    transition: all 0.2s;
    cursor: pointer;
    text-decoration: none;
    flex-shrink: 0;
}

.notif-bell:hover {
    background: rgba(30, 136, 229, 0.1);
    color: #1e88e5;
}

.topbar .notif-bell {
    color: #64748b;
}

.karyawan-header-right .notif-bell {
    color: #64748b;
    background: #f1f5f9;
}

.karyawan-header-right .notif-bell:hover {
    background: #e2e8f0;
    color: #1e88e5;
}

.notif-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e53935;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 10px;
    padding: 0 5px;
    line-height: 1;
    animation: notifPulse 2s ease infinite;
    border: 2px solid #fff;
}

@keyframes notifPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }
}

/* ============================================
   STATUS PENGAJUAN PAGE
   ============================================ */
.status-pengajuan-page {
    max-width: 600px;
    margin: 0 auto;
}

.status-page-header {
    margin-bottom: 20px;
}

.status-page-header h2 {
    font-size: 20px;
    font-weight: 800;
    color: #1a1a2e;
    margin: 0;
}

.status-page-header h2 i {
    color: #1e88e5;
    margin-right: 8px;
}

/* Main Tabs */
.status-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.status-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
}

.status-tab:hover {
    border-color: #cbd5e1;
    background: #f8fafc;
}

.status-tab.active {
    background: linear-gradient(135deg, #1e88e5, #1565c0);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(30, 136, 229, 0.3);
}

/* Sub Tabs */
.status-sub-tabs {
    display: flex;
    background: #f1f5f9;
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 16px;
    overflow-x: auto;
}

.sub-tab {
    flex: 1;
    padding: 8px 12px;
    border: none;
    background: transparent;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s;
    white-space: nowrap;
    text-align: center;
}

.sub-tab:hover {
    color: #334155;
    background: rgba(255, 255, 255, 0.5);
}

.sub-tab.active {
    background: #fff;
    color: #1e88e5;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Sub Content */
.sub-content {
    display: none;
}

.sub-content.active {
    display: block;
}

/* Resume Section */
.resume-header {
    background: #f1f5f9;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    color: #334155;
    text-align: center;
    margin-bottom: 12px;
}

.resume-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.resume-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.2s;
}

.resume-item:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.resume-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e3f2fd;
    color: #1565c0;
    font-size: 18px;
    flex-shrink: 0;
}

.resume-item-info {
    flex: 1;
    min-width: 0;
}

.resume-item-info h4 {
    font-size: 13px;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 2px;
    text-transform: uppercase;
}

.resume-item-info p {
    font-size: 12px;
    color: #64748b;
    margin: 0;
}

.resume-item-count {
    min-width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    background: #f1f5f9;
    color: #94a3b8;
    flex-shrink: 0;
}

.resume-item-count.has-count {
    background: #2e7d32;
    color: #fff;
}

.resume-empty {
    padding: 40px 20px;
    text-align: center;
    color: #94a3b8;
    font-size: 14px;
}