
/* AVAJANG / FIVE-COLOR DESIGN SYSTEM — 2026
   1 Brand #007470 | 2 Navy #121F2E | 3 Warm highlight #FFB547
   4 Primary text #EAF5F4 | 5 Secondary text #A4BDCA
   Other tokens below are tonal/functional variations of the main palette.
*/
:root {
  --ava-primary: #007470;
  --ava-secondary: #121F2E;
  --ava-accent: #FFB547;
  --ava-text: #EAF5F4;
  --ava-muted: #A4BDCA;
  --ava-bg: #0B1621;
  --ava-deep: #0D1D2B;
  --ava-surface: #172A3A;
  --ava-surface-hover: #1C3445;
  --ava-border: #3E596A;
  --ava-teal-hover: #0B8982;
  --ava-amber-hover: #FFCA73;
  --ava-focus: #FFB547;
  --ava-glow: rgba(255,181,71,.14);
  --ava-brand-glow: rgba(0,116,112,.28);
}

@font-face {
    font-family: 'YBakh';
    src: url('/Fonts/YekanBakh.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --brand: var(--ava-primary);
    --brand-dark: #005C59;
    --brand-soft: rgba(0,116,112,.19);
    --bg: var(--ava-bg);
    --surface: var(--ava-surface);
    --surface-soft: var(--ava-secondary);
    --ink: var(--ava-text);
    --muted: var(--ava-muted);
    --line: var(--ava-border);
    --line-strong: #557286;
    --success: #237a56;
    --success-bg: #ebf8f1;
    --danger: #b74747;
    --danger-bg: #fff1f1;
    --warning: #916b1a;
    --warning-bg: #fff8e8;
    --info: #2c6d89;
    --info-bg: #eef7fb;
    --shadow-sm: 0 4px 14px rgba(24,54,54,.045);
    --shadow-md: 0 12px 34px rgba(22,57,56,.075);
    --shadow-lg: 0 20px 54px rgba(20,55,53,.11);
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --sidebar: 260px;
}

* {
    box-sizing: border-box
}

html {
    scroll-behavior: smooth
}

html, body {
    min-height: 100%;
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: 'YBakh',Tahoma,Arial,sans-serif;
    font-size: 15px;
    line-height: 1.75;
}

body {
    overflow-x: hidden
}

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

button, input, select, textarea {
    font: inherit
}

img {
    max-width: 100%;
    display: block
}

.hidden {
    display: none !important
}

.mono {
    direction: ltr;
    text-align: left;
    font-family: Consolas,'Courier New',monospace;
    font-variant-numeric: tabular-nums
}

.subtle {
    font-size: 10px;
    color: var(--muted)
}

/* ===== Layout ===== */
.app-shell {
    min-height: 100vh
}

.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: var(--sidebar);
    padding: 18px 14px;
    background: rgba(255,255,255,.98);
    border-left: 1px solid var(--line);
    box-shadow: -10px 0 30px rgba(20,55,53,.03);
    display: flex;
    flex-direction: column;
    z-index: 60;
}

.side-brand {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 4px 8px 21px;
    margin-bottom: 14px;
    border-bottom: 1px solid #eef3f2;
}

.logo-slot {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    background: linear-gradient(145deg,var(--brand),var(--brand-dark));
    color: #fff;
    display: grid;
    place-items: center;
    box-shadow: 0 7px 18px rgba(0,116,112,.18);
}

    .logo-slot img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: inherit
    }

.mini-logo {
    font-weight: 900;
    font-size: 21px
}

.brand-copy {
    min-width: 0
}

    .brand-copy strong, .brand-copy span {
        display: block
    }

    .brand-copy strong {
        font-size: 13px;
        font-weight: 900;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis
    }

    .brand-copy span {
        font-size: 9px;
        color: var(--muted);
        margin-top: 2px
    }

.side-nav {
    display: flex;
    flex-direction: column;
    gap: 5px
}

.nav-link {
    min-height: 47px;
    padding: 0 11px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #607276;
    transition: .17s ease;
}

    .nav-link b {
        font-size: 11px;
        font-weight: 800
    }

    .nav-link:hover {
        background: #f6f9f9;
        color: var(--brand)
    }

    .nav-link.active {
        background: var(--brand-soft);
        color: var(--brand);
        box-shadow: inset -3px 0 0 var(--brand);
    }

.nav-ico {
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: #f0f4f4;
}

.nav-link.active .nav-ico {
    background: #dcefed;
    color: var(--brand)
}

.side-user {
    margin-top: auto;
    display: grid;
    grid-template-columns: 40px 1fr 36px;
    gap: 9px;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: linear-gradient(180deg,#fff,#fbfdfd);
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: var(--brand-soft);
    color: var(--brand);
    display: grid;
    place-items: center;
    font-weight: 900;
}

.user-copy {
    min-width: 0
}

    .user-copy strong, .user-copy span {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap
    }

    .user-copy strong {
        font-size: 10px
    }

    .user-copy span {
        font-size: 9px;
        color: var(--muted)
    }

.logout-btn {
    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
    color: #677a7d;
    cursor: pointer;
    transition: .15s;
}

    .logout-btn:hover {
        background: var(--danger-bg);
        color: var(--danger);
        border-color: #f0d6d6
    }

.main-wrap {
    margin-right: var(--sidebar);
    min-height: 100vh
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    height: 68px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 28px;
    background: rgba(255,255,255,.9);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}

.top-title {
    font-size: 12px;
    font-weight: 900;
    color: #314749
}

.top-spacer {
    flex: 1
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: #607174;
    font-size: 9px;
}

    .status-pill i {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: #29b47d;
        box-shadow: 0 0 0 4px rgba(41,180,125,.09);
    }

.mobile-menu {
    display: none
}

.page-content {
    width: min(1440px,100%);
    margin: auto;
    padding: 26px 30px 46px
}

/* ===== Header ===== */
.page-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    margin-bottom: 18px;
}

    .page-head h1 {
        margin: 2px 0 5px;
        font-size: 25px;
        line-height: 1.35;
        letter-spacing: -.3px
    }

    .page-head p {
        margin: 0;
        font-size: 11px;
        color: var(--muted)
    }

.eyebrow {
    display: block;
    color: var(--brand);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 1.4px;
    margin-bottom: 4px
}

.page-actions, .filter-pills, .table-actions, .form-actions, .status-line, .split-head {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap
}

.split-head {
    justify-content: space-between
}

/* ===== Cards ===== */
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.section-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

    .section-head strong {
        font-size: 12px
    }

    .section-head small {
        display: block;
        font-size: 9px;
        color: var(--muted);
        margin-top: 2px
    }

.metric-grid {
    display: grid;
    grid-template-columns: repeat(5,minmax(0,1fr));
    gap: 10px;
    margin-bottom: 16px
}

.metric {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: linear-gradient(180deg,#fff,#fbfdfd);
    box-shadow: var(--shadow-sm);
}

    .metric small {
        display: block;
        color: var(--muted);
        font-size: 9px;
        margin-bottom: 5px
    }

    .metric strong {
        display: block;
        color: #263c3e;
        font-size: 17px;
        font-weight: 900
    }

/* ===== Buttons ===== */
.btn {
    appearance: none;
    min-height: 40px;
    padding: 9px 14px;
    border: 1px solid transparent;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    cursor: pointer;
    font-size: 10px;
    font-weight: 900;
    transition: .17s ease;
    white-space: nowrap;
}

    .btn:hover {
        transform: translateY(-1px)
    }

    .btn.primary {
        background: linear-gradient(180deg,var(--brand),var(--brand-dark));
        color: #fff;
        box-shadow: 0 5px 14px rgba(0,116,112,.16);
    }

        .btn.primary:hover {
            background: var(--brand-dark)
        }

    .btn.ghost {
        background: #fff;
        border-color: var(--line);
        color: #506467
    }

        .btn.ghost:hover {
            background: #f8fbfb;
            border-color: var(--line-strong)
        }

    .btn.success {
        background: var(--success-bg);
        color: var(--success);
        border-color: #d8ece2
    }

    .btn.danger {
        background: var(--danger-bg);
        color: var(--danger);
        border-color: #efd8d8
    }

    .btn.tiny {
        min-height: 30px;
        padding: 5px 9px;
        border-radius: 8px;
        font-size: 9px
    }

    .btn.wide {
        width: 100%;
        margin-top: 12px
    }

    .btn:disabled {
        opacity: .55;
        cursor: not-allowed;
        transform: none;
        box-shadow: none
    }

/* ===== Forms ===== */
.field {
    margin: 12px 0
}

    .field label {
        display: flex;
        align-items: center;
        gap: 5px;
        margin-bottom: 6px;
        color: #506467;
        font-size: 10px;
        font-weight: 900
    }

        .field label small {
            font-size: 9px;
            color: #98a4a6;
            font-weight: 500
        }

    .field input, .field select, .field textarea, .permission-search input {
        width: 100%;
        border: 1px solid #d9e3e2;
        border-radius: 11px;
        background: #fff;
        color: #213638;
        padding: 11px 12px;
        outline: none;
        transition: .16s;
    }

    .field textarea {
        min-height: 100px;
        resize: vertical;
        line-height: 1.9
    }

        .field input:hover, .field select:hover, .field textarea:hover {
            border-color: #ccd9d8
        }

        .field input:focus, .field select:focus, .field textarea:focus, .permission-search input:focus {
            border-color: var(--brand);
            box-shadow: 0 0 0 4px rgba(0,116,112,.075);
        }

        .field input::placeholder, .field textarea::placeholder {
            color: #a6b1b3
        }

.grid.two {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px
}

.check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0;
    color: #687a7c;
    font-size: 10px
}

    .check input {
        accent-color: var(--brand)
    }

.required-mark {
    color: #c94343
}

.field-error, .field-validation-error {
    display: block;
    margin-top: 5px;
    color: var(--danger);
    font-size: 9px;
    font-weight: 700
}

.field-validation-valid, .validation-summary-valid {
    display: none !important
}

.input-validation-error {
    border-color: #d85e5e !important;
    box-shadow: 0 0 0 4px rgba(216,94,94,.07) !important
}

/* ===== Alerts ===== */
.alert, .flash, .inline-message {
    padding: 10px 12px;
    margin-bottom: 12px;
    border: 1px solid transparent;
    border-radius: 11px;
    font-size: 10px;
    line-height: 1.8;
}

    .alert.danger, .flash.danger, .inline-message.bad {
        background: var(--danger-bg);
        color: #a33b3b;
        border-color: #f0d9d9
    }

    .alert.success, .flash.success, .inline-message.ok {
        background: var(--success-bg);
        color: var(--success);
        border-color: #d8ece2
    }

    .alert.warning {
        background: var(--warning-bg);
        color: var(--warning);
        border-color: #efdfb5
    }

/* ===== Tables ===== */
.table-card {
    padding: 0;
    overflow: hidden
}

    .table-card .section-head {
        padding: 17px 18px 0
    }

.table-wrap {
    overflow: auto
}

table {
    width: 100%;
    min-width: 820px;
    border-collapse: separate;
    border-spacing: 0
}

th, td {
    text-align: right;
    padding: 13px 15px;
    border-bottom: 1px solid #edf1f1;
    vertical-align: middle
}

th {
    background: #fafcfc;
    color: #7d8c8f;
    font-size: 9px;
    font-weight: 900
}

td {
    color: #4c5f62;
    font-size: 10px
}

    td strong {
        color: #273b3d
    }

tbody tr {
    transition: .15s
}

    tbody tr:hover {
        background: #fbfdfd
    }

.clickable {
    cursor: pointer
}

.filter-pills a {
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #fff;
    color: #617376;
    font-size: 9px
}

    .filter-pills a:hover {
        background: var(--brand-soft);
        color: var(--brand)
    }

.permission-toolbar {
    padding: 14px
}

.permission-search {
    display: flex;
    gap: 8px;
    width: 100%
}

    .permission-search input {
        flex: 1
    }

.role-form {
    display: flex;
    align-items: center;
    gap: 6px
}

    .role-form select {
        border: 1px solid var(--line);
        border-radius: 8px;
        padding: 7px;
        background: #fff
    }

/* ===== Status ===== */
.status, .role-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 74px;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 900;
    border: 1px solid transparent;
}

.status-completed, .status-approved {
    background: var(--success-bg);
    color: var(--success);
    border-color: #d8ece2
}

.status-pending, .status-queued, .status-processing {
    background: var(--warning-bg);
    color: var(--warning);
    border-color: #efe0b8
}

.status-failed, .status-rejected, .status-suspended, .status-cancelled {
    background: var(--danger-bg);
    color: var(--danger);
    border-color: #efd9d9
}

.status-duplicatereused {
    background: var(--info-bg);
    color: var(--info);
    border-color: #dcebf2
}

.role-badge.admin {
    background: #f3eff9;
    color: #725496;
    border-color: #e6dcf1
}

.role-badge.representative {
    background: #eef7ff;
    color: #286b89;
    border-color: #d9e9f4
}

.role-badge.user {
    background: var(--brand-soft);
    color: var(--brand);
    border-color: #d9ecea
}

/* ===== Warranty / Service ===== */
.serial-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px
}

.step-title {
    display: flex;
    align-items: center;
    gap: 10px
}

    .step-title > span {
        width: 35px;
        height: 35px;
        border-radius: 10px;
        background: var(--brand);
        color: #fff;
        display: grid;
        place-items: center;
        font-size: 9px;
        font-weight: 900
    }

    .step-title strong, .step-title small {
        display: block
    }

    .step-title small {
        font-size: 9px;
        color: var(--muted)
    }

.api-state {
    padding: 6px 9px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: #64777a;
    font-size: 9px
}

    .api-state i {
        display: inline-block;
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: #29ad79;
        margin-left: 5px
    }

.serial-row {
    display: flex;
    gap: 9px
}

.serial-input-shell {
    flex: 1;
    display: flex;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    overflow: hidden
}

.serial-input {
    width: 100%;
    border: 0;
    outline: none;
    padding: 12px;
    direction: ltr
}

.serial-ico {
    padding: 0 12px;
    color: var(--brand);
    font-weight: 900
}

.serial-loader {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #f7fbfa
}

.warranty-summary {
    display: grid;
    grid-template-columns: 2fr repeat(3,1fr);
    margin-top: 13px;
    border: 1px solid var(--line);
    border-radius: 13px;
    overflow: hidden;
    background: #fff
}

    .warranty-summary > div {
        padding: 13px;
        border-left: 1px solid var(--line)
    }

    .warranty-summary small, .warranty-summary strong {
        display: block
    }

    .warranty-summary small {
        font-size: 9px;
        color: var(--muted)
    }

    .warranty-summary strong {
        font-size: 11px;
        margin-top: 4px
    }

.alternative-warranty {
    grid-column: 1/-1;
    border-top: 1px solid var(--line)
}

.photo-section {
    scroll-margin-top: 85px
}

.photo-grid, .image-grid {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 10px
}

.photo-tile {
    position: relative;
    height: 180px;
    border: 1.5px dashed #c8d6d5;
    border-radius: 13px;
    background: #fafcfc;
    overflow: hidden;
    cursor: pointer;
    transition: .17s;
}

    .photo-tile:hover {
        border-color: var(--brand);
        background: var(--brand-soft)
    }

    .photo-tile.has-image {
        border-style: solid;
        border-color: #cfe3e1
    }

    .photo-tile input {
        display: none
    }

.photo-placeholder {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    color: #687a7d
}

    .photo-placeholder span {
        font-size: 26px;
        color: var(--brand)
    }

    .photo-placeholder strong {
        font-size: 10px
    }

    .photo-placeholder small {
        font-size: 9px;
        color: #9aa6a8
    }

.photo-preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover
}

.customer-comment-field {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--line)
}

.request-list {
    display: flex;
    flex-direction: column
}

.request-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 10px;
    align-items: center;
    padding: 12px 4px;
    border-top: 1px solid #edf1f1
}

    .request-row:hover {
        background: #fbfdfd
    }

    .request-row strong, .request-row small {
        display: block
    }

    .request-row small, .request-row time {
        font-size: 9px;
        color: var(--muted)
    }

/* ===== Results / Representative ===== */
.result-hero {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 14px;
    align-items: start
}

.result-badge {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--brand-soft);
    color: var(--brand);
    display: grid;
    place-items: center;
    font-size: 22px;
    font-weight: 900
}

.result-hero.danger .result-badge {
    background: var(--danger-bg);
    color: var(--danger)
}

.result-hero h2 {
    margin: 0 0 6px;
    font-size: 18px
}

.result-hero p {
    margin: 0;
    color: #536568
}

.action-box, .admin-note {
    margin-top: 12px;
    padding: 12px 13px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--surface-soft)
}

.representative-card, .representative-user-card, .representative-result-card {
    border-color: #d9e8e6;
    background: linear-gradient(180deg,#fff,#fbfdfd)
}

.representative-user-card {
    position: relative;
    overflow: hidden
}

    .representative-user-card:before {
        content: "";
        position: absolute;
        right: 0;
        top: 18px;
        bottom: 18px;
        width: 3px;
        border-radius: 99px;
        background: var(--brand)
    }

.rep-info-grid {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 9px
}

    .rep-info-grid > div {
        min-width: 0;
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 11px;
        background: #f9fbfb
    }

    .rep-info-grid .full {
        grid-column: 1/-1
    }

    .rep-info-grid small, .rep-info-grid strong {
        display: block
    }

    .rep-info-grid small {
        font-size: 9px;
        color: var(--muted);
        margin-bottom: 4px
    }

    .rep-info-grid strong {
        font-size: 10px;
        line-height: 1.9;
        overflow-wrap: anywhere
    }

.rep-address {
    min-width: 250px;
    max-width: 460px;
    white-space: normal;
    line-height: 1.8
}

.analysis-grid {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 10px
}

    .analysis-grid > div {
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 11px;
        background: #fafcfc
    }

    .analysis-grid small {
        font-size: 9px;
        color: var(--muted)
    }

    .analysis-grid p {
        margin: 5px 0 0;
        font-size: 10px
    }

.image-grid figure {
    margin: 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    background: #fff
}

.image-grid img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: contain;
    background: #eef2f2
}

.image-grid figcaption {
    padding: 7px 9px;
    font-size: 9px;
    color: #65777a
}

/* ===== Chat ===== */
.chat-thread {
    max-height: 460px;
    overflow-y: auto;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #f8fbfb;
    display: flex;
    flex-direction: column;
    gap: 9px
}

    .chat-thread::-webkit-scrollbar {
        width: 6px
    }

    .chat-thread::-webkit-scrollbar-thumb {
        background: #cbd8d7;
        border-radius: 99px
    }

.chat-message {
    max-width: min(78%,720px);
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #fff;
    color: #304446;
    font-size: 10px;
    line-height: 1.95;
    white-space: pre-wrap;
    overflow-wrap: anywhere
}

    .chat-message.admin {
        align-self: flex-start;
        background: #edf8f7;
        border-color: #d9ebe9;
        border-top-right-radius: 5px
    }

    .chat-message.user {
        align-self: flex-end;
        border-top-left-radius: 5px;
        background: #2d4c5d;
    }

    .chat-message.system {
        align-self: center;
        max-width: 94%;
        background: var(--warning-bg);
        border-color: #efe0b9;
        color: #d5eaf2;
        text-align: center
    }

.chat-meta {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 4px;
    color: #edf7fd;
}

    .chat-meta strong, .chat-meta time {
        font-size: 9px
    }
    .chat-meta div {
        color: #edf7fd;
    }

    .chat-meta time {
        direction: ltr;
        color: #93a0a2
    }

.chat-compose {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    gap: 9px;
    align-items: end;
    margin-top: 10px
}

    .chat-compose textarea {
        width: 100%;
        min-height: 55px;
        max-height: 180px;
        resize: vertical;
        border: 1px solid var(--line);
        border-radius: 11px;
        padding: 10px 11px;
        outline: none
    }

        .chat-compose textarea:focus {
            border-color: var(--brand);
            box-shadow: 0 0 0 4px rgba(0,116,112,.07)
        }

/* ===== Auth ===== */
.auth-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg,#eef8f7,#f8faf9 50%,#eef5f5)
}

.auth-shell {
    width: min(760px,calc(100% - 28px));
    padding: 34px 0
}

.auth-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 22px;
    padding: 28px;
    box-shadow: var(--shadow-lg)
}

.auth-login-card {
    width: min(470px,100%);
    margin: auto
}

.auth-card h1 {
    margin: 8px 0 4px;
    font-size: 22px
}

.auth-card .muted {
    margin-top: 0;
    color: var(--muted);
    font-size: 10px
}

.auth-kicker {
    color: var(--brand);
    font-size: 9px;
    font-weight: 900
}

.brand-mark {
    margin-bottom: 12px
}

.brand-logo-text {
    display: inline-grid;
    place-items: center;
    background: linear-gradient(145deg,var(--brand),var(--brand-dark));
    color: #fff;
    padding: 10px 15px;
    border-radius: 12px;
    font-weight: 900;
    letter-spacing: 1.8px;
    box-shadow: 0 7px 18px rgba(0,116,112,.18)
}

.brand-mark img {
    width: 70px !important;
    height: 70px !important;
    object-fit: contain
}

.auth-secondary-form {
    margin-top: 8px
}

.auth-link-button {
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--brand);
    padding: 9px;
    cursor: pointer;
    font-size: 9px
}

.register-choice {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 12px
}

/* ===== Modal / Loader ===== */
.modal {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(17,34,35,.52);
    backdrop-filter: blur(3px)
}

    .modal.open {
        display: flex
    }

.modal-card {
    width: min(680px,100%);
    max-height: 90vh;
    overflow: auto;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 20px;
    box-shadow: var(--shadow-lg)
}

    .modal-card.compact {
        max-width: 430px;
        text-align: center
    }

.modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px
}

.icon-btn {
    width: 34px;
    height: 34px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: #f6f9f9;
    cursor: pointer;
    color: #5a6d70
}

.modal-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 14px
}

.global-loader {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 300;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.68);
    backdrop-filter: blur(3px)
}

    .global-loader.show {
        display: flex
    }

.loader-card {
    display: flex;
    align-items: center;
    gap: 11px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 16px 20px;
    box-shadow: var(--shadow-lg)
}

.loader-ring {
    width: 27px;
    height: 27px;
    border: 3px solid #d8e5e4;
    border-top-color: var(--brand);
    border-radius: 50%;
    animation: spin .8s linear infinite
}

    .loader-ring.small {
        width: 22px;
        height: 22px
    }

@keyframes spin {
    to {
        transform: rotate(360deg)
    }
}

.toast-wrap {
    position: fixed;
    left: 18px;
    bottom: 18px;
    z-index: 400;
    width: min(360px,calc(100% - 36px))
}

.toast {
    margin-top: 8px;
    padding: 11px 13px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 11px;
    box-shadow: var(--shadow-md);
    font-size: 10px
}

.empty {
    padding: 20px;
    text-align: center;
    color: var(--muted);
    font-size: 10px
}

.compact-empty {
    padding: 14px !important
}

.danger-zone {
    border-color: #efdede;
    background: #fffafa
}

/* ===== Responsive ===== */
@media(max-width:1100px) {
    .metric-grid {
        grid-template-columns: repeat(3,minmax(0,1fr))
    }

    .photo-grid, .image-grid {
        grid-template-columns: repeat(2,minmax(0,1fr))
    }
}

@media(max-width:900px) {
    .sidebar {
        transform: translateX(100%);
        transition: .22s ease
    }

        .sidebar.open {
            transform: none;
            box-shadow: -12px 0 40px rgba(17,45,44,.12)
        }

    .main-wrap {
        margin-right: 0
    }

    .mobile-menu {
        display: grid;
        place-items: center;
        width: 38px;
        height: 38px;
        border: 1px solid var(--line);
        border-radius: 9px;
        background: #fff;
        color: #506366;
        cursor: pointer
    }

    .page-content {
        padding: 20px 18px 38px
    }

    .topbar {
        padding: 0 18px
    }

    .metric-grid {
        grid-template-columns: repeat(2,minmax(0,1fr))
    }

    .rep-info-grid {
        grid-template-columns: 1fr 1fr
    }

    .warranty-summary {
        grid-template-columns: 1fr 1fr
    }
}

@media(max-width:620px) {
    html, body {
        font-size: 14px
    }

    .page-content {
        padding: 16px 12px 30px
    }

    .page-head {
        align-items: flex-start;
        flex-direction: column;
        margin-bottom: 14px
    }

        .page-head h1 {
            font-size: 21px
        }

    .page-actions, .filter-pills {
        width: 100%
    }

        .page-actions .btn {
            flex: 1
        }

    .card {
        padding: 15px;
        border-radius: 14px;
        margin-bottom: 12px
    }

    .metric-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px
    }

    .metric {
        padding: 11px
    }

        .metric strong {
            font-size: 15px
        }

    .grid.two, .rep-info-grid, .analysis-grid, .register-choice, .photo-grid, .image-grid {
        grid-template-columns: 1fr
    }

        .rep-info-grid .full {
            grid-column: auto
        }

    .serial-row {
        flex-direction: column
    }

    .lookup-action {
        width: 100%
    }

    .warranty-summary {
        grid-template-columns: 1fr
    }

        .warranty-summary > div {
            border-left: 0;
            border-bottom: 1px solid var(--line)
        }

    .request-row {
        grid-template-columns: 1fr;
        gap: 5px
    }

    .chat-message {
        max-width: 94%
    }

    .chat-compose {
        grid-template-columns: 1fr
    }

        .chat-compose .btn {
            width: 100%
        }

    .auth-shell {
        padding: 18px 0
    }

    .auth-card {
        padding: 20px;
        border-radius: 18px
    }

    .permission-search {
        flex-direction: column
    }

        .permission-search .btn {
            width: 100%
        }

    .status, .role-badge {
        min-width: auto
    }
}

/* =====================================================================
   UI REFINEMENT V2 — larger typography + searchable selects + checkboxes
   ===================================================================== */

html, body {
    font-size: 17px;
}

.page-head h1 {
    font-size: 28px;
}

.page-head p {
    font-size: 13px;
}

.eyebrow {
    font-size: 11px;
}

.top-title {
    font-size: 14px;
}

.status-pill {
    font-size: 11px;
}

.brand-copy strong {
    font-size: 15px;
}

.brand-copy span {
    font-size: 11px;
}

.nav-link b {
    font-size: 13px;
}

.user-copy strong {
    font-size: 12px;
}

.user-copy span {
    font-size: 10px;
}

.section-head strong {
    font-size: 14px;
}

.section-head small, .subtle {
    font-size: 11px;
}

.metric small {
    font-size: 11px;
}

.metric strong {
    font-size: 20px;
}

.btn {
    font-size: 12px;
    min-height: 42px;
    padding: 10px 15px;
}

    .btn.tiny {
        font-size: 10.5px;
        min-height: 33px;
    }

.field label {
    font-size: 12.5px;
}

    .field label small {
        font-size: 10.5px;
    }

.field input,
.field select,
.field textarea,
.permission-search input {
    font-size: 13px;
    min-height: 45px;
}

.field textarea {
    font-size: 13px;
}

.field-error, .field-validation-error {
    font-size: 11px;
}

.alert, .flash, .inline-message {
    font-size: 12px;
}

th {
    font-size: 11px;
}

td {
    font-size: 12.5px;
}

.status, .role-badge {
    font-size: 10.5px;
    min-height: 29px;
}

.rep-info-grid small {
    font-size: 10.5px;
}

.rep-info-grid strong {
    font-size: 12.5px;
}

.analysis-grid small {
    font-size: 10.5px;
}

.analysis-grid p {
    font-size: 12px;
}

.chat-message {
    font-size: 12px;
}

.chat-meta strong, .chat-meta time {
    font-size: 10.5px;
}

.auth-card .muted {
    font-size: 12px;
}

.auth-kicker {
    font-size: 11px;
}

.auth-link-button {
    font-size: 11px;
}

.photo-placeholder strong {
    font-size: 12px;
}

.photo-placeholder small {
    font-size: 10.5px;
}

.warranty-summary small {
    font-size: 10.5px;
}

.warranty-summary strong {
    font-size: 13px;
}

.request-row small, .request-row time {
    font-size: 10.5px;
}

.empty {
    font-size: 12px;
}

/* ---- Modern checkboxes ---- */
.check {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
    color: #4f6366;
    font-size: 12.5px;
    font-weight: 700;
    min-height: 34px;
}

    .check input[type="checkbox"] {
        appearance: none;
        -webkit-appearance: none;
        width: 21px;
        height: 21px;
        min-width: 21px;
        margin: 0;
        border: 1.5px solid #c7d5d4;
        border-radius: 7px;
        background: #fff;
        display: grid;
        place-items: center;
        cursor: pointer;
        transition: .16s ease;
        box-shadow: 0 1px 3px rgba(20,55,53,.04);
    }

        .check input[type="checkbox"]:hover {
            border-color: var(--brand);
            box-shadow: 0 0 0 4px rgba(0,116,112,.06);
        }

        .check input[type="checkbox"]:checked {
            background: var(--brand);
            border-color: var(--brand);
            box-shadow: 0 4px 10px rgba(0,116,112,.16);
        }

            .check input[type="checkbox"]:checked::after {
                content: "";
                width: 9px;
                height: 5px;
                border-right: 2px solid #fff;
                border-bottom: 2px solid #fff;
                transform: rotate(45deg) translate(-1px,-1px);
            }

        .check input[type="checkbox"]:focus-visible {
            outline: 0;
            box-shadow: 0 0 0 4px rgba(0,116,112,.12);
        }

        .check input[type="checkbox"]:disabled {
            opacity: .55;
            cursor: not-allowed;
        }

/* Generic checkbox fallback outside .check */
input[type="checkbox"]:not(.native-checkbox) {
    accent-color: var(--brand);
}

/* ---- Searchable Select ---- */
.search-select-native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.search-select {
    position: relative;
    width: 100%;
}

.search-select__control {
    width: 100%;
    min-height: 46px;
    padding: 9px 12px;
    border: 1px solid #d9e3e2;
    border-radius: 11px;
    background: #fff;
    color: #213638;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
    transition: .16s ease;
    text-align: right;
    box-shadow: 0 1px 2px rgba(21,53,52,.02);
}

    .search-select__control:hover {
        border-color: #c9d8d6;
    }

    .search-select.is-open .search-select__control,
    .search-select__control:focus-visible {
        border-color: var(--brand);
        box-shadow: 0 0 0 4px rgba(0,116,112,.075);
        outline: 0;
    }

.search-select.is-invalid .search-select__control {
    border-color: #d85e5e;
    box-shadow: 0 0 0 4px rgba(216,94,94,.07);
}

.search-select__value {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    color: #263b3d;
}

    .search-select__value.is-placeholder {
        color: #a0adaf;
    }

.search-select__arrow {
    width: 22px;
    height: 22px;
    border-radius: 7px;
    display: grid;
    place-items: center;
    background: #f2f6f6;
    color: #6d7f82;
    flex: 0 0 22px;
    transition: .18s ease;
}

.search-select.is-open .search-select__arrow {
    transform: rotate(180deg);
    background: var(--brand-soft);
    color: var(--brand);
}

.search-select__menu {
    position: absolute;
    top: calc(100% + 7px);
    right: 0;
    left: 0;
    z-index: 180;
    display: none;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 16px 42px rgba(23,55,54,.14);
}

.search-select.is-open .search-select__menu {
    display: block;
    animation: selectFade .13s ease;
}

@keyframes selectFade {
    from {
        opacity: 0;
        transform: translateY(-4px)
    }

    to {
        opacity: 1;
        transform: none
    }
}

.search-select__search-wrap {
    position: relative;
    margin-bottom: 7px;
}

.search-select__search {
    width: 100%;
    min-height: 41px;
    border: 1px solid #dce6e5;
    border-radius: 9px;
    padding: 9px 35px 9px 10px;
    outline: none;
    background: #f9fbfb;
    color: #2b4042;
    font-size: 12.5px;
    direction: rtl;
}

    .search-select__search:focus {
        border-color: var(--brand);
        background: #fff;
        box-shadow: 0 0 0 3px rgba(0,116,112,.06);
    }

.search-select__search-icon {
    position: absolute;
    top: 50%;
    right: 11px;
    transform: translateY(-50%);
    color: #8c999b;
    font-size: 14px;
    pointer-events: none;
}

.search-select__options {
    max-height: 245px;
    overflow: auto;
    padding: 1px;
    overscroll-behavior: contain;
}

    .search-select__options::-webkit-scrollbar {
        width: 6px;
    }

    .search-select__options::-webkit-scrollbar-thumb {
        background: #cbd7d6;
        border-radius: 99px;
    }

    .search-select__options::-webkit-scrollbar-track {
        background: transparent;
    }

.search-select__option {
    min-height: 39px;
    padding: 8px 10px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #43585b;
    font-size: 12px;
    transition: .12s ease;
}

    .search-select__option:hover,
    .search-select__option.is-highlighted {
        background: #f2f8f7;
        color: var(--brand);
    }

    .search-select__option.is-selected {
        background: var(--brand-soft);
        color: var(--brand);
        font-weight: 900;
    }

    .search-select__option.is-disabled {
        opacity: .45;
        cursor: not-allowed;
    }

.search-select__empty {
    padding: 18px 10px;
    text-align: center;
    color: #94a1a3;
    font-size: 11px;
}

.search-select__group {
    padding: 8px 9px 5px;
    color: #8a989a;
    font-size: 10px;
    font-weight: 900;
    border-top: 1px solid #eef2f2;
    margin-top: 5px;
}

    .search-select__group:first-child {
        border-top: 0;
        margin-top: 0;
    }

/* Compact select instances such as role changer */
.role-form .search-select {
    min-width: 155px;
}

.role-form .search-select__control {
    min-height: 34px;
    padding: 5px 8px;
    border-radius: 8px;
}

.role-form .search-select__value {
    font-size: 11px;
}

.role-form .search-select__menu {
    min-width: 200px;
}

/* native select remains styled if not searchable */
.field select:not(.search-select-native),
.role-form select:not(.search-select-native) {
    appearance: none;
    -webkit-appearance: none;
    background-image: linear-gradient(45deg,transparent 50%,#6f8183 50%), linear-gradient(135deg,#6f8183 50%,transparent 50%);
    background-position: calc(14px) 50%, calc(9px) 50%;
    background-size: 5px 5px,5px 5px;
    background-repeat: no-repeat;
    padding-left: 32px;
}

/* ---- Better focus and density ---- */
.card {
    padding: 22px;
}

.table-card {
    padding: 0;
}

th, td {
    padding: 14px 16px;
}

.permission-search input {
    min-height: 44px;
}

@media(max-width:620px) {
    html, body {
        font-size: 16px;
    }

    .page-head h1 {
        font-size: 24px;
    }

    .field label {
        font-size: 12px;
    }

    .field input,
    .field select,
    .field textarea,
    .search-select__value {
        font-size: 12.5px;
    }

    .search-select__menu {
        position: fixed;
        right: 12px;
        left: 12px;
        top: auto;
        bottom: 14px;
        max-height: 70vh;
        z-index: 220;
        border-radius: 16px;
        box-shadow: 0 20px 60px rgba(14,40,39,.2);
    }

    .search-select__options {
        max-height: 48vh;
    }
}

/* =====================================================================
   UI PATCH V3 — stable searchable select + switch controls
   ===================================================================== */

/* ---- Switch instead of checkbox ---- */
.check {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 38px;
    cursor: pointer;
    user-select: none;
    font-size: 12.5px;
    font-weight: 700;
    color: #4f6366;
}

    .check input[type="checkbox"] {
        appearance: none !important;
        -webkit-appearance: none !important;
        position: relative;
        width: 46px !important;
        min-width: 46px !important;
        height: 26px !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 1px solid #cbd7d6 !important;
        border-radius: 999px !important;
        background: #e9efee !important;
        cursor: pointer;
        transition: background .18s ease,border-color .18s ease,box-shadow .18s ease;
        box-shadow: inset 0 1px 2px rgba(20,55,53,.06) !important;
    }

        .check input[type="checkbox"]::after {
            content: "";
            position: absolute;
            top: 3px;
            right: 3px;
            width: 18px;
            height: 18px;
            border: 0 !important;
            border-radius: 50%;
            background: #fff;
            transform: none !important;
            box-shadow: 0 2px 6px rgba(20,50,50,.18);
            transition: right .18s ease,transform .18s ease;
        }

        .check input[type="checkbox"]:checked {
            background: var(--brand) !important;
            border-color: var(--brand) !important;
            box-shadow: 0 4px 12px rgba(0,116,112,.18) !important;
        }

            .check input[type="checkbox"]:checked::after {
                right: 23px;
                background: #fff;
            }

        .check input[type="checkbox"]:hover {
            border-color: #9fbdb9 !important;
            box-shadow: 0 0 0 4px rgba(0,116,112,.06) !important;
        }

        .check input[type="checkbox"]:focus-visible {
            outline: 0;
            box-shadow: 0 0 0 4px rgba(0,116,112,.13) !important;
        }

        .check input[type="checkbox"]:disabled {
            opacity: .55;
            cursor: not-allowed;
        }

/* ---- Search select: stable control (no button behavior) ---- */
.search-select {
    position: relative;
    width: 100%;
}

.search-select__control {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    min-height: 46px;
    padding: 9px 12px;
    border: 1px solid #d9e3e2;
    border-radius: 11px;
    background: #fff;
    color: #213638;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    cursor: pointer;
    transition: border-color .16s ease,box-shadow .16s ease,background .16s ease;
    text-align: right;
    direction: rtl;
    outline: none;
    box-shadow: 0 1px 2px rgba(21,53,52,.02);
}

    .search-select__control:hover {
        border-color: #c7d6d4;
        background: #fdfefe;
    }

    .search-select__control:focus,
    .search-select.is-open .search-select__control {
        border-color: var(--brand);
        box-shadow: 0 0 0 4px rgba(0,116,112,.075);
    }

.search-select__value {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
    color: #dbe8f0;
    line-height: 1.6;
}

    .search-select__value.is-placeholder {
        color: #99a7a9;
    }

.search-select__arrow {
    position: relative;
    width: 24px;
    height: 24px;
    flex: 0 0 24px;
    border-radius: 7px;
    background: #f2f6f6;
}

    .search-select__arrow::before {
        content: "";
        position: absolute;
        top: 8px;
        left: 7px;
        width: 8px;
        height: 8px;
        border-left: 2px solid #778789;
        border-bottom: 2px solid #778789;
        transform: rotate(-45deg);
        transition: transform .18s ease,top .18s ease;
    }

.search-select.is-open .search-select__arrow {
    background: var(--brand-soft);
}

    .search-select.is-open .search-select__arrow::before {
        top: 10px;
        border-color: var(--brand);
        transform: rotate(135deg);
    }

.search-select__menu {
    position: absolute;
    top: calc(100% + 7px);
    right: 0;
    left: 0;
    z-index: 220;
    display: none;
    padding: 8px;
    border: 1px solid #dce5e4;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 18px 48px rgba(20,52,51,.15);
}

.search-select.is-open .search-select__menu {
    display: block;
}

.search-select__search-wrap {
    position: relative;
    margin-bottom: 7px;
}

.search-select__search {
    width: 100%;
    min-height: 42px;
    padding: 9px 36px 9px 11px !important;
    border: 1px solid #dce6e5 !important;
    border-radius: 9px !important;
    background: #f8fbfb !important;
    color: #263b3d !important;
    font-size: 12.5px !important;
    direction: rtl;
    outline: none;
}

    .search-select__search:focus {
        background: #fff !important;
        border-color: var(--brand) !important;
        box-shadow: 0 0 0 3px rgba(0,116,112,.06) !important;
    }

.search-select__search-wrap::before {
    content: "";
    position: absolute;
    top: 50%;
    right: 13px;
    width: 11px;
    height: 11px;
    border: 1.8px solid #8a999b;
    border-radius: 50%;
    transform: translateY(-60%);
    z-index: 2;
    pointer-events: none;
}

.search-select__search-wrap::after {
    content: "";
    position: absolute;
    top: 54%;
    right: 23px;
    width: 6px;
    height: 1.8px;
    background: #8a999b;
    transform: rotate(-45deg);
    transform-origin: right center;
    z-index: 2;
    pointer-events: none;
}

.search-select__options {
    max-height: 260px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 1px;
}

.search-select__option {
    min-height: 40px;
    padding: 8px 10px;
    margin: 1px 0;
    border-radius: 8px;
    display: flex;
    align-items: center;
    cursor: pointer;
    color: #43585b;
    font-size: 12px;
    line-height: 1.7;
    transition: background .12s ease,color .12s ease;
}

    .search-select__option:hover,
    .search-select__option.is-highlighted {
        background: #f2f8f7;
        color: var(--brand);
    }

    .search-select__option.is-selected {
        background: var(--brand-soft);
        color: var(--brand);
        font-weight: 900;
    }

    .search-select__option.is-disabled {
        opacity: .42;
        cursor: not-allowed;
    }

.search-select__empty {
    padding: 18px 10px;
    text-align: center;
    color: #94a1a3;
    font-size: 11px;
}

.search-select__group {
    padding: 8px 9px 5px;
    color: #899799;
    font-size: 10px;
    font-weight: 900;
    border-top: 1px solid #eef2f2;
    margin-top: 5px;
}

    .search-select__group:first-child {
        border-top: 0;
        margin-top: 0;
    }

.search-select.is-invalid .search-select__control {
    border-color: #d85e5e;
    box-shadow: 0 0 0 4px rgba(216,94,94,.07);
}

/* hide native select but keep it available for model binding + validation */
select.search-select-native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    min-height: 1px !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* compact role select */
.role-form .search-select {
    min-width: 165px;
}

.role-form .search-select__control {
    min-height: 36px;
    padding: 5px 8px;
    border-radius: 8px;
}

.role-form .search-select__value {
    font-size: 11.5px;
}

.role-form .search-select__menu {
    min-width: 220px;
}

/* Make dropdown remain above tables/cards/modals correctly */
.table-wrap {
    overflow-x: auto;
    overflow-y: visible;
}

.table-card {
    overflow: visible;
}

.card {
    overflow: visible;
}

/* On mobile open as a bottom sheet */
@media(max-width:620px) {
    .search-select__menu {
        position: fixed;
        top: auto;
        right: 12px;
        left: 12px;
        bottom: 12px;
        max-height: 72vh;
        border-radius: 17px;
        padding: 10px;
        box-shadow: 0 24px 70px rgba(16,42,41,.22);
    }

    .search-select__options {
        max-height: 50vh;
    }

    .check input[type="checkbox"] {
        width: 48px !important;
        min-width: 48px !important;
        height: 28px !important;
    }

        .check input[type="checkbox"]::after {
            width: 20px;
            height: 20px;
        }

        .check input[type="checkbox"]:checked::after {
            right: 23px;
        }
}

/* =====================================================================
   UI PATCH V4 — fix city searchable select + switch checked-state
   ===================================================================== */

/* Force stable switch geometry and ignore older checkbox rules */
.check input[type="checkbox"] {
    position: relative !important;
    display: inline-block !important;
    width: 48px !important;
    min-width: 48px !important;
    height: 28px !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
    border: 1px solid #cbd7d6 !important;
    border-radius: 999px !important;
    background: #e7edec !important;
    box-shadow: inset 0 1px 2px rgba(20,55,53,.06) !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    cursor: pointer;
    transition: background-color .18s ease,border-color .18s ease,box-shadow .18s ease !important;
}

    .check input[type="checkbox"]::before {
        content: "" !important;
        position: absolute !important;
        top: 3px !important;
        left: 3px !important;
        right: auto !important;
        width: 20px !important;
        height: 20px !important;
        border: 0 !important;
        border-radius: 50% !important;
        background: #fff !important;
        box-shadow: 0 2px 6px rgba(17,47,46,.18) !important;
        transform: translateX(0) !important;
        transition: transform .18s ease !important;
    }

    .check input[type="checkbox"]::after {
        content: none !important;
        display: none !important;
    }

    .check input[type="checkbox"]:checked {
        background: var(--brand) !important;
        border-color: var(--brand) !important;
        box-shadow: 0 4px 12px rgba(0,116,112,.18) !important;
    }

        .check input[type="checkbox"]:checked::before {
            transform: translateX(20px) !important;
        }

    .check input[type="checkbox"]:hover {
        border-color: #9fbdb9 !important;
    }

    .check input[type="checkbox"]:focus-visible {
        outline: none !important;
        box-shadow: 0 0 0 4px rgba(0,116,112,.13) !important;
    }

    .check input[type="checkbox"]:disabled {
        opacity: .55 !important;
        cursor: not-allowed !important;
    }

/* City/province selects: keep enhanced control visually consistent */
.field .search-select {
    width: 100%;
}

.field .search-select__control {
    min-height: 46px;
    background: #fff;
}

.field .search-select__menu {
    z-index: 500;
}

/* Avoid card/table clipping dropdowns */
.card,
.table-card,
.table-wrap,
.grid,
.grid.two,
.field {
    overflow: visible;
}

/* =====================================================================
   SERVICE PANEL V5 — permissions, warranty categories, marketing, rating
   ===================================================================== */

.nav-ico i,
.btn i,
.section-head i,
.page-head i,
.rated-message i {
    font-size: 18px;
    line-height: 1;
}

.logout-btn i, .mobile-menu i {
    font-size: 21px
}

.warranty-category-field {
    margin: 14px 0;
    max-width: 620px;
}

.field-help {
    display: block;
    margin-top: 6px;
    font-size: 11px;
    color: var(--muted);
}

.danger-text {
    color: var(--danger) !important
}

.marketing-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--shadow-sm);
    margin-bottom: 18px;
}

.marketing-track {
    display: flex;
    width: 100%;
    direction: ltr;
    transition: transform .45s cubic-bezier(.22,.61,.36,1);
    will-change: transform;
}

.marketing-slide {
    position: relative;
    flex: 0 0 100%;
    width: 100%;
    min-height: 150px;
    max-height: 250px;
    overflow: hidden;
    display: block;
    background: #eef3f3;
}

    .marketing-slide img {
        width: 100%;
        height: 100%;
        min-height: 150px;
        max-height: 250px;
        object-fit: cover;
    }

    .marketing-slide span {
        position: absolute;
        right: 18px;
        bottom: 16px;
        max-width: min(70%,620px);
        padding: 8px 12px;
        border-radius: 10px;
        background: rgba(10,34,34,.72);
        backdrop-filter: blur(8px);
        color: #fff;
        direction: rtl;
        text-align: right;
        font-size: 12px;
        font-weight: 900;
    }

.marketing-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 8px;
    display: flex;
    justify-content: center;
    gap: 5px;
    pointer-events: none;
}

    .marketing-dots button {
        pointer-events: auto;
        width: 7px;
        height: 7px;
        padding: 0;
        border: 0;
        border-radius: 99px;
        background: rgba(255,255,255,.55);
        box-shadow: 0 1px 4px rgba(0,0,0,.12);
        cursor: pointer;
        transition: .18s ease;
    }

        .marketing-dots button.active {
            width: 20px;
            background: #fff;
        }

.stage-card {
    border-color: #dce9e7
}

.stage-actions {
    display: flex;
    gap: 9px;
    flex-wrap: wrap;
}

    .stage-actions form {
        margin: 0
    }

.switch-field {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.switch-line {
    padding: 9px 0
}

    .switch-line small {
        color: var(--muted);
        font-size: 10px;
        font-weight: 500;
    }

.rating-card {
    border-color: #eadfac;
    background: linear-gradient(180deg,#fff,#fffdf5);
}

.rating-form {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.star-rating {
    display: inline-flex;
    direction: ltr;
    align-items: center;
    gap: 2px;
}

    .star-rating input {
        position: absolute;
        opacity: 0;
        pointer-events: none;
    }

    .star-rating label {
        color: #d5dcdb;
        font-size: 32px;
        line-height: 1;
        cursor: pointer;
        transition: color .12s ease,transform .12s ease;
    }

        .star-rating label:hover {
            transform: scale(1.08)
        }

    .star-rating input:checked ~ label {
        color: #f0b51d
    }

    .star-rating:hover label {
        color: #d5dcdb
    }

    .star-rating label:hover,
    .star-rating label:hover ~ label {
        color: #f0b51d
    }

.rated-message {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--success);
    font-weight: 900;
}

.admin-rating-card {
    border-color: #eadfac
}

.rating-value {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    height: 38px;
    padding: 0 10px;
    border-radius: 10px;
    background: #fff7dc;
    color: #9b6d00;
    font-weight: 900;
}

.admin-stars {
    direction: ltr;
    display: flex;
    gap: 3px;
    margin: 5px 0 8px;
}

    .admin-stars i {
        font-size: 26px;
        color: #cfd7d6;
    }

        .admin-stars i.active {
            color: #f0b51d
        }

.permission-matrix-card .table-wrap {
    overflow: auto
}

.permission-matrix {
    min-width: 900px
}

    .permission-matrix th:not(:first-child),
    .permission-matrix td:not(:first-child) {
        text-align: center;
        width: 170px;
    }

    .permission-matrix td:first-child strong,
    .permission-matrix td:first-child small {
        display: block
    }

    .permission-matrix td:first-child small {
        color: var(--muted);
        margin-top: 3px;
        font-size: 10.5px;
    }

.permission-switch-form {
    display: flex;
    justify-content: center;
    margin: 0;
}

.permission-switch {
    display: inline-flex;
    justify-content: center;
}

.secondary-head {
    margin-top: 32px
}

    .secondary-head h2 {
        margin: 2px 0 5px;
        font-size: 22px;
    }

.inline-edit-form {
    display: grid;
    grid-template-columns: minmax(180px,1fr) 150px auto;
    gap: 8px;
    align-items: center;
}

    .inline-edit-form input {
        min-height: 38px;
        border: 1px solid var(--line);
        border-radius: 9px;
        padding: 7px 9px;
        outline: none;
    }

        .inline-edit-form input:focus {
            border-color: var(--brand);
            box-shadow: 0 0 0 3px rgba(0,116,112,.06);
        }

.inline-month {
    display: flex;
    align-items: center;
    gap: 6px;
}

    .inline-month input {
        width: 90px
    }

    .inline-month span {
        color: var(--muted);
        font-size: 10px;
    }

.switch-auto-form {
    margin: 0
}

.banner-admin-grid {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 14px;
}

.banner-admin-card {
    margin: 0;
    padding: 0;
    overflow: hidden !important;
}

    .banner-admin-card > img {
        width: 100%;
        aspect-ratio: 16/5;
        object-fit: cover;
        background: #eef3f3;
    }

.banner-admin-body {
    padding: 15px
}

    .banner-admin-body strong,
    .banner-admin-body small {
        display: block
    }

    .banner-admin-body small {
        color: var(--muted);
        margin-top: 3px;
    }

.banner-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 13px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
}

input[type="date"],
input[type="datetime-local"] {
    direction: ltr;
    text-align: left;
}

.btn.tiny i {
    font-size: 15px
}

@media(max-width:900px) {
    .banner-admin-grid {
        grid-template-columns: 1fr
    }
}

@media(max-width:620px) {
    .marketing-slide,
    .marketing-slide img {
        min-height: 120px;
        max-height: 180px;
    }

        .marketing-slide span {
            right: 10px;
            bottom: 10px;
            max-width: 80%;
            font-size: 10px;
            padding: 6px 9px;
        }

    .stage-actions,
    .rating-form {
        flex-direction: column;
        align-items: stretch;
    }

        .stage-actions form,
        .stage-actions .btn,
        .rating-form .btn {
            width: 100%
        }

    .star-rating {
        justify-content: center
    }

    .inline-edit-form {
        grid-template-columns: 1fr
    }
}

.rep-rating-summary {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 8px;
    border-radius: 999px;
    background: #fff7dc;
    color: #956900;
    font-weight: 900;
    font-size: 11px;
}

    .rep-rating-summary i {
        font-size: 15px;
        color: #f0b51d
    }

    .rep-rating-summary small {
        font-size: 9px;
        color: #a68b43
    }

/* ===== Local SVG icon system ===== */
.ui-icon {
    width: 1.15em;
    height: 1.15em;
    display: inline-block;
    vertical-align: -.18em;
    fill: currentColor;
    flex: 0 0 auto;
}

.nav-ico .ui-icon {
    width: 18px;
    height: 18px
}

.logout-btn .ui-icon, .mobile-menu .ui-icon {
    width: 20px;
    height: 20px;
    display: flex;
}

.btn .ui-icon {
    width: 17px;
    height: 17px
}

.btn.tiny .ui-icon {
    width: 15px;
    height: 15px
}

.rep-rating-summary .ui-icon {
    width: 15px;
    height: 15px;
    color: #f0b51d
}

/* ===== Flexible user permission UI ===== */
.permission-count {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.22);
    font-size: 9px;
    font-weight: 900;
}

.user-permission-note {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

    .user-permission-note p {
        margin: 0;
        color: #607174;
        font-size: 11px;
        line-height: 1.95;
    }

.permission-legend {
    display: flex;
    gap: 12px;
    align-items: center;
    white-space: nowrap;
    color: #687a7c;
    font-size: 10px;
}

    .permission-legend span {
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }

.legend-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: inline-block;
}

    .legend-dot.inherited {
        background: #aebbbb
    }

    .legend-dot.custom {
        background: var(--brand)
    }

.user-permission-table {
    min-width: 920px;
}

    .user-permission-table td:first-child strong,
    .user-permission-table td:first-child small {
        display: block;
    }

    .user-permission-table td:first-child small {
        margin-top: 3px;
        color: var(--muted);
        font-size: 10px;
    }

    .user-permission-table th:not(:first-child),
    .user-permission-table td:not(:first-child) {
        text-align: center;
    }

.permission-switch.is-custom span {
    color: var(--brand);
    font-weight: 900;
}

.permission-switch.is-inherited span {
    color: #7c8c8e;
}

.permission-switch input:disabled + span {
    opacity: .7;
}

/* Logo image */
.brand-logo-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.brand-mark img {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    object-fit: cover;
    box-shadow: 0 8px 22px rgba(0,116,112,.12);
}

@media(max-width:620px) {
    .user-permission-note {
        align-items: flex-start;
        flex-direction: column;
    }
}

.banner-schedule {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--line);
}

    .banner-schedule span {
        min-width: 140px;
        padding: 8px 10px;
        border-radius: 9px;
        background: #f8fbfb;
    }

    .banner-schedule small, .banner-schedule strong {
        display: block
    }

    .banner-schedule small {
        font-size: 9px;
        color: var(--muted)
    }

    .banner-schedule strong {
        font-size: 11px;
        margin-top: 2px
    }

/* Product category configuration is admin-only; customer serial lookup stays simple. */
.full-field {
    grid-column: 1/-1
}

.inline-category-fields {
    display: grid;
    grid-template-columns: minmax(160px,.75fr) minmax(240px,1.25fr);
    gap: 8px;
}

    .inline-category-fields input {
        width: 100%
    }

@media(max-width:700px) {
    .inline-category-fields {
        grid-template-columns: 1fr
    }
}


/* Admin-only API token editor */
.api-token-card {
    border-color: #dbe8e7;
}

.token-current {
    direction: ltr;
    font-family: Consolas,'Courier New',monospace;
    color: var(--muted);
    font-size: 11px;
    letter-spacing: 1px;
}

.token-update-form {
    margin: 0;
}

.token-input-shell {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    gap: 9px;
    align-items: center;
}

    .token-input-shell input {
        width: 100%;
        min-height: 44px;
        padding: 10px 12px;
        direction: ltr;
        text-align: left;
        border: 1px solid #d9e3e2;
        border-radius: 11px;
        background: #fff;
        outline: none;
        font-family: Consolas,'Courier New',monospace;
        font-size: 12px;
    }

        .token-input-shell input:focus {
            border-color: var(--brand);
            box-shadow: 0 0 0 4px rgba(0,116,112,.075);
        }

@media(max-width:620px) {
    .token-input-shell {
        grid-template-columns: 1fr
    }

        .token-input-shell .btn {
            width: 100%
        }
}

/* Rating comment */
.rating-inputs {
    flex: 1 1 440px;
    min-width: 0;
}

.rating-comment-field {
    margin: 10px 0 0;
    max-width: 720px;
}

    .rating-comment-field textarea {
        min-height: 88px;
    }

.rating-admin-comment {
    margin: 8px 0 10px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fffdf6;
    line-height: 1.9;
    white-space: pre-wrap;
}

/* One consistent switch geometry across permission/category/banner forms */
.permission-switch input[type="checkbox"],
.switch-auto-form input[type="checkbox"],
.switch-field .check input[type="checkbox"],
.banner-actions .check input[type="checkbox"] {
    flex: 0 0 48px;
}

/* Responsive shell / admin result modal / token editor */
*, *::before, *::after {
    box-sizing: border-box
}

html, body {
    max-width: 100%;
    overflow-x: clip
}

.app-shell, .main-wrap, .page-content, .card, .modal-card, .field {
    min-width: 0
}

.page-content {
    max-width: 100%;
}

.page-head, .page-actions, .split-head, .section-head, .status-line, .form-actions {
    flex-wrap: wrap;
    min-width: 0
}

img, video, canvas {
    max-width: 100%
}

.field input, .field textarea, .field select {
    max-width: 100%;
    min-width: 0
}

.table-wrap {
    max-width: 100%;
    overflow-x: auto !important;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch
}

    .table-wrap table {
        width: max-content;
        min-width: 100%
    }

.token-settings-grid {
    align-items: stretch
}

.token-setting-card {
    min-width: 0
}

    .token-setting-card .token-current {
        display: block;
        max-width: 100%;
        overflow-wrap: anywhere;
        margin: 12px 0 16px
    }

    .token-setting-card .setting-meta {
        font-size: 12px;
        color: var(--muted)
    }

    .token-setting-card .btn {
        max-width: 100%
    }

.modal {
    overflow-y: auto;
    overscroll-behavior: contain
}

.modal-card {
    position: relative;
    max-width: min(680px,100%);
    width: 100%;
    max-height: min(90dvh,90vh);
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain
}

    .modal-card .field, .modal-card form, .modal-card .grid {
        min-width: 0
    }

    .modal-card .search-select {
        width: 100%;
        min-width: 0
    }

    .modal-card .search-select__menu {
        z-index: 250;
        max-width: 100%
    }

    .modal-card .search-select__options {
        max-height: 155px
    }

@media(max-width:900px) {
    .sidebar {
        z-index: 210;
        max-width: min(320px,86vw);
        height: 100dvh;
        overflow-y: auto
    }

    .main-wrap {
        width: 100%;
        min-width: 0
    }

    .page-content {
        padding-inline: 16px
    }

    .metric-grid {
        grid-template-columns: repeat(2,minmax(0,1fr))
    }

    .modal {
        padding: 12px;
        align-items: center
    }

    .modal-card {
        max-height: calc(100dvh - 24px);
        padding: 18px
    }
}

@media(max-width:620px) {
    .topbar {
        padding-inline: 12px;
        min-width: 0;
        gap: 7px
    }

    .top-title {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap
    }

    .status-pill {
        white-space: nowrap;
        max-width: 48vw
    }

    .page-content {
        padding: 14px 10px 32px
    }

    .metric-grid, .grid.two, .token-settings-grid {
        grid-template-columns: 1fr !important
    }

    .page-head, .page-actions, .form-actions, .status-line {
        align-items: stretch;
        gap: 9px
    }

        .page-actions, .page-actions .btn, .form-actions .btn, .status-line .btn {
            max-width: 100%
        }

    .card {
        max-width: 100%;
        padding: 14px
    }

    .modal {
        padding: 0;
        align-items: flex-end
    }

    .modal-card {
        width: 100%;
        max-width: none;
        max-height: calc(100dvh - env(safe-area-inset-top) - 8px);
        border-radius: 18px 18px 0 0;
        padding: 18px 14px max(20px,env(safe-area-inset-bottom));
    }

    .modal-head {
        position: sticky;
        top: -18px;
        z-index: 20;
        background: #fff;
        padding: 12px 0;
        margin-top: -8px
    }

    .modal-card .search-select__menu {
        max-height: 220px
    }

    .modal-card .search-select__options {
        max-height: 125px
    }

    .modal-card textarea {
        min-height: 85px
    }

    .table-wrap {
        margin-inline: -2px
    }

        .table-wrap th, .table-wrap td {
            padding: 10px 11px
        }

    .banner-admin-grid {
        grid-template-columns: 1fr
    }

    .switch-field .check, .banner-actions .check {
        display: inline-flex;
        align-items: center;
        gap: 10px
    }

    .token-setting-card button {
        width: 100%
    }
}

body.has-open-modal {
    overflow: hidden
}

/* Marketing toggle must align like permission toggles inside .field */
.field label.check, .switch-field label.check, .banner-actions label.check {
    display: inline-flex !important;
    align-items: center;
    gap: 11px;
    min-width: 0;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
    cursor: pointer;
}

    .field label.check input[type="checkbox"] {
        width: 48px !important;
        min-width: 48px !important;
        padding: 0 !important;
        flex: 0 0 48px
    }

@media(max-width:620px) {
    .field input:not([type="checkbox"]), .field select, .field textarea, .search-select__value {
        font-size: 16px
    }

    .field label, .field label.check, .section-head strong {
        font-size: 13px
    }

    .btn, .table-wrap td, .table-wrap th {
        font-size: 12px
    }

    .nav-link b {
        font-size: 13px
    }

    .side-user .user-copy strong {
        font-size: 12px
    }
}

/* ===== AVAJANG FIVE-COLOR COHERENCE LAYER ===== */
html { color-scheme: dark; }
html, body, body.ai-platform { color: var(--ava-text, #EAF5F4); background: var(--ava-bg, #0B1621); }
.sidebar { background: var(--ava-secondary, #121F2E); border-color: var(--ava-border, #3E596A); }
.topbar { background: #101F2E; border-color: var(--ava-border, #3E596A); }
.top-title, .page-head h1, .section-head strong { color: var(--ava-text, #EAF5F4); }
.card, .acip-card, .table-card { background: var(--ava-surface, #172A3A); border-color: var(--ava-border, #3E596A); color: var(--ava-text, #EAF5F4); }
.metric, .side-user { background: var(--ava-secondary, #121F2E); border-color: var(--ava-border, #3E596A); color: var(--ava-text, #EAF5F4); }
.field label, .metric strong, table td { color: var(--ava-text, #EAF5F4); }
.field input:not([type="checkbox"]), .field select, .field textarea,
input[type="text"], input[type="search"], input[type="password"], input[type="email"], input[type="tel"], input[type="number"], select, textarea {
  background: var(--ava-deep, #0D1D2B); color: var(--ava-text, #EAF5F4); border-color: var(--ava-border, #3E596A);
}
input::placeholder, textarea::placeholder { color: var(--ava-muted, #A4BDCA); opacity: 1; }
.btn.primary, .submit-analysis { background: var(--ava-primary, #007470); color: #fff; border-color: #168C83; }
.btn.primary:hover, .submit-analysis:hover { background: var(--ava-teal-hover, #0B8982); color: #fff; }
.btn.ghost { background: var(--ava-surface, #172A3A); color: var(--ava-text, #EAF5F4); border-color: var(--ava-border, #3E596A); }
.btn.ghost:hover { background: var(--ava-surface-hover, #1C3445); color: #fff; }
:focus-visible { outline: 2px solid var(--ava-focus, #FFB547); outline-offset: 3px; }
::selection { background: var(--ava-accent, #FFB547); color: var(--ava-secondary, #121F2E); }

/* ===== AVAJANG AURORA CIRCUIT • V6 | fallback shell ===== */
/* This file can load first; scoped styles in ai-theme/ux-refinement refine it later. */
html {color-scheme:dark}
body.ai-platform {background:#0A1420;color:#EAF5F4}
body.ai-platform .sidebar {background:#121F2E;border-color:#385367}
body.ai-platform .card {border-radius:17px;border-color:#395668;background:#162839;color:#EAF5F4}
body.ai-platform .page-content {min-width:0}
body.ai-platform .main-wrap {min-width:0}
body.ai-platform .table-wrap {max-width:100%;overflow-x:auto}
body.ai-platform .field label {color:#EAF5F4}
body.ai-platform .field-help {color:#A4BDCA}
