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

:root {
    --yens-orange: #ef6a2e;
    --yens-orange-dark: #d8561b;
    --yens-orange-soft: #fff3ed;

    --yens-blue: #1f4fa3;
    --yens-navy: #0c1f3f;
    --yens-navy-2: #132d59;
    --yens-blue-soft: #eff6ff;

    --ibt-teal: #0d9488;
    --ibt-teal-dark: #0f766e;
    --ibt-teal-soft: #f0fdfa;

    --bg-body: #f4f7fb;
    --bg-surface: #ffffff;
    --border-subtle: #e2e8f0;
    --border-strong: #cbd5e1;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;

    --success: #10b981;
    --success-soft: #ecfdf5;
    --warning: #f59e0b;
    --warning-soft: #fffbeb;
    --danger: #ef4444;
    --danger-soft: #fef2f2;

    --sidebar-width: 268px;
    --topbar-height: 66px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;

    --shadow-xs: 0 1px 3px rgba(15, 23, 42, 0.05);
    --shadow-sm: 0 4px 14px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 10px 28px rgba(15, 23, 42, 0.09);
    --shadow-lg: 0 20px 45px rgba(15, 23, 42, 0.16);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1, h2, h3, h4, .font-heading {
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    letter-spacing: -0.015em;
}

a {
    color: inherit;
    text-decoration: none;
}

button, input, select, textarea {
    font-family: inherit;
}

/* =========================================================================
   APP SHELL & SIDEBAR NAVIGATION (DESKTOP / TABLET / MOBILE)
   ========================================================================= */
.app-shell {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(3px);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.sidebar-backdrop.show {
    opacity: 1;
    visibility: visible;
}

.app-sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, var(--yens-navy) 0%, #071326 100%);
    color: #f8fafc;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1050;
    display: flex;
    flex-direction: column;
    box-shadow: 6px 0 24px rgba(7, 19, 38, 0.18);
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-brand {
    padding: 18px 18px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
}

.sidebar-brand-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.brand-logo-wrap {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    background: #ffffff;
    padding: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.brand-logo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.brand-text-wrap h2 {
    font-size: 14.5px;
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
    letter-spacing: 0.01em;
}

.brand-text-wrap .brand-x {
    color: var(--yens-orange);
    font-weight: 800;
}

.brand-text-wrap p {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 2px;
    font-weight: 600;
}

.sidebar-close-btn {
    display: none;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.08);
    color: #e2e8f0;
    font-size: 16px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 14px 12px;
}

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

.nav-section-caption {
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #64748b;
    padding: 10px 12px 6px;
}

.nav-item-single {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 14px;
    border-radius: 10px;
    color: #cbd5e1;
    font-size: 13.8px;
    font-weight: 700;
    margin-bottom: 5px;
    transition: all 0.18s ease;
}

.nav-item-single:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.nav-item-single.active {
    background: linear-gradient(135deg, var(--yens-orange) 0%, #f97316 100%);
    color: #ffffff;
    box-shadow: 0 6px 16px rgba(239, 106, 46, 0.35);
}

.nav-icon {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

/* Accordion Group Menu */
.nav-group {
    margin-bottom: 6px;
}

.nav-group-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 14px;
    border-radius: 10px;
    border: none;
    background: transparent;
    color: #cbd5e1;
    font-size: 13.8px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.18s ease;
    text-align: left;
}

.nav-group-toggle:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.nav-group.open .nav-group-toggle {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff;
}

.nav-group-left {
    display: flex;
    align-items: center;
    gap: 11px;
}

.nav-chevron {
    font-size: 11px;
    color: #94a3b8;
    transition: transform 0.22s ease;
}

.nav-group.open .nav-chevron {
    transform: rotate(90deg);
    color: var(--yens-orange);
}

.nav-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.26s cubic-bezier(0.4, 0, 0.2, 1);
    margin-left: 21px;
    padding-left: 12px;
    border-left: 2px solid rgba(255, 255, 255, 0.12);
}

.nav-group.open .nav-submenu {
    max-height: 360px;
    margin-top: 4px;
    margin-bottom: 6px;
}

.nav-sublink {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    border-radius: 8px;
    color: #94a3b8;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 3px;
    transition: all 0.16s ease;
}

.nav-sublink:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.06);
}

.nav-sublink.active {
    color: #ffffff;
    font-weight: 700;
    background: rgba(239, 106, 46, 0.22);
    border-left: 3px solid var(--yens-orange);
    padding-left: 10px;
}

.sidebar-footer {
    padding: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.18);
}

.sidebar-user-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.user-avatar-circle {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #2563eb, #0d9488);
    color: #fff;
    font-weight: 800;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-meta {
    flex: 1;
    min-width: 0;
}

.user-meta .u-name {
    font-size: 12.8px;
    font-weight: 700;
    color: #f8fafc;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-meta .u-role {
    font-size: 10.5px;
    color: #94a3b8;
    text-transform: uppercase;
    font-weight: 700;
}

.btn-logout-icon {
    background: rgba(239, 68, 68, 0.16);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 7px 10px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.18s;
}

.btn-logout-icon:hover {
    background: var(--danger);
    color: #fff;
}

/* =========================================================================
   MAIN WORKSPACE & TOPBAR
   ========================================================================= */
.app-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.app-topbar {
    height: var(--topbar-height);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 990;
}

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

.btn-hamburger {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid var(--border-subtle);
    background: #fff;
    color: var(--text-primary);
    font-size: 19px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.topbar-title-group h1 {
    font-size: 17.5px;
    font-weight: 800;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-title-group p {
    font-size: 11.8px;
    color: var(--text-muted);
}

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

.bo-pill-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--ibt-teal-soft);
    border: 1px solid #99f6e4;
    color: var(--ibt-teal-dark);
    font-size: 11.8px;
    font-weight: 700;
}

.bo-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.22);
}

.app-content {
    padding: 24px;
    flex: 1;
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
}

/* =========================================================================
   CARDS, GRIDS, BUTTONS, FORMS & TABLES
   ========================================================================= */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.kpi-card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-xs);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.kpi-label {
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
}

.kpi-value {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 24px;
    font-weight: 800;
    color: var(--text-primary);
    margin-top: 5px;
    line-height: 1.15;
}

.kpi-sub {
    font-size: 11.8px;
    color: var(--text-muted);
    margin-top: 6px;
    font-weight: 500;
}

.kpi-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}

.panel-card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-xs);
    padding: 20px;
    margin-bottom: 20px;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding-bottom: 14px;
    margin-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
}

.panel-title {
    font-size: 15.5px;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel-subtitle {
    font-size: 12.5px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Adaptive Grid Layouts */
.grid-2-col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.grid-sidebar-main {
    display: grid;
    grid-template-columns: 370px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.grid-claim-split {
    display: grid;
    grid-template-columns: 420px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

/* Form Elements */
.form-group {
    margin-bottom: 14px;
}

.form-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.form-control {
    width: 100%;
    padding: 10px 13px;
    font-size: 13.8px;
    color: var(--text-primary);
    background: #ffffff;
    border: 1.5px solid var(--border-strong);
    border-radius: 10px;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
    min-height: 42px;
}

.form-control:focus {
    border-color: var(--yens-blue);
    box-shadow: 0 0 0 3.5px rgba(31, 79, 163, 0.12);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 10px 16px;
    font-size: 13.5px;
    font-weight: 700;
    border-radius: 10px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.18s ease;
    min-height: 42px;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-sm {
    padding: 6px 11px;
    font-size: 12px;
    min-height: 32px;
    border-radius: 8px;
}

.btn-orange {
    background: linear-gradient(135deg, var(--yens-orange) 0%, #f97316 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(239, 106, 46, 0.28);
}
.btn-orange:hover:not(:disabled) {
    background: var(--yens-orange-dark);
    transform: translateY(-1px);
}

.btn-blue {
    background: linear-gradient(135deg, var(--yens-blue) 0%, #2563eb 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(31, 79, 163, 0.25);
}
.btn-blue:hover:not(:disabled) {
    background: #1a438c;
    transform: translateY(-1px);
}

.btn-teal {
    background: linear-gradient(135deg, var(--ibt-teal) 0%, #10b981 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.28);
}
.btn-teal:hover:not(:disabled) {
    background: var(--ibt-teal-dark);
}

.btn-outline {
    background: #ffffff;
    color: var(--text-secondary);
    border-color: var(--border-strong);
}
.btn-outline:hover:not(:disabled) {
    background: #f8fafc;
    color: var(--text-primary);
}

.btn-danger-soft {
    background: var(--danger-soft);
    color: #dc2626;
    border-color: #fecaca;
}
.btn-danger-soft:hover:not(:disabled) {
    background: #dc2626;
    color: #fff;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.badge-success { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.badge-warning { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.badge-danger  { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.badge-blue    { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.badge-neutral { background: #f1f5f9; color: #475569; border: 1px solid #cbd5e1; }

/* Alerts */
.alert-box {
    padding: 13px 16px;
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 600;
    margin-bottom: 18px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.alert-success { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.alert-danger  { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alert-info    { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }

/* Tables */
.table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 10px;
    border: 1px solid #eef2f6;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table th {
    background: #f8fafc;
    color: var(--text-secondary);
    font-size: 11.2px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 11px 13px;
    text-align: left;
    border-bottom: 1.5px solid var(--border-subtle);
    white-space: nowrap;
}

.data-table td {
    padding: 11px 13px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.data-table tbody tr:hover td {
    background: #f8fafc;
}

/* Tabs */
.tabs-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 18px;
    border-bottom: 1.5px solid var(--border-subtle);
    padding-bottom: 10px;
}

.tab-pill {
    padding: 9px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    background: #ffffff;
    border: 1px solid var(--border-subtle);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: 0.18s;
}

.tab-pill:hover {
    background: #f1f5f9;
    color: var(--text-primary);
}

.tab-pill.active {
    background: var(--yens-blue);
    color: #ffffff;
    border-color: var(--yens-blue);
    box-shadow: 0 4px 12px rgba(31, 79, 163, 0.25);
}

/* Modals */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 2000;
}

.modal-backdrop.show {
    display: flex;
}

.modal-dialog {
    background: #ffffff;
    border-radius: 20px;
    width: 100%;
    max-width: 520px;
    padding: 22px;
    box-shadow: var(--shadow-lg);
    max-height: 92vh;
    overflow-y: auto;
    animation: modalPop 0.2s ease-out;
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.96) translateY(8px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* =========================================================================
   DIGITAL MEMBER CARD CANVAS (EXACT 1376x768 GEOMETRY OVERLAY)
   ========================================================================= */
.digital-card-stage {
    width: 100%;
    max-width: 440px;
    aspect-ratio: 1376 / 768;
    margin: 0 auto;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.24);
    user-select: none;
}

.dcard-field-name {
    position: absolute;
    left: 7.8%;
    top: 74.0%;
    width: 56.0%;
    height: 6.4%;
    display: flex;
    align-items: center;
    padding: 0 2.2%;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-weight: 800;
    font-size: clamp(10px, 2.5vw, 13.5px);
    letter-spacing: 0.03em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dcard-field-meta {
    position: absolute;
    left: 7.8%;
    top: 87.2%;
    width: 56.0%;
    height: 6.2%;
    display: flex;
    align-items: center;
    padding: 0 2.2%;
    font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
    font-weight: 800;
    font-size: clamp(9.5px, 2.2vw, 12px);
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.dcard-field-barcode {
    position: absolute;
    left: 69.8%;
    top: 65.2%;
    width: 26.4%;
    height: 29.0%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3px 4px;
    overflow: hidden;
}

.dcard-field-barcode svg {
    width: 96%;
    height: 66%;
    max-height: 52px;
}

.dcard-member-code {
    font-family: Consolas, 'Courier New', monospace;
    font-size: clamp(8px, 1.8vw, 10px);
    font-weight: 800;
    color: #0f172a;
    letter-spacing: 0.04em;
    line-height: 1.1;
    margin-top: 2px;
    text-align: center;
}

.theme-dot-picker {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 14px 0;
}

.theme-dot-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 3px solid #ffffff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.22);
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.theme-dot-btn.active, .theme-dot-btn:hover {
    transform: scale(1.16);
    box-shadow: 0 0 0 3px var(--yens-blue);
}

/* =========================================================================
   MOBILE BOTTOM NAVIGATION BAR (HIDDEN ON DESKTOP/TABLET)
   ========================================================================= */
.mobile-bottom-nav {
    display: none;
}

/* =========================================================================
   RESPONSIVE BREAKPOINTS: TABLET (768px - 1023px) & MOBILE (<= 767px)
   ========================================================================= */
@media (max-width: 1120px) {
    .grid-claim-split {
        grid-template-columns: 1fr;
    }
    .grid-sidebar-main {
        grid-template-columns: 1fr;
    }
}

/* TABLET & MOBILE DRAWER MODE */
@media (max-width: 1023px) {
    .app-sidebar {
        transform: translateX(-105%);
    }
    .app-sidebar.open {
        transform: translateX(0);
    }
    .sidebar-close-btn {
        display: inline-flex;
    }
    .app-main {
        margin-left: 0;
    }
    .btn-hamburger {
        display: inline-flex;
    }
    .kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .grid-2-col {
        grid-template-columns: 1fr;
    }
    .app-content {
        padding: 18px;
    }
}

/* MOBILE SMARTPHONE VIEWPORT */
@media (max-width: 767px) {
    .app-topbar {
        padding: 0 14px;
        height: 60px;
    }
    .topbar-title-group h1 {
        font-size: 15.5px;
    }
    .topbar-title-group p {
        display: none;
    }
    .bo-pill-badge span.bo-label-full {
        display: none;
    }
    .app-content {
        padding: 14px 14px 88px; /* Ruang aman untuk Sticky Bottom Nav */
    }
    .kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    .kpi-card {
        padding: 14px;
    }
    .kpi-value {
        font-size: 19px;
    }
    .kpi-icon-box {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
    .panel-card {
        padding: 15px;
        border-radius: 14px;
    }
    .form-control, .btn {
        min-height: 44px;
        font-size: 14px;
    }

    /* Native App Style Mobile Bottom Bar */
    .mobile-bottom-nav {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 66px;
        background: rgba(255, 255, 255, 0.97);
        backdrop-filter: blur(12px);
        border-top: 1px solid var(--border-subtle);
        box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.08);
        z-index: 1010;
        padding: 4px 6px env(safe-area-inset-bottom, 4px);
    }

    .mnav-link {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        font-size: 10.5px;
        font-weight: 700;
        color: var(--text-muted);
        border-radius: 10px;
    }

    .mnav-link .mnav-ico {
        font-size: 18px;
        line-height: 1;
    }

    .mnav-link.active {
        color: var(--yens-blue);
    }

    .mnav-link.mnav-cta {
        color: var(--yens-orange);
    }

    .mnav-link.mnav-cta .mnav-ico-fab {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        background: linear-gradient(135deg, var(--yens-orange), #f97316);
        color: #fff;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
        margin-top: -14px;
        box-shadow: 0 6px 14px rgba(239, 106, 46, 0.38);
    }
}

@media (max-width: 390px) {
    .kpi-grid {
        grid-template-columns: 1fr;
    }
}

@media print {
    .app-sidebar, .app-topbar, .mobile-bottom-nav, .no-print {
        display: none !important;
    }
    .app-main {
        margin-left: 0 !important;
    }
    .app-content {
        padding: 0 !important;
    }
    .panel-card {
        box-shadow: none !important;
        border: 1px solid #cbd5e1 !important;
    }
}
