/* ZB Documents — brand chrome
   ZBFH Mini Brand Guide + StrataFlow sidebar/cards + SmileFactory elevation
   Outer SaaS (platform): Apexa blues. Inner tenant (ZB): forest green. */

@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@400;500;600;700&display=swap');

:root {
    --zb-green: #007818;
    --zb-green-dark: #005f14;
    --zb-lime: #78b800;
    --zb-sidebar: #14532d;
    --zb-sidebar-deep: #0f3d22;
    --zb-ink: #1a1a1a;
    --zb-ink-2: #41564a;
    --zb-muted: #6d8073;
    --zb-paper: #f4f6ef;
    --zb-surface: #ffffff;
    --zb-surface-2: #eef2e6;
    --zb-line: #dde4d5;
    --zb-line-strong: #c7d2ba;
    --zb-e1: 0 1px 2px rgba(12, 35, 26, 0.06);
    --zb-e2: 0 2px 8px rgba(12, 35, 26, 0.07), 0 1px 2px rgba(12, 35, 26, 0.06);
    --zb-e3: 0 8px 24px rgba(12, 35, 26, 0.09), 0 2px 6px rgba(12, 35, 26, 0.06);
    --zb-radius: 16px;
    --zb-radius-s: 10px;
    --zb-font: Rubik, "Rubrik Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;

    --apexa-blue: #0a2e8c;
    --apexa-blue-deep: #071f5e;
    --apexa-blue-soft: #e8eefc;
    --apexa-red: #e30613;

    --bs-primary: #007818;
    --bs-primary-rgb: 0, 120, 24;
    --bs-link-color: #005f14;
}

html { scroll-behavior: smooth; }

body,
button, input, select, textarea,
.navbar, .dropdown-menu, .btn, .form-control, .card, .pc-sidebar, .pc-header {
    font-family: var(--zb-font) !important;
}

body {
    -webkit-font-smoothing: antialiased;
    color: var(--zb-ink);
}

h1, h2, h3, h4, h5, .h1, .h2, .h3, .h4, .page-header-title h5 {
    font-family: var(--zb-font) !important;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-align: left;
    color: var(--zb-ink);
}

/* ========== PLATFORM (Apexa) — landing / auth / super-admin ========== */
body.zb-skin-apexa {
    --bs-primary: #0a2e8c;
    --bs-primary-rgb: 10, 46, 140;
    --zb-green: #0a2e8c;
    --zb-green-dark: #071f5e;
    --zb-lime: #e30613;
    --zb-sidebar: #0a2e8c;
    --zb-sidebar-deep: #071f5e;
}

body.zb-skin-apexa .btn-primary,
body.zb-skin-apexa .btn-secondary {
    background: var(--apexa-blue) !important;
    border-color: var(--apexa-blue-deep) !important;
    color: #fff !important;
}

body.zb-skin-apexa .pc-sidebar {
    background: linear-gradient(180deg, #071f5e 0%, #0a2e8c 100%) !important;
}

body.zb-skin-apexa .pc-item.active > .pc-link {
    box-shadow: inset 3px 0 0 #e30613 !important;
}

body.zb-skin-apexa .pc-content > .row > [class*="col"] > .card::before {
    background: linear-gradient(90deg, #0a2e8c, #e30613) !important;
}

body.landing-page.zb-skin-apexa .navbar {
    background: #fff !important;
    box-shadow: 0 1px 2px rgba(10, 46, 140, 0.08);
}

body.landing-page.zb-skin-apexa .btn-primary,
body.landing-page.zb-skin-apexa .btn-secondary {
    background: #0a2e8c !important;
    border-color: #071f5e !important;
}

/* ========== TENANT (ZB) — in-app after login ========== */
body.zb-skin-zb {
    background: var(--zb-paper) !important;
    --bs-primary: #007818;
    --bs-primary-rgb: 0, 120, 24;
    --zb-green: #007818;
    --zb-green-dark: #005f14;
    --zb-lime: #78b800;
    --zb-sidebar: #14532d;
    --zb-sidebar-deep: #0f3d22;
}

body.zb-skin-zb .pc-sidebar,
body.zb-skin-zb .pc-sidebar {
    background: var(--zb-sidebar, #14532d) !important;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.pc-sidebar .m-header,
.pc-sidebar .navbar-content {
    background: transparent !important;
}

/* ---- Brand lockup (logo plate + product name) ---- */
.zb-sidebar-brand {
    display: flex !important;
    align-items: center;
    min-height: 64px !important;
    padding: 12px 14px !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.10);
}
.zb-brand-lockup {
    display: flex !important;
    align-items: center;
    gap: 10px;
    min-width: 0;
    text-decoration: none !important;
    color: #fff !important;
}
.zb-brand-mark {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
    overflow: hidden;
}
.zb-brand-mark img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    display: block;
}
.zb-brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.15;
}
.zb-brand-text strong {
    font-size: 14px;
    font-weight: 700;
    color: #fff !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.zb-brand-text small {
    margin-top: 2px;
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.65) !important;
    letter-spacing: 0.02em;
}

/* ---- Compact-but-comfortable nav ---- */
.pc-sidebar .pc-navbar > .pc-item {
    margin: 3px 10px !important;
}
.pc-sidebar .pc-link {
    padding: 10px 12px !important;
    min-height: 42px;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center;
    gap: 10px;
    position: relative;
}
.pc-sidebar .pc-mtext {
    font-size: 13.5px !important;
    font-weight: 500 !important;
    letter-spacing: 0;
}
.pc-sidebar .pc-caption {
    margin: 14px 10px 4px !important;
    padding: 6px 12px 2px !important;
}
.pc-sidebar .pc-caption label {
    font-size: 10.5px !important;
    font-weight: 700 !important;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45) !important;
    opacity: 1 !important;
}
.pc-sidebar .pc-caption i { display: none !important; }

.pc-sidebar .pc-caption label,
.pc-sidebar .pc-mtext,
.pc-sidebar .pc-link,
.pc-sidebar a {
    color: rgba(255, 255, 255, 0.88) !important;
}

/* Kill Able Pro's funny ::after wash + tree line + dots */
.pc-sidebar .pc-navbar > .pc-item > .pc-link::after,
.pc-sidebar .pc-navbar > .pc-item .pc-submenu::after,
.pc-sidebar .pc-navbar > .pc-item .pc-submenu .pc-item > .pc-link::after,
.pc-sidebar .pc-navbar > .pc-item .pc-submenu .pc-link::after {
    content: none !important;
    display: none !important;
    background: none !important;
    width: 0 !important;
    height: 0 !important;
    border: 0 !important;
    box-shadow: none !important;
}

/* Submenu: nested look (indent + rail) */
.pc-sidebar .pc-submenu {
    margin: 4px 0 6px !important;
    padding: 4px 0 4px 12px !important;
    border-left: 2px solid rgba(255, 255, 255, 0.12);
    margin-left: 22px !important;
    list-style: none;
}
.pc-sidebar .pc-submenu > .pc-item {
    margin: 2px 0 2px 0 !important;
}
.pc-sidebar .pc-navbar > .pc-item .pc-submenu .pc-link {
    padding: 8px 10px !important;
    min-height: 38px;
    font-size: 13px !important;
    font-weight: 450 !important;
    border-radius: 8px !important;
    color: rgba(255, 255, 255, 0.72) !important;
    gap: 8px;
}
.pc-sidebar .pc-submenu .pc-micon {
    width: 18px !important;
    opacity: 0.75;
}
.pc-sidebar .pc-submenu .pc-micon i {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Parent hover / active — inset pill with breathing room */
.pc-sidebar .pc-navbar > .pc-item > .pc-link:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
}
.pc-sidebar .pc-navbar > .pc-item.active > .pc-link {
    background: rgba(255, 255, 255, 0.14) !important;
    color: #fff !important;
    font-weight: 600 !important;
    box-shadow: inset 3px 0 0 var(--zb-lime, #78b800);
}
.pc-sidebar .pc-item.pc-trigger:not(.active) > .pc-link {
    background: transparent !important;
    box-shadow: none !important;
}
.pc-sidebar .pc-item.pc-trigger.active > .pc-link {
    background: rgba(255, 255, 255, 0.10) !important;
    box-shadow: none !important;
}

/* Child hover / active — quieter, distinct from parent */
.pc-sidebar .pc-submenu .pc-item > .pc-link:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #fff !important;
}
.pc-sidebar .pc-submenu .pc-item.active > .pc-link {
    background: rgba(120, 184, 0, 0.18) !important;
    color: #fff !important;
    font-weight: 600 !important;
    box-shadow: inset 2px 0 0 var(--zb-lime, #78b800);
}
.pc-sidebar .pc-submenu .pc-item.active > .pc-link .pc-micon {
    opacity: 1;
}

.pc-sidebar .pc-micon {
    width: 20px !important;
    margin-right: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.pc-sidebar .pc-micon i,
.pc-sidebar .pc-micon svg {
    color: rgba(255, 255, 255, 0.8) !important;
    stroke: rgba(255, 255, 255, 0.8) !important;
    width: 18px;
    height: 18px;
}
.pc-sidebar .pc-item.active > .pc-link .pc-micon i,
.pc-sidebar .pc-item.active > .pc-link .pc-micon svg {
    color: #fff !important;
    stroke: #fff !important;
}

.pc-sidebar .pc-arrow {
    margin-left: auto;
    float: none !important;
    display: inline-flex;
    transition: transform 0.2s ease;
}
.pc-sidebar .pc-item.pc-trigger > .pc-link .pc-arrow {
    transform: rotate(90deg);
}
.pc-sidebar .pc-arrow svg,
.pc-sidebar .pc-arrow i {
    width: 16px;
    height: 16px;
    color: rgba(255, 255, 255, 0.55) !important;
    stroke: rgba(255, 255, 255, 0.55) !important;
}

.pc-sidebar .logo,
.pc-sidebar .logo-lg {
    max-height: 40px;
    width: auto;
}

/* Header user chip + dropdown */
.zb-header .header-wrapper {
    min-height: 64px;
    padding: 0 16px !important;
    align-items: center;
}
.zb-header .zb-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}
.zb-header .header-user-profile .pc-head-link.zb-user-chip {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    height: auto !important;
    width: auto !important;
    min-width: 0;
    max-width: 220px;
    padding: 4px 12px 4px 4px !important;
    border-radius: 999px !important;
    border: 1px solid var(--zb-line);
    background: #fff !important;
    box-shadow: none !important;
}
.zb-avatar,
.user-avtar.zb-avatar {
    width: 34px !important;
    height: 34px !important;
    max-width: 34px !important;
    max-height: 34px !important;
    border-radius: 50% !important;
    object-fit: cover;
    object-position: center;
    background: var(--zb-surface-2, #eef2e6);
    flex-shrink: 0;
    overflow: hidden;
    display: block;
}
.zb-header .header-user-profile img.user-avtar,
.zb-header .header-user-profile img.zb-avatar {
    width: 34px !important;
    height: 34px !important;
    border-radius: 50% !important;
    object-fit: cover !important;
}
.zb-user-meta {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.2;
    text-align: left;
    max-width: 120px;
    min-width: 0;
}
.zb-user-meta strong {
    font-size: 13px;
    font-weight: 600;
    color: var(--zb-ink);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.zb-user-caret { font-size: 14px; color: var(--zb-muted); flex-shrink: 0; }

/* Sticky Action column when table scrolls horizontally */
.dt-responsive,
div.dataTables_wrapper div.dataTables_scrollBody {
    position: relative;
}
table.advance-datatable th.zb-sticky-action,
table.advance-datatable td.zb-sticky-action,
table.dataTable th.zb-sticky-action,
table.dataTable td.zb-sticky-action,
table.advance-datatable thead th:last-child,
table.advance-datatable tbody td:last-child,
table.dataTable thead th:last-child,
table.dataTable tbody td:last-child {
    position: sticky;
    right: 0;
    z-index: 2;
    background: var(--zb-surface, #fff) !important;
    box-shadow: -6px 0 10px -6px rgba(12, 35, 26, 0.18);
    white-space: nowrap;
}
table.advance-datatable thead th.zb-sticky-action,
table.dataTable thead th.zb-sticky-action,
table.advance-datatable thead th:last-child,
table.dataTable thead th:last-child {
    z-index: 3;
    background: var(--zb-surface-2, #eef2e6) !important;
}
table.advance-datatable tbody tr:hover td.zb-sticky-action,
table.advance-datatable tbody tr:hover td:last-child,
table.dataTable tbody tr:hover td.zb-sticky-action,
table.dataTable tbody tr:hover td:last-child {
    background: #f4f8ef !important;
}
.zb-sticky-action .cart-action {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    flex-wrap: nowrap;
}

.zb-header .dropdown-user-profile.zb-user-menu {
    min-width: 220px !important;
    max-width: 260px !important;
    width: 240px;
    padding: 10px !important;
    border-radius: 14px !important;
    border: 1px solid var(--zb-line) !important;
    box-shadow: var(--zb-e3) !important;
}
.zb-header .zb-user-menu .zb-user-menu-head {
    padding: 6px 8px 10px;
}
.zb-header .zb-user-menu .zb-user-menu-head h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--zb-ink);
}
.zb-header .zb-user-menu .zb-user-menu-head p {
    margin: 2px 0 0;
    font-size: 12px;
    color: var(--zb-muted);
}
.zb-header .zb-user-menu .dropdown-item {
    border-radius: 8px;
    padding: 9px 10px !important;
    font-size: 13.5px;
    gap: 10px;
}
.zb-header .zb-user-menu .dropdown-item i {
    font-size: 18px;
    width: 20px;
    text-align: center;
    color: var(--zb-muted);
}
.zb-header .zb-user-menu .zb-logout-item {
    margin-top: 6px;
    background: var(--zb-surface-2) !important;
    color: var(--zb-green-dark) !important;
    font-weight: 600;
    justify-content: center;
}
.zb-header .zb-user-menu .zb-logout-item:hover {
    background: rgba(0, 120, 24, 0.12) !important;
}
.zb-header .zb-user-menu hr {
    margin: 8px 0;
    border-color: var(--zb-line);
    opacity: 1;
}

/* Settings: keep nav + pane side-by-side from tablet up (lg was 992 and stacked on many laptops) */
@media (min-width: 768px) {
    .zb-settings-nav {
        max-width: 320px;
    }
    .zb-settings-pane {
        min-width: 0;
    }
}

/* Theme settings preview (CORE-style) — contained mock; no bleed from Able Pro ::after */
.zb-theme-settings .zb-brand-preview {
    margin-bottom: 1.25rem;
    max-width: 560px;
}
.zb-preview-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--zb-muted);
    margin-bottom: 8px;
}
.zb-bp-frame {
    display: grid;
    grid-template-columns: 148px minmax(0, 1fr);
    border: 1px solid var(--zb-line);
    border-radius: 14px;
    overflow: hidden;
    isolation: isolate;
    min-height: 200px;
    background: #fff;
    box-shadow: var(--zb-e1);
    position: relative;
}
.zb-bp-frame::before,
.zb-bp-frame::after,
.zb-bp-side::before,
.zb-bp-side::after,
.zb-bp-link::before,
.zb-bp-link::after,
.zb-bp-active::before,
.zb-bp-active::after {
    content: none !important;
    display: none !important;
}
.zb-bp-side {
    padding: 14px 12px;
    color: #fff;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    overflow: hidden;
    background: linear-gradient(180deg, #007818, #14532d);
}
.zb-bp-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    min-width: 0;
}
.zb-bp-brand img {
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: #fff;
    object-fit: contain;
    padding: 2px;
    display: block;
}
.zb-bp-brand span {
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    color: #fff !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
.zb-bp-link {
    font-size: 11px;
    padding: 7px 10px;
    border-radius: 8px;
    color: rgba(255,255,255,0.9) !important;
    display: block;
    box-shadow: none !important;
    border: 0 !important;
    background: transparent;
}
.zb-bp-active {
    background: rgba(255,255,255,0.16) !important;
    box-shadow: inset 3px 0 0 #78b800 !important;
    border: 0 !important;
    font-weight: 700;
    color: #fff !important;
}
.zb-bp-main {
    padding: 16px 18px;
    background: #f7f8f5;
    min-width: 0;
    overflow: hidden;
}
.zb-bp-eyebrow {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 6px;
    color: #78b800;
}
.zb-bp-title {
    display: block;
    font-size: 17px;
    margin-bottom: 14px;
    color: #14532d;
    font-weight: 700;
}
.zb-bp-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.zb-bp-btn {
    display: inline-flex;
    align-items: center;
    height: 30px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #fff !important;
    background: #007818;
    border: 0;
}
.zb-bp-ghost {
    background: transparent !important;
    border: 1.5px solid #007818 !important;
    color: #007818 !important;
}
.zb-bp-chip {
    display: inline-flex;
    align-items: center;
    height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    background: rgba(120, 184, 0, 0.18);
    color: #5a8f00;
}
.zb-bp-th {
    border-radius: 8px;
    color: #fff !important;
    font-size: 11px;
    font-weight: 600;
    padding: 10px 12px;
    background: #007818;
    opacity: 1 !important;
}
.zb-color-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.zb-color-row input[type="color"] {
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid var(--zb-line);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
}
@media (max-width: 575.98px) {
    .zb-bp-frame { grid-template-columns: 1fr; }
}

/* Light topbar */
.pc-header {
    background: var(--zb-surface) !important;
    border-bottom: 1px solid var(--zb-line) !important;
    box-shadow: var(--zb-e1);
    color: var(--zb-ink) !important;
}

.pc-header .dropdown-menu,
.pc-header a,
.pc-header .pc-head-link {
    color: var(--zb-ink-2) !important;
}

.pc-container,
.pc-content {
    background: var(--zb-paper) !important;
}

/* Able Pro only gaps `.page-header + .row`; our pages often start with grids/cards — keep air under the title sheet */
.pc-content > .page-header {
    margin-bottom: 1.25rem;
}
.pc-content > .page-header + * {
    margin-top: 0;
}

/* Cards — SmileFactory */
.card {
    background: var(--zb-surface) !important;
    border: 1px solid var(--zb-line) !important;
    border-radius: var(--zb-radius) !important;
    box-shadow: var(--zb-e1) !important;
    overflow: hidden;
    position: relative;
}

/* Soft top accent (Strataflow-style: thin, not loud) */
.pc-content > .row > [class*="col"] > .card::before,
.dashboard-card-accent::before {
    content: none;
    display: none;
}

/* Responsive polish across app surfaces */
@media (max-width: 991.98px) {
    .pc-container { padding-left: 12px !important; padding-right: 12px !important; }
    .page-header { flex-wrap: wrap; gap: 8px; }
    .zb-doc-preview__frame { min-height: 280px; }
    .zb-sticky-action { position: static !important; }
    .table-responsive { margin: 0 -4px; }
}
@media (max-width: 575.98px) {
    .pc-content .card-header .row { flex-direction: column; align-items: stretch !important; }
    .pc-content .card-header .btn { width: 100%; }
    .modal-dialog { margin: 0.5rem; }
    .zb-header .zb-user-meta { display: none !important; }
    .dt-responsive table { font-size: 12.5px; }
    .zb-workflow-accordion .col-md-4,
    .zb-workflow-accordion .col-md-3,
    .zb-workflow-accordion .col-md-2 { width: 100%; }
}

.card .card-header {
    background: transparent !important;
    border-bottom: 1px solid var(--zb-line) !important;
    font-weight: 700;
}

.card .card-body { padding: 1rem 1.1rem; }

.card:hover { box-shadow: var(--zb-e2) !important; border-color: var(--zb-line-strong) !important; }

/* Buttons */
.btn, a, [role="button"], button { cursor: pointer; }

.btn-primary,
.btn-secondary {
    background: var(--zb-green) !important;
    border-color: var(--zb-green-dark) !important;
    color: #fff !important;
    font-weight: 600;
    border-radius: var(--zb-radius-s);
    min-height: 40px;
    transition: background 180ms ease, box-shadow 180ms ease, transform 160ms ease;
}

.btn-primary:hover,
.btn-secondary:hover {
    background: var(--zb-green-dark) !important;
    box-shadow: 0 0 0 3px rgba(0, 120, 24, 0.18);
    color: #fff !important;
}

.btn-primary:active { transform: translateY(1px); }

a { color: var(--zb-green-dark); }
a:hover { color: var(--zb-green); }

/* Dense tables */
.table {
    font-size: 0.8125rem;
    margin-bottom: 0;
}

.table > :not(caption) > * > * {
    padding: 0.35rem 0.6rem;
    vertical-align: middle;
}

.table thead th {
    font-size: 0.68rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--zb-muted);
    background: var(--zb-surface-2) !important;
    font-weight: 600;
    height: 36px;
}

.table tbody tr { height: 40px; transition: background 120ms ease; }
.table tbody tr:hover { background: rgba(0, 120, 24, 0.05) !important; }
.table tbody tr:nth-child(even) { background: rgba(18, 35, 26, 0.015); }

.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.form-control, .form-select {
    border-radius: var(--zb-radius-s);
    border-color: var(--zb-line);
    min-height: 40px;
}

.form-control:focus, .form-select:focus {
    border-color: var(--zb-green);
    box-shadow: 0 0 0 3px rgba(0, 120, 24, 0.16);
}

/* ========== GUEST / LOGIN (CORE split) ========== */
body.zb-auth {
    margin: 0;
    background: var(--zb-paper);
}

.zb-guest {
    display: grid;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--zb-paper);
}

.zb-guest > * { min-width: 0; }

@media (min-width: 1024px) {
    .zb-guest { grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); }
}

.zb-guest-aside {
    display: none;
    position: relative;
    overflow: hidden;
    color: #fff;
    padding: 2.75rem 2.5rem;
    flex-direction: column;
}

body.zb-skin-zb .zb-guest-aside,
.zb-guest[data-skin="zb"] .zb-guest-aside {
    background:
        radial-gradient(120% 90% at 100% 0%, rgba(120, 184, 0, 0.35) 0%, transparent 42%),
        linear-gradient(165deg, #0f3d22 0%, var(--zb-green) 55%, #14532d 100%);
}

body.zb-skin-apexa .zb-guest-aside,
.zb-guest[data-skin="apexa"] .zb-guest-aside {
    background:
        radial-gradient(120% 90% at 100% 0%, rgba(227, 6, 19, 0.25) 0%, transparent 40%),
        linear-gradient(165deg, #071f5e 0%, #0a2e8c 55%, #0c3a9e 100%);
}

@media (min-width: 1024px) {
    .zb-guest-aside { display: flex; }
}

.zb-guest-logo-link {
    display: inline-block;
    width: fit-content;
    border-radius: 8px;
    line-height: 0;
    transition: opacity .15s ease;
}
.zb-guest-logo-link:hover { opacity: 0.88; }
.zb-guest-logo-link:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.7);
    outline-offset: 4px;
}
.zb-guest-logo { height: 56px; width: auto; display: block; }
.zb-guest-kicker {
    margin: 1.35rem 0 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.82);
    text-align: left;
}
.zb-guest-aside h1 {
    margin: 0.65rem 0 0;
    max-width: 28rem;
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1.18;
    color: #fff !important;
    text-align: left;
}
.zb-guest-lede {
    margin: 1.35rem 0 0;
    max-width: 28rem;
    font-size: 14px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.82);
    text-align: left;
}
.zb-guest-feat {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
    max-width: 32rem;
    margin: 1.35rem 0 0;
    padding: 0;
    list-style: none;
}
.zb-guest-feat li {
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(6px);
    padding: 0.85rem;
    text-align: left;
}
.zb-guest-feat strong { display: block; font-size: 13px; font-weight: 600; color: #fff; }
.zb-guest-feat span { display: block; margin-top: 0.25rem; font-size: 12px; line-height: 1.5; color: rgba(255,255,255,0.72); }
.zb-guest-tagline {
    margin-top: auto;
    padding-top: 2rem;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.7);
    text-align: left;
}

.zb-guest-main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 3.25rem 1.25rem 2rem;
    box-sizing: border-box;
}
@media (min-width: 640px) { .zb-guest-main { padding: 3.5rem 2.25rem 2.5rem; } }
@media (min-width: 1024px) { .zb-guest-main { padding: 3.5rem 3rem 2.5rem; } }

.zb-guest-back {
    position: absolute;
    top: 1.15rem;
    left: 1.25rem;
    font-size: 13px;
    font-weight: 600;
    color: var(--apexa-blue);
    text-decoration: none;
}
.zb-guest-back:hover { color: var(--apexa-blue-deep); text-decoration: underline; }
@media (min-width: 640px) {
    .zb-guest-back { top: 1.5rem; left: 2.25rem; }
}
@media (min-width: 1024px) {
    .zb-guest-back { left: 3rem; }
}

.zb-guest-mobile-brand { display: block; margin: 0 0 1.25rem; width: 100%; max-width: 26rem; text-align: left; }
@media (min-width: 1024px) { .zb-guest-mobile-brand { display: none; } }
.zb-guest-mobile-brand img { height: 48px; width: auto; display: block; }
.zb-guest-mobile-brand p {
    margin: 0.55rem 0 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--zb-green);
    text-align: left;
}
body.zb-skin-apexa .zb-guest-mobile-brand p { color: var(--apexa-blue); }

.zb-guest-panel {
    width: 100%;
    max-width: 26rem;
    margin: 0 auto;
}

.zb-guest-panel > h1 {
    margin: 0;
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--zb-ink);
    text-align: left;
    letter-spacing: -0.02em;
}
.zb-guest-sub {
    margin: 0.4rem 0 0;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--zb-muted);
    text-align: left;
}

.zb-guest-card {
    margin-top: 1.35rem;
    background: var(--zb-surface);
    border-radius: var(--zb-radius);
    padding: 1.5rem 1.4rem;
    border: 1px solid var(--zb-line);
    box-shadow: var(--zb-e2);
    position: relative;
    overflow: hidden;
}
.zb-guest-card::before {
    content: '';
    position: absolute;
    left: 0; right: 0; top: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--zb-green), var(--zb-lime));
}
body.zb-skin-apexa .zb-guest-card::before {
    background: linear-gradient(90deg, var(--apexa-blue), var(--apexa-red));
}

.zb-guest-card .zb-field { margin-bottom: 1rem; }
.zb-guest-card .zb-field:last-of-type { margin-bottom: 0; }
.zb-field-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.4rem;
}
.zb-field-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 0.15rem 0 1.15rem;
    flex-wrap: wrap;
}
.zb-guest-card .form-label { display: block; margin-bottom: 0.4rem; color: var(--zb-ink); }
.zb-guest-card .form-control {
    min-height: 44px;
    border-radius: 10px;
}
.zb-guest-card .form-check {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    padding: 0;
    min-height: 0;
}
.zb-guest-card .form-check-input { margin: 0; float: none; }
.zb-guest-card .form-check-label {
    margin: 0;
    font-size: 13.5px;
    color: var(--zb-ink);
}

.zb-link-btn {
    appearance: none;
    border: 0;
    background: none;
    padding: 0;
    margin: 0;
    font: inherit;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--apexa-blue);
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1.3;
}
.zb-link-btn:hover { text-decoration: underline; color: var(--apexa-blue-deep); }
.zb-text-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--apexa-blue);
    text-decoration: none;
}
.zb-text-link:hover { text-decoration: underline; color: var(--apexa-blue-deep); }

/* Only the real Sign in CTA is full-width — never secondary actions */
.zb-guest-card .zb-submit,
.zb-guest-card button[type="submit"].zb-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    margin-top: 0.15rem;
    font-size: 15px;
    font-weight: 600;
    border-radius: 10px;
}

/* SSO / AD — themed outline (not Bootstrap purple secondary) */
.zb-sso-actions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 1rem;
}
.zb-btn-sso {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px !important;
    border: 1.5px solid var(--zb-green) !important;
    color: var(--zb-green) !important;
    background: #fff !important;
    box-shadow: none !important;
    text-decoration: none !important;
}
.zb-btn-sso:hover,
.zb-btn-sso:focus {
    background: var(--zb-green) !important;
    color: #fff !important;
    border-color: var(--zb-green) !important;
}
body.zb-skin-zb .zb-btn-sso,
.zb-guest[data-skin="zb"] .zb-btn-sso {
    border-color: #007818 !important;
    color: #007818 !important;
}
body.zb-skin-zb .zb-btn-sso:hover,
.zb-guest[data-skin="zb"] .zb-btn-sso:hover {
    background: #007818 !important;
    color: #fff !important;
}
body.zb-skin-apexa .zb-btn-sso,
.zb-guest[data-skin="apexa"] .zb-btn-sso {
    border-color: var(--apexa-blue, #0a2e8c) !important;
    color: var(--apexa-blue, #0a2e8c) !important;
}
body.zb-skin-apexa .zb-btn-sso:hover,
.zb-guest[data-skin="apexa"] .zb-btn-sso:hover {
    background: var(--apexa-blue, #0a2e8c) !important;
    color: #fff !important;
}

.zb-cal-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.zb-cal-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}
.zb-cal-view {
    text-decoration: none !important;
}

.zb-tenant-row {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding: 0.85rem 0.95rem;
    border-radius: 10px;
    background: var(--apexa-blue-soft, #eef2e6);
    border: 1px solid var(--zb-line);
}
body.zb-skin-zb .zb-tenant-row,
.zb-guest[data-skin="zb"] .zb-tenant-row {
    background: #eef2e6;
    border-color: #dde4d5;
}
body.zb-skin-zb .zb-link-btn,
body.zb-skin-zb .zb-text-link,
body.zb-skin-zb .zb-guest-back,
body.zb-skin-zb .zb-login-foot a,
.zb-guest[data-skin="zb"] .zb-link-btn,
.zb-guest[data-skin="zb"] .zb-text-link,
.zb-guest[data-skin="zb"] .zb-guest-back,
.zb-guest[data-skin="zb"] .zb-login-foot a {
    color: var(--zb-green, #007818) !important;
}
body.zb-skin-zb .zb-link-btn:hover,
body.zb-skin-zb .zb-text-link:hover,
.zb-guest[data-skin="zb"] .zb-link-btn:hover,
.zb-guest[data-skin="zb"] .zb-text-link:hover {
    color: var(--zb-green-dark, #005f14) !important;
}
body.zb-skin-zb .zb-guest-card .zb-submit,
.zb-guest[data-skin="zb"] .zb-guest-card .zb-submit {
    background: var(--zb-green, #007818) !important;
    border-color: var(--zb-green-dark, #005f14) !important;
}
body.zb-skin-zb .zb-guest-card::before,
.zb-guest[data-skin="zb"] .zb-guest-card::before {
    background: linear-gradient(90deg, var(--zb-green, #007818), var(--zb-lime, #78b800)) !important;
}
.zb-tenant-row .meta { flex: 1; min-width: 0; }
.zb-tenant-row .meta .k {
    margin: 0;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--zb-muted);
}
.zb-tenant-row .meta .n {
    margin: 4px 0 0;
    font-weight: 700;
    color: var(--zb-ink);
}
.zb-tenant-row .meta .c {
    margin: 0;
    font-family: ui-monospace, monospace;
    font-size: 12px;
    color: var(--zb-muted);
}

.zb-login-foot {
    margin: 1rem 0 0;
    font-size: 13px;
    color: var(--zb-muted);
    text-align: center;
}
.zb-login-foot a {
    font-weight: 600;
    color: var(--apexa-blue);
    text-decoration: none;
}
.zb-login-foot a:hover { text-decoration: underline; }

/* Hide Able Pro auth chrome leftovers when using zb-guest */
body.zb-auth .auth-main,
body.zb-auth .loader-bg { display: none !important; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

@media (max-width: 767.98px) {
    .zb-guest-feat { grid-template-columns: 1fr; }
    .pc-content { padding: 0.75rem !important; }
}
/* Document detail card spacing */
.zb-doc-detail-card {
    padding: 1.25rem 1.5rem 1.5rem;
}
.zb-doc-detail-card__toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--zb-line, #e5ebe3);
}
.zb-doc-detail-card__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}
.zb-doc-meta {
    padding: 0.25rem 0 1.25rem;
}
.zb-doc-meta .col > div {
    margin-top: 2px;
    line-height: 1.45;
}
.zb-doc-workflow-wrap {
    margin-bottom: 1.25rem;
}
.zb-embed-preview {
    margin: 0;
    padding: 0;
    min-height: 280px;
    background: #fff;
}
.zb-embed-preview__frame {
    width: 100%;
    height: min(72vh, 720px);
    border: 0;
    display: block;
}

/* In-app document preview */
.zb-doc-preview {
    border: 1px solid var(--zb-line);
    border-radius: var(--zb-radius-s);
    overflow: hidden;
    background: #fff;
    min-height: 320px;
    display: flex;
    flex-direction: column;
    margin-top: 0.5rem;
}
.zb-doc-preview__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--zb-line);
    background: var(--zb-surface-2);
}
.zb-doc-preview__body {
    flex: 1;
    min-height: 280px;
    background: #f7f8f5;
}
.zb-doc-preview__frame {
    width: 100%;
    height: min(70vh, 640px);
    border: 0;
    display: block;
    background: #fff;
}
.zb-doc-preview__img {
    display: block;
    max-width: 100%;
    max-height: min(70vh, 640px);
    margin: 0 auto;
    padding: 12px;
    object-fit: contain;
}

/* Empty chart state */
.zb-empty-chart {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 280px;
    padding: 2rem 1.25rem;
    color: var(--zb-muted);
}
.zb-empty-chart[hidden] { display: none !important; }
.zb-empty-ico {
    font-size: 42px;
    line-height: 1;
    color: var(--zb-green);
    opacity: 0.55;
    margin-bottom: 0.75rem;
}
.zb-empty-title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: var(--zb-ink);
}
.zb-empty-text {
    margin: 0.35rem 0 0;
    max-width: 28rem;
    font-size: 13.5px;
    line-height: 1.5;
}
