:root {
    --green-primary: #2e7d32;
    --green-dark: #1b5e20;
    --green-light: #a5d6a7;
    --green-xlight: #e8f5e9;
    --green-mid: #388e3c;
    --green-accent: #66bb6a;
    --sidebar-width: 240px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', sans-serif;
    background: #f1f8f2;
    min-height: 100vh;
    margin: 0;
}

/* ── SIDEBAR ── */
.sidebar {
    width: var(--sidebar-width);
    min-height: 100vh;
    background: var(--green-dark);
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform .3s ease;
}

.sidebar-brand {
    padding: 1.4rem 1.25rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand .brand-icon {
    width: 38px;
    height: 38px;
    background: var(--green-accent);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #fff;
    margin-bottom: 8px;
}

.sidebar-brand h6 {
    color: #fff;
    font-weight: 600;
    font-size: .85rem;
    margin: 0;
    letter-spacing: .3px;
}

.sidebar-brand small {
    color: var(--green-light);
    font-size: .72rem;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem .75rem;
}

.nav-label {
    color: var(--green-light);
    font-size: .68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: .5rem .5rem .25rem;
    margin-bottom: .25rem;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: .65rem .85rem;
    border-radius: 9px;
    color: rgba(255, 255, 255, .75);
    text-decoration: none;
    font-size: .875rem;
    margin-bottom: 3px;
    transition: background .2s, color .2s;
    cursor: pointer;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
}

.sidebar-link i {
    font-size: 1.05rem;
}

.sidebar-link:hover,
.sidebar-link.active {
    background: var(--green-mid);
    color: #fff;
}

.sidebar-link.active {
    font-weight: 600;
}

.sidebar-footer {
    padding: .75rem .75rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, .1);
}

.sidebar-footer .btn-logout {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: .6rem .85rem;
    border-radius: 9px;
    color: #ffcdd2;
    font-size: .875rem;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: background .2s;
}

.sidebar-footer .btn-logout:hover {
    background: rgba(229, 57, 53, .25);
}

/* ── TOPBAR ── */
.topbar {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: 60px;
    background: #fff;
    border-bottom: 1px solid #dcedc8;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    z-index: 900;
    transition: left .3s ease;
}

.topbar .hamburger {
    display: none;
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--green-dark);
    cursor: pointer;
    padding: 0;
    margin-right: .75rem;
}

.topbar-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--green-dark);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--green-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    font-weight: 600;
}

/* ── MAIN CONTENT ── */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 80px 1.5rem 2rem;
    min-height: 100vh;
    transition: margin-left .3s ease;
}

/* ── STAT CARDS ── */
.stat-card {
    background: #fff;
    border-radius: 14px;
    padding: 1.25rem 1.4rem;
    border: 1px solid #dcedc8;
    height: 100%;
}

.stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: .85rem;
}

.stat-label {
    font-size: .78rem;
    color: #78909c;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: .2rem;
}

.stat-value {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--green-dark);
    line-height: 1;
    margin-bottom: .3rem;
}

.stat-badge {
    font-size: .75rem;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 500;
}

/* ── SECTION HEADER ── */
.section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--green-dark);
    margin-bottom: 1rem;
}

/* ── TABLE CARD ── */
.table-card {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #dcedc8;
    overflow: hidden;
}

.table-card .card-head {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f1f8e9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .5rem;
}

.table-card .card-head h6 {
    margin: 0;
    font-size: .9rem;
    font-weight: 600;
    color: var(--green-dark);
}

.table thead th {
    background: var(--green-xlight);
    color: var(--green-dark);
    font-size: .78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .4px;
    border: none;
    padding: .7rem 1rem;
}

.table tbody td {
    font-size: .85rem;
    color: #37474f;
    padding: .75rem 1rem;
    border-color: #f1f8e9;
    vertical-align: middle;
}

.table tbody tr:last-child td {
    border-bottom: none;
}

.badge-status {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .72rem;
    font-weight: 600;
}

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

.badge-proses {
    background: #fff8e1;
    color: #f57f17;
}

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

/* ── BLOK CARDS ── */
.blok-card {
    background: #fff;
    border-radius: 14px;
    border: 1px solid #dcedc8;
    padding: 1.1rem 1.25rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    height: 100%;
}

.blok-num {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--green-xlight);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .9rem;
    color: var(--green-primary);
    flex-shrink: 0;
}

.blok-info h6 {
    font-size: .875rem;
    font-weight: 600;
    color: #263238;
    margin-bottom: 2px;
}

.blok-info small {
    font-size: .75rem;
    color: #78909c;
}

/* ── OVERLAY (mobile) ── */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .35);
    z-index: 999;
}

/* ── BTN GREEN ── */
.btn-green {
    background: var(--green-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: .4rem .95rem;
    font-size: .825rem;
    font-weight: 500;
    cursor: pointer;
    transition: background .2s;
}

.btn-green:hover {
    background: var(--green-dark);
    color: #fff;
}

/* ── MODAL LOGOUT ── */
.modal-content {
    border-radius: 16px;
    border: none;
}

.modal-header {
    border-bottom: 1px solid #f1f8e9;
    padding: 1.1rem 1.4rem;
}

.modal-footer {
    border-top: 1px solid #f1f8e9;
    padding: .9rem 1.4rem;
}

.modal-icon-wrap {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #ffebee;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: #e53935;
    margin: 0 auto 1rem;
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-overlay.open {
        display: block;
    }

    .topbar {
        left: 0;
    }

    .topbar .hamburger {
        display: block;
    }

    .main-content {
        margin-left: 0;
        padding: 72px 1rem 2rem;
    }
}



/* ── Breadcrumb ─────────────────────────────────────── */
.pw-breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #9CA3AF;
    margin-bottom: 8px;
}

.pw-breadcrumb i {
    font-size: 12px;
}

.pw-breadcrumb span.active {
    color: #374151;
    font-weight: 500;
}

/* ── Card ───────────────────────────────────────────── */
.pw-card {
    background: #fff;
    border: 1px solid #F3F4F6;
    border-radius: 14px;
    padding: 1.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
}

.pw-card-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #EFF6FF;
    color: #2563EB;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 1.25rem;
}

.pw-section-label {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .07em;
    text-transform: uppercase;
    color: #9CA3AF;
    margin-bottom: 1.25rem;
}

/* ── Label ──────────────────────────────────────────── */
.pw-label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
    font-size: 13.5px;
    color: #374151;
}

/* ── Input ──────────────────────────────────────────── */
.pw-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.pw-input-icon {
    position: absolute;
    left: 13px;
    color: #9CA3AF;
    font-size: 15px;
    pointer-events: none;
    transition: color .2s;
}

.pw-input {
    width: 100%;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    padding: 11px 14px 11px 38px;
    font-size: 14px;
    color: #111827;
    outline: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
}

.pw-input::placeholder {
    color: #C1C8D1;
}

.pw-input:focus {
    background: #fff;
    border-color: #2563EB;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
}

.pw-input:focus~.pw-input-icon,
.pw-input-wrapper:focus-within .pw-input-icon {
    color: #2563EB;
}

.pw-input-wrapper.is-invalid .pw-input {
    border-color: #EF4444;
    background: #FFF5F5;
}

.pw-input-wrapper.is-invalid .pw-input:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, .1);
}

/* ── Hint & Error ───────────────────────────────────── */
.pw-hint {
    margin-top: 5px;
    font-size: 12px;
    color: #9CA3AF;
}

.pw-error {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 6px;
    color: #DC2626;
    font-size: 12.5px;
    font-weight: 500;
}

/* ── Form Footer ────────────────────────────────────── */
.pw-form-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid #F3F4F6;
}

.pw-required-note {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #9CA3AF;
}

.pw-form-actions {
    display: flex;
    gap: 8px;
}

/* ── Buttons ────────────────────────────────────────── */
.pw-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background .15s, border-color .15s, color .15s;
}

.pw-btn-primary {
    background: #2563EB;
    color: #fff;
    border-color: #2563EB;
}

.pw-btn-primary:hover {
    background: #1D4ED8;
    border-color: #1D4ED8;
    color: #fff;
}

.pw-btn-secondary {
    background: #fff;
    color: #374151;
    border-color: #E5E7EB;
}

.pw-btn-secondary:hover {
    background: #F9FAFB;
    color: #111827;
}

.pw-btn-light {
    background: #F3F4F6;
    color: #374151;
    border-color: #E5E7EB;
}

.pw-btn-light:hover {
    background: #E5E7EB;
}


/* ── Google Font ── */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600&display=swap');

/* ── Root Variables ── */
:root {
    --primary: #2563EB;
    --primary-light: #EFF6FF;
    --primary-dark: #1D4ED8;
    --success: #16A34A;
    --success-light: #F0FDF4;
    --warning: #D97706;
    --warning-light: #FFFBEB;
    --danger: #DC2626;
    --danger-light: #FEF2F2;
    --text-main: #111827;
    --text-muted: #6B7280;
    --text-faint: #9CA3AF;
    --border: #E5E7EB;
    --bg-page: #F9FAFB;
    --bg-card: #FFFFFF;
    --bg-row-hover: #F8FAFF;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --shadow-card: 0 1px 3px rgba(0, 0, 0, .06), 0 1px 2px rgba(0, 0, 0, .04);
    --shadow-btn: 0 1px 2px rgba(0, 0, 0, .08);
}

body,
.content-wrapper,
.main-panel {
    font-family: 'Plus Jakarta Sans', sans-serif !important;
    background-color: var(--bg-page) !important;
}

/* ── Page Wrapper ── */
.pw-container {
    padding: 1.75rem 1.5rem;
    max-width: 1280px;
}

/* ── Page Header ── */
.pw-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.pw-header-left h4 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-main);
    margin: 0 0 3px;
}

.pw-header-left p {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin: 0;
}

.pw-header-right {
    display: flex;
    gap: 8px;
}

/* ── Buttons ── */
.pw-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 15px;
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    box-shadow: var(--shadow-btn);
    transition: filter .15s, transform .1s;
    text-decoration: none;
}

.pw-btn:hover {
    filter: brightness(1.07);
    text-decoration: none;
}

.pw-btn:active {
    transform: scale(.97);
}

.pw-btn-primary {
    background: var(--primary);
    color: #fff;
}

.pw-btn-success {
    background: var(--success);
    color: #fff;
}

/* ── Stat Cards ── */
.pw-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 1.5rem;
}

.pw-stat {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    box-shadow: var(--shadow-card);
}

.pw-stat-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.pw-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.pw-stat-icon {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
}

.pw-stat-value {
    font-size: 1.625rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1;
}

.pw-stat-sub {
    font-size: 0.7rem;
    color: var(--text-faint);
    margin-top: 3px;
}

/* ── Main Card ── */
.pw-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

/* ── DataTable Override ── */
.pw-card .dataTables_wrapper {
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.pw-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 10px;
}

.pw-toolbar .dataTables_length label,
.pw-toolbar .dataTables_filter label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.pw-toolbar .dataTables_length select,
.pw-toolbar .dataTables_filter input {
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 6px 10px;
    font-size: 0.8125rem;
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text-main);
    background: var(--bg-page);
    outline: none;
    transition: border-color .15s;
}

.pw-toolbar .dataTables_length select:focus,
.pw-toolbar .dataTables_filter input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
}

.pw-toolbar .dataTables_filter input {
    width: 200px;
}

/* ── Table ── */
#workersTable {
    width: 100% !important;
    border-collapse: collapse;
    font-size: 0.8125rem;
}

#workersTable thead th {
    padding: 11px 16px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-muted);
    background: var(--bg-page);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

#workersTable tbody td {
    padding: 12px 16px;
    color: var(--text-main);
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

#workersTable tbody tr:last-child td {
    border-bottom: none;
}

#workersTable tbody tr:hover td {
    background: var(--bg-row-hover);
}

/* ── Name cell ── */
.td-name-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.td-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6875rem;
    font-weight: 600;
    flex-shrink: 0;
}

.td-name {
    font-weight: 500;
    color: var(--text-main);
}

/* ── Badges ── */
.pw-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 99px;
    font-size: 0.7rem;
    font-weight: 600;
}

.badge-code {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.badge-job {
    background: #F3F0FF;
    color: #5B21B6;
}

.badge-afd {
    background: var(--success-light);
    color: var(--success);
}

/* ── Action buttons ── */
.td-actions {
    display: flex;
    gap: 6px;
    justify-content: center;
}

.act-btn {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    border: 1px solid;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .15s, transform .1s;
    font-size: 14px;
    text-decoration: none;
}

.act-btn:hover {
    opacity: .8;
    text-decoration: none;
}

.act-btn:active {
    transform: scale(.93);
}

.act-edit {
    border-color: var(--warning);
    color: var(--warning);
}

.act-edit:hover {
    background: var(--warning-light);
    color: var(--warning);
}

.act-del {
    border-color: var(--danger);
    color: var(--danger);
}

.act-del:hover {
    background: var(--danger-light);
    color: var(--danger);
}

/* ── DataTable footer ── */
.pw-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 10px;
}

.pw-footer .dataTables_info {
    font-size: 0.775rem;
    color: var(--text-muted);
}

.pw-footer .dataTables_paginate .paginate_button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    padding: 0 8px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border) !important;
    background: var(--bg-card) !important;
    font-size: 0.775rem;
    color: var(--text-main) !important;
    cursor: pointer;
    margin: 0 2px;
    transition: background .1s;
}

.pw-footer .dataTables_paginate .paginate_button:hover {
    background: var(--bg-page) !important;
    color: var(--text-main) !important;
    border-color: var(--primary) !important;
}

.pw-footer .dataTables_paginate .paginate_button.current {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: #fff !important;
    font-weight: 600;
}

.pw-footer .dataTables_paginate .paginate_button.disabled {
    opacity: .4;
    cursor: default;
}

/* ── Alert flash ── */
.pw-alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    border-radius: var(--radius-md);
    font-size: 0.8125rem;
    margin-bottom: 1rem;
    border: 1px solid;
}

.pw-alert-success {
    background: var(--success-light);
    border-color: #86EFAC;
    color: #15803D;
}

.pw-alert-danger {
    background: var(--danger-light);
    border-color: #FCA5A5;
    color: #B91C1C;
}