:root {
    --mpc-navy: #1D236C;
    --mpc-navy-dark: #12174A;
    --mpc-navy-soft: #EEF2FF;
    --mpc-teal: #026E81;
    --mpc-teal-dark: #015463;
    --mpc-teal-soft: #ECFEFF;
    --mpc-gold: #C9A756;
    --mpc-gold-soft: #FEF9C3;
    --bg-body: #F1F5F9;
    --bg-surface: #FFFFFF;
    --border-color: #E2E8F0;
    --text-main: #0F172A;
    --text-muted: #64748B;
    --sidebar-width: 256px;
    --sidebar-collapsed-width: 74px;
    --topbar-height: 64px;
    --mobile-nav-height: 64px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* =========================================================
   SIDEBAR DESKTOP & COLLAPSIBLE ERP LAYOUT
   ========================================================= */
.erp-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.erp-sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--mpc-navy-dark) 0%, var(--mpc-navy) 65%, #163B5C 100%);
    color: #F8FAFC;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 1040;
    display: flex;
    flex-direction: column;
    transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s ease;
    box-shadow: 4px 0 16px rgba(15, 23, 42, 0.14);
}

.sidebar-brand {
    height: var(--topbar-height);
    padding: 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    text-decoration: none;
    color: #FFFFFF;
    overflow: hidden;
    white-space: nowrap;
}

.sidebar-brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 9px;
    object-fit: contain;
    background: #FFFFFF;
    padding: 3px;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.sidebar-brand-text {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-brand-title {
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.2px;
    color: #FFFFFF;
    line-height: 1.2;
    text-overflow: ellipsis;
    overflow: hidden;
}

.sidebar-brand-sub {
    font-size: 0.68rem;
    color: var(--mpc-gold);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.sidebar-menu {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.75rem 0.65rem;
}

.sidebar-menu::-webkit-scrollbar {
    width: 4px;
}

.sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.sidebar-section-label {
    font-size: 0.66rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.48);
    font-weight: 700;
    padding: 0.6rem 0.75rem 0.3rem;
    white-space: nowrap;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.8rem;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: 9px;
    margin-bottom: 0.2rem;
    font-weight: 500;
    font-size: 0.84rem;
    transition: all 0.18s ease;
    white-space: nowrap;
    position: relative;
}

.sidebar-link i {
    font-size: 1.12rem;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.75);
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
}

.sidebar-link:hover i {
    color: var(--mpc-gold);
}

.sidebar-link.active {
    background: linear-gradient(90deg, var(--mpc-teal) 0%, #0389A0 100%);
    color: #FFFFFF;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(2, 110, 129, 0.35);
}

.sidebar-link.active i {
    color: #FFFFFF;
}

.sidebar-link-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-info-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.45);
    background: transparent;
    border: none;
    cursor: pointer;
    margin-left: auto;
    flex-shrink: 0;
    transition: all 0.18s ease;
    z-index: 2;
    padding: 0;
}

.sidebar-info-btn i {
    font-size: 0.85rem !important;
    width: auto !important;
    color: inherit !important;
}

.sidebar-info-btn:hover {
    color: #FBBF24 !important;
    background: rgba(255, 255, 255, 0.16);
    transform: scale(1.15);
}

.sidebar-link.active .sidebar-info-btn {
    color: rgba(255, 255, 255, 0.7);
}

.sidebar-link.active .sidebar-info-btn:hover {
    color: #FFFFFF !important;
    background: rgba(0, 0, 0, 0.22);
}

.sidebar-badge {
    margin-left: auto;
    margin-right: 0.35rem;
    background: var(--mpc-gold);
    color: #0F172A;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 0.12rem 0.45rem;
    border-radius: 99px;
}

.sidebar-footer {
    padding: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.15);
}

.sidebar-user-box {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: #FFFFFF;
    text-decoration: none;
    overflow: hidden;
}

.sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: var(--mpc-teal);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.sidebar-user-info {
    overflow: hidden;
    white-space: nowrap;
}

.sidebar-user-name {
    font-weight: 600;
    font-size: 0.8rem;
    color: #FFFFFF;
    text-overflow: ellipsis;
    overflow: hidden;
}

.sidebar-user-role {
    font-size: 0.68rem;
    color: var(--mpc-gold);
    text-transform: uppercase;
    font-weight: 600;
}

/* Collapsed State (Desktop) */
@media (min-width: 992px) {
    body.sidebar-collapsed .erp-sidebar {
        width: var(--sidebar-collapsed-width);
    }

    body.sidebar-collapsed .sidebar-brand-text,
    body.sidebar-collapsed .sidebar-section-label,
    body.sidebar-collapsed .sidebar-link span,
    body.sidebar-collapsed .sidebar-badge,
    body.sidebar-collapsed .sidebar-user-info {
        display: none;
    }

    body.sidebar-collapsed .sidebar-link {
        justify-content: center;
        padding: 0.65rem 0;
    }

    body.sidebar-collapsed .sidebar-brand {
        justify-content: center;
        padding: 0;
    }

    body.sidebar-collapsed .sidebar-user-box {
        justify-content: center;
    }

    body.sidebar-collapsed .erp-main {
        margin-left: var(--sidebar-collapsed-width);
    }
}

/* =========================================================
   MAIN CONTENT & SINGLE PAGE HEADER (BASE.HTML)
   ========================================================= */
.erp-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.erp-topbar {
    height: var(--topbar-height);
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 1020;
    box-shadow: var(--shadow-sm);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.btn-sidebar-toggle {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: #F8FAFC;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.btn-sidebar-toggle:hover {
    background: var(--mpc-navy-soft);
    color: var(--mpc-navy);
    border-color: var(--mpc-navy);
}

.topbar-title-group {
    min-width: 0;
}

.topbar-page-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--mpc-navy);
    margin: 0;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-page-subtitle {
    font-size: 0.74rem;
    color: var(--text-muted);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-shrink: 0;
}

.topbar-icon-btn {
    height: 36px;
    padding: 0 0.7rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: #FFFFFF;
    color: #334155;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
    position: relative;
}

.topbar-icon-btn:hover {
    background: #F8FAFC;
    border-color: #CBD5E1;
    color: var(--mpc-navy);
}

.topbar-notif-dot {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #EF4444;
    color: #FFFFFF;
    font-size: 0.65rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 99px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid #FFFFFF;
}

.erp-content {
    flex: 1;
    padding: 1rem 1.25rem 1.75rem;
}

/* =========================================================
   COMPACT FILTER BAR & WIDE SPACIOUS DATA TABLES
   ========================================================= */
.compact-kpi-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.85rem;
}

.kpi-mini-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
}

.kpi-mini-label {
    font-size: 0.73rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.15rem;
}

.kpi-mini-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.2;
}

.kpi-mini-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* Compact Toolbar (Agar tidak mempersempit ruang tabel) */
.filter-toolbar-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    border-bottom: none;
    padding: 0.65rem 0.9rem;
}

.filter-toolbar-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    justify-content: space-between;
}

.filter-group-left {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem;
    flex: 1;
}

.filter-group-right {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-shrink: 0;
}

.search-input-wrap {
    position: relative;
    min-width: 210px;
    flex: 1;
    max-width: 300px;
}

.search-input-wrap i {
    position: absolute;
    left: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94A3B8;
    font-size: 0.85rem;
}

.search-input-wrap .form-control {
    padding-left: 2rem;
}

.filter-toolbar-form .form-control,
.filter-toolbar-form .form-select {
    height: 35px;
    font-size: 0.81rem;
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
    border-color: #CBD5E1;
    border-radius: 7px;
}

.filter-toolbar-form .btn {
    height: 35px;
    font-size: 0.81rem;
    padding: 0 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 7px;
    font-weight: 600;
}

/* Wide Table Card */
.table-workspace-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.table-workspace-card.standalone {
    border-radius: var(--radius-md);
}

.erp-table-responsive {
    width: 100%;
    overflow-x: auto;
    min-height: 360px;
}

.erp-table {
    width: 100%;
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.erp-table thead th {
    background: #F8FAFC;
    color: #475569;
    font-size: 0.73rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.7rem 0.85rem;
    border-bottom: 2px solid #E2E8F0;
    white-space: nowrap;
    vertical-align: middle;
}

.erp-table tbody td {
    padding: 0.68rem 0.85rem;
    border-bottom: 1px solid #F1F5F9;
    vertical-align: middle;
    font-size: 0.83rem;
    color: #1E293B;
}

.erp-table tbody tr:hover {
    background-color: #F8FAFC;
}

/* =========================================================
   BUTTONS, BADGES & STATUS INDICATORS
   ========================================================= */
.btn-mpc-primary {
    background-color: var(--mpc-navy);
    border-color: var(--mpc-navy);
    color: #FFFFFF;
}

.btn-mpc-primary:hover,
.btn-mpc-primary:focus {
    background-color: var(--mpc-navy-dark);
    border-color: var(--mpc-navy-dark);
    color: #FFFFFF;
}

.btn-mpc-teal {
    background-color: var(--mpc-teal);
    border-color: var(--mpc-teal);
    color: #FFFFFF;
}

.btn-mpc-teal:hover {
    background-color: var(--mpc-teal-dark);
    border-color: var(--mpc-teal-dark);
    color: #FFFFFF;
}

.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.6rem;
    border-radius: 99px;
    font-size: 0.72rem;
    font-weight: 600;
    white-space: nowrap;
}

.status-belum {
    background: #F1F5F9;
    color: #475569;
    border: 1px solid #CBD5E1;
}

.status-proses {
    background: #E0F2FE;
    color: #0369A1;
    border: 1px solid #BAE6FD;
}

.status-dokumen {
    background: #FEF3C7;
    color: #B45309;
    border: 1px solid #FDE68A;
}

.status-review {
    background: #EDE9FE;
    color: #6D28D9;
    border: 1px solid #DDD6FE;
}

.status-selesai,
.status-lunas,
.status-aktif,
.status-lengkap {
    background: #DCFCE7;
    color: #15803D;
    border: 1px solid #BBF7D0;
}

.status-overdue,
.status-belum-lengkap,
.status-belum-bayar {
    background: #FEE2E2;
    color: #B91C1C;
    border: 1px solid #FECACA;
}

.status-sebagian {
    background: #FEF3C7;
    color: #92400E;
    border: 1px solid #FDE68A;
}

.action-btn-group {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.btn-action-icon {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: 1px solid #E2E8F0;
    background: #FFFFFF;
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.15s ease;
    cursor: pointer;
}

.btn-action-icon:hover {
    background: var(--mpc-navy-soft);
    color: var(--mpc-navy);
    border-color: #C7D2FE;
}

.btn-action-icon.danger:hover {
    background: #FEE2E2;
    color: #DC2626;
    border-color: #FECACA;
}

.btn-action-icon.success:hover {
    background: #DCFCE7;
    color: #16A34A;
    border-color: #BBF7D0;
}

/* Pagination Bar */
.erp-pagination-bar {
    padding: 0.65rem 1rem;
    background: #F8FAFC;
    border-top: 1px solid var(--border-color);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.8rem;
}

/* =========================================================
   EMPTY STATE & MODALS
   ========================================================= */
.erp-empty-state {
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--text-muted);
}

.erp-empty-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #F1F5F9;
    color: var(--mpc-teal);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 0.75rem;
}

.modal-header.erp-modal-header {
    background: linear-gradient(90deg, var(--mpc-navy) 0%, var(--mpc-teal) 100%);
    color: #FFFFFF;
    padding: 0.85rem 1.25rem;
}

.modal-header.erp-modal-header .btn-close {
    filter: brightness(0) invert(1);
}

.form-label {
    font-weight: 600;
    font-size: 0.79rem;
    color: #334155;
    margin-bottom: 0.3rem;
}

/* =========================================================
   MOBILE NATIVE UI/UX (BOTTOM BAR + APP DRAWER)
   ========================================================= */
.mobile-bottom-nav {
    display: none;
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(2px);
    z-index: 1035;
}

@media (max-width: 991.98px) {
    .erp-sidebar {
        transform: translateX(-100%);
        width: 270px;
    }

    body.mobile-drawer-open .erp-sidebar {
        transform: translateX(0);
    }

    body.mobile-drawer-open .sidebar-backdrop {
        display: block;
    }

    .erp-main {
        margin-left: 0 !important;
        padding-bottom: calc(var(--mobile-nav-height) + 12px);
    }

    .erp-topbar {
        padding: 0 0.85rem;
        height: 58px;
    }

    .topbar-page-title {
        font-size: 0.95rem;
    }

    .topbar-page-subtitle {
        display: none;
    }

    .erp-content {
        padding: 0.75rem 0.75rem 1.25rem;
    }

    .compact-kpi-strip {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.55rem;
    }

    .kpi-mini-card {
        padding: 0.65rem 0.75rem;
    }

    .kpi-mini-value {
        font-size: 1.02rem;
    }

    .search-input-wrap {
        max-width: 100%;
        width: 100%;
    }

    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: var(--mobile-nav-height);
        background: #FFFFFF;
        border-top: 1px solid #E2E8F0;
        box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.08);
        z-index: 1030;
        justify-content: space-around;
        align-items: center;
        padding: 0 0.25rem;
    }

    .mobile-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        color: #64748B;
        font-size: 0.67rem;
        font-weight: 600;
        gap: 0.15rem;
        padding: 0.35rem 0;
        border-radius: 8px;
        transition: all 0.15s ease;
    }

    .mobile-nav-item i {
        font-size: 1.2rem;
        line-height: 1;
    }

    .mobile-nav-item.active {
        color: var(--mpc-navy);
    }

    .mobile-nav-item.active i {
        color: var(--mpc-teal);
    }
}

/* =========================================================
   LOGIN PAGE — SOFT & CLEAN DESKTOP + NATIVE MOBILE APP UI
   ========================================================= */
.login-erp-body {
    min-height: 100vh;
    min-height: 100dvh;
    background:
        radial-gradient(circle at 18% 20%, rgba(99, 102, 241, 0.08) 0%, transparent 42%),
        radial-gradient(circle at 82% 80%, rgba(2, 110, 129, 0.08) 0%, transparent 45%),
        linear-gradient(145deg, #EEF2FF 0%, #F8FAFC 52%, #F0FDFA 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

.login-soft-card {
    width: 100%;
    max-width: 410px;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 26px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.06), 0 4px 14px rgba(15, 23, 42, 0.03);
    overflow: hidden;
}

.login-hero-header {
    padding: 2rem 2rem 1.1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-logo-squircle {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    box-shadow: 0 8px 22px rgba(29, 35, 108, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    margin-bottom: 0.85rem;
}

.login-logo-squircle img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
}

.login-app-title {
    font-size: 1.12rem;
    font-weight: 700;
    color: #0F172A;
    margin: 0 0 0.25rem;
    letter-spacing: -0.015em;
}

.login-app-caption {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--mpc-teal);
    background: #F0FDFA;
    border: 1px solid #CCFBF1;
    padding: 0.16rem 0.65rem;
    border-radius: 999px;
}

.login-sheet-body {
    padding: 0.5rem 2rem 2rem;
}

.login-sheet-handle {
    display: none;
    width: 40px;
    height: 4px;
    border-radius: 999px;
    background: #CBD5E1;
    margin: 0 auto 1.15rem;
}

.login-greeting {
    text-align: center;
    margin-bottom: 1.35rem;
}

.login-greeting-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1E293B;
    margin: 0 0 0.15rem;
}

.login-greeting-sub {
    font-size: 0.78rem;
    color: #64748B;
    margin: 0;
}

.login-soft-alert {
    font-size: 0.78rem;
    border-radius: 13px;
    padding: 0.6rem 0.85rem;
    margin-bottom: 1rem;
    border: none;
}

.login-field-group {
    margin-bottom: 0.95rem;
}

.login-field-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #475569;
    margin-bottom: 0.35rem;
}

.login-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.login-input-icon {
    position: absolute;
    left: 14px;
    color: #94A3B8;
    font-size: 1rem;
    pointer-events: none;
    transition: color 0.18s ease;
}

.login-soft-input {
    width: 100%;
    height: 46px;
    padding: 0 0.95rem 0 2.55rem;
    font-size: 0.86rem;
    color: #0F172A;
    background: #F8FAFC;
    border: 1.5px solid #E2E8F0;
    border-radius: 14px;
    outline: none;
    transition: all 0.18s ease;
}

.login-soft-input::placeholder {
    color: #94A3B8;
}

.login-soft-input:focus {
    background: #FFFFFF;
    border-color: #6366F1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.login-input-wrap:focus-within .login-input-icon {
    color: #4F46E5;
}

.login-pwd-toggle {
    position: absolute;
    right: 8px;
    width: 34px;
    height: 34px;
    border: none;
    background: transparent;
    color: #64748B;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s ease;
}

.login-pwd-toggle:hover {
    background: #F1F5F9;
    color: #1E293B;
}

.login-remember-label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.78rem;
    color: #64748B;
    cursor: pointer;
    user-select: none;
}

.btn-login-submit {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--mpc-navy) 0%, var(--mpc-teal) 100%);
    color: #FFFFFF;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    box-shadow: 0 8px 20px rgba(29, 35, 108, 0.18);
    cursor: pointer;
    transition: all 0.18s ease;
}

.btn-login-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(29, 35, 108, 0.24);
}

.btn-login-submit:active {
    transform: scale(0.985);
}

.btn-login-pwa {
    width: 100%;
    height: 42px;
    margin-top: 0.55rem;
    border: 1px solid #E2E8F0;
    border-radius: 13px;
    background: #F8FAFC;
    color: #334155;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-login-pwa:hover {
    background: #F1F5F9;
    color: var(--mpc-navy);
}

.login-quick-strip {
    margin-top: 1.4rem;
}

.login-quick-divider {
    position: relative;
    text-align: center;
    margin-bottom: 0.75rem;
}

.login-quick-divider::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 50%;
    height: 1px;
    background: #E2E8F0;
}

.login-quick-divider span {
    position: relative;
    background: #FFFFFF;
    padding: 0 0.65rem;
    font-size: 0.7rem;
    font-weight: 600;
    color: #94A3B8;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.login-quick-chips {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.45rem;
}

.login-chip-btn {
    border: 1px solid #E2E8F0;
    background: #F8FAFC;
    color: #475569;
    border-radius: 11px;
    padding: 0.45rem 0.35rem;
    font-size: 0.72rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.login-chip-btn:hover,
.login-chip-btn.active {
    background: #EEF2FF;
    border-color: #A5B4FC;
    color: #3730A3;
}

/* NATIVE MOBILE APP EXPERIENCE (< 768px) */
@media (max-width: 767.98px) {
    .login-erp-body {
        padding: 0;
        background: linear-gradient(150deg, #1D236C 0%, #17377A 55%, #026E81 100%);
        align-items: stretch;
        justify-content: flex-start;
    }

    .login-soft-card {
        max-width: 100%;
        min-height: 100vh;
        min-height: 100dvh;
        background: transparent;
        backdrop-filter: none;
        border: none;
        border-radius: 0;
        box-shadow: none;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }

    .login-hero-header {
        padding: calc(2.4rem + env(safe-area-inset-top, 0px)) 1.5rem 1.85rem;
        color: #FFFFFF;
    }

    .login-logo-squircle {
        width: 72px;
        height: 72px;
        border-radius: 22px;
        border: 2px solid rgba(255, 255, 255, 0.28);
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
        margin-bottom: 0.9rem;
    }

    .login-app-title {
        color: #FFFFFF;
        font-size: 1.22rem;
    }

    .login-app-caption {
        background: rgba(255, 255, 255, 0.14);
        border-color: rgba(255, 255, 255, 0.22);
        color: #E0F2FE;
    }

    .login-sheet-body {
        flex: 1;
        background: #FFFFFF;
        border-radius: 30px 30px 0 0;
        padding: 0.85rem 1.4rem calc(1.75rem + env(safe-area-inset-bottom, 0px));
        box-shadow: 0 -10px 35px rgba(15, 23, 42, 0.18);
        display: flex;
        flex-direction: column;
    }

    .login-sheet-handle {
        display: block;
    }

    .login-greeting {
        text-align: left;
        margin-bottom: 1.25rem;
    }

    .login-greeting-title {
        font-size: 1.2rem;
    }

    .login-soft-input {
        height: 52px;
        font-size: 16px; /* Cegah auto-zoom pada iOS/Android */
        border-radius: 15px;
    }

    .btn-login-submit {
        height: 52px;
        border-radius: 15px;
        font-size: 0.96rem;
        margin-top: 0.25rem;
    }

    .login-quick-strip {
        margin-top: auto;
        padding-top: 1.5rem;
    }

    .login-chip-btn {
        padding: 0.58rem 0.4rem;
        border-radius: 12px;
        font-size: 0.74rem;
    }
}

/* =========================================================
   PANDUAN & INFORMASI MENU (ICON 'I' & MODAL PANDUAN)
   ========================================================= */
.btn-menu-info {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.22rem 0.65rem;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--mpc-teal-dark);
    background: var(--mpc-teal-soft);
    border: 1px solid rgba(2, 110, 129, 0.25);
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1.2;
    flex-shrink: 0;
}

.btn-menu-info:hover {
    background: var(--mpc-teal);
    color: #FFFFFF;
    border-color: var(--mpc-teal);
    box-shadow: 0 2px 8px rgba(2, 110, 129, 0.3);
    transform: translateY(-1px);
}

.btn-menu-info i {
    font-size: 0.86rem;
    color: var(--mpc-teal);
    transition: color 0.2s ease;
}

.btn-menu-info:hover i {
    color: #FFFFFF;
}

@media (max-width: 575.98px) {
    .btn-menu-info-label {
        display: none;
    }
    .btn-menu-info {
        padding: 0.22rem 0.45rem;
        border-radius: 50%;
        width: 26px;
        height: 26px;
        justify-content: center;
    }
}

/* Modal Panduan Menu */
.menu-info-modal-content {
    border-radius: 16px;
    overflow: hidden;
    background: #FFFFFF;
}

.menu-info-header {
    background: linear-gradient(135deg, var(--mpc-navy-dark) 0%, var(--mpc-navy) 50%, var(--mpc-teal) 100%);
    padding: 1.15rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.menu-info-icon-badge {
    width: 46px;
    height: 46px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.menu-info-cat-badge {
    background: rgba(201, 167, 86, 0.25);
    color: #FEF08A;
    border: 1px solid rgba(201, 167, 86, 0.5);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    letter-spacing: 0.3px;
}

.menu-info-toolbar {
    background: #F8FAFC;
    border-bottom: 1px solid var(--border-color);
    padding: 0.65rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.menu-info-select-wrapper {
    min-width: 240px;
}

.menu-info-select {
    font-weight: 600;
    font-size: 0.8rem;
    border-color: #CBD5E1;
    color: var(--mpc-navy);
    border-radius: 8px;
}

.menu-info-select:focus {
    border-color: var(--mpc-teal);
    box-shadow: 0 0 0 3px rgba(2, 110, 129, 0.15);
}

.menu-info-body {
    background: #F8FAFC;
    max-height: calc(85vh - 200px);
    overflow-y: auto;
}

.menu-info-card {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.menu-info-card:last-child {
    margin-bottom: 0;
}

.menu-info-section-header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.85rem;
}

.menu-info-section-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.menu-info-section-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--mpc-navy);
    margin: 0;
}

.menu-feature-list {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.menu-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    font-size: 0.83rem;
    color: var(--text-main);
    line-height: 1.45;
}

.menu-feature-item i {
    color: var(--mpc-teal);
    font-size: 0.92rem;
    margin-top: 1px;
    flex-shrink: 0;
}

/* Timeline Langkah Penggunaan */
.workflow-steps-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: relative;
}

.workflow-step-card {
    display: flex;
    gap: 0.85rem;
    background: #F1F5F9;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    padding: 0.85rem 1rem;
    transition: all 0.15s ease;
}

.workflow-step-card:hover {
    background: #FFFFFF;
    border-color: #CBD5E1;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.workflow-step-num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--mpc-navy);
    color: #FFFFFF;
    font-weight: 700;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.workflow-step-content {
    flex: 1;
}

.workflow-step-title {
    font-weight: 700;
    font-size: 0.84rem;
    color: var(--mpc-navy);
    margin-bottom: 0.2rem;
}

.workflow-step-desc {
    font-size: 0.8rem;
    color: #475569;
    line-height: 1.45;
    margin: 0;
}

/* Callout Tips Pajak */
.menu-tax-tip-box {
    background: #FEF9C3;
    border: 1px solid #FDE047;
    border-left: 4px solid var(--mpc-gold);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.menu-tax-tip-box i {
    font-size: 1.25rem;
    color: #B45309;
    flex-shrink: 0;
    margin-top: 2px;
}

.menu-tax-tip-title {
    font-weight: 700;
    font-size: 0.82rem;
    color: #78350F;
    margin-bottom: 0.2rem;
}

.menu-tax-tip-desc {
    font-size: 0.78rem;
    color: #854D0E;
    line-height: 1.45;
    margin: 0;
}

/* Role Badges */
.menu-roles-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.4rem;
}

.menu-role-pill {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    background: #EEF2FF;
    color: var(--mpc-navy);
    border: 1px solid #C7D2FE;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.menu-info-footer {
    background: #FFFFFF;
    border-top: 1px solid var(--border-color);
    padding: 0.75rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.menu-info-footer-note {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* =========================================================
   NOTIFIKASI & PANDUAN LANGKAH AWAL SESUAI ROLE (ONBOARDING)
   ========================================================= */
.onboarding-modal-content {
    border-radius: 16px;
    overflow: hidden;
    background: #FFFFFF;
}

.onboarding-modal-header {
    padding: 1.2rem 1.5rem;
}

.onboarding-modal-header.role-pimpinan-bg {
    background: linear-gradient(135deg, #12174A 0%, #1D236C 55%, #854D0E 100%);
}

.onboarding-modal-header.role-staff-bg {
    background: linear-gradient(135deg, #12174A 0%, #1D236C 55%, #026E81 100%);
}

.onboarding-role-icon-box {
    width: 50px;
    height: 50px;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.55rem;
    flex-shrink: 0;
}

.onboarding-role-badge {
    background: rgba(250, 204, 21, 0.22);
    color: #FEF08A;
    border: 1px solid rgba(250, 204, 21, 0.5);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.4px;
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
}

.onboarding-subbar {
    background: #F8FAFC;
    border-bottom: 1px solid var(--border-color);
}

.onboarding-modal-body {
    background: #F8FAFC;
    max-height: calc(85vh - 205px);
    overflow-y: auto;
}

.onboarding-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.65rem;
}

@media (max-width: 575.98px) {
    .onboarding-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.onboarding-metric-item {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.6rem 0.75rem;
    text-align: center;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.onboarding-metric-val {
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1.2;
}

.onboarding-metric-lbl {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-top: 2px;
}

.onboarding-steps-list {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.onboarding-step-item {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.9rem 1.05rem;
    transition: all 0.18s ease;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}

.onboarding-step-item:hover {
    border-color: #94A3B8;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.07);
    transform: translateY(-1px);
}

.onboarding-step-badge {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-weight: 800;
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.onboarding-step-main {
    flex: 1;
    min-width: 0;
}

/* Dashboard Onboarding Banner */
.onboarding-dashboard-banner {
    background: #FFFFFF;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.9rem 1.15rem;
    box-shadow: var(--shadow-sm);
    position: relative;
}

.onboarding-dashboard-banner.banner-role-pimpinan {
    border-left: 4px solid var(--mpc-gold);
    background: linear-gradient(90deg, #FFFBEB 0%, #FFFFFF 35%);
}

.onboarding-dashboard-banner.banner-role-staff {
    border-left: 4px solid var(--mpc-teal);
    background: linear-gradient(90deg, #ECFEFF 0%, #FFFFFF 35%);
}

.onboarding-banner-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--mpc-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.onboarding-banner-steps {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.onboarding-pill-step {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #F8FAFC;
    border: 1px solid #CBD5E1;
    color: var(--text-main);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    text-decoration: none;
    transition: all 0.16s ease;
}

.onboarding-pill-step:hover {
    background: var(--mpc-navy);
    color: #FFFFFF;
    border-color: var(--mpc-navy);
}

.onboarding-pill-step.step-highlight {
    background: #FEF3C7;
    border-color: #F59E0B;
    color: #92400E;
}

.onboarding-pill-step.step-highlight:hover {
    background: #D97706;
    color: #FFFFFF;
}

.onboarding-pill-step .step-num {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--mpc-navy);
    color: #FFFFFF;
    font-size: 0.66rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.onboarding-pill-step:hover .step-num {
    background: var(--mpc-gold);
    color: #0F172A;
}

/* =========================================================
   WIDGET LIVE CHAT: PEMANDU AI OSHACOMP (CLEAN & SOFT UI)
   ========================================================= */
.osha-ai-widget {
    position: fixed;
    bottom: 22px;
    right: 22px;
    z-index: 1090;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.osha-ai-fab {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.52rem 1.05rem 0.52rem 0.58rem;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    border: 1px solid #C7D2FE;
    border-radius: 999px;
    box-shadow: 0 8px 26px rgba(79, 70, 229, 0.14), 0 2px 8px rgba(15, 23, 42, 0.05);
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    text-align: left;
}

.osha-ai-fab:hover {
    transform: translateY(-3px);
    border-color: #818CF8;
    box-shadow: 0 12px 32px rgba(79, 70, 229, 0.22), 0 4px 12px rgba(15, 23, 42, 0.06);
    background: #FFFFFF;
}

.osha-ai-fab.is-hidden {
    opacity: 0;
    pointer-events: none;
    transform: scale(0.85) translateY(12px);
}

.osha-ai-fab-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366F1 0%, #38BDF8 100%);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    position: relative;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.28);
}

.osha-ai-online-dot {
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #10B981;
    border: 2px solid #FFFFFF;
}

.osha-ai-fab-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.osha-ai-fab-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #1E293B;
    letter-spacing: -0.01em;
}

.osha-ai-fab-sub {
    font-size: 0.69rem;
    font-weight: 600;
    color: #6366F1;
}

.osha-ai-panel {
    position: fixed;
    bottom: 22px;
    right: 22px;
    width: 390px;
    max-width: calc(100vw - 28px);
    height: 560px;
    max-height: calc(100vh - 96px);
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 22px;
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.12), 0 4px 16px rgba(99, 102, 241, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px) scale(0.96);
    transform-origin: bottom right;
    transition: all 0.26s cubic-bezier(0.16, 1, 0.3, 1);
}

.osha-ai-panel.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.osha-ai-panel.is-expanded {
    width: 520px;
    height: 660px;
}

/* Header Clean & Soft */
.osha-ai-header {
    padding: 0.9rem 1rem;
    background: linear-gradient(135deg, #EEF2FF 0%, #F0F9FF 55%, #F8FAFC 100%);
    border-bottom: 1px solid #E2E8F0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    flex-shrink: 0;
}

.osha-ai-avatar {
    width: 40px;
    height: 40px;
    border-radius: 13px;
    background: linear-gradient(135deg, #6366F1 0%, #38BDF8 100%);
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    position: relative;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.22);
}

.osha-ai-avatar-dot {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #10B981;
    border: 2px solid #FFFFFF;
}

.osha-ai-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: #1E293B;
    line-height: 1.25;
}

.osha-ai-subtitle-pill {
    display: inline-flex;
    align-items: center;
    font-size: 0.67rem;
    font-weight: 600;
    color: #4F46E5;
    background: rgba(99, 102, 241, 0.1);
    padding: 0.1rem 0.5rem;
    border-radius: 99px;
}

.osha-ai-role-tag {
    font-size: 0.64rem;
    font-weight: 600;
    color: #64748B;
    background: #F1F5F9;
    padding: 0.1rem 0.45rem;
    border-radius: 99px;
}

.osha-ai-header-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}

.osha-ai-icon-btn {
    width: 30px;
    height: 30px;
    border-radius: 9px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.7);
    color: #64748B;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.osha-ai-icon-btn:hover {
    background: #FFFFFF;
    border-color: #CBD5E1;
    color: #1E293B;
}

/* Messages Body */
.osha-ai-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: #F8FAFC;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.osha-ai-messages::-webkit-scrollbar {
    width: 5px;
}

.osha-ai-messages::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 99px;
}

.osha-ai-msg-row {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    max-width: 100%;
}

.osha-ai-msg-row.is-user {
    justify-content: flex-end;
}

.osha-ai-msg-icon {
    width: 28px;
    height: 28px;
    border-radius: 9px;
    background: #EEF2FF;
    color: #4F46E5;
    border: 1px solid #E0E7FF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.osha-ai-bubble {
    max-width: 85%;
    padding: 0.72rem 0.9rem;
    border-radius: 16px;
    font-size: 0.81rem;
    line-height: 1.55;
    word-wrap: break-word;
}

.osha-ai-bubble.ai-bubble {
    background: #FFFFFF;
    color: #334155;
    border: 1px solid #E2E8F0;
    border-top-left-radius: 5px;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
}

.osha-ai-bubble.user-bubble {
    background: linear-gradient(135deg, #4F46E5 0%, #3B82F6 100%);
    color: #FFFFFF;
    border-bottom-right-radius: 5px;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.18);
}

.osha-ai-bubble-sender {
    font-size: 0.68rem;
    font-weight: 700;
    color: #4F46E5;
    margin-bottom: 0.25rem;
}

.osha-ai-bubble-content .osha-ai-p {
    margin: 0 0 0.45rem 0;
}

.osha-ai-bubble-content .osha-ai-p:last-child {
    margin-bottom: 0;
}

.osha-ai-list {
    margin: 0.35rem 0 0.5rem 0;
    padding-left: 1.15rem;
}

.osha-ai-list li {
    margin-bottom: 0.25rem;
}

.osha-ai-code {
    background: #F1F5F9;
    color: #4338CA;
    padding: 0.08rem 0.35rem;
    border-radius: 5px;
    font-size: 0.76rem;
}

.user-bubble .osha-ai-code {
    background: rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
}

.osha-ai-bubble-meta {
    font-size: 0.64rem;
    margin-top: 0.35rem;
    color: #94A3B8;
}

.user-bubble .osha-ai-bubble-meta {
    color: rgba(255, 255, 255, 0.78);
    text-align: right;
}

/* Typing indicator */
.osha-ai-typing {
    padding: 0 1rem 0.5rem;
    background: #F8FAFC;
}

.osha-ai-typing-bubble {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 0.45rem 0.75rem;
}

.osha-ai-typing-text {
    font-size: 0.72rem;
    color: #64748B;
}

.osha-ai-dots {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.osha-ai-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #6366F1;
    animation: oshaAiBounce 1.2s infinite ease-in-out both;
}

.osha-ai-dots span:nth-child(1) { animation-delay: -0.24s; }
.osha-ai-dots span:nth-child(2) { animation-delay: -0.12s; }

@keyframes oshaAiBounce {
    0%, 80%, 100% { transform: scale(0.55); opacity: 0.45; }
    40% { transform: scale(1); opacity: 1; }
}

/* Suggestion Chips */
.osha-ai-suggestions {
    padding: 0.5rem 0.85rem;
    background: #FFFFFF;
    border-top: 1px solid #F1F5F9;
    display: flex;
    gap: 0.4rem;
    overflow-x: auto;
    white-space: nowrap;
    flex-shrink: 0;
}

.osha-ai-suggestions::-webkit-scrollbar {
    height: 3px;
}

.osha-ai-suggestions::-webkit-scrollbar-thumb {
    background: #E2E8F0;
    border-radius: 99px;
}

.osha-ai-chip {
    border: 1px solid #E0E7FF;
    background: #F5F7FF;
    color: #4338CA;
    font-size: 0.72rem;
    font-weight: 500;
    padding: 0.28rem 0.65rem;
    border-radius: 99px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.osha-ai-chip:hover {
    background: #EEF2FF;
    border-color: #A5B4FC;
    color: #312E81;
}

/* Input Footer */
.osha-ai-footer {
    padding: 0.65rem 0.85rem 0.6rem;
    background: #FFFFFF;
    border-top: 1px solid #E2E8F0;
    flex-shrink: 0;
}

.osha-ai-input-box {
    display: flex;
    align-items: flex-end;
    gap: 0.45rem;
    background: #F8FAFC;
    border: 1px solid #CBD5E1;
    border-radius: 14px;
    padding: 0.38rem 0.45rem 0.38rem 0.75rem;
    transition: all 0.15s ease;
}

.osha-ai-input-box:focus-within {
    background: #FFFFFF;
    border-color: #818CF8;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.osha-ai-input {
    flex: 1;
    border: none;
    background: transparent;
    resize: none;
    font-size: 0.81rem;
    color: #1E293B;
    line-height: 1.45;
    max-height: 96px;
    padding: 0.15rem 0;
    outline: none;
}

.osha-ai-input::placeholder {
    color: #94A3B8;
}

.osha-ai-send-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #4F46E5 0%, #3B82F6 100%);
    color: #FFFFFF;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    cursor: pointer;
    flex-shrink: 0;
    transition: all 0.15s ease;
}

.osha-ai-send-btn:hover:not(:disabled) {
    transform: scale(1.04);
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.25);
}

.osha-ai-send-btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.osha-ai-footnote {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.65rem;
    color: #94A3B8;
    margin-top: 0.38rem;
    padding: 0 0.2rem;
}

@media (max-width: 991.98px) {
    .osha-ai-widget {
        bottom: calc(var(--mobile-nav-height) + 14px);
        right: 14px;
    }

    .osha-ai-panel {
        bottom: calc(var(--mobile-nav-height) + 14px);
        right: 14px;
        width: calc(100vw - 28px);
        height: calc(100vh - var(--topbar-height) - var(--mobile-nav-height) - 32px);
    }
}

@media print {

    .erp-sidebar,
    .erp-topbar,
    .mobile-bottom-nav,
    .filter-toolbar-card,
    .no-print {
        display: none !important;
    }

    .erp-main {
        margin-left: 0 !important;
        padding: 0 !important;
    }

    .erp-content {
        padding: 0 !important;
    }

    body {
        background: #FFFFFF !important;
    }
}