/* ===========================================
   STAFHRDigital – style.css
   Blueprint: Simple · Practical · Informative · Mobile First
   =========================================== */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* ---- CSS Variables ---- */
:root {
    --primary: #2563EB;
    --primary-light: #3B82F6;
    --primary-dark: #1D4ED8;
    --bg: #F5F7FA;
    --card: #FFFFFF;
    --success: #22C55E;
    --warning: #F59E0B;
    --danger: #EF4444;
    --text: #1E293B;
    --text-muted: #64748B;
    --border: #E2E8F0;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .06), 0 1px 2px rgba(0, 0, 0, .04);
    --shadow: 0 4px 16px rgba(37, 99, 235, .10);
    --shadow-lg: 0 8px 32px rgba(37, 99, 235, .14);
    --radius: 14px;
    --radius-sm: 8px;
    --nav-h: 64px;
    --sidebar-w: 240px;
    --transition: .25s cubic-bezier(.4, 0, .2, 1);
}

/* ---- Reset ---- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 15px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    font-family: inherit;
}

/* ============================================================
   TOP BAR
   ============================================================ */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    min-height: 58px;
    height: auto;
    background: #002060;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    padding: 6px 10px;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 32, 96, .35);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
    overflow: hidden;
}

.topbar-brand {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}

.topbar-brand .brand-icon {
    width: auto;
    height: auto;
    background: transparent !important;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: #ffffff !important;
    flex-shrink: 0;
    box-shadow: none;
    border: none;
    padding: 0;
}

/* Force flex-column on ALL container divs inside .topbar-brand, including Bootstrap .d-flex */
.topbar-brand .d-flex,
.topbar-brand div.d-flex,
.topbar-brand .brand-text-container,
.topbar-brand>div:not(.brand-icon) {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: flex-start !important;
    text-align: left !important;
    min-width: 0;
    overflow: hidden;
}

.topbar-brand .brand-name,
.topbar-brand>div:not(.brand-icon)>div:first-child {
    font-weight: 800 !important;
    font-size: clamp(0.85rem, 3.8vw, 1.05rem) !important;
    line-height: 1.15 !important;
    letter-spacing: .3px !important;
    color: #ffffff !important;
    display: block !important;
    margin: 0 !important;
    padding: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
}

.topbar-brand .brand-sub,
.topbar-brand small,
.topbar-brand>div:not(.brand-icon)>div:last-child {
    font-size: clamp(0.56rem, 2.4vw, 0.66rem) !important;
    font-weight: 500 !important;
    line-height: 1.15 !important;
    color: rgba(255, 255, 255, .88) !important;
    display: block !important;
    margin-top: 1px !important;
    margin-left: 0 !important;
    padding: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 100% !important;
}

.topbar-brand .brand-text-container .brand-sub,
.topbar-brand>div:not(.brand-icon) .brand-sub,
.topbar-brand>div:not(.brand-icon)>div:last-child {
    font-size: clamp(0.56rem, 2.4vw, 0.66rem);
    font-weight: 500;
    line-height: 1.15;
    color: rgba(255, 255, 255, .88);
    display: block !important;
    margin-top: 1px;
    padding: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.topbar-period {
    font-size: .72rem;
    opacity: .85;
    background: rgba(255, 255, 255, .15);
    border-radius: 20px;
    padding: 3px 10px;
}

.btn-refresh-banner {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 0.72rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    white-space: nowrap;
}

.btn-refresh-banner i {
    color: #4ade80;
    font-size: 0.85rem;
}

.btn-refresh-banner:hover {
    background: rgba(255, 255, 255, 0.32);
    border-color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-refresh-banner:active {
    transform: translateY(0) scale(0.96);
}

@keyframes spinIcon {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.spin-animation {
    animation: spinIcon 0.9s linear infinite;
    display: inline-block;
}

/* ============================================================
   SIDEBAR (Desktop ≥ 992px)
   ============================================================ */
.sidebar {
    position: fixed;
    top: 56px;
    left: 0;
    bottom: 0;
    width: var(--sidebar-w);
    background: var(--card);
    border-right: 1px solid var(--border);
    overflow-y: auto;
    z-index: 90;
    padding: 16px 0;
    display: none;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 10px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: .875rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: background var(--transition), color var(--transition);
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.sidebar-item i {
    font-size: 1.1rem;
    width: 20px;
    flex-shrink: 0;
}

.sidebar-item:hover,
.sidebar-item.active {
    background: linear-gradient(90deg, rgba(37, 99, 235, .10) 0%, rgba(37, 99, 235, .04) 100%);
    color: var(--primary);
}

.sidebar-item.active {
    font-weight: 600;
}

.sidebar-divider {
    height: 1px;
    background: var(--border);
    margin: 10px 16px;
}

.sidebar-label {
    font-size: .68rem;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: .8px;
    text-transform: uppercase;
    padding: 8px 24px 4px;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
    padding-top: 56px;
    padding-bottom: calc(var(--nav-h) + 16px);
    min-height: 100vh;
}

.page-container {
    padding: 20px 16px;
    max-width: 960px;
    margin: 0 auto;
}

/* Pages */
.page {
    display: none;
    animation: fadeUp .3s ease;
}

.page.active {
    display: block;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================================
   BOTTOM NAV (Mobile < 992px)
   ============================================================ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--nav-h);
    background: var(--card);
    border-top: 1px solid var(--border);
    display: flex;
    z-index: 100;
    box-shadow: 0 -2px 12px rgba(0, 0, 0, .07);
}

.nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    cursor: pointer;
    color: var(--text-muted);
    font-size: .65rem;
    font-weight: 500;
    transition: color var(--transition);
    border: none;
    background: none;
    padding: 0;
}

.nav-item i {
    font-size: 1.3rem;
    transition: transform var(--transition);
}

.nav-item.active {
    color: var(--primary);
}

.nav-item.active i {
    transform: scale(1.1);
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px 12px;
    border-bottom: 1px solid var(--border);
}

.card-header h3 {
    font-size: .95rem;
    font-weight: 600;
}

.card-header h3 small {
    display: block;
    font-size: .7rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-top: 1px;
}

.card-header-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* Gradient Blue Text & Symbol Utility */
.text-gradient-blue {
    background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    font-weight: 800 !important;
}

.icon-gradient-blue {
    background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent !important;
    display: inline-block;
}

.card-body {
    padding: 18px 20px;
}

.card-footer {
    padding: 12px 20px;
    border-top: 1px solid var(--border);
    background: #fafbfc;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

/* ============================================================
   STAT GRID (Dashboard)
   ============================================================ */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: transform var(--transition), box-shadow var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.stat-card.blue::before {
    background: var(--primary);
}

.stat-card.green::before {
    background: var(--success);
}

.stat-card.amber::before {
    background: var(--warning);
}

.stat-card.red::before {
    background: var(--danger);
}

.stat-card-icon {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.stat-card.blue .stat-card-icon {
    color: var(--primary);
}

.stat-card.green .stat-card-icon {
    color: var(--success);
}

.stat-card.amber .stat-card-icon {
    color: var(--warning);
}

.stat-card.purple::before {
    background: #8b5cf6;
}

.stat-card.purple .stat-card-icon {
    color: #8b5cf6;
}

.stat-card.cyan::before {
    background: #06b6d4;
}

.stat-card.cyan .stat-card-icon {
    color: #06b6d4;
}

.stat-card.pink::before {
    background: #ec4899;
}

.stat-card.pink .stat-card-icon {
    color: #ec4899;
}

.stat-card.orange::before {
    background: #f97316;
}

.stat-card.orange .stat-card-icon {
    color: #f97316;
}

.stat-card.indigo::before {
    background: #6366f1;
}

.stat-card.indigo .stat-card-icon {
    color: #6366f1;
}

/* Stat Cards Slide / Carousel Container Horizontal (Minimalist 4 per row) */
.stat-carousel-container {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 2px 2px 8px 2px;
}

.stat-carousel-container::-webkit-scrollbar {
    height: 4px;
}

.stat-carousel-container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.stat-carousel-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.stat-carousel-container .stat-card {
    flex: 0 0 calc(25% - 7.5px) !important;
    width: calc(25% - 7.5px) !important;
    min-width: 0 !important;
    padding: 8px 10px !important;
    scroll-snap-align: start;
    border-radius: 8px !important;
}

.stat-carousel-container .stat-card-icon {
    font-size: 1.1rem;
    margin-bottom: 2px;
}

.stat-carousel-container .stat-card-label {
    font-size: 0.65rem;
    font-weight: 600;
    margin-bottom: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.stat-carousel-container .stat-card-value {
    font-size: 0.95rem;
    font-weight: 800;
}

@media (max-width: 768px) {
    .stat-carousel-container {
        gap: 6px !important;
    }

    .stat-carousel-container .stat-card {
        flex: 0 0 calc(25% - 4.5px) !important;
        width: calc(25% - 4.5px) !important;
        min-width: 0 !important;
        padding: 6px 5px !important;
    }

    .stat-carousel-container .stat-card-icon {
        font-size: 0.95rem !important;
    }

    .stat-carousel-container .stat-card-label {
        font-size: 0.58rem !important;
        letter-spacing: -0.2px;
    }

    .stat-carousel-container .stat-card-value {
        font-size: 0.85rem !important;
    }
}

/* ============================================================
   BADGES / PILLS
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .7rem;
    font-weight: 600;
    letter-spacing: .2px;
}

.badge-success {
    background: #dcfce7;
    color: #15803d;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-danger {
    background: #fee2e2;
    color: #b91c1c;
}

.badge-info {
    background: #dbeafe;
    color: #1d4ed8;
}

.badge-muted {
    background: #f1f5f9;
    color: var(--text-muted);
}

/* ============================================================
   SECTION HEADER
   ============================================================ */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title i {
    color: var(--primary);
}

/* ============================================================
   INFO BANNER
   ============================================================ */
.info-banner {
    background: linear-gradient(180deg, #002060 0%, rgba(0, 32, 96, 0.45) 100%);
    border-radius: var(--radius);
    padding: 16px 20px;
    color: #fff;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 32, 96, 0.15);
    border: 1px solid rgba(0, 32, 96, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.info-banner::after {
    content: '\f1c0';
    font-family: 'Bootstrap Icons';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 4rem;
    opacity: .08;
}

.info-banner-title {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 2px;
    letter-spacing: 0.3px;
}

.info-banner-institution {
    font-size: 0.82rem;
    font-weight: 500;
    opacity: 0.92;
    margin-bottom: 6px;
    letter-spacing: 0.2px;
}

.info-banner-sub {
    font-size: .74rem;
    opacity: .85;
    margin-top: 12px;
}

.info-banner-release-urgent-inline {
    display: inline-flex;
    align-items: center;
    font-size: 0.48rem;
    font-weight: 600;
    color: #ffffff;
    background: rgba(220, 38, 38, 0.22);
    border-left: 2px solid #ef4444;
    border-radius: 3px;
    padding: 1px 5px;
    letter-spacing: 0.08px;
    border: 1px solid rgba(248, 113, 113, 0.3);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.info-banner-jobdesk-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    min-width: 26px;
    min-height: 26px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.35);
    color: #ffffff;
    text-decoration: none;
    flex-shrink: 0;
    margin-left: auto;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.info-banner-jobdesk-btn i {
    font-size: 0.95rem;
    color: #ffffff;
    line-height: 1;
}

.info-banner-jobdesk-btn:hover {
    background: rgba(255, 255, 255, 0.35);
    border-color: #ffffff;
    color: #ffffff;
    transform: scale(1.08);
}

.info-banner-jobdesk-btn:active {
    transform: scale(0.95);
}

/* Semi-transparent Hourglass Loading Overlay Global */
.data-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding: 16px;
}

.data-loading-box {
    background: #ffffff;
    border: 1px solid #bfdbfe;
    box-shadow: 0 4px 16px rgba(0, 32, 96, 0.12);
    border-radius: 10px;
    padding: 9px 16px;
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 0.76rem;
    font-weight: 600;
    color: #002060;
}

.loading-hourglass-icon {
    font-size: 1.1rem;
    color: #2563eb;
    display: inline-block;
    animation: flipHourglass 1.8s infinite cubic-bezier(0.45, 0.05, 0.55, 0.95);
}

@keyframes flipHourglass {
    0% {
        transform: rotate(0deg);
    }

    45% {
        transform: rotate(180deg);
    }

    50% {
        transform: rotate(180deg);
    }

    95% {
        transform: rotate(360deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.progress-wrap {
    background: var(--border);
    border-radius: 20px;
    height: 8px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    border-radius: 20px;
    transition: width .6s ease;
}

.progress-blue {
    background: var(--primary);
}

.progress-green {
    background: var(--success);
}

.progress-amber {
    background: var(--warning);
}

/* ============================================================
   TABLE
   ============================================================ */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .82rem;
}

.data-table th {
    background: var(--bg);
    color: var(--text-muted);
    font-weight: 600;
    font-size: .72rem;
    letter-spacing: .4px;
    text-transform: uppercase;
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.data-table td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover td {
    background: #f8faff;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: .8rem;
    font-weight: 600;
    border: none;
    transition: all var(--transition);
    white-space: nowrap;
}

.btn:hover {
    filter: brightness(1.08);
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, .3);
}

.btn-success {
    background: var(--success);
    color: #fff;
    box-shadow: 0 2px 8px rgba(34, 197, 94, .3);
}

.btn-warning {
    background: var(--warning);
    color: #fff;
    box-shadow: 0 2px 8px rgba(245, 158, 11, .3);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
    box-shadow: none;
}

.btn-sm {
    padding: 6px 12px;
    font-size: .75rem;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    justify-content: center;
}

/* ============================================================
   IMPORT AREA
   ============================================================ */
.import-dropzone {
    border: 2px dashed var(--primary-light);
    border-radius: var(--radius);
    padding: 40px 20px;
    text-align: center;
    background: rgba(37, 99, 235, .03);
    cursor: pointer;
    transition: all var(--transition);
}

.import-dropzone:hover,
.import-dropzone.drag-over {
    background: rgba(37, 99, 235, .07);
    border-color: var(--primary);
    transform: scale(1.01);
}

.import-dropzone i {
    font-size: 3rem;
    color: var(--primary-light);
    margin-bottom: 12px;
}

.import-dropzone h4 {
    font-size: .95rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.import-dropzone p {
    font-size: .8rem;
    color: var(--text-muted);
}

.import-file-info {
    background: var(--card);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--border);
    margin-top: 14px;
}

.import-file-info i {
    font-size: 1.5rem;
    color: var(--success);
}

/* ============================================================
   CHART WRAPPER
   ============================================================ */
.chart-wrap {
    position: relative;
    height: 200px;
}

.chart-wrap canvas {
    width: 100% !important;
}

/* ============================================================
   KAS HRD SUMMARY ROW
   ============================================================ */
.kas-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.kas-row:last-child {
    border-bottom: none;
}

.kas-row-label {
    font-size: .82rem;
    color: var(--text-muted);
}

.kas-row-val {
    font-size: .92rem;
    font-weight: 600;
}

.kas-row-val.income {
    color: var(--success);
}

.kas-row-val.expense {
    color: var(--danger);
}

/* ============================================================
   KONTRAKAN TABS
   ============================================================ */
.tab-list {
    display: flex;
    gap: 4px;
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 4px;
    margin-bottom: 16px;
}

.tab-btn {
    flex: 1;
    padding: 7px 0;
    font-size: .75rem;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
}

.tab-btn.active {
    background: var(--card);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeUp .2s ease;
}

/* ============================================================
   SHARE PANEL
   ============================================================ */
.share-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.share-option {
    background: var(--card);
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 16px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
}

.share-option:hover,
.share-option.selected {
    border-color: var(--primary);
    background: rgba(37, 99, 235, .04);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.share-option i {
    font-size: 2rem;
    margin-bottom: 8px;
    color: var(--primary);
    display: block;
}

.share-option p {
    font-size: .78rem;
    font-weight: 600;
}

/* ============================================================
   UTILITIES
   ============================================================ */
.text-muted {
    color: var(--text-muted) !important;
}

.text-primary {
    color: var(--primary) !important;
}

.text-success {
    color: var(--success) !important;
}

.text-warning {
    color: var(--warning) !important;
}

.text-danger {
    color: var(--danger) !important;
}

.fw-bold {
    font-weight: 700;
}

.fw-semi {
    font-weight: 600;
}

.fs-sm {
    font-size: .8rem;
}

.fs-xs {
    font-size: .72rem;
}

.mt-2 {
    margin-top: 8px;
}

.mt-3 {
    margin-top: 12px;
}

.mt-4 {
    margin-top: 16px;
}

.mb-2 {
    margin-bottom: 8px;
}

.mb-3 {
    margin-bottom: 12px;
}

.mb-4 {
    margin-bottom: 16px;
}

.d-flex {
    display: flex;
}

.align-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 8px;
}

.gap-3 {
    gap: 12px;
}

.w-100 {
    width: 100%;
}

.text-center {
    text-align: center;
}

.divider {
    height: 1px;
    background: var(--border);
    margin: 16px 0;
}

/* ============================================================
   RESPONSIVE – Tablet ≥ 768px
   ============================================================ */
@media (min-width: 768px) {
    .stat-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .share-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .chart-wrap {
        height: 240px;
    }
}

/* ============================================================
   RESPONSIVE – Desktop ≥ 992px (LAPTOP LAYOUT CONTROL)
   ============================================================ */
@media (min-width: 992px) {

    /* Non-Admin Laptops: Hide sidebar, full width layout matching mobile */
    body:not(.admin-device) .sidebar {
        display: none !important;
    }

    body:not(.admin-device) .main-content {
        margin-left: 0 !important;
        padding-bottom: 70px !important;
    }

    body:not(.admin-device) .bottom-nav {
        display: flex !important;
    }

    body:not(.admin-device) .page-container {
        padding: 16px 16px;
        max-width: 100%;
    }

    /* Admin Laptop (body.admin-device) */
    body.admin-device .sidebar {
        display: flex !important;
        flex-direction: column;
    }

    body.admin-device .main-content {
        margin-left: var(--sidebar-w) !important;
        padding-bottom: 32px;
    }

    body.admin-device .bottom-nav {
        display: none !important;
    }

    body.admin-device .page-container {
        padding: 28px 32px;
    }

    html {
        font-size: 16px;
    }
}

/* ============================================================
   LOADING SPINNER
   ============================================================ */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin .7s linear infinite;
    margin: 30px auto;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3.5rem;
    opacity: .3;
    margin-bottom: 12px;
    display: block;
}

.empty-state h4 {
    font-size: .95rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.empty-state p {
    font-size: .82rem;
}

/* ============================================================
   TOAST
   ============================================================ */
.toast-container {
    position: fixed;
    top: 68px;
    right: 12px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: .82rem;
    font-weight: 500;
    animation: slideIn .25s ease;
    min-width: 220px;
}

.toast.success i {
    color: var(--success);
}

.toast.warning i {
    color: var(--warning);
}

.toast.danger i {
    color: var(--danger);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* ============================================================
   NILAI FORMAT
   ============================================================ */
.nilai-besar {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1;
    color: var(--text);
}

.nilai-satuan {
    font-size: .8rem;
    color: var(--text-muted);
    margin-left: 4px;
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: #cbd5e1;
}

/* ============================================================
   EXTRA UTILITIES
   ============================================================ */
.ms-auto {
    margin-left: auto !important;
}

.me-2 {
    margin-right: 8px !important;
}

.me-auto {
    margin-right: auto !important;
}

/* ============================================================
   STAT CARD CLICKABLE
   ============================================================ */
.stat-clickable {
    cursor: pointer;
    outline: none;
}

.stat-clickable:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.stat-clickable:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ============================================================
   PROGRESS BAR SECTION SPACING
   ============================================================ */
.progress-section-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

/* ============================================================
   FLEX WRAP GAP
   ============================================================ */
.flex-wrap {
    flex-wrap: wrap;
}

.gap-1 {
    gap: 4px;
}

/* ============================================================
   PRINT STYLES (Cetak / Export PDF)
   ============================================================ */
@media print {

    .topbar,
    .sidebar,
    .bottom-nav,
    .toast-container,
    .btn,
    .section-header .d-flex,
    .no-print,
    #biodata-search-card,
    #page-biodata .section-header {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }

    .page {
        display: none !important;
    }

    .page.active {
        display: block !important;
    }

    .page-container {
        padding: 0 !important;
        max-width: 100% !important;
    }

    #biodata-card-container {
        transform: none !important;
        width: 100% !important;
    }

    .card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #e2e8f0 !important;
    }

    body {
        background: white !important;
    }

    @page {
        margin: 10mm;
    }
}

/* ============================================================
   UI HELPERS & SORTING
   ============================================================ */
.hidden-mobile {
    display: inline-flex;
}

@media (max-width: 768px) {
    .hidden-mobile {
        display: none !important;
    }

    .table-responsive {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-x pan-y pinch-zoom;
        width: 100% !important;
    }

    .data-table {
        --table-zoom: 1;
        width: 100% !important;
        min-width: 100% !important;
        font-size: calc(0.62rem * var(--table-zoom, 1)) !important;
        font-variant-numeric: tabular-nums;
        line-height: 1.25;
        transition: font-size 0.15s ease, min-width 0.15s ease;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        text-rendering: optimizeLegibility;
        box-sizing: border-box !important;
    }

    .data-table:not(#bakocer-data-table) th {
        font-size: calc(0.58rem * var(--table-zoom, 1)) !important;
        padding: calc(5px * var(--table-zoom, 1)) calc(2px * var(--table-zoom, 1)) !important;
        letter-spacing: -0.2px;
        box-sizing: border-box !important;
    }

    .data-table:not(#bakocer-data-table) td {
        padding: calc(5px * var(--table-zoom, 1)) calc(2px * var(--table-zoom, 1)) !important;
        word-break: normal !important;
        overflow-wrap: break-word !important;
        box-sizing: border-box !important;
    }

    .nat-col-jenis {
        width: 20% !important;
        font-size: inherit !important;
        padding: calc(8px * var(--table-zoom, 1)) calc(4px * var(--table-zoom, 1)) !important;
    }

    .nat-col-kategori {
        width: 22% !important;
        font-size: inherit !important;
        padding: calc(8px * var(--table-zoom, 1)) calc(4px * var(--table-zoom, 1)) !important;
    }

    .nat-col-qty {
        width: 12% !important;
        font-size: inherit !important;
        padding: calc(8px * var(--table-zoom, 1)) calc(2px * var(--table-zoom, 1)) !important;
    }

    .nat-col-harga {
        width: 23% !important;
        font-size: inherit !important;
        padding: calc(8px * var(--table-zoom, 1)) calc(4px * var(--table-zoom, 1)) !important;
        white-space: nowrap !important;
        text-align: right !important;
    }

    .nat-col-total {
        width: 23% !important;
        font-size: inherit !important;
        padding: calc(8px * var(--table-zoom, 1)) calc(4px * var(--table-zoom, 1)) !important;
        white-space: nowrap !important;
        text-align: right !important;
    }

    /* Tabel Resume Natura (Atas), Perubahan & Rekap: Judul Kolom (th) & Data (td) selalu persis sama font-size nya di Mobile & Desktop */
    #natura-data-table,
    #natura-perubahan-data-table,
    #natura-rekap-data-table {
        font-size: calc(0.85rem * var(--table-zoom, 1)) !important;
    }

    #natura-data-table th,
    #natura-data-table td,
    #natura-perubahan-data-table th,
    #natura-perubahan-data-table td,
    #natura-rekap-data-table th,
    #natura-rekap-data-table td {
        font-size: inherit !important;
    }

    #natura-data-table th *,
    #natura-data-table td * {
        font-size: inherit !important;
    }

    /* Acuan tunggal font-size & responsivitas Tabel Resume BAKOCER (Mobile) */
    #bakocer-data-table {
        font-size: 0.85rem !important;
        width: 100% !important;
        min-width: 100% !important;
        table-layout: fixed !important;
        border-collapse: collapse !important;
        box-sizing: border-box !important;
    }

    #bakocer-data-table th,
    #bakocer-data-table thead th {
        font-size: 0.95rem !important;
        padding: 10px 4px !important;
        font-weight: 800 !important;
        letter-spacing: 0.5px !important;
        vertical-align: middle !important;
        text-align: center !important;
        line-height: 1.25 !important;
    }

    #bakocer-data-table td,
    #bakocer-data-table tbody td {
        font-size: 0.85rem !important;
        padding: 7px 6px !important;
        vertical-align: middle !important;
        line-height: 1.3 !important;
    }

    #bakocer-data-table td.bak-num-val {
        font-size: 0.94rem !important;
        font-weight: 800 !important;
        font-variant-numeric: tabular-nums !important;
    }

    #bakocer-data-table tr.bak-sub-header td,
    #bakocer-data-table td.bak-sub-header-cell {
        font-size: clamp(0.64rem, 1.4vw, 0.78rem) !important;
        padding: 4px 2px !important;
        font-weight: 700 !important;
        line-height: 1.15 !important;
        white-space: normal !important;
        word-break: normal !important;
        overflow-wrap: break-word !important;
        text-align: center !important;
    }

    #bakocer-data-table tfoot td {
        font-size: 0.90rem !important;
        padding: 9px 6px !important;
        font-weight: 900 !important;
    }

    #bakocer-data-table tfoot td.bak-num-val {
        font-size: 0.96rem !important;
        font-weight: 900 !important;
        font-variant-numeric: tabular-nums !important;
    }

    /* Detail Natura Table Columns (Tabel Belanja Beras / Pegawai) */
    .nat-det-no {
        width: 5% !important;
        font-size: calc(0.60rem * var(--detail-zoom, 1)) !important;
    }

    .nat-det-nama {
        width: 22% !important;
        font-size: calc(0.58rem * var(--detail-zoom, 1)) !important;
    }

    .nat-det-unit {
        width: 17% !important;
        font-size: calc(0.58rem * var(--detail-zoom, 1)) !important;
    }

    .nat-det-kat {
        width: 16% !important;
        font-size: calc(0.58rem * var(--detail-zoom, 1)) !important;
    }

    .nat-det-jatah {
        width: 22% !important;
        font-size: calc(0.56rem * var(--detail-zoom, 1)) !important;
    }

    .nat-det-ket {
        width: 18% !important;
        font-size: calc(0.56rem * var(--detail-zoom, 1)) !important;
    }

    .nat-det-paraf-col {
        width: 15% !important;
        font-size: calc(0.56rem * var(--detail-zoom, 1)) !important;
        text-align: center !important;
        display: none !important;
        /* Sembunyikan saat dilaporan tampilan layar */
    }

    /* Tampilkan kolom paraf saat diekspor (PNG / PDF) atau diprint sebagai daftar penerima */
    body.exporting-canvas .nat-det-paraf-col {
        display: table-cell !important;
    }

    @media print {
        .nat-det-paraf-col {
            display: table-cell !important;
        }
    }
}

/* Acuan tunggal font-size Tabel Resume Natura (Atas), Perubahan & Blok Rekap (Header th & Data td persis sama) */
#natura-data-table,
#natura-perubahan-data-table,
#natura-rekap-data-table {
    font-size: calc(0.85rem * var(--table-zoom, 1)) !important;
}

#natura-data-table th,
#natura-data-table td,
#natura-perubahan-data-table th,
#natura-perubahan-data-table td,
#natura-rekap-data-table th,
#natura-rekap-data-table td {
    font-size: inherit !important;
}

#natura-data-table th *,
#natura-data-table td * {
    font-size: inherit !important;
}

/* Acuan tunggal font-size & responsivitas Tabel Resume BAKOCER */
#bakocer-data-table {
    width: 100% !important;
    min-width: 100% !important;
    table-layout: fixed !important;
    border-collapse: collapse !important;
    box-sizing: border-box !important;
    font-family: 'Poppins', Arial, sans-serif !important;
}

#bakocer-data-table th,
#bakocer-data-table td {
    box-sizing: border-box !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
}

#bakocer-data-table th,
#bakocer-data-table thead th {
    font-size: 0.92rem !important;
    padding: 10px 4px !important;
    font-weight: 800 !important;
    letter-spacing: 0.5px !important;
    vertical-align: middle !important;
    text-align: center !important;
    line-height: 1.25 !important;
}

#bakocer-data-table td,
#bakocer-data-table tbody td {
    font-size: 0.85rem !important;
    padding: 7px 6px !important;
    vertical-align: middle !important;
    line-height: 1.3 !important;
}

#bakocer-data-table tr.bak-sub-header td,
#bakocer-data-table td.bak-sub-header-cell {
    font-size: clamp(0.64rem, 1.4vw, 0.78rem) !important;
    padding: 4px 2px !important;
    font-weight: 700 !important;
    line-height: 1.15 !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
    text-align: center !important;
}

#bakocer-data-table tfoot td {
    font-size: 0.90rem !important;
    padding: 9px 6px !important;
    font-weight: 900 !important;
}

@media (max-width: 768px) {

    #bakocer-data-table th,
    #bakocer-data-table thead th {
        font-size: 0.92rem !important;
        padding: 10px 4px !important;
    }

    #bakocer-data-table td,
    #bakocer-data-table tbody td {
        font-size: 0.85rem !important;
        padding: 7px 6px !important;
    }

    #bakocer-data-table tr.bak-sub-header td,
    #bakocer-data-table td.bak-sub-header-cell {
        font-size: clamp(0.62rem, 1.4vw, 0.76rem) !important;
        padding: 4px 2px !important;
        line-height: 1.15 !important;
        white-space: normal !important;
        word-break: normal !important;
        overflow-wrap: break-word !important;
        text-align: center !important;
    }

    #bakocer-data-table tfoot td {
        font-size: 0.90rem !important;
        padding: 9px 6px !important;
    }
}

/* ============================================================
   PDF DOCUMENT VIEWER MODE (Mobile PDF-like Rendering)
   ============================================================ */
.pdf-document-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x pan-y pinch-zoom;
}

.pdf-document-view {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-radius: 6px;
    padding: 12px 6px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

.sortable-row {
    display: flex;
    align-items: center;
    width: 100%;
}

.sortable-row .btn-report {
    flex-grow: 1;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    border: 1.5px solid #002060 !important;
    color: #002060 !important;
    background: #ffffff !important;
    transition: all var(--transition);
    border-radius: var(--radius-sm);
}

.sortable-row .btn-report:hover {
    background: #002060 !important;
    color: #ffffff !important;
    border-color: #002060 !important;
}

.sortable-row .btn-report:hover .btn-icon-main {
    color: #ffffff !important;
}

.sortable-row .btn-icon-main {
    flex-shrink: 0;
    color: #002060 !important;
    transition: color var(--transition);
}

/* ============================================================
   UNIFIED EXECUTIVE TOOLBAR PILL
   ============================================================ */
.natura-toolbar {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 30px;
    padding: 3px 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 2px;
}

.toolbar-btn {
    background: transparent;
    border: none;
    color: #475569;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 0;
}

.toolbar-btn:hover,
.toolbar-btn:active {
    background: #e2e8f0;
    color: #0f172a;
    transform: scale(1.1);
}

.toolbar-btn-img:hover {
    background: #dbeafe;
    color: #2563eb;
}

.toolbar-btn-pdf:hover {
    background: #fee2e2;
    color: #dc2626;
}

.toolbar-btn-wa:hover {
    background: #dcfce7;
    color: #16a34a;
}

.toolbar-indicator {
    font-size: 0.72rem;
    font-weight: 700;
    color: #1e293b;
    min-width: 36px;
    text-align: center;
    user-select: none;
}

.toolbar-divider {
    width: 1px;
    height: 18px;
    background: #cbd5e1;
    margin: 0 4px;
}

/* ============================================================
   INTERACTIVE SHARE PREVIEW MODAL
   ============================================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-content-box {
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(10px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    padding: 14px 18px;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
}

.modal-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-close-btn {
    background: transparent;
    border: none;
    font-size: 1.4rem;
    color: #64748b;
    cursor: pointer;
    line-height: 1;
}

.modal-body {
    padding: 16px;
    overflow-y: auto;
    max-height: 65vh;
}

.preview-img-container {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    overflow: hidden;
    background: #f1f5f9;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.preview-img-container img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.preview-text-box {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 14px;
    text-align: left;
    font-family: monospace;
    font-size: 0.78rem;
    color: #1e293b;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 250px;
    overflow-y: auto;
}

.modal-footer {
    padding: 12px 18px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: #f8fafc;
    flex-wrap: wrap;
}

@media (max-width: 576px) {
    .modal-footer {
        padding: 10px 12px;
        justify-content: center;
        gap: 8px 6px;
    }
}



/* ============================================================
   RESPONSIVE TUNJANGAN BERAS DETAIL TABLE
   ============================================================ */
/* ============================================================
   RESPONSIVE TUNJANGAN BERAS DETAIL TABLE
   ============================================================ */
#natura-detail-data-table {
    border-collapse: collapse;
}

#natura-detail-pdf-view {
    overflow-x: auto;
}

@media (max-width: 768px) {
    #nat-detail-title {
        font-size: clamp(0.95rem, 4vw, 1.15rem) !important;
    }

    #nat-detail-subtitle {
        font-size: clamp(0.75rem, 3vw, 0.85rem) !important;
    }

    #natura-detail-pdf-view {
        padding: 8px 4px !important;
    }
}

/* ============================================================
   EXECUTIVE PLATFORM SHARE SHEET
   ============================================================ */
.share-sheet-container {
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #cbd5e1;
}

.share-platform-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-top: 8px;
}

@media (max-width: 576px) {
    .share-platform-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.btn-platform-share {
    border-radius: 10px;
    padding: 10px 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-weight: 700;
    font-size: 0.72rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    outline: none;
    user-select: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.btn-platform-share:hover,
.btn-platform-share:active {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-platform-share.wa {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.btn-platform-share.tg {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    color: #075985;
}

.btn-platform-share.sys {
    background: #faf5ff;
    border: 1px solid #e9d5ff;
    color: #6b21a8;
}

.btn-platform-share.dl {
    background: #f0fdfa;
    border: 1px solid #99f6e4;
    color: #115e59;
}

.btn-platform-share.copy {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #334155;
}

/* ============================================================
   ESCALATOR / TANGGA JALAN STAGGERED BUTTON ANIMATION
   ============================================================ */
.curtain-wrapper {
    position: relative;
    overflow: hidden;
    transition: max-height 0.65s cubic-bezier(0.33, 1, 0.68, 1), opacity 0.45s ease;
    max-height: 1200px;
    opacity: 1;
    border-radius: 0 0 10px 10px;
}

.curtain-wrapper.curtain-closed {
    max-height: 0px !important;
    opacity: 0;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    border: none !important;
}

/* Staggered Escalator Step Effect on Buttons */
.curtain-wrapper .sortable-row {
    transition: opacity 0.38s cubic-bezier(0.34, 1.25, 0.64, 1),
        transform 0.38s cubic-bezier(0.34, 1.25, 0.64, 1);
    opacity: 1;
    transform: translateY(0) scale(1);
    transform-origin: top center;
}

.curtain-wrapper.curtain-closed .sortable-row {
    opacity: 0;
    transform: translateY(-18px) scale(0.95);
}

/* Minimalist Closed Curtain Indicator Bar */
.curtain-closed-banner {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    padding: 8px 14px;
    margin: 8px 16px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.25s ease;
}

.curtain-closed-banner:hover {
    background: #f1f5f9;
    border-color: #002060;
    transform: translateY(-1px);
}



.btn-curtain-toggle {
    background: #eff6ff;
    color: #002060;
    border: 1px solid #bfdbfe;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-curtain-toggle:hover {
    background: #002060;
    color: #ffffff;
    border-color: #002060;
    transform: scale(1.05);
}

/* Floating Scroll To Top Fast Launcher (Meluncur ke Atas) */
.btn-scroll-top {
    position: fixed;
    bottom: 24px;
    right: 20px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: #002060;
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 18px rgba(0, 32, 96, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px) scale(0.85);
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
        visibility 0.3s ease,
        background-color 0.2s ease;
    z-index: 9999;
}

.btn-scroll-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.btn-scroll-top:hover {
    background: #2563eb;
    color: #ffffff;
    transform: translateY(-3px) scale(1.08);
    box-shadow: 0 6px 22px rgba(0, 32, 96, 0.45);
}

.btn-scroll-top:active {
    transform: translateY(0) scale(0.95);
}

/* StafHRDigital Menjawab Full Page Styles */
.ai-msg-incoming {
    display: flex;
    justify-content: flex-start;
}

.ai-msg-outgoing {
    display: flex;
    justify-content: flex-end;
}

.ai-msg-bubble {
    max-width: 88%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 0.88rem;
    line-height: 1.55;
}

.ai-msg-incoming .ai-msg-bubble {
    background: #ffffff;
    color: #1e293b;
    border: 1px solid #cbd5e1;
    border-top-left-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.ai-msg-outgoing .ai-msg-bubble {
    background: #002060;
    color: #ffffff;
    border-top-right-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 32, 96, 0.2);
}

/* StafHRDigital Menjawab Flex & Responsive Layout Fixes */
.flex-grow-1 {
    flex: 1 1 auto !important;
    flex-grow: 1 !important;
}

@media (max-width: 576px) {
    #page-ai .ai-chat-card {
        height: calc(100vh - 200px) !important;
        min-height: 420px !important;
    }

    #page-ai .section-header {
        padding: 10px 12px !important;
    }

    #page-ai .section-title {
        font-size: 1.05rem !important;
    }

    #ai-full-chat-input {
        font-size: 0.82rem !important;
        padding: 8px 10px !important;
    }

    #ai-full-chat-input::placeholder {
        font-size: 0.78rem !important;
    }
}

/* ============================================================
   STAFHRDIGITAL MENJAWAB - ANIMATED VECTOR WIDGET CARD
   ============================================================ */
.ai-widget-card {
    background: linear-gradient(135deg, #0f172a 0%, #002060 55%, #1e3a8a 100%);
    border-radius: 18px;
    padding: 16px 18px;
    color: #ffffff;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 32, 96, 0.28), inset 0 1px 1px rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(96, 165, 250, 0.35);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 16px;
    margin-bottom: 20px;
}

.ai-widget-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.14) 0%, transparent 60%);
    pointer-events: none;
    animation: aiShimmer 6s ease-in-out infinite alternate;
}

.ai-widget-card:hover {
    transform: translateY(-3px) scale(1.01);
    box-shadow: 0 12px 32px rgba(0, 32, 96, 0.38), inset 0 1px 1px rgba(255, 255, 255, 0.25);
    border-color: rgba(147, 197, 253, 0.65);
}

.ai-widget-card:active {
    transform: translateY(0) scale(0.99);
}

.ai-widget-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: relative;
    z-index: 2;
}

.ai-widget-content {
    flex: 1;
    min-width: 0;
}

/* Balon Ucapan (Speech Bubble) */
.ai-speech-bubble {
    background: rgba(255, 255, 255, 0.97);
    color: #0f172a;
    border-radius: 14px;
    padding: 12px 15px;
    position: relative;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.ai-speech-bubble::after {
    content: '';
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 7px 0 7px 10px;
    border-style: solid;
    border-color: transparent transparent transparent rgba(255, 255, 255, 0.97);
}

.ai-speech-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 0.64rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.ai-pulse-dot {
    width: 6px;
    height: 6px;
    background: #3b82f6;
    border-radius: 50%;
    animation: aiDotPulse 1.5s infinite;
}

.ai-speech-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: #002060;
    line-height: 1.2;
    margin-bottom: 4px;
}

.ai-speech-text {
    font-size: 0.76rem;
    color: #334155;
    font-weight: 500;
    line-height: 1.35;
    margin-bottom: 8px;
}

.ai-speech-action {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.74rem;
    font-weight: 700;
    color: #1d4ed8;
}

.ai-speech-action i {
    font-size: 0.95rem;
    transition: transform 0.2s ease;
}

.ai-widget-card:hover .ai-speech-action i {
    transform: translateX(4px);
}

/* Vector Avatar Container & Animations */
.ai-vector-container {
    position: relative;
    width: 96px;
    height: 96px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-avatar-glow {
    position: absolute;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.5) 0%, rgba(37, 99, 235, 0.12) 70%);
    filter: blur(8px);
    animation: auraGlow 2.5s ease-in-out infinite alternate;
}

.ai-avatar-wrapper {
    width: 90px;
    height: 90px;
    position: relative;
    z-index: 2;
}

.ai-mascot-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

/* Keyframe Animations */
@keyframes aiShimmer {
    0% {
        transform: translate(0, 0);
    }

    100% {
        transform: translate(12px, 12px);
    }
}

@keyframes aiDotPulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.4;
        transform: scale(1.4);
    }
}

@keyframes auraGlow {
    0% {
        transform: scale(0.9);
        opacity: 0.5;
    }

    100% {
        transform: scale(1.18);
        opacity: 0.95;
    }
}

.svg-spin-ring {
    transform-origin: 60px 60px;
    animation: ringSpin 12s linear infinite;
}

@keyframes ringSpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.svg-floating-body {
    transform-origin: 60px 60px;
    animation: bodyFloat 3s ease-in-out infinite alternate;
}

@keyframes bodyFloat {
    0% {
        transform: translateY(0px);
    }

    100% {
        transform: translateY(-5px);
    }
}

.svg-antenna-orb {
    animation: antennaGlow 1.2s ease-in-out infinite alternate;
}

@keyframes antennaGlow {
    0% {
        fill: #38bdf8;
        filter: drop-shadow(0 0 2px #38bdf8);
    }

    100% {
        fill: #34d399;
        filter: drop-shadow(0 0 8px #34d399);
    }
}

.svg-eyes {
    animation: eyeBlink 4s ease-in-out infinite;
}

@keyframes eyeBlink {

    0%,
    46%,
    48%,
    100% {
        transform: scaleY(1);
        transform-origin: 60px 50px;
    }

    47% {
        transform: scaleY(0.1);
        transform-origin: 60px 50px;
    }
}

.svg-sparkle-1 {
    animation: sparklePulse 2s ease-in-out infinite alternate;
}

.svg-sparkle-2 {
    animation: sparklePulse 2.5s ease-in-out 0.5s infinite alternate;
}

@keyframes sparklePulse {
    0% {
        opacity: 0.2;
        transform: scale(0.8);
        transform-origin: center;
    }

    100% {
        opacity: 1;
        transform: scale(1.25);
        transform-origin: center;
    }
}

/* Responsive adjustment for small screens (< 480px) */
@media (max-width: 480px) {
    .ai-widget-card {
        padding: 13px 13px;
        border-radius: 16px;
    }

    .ai-widget-inner {
        gap: 10px;
    }

    .ai-speech-bubble {
        padding: 10px 11px;
        border-radius: 12px;
    }

    .ai-speech-bubble::after {
        right: -8px;
        border-width: 6px 0 6px 8px;
    }

    .ai-speech-title {
        font-size: 0.88rem;
    }

    .ai-speech-text {
        font-size: 0.71rem;
        margin-bottom: 5px;
    }

    .ai-vector-container {
        width: 80px;
        height: 80px;
    }

    .ai-avatar-wrapper {
        width: 76px;
        height: 76px;
    }
}

/* ============================================================
   CONTOH PERTANYAAN UI/UX STYLES
   ============================================================ */
.sample-chip {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #1e293b;
    font-size: 0.78rem;
    font-weight: 500;
    padding: 5px 12px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    text-align: left;
    white-space: normal;
    word-break: break-word;
    display: inline-block;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.sample-chip:hover,
.sample-chip:active {
    background: #002060;
    color: #ffffff !important;
    border-color: #002060;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(0, 32, 96, 0.25);
}

.sample-q-card {
    transition: all 0.2s ease;
    border-color: #e2e8f0 !important;
    background: #ffffff;
}

.sample-q-card:hover {
    border-color: #93c5fd !important;
    box-shadow: 0 4px 12px rgba(0, 32, 96, 0.06) !important;
}

/* Blinking Green Dot Indicator for Online Status */
@keyframes blinkGreenDot {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 6px #22c55e, 0 0 10px #22c55e;
    }

    50% {
        opacity: 0.35;
        transform: scale(0.85);
        box-shadow: 0 0 2px #22c55e;
    }
}

.blinking-green-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background-color: #22c55e;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
    animation: blinkGreenDot 1.4s infinite ease-in-out;
}

/* Blinking Lightbulb Indicator for 'Lihat Contoh' Feature */
@keyframes blinkLightbulb {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
        filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.95)) drop-shadow(0 0 10px rgba(251, 191, 36, 0.7));
        color: #f59e0b !important;
    }

    50% {
        opacity: 0.35;
        transform: scale(0.88);
        filter: drop-shadow(0 0 1px rgba(245, 158, 11, 0.2));
        color: #fbbf24 !important;
    }
}

.blinking-lightbulb {
    display: inline-block;
    animation: blinkLightbulb 1.3s infinite ease-in-out;
}

/* Floating Draggable Sci-Fi AI Robot Styles */
.floating-robot-wrapper {
    position: fixed;
    bottom: 110px;
    right: 24px;
    z-index: 9990;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
}

.floating-robot-btn {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    cursor: grab;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border: 2px solid #00f2fe;
    box-shadow: 0 8px 24px rgba(0, 242, 254, 0.4), 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.floating-robot-btn:active {
    cursor: grabbing;
    transform: scale(0.95);
}

.floating-robot-btn .ai-avatar-wrapper {
    width: 58px;
    height: 58px;
}

.floating-robot-btn .ai-avatar-glow {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.6) 0%, rgba(37, 99, 235, 0.15) 70%);
    filter: blur(6px);
    animation: auraGlow 2.5s ease-in-out infinite alternate;
}

/* Speech Bubble Popover */
.floating-robot-bubble {
    position: absolute;
    width: 235px;
    max-width: calc(100vw - 24px);
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
    border: 1.5px solid #38bdf8;
    border-radius: 14px;
    padding: 10px 12px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.22), 0 2px 8px rgba(56, 189, 248, 0.2);
    font-family: 'Poppins', sans-serif;
    animation: popInBubble 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 9991;
    pointer-events: auto;
}

.floating-robot-bubble::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    background: #f0f9ff;
    border-style: solid;
    border-color: #38bdf8;
    transform: rotate(45deg);
}

.floating-robot-bubble.position-above.align-right::after {
    bottom: -6px;
    right: 24px;
    left: auto;
    top: auto;
    border-width: 0 1.5px 1.5px 0;
}

.floating-robot-bubble.position-above.align-left::after {
    bottom: -6px;
    left: 24px;
    right: auto;
    top: auto;
    border-width: 0 1.5px 1.5px 0;
}

.floating-robot-bubble.position-below.align-right::after {
    top: -6px;
    right: 24px;
    left: auto;
    bottom: auto;
    border-width: 1.5px 0 0 1.5px;
}

.floating-robot-bubble.position-below.align-left::after {
    top: -6px;
    left: 24px;
    right: auto;
    bottom: auto;
    border-width: 1.5px 0 0 1.5px;
}

@keyframes popInBubble {
    from {
        opacity: 0;
        transform: scale(0.88) translateY(8px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.floating-bubble-header {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 2px;
}

.floating-bubble-badge-title {
    font-size: 0.62rem;
    font-weight: 700;
    color: #0369a1;
}

.floating-bubble-close {
    margin-left: auto;
    background: none;
    border: none;
    font-size: 1rem;
    color: #64748b;
    cursor: pointer;
    line-height: 1;
    padding: 0 2px;
}

.floating-bubble-title {
    font-size: 0.82rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 3px;
    letter-spacing: -0.2px;
}

.floating-bubble-text {
    font-size: 0.72rem;
    color: #334155;
    line-height: 1.38;
    margin-bottom: 8px;
}

.floating-bubble-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 100%;
    padding: 6px 10px;
    background: linear-gradient(135deg, #0284c7 0%, #2563eb 100%);
    color: #ffffff;
    font-size: 0.74rem;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.28);
    transition: all 0.2s ease;
}

.floating-bubble-action:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.4);
}

/* ============================================================
   JOBDESK HRD PAGE STYLING
   ============================================================ */
.jobdesk-section-card {
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    margin-bottom: 24px;
    overflow: hidden;
}

.jobdesk-section-header {
    background: linear-gradient(135deg, #002060 0%, #1e3a8a 100%);
    color: #ffffff;
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.jobdesk-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    color: #ffffff !important;
}

.jobdesk-version-badge {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.76rem;
    font-weight: 500;
}

.jobdesk-table-wrapper {
    overflow-x: auto;
    width: 100%;
}

.jobdesk-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
    color: #1e293b;
}

.jobdesk-table th {
    background: #f1f5f9;
    color: #0f172a;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 0.5px;
    padding: 10px 14px;
    border-bottom: 2px solid #cbd5e1;
    border-right: 1px solid #e2e8f0;
}

.jobdesk-table th:last-child {
    border-right: none;
}

.jobdesk-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #e2e8f0;
    border-right: 1px solid #f1f5f9;
    vertical-align: top;
}

.jobdesk-table td:last-child {
    border-right: none;
}

.jobdesk-table tr:nth-child(even) td {
    background-color: #f8fafc;
}

.jobdesk-table tr:hover td {
    background-color: #eff6ff;
}

/* Mobile responsive adjustments for Jobdesk */
.jobdesk-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

@media (max-width: 576px) {
    .jobdesk-table {
        font-size: 0.82rem;
    }

    .jobdesk-table th,
    .jobdesk-table td {
        padding: 8px 10px;
    }
}

/* ============================================================
   STRICT RULE: HIDE ALL SHARE & DOWNLOAD EXCEPT ON BIODATA
   ============================================================ */
.btn-share-topbar-icon,
#sb-share,
.natura-toolbar .toolbar-divider,
.natura-toolbar .toolbar-btn-img,
.natura-toolbar .toolbar-btn-pdf,
#kontrakan-share-btn-group,
#page-pegawai button[onclick*="openExportPegawaiModal"],
#modal-export-pegawai,
#modal-share-wa-chooser {
    display: none !important;
}

/* Maintain visibility for Cetak Profil & Share Text on #page-biodata */
#page-biodata button[onclick*="window.print"],
#page-biodata button[onclick*="shareBiodataToWA"] {
    display: flex !important;
}