:root {
    --primary: #0f5132;
    --primary-light: #198754;
    --primary-dark: #0a3622;
    --accent: #c9a227;
    --accent-light: #e8c547;
    --accent-dark: #a8861f;
    --bg: #f5f7f4;
    --bg-dark: #0a1f14;
    --surface: #ffffff;
    --surface-alt: #f0f4ef;
    --text: #1a2e1f;
    --text-light: #4d6b58;
    --text-muted: #8aa090;
    --border: #d6e0d8;
    --shadow-sm: 0 2px 8px rgba(15, 81, 50, 0.06);
    --shadow: 0 4px 20px rgba(15, 81, 50, 0.08);
    --shadow-lg: 0 12px 40px rgba(15, 81, 50, 0.12);
    --shadow-accent: 0 4px 20px rgba(201, 162, 39, 0.2);
    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* Login Page */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(ellipse at top left, rgba(25, 135, 84, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(201, 162, 39, 0.12) 0%, transparent 50%),
        linear-gradient(135deg, #0a1f14 0%, #0f5132 50%, #198754 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.login-wrapper::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(201, 162, 39, 0.08) 0%, transparent 70%);
    top: -200px;
    right: -200px;
    animation: float 8s ease-in-out infinite;
}

.login-wrapper::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(25, 135, 84, 0.1) 0%, transparent 70%);
    bottom: -150px;
    left: -150px;
    animation: float 10s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-30px) scale(1.05); }
}

.login-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-lg);
    padding: 48px 44px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
    animation: slideUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-logo {
    width: 160px;
    height: 160px;
    margin: 0 auto 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 14px 38px rgba(15, 81, 50, 0.35), 0 0 0 8px rgba(201, 162, 39, 0.10);
    animation: pulseGlow 3s ease-in-out infinite;
    border: 4px solid rgba(201, 162, 39, 0.45);
    position: relative;
    overflow: hidden;
}
.login-logo::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.28), transparent 55%);
    pointer-events: none;
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 14px 38px rgba(15, 81, 50, 0.35), 0 0 22px rgba(201, 162, 39, 0.32); }
    50% { box-shadow: 0 18px 46px rgba(15, 81, 50, 0.45), 0 0 44px rgba(201, 162, 39, 0.55); }
}

.login-logo img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255,255,255,0.9);
    position: relative;
    z-index: 2;
}

.login-title {
    text-align: center;
    font-size: 28px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 8px;
}

.login-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 32px;
    font-weight: 500;
}

.role-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 28px;
    padding: 5px;
    background: var(--surface-alt);
    border-radius: var(--radius);
}

.role-btn {
    padding: 12px 16px;
    border: none;
    background: transparent;
    border-radius: 10px;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
}

.role-btn.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 8px;
}

.input-icon {
    position: relative;
}

.input-icon i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--accent);
    font-size: 16px;
    z-index: 2;
}

.input-icon-password input.form-control {
    padding-right: 46px;
}

.toggle-password-eye {
    left: auto !important;
    right: 16px !important;
    cursor: pointer;
    color: var(--accent-dark) !important;
    font-size: 15px !important;
    transition: color 0.2s ease;
}

.toggle-password-eye:hover {
    color: var(--primary) !important;
}

.form-control {
    width: 100%;
    padding: 14px 16px 14px 46px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    transition: var(--transition);
    background: var(--surface);
    color: var(--text);
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(201, 162, 39, 0.1);
    transform: translateY(-1px);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    width: 100%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(201, 162, 39, 0.3), transparent);
    transition: left 0.5s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(15, 81, 50, 0.25);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-success {
    background: linear-gradient(135deg, var(--primary-light), #2ea766);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-warning {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: var(--primary-dark);
    box-shadow: var(--shadow-sm);
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-accent);
}

.btn-danger {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(220, 38, 38, 0.2);
}

.btn-secondary {
    background: var(--surface-alt);
    color: var(--text);
    border: 2px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
    transform: translateY(-1px);
}

.btn-sm {
    padding: 8px 14px;
    font-size: 12px;
    border-radius: 10px;
}

/* Layout */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: linear-gradient(180deg, var(--bg-dark) 0%, var(--primary-dark) 100%);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 100;
    transition: var(--transition);
    border-right: 1px solid rgba(201, 162, 39, 0.15);
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(201, 162, 39, 0.3); border-radius: 2px; }

.sidebar-header {
    padding: 26px 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid rgba(201, 162, 39, 0.15);
}

.sidebar-logo {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 10px 24px rgba(15, 81, 50, 0.45), 0 0 22px rgba(201, 162, 39, 0.25);
    border: 2.5px solid rgba(201, 162, 39, 0.55);
    position: relative;
    overflow: hidden;
}
.sidebar-logo::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.28), transparent 55%);
    pointer-events: none;
}

.sidebar-logo img {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.92);
    position: relative;
    z-index: 2;
}

.sidebar-brand {
    font-size: 26px;
    font-weight: 900;
    background: linear-gradient(135deg, #fff, var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: 1.2px;
    line-height: 1.1;
}

.sidebar-brand-sub {
    font-size: 11.5px;
    color: rgba(255,255,255,0.62);
    font-weight: 600;
    letter-spacing: 0.7px;
    margin-top: 3px;
}

.sidebar-nav {
    padding: 20px 14px;
}

.nav-section {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255,255,255,0.35);
    padding: 14px 12px 8px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    margin-bottom: 4px;
    border-radius: var(--radius-sm);
    color: rgba(255,255,255,0.65);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
}

.nav-item i {
    width: 20px;
    font-size: 16px;
    color: var(--accent);
    flex-shrink: 0;
}

.nav-item:hover {
    background: rgba(255,255,255,0.06);
    color: white;
    transform: translateX(4px);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(201, 162, 39, 0.2), rgba(25, 135, 84, 0.2));
    color: white;
    border-left: 3px solid var(--accent);
    padding-left: 11px;
}

.nav-item.active i {
    color: var(--accent-light);
}

.main-content {
    flex: 1;
    margin-left: 260px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.topbar {
    background: var(--surface);
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(10px);
}

.topbar-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 14px;
}

.topbar-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    box-shadow: var(--shadow-sm);
}

.topbar-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.topbar-role {
    font-size: 11px;
    color: var(--accent-dark);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.topbar-logout {
    padding: 8px 14px;
    background: var(--surface-alt);
    border-radius: var(--radius-sm);
    color: var(--text-light);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: var(--transition);
}

.topbar-logout:hover {
    background: #fee2e2;
    color: #dc2626;
}

.page-content {
    padding: 28px 32px;
    flex: 1;
}

/* Cards & Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--accent), var(--accent-dark));
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(15, 81, 50, 0.1), rgba(201, 162, 39, 0.15));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    color: var(--primary);
    font-size: 22px;
}

.stat-value {
    font-size: 32px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
    margin-bottom: 6px;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.card {
    background: var(--surface);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 24px;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow);
}

.card-header {
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, rgba(15, 81, 50, 0.02), rgba(201, 162, 39, 0.03));
}

.card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-title i {
    color: var(--accent);
}

.card-body {
    padding: 24px;
}

/* Tables */
.table-wrapper {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.table th {
    text-align: left;
    padding: 14px 16px;
    font-weight: 700;
    color: var(--text);
    background: var(--surface-alt);
    border-bottom: 2px solid var(--border);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text-light);
}

.table tr:hover {
    background: rgba(15, 81, 50, 0.03);
}

.table tr:last-child td {
    border-bottom: none;
}

.table-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.avatar-sm {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--accent-light);
}

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-primary {
    background: rgba(15, 81, 50, 0.1);
    color: var(--primary);
}

/* Form Row */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 20px;
}

.form-group-inline .form-label {
    font-size: 12px;
    margin-bottom: 6px;
}

.form-group-inline .form-control {
    padding: 12px 14px;
    font-size: 13px;
}

select.form-control {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23c9a227' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
    padding-left: 14px;
}

input[type="file"].form-control {
    padding-left: 14px;
    cursor: pointer;
}

/* Grid Pekerjaan */
.pekerjaan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.pekerjaan-card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.pekerjaan-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.pekerjaan-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.pekerjaan-card:hover::before {
    transform: scaleX(1);
}

.pekerjaan-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(15, 81, 50, 0.1), rgba(201, 162, 39, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    color: var(--primary);
    margin-bottom: 16px;
}

.pekerjaan-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
}

.pekerjaan-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
    min-height: 40px;
}

.pekerjaan-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 14px;
    border-top: 1px solid var(--border);
}

.pekerjaan-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-dark);
}

/* Filters */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    padding: 20px 24px;
    background: var(--surface-alt);
    border-bottom: 1px solid var(--border);
    align-items: flex-end;
}

.filter-item {
    flex: 1;
    min-width: 160px;
}

.filter-item .form-control {
    padding: 10px 14px;
    font-size: 13px;
}

/* Alert */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Responsive */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    color: var(--text);
    cursor: pointer;
    padding: 4px;
}

@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
    .menu-toggle {
        display: block;
    }
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 99;
    }
    .sidebar-overlay.active {
        display: block;
    }
    .topbar {
        padding: 14px 20px;
    }
    .page-content {
        padding: 20px;
    }
}

@media (max-width: 640px) {
    .login-card {
        padding: 32px 24px;
    }
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    .stat-card {
        padding: 16px;
    }
    .stat-value {
        font-size: 22px;
    }
    .topbar-name {
        display: none;
    }
    .pekerjaan-grid {
        grid-template-columns: 1fr;
    }
    .filter-bar {
        flex-direction: column;
    }
    .filter-item {
        width: 100%;
    }
}

.modal, .overlay {
    position: fixed !important;
    top: 0 !important; left: 0 !important; right: 0 !important; bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(10, 31, 20, 0.6) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    z-index: 99999 !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    margin: 0 !important;
}

.modal.active, .overlay.active {
    display: flex !important;
    animation: fadeBg 0.25s ease;
}

@keyframes fadeBg {
    from { background: rgba(10, 31, 20, 0) !important; }
    to { background: rgba(10, 31, 20, 0.6) !important; }
}

.modal-content,
.overlay > .modal {
    background: var(--surface) !important;
    border-radius: var(--radius-lg) !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 560px !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
    box-shadow: 0 25px 80px rgba(15, 81, 50, 0.4), 0 0 0 1px rgba(201, 162, 39, 0.2) !important;
    animation: scaleIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
    border: 1px solid rgba(201, 162, 39, 0.25) !important;
    position: relative !important;
    float: none !important;
    clear: both !important;
}

.modal-content::before,
.overlay > .modal::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent), var(--primary-light));
    z-index: 5;
    pointer-events: none;
    display: block !important;
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.85) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
    padding: 22px 26px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, rgba(15, 81, 50, 0.03), rgba(201, 162, 39, 0.05));
    position: sticky;
    top: 0;
    z-index: 5;
}

.modal-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-close {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    background: var(--surface-alt);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: var(--transition);
}

.btn-close:hover {
    background: #fee2e2;
    color: #dc2626;
    transform: rotate(90deg);
}

.modal-body {
    padding: 26px;
}

.modal-footer {
    padding: 18px 26px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid var(--border);
    background: linear-gradient(0deg, var(--surface-alt), transparent);
    position: sticky;
    bottom: 0;
    z-index: 5;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 60px;
    color: var(--accent);
    opacity: 0.4;
    margin-bottom: 16px;
}

.empty-state h3 {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 6px;
}

.empty-state p {
    font-size: 13px;
}

/* ==================== RESPONSIVE FIX ==================== */
@media (max-width: 1280px) {
    .stat-grid { grid-template-columns: repeat(3, 1fr) !important; }
    .stats-grid { grid-template-columns: repeat(3, 1fr) !important; }
}
@media (max-width: 1060px) {
    .stat-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .stats-grid { grid-template-columns: repeat(2, 1fr) !important; }
    [data-grid-dashboard-main] { grid-template-columns: 1fr !important; }
    [data-grid-dashboard-row] { grid-template-columns: 1fr !important; }
    [data-grid-2col] { grid-template-columns: 1fr !important; }
    .card-header { flex-wrap: wrap; gap: 12px; padding: 16px 20px; }
    .card-header > form { width: 100%; }
    .card-header > form .form-control { width: 100% !important; }
}
@media (max-width: 760px) {
    .topbar-user .topbar-role { display: none; }
    .topbar-user { gap: 10px; }
    .topbar { padding: 12px 16px; }
    .page-content { padding: 14px; }
    .card-body { padding: 16px; }
    .table th, .table td { padding: 10px 12px; font-size: 11.5px; }
    .stat-value { font-size: 22px !important; }
    .stat-card { padding: 16px; }
    .topbar-title { font-size: 15px; }
    .modal-body { padding: 18px; }
    .modal-header { padding: 16px 20px; }
    .modal-footer { padding: 14px 20px; }
    .icon-picker-grid { grid-template-columns: repeat(6, 1fr) !important; }
}
@media (max-width: 520px) {
    .stat-grid { grid-template-columns: 1fr 1fr !important; gap: 10px !important; }
    .stats-grid { grid-template-columns: 1fr 1fr !important; gap: 10px !important; }
    .stat-icon { width: 36px; height: 36px !important; font-size: 16px !important; }
    .stat-value { font-size: 18px !important; }
    .stat-label { font-size: 10.5px !important; }
    .btn { padding: 10px 14px; font-size: 12px !important; }
    .btn-sm { padding: 6px 10px; font-size: 11px !important; }
    .card-title { font-size: 14px !important; }
    .login-logo { width: 120px; height: 120px; margin-bottom: 18px; }
    .login-logo img { width: 110px; height: 110px; }
    .login-title { font-size: 26px; }
    .sidebar-logo { width: 48px; height: 48px; }
    .sidebar-logo img { width: 44px; height: 44px; }
    .sidebar-brand { font-size: 22px; letter-spacing: 0.8px; }
    .sidebar-brand-sub { font-size: 10.5px; }
    .topbar-user > .topbar-logout { font-size: 0 !important; width: 36px; height: 36px; padding: 0 !important; display: flex; align-items: center; justify-content: center; }
    .topbar-user > .topbar-logout i { font-size: 13px; margin: 0; }
    .row-actions { gap: 5px !important; }
    .act-btn { width: 32px !important; height: 32px !important; font-size: 11px !important; }
    .modal-content { max-width: 100% !important; border-radius: 14px !important; }
    .icon-picker-grid { grid-template-columns: repeat(5, 1fr) !important; }
    [data-stat-mini] { grid-template-columns: 1fr !important; }
    .stat-mini-grid { grid-template-columns: 1fr !important; }
}
@media (max-width: 380px) {
    .stat-grid { grid-template-columns: 1fr !important; }
    .stats-grid { grid-template-columns: 1fr !important; }
    .icon-picker-grid { grid-template-columns: repeat(4, 1fr) !important; }
}

/* Topbar User Dropdown (Profile) */
.topbar-user-wrap {
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 10px 4px 4px;
    border-radius: 50px;
    transition: background 0.25s;
}
.topbar-user-wrap:hover { background: var(--surface-alt); }
.topbar-user-wrap.open { background: var(--surface-alt); }
.topbar-user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 260px;
    background: white;
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    padding: 10px;
    border: 1px solid var(--border);
    z-index: 500;
    display: none;
    animation: fadeInUp 0.2s ease;
}
.topbar-user-dropdown.open { display: block; }
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
.tu-head {
    display: flex; align-items: center; gap: 10px;
    padding: 12px; background: linear-gradient(135deg, rgba(15,81,50,0.06), rgba(201,162,39,0.08));
    border-radius: 10px; margin-bottom: 8px;
}
.tu-head img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent-light); }
.tu-head-avatar {
    width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white; display: flex; align-items: center; justify-content: center;
    font-weight: 700;
}
.tu-head-info-name { font-size: 13px; font-weight: 700; color: var(--text); }
.tu-head-info-role { font-size: 10.5px; color: var(--accent-dark); font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px; }
.tu-item {
    display: flex; align-items: center; gap: 12px; padding: 11px 12px;
    border-radius: 10px; text-decoration: none; color: var(--text); font-size: 13px; font-weight: 600;
    transition: all 0.2s; cursor: pointer;
}
.tu-item:hover { background: linear-gradient(135deg, rgba(15,81,50,0.05), rgba(201,162,39,0.06)); transform: translateX(2px); color: var(--primary); }
.tu-item i { width: 18px; color: var(--accent-dark); font-size: 14px; }
.tu-item.danger { color: #b91c1c; }
.tu-item.danger i { color: #dc2626; }
.tu-item.danger:hover { background: #fee2e2; color: #991b1b; }
.tu-divider { height: 1px; background: var(--border); margin: 4px 4px; }

input[type="file"].form-control.has-preview {
    padding: 12px 14px;
}

/* Inline grid helper overwrite for responsive */
.grid-responsive-4, [data-grid="4"] { display:grid; grid-template-columns: repeat(4,1fr); gap:16px; margin-bottom:18px; }
.grid-responsive-3, [data-grid="3"] { display:grid; grid-template-columns: repeat(3,1fr); gap:16px; margin-bottom:18px; }
.grid-responsive-2, [data-grid="2"] { display:grid; grid-template-columns: repeat(2,1fr); gap:16px; margin-bottom:18px; }
@media (max-width: 1060px) {
    .grid-responsive-4, [data-grid="4"] { grid-template-columns: repeat(2, 1fr) !important; }
    .grid-responsive-3, [data-grid="3"] { grid-template-columns: repeat(2, 1fr) !important; }
    .grid-responsive-2, [data-grid="2"] { grid-template-columns: 1fr !important; }
}
@media (max-width: 520px) {
    .grid-responsive-4, [data-grid="4"] { grid-template-columns: 1fr !important; }
    .grid-responsive-3, [data-grid="3"] { grid-template-columns: 1fr !important; }
}

/* Login full responsive fallback */
@media (max-height: 700px) {
    .login-wrapper { padding: 14px; }
    .login-card { padding: 28px 22px; }
    .login-logo { width: 108px; height: 108px; margin-bottom: 14px; }
    .login-logo img { width: 100px; height: 100px; }
    .sidebar-logo { width: 44px; height: 44px; }
    .sidebar-logo img { width: 40px; height: 40px; }
    .sidebar-brand { font-size: 20px; letter-spacing: 0.6px; }
    .sidebar-brand-sub { font-size: 10px; }
}

/* Fix sidebar overlay click */
.sidebar-overlay { cursor: pointer; }

