/* GlobeX look "L" (chosen by the owner, 13 Nov 2026): logo colours only, navy navigation, sharp corners, clear type.
   Loaded after tms-theme.css and globex-brand.css. Colour roles:
   - #34498a deep blue: primary actions and links          - #4f6cb4 logo blue: selected state and focus
   - #7b88a8 control border (3:1 on every light surface)   - #cf384d logo red: identity marks on the app frame only
   - #a82a3c error red: wrong, cancelled, delete           - #16213e navy: navigation and headings
   Print layouts keep their own styles. */
@media screen {
    :root {
        --teal: #34498a; --navy: #16213e; --navy2: #22304f; --ink: #16213e; --muted: #44506b; --line: #dfe4ef; --bg: #f5f7fc;
        --tms-soft: #eaf0fb; --tms-accent: #34498a; --tms-input: #7b88a8; --tms-shadow: none;
        --l-blue: #4f6cb4; --l-deep: #34498a; --l-red: #cf384d; --l-control: #7b88a8;
        --l-display: "Marcellus", Georgia, "Times New Roman", serif;
        --l-ui: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
        --l-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
    }
    body { font: 15px/1.5 var(--l-ui); color: var(--ink); background: var(--bg); }
    a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible { outline: 2px solid var(--l-blue); outline-offset: 2px; }
    code, kbd, samp, .mono, .ruang-mono { font-family: var(--l-mono); }
    .shell .content code { overflow-wrap: anywhere; }

    /* ---------- Navigation (navy, official logo on top) ---------- */
    .shell { background: var(--bg); grid-template-columns: 264px minmax(0, 1fr); }
    .shell .sidebar, .workspace-enhanced .shell .sidebar { background: #16213e; color: #ccd6ea; border-right: 0; scrollbar-color: #394a70 transparent; }
    .shell .sidebar-brand-row { position: relative; display: block; height: auto; min-height: 0; margin: 0; padding: 24px 28px 18px; background: transparent; border-bottom: 1px solid #2a3858; }
    .shell .brand, .shell .brand .brand-full, .shell .brand .brand-short { display: block; line-height: 0; }
    .shell .brand .brand-short { display: none; }
    .shell .brand .brand-full { width: 196px; max-width: 100%; }
    .shell .brand .brand-logo { display: block; width: 100%; height: auto; max-width: none; max-height: none; mix-blend-mode: normal; filter: brightness(1.3); }
    .shell .brand-slogan { display: block; margin-top: 12px; color: #aebde6; font: 600 13px/1.3 var(--l-ui); letter-spacing: .2em; text-transform: uppercase; text-wrap: balance; }
    .shell .sidebar-tms-badge { top: 14px; right: 14px; padding: 2px 8px; border: 1px solid #394a70; border-radius: 999px; background: transparent; color: #aebde6; font-size: 13px; letter-spacing: .12em; }
    .shell .sidebar-toolbar { padding: 16px 28px 8px; color: #9aa8c6; font-size: 13px; font-weight: 600; letter-spacing: .2em; }
    .shell .sidebar-search { margin: 0 18px 12px; min-height: 44px; background: #22304f; border: 1px solid #6f80ad; border-radius: 4px; color: #b9c5de; }
    .shell .sidebar-search svg { stroke: #b9c5de; }
    .shell .sidebar-search input { color: #ffffff; font-size: 15px; background: transparent; }
    .shell .sidebar-search input::placeholder { color: #9aa8c6; }
    .shell .sidebar-search:focus-within { border-color: #aebde6; }
    .shell .sidebar-empty { margin: 0 18px 12px; padding: 14px 10px; background: #22304f; border: 1px dashed #394a70; border-radius: 4px; color: #ccd6ea; font-size: 14px; }
    .shell .sidebar-empty button { color: #ffffff; font-size: 14px; }
    .shell .workspace-navigation, .workspace-enhanced .shell .workspace-navigation { padding: 10px 18px 14px; border-top: 1px solid #2a3858; scrollbar-color: #394a70 transparent; }
    .shell .nav-group { margin: 0 0 2px; border-radius: 4px; }
    .shell .nav-caption, .shell .nav-group[open] > .nav-caption, .shell .tms-nav-single-link { min-height: 44px; padding: 0 12px; gap: 12px; border-radius: 4px; color: #ccd6ea; font-size: 16px; font-weight: 400; }
    .shell .nav-caption:hover, .shell .tms-nav-single-link:hover { background: #22304f; color: #ffffff; }
    .shell .nav-group-active > .nav-caption { background: transparent; color: #ffffff; font-weight: 600; }
    .shell .group-chevron { color: #9aa8c6; }
    .shell .group-icon { width: 18px; height: 18px; flex: 0 0 18px; padding: 0; border-radius: 0; background: transparent; color: #b9c5de; }
    .shell .nav-group-active > .nav-caption .group-icon, .shell .tms-nav-single-link.active .group-icon { color: #aebde6; }
    .shell .nav-group-items { margin: 2px 0 8px 20px; padding: 0 0 0 10px; border-left: 1px solid #2a3858; }
    .shell .nav-link { min-height: 40px; margin: 1px 0; padding: 6px 12px; border-radius: 4px; color: #b9c5de; font-size: 15px; font-weight: 400; }
    .shell .nav-link:hover { background: #22304f; color: #ffffff; }
    .shell .nav-link.active, .shell .tms-nav-single-link.active { background: #22304f; color: #ffffff; font-weight: 600; box-shadow: inset 3px 0 0 var(--l-red); }
    .shell .nav-link.active::after { display: none; }
    .shell .nav-section { margin: 1px 0; border: 0; background: transparent; }
    .shell .nav-section-caption { min-height: 40px; padding: 6px 10px; gap: 8px; border-radius: 4px; background: transparent; color: #ccd6ea; font-size: 15px; font-weight: 400; }
    .shell .nav-section-caption:hover { background: #22304f; color: #ffffff; }
    .shell .nav-section-active > .nav-section-caption { background: transparent; color: #ffffff; font-weight: 600; }
    .shell .nav-section-items { margin: 0 0 6px 14px; padding: 0 0 0 8px; border-left: 1px solid #2a3858; }
    .shell .nav-section .nav-link { min-height: 38px; padding: 6px 12px; background: transparent; color: #b9c5de; font-size: 15px; }
    .shell .nav-section .nav-link:hover { background: #22304f; color: #ffffff; }
    .shell .nav-section .nav-link.active { background: #22304f; color: #ffffff; }
    .shell .sidebar-footer { padding: 14px 28px; border-top: 1px solid #2a3858; background: transparent; color: #9aa8c6; font-size: 13px; }
    .shell .sidebar-footer a { color: #aebde6; }
    .shell .nav-link .registration-count, .shell .nav-link .badge { background: #cf384d; color: #ffffff; }

    /* ---------- Top bar (same on every page) ---------- */
    .shell .topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; height: 64px; padding: 0 40px 0 28px; background: #ffffff; border-bottom: 1px solid var(--line); box-shadow: none; position: sticky; top: 0; z-index: 30; }
    .shell .topbar-leading { gap: 12px; min-width: 0; }
    .shell .menu-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; border: 1px solid var(--l-control); border-radius: 4px; background: #ffffff; color: var(--ink); font-size: 15px; font-weight: 600; }
    .shell .menu-toggle:hover { background: #f7f9fd; }
    .shell .topbar-heading > strong { color: var(--ink); font-size: 15px; font-weight: 600; }
    .topbar-brand { display: none; }
    .shell .account { gap: 12px; margin-left: auto; }
    .account .tms-locale-switch { display: inline-flex; align-items: center; margin: 0; padding: 3px; gap: 2px; border: 1px solid var(--l-control); border-radius: 999px; background: #ffffff; }
    .account .tms-locale-switch button { min-width: 44px; min-height: 36px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: 600 15px/1 var(--l-ui); letter-spacing: 0; cursor: pointer; box-shadow: none; }
    .account .tms-locale-switch button.active { background: var(--l-blue); color: #ffffff; }
    .account .tms-locale-switch-menu { display: none; }
    .shell .icon-button { min-width: 44px; min-height: 44px; border: 1px solid var(--l-control); border-radius: 4px; background: #ffffff; color: var(--ink); }
    .shell .icon-button:hover { background: #f7f9fd; border-color: var(--l-deep); }
    .shell .tms-account-tools > div { border: 1px solid var(--line); border-radius: 4px; box-shadow: 0 12px 32px rgb(22 33 62 / .14); }
    .shell .tms-account-tools > div a, .shell .account-logout { min-height: 40px; font-size: 15px; }
    .shell .account-logout { color: #a82a3c; }
    .shell .account-avatar, .shell .account-avatar.account-attendance-link { width: 40px; height: 40px; border: 1px solid #c9d4ea; border-radius: 50%; background: #eaf0fb; color: var(--l-deep); font: 400 17px/1 var(--l-display); }
    .shell .account-avatar img { border-radius: 50%; }
    .shell .account-name strong { font-size: 15px; line-height: 20px; font-weight: 700; color: var(--ink); }
    .shell .account-name small { font-size: 13px; line-height: 17px; color: var(--muted); }

    /* ---------- Page frame ---------- */
    .shell .content { max-width: 1640px; padding: 20px 40px 0; }
    .shell .page-intro { margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid #c9d4ea; gap: 12px 20px; align-items: flex-end; }
    .shell .eyebrow, .eyebrow { margin-bottom: 4px; color: var(--l-deep); font-size: 13px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; }
    .shell .page-intro h1 { font: 400 32px/40px var(--l-display); letter-spacing: 0; color: var(--ink); }
    .shell .page-intro .muted { margin-top: 2px; font-size: 15px; line-height: 22px; color: var(--muted); }
    .shell h2, .shell h3 { font-family: var(--l-ui); letter-spacing: -.01em; color: var(--ink); }
    .shell .muted, .muted { color: var(--muted); }
    .shell .workspace-footer { margin-top: 24px; padding: 16px 0 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

    /* ---------- Cards and summaries ---------- */
    .shell .card, .shell .tms-panel, .shell .master-category, .shell .master-authorized { border: 1px solid var(--line); border-radius: 4px; background: #ffffff; box-shadow: none; }
    .shell .card { padding: 20px 24px; margin-bottom: 16px; }
    .shell .card-header { margin-bottom: 16px; padding-bottom: 14px; }
    .shell .card-header h2, .shell .card h2 { font-size: 20px; line-height: 28px; font-weight: 700; }
    .shell .card h3 { font-size: 17px; font-weight: 700; }
    .shell .card-header p { font-size: 15px; }
    .shell .summary-grid, .shell .summary-grid.three { gap: 16px; margin-bottom: 16px; }
    .shell .summary-card { padding: 14px 20px; border: 1px solid var(--line); border-radius: 4px; box-shadow: none; }
    .shell .summary-card::before { display: none; }
    .shell .summary-card-icon { width: 36px; height: 36px; padding: 8px; border-radius: 4px; color: var(--l-deep); background: #eaf0fb; }
    .shell .summary-card-label { margin-bottom: 4px; color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; line-height: 18px; }
    .shell .summary-card .stat { font: 600 34px/40px var(--l-ui); letter-spacing: -.01em; color: var(--ink); }
    .shell .summary-card-detail { margin-top: 2px; font-size: 15px; line-height: 20px; color: var(--muted); }
    .shell .summary-card .card-link { font-size: 15px; color: var(--l-deep); }
    .shell .workflow-row { padding: 16px 20px; border-radius: 4px; }
    .shell .workflow-number { width: 28px; height: 28px; flex: 0 0 28px; background: #16213e; color: #aebde6; font: 600 15px/1 var(--l-ui); box-shadow: none; }
    .shell .workflow-row h3 { font-size: 17px; }
    .shell .workflow-row p { font-size: 15px; line-height: 22px; color: var(--muted); }
    .shell .attention-item, .shell .account-summary { font-size: 15px; border-radius: 4px; }

    /* ---------- Buttons ---------- */
    .shell .button, .tms-login .button, .button { min-height: 44px; padding: 8px 18px; border: 1px solid var(--l-deep); border-radius: 4px; background: var(--l-deep); color: #ffffff; font: 600 15px/1.3 var(--l-ui); box-shadow: none; }
    .shell .button:hover, .tms-login .button:hover, .button:hover { background: #2b3d77; border-color: #2b3d77; }
    .shell .button.secondary, .button.secondary { background: #ffffff; color: var(--ink); border-color: var(--l-control); box-shadow: none; }
    .shell .button.secondary:hover, .button.secondary:hover { background: #f7f9fd; color: var(--ink); border-color: var(--l-deep); }
    .shell .button.small { min-height: 36px; padding: 6px 12px; font-size: 14px; }
    .shell .button.danger { color: #a82a3c; background: #ffffff; border-color: var(--l-control); }
    .shell .button.danger:hover { background: #fbe9ec; border-color: #a82a3c; }
    .shell .button:disabled, .shell .button[disabled], .button:disabled { opacity: .55; cursor: not-allowed; }
    .shell .content .button, .shell .content button.button { font-size: 15px; }
    .shell .content .button.small { font-size: 14px; }
    .access-delete-button, .employee-delete-button { min-height: 36px; font-size: 14px; }
    .shell .content h1 { font-family: var(--l-display); font-weight: 400; letter-spacing: 0; }
    .location-standalone h1 { font: 400 30px/38px var(--l-display); letter-spacing: 0; }
    .location-standalone .button { min-height: 48px; font-size: 16px; }
    .location-standalone .location-access-logout { font-size: 15px; }

    /* ---------- Forms ---------- */
    .shell .field { margin-bottom: 14px; }
    .shell .field label, .tms-login .field label, .field label { margin-bottom: 6px; color: var(--ink); font-size: 15px; font-weight: 600; line-height: 20px; }
    .shell .field input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]), .shell .field select, .shell .field textarea, .shell .search-input,
    .shell .filter-bar input:not([type=checkbox]):not([type=radio]), .shell .filter-bar select, .tms-login .field input:not([type=checkbox]):not([type=radio]),
    .field input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]), .field select, .field textarea, .search-input {
        min-height: 44px; padding: 9px 12px; border: 1px solid var(--l-control); border-radius: 4px; background: #ffffff; color: var(--ink); font-size: 16px; line-height: 24px;
    }
    .shell .field input:focus-visible, .shell .field select:focus-visible, .shell .field textarea:focus-visible, .shell .search-input:focus-visible, .shell .filter-bar input:focus-visible, .shell .filter-bar select:focus-visible,
    .tms-login .field input:focus-visible, .field input:focus-visible {
        border-color: var(--l-blue); outline: 2px solid var(--l-blue); outline-offset: -1px; box-shadow: 0 0 0 4px #eaf0fb;
    }
    .shell .field input[aria-invalid=true], .shell .field select[aria-invalid=true], .shell .field textarea[aria-invalid=true], .shell .field.has-error input, .shell .field.has-error select { border: 2px solid #a82a3c; background: #fdf3f5; }
    .shell .field input[readonly] { background: #edf0f6; border: 1px solid var(--line); border-style: solid; color: var(--muted); }
    .shell .field input:disabled, .shell .field select:disabled, .shell .field textarea:disabled { background: #edf0f6; border-color: var(--line); color: var(--muted); }
    .shell .field small, .field small { font-size: 14px; line-height: 18px; color: var(--muted); }
    .shell .field-error, .field-error { color: #a82a3c; font-size: 14px; font-weight: 600; }
    input[type=checkbox], input[type=radio] { accent-color: var(--l-blue); }
    .shell .field input[type=checkbox], .shell .field input[type=radio], .field input[type=checkbox], .field input[type=radio] { width: 20px; height: 20px; min-height: 0; padding: 0; flex: 0 0 20px; }
    .shell .field input[type=file], .field input[type=file] { min-height: 44px; padding: 8px 12px; border: 1px solid var(--l-control); border-radius: 4px; background: #ffffff; font-size: 15px; }
    /* A button placed straight in a form grid lines up with the bottom of the fields instead of stretching to the row height. */
    .shell .form-grid > .button, .shell .form-grid > button, .form-grid > .button { align-self: end; }
    small { font-size: 14px; line-height: 20px; }
    /* Fields that sit straight in a grid form start on the same line in every column. */
    .shell form.form-grid > .field + .field { margin-top: 0; }
    /* Every control inside a card or the page content follows the field look, whatever older page rule styled it before (table rows, list search, page-specific forms). */
    .shell .card input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]):not([type=range]):not([type=color]):not([type=submit]):not([type=button]):not([type=reset]):not([type=image]), .shell .card select, .shell .card textarea,
    .shell .content input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]):not([type=range]):not([type=color]):not([type=submit]):not([type=button]):not([type=reset]):not([type=image]), .shell .content select, .shell .content textarea {
        min-height: 44px; padding: 9px 12px; border: 1px solid var(--l-control); border-radius: 4px; background-color: #ffffff; color: var(--ink); font-family: var(--l-ui); font-size: 16px; line-height: 24px;
    }
    .shell .content input:focus-visible, .shell .content select:focus-visible, .shell .content textarea:focus-visible { border-color: var(--l-blue); outline: 2px solid var(--l-blue); outline-offset: -1px; box-shadow: 0 0 0 4px #eaf0fb; }
    .shell .content input[readonly]:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]):not([type=range]):not([type=color]):not([type=submit]):not([type=button]):not([type=reset]):not([type=image]), .shell .content input:disabled:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]):not([type=range]):not([type=color]):not([type=submit]):not([type=button]):not([type=reset]):not([type=image]), .shell .content select:disabled, .shell .content textarea:disabled, .shell .content textarea[readonly] { background-color: #edf0f6; border-color: var(--line); color: var(--muted); }
    .shell .content textarea { min-height: 92px; }
    .shell .content td input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]):not([type=range]):not([type=color]):not([type=submit]):not([type=button]):not([type=reset]):not([type=image]), .shell .content td select { min-height: 40px; padding: 7px 10px; font-size: 15px; }
    /* Older forms where the label wraps its control straight inside a card form (no .field wrapper) get the same field look. */
    .shell .card form > label:not(.sr-only) { color: var(--ink); font-size: 15px; font-weight: 600; line-height: 20px; }
    .shell .card form.form-grid > label:not(.sr-only) { margin: 0; min-width: 0; }
    .shell .card form > label:not(.sr-only) > input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=hidden]), .shell .card form > label:not(.sr-only) > select, .shell .card form > label:not(.sr-only) > textarea {
        display: block; width: 100%; min-width: 0; min-height: 44px; margin-top: 6px; padding: 9px 12px; border: 1px solid var(--l-control); border-radius: 4px; background: #ffffff; color: var(--ink); font: 400 16px/24px var(--l-ui);
    }
    .shell .card form > label:not(.sr-only) > textarea { min-height: 92px; resize: vertical; }
    .shell .card form > label:not(.sr-only) > input:focus-visible, .shell .card form > label:not(.sr-only) > select:focus-visible, .shell .card form > label:not(.sr-only) > textarea:focus-visible { border-color: var(--l-blue); outline: 2px solid var(--l-blue); outline-offset: -1px; box-shadow: 0 0 0 4px #eaf0fb; }
    .shell .card form > label:not(.sr-only) > input[type=checkbox], .shell .card form > label:not(.sr-only) > input[type=radio] { width: 20px; height: 20px; margin: 0 8px 0 0; vertical-align: -4px; }
    .shell .card form > label:has(> input[type=checkbox]), .shell .card form > label:has(> input[type=radio]) { font-weight: 400; }
    .shell .form-grid, .shell .details-grid { gap: 16px; }
    .shell .form-grid > .field, .shell .details-grid > .field { margin-bottom: 0; }
    .shell .filter-bar { gap: 12px; margin-bottom: 16px; padding: 12px 16px; background: #ffffff; border: 1px solid var(--line); border-radius: 4px; }
    .shell .form-section > h2, .shell .form-section > h3 { font-size: 18px; font-weight: 700; }

    /* ---------- Tables (compact rows: more records on one screen) ---------- */
    .shell .table-wrap { border: 1px solid var(--line); border-radius: 4px; background: #ffffff; }
    .shell table { font-size: 15px; line-height: 20px; }
    .shell .table-wrap th, .shell th { padding: 8px 16px; background: #f7f9fd; color: var(--muted); font-size: 13px; line-height: 18px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; white-space: normal; border-bottom: 1px solid var(--line); }
    .shell .table-wrap td, .shell td { padding: 7px 16px; color: var(--ink); border-bottom: 1px solid #edf0f6; }
    .shell tbody tr:hover td { background: #f7f9fd; }
    .shell td small { display: block; margin-top: 0; font-size: 14px; line-height: 18px; color: var(--muted); }
    .shell td a:not(.button) { color: var(--l-deep); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
    .shell td strong, .shell td b { font-weight: 600; }
    .shell .numeric { font-variant-numeric: tabular-nums; }

    /* ---------- Badges, alerts, tabs, pagination, empty state ---------- */
    .shell .badge, .badge { padding: 4px 10px; border-radius: 999px; background: #edf0f6; color: var(--muted); font-size: 13px; line-height: 18px; font-weight: 600; }
    /* Status colours: neutral = draft or not yet active, amber = needs attention, blue = in progress, green = done, red = cancelled. All pass 4.5:1. */
    .shell .badge.status-draft, .shell .badge.status-pending { background: #edf0f6; color: #44506b; }
    .shell .badge.status-warning, .shell .badge.status-partial { background: #fbf0db; color: #8f5c0c; }
    .shell .badge.status-progress { background: #eaf0fb; color: #34498a; }
    .shell .badge.status-complete, .shell .badge.status-confirmed, .shell .badge.status-paid { background: #e4f3eb; color: #1e7552; }
    .shell .badge.status-danger, .shell .badge.status-cancelled { background: #fbe9ec; color: #a82a3c; }
    .shell .notice { background: #fbf0db; border: 1px solid #e9d3a4; border-left: 4px solid #8f5c0c; border-radius: 4px; color: #6b4508; font-size: 15px; line-height: 22px; }
    .shell .notice p { font-size: 15px; }
    .shell .master-category .section-chevron { color: #515d78; }
    .shell .empty, .shell .empty-state { font-size: 15px; }
    .onboarding-aside { background: #16213e; }
    .att-setup, .att-inline-notice { font-size: 15px; line-height: 22px; }
    .shell .alert, .alert { margin: 0 0 16px; padding: 12px 16px; border: 1px solid #b9dfca; border-left: 4px solid #1e7552; border-radius: 4px; background: #e4f3eb; color: #1e7552; font-size: 15px; }
    .shell .alert.error, .alert.error { border-color: #f0c4cc; border-left-color: #a82a3c; background: #fbe9ec; color: #a82a3c; }
    .shell .tab-links a { min-height: 40px; border-radius: 4px 4px 0 0; font-size: 15px; color: var(--muted); }
    .shell .tab-links a.active { background: transparent; color: var(--ink); font-weight: 600; border-color: transparent; box-shadow: inset 0 -2px 0 var(--l-blue); }
    .shell .pagination { font-size: 15px; }
    .shell .content nav[role=navigation], .shell .content nav[role=navigation] p { font-size: 15px; }
    .shell .content nav[role=navigation] a, .shell .content nav[role=navigation] span[aria-disabled] > span, .shell .content nav[role=navigation] span[aria-current] > span { min-width: 36px; min-height: 36px; border-radius: 4px; font-size: 15px; }
    .shell .content nav[role=navigation] a { border-color: var(--l-control); color: var(--ink); }
    .shell .content nav[role=navigation] a:hover { border-color: var(--l-deep); color: var(--l-deep); }
    .shell .content nav[role=navigation] span[aria-current] > span { background: var(--l-deep); border-color: var(--l-deep); color: #ffffff; }
    .shell .empty-state { padding: 28px 24px; }
    .shell .empty-state-icon { color: var(--l-blue); border-color: #c9d4ea; }
    .shell .empty-state h3 { font-size: 20px; font-weight: 700; }
    .shell .empty-state p { font-size: 15px; color: var(--muted); }
    .shell .master-category > summary { font-size: 15px; }
    .shell .master-category-links { border-top: 2px solid var(--l-blue); }
    .shell .master-category-links a { font-size: 15px; }

    /* ---------- Dashboard tiles, panels, tabs and list tools carried over from the original workspace ---------- */
    .shell .tms-page-head { align-items: flex-end; }
    .shell .page-intro { flex-wrap: wrap; }
    .shell .page-intro > div:first-child { flex: 1 1 16rem; min-width: 0; }
    .shell .tms-stat-grid { gap: 16px; margin-bottom: 16px; }
    .shell .tms-stat { grid-template-columns: minmax(0, 1fr); grid-template-areas: "label" "value"; gap: 4px; padding: 14px 20px; border: 1px solid var(--line); border-radius: 4px; box-shadow: none; }
    .shell .tms-stat::before, .shell .tms-stat-icon { display: none; }
    .shell .tms-stat-label { color: var(--muted); font-size: 13px; line-height: 18px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
    .shell .tms-stat strong { font: 600 34px/40px var(--l-ui); letter-spacing: -.01em; color: var(--ink); }
    .shell .tms-stat:hover, .shell .tms-flow-step:hover { border-color: var(--l-blue); }
    .shell .tms-panel { margin-bottom: 16px; }
    .shell .tms-panel-head { min-height: 0; padding: 12px 24px; }
    .shell .tms-panel-head h2 { font-size: 20px; line-height: 28px; font-weight: 700; }
    .shell .tms-panel-head p { font-size: 15px; line-height: 22px; }
    .shell .tms-panel-body { padding: 20px 24px; }
    .shell .tms-panel > .table-wrap { border: 0; border-radius: 0; }
    .shell .tms-flow-step { padding: 16px 20px; }
    .shell .tms-flow-number { width: 28px; height: 28px; margin-bottom: 10px; background: #16213e; color: #aebde6; font: 600 15px/1 var(--l-ui); box-shadow: none; }
    .shell .tms-flow-step h3 { font-size: 17px; font-weight: 700; }
    .shell .tms-flow-step p { font-size: 15px; line-height: 22px; }
    .shell .tms-scope { font-size: 14px; color: var(--muted); }
    .shell .tms-master-summary > span { font-size: 14px; }
    .shell .tms-list-filter { gap: 12px; margin-bottom: 16px; }
    .shell .tms-filter-check { min-height: 44px; font-size: 15px; }
    .shell .tms-pagination { padding: 10px 20px; font-size: 15px; }
    .shell .tms-text-action { color: var(--l-deep); font-size: 15px; text-decoration: underline; text-underline-offset: 2px; }
    .shell .tms-tabbar { width: auto; gap: 0; margin-bottom: 16px; padding: 0; border-radius: 0; border-bottom: 1px solid var(--line); background: transparent; }
    .shell .tms-tab { min-height: 44px; padding: 10px 16px; border-radius: 0; color: var(--muted); font-size: 15px; font-weight: 500; }
    .shell .tms-tab.active { background: transparent; color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--l-blue); }
    .shell .tms-tab.active::after { display: none; }
    .tms-account-tools > div a { font-size: 15px; }

    /* ---------- Stand-alone security pages (two-step verification, action confirmation) ---------- */
    body > main.auth-form { display: block; box-sizing: border-box; width: auto; padding: 32px 40px 36px !important; margin: 72px auto 40px !important; border: 1px solid var(--line); border-top: 2px solid var(--l-red); border-radius: 4px; background: #ffffff; font-size: 16px; line-height: 26px; }
    body > main.auth-form::before { content: ""; display: block; width: 132px; height: 95px; margin: 0 auto 20px; background: url(images/globex-logo-transparan.png) center / contain no-repeat; }
    body > main.auth-form > div, body > main.auth-form > .eyebrow { width: auto; max-width: none; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
    body > main.auth-form > .alert { padding: 12px 16px; border: 1px solid #b9dfca; border-left: 4px solid #1e7552; background: #e4f3eb; }
    body > main.auth-form > .alert.error { border-color: #f0c4cc; border-left-color: #a82a3c; background: #fbe9ec; }
    body > main.auth-form h1 { margin: 4px 0 8px; font: 400 32px/40px var(--l-display); letter-spacing: 0; color: var(--ink); }
    body > main.auth-form h2 { margin: 24px 0 8px; font: 700 20px/28px var(--l-ui); color: var(--ink); }
    body > main.auth-form p { margin: 0 0 14px; }
    body > main.auth-form a:not(.button) { color: var(--l-deep); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
    body > main.auth-form .field { margin: 0 0 16px; }
    body > main.auth-form .field label { display: block; }
    body > main.auth-form .field input, body > main.auth-form .field select, body > main.auth-form .field textarea { display: block; width: 100%; min-height: 48px; font-size: 16px; }
    body > main.auth-form .field textarea { min-height: 96px; }
    body > main.auth-form .button { width: auto; min-width: 220px; min-height: 48px; margin-top: 4px; font-size: 16px; }
    body > main.auth-form form + form, body > main.auth-form .button + .button { margin-top: 12px; }
    body > main.auth-form details { margin-top: 20px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 4px; background: #f7f9fd; }
    body > main.auth-form details > summary { cursor: pointer; color: var(--l-deep); font-weight: 600; }
    body > main.auth-form details[open] > summary { margin-bottom: 12px; }
    body > main.auth-form code { padding: 2px 6px; border: 1px solid var(--line); border-radius: 4px; background: #f7f9fd; font-size: 15px; }
    body > main.auth-form ul { margin: 0 0 16px; padding-left: 20px; }
    body > main.auth-form dl { display: grid; grid-template-columns: minmax(140px, max-content) minmax(0, 1fr); gap: 6px 16px; margin: 0 0 20px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 4px; background: #f7f9fd; font-size: 15px; line-height: 22px; }
    body > main.auth-form dt { color: var(--muted); font-weight: 600; text-transform: capitalize; }
    body > main.auth-form dd { margin: 0; color: var(--ink); }

    /* ---------- Stand-alone two-column pages (sign-in link confirmation, e-mail verification) ---------- */
    .auth .auth-aside { padding: 48px 8% 40px; background: #16213e; color: #ccd6ea; border-right: 0; }
    .auth .auth-brand { width: 196px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
    .auth .auth-brand .brand-logo { width: 196px; mix-blend-mode: normal; filter: brightness(1.3); }
    .auth .auth-aside .eyebrow { color: #aebde6 !important; font-size: 13px; letter-spacing: .2em; margin-bottom: 16px !important; }
    .auth .auth-aside h2 { max-width: 520px; margin: 0 0 16px; color: #ffffff; font: 400 46px/54px var(--l-display); letter-spacing: .005em; text-wrap: balance; }
    .auth .auth-aside p { max-width: 460px; color: #ccd6ea; font-size: 16px; line-height: 26px; }
    .auth .auth-slogan { display: block; padding-top: 16px; border-top: 1px solid #2a3858; color: #aebde6; font: 600 13px/18px var(--l-ui); letter-spacing: .2em; text-transform: uppercase; }
    .auth .auth-form { padding: 72px 32px 40px; background: var(--bg); }
    .auth .auth-form > div { max-width: 460px; padding: 32px 36px; border: 1px solid var(--line); border-top: 2px solid var(--l-red); border-radius: 4px; background: #ffffff; box-shadow: none; }
    .auth .auth-form h1 { margin: 4px 0 10px; font: 400 32px/40px var(--l-display); letter-spacing: 0; color: var(--ink); }
    .auth .auth-form .muted { font-size: 16px; line-height: 24px; color: var(--muted); }
    .auth .auth-form .field { margin: 16px 0; }
    .auth .auth-form .field input { min-height: 48px; font-size: 16px; }
    .auth .auth-form .button { min-height: 48px; font-size: 16px; justify-content: center; }
    .auth-google-help, .auth .auth-foot, .email-verification-help p { color: var(--muted); font-size: 14px; line-height: 22px; }
    .auth .auth-foot a { color: var(--l-deep); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
    .email-verification-help { border-radius: 4px; }
    .email-verification-help strong { font-size: 15px; color: var(--ink); }

    /* ---------- Stand-alone message card (access limited) and location permission ---------- */
    body > main.card { box-sizing: border-box; padding: 36px 40px !important; border: 1px solid var(--line); border-top: 2px solid var(--l-red); border-radius: 4px; background: #ffffff; box-shadow: none; }
    body > main.card::before { content: ""; display: block; width: 132px; height: 95px; margin: 0 0 20px; background: url(images/globex-logo-transparan.png) left center / contain no-repeat; }
    body > main.card h1 { font: 400 32px/40px var(--l-display); letter-spacing: 0; color: var(--ink); }
    body > main.card .muted { font-size: 16px; line-height: 24px; }
    .location-standalone { background: var(--bg); }
    .location-standalone .location-access-brand img { mix-blend-mode: multiply; }

    /* ---------- Sign-in page ---------- */
    .tms-login-page { background: var(--bg); }
    .tms-login-page .tms-login { display: flex; min-height: 100vh; min-height: 100dvh; max-width: none; margin: 0; padding: 0; gap: 0; align-items: flex-start; }
    /* The brand panel stays one screen tall while the form side scrolls, so the fleet photo is never cropped sideways. */
    .tms-login-page .tms-login-story { flex: 1 1 620px; min-width: 0; min-height: 0; height: 100vh; height: 100dvh; position: sticky; top: 0; align-self: flex-start; display: flex; flex-direction: column; justify-content: flex-start; padding: 0; border: 0; border-radius: 0; background: #16213e; box-shadow: none; }
    .tms-login-page .tms-login-story::before, .tms-login-page .tms-login-story::after { display: none; }
    .tms-login-photo { flex: 0 1 auto; min-height: 0; width: 100%; aspect-ratio: 1600 / 1064; position: relative; overflow: hidden; }
    .tms-login-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; }
    .tms-login-page .tms-login-story-content { flex: 1 0 auto; max-width: none; display: flex; flex-direction: column; justify-content: center; gap: 18px; padding: 36px 48px 44px; border-top: 2px solid var(--l-red); color: #f5f7fc; }
    .tms-login-page .tms-login-story .eyebrow { display: block; margin: 0; color: #aebde6; font-size: 13px; letter-spacing: .2em; }
    .tms-login-page .tms-login-story h2 { margin: 0; font: 400 52px/60px var(--l-display); letter-spacing: .005em; color: #ffffff; text-wrap: balance; max-width: none; }
    .tms-login-page .tms-login-story p { margin: 0; max-width: none; color: #ccd6ea; font-size: 16px; line-height: 26px; }
    .tms-login-services { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 6px 0 0; list-style: none; }
    .tms-login-services li { padding: 7px 14px; border: 1px solid #394a70; color: #e6ecf8; font-size: 15px; line-height: 22px; }
    .tms-login-page .tms-login-side { flex: 1 1 460px; min-width: 0; min-height: 100vh; min-height: 100dvh; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 72px 40px 24px; background: var(--bg); }
    .tms-login-page .tms-login-card { width: 100%; max-width: 440px; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
    .tms-login-page .tms-login-logo { display: block; width: 108px; margin: 0 auto 14px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
    .tms-login-page .tms-login-logo img { mix-blend-mode: normal; }
    .tms-login-rule { display: block; width: 48px; height: 1px; margin: 0 auto 14px; background: var(--l-red); }
    .tms-login-page .tms-login-card h1 { margin: 0 0 8px; font: 400 32px/40px var(--l-display); letter-spacing: 0; text-align: center; color: var(--ink); }
    .tms-login-page .tms-login-card > .muted { margin: 0 0 16px; font-size: 15px; line-height: 22px; text-align: center; text-wrap: balance; }
    .tms-login-page .tms-login-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; margin-bottom: 20px; padding: 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; }
    .tms-login-page .tms-login-tabs a { min-height: 44px; padding: 12px 8px; border-radius: 0; color: var(--muted); font-size: 16px; font-weight: 500; }
    .tms-login-page .tms-login-tabs a[aria-selected="true"] { background: transparent; color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--l-blue); }
    .tms-login-page .tms-login .field { margin: 0 0 16px; }
    .tms-login-page .tms-login .field input { min-height: 48px; padding: 0 16px; border: 1px solid var(--l-control); border-radius: 4px; background: #ffffff; font-size: 16px; }
    .tms-login-page .tms-password-field button { top: 6px; right: 6px; }
    .tms-login-page .tms-login .tms-password-field input { padding-right: 48px; }
    .tms-login-page .tms-login-options { margin: -4px 0 16px; font-size: 15px; }
    .tms-login-page .tms-login-options a, .tms-login-page .tms-login-note a, .tms-login-page .tms-passkey-help summary { color: var(--l-deep); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
    .tms-login-page .tms-login .button { width: 100%; min-height: 52px; justify-content: center; gap: 10px; border-radius: 4px; background: var(--l-deep); border-color: var(--l-deep); font-size: 16px; letter-spacing: .02em; box-shadow: none; }
    .tms-login-page .tms-login .button:hover { background: #2b3d77; border-color: #2b3d77; }
    .tms-login-page .tms-passkey-button, .tms-login-page .auth-google-button { min-height: 48px; border: 1px solid var(--l-control); border-radius: 4px; background: #ffffff; color: var(--ink); font-size: 16px; font-weight: 600; }
    .tms-login-page .tms-passkey-button:hover:not(:disabled), .tms-login-page .auth-google-button:hover:not(:disabled) { background: #f7f9fd; border-color: var(--l-deep); }
    .tms-login-page .tms-passkey-button svg { stroke: var(--l-deep); }
    .tms-login-page .tms-login-help, .tms-login-page .auth-google-help, .tms-login-page .tms-passkey-help { font-size: 14px; line-height: 20px; color: var(--muted); }
    .tms-login-page .auth-login-divider { color: var(--muted); font-size: 15px; }
    .tms-login-page .tms-login-note { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 15px; line-height: 22px; text-align: center; color: var(--muted); }
    .tms-login-page .tms-login-home { font-size: 14px; color: var(--muted); }
    .tms-login-page .tms-login-home:hover { color: var(--l-deep); }
}

/* ---------- Collapsed navigation (desktop) ---------- */
@media screen and (min-width: 901px) {
    .shell .form-grid > .button, .shell .form-grid > button { justify-self: start; min-width: min(200px, 100%); }
    .shell .access-user-editor .form-grid > button { min-width: 0; justify-self: stretch; }
    .shell .access-list-table td { overflow-wrap: anywhere; }
    .workspace-enhanced .shell.sidebar-collapsed { grid-template-columns: 76px minmax(0, 1fr); }
    .shell.sidebar-collapsed .sidebar-brand-row { padding: 16px 0 10px; border-bottom: 0; }
    .shell.sidebar-collapsed .brand .brand-full, .shell.sidebar-collapsed .brand-slogan, .shell.sidebar-collapsed .sidebar-toolbar, .shell.sidebar-collapsed .sidebar-search { display: none; }
    /* Mode ringkas: logo utuh (truk + GLOBEX) diperkecil agar muat di kolom ikon, tidak dipotong. */
    .shell.sidebar-collapsed .brand .brand-short { display: block; width: 60px; height: auto; margin: 0 auto; padding: 0; border: 0; background: none; filter: none; }
    .shell.sidebar-collapsed .brand .brand-short .brand-logo { opacity: 1; width: 60px; height: auto; max-height: none; filter: brightness(1.35) drop-shadow(0 0 0.35px #c9d4ea); }
    .workspace-enhanced .shell.sidebar-collapsed .workspace-navigation { padding: 8px 14px; border-top: 1px solid #2a3858; }
    .shell.sidebar-collapsed .nav-group { margin: 0 0 3px; }
    .shell.sidebar-collapsed .nav-caption, .shell.sidebar-collapsed .tms-nav-single-link { min-height: 44px; padding: 0; gap: 0; justify-content: center; flex-direction: row; color: #b9c5de; }
    .shell.sidebar-collapsed .nav-caption:hover, .shell.sidebar-collapsed .tms-nav-single-link:hover { background: #22304f; color: #ffffff; box-shadow: none; }
    .workspace-enhanced .shell.sidebar-collapsed .nav-group-active > .nav-caption, .workspace-enhanced .shell.sidebar-collapsed .tms-nav-single-link.active,
    .shell.sidebar-collapsed .nav-group-active > .nav-caption, .shell.sidebar-collapsed .tms-nav-single-link.active { background: #22304f; color: #ffffff; box-shadow: inset 3px 0 0 var(--l-red); }
    .shell.sidebar-collapsed .nav-group-active > .nav-caption .group-icon, .shell.sidebar-collapsed .tms-nav-single-link.active .group-icon { color: #ffffff; }
    .shell.sidebar-collapsed .group-icon { width: 20px; height: 20px; flex-basis: 20px; padding: 0; }
    .shell.sidebar-collapsed .nav-caption-short, .shell.sidebar-collapsed .tms-nav-single-link > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
}

/* ---------- Narrow screens ---------- */
@media screen and (max-width: 1250px) {
    .shell:not(.sidebar-collapsed) { grid-template-columns: 248px minmax(0, 1fr); }
    .shell .content { padding: 20px 24px 0; }
    .shell .topbar { padding: 0 24px 0 20px; }
    .shell .sidebar-brand-row { padding: 20px 22px 16px; }
    .shell .sidebar-toolbar { padding-left: 22px; padding-right: 22px; }
}
@media screen and (max-width: 900px) {
    .auth .auth-aside { padding: 20px 24px; border-bottom: 2px solid var(--l-red); }
    .auth .auth-brand, .auth .auth-brand .brand-logo { width: 132px; }
    .auth .auth-form { padding: 24px 16px 32px; }
    .auth .auth-form > div { padding: 24px 20px; }
    body > main.auth-form, body > main.card { margin: 64px 16px 32px !important; padding: 24px 20px 28px !important; }
    body > main.auth-form .button { width: 100%; min-width: 0; }
    /* Phone and tablet: the top bar carries the brand, as in the approved phone layout. */
    .shell .topbar { height: auto; min-height: 64px; padding: 8px 16px; gap: 8px; flex-wrap: nowrap; background: #16213e; border-bottom: 2px solid var(--l-red); }
    .shell .topbar-leading { flex: 0 0 auto; order: 0; }
    .shell .topbar-heading { display: none; }
    .shell .menu-toggle { width: 44px; height: 44px; padding: 0; justify-content: center; border-color: #6f80ad; background: #16213e; color: #ffffff; }
    .shell .menu-toggle:hover { background: #22304f; border-color: #aebde6; color: #ffffff; }
    .shell .menu-toggle .tms-menu-mode { display: none; }
    .topbar-brand { display: block; flex: 1 1 auto; min-width: 0; line-height: 0; }
    .topbar-brand img, .shell .topbar-brand img { width: 122px; max-width: 100%; height: auto; mix-blend-mode: normal; filter: brightness(1.3); }
    .topbar-brand-slogan { display: block; margin-top: 4px; color: #aebde6; font: 500 13px/17px var(--l-ui); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .shell .account { flex: 0 0 auto; order: 0; margin-left: 0; gap: 8px; flex-wrap: nowrap; }
    .shell .account .icon-button { width: 44px; height: 44px; min-width: 44px; min-height: 44px; border-color: #6f80ad; background: #16213e; color: #ffffff; }
    .shell .tms-account-tools > summary { color: #ffffff; }
    .shell .account-avatar, .shell .account-avatar.account-attendance-link { width: 44px; height: 44px; }
    .workspace-enhanced .shell .sidebar { width: 288px; }
    .workspace-enhanced .shell .sidebar-brand-row { padding: 16px 64px 12px 24px; }
    .workspace-enhanced .shell .brand .brand-full { width: 148px; }
    .workspace-enhanced .shell .brand-slogan { margin-top: 8px; }
    .workspace-enhanced .shell .sidebar-close { top: 12px; right: 12px; transform: none; border-color: #6f80ad; background: #16213e; color: #ffffff; }
    .shell .content { padding: 16px 16px 0; }
    .shell .page-intro h1 { font-size: 28px; line-height: 36px; }
    .tms-login-page .tms-login { display: block; max-width: none; padding: 0; }
    .tms-login-page .tms-login-story { display: flex; position: static; height: auto; }
    .tms-login-page .tms-login-photo { flex: none; aspect-ratio: auto; height: 196px; }
    .tms-login-page .tms-login-side { min-height: 0; }
    .tms-login-page .tms-login-photo img { object-position: 30% 60%; }
    .tms-login-page .tms-login-story-content { display: none; }
    .tms-login-page .tms-login-story { border-bottom: 2px solid var(--l-red); }
    .tms-login-page .tms-login-side { padding: 22px 24px 20px; }
    .tms-login-page .tms-login-logo { width: 84px; }
    .tms-login-page .tms-login-card h1 { font-size: 26px; line-height: 32px; }
    .tms-login-page .tms-login-card > .muted { font-size: 15px; line-height: 22px; }
}
@media screen and (max-width: 600px) {
    /* Phone: the language choice moves into the account menu so the brand keeps its place in the top bar. */
    .account > .tms-locale-switch { display: none; }
    .account .tms-locale-switch-menu { display: flex; width: 100%; margin: 0 0 6px; }
    .account .tms-locale-switch-menu button { flex: 1 1 0; min-height: 40px; }
    .shell .tms-account-tools > div { width: 232px; }
    .shell .topbar { padding: 8px 12px; }
    .topbar-brand img, .shell .topbar-brand img { width: 112px; }
    .topbar-brand-slogan { margin-top: 3px; white-space: normal; overflow: visible; text-overflow: clip; line-height: 15px; text-wrap: balance; }
    .shell .account-name { display: none; }
    .shell .card { padding: 16px; }
    .shell .summary-card { padding: 12px 16px; }
    .shell .summary-card .stat { font-size: 28px; line-height: 32px; }
    .shell .summary-card-label { letter-spacing: .04em; text-transform: none; font-size: 14px; }
    .shell .button { min-height: 48px; }
    .shell .table-wrap td, .shell .table-wrap th { padding: 8px 12px; }
}
@media screen and (max-height: 860px) and (min-width: 901px) {
    /* Short laptop screens: keep the whole fleet in view by trimming only sky and ground, and tighten the form. */
    .tms-login-page .tms-login-story-content { flex: 0 0 auto; gap: 12px; padding: 22px 40px 26px; }
    .tms-login-page .tms-login-story h2 { font-size: 40px; line-height: 46px; }
    .tms-login-page .tms-login-side { justify-content: flex-start; padding: 60px 40px 12px; }
    .tms-login-page .tms-login-logo { width: 76px; margin-bottom: 8px; }
    .tms-login-rule { margin-bottom: 8px; }
    .tms-login-page .tms-login-card h1 { font-size: 28px; line-height: 34px; margin-bottom: 2px; }
    .tms-login-page .tms-login-card > .muted { margin-bottom: 12px; font-size: 15px; line-height: 22px; }
    .tms-login-page .tms-login-tabs { margin-bottom: 12px; }
    .tms-login-page .tms-login .field { margin-bottom: 10px; }
    .tms-login-page .tms-login .field input { min-height: 44px; }
    .tms-login-page .tms-login .button { min-height: 48px; }
}

/* ---------- Review of all 177 pages (13 Nov 2026): spacing, field sizes, links, tabs and status colours ---------- */
@media screen {
    /* Spacing inside cards. :where() keeps the weight of the old reset h1,h2,h3,p{margin:0}, so page rules that already set a spacing still win. */
    :where(.shell .card) > h2, :where(.shell .card) > h3 { margin-bottom: 12px; }
    :where(.shell .card) > h2:where(:has(+ p)), :where(.shell .card) > h3:where(:has(+ p)) { margin-bottom: 6px; }
    :where(.shell .card, .shell .card > form:not(.form-grid)) > p:where(:not(:last-child, :empty)) { margin-bottom: 12px; }
    :where(.shell .card, .shell .card > form:not(.form-grid)) > p:where(:not(:empty):has(+ p)) { margin-bottom: 8px; }
    :where(.shell .card > form) + p { margin-top: 12px; }
    :where(.shell .card > form) + :where(.table-wrap) { margin-top: 16px; }
    :where(.shell .content > p.muted) + :where(.card) { margin-top: 12px; }
    /* Whatever follows a field grid (submit button, note, table, another field) keeps the grid's 16px rhythm; the fields inside lost their bottom margin. */
    .shell .form-grid + .button, .shell .form-grid + button, .shell .details-grid + .button, .shell .details-grid + button,
    .shell #dn-rows + .button, .shell #task-rows + .button, .shell .form-grid + .field, .shell .form-grid + .table-wrap, .shell .form-grid + details, .shell .form-grid + fieldset { margin-top: 16px; }
    .shell .form-grid + p, .shell .details-grid + p { margin-top: 12px; }
    .shell form > p + .button, .shell form > p + button { margin-top: 12px; }
    .shell form > .button + .field, .shell form > button + .field, .shell .card > .button + .field { margin-top: 16px; }
    .shell td form + details { margin-top: 8px; }
    .shell #tax-calculator h2 { margin-bottom: 16px; }

    /* Fields: one weight, one height. */
    .shell .content :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=submit]):not([type=button]):not([type=reset]):not([type=file]), select, textarea) { font-weight: 400; }
    .shell .card .form-grid > .field > label:not(.sr-only) > input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]), .shell .card .form-grid > .field > label:not(.sr-only) > select, .shell .card .form-grid > .field > label:not(.sr-only) > textarea { display: block; width: 100%; min-width: 0; margin-top: 6px; }
    .shell .access-list-filters > .field { margin-bottom: 0; }
    .shell .card > form.actions:has(> .field) { margin: 0 0 16px; align-items: flex-end; }
    .shell .card > form.actions:has(> .field) > .field { margin: 0; }
    .shell .filter-bar { padding: 16px 24px; }
    .shell .filter-bar > label:has(> input[type=checkbox]), .shell .filter-bar > label:has(> input[type=radio]) { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--ink); font-size: 15px; font-weight: 600; line-height: 20px; white-space: nowrap; cursor: pointer; }
    .shell .filter-bar > label > input[type=checkbox], .shell .filter-bar > label > input[type=radio] { display: inline-block; flex: 0 0 20px; width: 20px; height: 20px; min-width: 0; min-height: 0; margin: 0; padding: 0; }
    .shell form.card > label:not(.sr-only) > input[type=checkbox], .shell form.card > label:not(.sr-only) > input[type=radio] { width: 20px; height: 20px; min-height: 0; padding: 0; margin: 0 8px 0 0; vertical-align: -4px; }
    .shell form.card > label:has(> input[type=checkbox]), .shell form.card > label:has(> input[type=radio]) { display: block; margin: 4px 0 16px; color: var(--ink); font-size: 15px; font-weight: 400; line-height: 22px; }
    /* Selection checkboxes in tables: one size, one colour. */
    .shell .content th input[type=checkbox], .shell .content td input[type=checkbox], .shell .content td input[type=radio] { width: 18px; height: 18px; accent-color: var(--l-blue); }
    .shell .content th > label { vertical-align: middle; }
    .shell .table-wrap td > select { width: 100%; }
    /* File fields: the button inside follows the secondary button. */
    .shell .content input[type=file]::file-selector-button { margin: 0 12px 0 0; padding: 1px 12px; border: 1px solid var(--l-control); border-radius: 4px; background: #ffffff; color: var(--ink); font: 600 15px/20px var(--l-ui); cursor: pointer; }
    .shell .content input[type=file]::file-selector-button:hover { background: #f7f9fd; border-color: var(--l-deep); }
    .shell .content #mechanic-tasks { margin: 16px 0 0; padding: 16px 20px 20px; border: 1px solid var(--line); border-radius: 4px; min-width: 0; }
    .shell .content #mechanic-tasks > legend { padding: 0 6px; color: var(--ink); font-size: 15px; font-weight: 600; line-height: 20px; }
    .shell .content #task-rows { display: grid; gap: 16px; margin-bottom: 16px; }
    .shell .content .task-row > .remove-task { grid-column: 1 / -1; justify-self: start; }
    .shell .customer-quotation .field label:not(.sr-only) { font-size: 15px; line-height: 20px; color: var(--ink); }

    /* Buttons: disabled is plain grey (not faded), delete stays red, header buttons never fold. */
    .shell .button:disabled, .shell .button[disabled], .button:disabled { opacity: 1; background: #edf0f6; border-color: #c9d4ea; color: #5b6681; cursor: not-allowed; }
    .shell .content .button.regional-delete { background: #ffffff; color: #a82a3c; border-color: var(--l-control); }
    .shell .content .button.regional-delete:hover:not(:disabled) { background: #fbe9ec; border-color: #a82a3c; }
    .shell .content .button.regional-delete:disabled, .shell .content .button.regional-delete:disabled:hover { opacity: 1; background: #edf0f6; border-color: #c9d4ea; color: #5b6681; }
    .shell .page-intro > .button { flex-shrink: 0; white-space: nowrap; }
    .shell .page-intro > .actions > .button { white-space: nowrap; }
    .shell .excel-export svg { stroke: currentColor; }
    .shell .pagination > a, .shell .pagination > div > a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border: 1px solid var(--l-control); border-radius: 4px; background: #ffffff; color: var(--ink); font: 600 15px/1.3 var(--l-ui); text-decoration: none; }
    .shell .pagination > a:hover, .shell .pagination > div > a:hover { background: #f7f9fd; border-color: var(--l-deep); color: var(--ink); }

    /* Links in sentences, hints and breadcrumbs look like links (classed component links keep their own look). */
    .shell .content p a:not([class]), .shell .content small a:not([class]), .shell .content .card > a:not([class]), .shell .content form > a:not([class]), .shell .content nav.muted a:not([class]) { color: var(--l-deep); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
    .shell .content nav[aria-label='Breadcrumb'] a { color: var(--l-deep); text-decoration: underline; text-underline-offset: 2px; }
    .shell .content nav[aria-label='Breadcrumb'] [aria-current] { color: var(--ink); }
    /* Bold text in a table cell is not a link. */
    .shell td strong, .shell td b { font-weight: 600; color: var(--ink); }
    .shell td a strong, .shell td a b { color: inherit; }

    /* Tabs: one line under every row, the open tab marked. */
    .shell .tab-links { gap: 0; padding-bottom: 0; border-bottom: 0; align-items: stretch; }
    .shell .tab-links a { display: inline-flex; align-items: center; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; margin-right: 0; }
    .shell .tab-links a:hover { background: #ffffff; border-bottom-color: var(--l-control); }
    .shell .tab-links::after { content: ""; flex: 1 0 0; border-bottom: 1px solid var(--line); }
    .shell .tab-links a.active, .shell .tab-links a[aria-current="page"] { background: transparent; color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--l-blue); }
    .shell .tms-tabbar:not(:has(.tms-tab.active)) { gap: 8px; border-bottom: 0; }
    .shell .tms-tabbar:not(:has(.tms-tab.active)) .tms-tab { min-height: 40px; padding: 8px 14px; border: 1px solid var(--l-control); border-radius: 4px; background: #ffffff; color: var(--l-deep); font-weight: 600; }
    .shell .tms-tabbar:not(:has(.tms-tab.active)) .tms-tab:hover { border-color: var(--l-deep); background: #f7f9fd; }

    /* Notes and errors: an information note is blue, an error list is red, the duplicated error list is hidden. */
    .shell .alert:not([role]):not(.error) { border-color: #c9d4ea; border-left-color: var(--l-deep); background: #eaf0fb; color: var(--ink); }
    .shell .alert[role="alert"]:not(.error) { border-color: #f0c4cc; border-left-color: #a82a3c; background: #fbe9ec; color: #a82a3c; }
    .shell .content:has(> .validation-summary) .alert[role="alert"]:not(.error) { display: none; }
    /* A field marked wrong by the server: red 2px border and pink ground (the old rule uses !important). */
    .shell .content input[aria-invalid=true]:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]):not([type=range]):not([type=color]):not([type=submit]):not([type=button]):not([type=reset]):not([type=image]), .shell .content select[aria-invalid=true], .shell .content textarea[aria-invalid=true] { border: 2px solid #a82a3c !important; background-color: #fdf3f5; }
    /* The Portal search sits inside its own bordered pill; its input stays bare and the pill shows focus. */
    .shell .content .ruang-search input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]):not([type=range]):not([type=color]):not([type=submit]):not([type=button]):not([type=reset]):not([type=image]) { min-height: 0; padding: 0; border: 0; border-radius: 0; background-color: transparent; box-shadow: none; }
    .shell .content .ruang-search input:focus-visible { outline: none; box-shadow: none; }
    .shell .content .ruang-search:focus-within { border-color: var(--l-blue); outline: 2px solid var(--l-blue); outline-offset: -1px; }
    /* Attendance: the "location matches" box is green, like every success state. */
    .att-location-result.ready { background: #e4f3eb; border-color: #b9dfca; }

    /* Tables: empty row centred, totals readable, wide report tables fit their card. */
    .shell tbody tr:only-child > td[colspan]:only-child { padding: 40px 16px; text-align: center; color: var(--muted); }
    .shell .table-wrap tfoot th, .shell .table-wrap tfoot td, .shell tfoot th, .shell tfoot td { color: var(--ink); font-size: 15px; line-height: 20px; font-weight: 700; letter-spacing: 0; text-transform: none; }
    .shell .card.table-wrap:has(> table > thead > tr > th:nth-child(8)) th, .shell .card.table-wrap:has(> table > thead > tr > th:nth-child(8)) td { padding-left: 10px; padding-right: 10px; }
    .shell .card.table-wrap:has(> table > thead > tr > th:nth-child(8)) th { letter-spacing: .04em; }
    .shell .tms-master-table td > a:not(.button):has(+ a.button) { display: block; width: fit-content; margin-bottom: 8px; }
    .shell .tms-master-table td > a.button { padding-top: 6px; padding-bottom: 6px; text-align: center; }

    /* Pages whose own stylesheet loads after this one and kept 13px text. */
    .shell .employee-directory-card table td strong, .shell .employee-directory-card .employee-view-link, .shell .employee-directory-card td small a { font-size: 15px; }
    .shell .employee-directory-card table small { font-size: 14px; line-height: 18px; }
    .shell .employee-directory-card .card-header p, .shell .employee-directory-caption div > span { font-size: 15px; }
    .shell .employee-directory-intro p { font-size: 15px; line-height: 22px; }
    .shell .onboarding-public-share p { font-size: 15px; line-height: 24px; }
    .shell .onboarding-admin-flow span, .shell .content .onboarding-admin-filter > a { font-size: 15px; }
    .shell .onboarding-admin-flow small { font-size: 14px; line-height: 20px; }
    .shell .master-authorized p { font-size: 15px; }
    dialog.location-access-lock > p, dialog.location-access-lock .location-access-message { font-size: 15px; line-height: 22px; }
    dialog.location-access-lock details, dialog.location-access-lock > small { font-size: 14px; line-height: 20px; }
    dialog.location-access-lock > .button { min-height: 48px; font-size: 16px; }
    .shell .att-page-header p, .shell .att-section-heading p, .shell .att-month-stats span { font-size: 15px; line-height: 22px; }
    .shell .att-month-stats small, .shell .att-punch-times small, .shell .att-fineprint, .shell .att-pill, .shell .att-clock-top { font-size: 14px; }
    .shell .att-locations > summary { font-size: 15px; min-height: 44px; display: flex; align-items: center; gap: 8px; cursor: pointer; }
    .shell .att-history > .att-section-heading { padding: 0 0 16px; }
    .ruang .ruang-room-for, .ruang .ruang-room-rule { font-size: 15px; line-height: 22px; }
    .ruang .ruang-room-count { font-size: 15px; }
    .ruang .ruang-room-count b { font-family: var(--l-ui); font-weight: 600; font-variant-numeric: tabular-nums; }
    .ruang .ruang-room-foot .ruang-mini { min-height: 40px; padding: 0 14px; font-size: 15px; }
    .shell #truck-list { font: 15px/1.5 var(--l-ui); }
    .shell #truck-list .truck-button:not(.truck-close):not(.truck-button-small) { min-height: 44px; padding: 0 18px; font-size: 15px; }
    .shell #truck-list .truck-button-text:not(.truck-close) { color: var(--l-deep); text-decoration: underline; text-underline-offset: 2px; }
    .shell #truck-list .truck-button-small { font-size: 14px; }
    .shell #truck-dialog label:not(.truck-button) { color: var(--ink); font-size: 15px; line-height: 20px; }
    .shell #truck-dialog input:not([type=file]), .shell #truck-dialog select, .shell #truck-dialog textarea, .shell #truck-volume { min-height: 44px; font-size: 16px; }
    .shell #truck-dialog .truck-help, .shell #truck-dialog .truck-legacy { font-size: 14px; }
}
/* Chrome adds 1px above and below the date parts (46px instead of 44px). Kept as its own rule: other browsers drop a list that holds a -webkit- selector. */
@media screen { .shell input::-webkit-datetime-edit-fields-wrapper { padding-top: 0; padding-bottom: 0; } }
@media screen and (min-width: 1001px) {
    .shell .coa-toolbar { grid-template-columns: minmax(0, 2fr) minmax(190px, 1fr) minmax(176px, 1fr) minmax(206px, 1.2fr); }
}
@media screen { .shell .coa-toolbar #coa-search { text-overflow: ellipsis; } }
@media screen and (min-width: 1251px) {
    .shell .tms-master-table:has(td > a.button) td:first-child:not([colspan]) { white-space: nowrap; }
    .shell .tms-master-table td > a.button { white-space: nowrap; }
}
@media screen and (min-width: 601px) and (max-width: 1250px) {
    /* Header: buttons drop below the title when they cannot sit beside it. */
    .shell .page-intro { flex-wrap: wrap; }
    .shell .page-intro > div:first-child { flex: 1 1 auto; }
    .shell .page-intro > div:first-child > p, .shell .page-intro > div:first-child > .muted { contain: inline-size; }
    .shell .page-intro > .actions, .shell .page-intro > .page-intro-actions { margin-top: 0; padding-top: 0; }
    .shell .tms-master-table td:first-child:not([colspan]) { white-space: nowrap; }
}
@media screen and (min-width: 901px) and (max-width: 1440px) {
    /* Wide tables on laptops: less tracking and side padding in headings and cells (text size unchanged). */
    .shell .table-wrap th, .shell .table-wrap td { padding-left: 12px; padding-right: 12px; }
    .shell .table-wrap th { letter-spacing: .04em; }
}
@media screen and (min-width: 901px) and (max-width: 1300px) {
    .shell .table-wrap th, .shell .table-wrap td { padding-left: 10px; padding-right: 10px; }
    .shell .table-wrap th { letter-spacing: .02em; }
}
@media screen and (max-width: 900px) {
    /* Tablet: the language pill sits on the navy top bar. */
    .shell .account > .tms-locale-switch { border-color: #6f80ad; background: #16213e; }
    .shell .account > .tms-locale-switch button { color: #ccd6ea; }
    .shell .account > .tms-locale-switch button.active { background: var(--l-blue); color: #ffffff; }
}

/* ---------- Rapikan 14 November 2026 (perintah pemilik): isi menyesuaikan layar tanpa banyak menggulir,
   tombol baris seragam, lencana status berwarna, kartu dasbor rata, catatan pajak dilipat ---------- */
@media screen {
    /* Konten memakai lebar penuh layar dan jarak vertikal lebih padat. */
    .shell .content { max-width: none; padding: 14px 28px 0; }
    .shell .page-intro { margin-bottom: 12px; padding-bottom: 10px; }
    .shell .page-intro h1 { font-size: 28px; line-height: 34px; }
    .shell .eyebrow, .eyebrow { margin-bottom: 2px; }
    .shell .page-intro .muted { font-size: 14px; line-height: 20px; }
    .shell .page-intro-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
    .shell .workspace-footer { margin-top: 16px; padding: 10px 0 14px; }

    /* Tombol di baris tabel: Ubah dan Hapus sama-sama tombol kecil, berjarak 8px. */
    .shell .regional-row-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
    .shell .regional-row-actions form { margin: 0; }
    .shell .content .button.small, .shell .content button.button.small { min-height: 34px; padding: 5px 12px; font-size: 14px; }
    .shell td a.button { text-decoration: none; }

    /* Kartu angka dasbor: dibagi rata dalam satu baris, label tidak terpotong dua baris. */
    .shell .tms-stat-grid { grid-template-columns: repeat(var(--stat-count, 5), minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
    .shell .tms-stat, .shell .tms-stat:nth-child(n+4) { grid-column: auto; padding: 10px 16px; gap: 2px; }
    .shell .tms-stat-label { font-size: 12px; line-height: 16px; letter-spacing: .06em; min-height: 32px; white-space: normal; overflow-wrap: anywhere; }
    .shell .tms-stat strong { font-size: 28px; line-height: 34px; }
    .shell .tms-panel { margin-bottom: 12px; }
    .shell .tms-panel-head { padding: 10px 18px; }
    .shell .tms-panel-body { padding: 12px 18px; }
    .shell .tms-flow-grid { gap: 12px; }
    .shell .tms-flow-step { padding: 12px 16px; }
    .shell .tms-flow-number { width: 26px; height: 26px; margin-bottom: 6px; }

    /* Catatan pajak panjang dilipat: tiga baris, lalu "Lihat selengkapnya". */
    .shell .tax-notes { margin-top: 2px; font-size: 14px; line-height: 19px; color: var(--muted); }
    .shell .tax-notes summary { cursor: pointer; list-style: none; }
    .shell .tax-notes summary::-webkit-details-marker { display: none; }
    .shell .tax-notes-preview { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
    .shell .tax-notes-more { display: inline-block; margin-top: 2px; color: var(--l-deep); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
    .shell .tax-notes[open] .tax-notes-preview, .shell .tax-notes[open] .tax-notes-more { display: none; }
    .shell .tax-notes p { margin: 0; }
}
@media screen and (max-width: 1250px) {
    .shell .tms-stat-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
}
@media screen and (max-width: 600px) {
    .shell .content { padding: 12px 14px 0; }
    .shell .tms-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Jendela formulir umum (form-dialog.js): Tambah/Ubah pemakai, Buat akun PIC customer/vendor ---------- */
@media screen {
    .form-dialog { width: min(780px, calc(100% - 32px)); max-height: 90dvh; padding: 0; border: 1px solid #dfe4ef; border-radius: 4px; box-shadow: 0 24px 80px #19295540; color: var(--ink); overflow-y: auto; }
    .form-dialog::backdrop { background: #16213ea8; backdrop-filter: blur(5px); }
    .form-dialog-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 24px; border-bottom: 1px solid #dfe4ef; background: #ffffff; }
    .form-dialog-head h2 { margin: 0; font-size: 20px; line-height: 28px; }
    .form-dialog-close { min-width: 36px; min-height: 36px; border: 1px solid #dfe4ef; border-radius: 4px; background: #ffffff; color: var(--ink); font-size: 20px; line-height: 1; cursor: pointer; }
    .form-dialog-close:hover { border-color: var(--l-deep); }
    .form-dialog > form, .form-dialog > .form-dialog-note { padding: 0 24px; }
    .form-dialog > .form-dialog-note { margin: 14px 0 0; }
    .form-dialog > form { padding-top: 16px; }
    .shell .form-dialog .form-grid > .field, .shell .form-dialog .field { margin: 0; }
    .form-dialog-actions { grid-column: 1 / -1; position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 8px; margin: 12px -24px 0; padding: 12px 24px; border-top: 1px solid #dfe4ef; background: #ffffff; }
}
@media screen and (max-width: 600px) {
    .form-dialog { width: 100%; max-width: 100%; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; }
    .form-dialog-head, .form-dialog > form, .form-dialog > .form-dialog-note { padding-left: 16px; padding-right: 16px; }
    .form-dialog-actions { margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px; }
}
@media screen {
    /* Konfirmasi di dalam jendela formulir (tms-record-dialog.js), pengganti kotak konfirmasi bawaan browser. */
    .tms-record-dialog .tms-dialog-confirm { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 10px 24px; border-bottom: 1px solid #e9d3a4; background: #fbf0db; color: #6b4508; }
    .tms-record-dialog .tms-dialog-confirm[hidden] { display: none; }
    .tms-record-dialog .tms-dialog-confirm p { flex: 1 1 260px; margin: 0; font-size: 15px; line-height: 22px; font-weight: 600; }
}

/* ---------- Halaman masuk disamakan dengan kanvas L (14 Nov 2026): satu layar tanpa gulir, sidik jari dan Google berdampingan ---------- */
@media screen {
    .tms-login-page .tms-login-side { justify-content: flex-start; gap: 0; padding: 72px 40px 24px; }
    .tms-login-page .tms-login-card { max-width: 420px; margin-block: auto; }
    .tms-login-page .tms-login-head { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 20px; }
    .tms-login-page .tms-login-head .tms-login-logo { margin: 0 auto 14px; }
    .tms-login-page .tms-login-head .tms-login-rule { margin: 0 auto 14px; }
    .tms-login-page .tms-login-title h1 { margin: 0 0 8px; }
    .tms-login-page .tms-login-title .muted { margin: 0; color: var(--muted); font-size: 16px; line-height: 24px; text-align: center; text-wrap: balance; }
    .tms-login-page .tms-login-label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
    .tms-login-page .tms-login-label-row label { margin: 0; }
    .tms-login-page .tms-login-label-row a { color: var(--l-deep); font-size: 15px; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
    .tms-login-page .tms-login-remember { display: flex; align-items: center; gap: 10px; min-height: 32px; margin: -4px 0 16px; color: #2b3550; font-size: 16px; line-height: 22px; cursor: pointer; }
    .tms-login-page .tms-login-remember input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--l-blue); cursor: pointer; }
    .tms-login-page .tms-login .button .tms-login-arrow { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
    .tms-login-page .auth-login-divider { margin: 20px 0; }
    .tms-login-page .tms-login-alternatives { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .tms-login-page .tms-login-alternatives .tms-passkey-button, .tms-login-page .tms-login-alternatives .auth-google-button { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 48px; margin: 0; padding: 10px 12px; border: 1px solid var(--l-control); border-radius: 4px; background: #ffffff; color: var(--ink); font: 600 16px/1.3 var(--l-ui); text-decoration: none; }
    .tms-login-page .tms-login-alternatives svg { flex: none; width: 18px; height: 18px; }
    .tms-login-page .tms-login-alternatives .tms-passkey-button svg { fill: none; stroke: var(--l-deep); stroke-width: 1.7; }
    .tms-login-page .tms-login-alternatives button.auth-google-button svg { fill: none; stroke: var(--l-deep); stroke-width: 1.7; }
    .tms-login-page .tms-login-alternatives .auth-google-button:disabled, .tms-login-page .tms-login-alternatives .tms-passkey-button:disabled { opacity: .72; cursor: not-allowed; }
    .tms-login-page #passkey-status { margin: 10px 0 0; color: var(--muted); font-size: 15px; line-height: 22px; text-align: center; }
    .tms-login-page #passkey-status:empty { margin: 0; }
    .tms-login-page .tms-login-register { margin: 20px 0 0; color: var(--muted); font-size: 16px; line-height: 24px; text-align: center; }
    .tms-login-page .tms-login-register a { color: var(--l-deep); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
    .tms-login-page .tms-login-foot { margin: 16px 0 0; color: var(--muted); font-size: 15px; line-height: 22px; text-align: center; }
    .tms-login-page .tms-login-alternatives .tms-passkey-button:focus-visible, .tms-login-page .tms-login-alternatives .auth-google-button:focus-visible { outline: 2px solid var(--l-blue); outline-offset: 2px; }
    .tms-login-page .tms-login-alternatives .auth-google-button[aria-disabled="true"] { opacity: .72; cursor: not-allowed; }
}
@media screen and (max-height: 860px) and (min-width: 901px) {
    /* Laptop pendek (kanvas L-Masuk-Laptop 1366×657): logo dan sapaan sebaris, jarak antarbagian 12px. */
    .tms-login-page .tms-login-side { padding: 60px 40px 12px; }
    .tms-login-page .tms-login-card { max-width: 440px; }
    .tms-login-page .tms-login-head { flex-direction: row; align-items: center; gap: 16px; margin-bottom: 12px; text-align: left; }
    .tms-login-page .tms-login-head .tms-login-logo { flex: none; width: 76px; margin: 0; }
    .tms-login-page .tms-login-head .tms-login-rule { flex: none; width: 1px; height: 48px; margin: 0; }
    .tms-login-page .tms-login-title { min-width: 0; }
    .tms-login-page .tms-login-title h1 { margin: 0 0 2px; font-size: 28px; line-height: 34px; text-align: left; }
    .tms-login-page .tms-login-title .muted { font-size: 15px; line-height: 22px; text-align: left; }
    .tms-login-page .tms-login-remember { margin: -2px 0 10px; min-height: 28px; }
    .tms-login-page .auth-login-divider { margin: 12px 0; }
    .tms-login-page .tms-login-alternatives .tms-passkey-button, .tms-login-page .tms-login-alternatives .auth-google-button { min-height: 44px; }
    .tms-login-page .tms-login-register { margin-top: 12px; }
    .tms-login-page .tms-login-foot { margin-top: 8px; }
}
@media screen and (max-width: 900px) {
    .tms-login-page .tms-login-side { padding: 22px 24px 20px; }
    .tms-login-page .tms-login-head .tms-login-logo { width: 84px; }
    .tms-login-page .tms-login-title .muted { font-size: 15px; line-height: 22px; }
    .tms-login-page .tms-login-remember { min-height: 44px; }
    .tms-login-page .tms-login-remember input { width: 22px; height: 22px; }
    .tms-login-page .tms-login-label-row a { display: inline-flex; align-items: center; min-height: 44px; margin: -12px 0; }
}
@media screen and (max-width: 320px) {
    .tms-login-page .tms-login-alternatives { grid-template-columns: 1fr; }
}

/* ---------- Halaman masuk di HP muat satu layar tanpa gulir (15 Nov 2026) ---------- */
@media screen and (max-width: 900px) {
    /* Foto armada mengambil sisa tinggi layar: paling kecil 72px, paling besar 196px. */
    .tms-login-page .tms-login-photo { height: clamp(72px, calc(100vh - 592px), 196px); height: clamp(72px, calc(100dvh - 592px), 196px); }
    .tms-login-page .tms-login-side { padding: 12px 20px 10px; }
    .tms-login-page .tms-login-card { margin-block: 0; }
    .tms-login-page .tms-login-head { flex-direction: row; align-items: center; gap: 12px; margin-bottom: 10px; text-align: left; }
    .tms-login-page .tms-login-head .tms-login-logo { flex: none; width: 56px; margin: 0; }
    .tms-login-page .tms-login-head .tms-login-rule { flex: none; width: 1px; height: 44px; margin: 0; }
    .tms-login-page .tms-login-title { min-width: 0; }
    .tms-login-page .tms-login-title h1 { margin: 0 0 2px; font-size: 23px; line-height: 28px; text-align: left; }
    .tms-login-page .tms-login-title .muted { font-size: 15px; line-height: 20px; text-align: left; text-wrap: pretty; }
    .tms-login-page .tms-login-tabs { margin-bottom: 10px; }
    .tms-login-page .tms-login-tabs a { min-height: 44px; padding: 10px 8px; }
    .tms-login-page .tms-login .field { margin-bottom: 6px; }
    .tms-login-page .tms-login .field label { margin-bottom: 4px; }
    .tms-login-page .tms-login .field input { min-height: 44px; }
    .tms-login-page .tms-login-label-row { margin-bottom: 4px; }
    .tms-login-page .tms-login-remember { min-height: 44px; margin: 0 0 4px; }
    .tms-login-page .tms-login .button { min-height: 48px; }
    .tms-login-page .auth-login-divider { margin: 8px 0; }
    .tms-login-page .tms-login-alternatives { gap: 10px; }
    .tms-login-page .tms-login-alternatives .tms-passkey-button, .tms-login-page .tms-login-alternatives .auth-google-button { min-height: 44px; padding: 8px 10px; }
    .tms-login-page #passkey-status:not(:empty) { margin-top: 6px; }
    .tms-login-page .tms-login-register { margin-top: 8px; font-size: 15px; line-height: 22px; }
    .tms-login-page .tms-login-register a { display: inline-flex; align-items: center; min-height: 44px; margin-block: -11px; }
    .tms-login-page .tms-login-foot { margin-top: 6px; font-size: 14px; line-height: 20px; }
}
@media screen and (max-width: 480px) {
    .tms-login-page .tms-login-foot-host { display: none; }
}
@media screen and (max-width: 380px) {
    /* HP sempit (360px): judul, baris daftar, dan kaki tetap satu baris. */
    .tms-login-page .tms-login-title h1 { font-size: 20px; line-height: 26px; white-space: nowrap; }
    .tms-login-page .tms-login-register { font-size: 14px; line-height: 20px; }
    .tms-login-page .tms-login-side { padding-inline: 16px; }
}

/* ---------- Menu navigasi tanpa gulir di layar lebar (15 Nov 2026, mengikuti kanvas L-EN-RuangKerja) ----------
   workspace.js memberi kelas .nav-flyout pada sidebar di layar >900px saat tidak mencari menu:
   sidebar hanya berisi menu induk; isi grup tampil di panel samping, Master Data dalam beberapa kolom. */
@media screen and (min-width: 901px) {
    /* Sidebar sticky membuat konteks tumpukan sendiri; naikkan agar panel samping di atas isi halaman (dialog tetap di lapisan atas browser). */
    .shell .sidebar.nav-flyout { z-index: 50; }
    .shell .sidebar.nav-flyout .sidebar-toolbar { display: none; }
    .shell .sidebar.nav-flyout .sidebar-search { margin-top: 4px; }
    .shell .sidebar.nav-flyout .workspace-navigation { padding-top: 8px; padding-bottom: 8px; }
    .shell .sidebar.nav-flyout .nav-group { margin: 0 0 2px; }
    .shell .sidebar.nav-flyout .nav-caption, .shell .sidebar.nav-flyout .tms-nav-single-link { min-height: 40px; }
    .shell .sidebar.nav-flyout .nav-caption .group-chevron { transform: rotate(-90deg); }
    .shell .sidebar.nav-flyout .nav-group[open] > .nav-caption { background: #22304f; color: #ffffff; }
    .shell .sidebar.nav-flyout .nav-group-active > .nav-caption, .shell .sidebar.nav-flyout .tms-nav-single-link.active { background: #22304f; color: #ffffff; font-weight: 600; box-shadow: inset 3px 0 0 var(--l-red); }
    .shell .sidebar.nav-flyout .nav-group[open] > .nav-group-items {
        display: grid; align-content: start;
        position: fixed; top: 0; bottom: 0; left: var(--nav-flyout-left, 264px); z-index: 60;
        box-sizing: border-box; width: 300px; max-width: calc(100vw - var(--nav-flyout-left, 264px) - 16px);
        margin: 0; padding: 24px 20px; overflow-y: auto; overscroll-behavior: contain;
        border-left: 1px solid #2a3858; background: #16213e; box-shadow: 16px 0 36px rgba(8, 14, 30, .35);
    }
    .shell .sidebar.nav-flyout .nav-group[open] > .nav-group-items::before { content: attr(data-flyout-title); display: block; margin: 0 12px 14px; color: #ffffff; font: 400 26px/32px var(--l-display); }
    .shell .sidebar.nav-flyout .nav-group-items .nav-link { min-height: 36px; margin: 0; padding: 7px 12px; }
    .shell .sidebar.nav-flyout .nav-group-items a:focus-visible, .shell .sidebar.nav-flyout .nav-caption:focus-visible, .shell .sidebar.nav-flyout .tms-nav-single-link:focus-visible { outline: 2px solid #aebde6; outline-offset: 1px; }
    /* Master Data: panel lebar; kolom diatur pembungkus dalam sehingga panel bisa digulir ke bawah bila layar terlalu pendek, tidak pernah ke samping. */
    .shell .sidebar.nav-flyout .nav-group[open] > .nav-group-items[data-flyout-wide] { display: block; width: min(1180px, calc(100vw - var(--nav-flyout-left, 264px) - 16px)); }
    .shell .sidebar.nav-flyout .nav-group-columns { columns: 180px; column-gap: 16px; }
    .shell .sidebar.nav-flyout .nav-group-columns .nav-link { min-height: 32px; padding: 5px 12px; line-height: 20px; break-inside: avoid; }
    .shell .sidebar.nav-flyout .nav-section { break-inside: auto; margin: 0 0 10px; }
    .shell .sidebar.nav-flyout .nav-section-caption { break-after: avoid; min-height: 0; padding: 8px 12px 4px; color: #aebde6; font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; cursor: default; }
    .shell .sidebar.nav-flyout .nav-section-caption:hover { background: transparent; color: #aebde6; }
    .shell .sidebar.nav-flyout .nav-section-caption .section-chevron { display: none; }
    .shell .sidebar.nav-flyout .nav-section-items { margin: 0; padding: 0; border: 0; }
    .shell .sidebar.nav-flyout .nav-section-active > .nav-section-caption { color: #ffffff; }
}
@media screen and (min-width: 901px) and (max-height: 900px) {
    /* Layar pendek: logo diperkecil dan slogan/kaki disembunyikan agar 13 menu induk muat. */
    .shell .sidebar.nav-flyout .sidebar-brand-row { padding: 14px 20px 10px; }
    .shell .sidebar.nav-flyout .brand .brand-full { width: 120px; }
    .shell .sidebar.nav-flyout .sidebar-footer { display: none; }
    /* Slogan tetap tampil (permintaan pemilik), satu baris agar menu tetap muat. */
    .shell .sidebar.nav-flyout .brand-slogan { margin-top: 8px; font-size: 13px; line-height: 18px; letter-spacing: .06em; white-space: nowrap; }
    .shell .sidebar.nav-flyout .nav-caption, .shell .sidebar.nav-flyout .tms-nav-single-link { min-height: 35px; }
    .shell .sidebar.nav-flyout .nav-group { margin-bottom: 1px; }
}
@media screen and (min-width: 901px) and (max-height: 660px) {
    .shell .sidebar.nav-flyout .brand .brand-full { width: 84px; }
    .shell .sidebar.nav-flyout .nav-caption, .shell .sidebar.nav-flyout .tms-nav-single-link { min-height: 34px; }
}
@media screen and (min-width: 901px) {
    /* Mode ringkas: logo utuh di tengah kolom ikon (aturan layar pendek di atas tidak berlaku untuk kolom ikon). */
    .shell.sidebar-collapsed .sidebar .sidebar-brand-row, .shell.sidebar-collapsed .sidebar.nav-flyout .sidebar-brand-row { display: flex; justify-content: center; padding: 14px 0 10px; }
    .shell.sidebar-collapsed .brand { display: flex; justify-content: center; width: 100%; }
    .shell.sidebar-collapsed .brand .brand-short { margin: 0; }
}

/* ---------- Pemeriksaan tampilan menyeluruh (15 Nov 2026) ---------- */
@media screen {
    /* Logo dan slogan di tengah sidebar (permintaan pemilik). */
    .shell:not(.sidebar-collapsed) .sidebar-brand-row { text-align: center; }
    .shell:not(.sidebar-collapsed) .brand { display: flex; flex-direction: column; align-items: center; }
    .shell:not(.sidebar-collapsed) .brand .brand-full { margin-inline: auto; }
    .shell:not(.sidebar-collapsed) .brand-slogan { text-align: center; }
    /* Label kartu ringkasan dasbor minimal 13px agar terbaca. */
    .shell .tms-stat-label { font-size: 13px; line-height: 17px; }
    /* Tombol di tabel tidak terpotong menjadi dua baris; kolom tindakan sebaris dan rapi. */
    .shell .table-wrap .button { white-space: nowrap; }
    .shell .table-wrap td.table-actions { white-space: nowrap; }
    .shell .table-wrap td.table-actions > .button + .button { margin-left: 6px; }
    /* Tabel yang langsung diikuti teks diberi jarak. */
    .shell .table-wrap + p, .shell .table-wrap + .muted { margin-top: 8px; }
    /* Di dalam jendela rincian, tanda situs uji tidak menutupi isi (sudah tampil di halaman utama). */
    .tms-in-dialog .tms-test-site-tab, .tms-in-dialog .tms-test-site-stripe, .tms-in-dialog .tms-test-site-note { display: none !important; }
}
@media screen and (max-width: 900px) {
    /* Laci menu HP: logo dan slogan tepat di tengah, apa pun keadaan ringkas yang tersimpan dari layar lebar. */
    .workspace-enhanced .shell .sidebar-brand-row, .shell .sidebar-brand-row { padding-left: 64px; padding-right: 64px; text-align: center; }
    .shell .brand { display: flex; flex-direction: column; align-items: center; }
    .shell .brand .brand-full { margin-inline: auto; }
    .shell .brand-slogan { text-align: center; }
}
@media screen {
    .form-dialog > .alert { margin: 14px 24px 0; }
}
@media screen and (max-width: 600px) {
    .form-dialog > .alert { margin: 12px 16px 0; }
}
@media screen and (min-width: 901px) {
    /* Slogan satu baris dengan jarak aman ke tepi sidebar. */
    .shell .sidebar.nav-flyout .brand-slogan { letter-spacing: .03em; }
    /* Situs uji: tanda UJI di pojok kiri atas tidak menutupi logo kolom ikon. */
    .tms-test-site-tab ~ .shell.sidebar-collapsed .sidebar-brand-row { padding-top: 28px; }
}
@media screen and (min-width: 901px) and (max-height: 680px) {
    /* Layar sangat pendek (mis. 1536x639): 13 menu induk tetap muat tanpa gulir. */
    .shell .sidebar.nav-flyout .sidebar-brand-row { padding: 10px 12px 8px; }
    .shell .sidebar.nav-flyout .brand-slogan { margin-top: 4px; }
    .shell .sidebar.nav-flyout .sidebar-search { margin-bottom: 8px; }
    .shell .sidebar.nav-flyout .workspace-navigation { padding-top: 4px; padding-bottom: 4px; }
    .shell .sidebar.nav-flyout .nav-caption, .shell .sidebar.nav-flyout .tms-nav-single-link { min-height: 33px; }
}
@media screen {
    /* Halaman dengan jejak halaman (Master Data › Partner › Customer) tidak perlu label kecil yang sama di atas judul. */
    .shell .content > nav[aria-label] + .page-intro > div > .eyebrow { display: none; }
}
@media screen and (max-width: 600px) {
    /* Sasaran sentuh HP minimal 44px: tutup jendela formulir dan pilihan bahasa. */
    .form-dialog-close { min-width: 44px; min-height: 44px; }
    .tms-guest-locale button, .account .tms-locale-switch button { min-height: 44px; }
}
@media screen and (max-width: 340px) {
    /* HP sangat sempit (320px): judul boleh dua baris agar tidak keluar kotak. */
    .tms-login-page .tms-login-title h1 { white-space: normal; font-size: 19px; line-height: 24px; }
    .tms-login-page .tms-login-head .tms-login-logo { width: 44px; }
}

/* ---------- Halaman masuk di layar tinggi dan layar tegak (15 Nov 2026) ----------
   Layar mendatar: foto mengisi seluruh sisa tinggi kolom kiri, tidak ada pita biru kosong.
   Layar tegak yang lebar (tablet, HP mode desktop): susunan atas-bawah —
   foto lebar di atas, pita slogan, lalu formulir di tengah sisa layar. */
@media screen and (min-width: 901px) {
    .tms-login-page .tms-login-photo { flex: 1 1 auto; aspect-ratio: auto; min-height: 240px; }
    .tms-login-page .tms-login-story-content { flex: 0 0 auto; }
}
@media screen and (min-width: 601px) and (orientation: portrait) and (min-height: 900px) {
    .tms-login-page .tms-login { display: flex; flex-direction: column; align-items: stretch; min-height: 100vh; min-height: 100dvh; }
    .tms-login-page .tms-login-story { flex: 0 0 auto; position: static; height: auto; align-self: stretch; border-bottom: 0; }
    .tms-login-page .tms-login-photo { flex: none; aspect-ratio: auto; min-height: 0; height: clamp(200px, calc(100vh - 1060px), 36vh); height: clamp(200px, calc(100dvh - 1060px), 36vh); }
    .tms-login-page .tms-login-photo img { object-position: 50% 62%; }
    .tms-login-page .tms-login-story-content { display: flex; flex: 0 0 auto; gap: 12px; padding: 28px 48px 32px; border-top: 2px solid var(--l-red); border-bottom: 0; }
    .tms-login-page .tms-login-story h2 { font-size: 44px; line-height: 52px; }
    .tms-login-page .tms-login-side { flex: 1 0 auto; min-height: 0; justify-content: center; padding: 40px 40px 24px; }
    .tms-login-page .tms-login-card { margin-block: auto; max-width: 440px; }
    .tms-login-page .tms-login-head { flex-direction: column; align-items: center; gap: 0; margin-bottom: 20px; text-align: center; }
    .tms-login-page .tms-login-head .tms-login-logo { width: 96px; margin: 0 auto 12px; }
    .tms-login-page .tms-login-head .tms-login-rule { width: 48px; height: 1px; margin: 0 auto 12px; }
    .tms-login-page .tms-login-title h1 { margin: 0 0 6px; font-size: 32px; line-height: 40px; text-align: center; white-space: normal; }
    .tms-login-page .tms-login-title .muted { font-size: 16px; line-height: 24px; text-align: center; }
    .tms-login-page .tms-login-foot { margin-top: 16px; }
}
@media screen and (min-width: 601px) and (max-width: 900px) and (orientation: portrait) and (min-height: 900px) {
    .tms-login-page .tms-login-story-content { padding: 22px 32px 26px; }
    .tms-login-page .tms-login-story h2 { font-size: 34px; line-height: 42px; }
    .tms-login-page .tms-login-story p { font-size: 15px; line-height: 24px; }
    .tms-login-page .tms-login-photo { height: clamp(120px, calc(100vh - 880px), 36vh); height: clamp(120px, calc(100dvh - 880px), 36vh); }
    .tms-login-page .tms-login-services { display: none; }
    .tms-login-page .tms-login-side { padding: 28px 32px 20px; }
}

/* Bilah atas HP: logo GlobeX (truk + GLOBEX) tanpa slogan, permintaan pemilik 15 Nov 2026. */
@media screen and (max-width: 900px) {
    .topbar-brand, .shell .topbar-brand { display: flex; align-items: center; flex: 1 1 auto; min-width: 0; line-height: 0; }
    .topbar-brand img, .shell .topbar-brand img { width: 92px; max-width: 100%; height: auto; filter: brightness(1.3); }
    .topbar-brand-slogan { display: none; }
}
@media screen and (max-width: 360px) {
    .topbar-brand img, .shell .topbar-brand img { width: 80px; }
}

/* Bilah navigasi Android/iPhone: halaman digambar sampai tepi bawah (viewport-fit=cover),
   lalu area bilah sistem diberi warna navigasi #16213e, bukan warna bawaan HP (pemilik 15 Nov 2026). */
@media screen {
    html::after { content: ""; position: fixed; left: 0; right: 0; bottom: 0; height: var(--gx-safe-bottom); background: #16213e; z-index: 2147482000; pointer-events: none; }
    body:has(.shell) { padding-bottom: var(--gx-safe-bottom); }
    body { padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
}
@media print { html::after { display: none; } }

/* Halaman masuk di HP: tidak bisa digeser-geser (permintaan pemilik 15 Nov 2026).
   Dokumen dikunci setinggi layar yang terlihat; foto mengisi sisa tinggi sehingga tidak ada ruang kosong.
   Bila layar terlalu pendek (atau papan ketik terbuka), hanya isi halaman yang bisa digulir. */
@media screen and (max-width: 900px) {
    html:has(> body.tms-login-page), body.tms-login-page { height: 100%; overflow: hidden; overscroll-behavior: none; }
    .tms-login-page .tms-login { height: 100vh; height: 100dvh; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
}
@media screen and (max-width: 600px) {
    .tms-login-page .tms-login { display: flex; flex-direction: column; align-items: stretch; }
    /* Lebar penuh: aturan layar lebar memberi align-self:flex-start, yang di kolom membuat lebar foto 0. */
    .tms-login-page .tms-login-story { flex: 1 1 auto; align-self: stretch; width: 100%; min-height: 72px; max-height: 40vh; max-height: 40dvh; }
    .tms-login-page .tms-login-photo { flex: 1 1 auto; height: auto; min-height: 0; }
    .tms-login-page .tms-login-side { flex: 0 0 auto; }
}

/* Logo navigasi lengkap = ukuran logo bilah atas HP (92px, truk + GLOBEX), permintaan pemilik 15 Nov 2026.
   Ruang yang terbebas dipakai menu: baris lebih lega, tetap muat tanpa gulir. */
@media screen {
    .shell .brand .brand-full, .shell .sidebar.nav-flyout .brand .brand-full, .workspace-enhanced .shell .brand .brand-full { width: 92px; }
    .shell:not(.sidebar-collapsed) .sidebar-brand-row, .shell:not(.sidebar-collapsed) .sidebar.nav-flyout .sidebar-brand-row { padding: 18px 20px 14px; }
}
@media screen and (min-width: 901px) {
    .shell .sidebar.nav-flyout .nav-caption, .shell .sidebar.nav-flyout .tms-nav-single-link { min-height: 44px; }
    .shell .sidebar.nav-flyout .nav-group { margin-bottom: 2px; }
}
@media screen and (min-width: 901px) and (max-height: 900px) {
    .shell .sidebar.nav-flyout .nav-caption, .shell .sidebar.nav-flyout .tms-nav-single-link { min-height: 40px; }
    .shell .sidebar.nav-flyout .nav-group { margin-bottom: 1px; }
}
@media screen and (min-width: 901px) and (max-height: 760px) {
    .shell:not(.sidebar-collapsed) .sidebar.nav-flyout .sidebar-brand-row { padding: 12px 20px 10px; }
    .shell .sidebar.nav-flyout .nav-caption, .shell .sidebar.nav-flyout .tms-nav-single-link { min-height: 37px; }
}
@media screen and (min-width: 901px) and (max-height: 660px) {
    .shell .sidebar.nav-flyout .nav-caption, .shell .sidebar.nav-flyout .tms-nav-single-link { min-height: 34px; }
}
@media screen and (max-width: 900px) {
    .workspace-enhanced .shell .sidebar-brand-row, .shell .sidebar-brand-row { padding-top: 16px; padding-bottom: 12px; }
}

/* Kartu ringkasan: angka selalu sejajar di bawah walau label turun ke beberapa baris (terutama versi EN). Label minimal 13px. */
@media screen {
    .shell .tms-stat { grid-template-rows: 1fr auto; }
    .shell .tms-stat-label { align-self: start; min-height: 0; font-size: 13px; line-height: 17px; }
    .shell .tms-stat strong { align-self: end; }
}

/* Kotak pencarian di dalam kartu: satu lapis saja (tidak bergaris ganda), garis pemisah di bawahnya; kolom isian lebih lebar di HP. */
@media screen {
    .shell .card > .filter-bar:first-child, .shell .card > form.filter-bar { margin: 0 0 16px; padding: 0 0 16px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; }
}
@media screen and (max-width: 600px) {
    .shell .page-intro { row-gap: 14px; }
}

/* HP: tombol aksi di kepala halaman tersusun rapi dalam kisi (lebar sama), bukan berjajar acak satu per baris. */
@media screen and (max-width: 600px) {
    .shell .page-intro > .actions, .shell .page-intro > .page-intro-actions {
        display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; width: 100%; margin: 0;
    }
    .shell .page-intro > .actions > .button, .shell .page-intro > .page-intro-actions > .button,
    .shell .page-intro > .actions > form > .button, .shell .page-intro > .page-intro-actions > form > .button,
    .shell .page-intro > .button {
        width: 100%; min-height: 44px; justify-content: center; text-align: center; white-space: normal; line-height: 1.25; padding: 8px 12px;
    }
    .shell .page-intro > .actions > form, .shell .page-intro > .page-intro-actions > form { margin: 0; }
}
@media screen and (max-width: 600px) {
    .shell .page-intro > .actions > :last-child:nth-child(odd), .shell .page-intro > .page-intro-actions > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* HP: baris tab tetap satu baris dan bisa digeser ke samping (tidak turun 2-4 baris dengan garis bawah berantakan). */
@media screen and (max-width: 600px) {
    .shell .tms-tabbar, .shell .tab-links, .shell .cq-tabs, .shell .portal-tabs {
        display: flex; flex-wrap: nowrap; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; gap: 4px; max-width: 100%;
    }
    .shell .tms-tabbar::-webkit-scrollbar, .shell .tab-links::-webkit-scrollbar, .shell .cq-tabs::-webkit-scrollbar, .shell .portal-tabs::-webkit-scrollbar { display: none; }
    .shell .tms-tabbar > *, .shell .tab-links > *, .shell .cq-tabs > *, .shell .portal-tabs > * { flex: none; white-space: nowrap; }
}
/* Tabel kosong di layar sempit: pesan "belum ada data" menempel di layar yang terlihat, tidak terpotong di tengah tabel yang lebar. */
@media screen and (max-width: 900px) {
    .shell .table-wrap td[colspan] > .empty-state { position: sticky; left: 0; box-sizing: border-box; width: min(100%, calc(100vw - 72px)); }
    .shell .table-wrap td[colspan]:not(:has(> *)) { text-align: left !important; padding-left: 16px; }
}

/* Master data: petak grup tetap satu baris (ikon, nama, jumlah, panah); nama boleh dua baris, jumlah tidak turun sendirian. */
@media screen {
    .shell .master-category > summary { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; }
    .shell .master-category > summary > span:not(.master-category-count):not(.section-chevron) { flex: 1 1 auto; min-width: 0; }
    .shell .master-category > summary > .master-category-count, .shell .master-category > summary > .section-chevron { flex: none; }
}
@media screen and (max-width: 600px) {
    .shell .master-catalogue { grid-template-columns: minmax(0, 1fr); }
}
@media screen and (max-width: 600px) {
    .shell .master-category > summary { min-height: 48px; padding-top: 10px; padding-bottom: 10px; }
}
@media screen and (max-width: 600px) {
    .att-page .att-header-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; width: 100%; }
    .att-page .att-header-links > .button { width: 100%; min-height: 44px; justify-content: center; text-align: center; white-space: normal; line-height: 1.25; padding: 8px 12px; }
    .att-page .att-header-links > .button:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* Aplikasi terpasang (PWA) dan HP tanpa tombol fisik: halaman digambar sampai tepi bawah, jadi tinggi
   halaman masuk dikurangi area bilah navigasi sistem agar tidak ada bagian yang tertutup bilah biru. */
:root { --gx-safe-bottom: env(safe-area-inset-bottom, 0px); }
@media screen and (max-width: 900px) {
    /* Tinggi dari area halaman sebenarnya (html/body 100%), bukan 100dvh: di aplikasi terpasang (PWA) Chrome bisa
       menghitung 100dvh termasuk bilah status sehingga baris terakhir terpotong. */
    .tms-login-page .tms-login { height: calc(100% - var(--gx-safe-bottom)); }
}
@media screen and (min-width: 901px) {
    body.tms-login-page { padding-bottom: var(--gx-safe-bottom); }
    .tms-login-page .tms-login { min-height: calc(100vh - var(--gx-safe-bottom)); min-height: calc(100dvh - var(--gx-safe-bottom)); }
}

/* Aplikasi terpasang (PWA): halaman juga digambar di bawah bilah status HP. Isi digeser ke bawah sebesar
   env(safe-area-inset-top) dan area bilah status diberi warna navigasi, sehingga tanda UJI, pilihan bahasa,
   bilah atas, dan foto tidak tertutup. Di browser biasa nilainya 0 sehingga tidak ada yang berubah. */
:root { --gx-safe-top: env(safe-area-inset-top, 0px); }
@media screen {
    html::before { content: ""; position: fixed; top: 0; left: 0; right: 0; height: var(--gx-safe-top); background: #16213e; z-index: 2147482000; pointer-events: none; }
    body:has(.shell) { padding-top: var(--gx-safe-top); }
    .shell .topbar { top: var(--gx-safe-top); }
    html body .tms-test-site-stripe, html body .tms-test-site-tab { top: var(--gx-safe-top); }
    html body .tms-guest-locale { top: calc(14px + var(--gx-safe-top)); }
}
@media screen and (max-width: 900px) {
    body.tms-login-page { box-sizing: border-box; padding-top: var(--gx-safe-top); }
    .workspace-enhanced .shell .sidebar { padding-top: var(--gx-safe-top); }
}
/* Foto armada (rasio 1,5:1) tidak pernah lebih tinggi dari lebarnya / 1,5, sehingga truk paling kiri dan
   paling kanan selalu terlihat utuh; yang terpangkas hanya langit/lantai bila kotak lebih pendek. */
@media screen and (max-width: 600px) {
    .tms-login-page .tms-login-story { max-height: min(40vh, 66vw); max-height: min(40dvh, 66vw); }
    .tms-login-page .tms-login-photo img { object-position: 50% 62%; }
}
