:root {
    --brand-navy: #082b49;
    --brand-navy-2: #0d385b;
    --brand-orange: #f45a00;
    --brand-orange-dark: #cc4700;
    --surface: #ffffff;
    --surface-soft: #f5f8fb;
    --surface-blue: #edf5fb;
    --border: #dbe6f0;
    --border-strong: #bfd0df;
    --text-primary: #0b2b4d;
    --text-secondary: #5e7693;
    --success: #10965f;
    --success-soft: #e5f7ef;
    --danger: #d63c3c;
    --danger-soft: #fdeced;
    --warning: #e58a00;
    --warning-soft: #fff4e3;
    --radius-sm: 7px;
    --radius-md: 11px;
    --radius-lg: 15px;
    --shadow-sm: 0 3px 12px rgba(8, 43, 73, .05);
    --shadow-md: 0 12px 34px rgba(8, 43, 73, .09);
    --orange: var(--brand-orange);
    --orange-dark: var(--brand-orange-dark);
    --navy: var(--brand-navy);
    --navy-2: var(--brand-navy-2);
    --ink: var(--text-primary);
    --muted: var(--text-secondary);
    --bg: var(--surface-soft);
    --line: var(--border);
    --white: var(--surface);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    overflow-x: hidden;
    background: var(--surface-soft);
    color: var(--text-primary);
    font-family: "Manrope Variable", Manrope, "Segoe UI", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

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

button,
a { -webkit-tap-highlight-color: transparent; }

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

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

:focus-visible {
    outline: 3px solid rgba(244, 90, 0, .34) !important;
    outline-offset: 2px;
}

.ti { font-size: 1.18em; line-height: 1; }

.portal-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
    color: var(--brand-navy);
}

.portal-logo-frame {
    display: grid;
    place-items: center;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    overflow: hidden;
    border: 1px solid rgba(8, 43, 73, .1);
    border-radius: 10px;
    background: #fff;
}

.portal-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.portal-brand-copy { min-width: 0; }
.portal-brand-copy strong,
.portal-brand-copy small { display: block; white-space: nowrap; }
.portal-brand-copy strong { font-size: 15px; font-weight: 800; letter-spacing: -.01em; }
.portal-brand-copy small { margin-top: 1px; color: #7892aa; font-size: 10px; font-weight: 700; letter-spacing: .32em; }

.portal-brand--sidebar {
    width: 100%;
    padding: 0 8px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, .12);
    color: #fff;
}

.portal-brand--sidebar .portal-logo-frame { border-color: rgba(255, 255, 255, .18); }
.portal-brand--sidebar .portal-brand-copy small { color: #a6bfd3; }

.side {
    position: fixed;
    z-index: 40;
    inset: 0 auto 0 0;
    display: flex;
    flex-direction: column;
    width: 240px;
    padding: 18px 12px 16px;
    background: var(--brand-navy);
    color: #fff;
    box-shadow: none;
}

.nav-caption {
    padding: 20px 10px 8px;
    color: #8caac0;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    margin: 2px 0;
    padding: 8px 10px;
    border-left: 3px solid transparent;
    border-radius: var(--radius-sm);
    color: #d2dfE8;
    font-size: 12px;
    font-weight: 700;
    transition: background-color .16s, color .16s, border-color .16s;
}

.nav-link:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-link.on { border-left-color: var(--brand-orange); background: rgba(255, 255, 255, .09); color: #fff; }
.staff-portal:not([data-page="staff"]) .nav-link.on { background: #fff; color: var(--brand-navy); }
.nav-link { color: #bdd2e4; font-size: 14px; font-weight: 700; border-radius: 7px; }

.nav-icon {
    display: grid;
    place-items: center;
    flex: 0 0 27px;
    width: 27px;
    height: 27px;
    border-radius: 6px;
    background: rgba(255, 255, 255, .08);
    color: #dce8ef;
    font-size: 16px;
}

.nav-link.on .nav-icon { color: var(--brand-orange); background: #fff; }

.side-profile {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, .12);
}

.profile-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; }
.avatar {
    display: grid;
    place-items: center;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: #eaf1f6;
    color: var(--brand-navy);
    font-size: 13px;
    font-weight: 800;
}

.profile-name { max-width: 150px; overflow: hidden; color: #fff; font-size: 13px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.profile-role { color: #97b0c4; font-size: 11px; }
.signout {
    width: 100%;
    margin-top: 7px;
    padding: 9px 8px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #c7d7e3;
    font: inherit;
    font-size: 13px;
    text-align: left;
    cursor: pointer;
}

.signout:hover { background: rgba(255, 255, 255, .07); color: #fff; }

.main {
    width: auto;
    max-width: none;
    min-height: 100vh;
    margin-left: 240px;
    padding: 0 clamp(18px, 2.4vw, 34px) 28px;
}

.workspace-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 66px;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--border);
}

.workspace-left,
.workspace-user { display: flex; align-items: center; gap: 10px; min-width: 0; }
.crumb { overflow: hidden; color: #7288a0; font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.crumb strong { color: var(--brand-navy); }
.workspace-user strong { display: block; font-size: 12px; }
.workspace-user span:not(.avatar) { display: block; color: var(--text-secondary); font-size: 10px; }

.mobile-menu,
.nav-close,
.side-scrim { display: none; }

.ey {
    display: inline-block;
    color: var(--brand-orange);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.h1 {
    margin: 4px 0 3px;
    color: var(--brand-navy);
    font-size: clamp(26px, 2.7vw, 38px);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -.045em;
}

.sub,
.muted { color: var(--text-secondary); }
.sub { margin: 3px 0 0; font-size: 12px; }
.small { font-size: 12px; }

.top,
.dashboard-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    margin: 0 0 16px;
}

.top {
    padding: 8px 0 14px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.top::after { display: none !important; }

.card {
    margin: 12px 0;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.card[href] { transition: border-color .16s, box-shadow .16s, transform .16s; }
.card[href]:hover { border-color: #f2a475; box-shadow: var(--shadow-md); transform: translateY(-1px); }
.card h2 { margin: 4px 0 8px; color: var(--brand-navy); font-size: 20px; line-height: 1.25; letter-spacing: -.025em; }
.card h3 { color: var(--brand-navy); }

.grid,
.grid3 { display: grid; gap: 12px; }
.grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid > .card,
.grid3 > .card { margin: 0; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 42px;
    padding: 8px 14px;
    border: 1px solid var(--brand-orange);
    border-radius: var(--radius-sm);
    background: var(--brand-orange);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 5px 13px rgba(244, 90, 0, .18);
    transition: background-color .16s, border-color .16s, box-shadow .16s;
}

.btn:hover { border-color: var(--brand-orange-dark); background: var(--brand-orange-dark); box-shadow: 0 7px 18px rgba(244, 90, 0, .22); }
.btn.alt { border-color: var(--border-strong); background: #fff; color: var(--brand-navy); box-shadow: none; }
.btn.alt:hover { border-color: #8ea9be; background: var(--surface-soft); }
.btn.danger { border-color: var(--danger); background: var(--danger); }
.btn.success,
.whatsapp-btn { border-color: var(--success); background: var(--success); }
.btn:disabled { cursor: not-allowed; opacity: .58; box-shadow: none; }

.field { display: block; margin: 10px 0; color: #263f58; font-size: 13px; font-weight: 750; }
.field input,
.field textarea,
.field select {
    display: block;
    width: 100%;
    min-height: 40px;
    margin-top: 5px;
    padding: 9px 11px;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    background: #fff;
    color: var(--text-primary);
    outline: 0;
    transition: border-color .16s, box-shadow .16s;
}

.field textarea { min-height: 90px; resize: vertical; }
.field input::placeholder,
.field textarea::placeholder { color: #91a2b2; }
.field input:focus,
.field textarea:focus,
.field select:focus { border-color: var(--brand-orange); box-shadow: 0 0 0 3px rgba(244, 90, 0, .11); }
.field input[type="checkbox"] { display: inline-block; width: 17px; min-height: 17px; height: 17px; margin: 0 8px 0 0; padding: 0; vertical-align: -4px; accent-color: var(--brand-orange); }
.field input[type="file"] { padding: 8px; background: var(--surface-soft); font-size: 12px; }
.file-note { display: block; margin-top: 5px; color: var(--text-secondary); font-size: 11px; font-weight: 550; }

.flash {
    position: relative;
    margin: 0 0 14px;
    padding: 10px 12px 10px 38px;
    border: 1px solid;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 700;
}

.flash::before { position: absolute; left: 13px; top: 9px; content: "!"; font-weight: 900; }
.flash.error { border-color: #efbcbc; background: var(--danger-soft); color: #8f2e2e; }
.flash.ok { border-color: #b8dfcd; background: var(--success-soft); color: #087348; }
.flash.ok::before { content: "\2713"; }

.pill,
.state {
    display: inline-flex;
    align-items: center;
    width: max-content;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    text-transform: capitalize;
    white-space: nowrap;
}

.pill { padding: 5px 8px; background: #fff0e8; color: #a23d00; }
.pill::before { width: 5px; height: 5px; margin-right: 6px; border-radius: 50%; background: var(--brand-orange); content: ""; }
.state { padding: 4px 7px; text-transform: uppercase; }
.state.on { background: var(--success-soft); color: #087348; }
.state.off { background: #edf1f5; color: #687e92; }

.table { width: 100%; min-width: 690px; border-collapse: separate; border-spacing: 0; }
.table th { padding: 9px 11px; border-bottom: 1px solid var(--border); background: #edf3f7; color: #496683; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-align: left; text-transform: uppercase; }
.table th:first-child { border-radius: 7px 0 0 7px; }
.table th:last-child { border-radius: 0 7px 7px 0; }
.table td { padding: 13px 14px; border-bottom: 1px solid #e6edf3; font-size: 13px; text-align: left; vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background-color .14s; }
.table tbody tr:hover { background: #fbfdff; }
.card:has(> .table),
.table-scroll { overflow-x: auto; }

.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 9px 0; padding: 11px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fafcfe; }
.setting-row .field { margin: 0; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.metric { position: relative; min-height: 112px; padding: 19px 16px 16px 98px; overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-md); background: #fff; box-shadow: var(--shadow-sm); }
.metric-icon { position: absolute; left: 18px; top: 18px; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 12px; background: #fff0e8; color: var(--brand-orange); font-size: 23px; }
.metric:nth-child(2) .metric-icon { background: #e9f4ff; color: #1479db; }
.metric:nth-child(3) .metric-icon { background: var(--success-soft); color: var(--success); }
.metric:nth-child(4) .metric-icon { background: var(--danger-soft); color: var(--danger); }
.metric-label { display: block; color: #617792; font-size: 10px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.metric-value { display: block; margin-top: 3px; color: var(--brand-navy); font-size: 23px; font-weight: 800; line-height: 1; }
.metric-note { display: block; margin-top: 6px; color: var(--text-secondary); font-size: 11px; }

.dashboard-heading { min-height: 104px; padding: 8px 0 10px; background: transparent; }
.dashboard-heading > div:first-child { padding-right: 0; }
.dashboard-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.workflow-tabs { display: flex; gap: 7px; margin: 0 0 12px; padding: 0; overflow-x: auto; scrollbar-width: thin; }
.workflow-tab { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; min-height: 38px; padding: 7px 11px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: #fff; color: #49627b; font-size: 12px; font-weight: 800; white-space: nowrap; }
.workflow-tab:hover { border-color: #8ea9be; }
.workflow-tab.selected { border-color: var(--brand-orange); background: #fff5ef; color: var(--brand-orange-dark); }
.workflow-count { display: grid; place-items: center; min-width: 21px; height: 21px; padding: 0 5px; border-radius: 5px; background: #eaf0f4; color: #526b83; font-size: 11px; }
.workflow-tab.selected .workflow-count { background: var(--brand-orange); color: #fff; }

.filter-panel { padding: 14px 16px; }
.filter-panel h2 { margin-bottom: 4px; font-size: 20px; }
.filter-grid { display: grid; grid-template-columns: minmax(190px, 2fr) repeat(4, minmax(120px, 1fr)); gap: 9px; align-items: end; }
.filter-grid .field { margin: 0; }
.filter-actions { display: flex; gap: 8px; margin-top: 11px; }

.register-card { padding: 0; overflow: hidden; }
.register-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px 11px; border-bottom: 1px solid var(--border); }
.register-head h2 { margin: 3px 0 0; font-size: 23px; }
.register-meta { color: var(--text-secondary); font-size: 11px; }
.pagination { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 7px; padding: 16px 12px 4px; border-top: 1px solid var(--border); }
.pagination-link { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; min-height: 34px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 7px; background: #fff; color: var(--brand-navy); font-size: 12px; font-weight: 800; text-decoration: none; }
.pagination-link:hover { border-color: var(--brand-orange); color: var(--brand-orange); }
.pagination-link.is-current { border-color: var(--brand-orange); background: var(--brand-orange); color: #fff; }
.pagination-link--wide { padding-inline: 14px; }
.pagination-gap { padding: 0 2px; color: var(--text-secondary); }
.ticket-main strong { display: block; color: var(--brand-navy); }
.ticket-main span { color: var(--text-secondary); font-size: 11px; }
.empty-state { padding: 34px 18px; color: var(--text-secondary); text-align: center; }

.phone-control { display: flex !important; align-items: stretch !important; margin-top: 5px !important; overflow: hidden; border: 1px solid var(--border-strong) !important; border-radius: var(--radius-sm) !important; background: #fff; }
.phone-control:focus-within { border-color: var(--brand-orange) !important; box-shadow: 0 0 0 3px rgba(244, 90, 0, .11); }
.phone-prefix { display: flex; align-items: center; padding: 0 12px; border-right: 1px solid var(--border); background: var(--surface-soft); color: var(--brand-navy); font-weight: 800; }
.phone-control input { min-height: 38px !important; margin: 0 !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
.phone-hint { display: block; margin-top: 4px; color: var(--text-secondary); font-size: 11px; }

.upload-zone { position: relative; display: flex; align-items: center; gap: 13px; min-height: 72px; margin-top: 6px; padding: 12px; border: 1px dashed #a9c4d8; border-radius: var(--radius-sm); background: #f9fcff; color: #34516c; cursor: pointer; }
.upload-zone:hover { border-color: var(--brand-orange); background: #fffaf7; }
.upload-zone .upload-icon { display: grid; place-items: center; flex: 0 0 42px; width: 42px; height: 42px; border-radius: 9px; background: #eaf3fa; color: var(--brand-navy); font-size: 22px; }
.upload-zone input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.upload-zone strong,
.upload-zone small { display: block; }
.upload-zone strong { font-size: 12px; }
.upload-zone small { margin-top: 2px; color: var(--text-secondary); font-size: 10px; }
.upload-files { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.upload-file { padding: 4px 7px; border-radius: 5px; background: var(--surface-blue); color: #36536e; font-size: 10px; }

.step { display: flex; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.step:last-child { border-bottom: 0; }
.num { display: grid; place-items: center; flex: 0 0 24px; width: 24px; height: 24px; border-radius: 50%; background: var(--brand-orange); color: #fff; font-size: 13px; font-weight: 800; }

.document-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.document-section { margin: 0; }
.document-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.document-card { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 9px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; }
.document-card:hover { border-color: #f2a475; }
.document-icon { display: grid; place-items: center; flex: 0 0 35px; width: 35px; height: 35px; border-radius: 8px; background: #fff0e8; color: var(--brand-orange); font-size: 19px; }
.document-copy { min-width: 0; }
.document-copy strong { display: block; overflow: hidden; color: var(--brand-navy); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.document-copy small { color: var(--text-secondary); font-size: 10px; }

.portal-footer { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 24px; padding: 14px 4px 0; border-top: 1px solid var(--border); color: var(--text-secondary); font-size: 11px; white-space: nowrap; }
.portal-footer a { color: var(--brand-orange); font-weight: 800; }

#ajax-loader { position: fixed !important; z-index: 100 !important; inset: auto 18px 18px auto !important; display: none; align-items: center !important; gap: 8px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 8px; background: #fff !important; color: var(--brand-navy) !important; font-size: 12px !important; font-weight: 800 !important; box-shadow: var(--shadow-md) !important; }
.loader-spinner { width: 15px; height: 15px; border: 2px solid #f6c4a7; border-top-color: var(--brand-orange); border-radius: 50%; animation: portal-spin .65s linear infinite; }
@keyframes portal-spin { to { transform: rotate(360deg); } }

.portal-dialog { width: min(92vw, 410px); padding: 0; border: 0; border-radius: 13px; color: var(--text-primary); box-shadow: 0 24px 70px rgba(8, 43, 73, .25); }
.portal-dialog::backdrop { background: rgba(5, 27, 45, .6); }
.portal-dialog form { padding: 24px; text-align: center; }
.portal-dialog-icon { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 50%; background: var(--warning-soft); color: var(--warning); font-size: 25px; }
.portal-dialog h2 { margin: 0; color: var(--brand-navy); font-size: 20px; }
.portal-dialog p { color: var(--text-secondary); font-size: 13px; }
.portal-dialog-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 18px; }
.portal-dialog--success { width: min(92vw, 460px); border-top: 5px solid var(--success); }
.portal-dialog--success .portal-dialog-icon { background: var(--success-soft); color: var(--success); }
.portal-dialog--success .ey { display: block; margin-bottom: 7px; color: var(--brand-orange); }
.portal-dialog--success p { margin: 12px 0 0; line-height: 1.6; }
.portal-dialog-actions--single { grid-template-columns: 1fr; }
.ticket-success-number { margin: 15px auto 0; padding: 10px 14px; border: 1px solid #b8dfcd; border-radius: 9px; background: var(--success-soft); color: var(--success); font-size: 17px; font-weight: 800; letter-spacing: .025em; }

/* Public home */
.public-page { background: #fff; }
.public-header { height: 68px; border-bottom: 1px solid var(--border); background: #fff; }
.public-container { width: min(1440px, calc(100% - 10vw)); margin: 0 auto; }
.public-header .public-container { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.public-nav { display: flex; align-items: center; gap: 34px; color: var(--brand-navy); font-size: 12px; font-weight: 800; }
.public-nav a:hover { color: var(--brand-orange); }
.public-hero { min-height: 510px; overflow: hidden; border-bottom: 1px solid var(--border); background: #f8fbfd; }
.public-hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(350px, .95fr) minmax(0, .4fr); gap: 30px; align-items: center; min-height: 565px; }
.public-image { position: absolute; z-index: 0; inset: 0 calc(-5vw) 0 56%; opacity: .45; }
.public-copy,.journey-panel { position: relative; z-index: 1; }
.public-copy { padding: 46px 28px 46px 0; }
.public-kicker { color: var(--brand-orange); font-size: 12px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; }
.public-kicker::before { display: inline-block; width: 28px; height: 2px; margin: 0 12px 3px 0; background: var(--brand-orange); content: ""; }
.public-copy h1 { max-width: 700px; margin: 14px 0 15px; color: var(--brand-navy); font-size: clamp(44px, 5vw, 68px); font-weight: 800; line-height: 1.04; letter-spacing: -.06em; }
.public-copy h1 span { display: block; color: var(--brand-orange); }
.public-copy > p { max-width: 625px; margin: 0; color: #4d6885; font-size: 17px; line-height: 1.55; }
.public-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 23px; }
.public-actions .btn { min-height: 50px; padding: 11px 23px; font-size: 13px; }
.benefit-row { display: flex; align-items: center; gap: 0; margin-top: 30px; }
.benefit { display: flex; align-items: center; gap: 9px; min-width: 150px; padding-right: 18px; margin-right: 18px; border-right: 1px solid var(--border); }
.benefit:last-child { margin-right: 0; border-right: 0; }
.benefit-icon { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: #fff0e8; color: var(--brand-orange); font-size: 20px; }
.benefit strong,
.benefit small { display: block; }
.benefit strong { color: var(--brand-navy); font-size: 12px; }
.benefit small { color: var(--text-secondary); font-size: 10px; }
.journey-panel { padding: 29px; border-radius: 18px; background: var(--brand-navy); color: #fff; box-shadow: var(--shadow-md); }
.journey-panel .public-kicker { color: #ff9b58; }
.journey-panel .public-kicker::before { display: none; }
.journey-panel h2 { margin: 8px 0 11px; font-size: 30px; line-height: 1.22; }
.journey-step { display: grid; grid-template-columns: 34px 1fr; gap: 11px; padding: 13px 0; border-bottom: 1px solid rgba(255, 255, 255, .14); }
.journey-step:last-of-type { border-bottom: 0; }
.journey-number { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--brand-orange); font-size: 12px; font-weight: 800; }
.journey-step strong,
.journey-step small { display: block; }
.journey-step strong { font-size: 15px; }
.journey-step small { margin-top: 5px; color: #bed1df; font-size: 14px; }
.public-image { display: none; }
.public-features { padding: 32px 0 18px; background: var(--surface-soft); text-align: center; }
.public-features h2 { margin: 6px 0 2px; color: var(--brand-navy); font-size: 25px; letter-spacing: -.035em; }
.public-features > .public-container > p { margin: 0; color: var(--text-secondary); }
.public-feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 20px; text-align: left; }
.public-feature { display: grid; grid-template-columns: 64px 1fr auto; gap: 20px; align-items: center; min-height: 145px; padding: 24px; border: 1px solid var(--border); border-radius: var(--radius-md); background: #fff; }
.public-feature-icon { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 11px; background: #fff0e8; color: var(--brand-orange); font-size: 25px; }
.public-feature:nth-child(2) .public-feature-icon { background: #e9f4ff; color: #1479db; }
.public-feature:nth-child(3) .public-feature-icon { background: var(--success-soft); color: var(--success); }
.public-feature-number { color: var(--brand-orange); font-size: 11px; font-weight: 800; }
.public-feature h3 { margin: 3px 0; color: var(--brand-navy); font-size: 20px; }
.public-feature p { margin: 0; color: var(--text-secondary); font-size: 14px; }
.public-arrow { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #edf3f7; color: var(--brand-navy); }
.public-footer { display: flex; justify-content: space-between; gap: 20px; padding: 17px 0; color: var(--text-secondary); font-size: 11px; }
.public-footer a { color: var(--brand-orange); font-weight: 800; }

/* Login */
.login-page { min-height: 100vh; background: #f5f9fc; }
.login-header { position: absolute; z-index: 3; inset: 0 0 auto; height: 82px; }
.login-header-inner { display: flex; align-items: center; justify-content: space-between; width: calc(100% - 10.8vw); height: 100%; margin: auto; }
.login-header .portal-logo-frame { width: 58px; height: 58px; flex-basis: 58px; }
.login-header .portal-brand-copy strong,.public-header .portal-brand-copy strong { font-size: 24px; }
.login-header .portal-brand-copy small,.public-header .portal-brand-copy small { font-size: 11px; }
.back-link { color: var(--brand-navy); font-size: 13px; font-weight: 800; }
.login-layout { display: grid; grid-template-columns: minmax(0, 1.13fr) minmax(500px, .87fr); min-height: 100vh; }
.login-visual { position: relative; display: flex; align-items: flex-start; min-height: 100vh; padding: 163px max(48px, 5.4vw) 60px; overflow: hidden; background: #f8fbfd; }
.login-visual::before { position: absolute; inset: 0; background: linear-gradient(180deg, #f8fbfd 0%, #f8fbfd 52%, rgba(248,251,253,.92) 62%, rgba(248,251,253,0) 100%); content: ""; }
.login-intro { position: relative; z-index: 1; max-width: 680px; }
.login-intro h1 { margin: 18px 0 16px; color: var(--brand-navy); font-size: clamp(64px, 6.8vw, 108px); font-weight: 800; line-height: 1.02; letter-spacing: -.065em; }
.login-intro h1 span { display: block; color: var(--brand-orange); }
.login-intro > p { max-width: 690px; margin: 0; color: #4f6983; font-size: 26px; line-height: 1.55; }
.login-benefits { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 60px; }
.login-benefit { display: grid; grid-template-columns: 42px 1fr; gap: 10px; align-items: center; }
.login-benefit .benefit-icon { width: 42px; height: 42px; }
.login-benefit strong,
.login-benefit small { display: block; }
.login-benefit strong { color: var(--brand-navy); font-size: 17px; }
.login-benefit small { color: var(--text-secondary); font-size: 13px; }
.login-panel { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 92px 4.5vw 50px 0; }
.login-card { position: relative; width: min(100%, 610px); padding: 49px 52px 30px; overflow: hidden; border: 1px solid var(--border); border-radius: 21px; background: #fff; box-shadow: 0 23px 58px rgba(8, 43, 73, .14); }
.login-card::before { position: absolute; inset: 0 0 auto; height: 5px; background: var(--brand-orange); content: ""; }
.login-card h2 { margin: 8px 0 2px; color: var(--brand-navy); font-size: 49px; line-height: 1.15; letter-spacing: -.045em; }
.login-card-subtitle { margin: 0; color: var(--text-secondary); font-size: 20px; }
.login-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 27px 0 36px; padding: 4px; border-radius: 10px; background: #eaf0f4; }
.login-tabs button { min-height: 54px; border: 0; border-radius: 8px; background: transparent; color: #647b91; font-weight: 800; cursor: pointer; }
.login-tabs button.on { background: #fff; color: var(--brand-navy); box-shadow: var(--shadow-sm); }
.login-panel-content { display: none; }
.login-panel-content.on { display: block; }
.login-panel-content h3 { margin: 0 0 4px; color: var(--brand-navy); font-size: 24px; }
.login-panel-copy { margin: 0 0 23px; color: var(--text-secondary); font-size: 15px; }
.login-card .field { font-size: 15px; }
.login-card .field input { min-height: 56px; padding: 13px 16px; font-size: 17px; }
.login-primary { width: 100%; min-height: 60px; margin-top: 5px; font-size: 16px; }
.login-hint { margin: 9px 0 0; color: var(--text-secondary); font-size: 14px; }
.login-divider { display: flex; align-items: center; gap: 14px; margin: 27px 0; color: #7b8ea1; font-size: 11px; font-weight: 800; text-transform: uppercase; }
.login-divider::before,
.login-divider::after { flex: 1; height: 1px; background: var(--border); content: ""; }
.login-google { display: flex; justify-content: center; min-height: 44px; }
.login-trust { display: flex; align-items: center; gap: 10px; margin: 28px 0 0; padding-top: 24px; border-top: 1px solid var(--border); color: var(--text-secondary); font-size: 12px; }
.login-trust i { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #fff0e8; color: var(--brand-orange); font-size: 17px; }
.login-footer { position: absolute; z-index: 4; right: 38px; bottom: 17px; color: var(--text-secondary); font-size: 11px; }
.login-footer a { color: var(--brand-orange); font-weight: 800; }
.password-wrap { position: relative; display: block; }
.password-wrap input { padding-right: 48px !important; }
.password-toggle { position: absolute; right: 7px; bottom: 7px; display: grid; place-items: center; width: 34px; height: 34px; border: 0; background: transparent; color: #56728d; cursor: pointer; }
.staff-help { margin-top: 12px; text-align: right; }
.staff-help a { color: var(--brand-orange); font-size: 12px; font-weight: 800; }

/* Security */
.security-layout { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(340px, .95fr); gap: 16px; }
.security-heading { min-height: 122px; padding: 24px 0; background-image: none; }
.security-heading > div:first-child { padding-right: 0; }
.security-card { min-height: 500px; padding: 25px; }
.security-title { display: flex; align-items: center; gap: 18px; margin-bottom: 25px; }
.security-hero-icon { display: grid; place-items: center; flex: 0 0 60px; width: 60px; height: 60px; border-radius: 12px; background: #fff0e8; color: var(--brand-orange); font-size: 29px; }
.security-title h2 { margin: 0 0 3px; }
.security-title p { margin: 0; }
.security-tips { display: grid; gap: 0; }
.security-tip { display: grid; grid-template-columns: 48px 1fr; gap: 14px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--border); }
.security-tip:last-child { border-bottom: 0; }
.security-tip-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--surface-blue); color: #1479db; font-size: 24px; }
.security-tip:nth-child(2) .security-tip-icon { background: var(--success-soft); color: var(--success); }
.security-tip:nth-child(3) .security-tip-icon { background: #fff0e8; color: var(--brand-orange); }
.security-tip:nth-child(4) .security-tip-icon { background: #f0ebff; color: #6944d5; }
.security-tip strong { display: block; color: var(--brand-navy); }
.security-tip p { margin: 3px 0 0; color: var(--text-secondary); font-size: 14px; }
.security-note { display: flex; gap: 12px; margin-top: 17px; padding: 15px; border-radius: 10px; background: #fff3eb; color: #9e3b00; }

/* Ticket detail */
.ticket-identity { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 10px; }
.ticket-identity span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border: 1px solid var(--border); border-radius: 7px; background: #fff; color: #36536e; font-size: 11px; }
.stage-flow,
.customer-progress { position: relative; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 9px; margin-top: 14px; }
.stage-box,
.customer-stage { padding: 11px; border: 1px solid var(--border); border-radius: 9px; background: #f8fafc; }
.stage-box.done,
.customer-stage.done { border-color: #b7e3ce; background: #eefaf4; }
.stage-box.current,
.customer-stage.current { border-color: #f4a878; background: #fff5ef; }
.stage-box b,
.customer-stage span { display: grid; place-items: center; width: 25px; height: 25px; margin-bottom: 7px; border-radius: 50%; background: #dfe8ef; color: #577087; font-size: 12px; font-weight: 800; }
.stage-box.done b,
.customer-stage.done span { background: var(--success); color: #fff; }
.stage-box.current b,
.customer-stage.current span { background: var(--brand-orange); color: #fff; }
.stage-box strong,
.stage-box small,
.customer-stage strong { display: block; }
.stage-box strong,
.customer-stage strong { color: var(--brand-navy); font-size: 12px; }
.stage-box small { color: var(--text-secondary); font-size: 10px; }
.ticket-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.ticket-facts div { padding: 9px; border-bottom: 1px solid var(--border); overflow-wrap: anywhere; }
.ticket-facts span { display: block; color: var(--text-secondary); font-size: 10px; }
.ticket-facts strong { display: block; margin-top: 3px; font-size: 12px; }
.stage-action { border-top: 3px solid var(--brand-orange); }
.stage-action form + form { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.role-notice { padding: 12px; border: 1px solid #b7e3ce; border-radius: 8px; background: var(--success-soft); color: #087348; }
.history-row { display: grid; grid-template-columns: 25px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.history-row:last-child { border-bottom: 0; }
.history-dot { display: grid; place-items: center; width: 23px; height: 23px; border-radius: 50%; background: #fff0e8; color: var(--brand-orange); font-size: 13px; }
.detail-list { display: grid; gap: 0; }
.detail-item { display: grid; grid-template-columns: minmax(120px, .7fr) 1.3fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.detail-item:last-child { border-bottom: 0; }
.detail-item span { color: var(--text-secondary); font-size: 11px; }
.detail-item p { margin: 0; color: var(--brand-navy); font-size: 12px; font-weight: 700; }
.form-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }

@media (max-width: 1180px) {
    .dashboard-heading { background-size: 280px auto; }
    .dashboard-heading > div:first-child { padding-right: 0; }
    .filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .public-hero-grid { grid-template-columns: minmax(0, 1fr) minmax(340px, .72fr); }
    .public-image { display: none; }
    .login-layout { grid-template-columns: minmax(0, 1fr) minmax(450px, .82fr); }
    .stage-flow,
    .customer-progress { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Account chrome and detail layouts use the same reference proportions. */
.customer-header { position: sticky; top: 0; z-index: 38; display: flex; align-items: center; gap: 15px; height: 64px; padding: 0 28px; border-bottom: 1px solid var(--border); background: #fff; }
.customer-header nav { display: flex; gap: 32px; margin-left: auto; font-size: 13px; font-weight: 800; }
.customer-header > strong { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ticket-form-card .grid { gap: 12px 30px; }
.ticket-form-card .field { margin: 4px 0; }
.ticket-form-card textarea { min-height: 65px; }
.ticket-form-card .upload-files:empty { display: none; }
.ticket-form-card .upload-error:empty { display: none; }
.customer-picker { border: 1px solid var(--line, #d9e2ea); border-radius: 12px; padding: 16px; margin: 18px 0; background: #f7fafc; }
.customer-search-results { display: grid; gap: 6px; max-height: 250px; overflow: auto; }
.customer-result { display: block; width: 100%; padding: 10px 12px; border: 1px solid #d7e2ec; border-radius: 8px; background: #fff; color: #102b47; text-align: left; cursor: pointer; font: inherit; }
.customer-result:hover, .customer-result:focus-visible { border-color: #f25a13; background: #fff5ef; }
.check-field { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.check-field input { width: auto; }
[data-page="admin"] .workspace-bar,[data-page="reports"] .workspace-bar { height: 54px; margin-bottom: 14px; }
[data-page="admin"] .top,[data-page="reports"] .top { padding: 0 0 9px; margin-bottom: 12px; }
[data-page="admin"] .h1,[data-page="reports"] .h1 { font-size: 33px; }
[data-page="admin"] .grid3 { margin-bottom: 15px; }
[data-page="admin"] .table td { padding: 6px 10px; font-size: 11px; }
[data-page="admin"] .table .btn { min-height: 28px; padding: 3px 10px; font-size: 11px; }
[data-page="admin"] .metric,[data-page="reports"] .metric { min-height: 98px; }
[data-page="reports"] .table td { padding: 9px 10px; font-size: 12px; }
[data-page="reports"] .table td:first-child { white-space: nowrap; }
[data-page="reports"] .table .btn { min-height: 34px; padding: 6px 10px; white-space: nowrap; font-size: 11px; }
[data-page="reports"] .report-result-note { border: 0; margin: -33px 0 0 auto; padding: 0; min-height: 33px; width: max-content; gap: 15px; pointer-events: none; }
[data-page="change_password"] .h1 { font-size: 44px; }
.security-card { min-height: 610px; padding: 28px; }
.security-card .field { margin: 24px 0; font-size: 15px; }
.security-card .field input { min-height: 52px; font-weight: 500; }
.security-card .form-actions { margin-top: 32px; }
.security-card .btn { min-height: 50px; padding: 12px 25px; font-size: 15px; }
.customer-portal .side { top: 64px; width: 102px; padding: 18px 0; border-right: 1px solid var(--border); background: #f8fbfd; color: var(--brand-navy); }
.customer-portal .side .portal-brand,.customer-portal .nav-caption,.customer-portal .side .profile-row { display: none; }
.customer-portal .nav-link { flex-direction: column; justify-content: center; gap: 6px; min-height: 80px; padding: 9px 5px; font-size: 11px; text-align: center; color: var(--brand-navy); }
.customer-portal .nav-icon { background: transparent; color: var(--brand-navy); font-size: 24px; }
.customer-portal .nav-link.on { background: #fff1e8; color: var(--brand-orange); }
.customer-portal .nav-link.on .nav-icon { color: var(--brand-orange); }
.customer-portal .main { margin-left: 102px; padding: 20px; min-height: calc(100vh - 64px); }
.customer-portal .workspace-bar { display: none; }
.customer-portal .signout { color: var(--text-secondary); text-align: center; font-size: 10px; padding: 8px; }
.customer-portal .side-profile { border-color: var(--border); }
.auth-page { min-height: 100vh; padding: 45px 18px; background: var(--surface-soft); }
.auth { width: min(100%,640px); margin: auto; padding: 36px; border: 1px solid var(--border); border-top: 5px solid var(--brand-orange); border-radius: 18px; background: #fff; box-shadow: var(--shadow-md); }
.auth .portal-brand { margin-bottom: 25px; }
.auth h1 { margin: 12px 0 0; font-size: 36px; line-height: 1.2; letter-spacing: -.04em; }
.auth .link { display: inline-block; margin: 12px; color: var(--brand-orange); font-weight: 700; }
.auth-footer { margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--border); color: var(--text-secondary); font-size: 11px; text-align: center; }
.auth-footer a { color: var(--brand-orange); }
.stage-flow { gap: 12px; margin-top: 25px; }
.stage-box { position: relative; padding: 20px 12px 12px; margin-top: 3px; }
.stage-box:before { position: absolute; top: -15px; left: 0; right: -13px; height: 2px; background: var(--border); content: ''; }
.stage-box:last-child:before { right: 0; }
.stage-box.done:before { background: var(--success); }
.stage-box b { position: absolute; top: -26px; left: 12px; border: 3px solid #fff; width: 26px; height: 26px; }
.stage-box.rejected { border-color: #efbcbc; background: var(--danger-soft); }
.stage-box.rejected b { color: #fff; background: var(--danger); }
.stage-box strong { font-size: 12px; }
.stage-box small { font-size: 10px; }
.ticket-facts { column-gap: 22px; row-gap: 0; }
.ticket-facts div { display: grid; grid-template-columns: 100px minmax(0,1fr); gap: 10px; padding: 8px 0; }
.ticket-facts strong { margin: 0; font-size: 12px; font-weight: 600; }
.ticket-facts span { font-size: 11px; }
.ticket-extra { display: grid; grid-template-columns: 120px 1fr; gap: 12px; margin: 0; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 12px; }
.ticket-extra strong { color: var(--text-secondary); font-weight: 500; }
[data-page="staff_ticket"] .workspace-bar { height: 48px; margin-bottom: 12px; }
[data-page="staff_ticket"] .top { padding: 8px 0; margin-bottom: 10px; }
[data-page="staff_ticket"] .h1 { font-size: 33px; }
[data-page="staff_ticket"] .card h2 { font-size: 17px; }
[data-page="staff_ticket"] .stage-box { padding-top: 12px; }
[data-page="staff_ticket"] .ticket-extra { padding: 5px 0; }
[data-page="staff_ticket"] .ticket-facts div { padding: 5px 0; }
[data-page="staff_ticket"] .stage-action { border-top: 1px solid var(--border); }
.document-section h2 { font-size: 15px; }
.feedback-card p { margin: 6px 0; }
.staff-history { display: grid; grid-template-columns: 28px 135px minmax(140px, .6fr) minmax(200px, 1.5fr) minmax(110px,.6fr) auto; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 12px; }
.staff-history time,.staff-history .history-author { color: var(--text-secondary); font-size: 11px; }
.staff-history p { margin: 0; color: var(--text-secondary); overflow-wrap: anywhere; }
.staff-history .history-whatsapp { color: var(--success); font-size: 20px; }
.customer-progress { gap: 0; margin-top: 24px; }
.customer-stage { position: relative; border: 0; background: transparent; padding: 0 8px; text-align: center; }
.customer-stage.done,.customer-stage.current { border: 0; background: transparent; }
.customer-stage:before { position: absolute; z-index: 0; left: -50%; right: 50%; top: 18px; height: 2px; background: var(--border); content: ''; }
.customer-stage:first-child:before { display: none; }
.customer-stage.done:before,.customer-stage.current:before { background: var(--success); }
.customer-stage span { position: relative; width: 38px; height: 38px; margin: 0 auto 8px; font-size: 17px; border: 3px solid #fff; }
.customer-stage strong { font-size: 12px; }
.customer-stage.rejected span { background: var(--danger); color: #fff; }
.upload-file { display: inline-flex; align-items: center; gap: 8px; padding: 6px 8px; max-width: 100%; font-size: 11px; }
.upload-file img { width: 40px; height: 40px; object-fit: cover; border-radius: 4px; }
.upload-file span { overflow-wrap: anywhere; }
.upload-file button { width: 30px; height: 30px; flex-shrink: 0; border: 0; border-radius: 5px; background: #fff; color: var(--danger); cursor: pointer; }
.upload-error { display: block; margin-top: 6px; font-size: 12px; color: var(--danger); }

@media (max-width: 1180px) {
    .staff-history { grid-template-columns: 28px 110px 1fr 1.4fr; }
    .history-author { grid-column: 3; }
    .history-whatsapp { grid-column: 4; }
    .customer-progress { gap: 20px 8px; }
    .customer-stage:before { display: none; }
}

@media (max-width: 1024px) {
    body.nav-open { overflow: hidden; }
    .side { width: min(84vw, 270px); transform: translateX(-104%); transition: transform .2s; box-shadow: 18px 0 45px rgba(5, 29, 49, .28); }
    .side.open { transform: translateX(0); }
    .nav-close { display: grid; place-items: center; position: absolute; right: 10px; top: 11px; width: 34px; height: 34px; border: 1px solid rgba(255, 255, 255, .15); border-radius: 8px; background: rgba(255, 255, 255, .08); color: #fff; cursor: pointer; }
    .side-scrim { display: block; position: fixed; z-index: 39; inset: 0; visibility: hidden; background: rgba(5, 25, 42, .58); opacity: 0; transition: opacity .2s; }
    .side-scrim.open { visibility: visible; opacity: 1; }
    .main { margin-left: 0; }
    .mobile-menu { display: grid; place-items: center; flex: 0 0 38px; width: 38px; height: 38px; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--brand-navy); cursor: pointer; }
    .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .public-container { width: min(100% - 34px, 900px); }
    .public-hero-grid { grid-template-columns: 1fr; padding: 36px 0; }
    .journey-panel { max-width: 650px; }
    .public-feature-grid { grid-template-columns: 1fr; }
    .login-layout { grid-template-columns: 1fr; }
    .login-visual { min-height: 550px; padding-top: 110px; }
    .login-panel { min-height: auto; padding: 40px 20px 75px; }
    .login-footer { position: static; padding: 15px 20px 24px; text-align: center; }
    .security-layout { grid-template-columns: 1fr; }
    .document-columns { grid-template-columns: 1fr; }
    .customer-header { padding: 0 18px; }
    .customer-header nav { gap: 16px; }
    .customer-portal .side { width: 230px; }
    .customer-portal .main { margin-left: 0; }
    .customer-portal .workspace-bar { display: flex; height: 42px; }
    .customer-portal .nav-link { flex-direction: row; min-height: 52px; justify-content: flex-start; padding: 10px 18px; gap: 12px; font-size: 14px; }
}

@media (min-width: 721px) and (max-width: 900px) {
    [data-page="staff_ticket"] .main > .grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    body { font-size: 12px; }
    .main { padding: 0 11px 24px; }
    .workspace-bar { height: 56px; margin-bottom: 14px; }
    .workspace-user { display: none; }
    .top,
    .dashboard-heading { display: block; padding: 15px; }
    .dashboard-heading { min-height: 0; background-image: none; }
    .dashboard-heading > div:first-child { padding-right: 0; }
    .dashboard-actions { display: grid; grid-template-columns: 1fr 1fr; margin-top: 12px; }
    .h1 { font-size: 27px; }
    .grid,
    .grid3 { grid-template-columns: 1fr; }
    .card { padding: 14px; border-radius: 9px; }
    .metric-grid { gap: 8px; }
    .metric { min-height: 88px; padding: 12px 11px 11px 60px; }
    .metric-icon { left: 11px; top: 12px; width: 39px; height: 39px; }
    .metric-value { font-size: 21px; }
    .filter-grid { grid-template-columns: 1fr 1fr; }
    .filter-grid .search-field { grid-column: 1 / -1; }
    .workflow-tabs { margin-right: -11px; margin-left: -11px; padding: 0 11px; }
    .register-head { align-items: flex-start; }
    .table { min-width: 0; }
    .table thead { display: none; }
    .table tbody { display: grid; gap: 8px; padding: 9px; }
    .table tr { display: block; width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: #fff; }
    .table td { display: grid; grid-template-columns: minmax(96px, 34%) 1fr; gap: 8px; width: 100%; padding: 8px 0; border-bottom: 1px dashed var(--border); overflow-wrap: anywhere; }
    .table td:last-child { border-bottom: 0; }
    .table td::before { display: block; color: var(--text-secondary); font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; content: attr(data-label); }
    .table td[colspan] { display: block; }
    .table td[colspan]::before { display: none; }
    .portal-footer { justify-content: center; white-space: normal; text-align: center; }
    .public-header { height: auto; }
    .public-header .public-container { align-items: flex-start; padding: 12px 0; }
    .public-nav { flex-direction: column; align-items: flex-end; gap: 4px; font-size: 11px; }
    .public-copy { padding: 18px 0 30px; }
    .public-copy h1 { font-size: 43px; }
    .public-copy > p { font-size: 14px; }
    .public-actions .btn { width: 100%; }
    .benefit-row { display: grid; grid-template-columns: 1fr; gap: 8px; }
    .benefit { margin: 0; padding: 0; border: 0; }
    .public-feature-grid { gap: 10px; }
    .public-footer { display: block; text-align: center; }
    .login-header { position: static; height: 70px; background: #fff; }
    .login-header-inner { width: calc(100% - 28px); }
    .login-visual { min-height: auto; padding: 38px 18px; }
    .login-intro h1 { font-size: 45px; }
    .login-intro > p { font-size: 14px; }
    .login-benefits { grid-template-columns: 1fr; gap: 10px; }
    .login-card { padding: 30px 22px 25px; }
    .login-card h2 { font-size: 32px; }
    .stage-flow,
    .customer-progress { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ticket-facts { grid-template-columns: 1fr; }
    .document-list { grid-template-columns: 1fr; }
    .security-card { min-height: 0; }
    .customer-header nav { display: none; }
    .customer-header .avatar { margin-left: auto; }
    .customer-header > strong { display: none; }
    .customer-portal .main { padding: 12px; }
    .customer-portal .crumb { white-space: normal; }
    .login-header .portal-brand-copy strong,.public-header .portal-brand-copy strong { font-size: 16px; }
    .login-header .portal-brand-copy small,.public-header .portal-brand-copy small { font-size: 8px; }
    .login-header .portal-logo-frame { width: 42px; height: 42px; flex-basis: 42px; }
    .login-header-inner { width: calc(100% - 28px); }
    .login-visual::before { background: rgba(248,251,253,.94); }
    .login-benefits { display: none; }
    .login-layout .login-panel { padding-top: 15px; }
    .login-intro h1 { font-size: 48px; }
    .login-card-subtitle { font-size: 15px; }
    .login-card .field input { font-size: 16px; }
    .staff-history { grid-template-columns: 25px 1fr auto; gap: 6px 10px; }
    .staff-history time { grid-column: 2; }
    .staff-history strong,.staff-history p,.staff-history .history-author { grid-column: 2; }
    .staff-history .history-whatsapp { grid-column: 3; grid-row: 1 / 4; }
    .stage-box { margin-top: 0; }
    .stage-box:before { display: none; }
    .stage-box b { position: static; border: 0; }
    .auth { padding: 25px 18px; }
    .btn { min-height: 44px; }
    .field input,.field select,.field textarea { font-size: 16px; }
    .portal-footer { display: block; font-size: 10px; }
}

@media (max-width: 430px) {
    .portal-brand-copy strong { font-size: 13px; }
    .portal-brand-copy small { font-size: 7px; }
    .filter-grid { grid-template-columns: 1fr; }
    .filter-grid .search-field { grid-column: auto; }
    .filter-actions { display: grid; grid-template-columns: 1fr 1fr; }
    .register-head { display: block; }
    .register-meta { display: block; margin-top: 5px; }
    .table td { grid-template-columns: 1fr; gap: 2px; }
    .stage-flow,
    .customer-progress { grid-template-columns: 1fr; }
    .stage-box,
    .customer-stage { display: grid; grid-template-columns: 34px 1fr; align-items: center; }
    .stage-box b,
    .customer-stage span { grid-row: 1 / 3; margin: 0; }
    .ticket-identity span { width: 100%; }
    .public-container { width: calc(100% - 24px); }
    .public-copy h1 { font-size: 37px; }
    .public-feature { grid-template-columns: 46px 1fr; }
    .public-feature-icon { width: 46px; height: 46px; }
    .public-arrow { display: none; }
    .login-intro h1 { font-size: 39px; }
    .login-panel { padding-right: 12px; padding-left: 12px; }
    .login-card { padding: 28px 17px 23px; border-radius: 15px; }
    .login-tabs { margin: 20px 0 23px; }
    .security-title { align-items: flex-start; }
    .security-tip { grid-template-columns: 42px 1fr; }
    .security-tip-icon { width: 42px; height: 42px; }
}

@media (max-width: 680px) {
    .mail-routing-overview { grid-template-columns: 1fr; }
    .mail-route-card { min-height: 0; }
    .mail-route-arrow { transform: rotate(90deg); }
    .mail-recipient-chips span { width: 100%; overflow-wrap: anywhere; }
}

/* Unified customer workspace and remaining active pages */
.customer-page-heading { margin-top: 4px; }
.back-link-inline { display: inline-flex; align-items: center; gap: 7px; margin: 2px 0 14px; color: var(--brand-navy); font-size: 13px; font-weight: 750; }
.back-link-inline:hover { color: var(--brand-orange); }
.profile-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 16px; }
.readonly-field { padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-soft); }
.readonly-field span { display: block; color: var(--text-secondary); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.readonly-field strong { display: block; margin-top: 4px; overflow-wrap: anywhere; }
.required { color: var(--danger); }
.account-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.account-item { padding: 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-soft); }
.account-item span { display: block; color: var(--text-secondary); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.account-item strong { display: block; margin-top: 3px; overflow-wrap: anywhere; }
.form-section { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--border); }
.form-section h3 { margin: 2px 0 3px; color: var(--brand-navy); font-size: 18px; }
.customer-ticket-form { max-width: 1180px; }
.customer-ticket-form > form > .btn { min-width: 220px; }
.customer-filter-grid { grid-template-columns: minmax(210px, 2fr) repeat(3, minmax(130px, 1fr)); }
.customer-ticket-hero { min-height: 190px; padding: 22px; background: transparent; }
.customer-ticket-hero > div:first-child { padding-right: 370px; }
.customer-ticket-status { display: grid; justify-items: start; gap: 7px; align-self: center; }
.customer-ticket-status small { color: var(--text-secondary); font-size: 11px; }
.customer-journey-card { padding: 18px; }
.customer-stage small { display: block; margin-top: 4px; color: var(--text-secondary); font-size: 10px; }
.customer-detail-grid { display: grid; grid-template-columns: .9fr 1.1fr 1fr; gap: 12px; }
.status-summary { display: grid; grid-template-columns: 58px 1fr; gap: 14px; align-items: start; margin-top: 17px; }
.status-summary-icon { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: var(--success-soft); color: var(--success); font-size: 28px; }
.status-summary h2 { margin: 2px 0; }
.status-summary p { margin: 0; color: var(--text-secondary); }
.customer-lower-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-top: 12px; }
.customer-lower-grid > .card,.customer-lower-grid > div > .document-columns > .card { margin: 0; }
.customer-lower-grid .document-columns { grid-template-columns: 1fr; }
.customer-lower-grid > div > .document-columns { height: 100%; }

/* Keep all active page headers, sections and controls on one density scale. */
.staff-portal .top:not(.ticket-hero) .sub,.staff-portal .dashboard-heading .sub { max-width: 740px; }
.dashboard-actions { display: flex; gap: 10px; }
.filter-panel .small { margin: 0 0 13px; }
.register-card .table { min-width: 760px; }
.document-card > .ti-download { margin-left: auto; color: #59728a; }
.role-list { font-size: 12px; }
.role-row strong { color: var(--brand-navy); }
.portal-footer { min-height: 46px; }

@media (min-width: 1025px) {
    .side { transform: none !important; }
}

@media (max-width: 1180px) {
    .customer-ticket-hero > div:first-child { padding-right: 250px; }
    .customer-ticket-hero { background-size: auto, 350px auto; }
    .customer-detail-grid,.customer-lower-grid { grid-template-columns: 1fr 1fr; }
    .customer-lower-grid > div { grid-column: 1 / -1; }
}

@media (max-width: 850px) {
    .customer-filter-grid { grid-template-columns: 1fr 1fr; }
    .profile-layout { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .customer-ticket-hero { min-height: 0; background-image: none; }
    .customer-ticket-hero > div:first-child { padding-right: 0; }
    .customer-ticket-status { margin-top: 14px; }
    .customer-detail-grid,.customer-lower-grid { grid-template-columns: 1fr; }
    .customer-lower-grid > div { grid-column: auto; }
    .account-summary { grid-template-columns: 1fr; }
    .customer-ticket-form { max-width: none; }
    .customer-ticket-form > form > .btn { width: 100%; }
    .profile-layout > .card { margin: 0; }
}

@media (max-width: 440px) {
    .customer-filter-grid { grid-template-columns: 1fr; }
}

/* Shared page modules: one source of truth for active portal pages. */
.create-ticket-note { display: flex; align-items: center; gap: 12px; max-width: 355px; padding: 13px; border-radius: 10px; background: #fff2e9; color: var(--brand-navy); }
.create-ticket-note > i { color: var(--brand-orange); font-size: 28px; }
.create-ticket-note strong,.create-ticket-note small { display: block; }
.create-ticket-note strong { font-size: 11px; }
.create-ticket-note small { margin-top: 2px; color: var(--text-secondary); font-size: 9px; }
.compact-title { margin-bottom: 10px; }
.compact-title .security-hero-icon { width: 45px; height: 45px; flex-basis: 45px; font-size: 22px; }
.role-list { display: grid; }
.role-row { display: grid; grid-template-columns: 28px 125px 1fr; gap: 9px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 11px; }
.role-row:last-child { border-bottom: 0; }
.role-icon { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 6px; background: #fff0e8; color: var(--brand-orange); font-size: 14px; }
.role-row > span:last-child { color: var(--text-secondary); }
.admin-directory-head { margin: -16px -16px 0; }
.directory-search { display: flex; align-items: center; gap: 8px; width: min(100%,270px); padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 7px; background: #fff; color: var(--text-secondary); }
.directory-search input { width: 100%; min-height: 34px; border: 0; outline: 0; background: transparent; font-size: 11px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); clip-path: inset(50%); white-space: nowrap; }
.report-filters { display: grid; grid-template-columns: minmax(220px,2fr) minmax(150px,1fr) minmax(160px,1fr) minmax(145px,1fr) minmax(145px,1fr); gap: 13px; align-items: end; }
.report-filters .field { margin: 0; }
.filter-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.filter-actions .btn { min-width: 110px; }
.result-note { display: flex; justify-content: space-between; gap: 12px; align-items: center; margin: 15px 0 0; padding-top: 14px; border-top: 1px solid #e6edf2; }
.security-hero-icon--blue { background: #e9f4ff; color: #1479db; }
.ticket-hero-actions { margin-top: 12px; }
.auth-loading-overlay { position: fixed; z-index: 99; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(8,43,73,.74); color: #fff; font-weight: 800; backdrop-filter: blur(3px); }

@media (max-width: 1250px) {
    .report-filters { grid-template-columns: repeat(3,minmax(0,1fr)); }
}

@media (max-width: 800px) {
    .report-filters { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 720px) {
    .create-ticket-note { max-width: none; margin-top: 13px; }
    .role-row { grid-template-columns: 28px 1fr; }
    .role-row > span:last-child { grid-column: 2; }
    .admin-directory-head { margin: -14px -14px 0; }
    .directory-search { width: 100%; margin-top: 8px; }
}

@media (max-width: 520px) {
    .report-filters { grid-template-columns: 1fr; }
    .filter-actions { display: grid; grid-template-columns: 1fr 1fr; }
    .filter-actions .btn { width: 100%; }
    .result-note { display: block; }
}

/* 2026 consistency pass: shared layout, image-free surfaces and admin controls. */
.page-heading,
.top,
.dashboard-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    min-height: 0;
    margin: 0 0 18px;
    padding: 8px 0 16px;
    border-bottom: 1px solid var(--border);
    background: transparent;
}

.page-heading--compact { align-items: center; }
.page-heading > div:first-child,
.top > div:first-child,
.dashboard-heading > div:first-child { min-width: 0; padding-right: 0; }
.page-heading .sub,
.top .sub,
.dashboard-heading .sub { max-width: 760px; font-size: 13px; }

.card { margin: 0 0 14px; }
.grid > .card,.grid3 > .card,.admin-settings-grid > .card { margin: 0; }
.compact-card { padding: 18px; }
.form-card-narrow { width: min(100%, 820px); }

.dashboard-heading,
.customer-ticket-hero {
    background-image: none !important;
    background-color: transparent;
}

.customer-ticket-hero {
    min-height: 0;
    padding: 0 0 16px;
}

.customer-ticket-hero > div:first-child { padding-right: 0; }

.public-hero {
    min-height: 0;
    background:
        radial-gradient(circle at 85% 14%, rgba(217,234,247,.72), transparent 28%),
        linear-gradient(135deg, #fbfdff 0%, #f5f9fc 60%, #fff6f0 100%);
}

.public-hero-grid {
    grid-template-columns: minmax(0,1.45fr) minmax(340px,.8fr);
    min-height: 520px;
}

.public-copy { padding: 52px 0; }
.journey-panel { box-shadow: none; }
.public-image { display: none !important; background: none !important; }

.login-page {
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at 18% 82%, rgba(255,231,215,.72), transparent 30%),
        radial-gradient(circle at 44% 10%, rgba(220,237,249,.78), transparent 32%),
        #f7fafc;
}

.login-layout { flex: 1 0 auto; min-height: calc(100vh - 48px); }

.login-layout { grid-template-columns: minmax(0,1.05fr) minmax(440px,.95fr); }
.login-visual,.login-panel { min-height: calc(100vh - 48px); }
.login-visual { padding-top: 138px; }
.login-intro { max-width: 610px; }
.login-intro h1 { margin: 14px 0 14px; font-size: clamp(50px,5vw,72px); line-height: 1.04; letter-spacing: -.05em; }
.login-intro > p { max-width: 600px; font-size: 18px; line-height: 1.55; }
.login-benefits { gap: 16px; margin-top: 42px; }
.login-benefit strong { font-size: 14px; }
.login-benefit small { font-size: 11px; }
.login-panel { padding-top: 88px; }
.login-card { width: min(100%,540px); padding: 38px 40px 28px; border-radius: 16px; }
.login-card h2 { font-size: 38px; letter-spacing: -.035em; }
.login-card-subtitle { font-size: 16px; }
.login-tabs { margin: 22px 0 28px; }
.login-tabs button { min-height: 48px; }
.login-panel-content h3 { font-size: 21px; }
.login-panel-copy { margin-bottom: 18px; font-size: 13px; }
.login-card .field { font-size: 13px; }
.login-card .field input { min-height: 50px; padding: 11px 14px; font-size: 15px; }
.login-primary { min-height: 52px; font-size: 14px; }
.login-hint { font-size: 12px; }
.login-divider { margin: 21px 0; }
.login-trust { margin-top: 22px; padding-top: 18px; }

.login-visual {
    background:
        linear-gradient(150deg, rgba(255,255,255,.92), rgba(244,249,252,.92)),
        transparent;
}

.login-visual::before {
    background:
        linear-gradient(135deg, transparent 0 62%, rgba(244,90,0,.05) 62% 64%, transparent 64%),
        radial-gradient(circle at 15% 76%, rgba(244,90,0,.07), transparent 26%);
}

.metric-grid--three { grid-template-columns: repeat(3,minmax(0,1fr)); }
.admin-settings-grid { display: grid; grid-template-columns: minmax(0,.95fr) minmax(0,1.05fr); gap: 14px; margin-bottom: 14px; }
.section-title-row { display: flex; align-items: flex-start; gap: 12px; min-width: 0; margin-bottom: 14px; }
.section-title-row h2 { margin: 2px 0 1px; }
.section-title-row p { margin: 0; color: var(--text-secondary); font-size: 12px; }
.section-icon { display: grid; place-items: center; flex: 0 0 42px; width: 42px; height: 42px; border-radius: 9px; background: #fff0e8; color: var(--brand-orange); font-size: 21px; }
.setting-row > span:first-child strong,.setting-row > span:first-child small { display: block; }
.setting-row > span:first-child small { margin-top: 2px; color: var(--text-secondary); font-size: 11px; }
.setting-control { cursor: pointer; }
.switch { position: relative; display: inline-flex; flex: 0 0 42px; width: 42px; height: 23px; }
.switch input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.switch > span { position: absolute; inset: 0; border-radius: 999px; background: #cdd8e1; transition: background-color .18s; }
.switch > span::after { position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(8,43,73,.2); transition: transform .18s; content: ""; }
.switch input:checked + span { background: var(--brand-orange); }
.switch input:checked + span::after { transform: translateX(19px); }
.switch input:focus-visible + span { outline: 3px solid rgba(244,90,0,.28); outline-offset: 2px; }
.role-list--compact .role-row { grid-template-columns: 28px 145px 1fr; }

.directory-card { padding: 0; overflow: hidden; }
.directory-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px; border-bottom: 1px solid var(--border); }
.directory-heading .section-title-row { margin: 0; }
.directory-tools { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.directory-filter-form { flex-wrap: wrap; }
.directory-select select { min-width: 130px; height: 38px; margin: 0; }
.directory-search { min-height: 42px; }
.directory-search input { min-height: 40px; font-size: 12px; }
.admin-table { min-width: 820px; }
.admin-table .btn { min-height: 34px; padding: 6px 10px; font-size: 11px; box-shadow: none; }

.staff-edit-layout { display: grid; grid-template-columns: minmax(0,1.25fr) minmax(320px,.75fr); gap: 14px; }
.staff-edit-layout > .card { margin: 0; }
.staff-edit-actions { display: flex; justify-content: flex-end; gap: 10px; grid-column: 1 / -1; padding-top: 2px; }

.site-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 48px;
    margin-top: 22px;
    padding: 13px 2px;
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 10px;
    line-height: 1.4;
    white-space: nowrap;
}

.site-footer > span:first-child { color: var(--brand-navy); font-size: 9px; font-weight: 800; letter-spacing: .2em; }
.site-footer a { color: var(--brand-orange); font-weight: 800; }
.site-footer--public { margin-top: 24px; }
.site-footer--login { flex: 0 0 auto; width: auto; margin: 0 4.5vw; border-top: 1px solid var(--border); }
.site-footer--auth { margin-top: 24px; }

@media (max-width: 1180px) {
    .public-hero-grid { grid-template-columns: minmax(0,1.2fr) minmax(320px,.8fr); }
    .admin-settings-grid { grid-template-columns: 1fr; }
    .staff-edit-layout { grid-template-columns: 1fr; }
    .staff-edit-actions { grid-column: auto; }
}

@media (max-width: 1024px) {
    .public-hero-grid { grid-template-columns: 1fr; min-height: 0; }
    .public-copy { padding-bottom: 10px; }
    .journey-panel { max-width: none; }
    .login-layout { grid-template-columns: 1fr; }
    .login-visual { min-height: 420px; padding-top: 105px; }
    .site-footer--login { width: auto; margin: 0 20px; }
}

@media (max-width: 720px) {
    .page-heading,.top,.dashboard-heading { display: block; padding: 0 0 13px; }
    .page-heading > .btn,.top > .btn,.dashboard-heading .dashboard-actions { width: 100%; margin-top: 12px; }
    .page-heading > .btn,.top > .btn { display: flex; }
    .metric-grid--three { grid-template-columns: 1fr; }
    .directory-heading { display: block; padding: 14px; }
    .directory-tools { display: grid; grid-template-columns: 1fr; margin-top: 12px; }
    .directory-tools .btn { width: 100%; }
    .directory-search { width: 100%; margin: 0; }
    .role-list--compact .role-row { grid-template-columns: 28px 1fr; }
    .role-list--compact .role-row > span:last-child { grid-column: 2; }
    .site-footer { display: grid; justify-items: center; gap: 4px; min-height: 58px; white-space: normal; text-align: center; }
    .site-footer--login { margin: 0 12px; }
    .login-page { overflow-x: hidden; }
    .login-layout,.login-visual,.login-panel,.login-card,.login-intro { min-width: 0; max-width: 100%; }
    .login-visual { padding: 30px 18px; }
    .login-panel { padding-right: 12px; padding-left: 12px; }
    .login-card { width: 100%; }
    .login-intro h1 { font-size: 38px; }
    .login-intro > p { font-size: 14px; }
    .login-card { padding: 27px 20px 23px; }
    .login-card h2 { font-size: 30px; }
    .login-card-subtitle { font-size: 14px; }
}

@media (max-width: 430px) {
    .staff-edit-actions { display: grid; grid-template-columns: 1fr; }
    .staff-edit-actions .btn { width: 100%; }
}

/* Production responsive system: compact, consistent and touch friendly. */
.portal-brand-copy strong { font-size: 14px; letter-spacing: -.02em; }
.portal-brand-copy small { letter-spacing: .24em; }
.login-header .portal-brand-copy strong,
.public-header .portal-brand-copy strong { font-size: 20px; }

.site-footer {
    padding: 13px 16px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
}
.footer-brand { color: var(--brand-navy); font-size: 9px; font-weight: 800; letter-spacing: .18em; }
.developer-credit { display: inline-flex; align-items: center; gap: 8px; }
.developer-credit > span { color: var(--text-secondary); }
.developer-credit a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 32px;
    padding: 6px 10px;
    border-radius: 7px;
    background: #eaf3fa;
    color: var(--brand-navy);
    font-weight: 800;
}
.developer-credit a:hover { background: var(--brand-navy); color: #fff; }
.developer-credit .ti { color: #0a66c2; font-size: 17px; }
.developer-credit a:hover .ti { color: #fff; }

@media (max-width: 720px) {
    body { font-size: 14px; }
    .main { padding: 0 14px 22px; }
    .workspace-bar { height: 58px; margin-bottom: 14px; }
    .workspace-left { width: 100%; }
    .crumb { flex: 1; font-size: 11px; }
    .mobile-menu { flex-basis: 42px; width: 42px; height: 42px; }

    .page-heading,.top,.dashboard-heading {
        display: block;
        margin-bottom: 14px;
        padding: 4px 0 14px;
    }
    .h1,[data-page="change_password"] .h1 { font-size: 28px; line-height: 1.12; }
    .sub,.page-heading .sub,.top .sub,.dashboard-heading .sub { font-size: 13px; line-height: 1.5; }
    .ey { font-size: 10px; }

    .card,.compact-card,.security-card { margin: 0 0 12px; padding: 16px; border-radius: 10px; }
    .card h2 { font-size: 19px; }
    .grid,.grid3,.staff-edit-layout,.security-layout,.customer-detail-grid,.customer-lower-grid,.document-columns { grid-template-columns: 1fr; gap: 12px; }

    .btn {
        min-height: 44px;
        padding: 10px 14px;
        border-width: 1px;
        border-radius: 8px;
        font-size: 13px;
        line-height: 1.2;
        box-shadow: 0 4px 10px rgba(244,90,0,.16);
    }
    .btn.alt { background: #fff; }
    .form-actions,.filter-actions,.staff-edit-actions,.dashboard-actions {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        width: 100%;
    }
    .form-actions .btn,.filter-actions .btn,.staff-edit-actions .btn,.dashboard-actions .btn,
    .page-heading > .btn,.top > .btn { width: 100%; }
    .field { margin: 12px 0; font-size: 13px; }
    .field input,.field textarea,.field select { min-height: 46px; padding: 11px 12px; font-size: 16px; }
    .field textarea { min-height: 104px; }

    .metric-grid,.metric-grid--three { grid-template-columns: 1fr 1fr; gap: 9px; }
    .metric {
        display: grid;
        grid-template-columns: 42px 1fr;
        grid-template-rows: auto auto auto;
        column-gap: 10px;
        min-height: 104px;
        padding: 13px;
    }
    .metric-icon { position: static; grid-row: 1 / 4; width: 42px; height: 42px; border-radius: 9px; font-size: 20px; }
    .metric-label { align-self: end; font-size: 9px; }
    .metric-value { margin: 2px 0 0; font-size: 22px; }
    .metric-note { margin: 2px 0 0; font-size: 10px; line-height: 1.35; }

    .workflow-tabs { gap: 8px; margin-right: -14px; margin-left: -14px; padding: 0 14px 4px; }
    .workflow-tab { min-height: 42px; padding: 8px 11px; }
    .filter-panel { padding: 16px; }
    .filter-grid,.report-filters,.customer-filter-grid { grid-template-columns: 1fr; gap: 10px; }
    .filter-grid .search-field { grid-column: auto; }

    .register-head,.directory-heading { display: block; padding: 15px; }
    .register-head h2 { font-size: 21px; }
    .register-meta { display: block; margin-top: 4px; }
    .directory-tools { margin-top: 12px; }
    .table-scroll { overflow: visible; }
    .table,.admin-table,.register-card .table { min-width: 0; }
    .table tbody { padding: 10px; }
    .table tr { padding: 8px 12px; border-radius: 9px; box-shadow: 0 2px 8px rgba(8,43,73,.04); }
    .table td { grid-template-columns: minmax(88px,34%) 1fr; gap: 10px; padding: 9px 0; font-size: 13px; }
    .table td .btn { width: 100%; margin: 2px 0; }

    .section-title-row { gap: 10px; margin-bottom: 12px; }
    .section-icon { flex-basis: 38px; width: 38px; height: 38px; font-size: 19px; }
    .setting-row { align-items: flex-start; padding: 12px; }
    .role-row,.role-list--compact .role-row { grid-template-columns: 28px 1fr; }
    .role-row > span:last-child,.role-list--compact .role-row > span:last-child { grid-column: 2; }

    .stage-flow,.customer-progress { grid-template-columns: 1fr; gap: 8px; margin-top: 12px; }
    .stage-box,.customer-stage { margin: 0; padding: 12px; }
    .stage-box::before,.customer-stage::before { display: none; }
    .stage-box b { position: static; margin-bottom: 7px; border: 0; }
    .ticket-facts,.account-summary { grid-template-columns: 1fr; }
    .document-list { grid-template-columns: 1fr; }
    .upload-zone { align-items: flex-start; min-height: 84px; }
    .security-title { gap: 12px; margin-bottom: 18px; }
    .security-hero-icon { flex-basis: 48px; width: 48px; height: 48px; font-size: 24px; }
    .security-tip { grid-template-columns: 42px 1fr; gap: 11px; }
    .security-tip-icon { width: 42px; height: 42px; }

    .customer-header { height: 58px; padding: 0 14px; }
    .customer-header .portal-logo-frame { flex-basis: 36px; width: 36px; height: 36px; }
    .customer-header .portal-brand-copy strong { font-size: 12px; }
    .customer-header .portal-brand-copy small { font-size: 7px; }
    .customer-header .avatar { flex-basis: 32px; width: 32px; height: 32px; }
    .customer-portal .main { padding: 0 14px 22px; }

    .public-container { width: min(100% - 28px,900px); }
    .public-header .public-container { align-items: center; gap: 10px; padding: 10px 0; }
    .public-header .portal-logo-frame { flex-basis: 38px; width: 38px; height: 38px; }
    .public-header .portal-brand-copy strong { font-size: 12px; }
    .public-header .portal-brand-copy small { font-size: 7px; letter-spacing: .18em; }
    .public-nav { flex-direction: row; gap: 7px; margin-left: auto; }
    .public-nav a { display: inline-flex; align-items: center; min-height: 38px; padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 7px; background: #fff; font-size: 11px; }
    .public-nav a:first-child { border-color: var(--brand-orange); background: var(--brand-orange); color: #fff; }
    .public-nav a:nth-child(2) { display: none; }
    .public-hero-grid { display: block; padding: 28px 0; }
    .public-copy { padding: 0; }
    .public-copy h1 { margin: 12px 0; font-size: 38px; letter-spacing: -.045em; }
    .public-copy > p { font-size: 14px; }
    .public-actions { display: grid; grid-template-columns: 1fr; gap: 9px; margin-top: 18px; }
    .public-actions .btn { min-height: 46px; width: 100%; }
    .benefit-row { margin-top: 20px; }
    .journey-panel { margin-top: 22px; padding: 20px; border-radius: 12px; }
    .journey-panel h2 { font-size: 23px; }
    .journey-step strong { font-size: 14px; }
    .journey-step small { font-size: 12px; }
    .public-features { padding: 27px 0 14px; }
    .public-feature-grid { gap: 10px; margin-top: 16px; }
    .public-feature { grid-template-columns: 46px 1fr; gap: 12px; min-height: 0; padding: 16px; }
    .public-feature-icon { width: 44px; height: 44px; }
    .public-feature h3 { font-size: 17px; }
    .public-feature p { font-size: 12px; }
    .public-arrow { display: none; }

    .login-header { position: static; height: 64px; border-bottom: 1px solid var(--border); background: #fff; }
    .login-header-inner { width: calc(100% - 28px); }
    .login-header .portal-logo-frame { flex-basis: 38px; width: 38px; height: 38px; }
    .login-header .portal-brand-copy strong { font-size: 12px; }
    .login-header .portal-brand-copy small { font-size: 7px; }
    .back-link { min-height: 38px; padding: 8px 9px; border: 1px solid var(--border-strong); border-radius: 7px; font-size: 0; }
    .back-link .ti { font-size: 17px; }
    .login-visual { display: none; }
    .login-layout { display: block; flex: none; min-height: 0; }
    .login-panel { min-height: 0; padding: 16px 14px 22px; }
    .login-card { width: 100%; padding: 28px 20px 22px; border-radius: 12px; box-shadow: 0 10px 28px rgba(8,43,73,.09); }
    .login-card h2 { font-size: 30px; }
    .login-tabs { margin: 19px 0 23px; }
    .login-tabs button { min-height: 44px; }

    .site-footer { display: grid; gap: 10px; margin-top: 16px; padding: 14px; text-align: center; white-space: normal; }
    .site-footer--login { margin: 0 14px 14px; }
    .developer-credit { display: grid; justify-items: center; gap: 6px; }
    .developer-credit a { min-height: 38px; }

    [data-page="reports"] .report-result-note {
        display: flex;
        justify-content: space-between;
        width: 100%;
        min-height: 0;
        margin: 12px 0 0;
        padding-top: 11px;
        border-top: 1px solid var(--border);
        pointer-events: auto;
    }
}

@media (max-width: 430px) {
    .metric-grid,.metric-grid--three { grid-template-columns: 1fr; }
    .public-nav a { padding: 7px 8px; font-size: 10px; }
    .footer-brand { font-size: 8px; }
    .stage-box { display: block; }
    .stage-box b { display: grid; grid-row: auto; margin: 0 0 7px; }
    .stage-box strong,.stage-box small { display: block; }
}

/* Service support, audited administration and final responsive controls. */
.developer-credit a {
    border: 1px solid var(--brand-orange);
    background: var(--brand-orange);
    color: #fff;
    box-shadow: 0 4px 10px rgba(244,90,0,.16);
}
.developer-credit a:hover { border-color: var(--brand-orange-dark); background: var(--brand-orange-dark); }
.developer-credit .ti,.developer-credit a:hover .ti { color: #fff; }

.customer-account { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.customer-portal .site-footer { margin-bottom: 68px; }
.customer-account > strong { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.customer-signout { min-height: 36px; padding: 6px 11px; border-color: var(--brand-orange); background: #fff; color: var(--brand-orange-dark); box-shadow: none; }
.customer-signout:hover { background: var(--brand-orange); color: #fff; }

.dashboard-summary { gap: 8px; }
.dashboard-summary .metric { min-height: 80px; padding: 13px 12px 11px 67px; }
.dashboard-summary .metric-icon { left: 12px; top: 12px; width: 44px; height: 44px; font-size: 19px; }
.dashboard-summary .metric-value { font-size: 20px; }
.workflow-tabs { gap: 9px; margin-bottom: 13px; }
.workflow-tab { min-height: 49px; padding: 10px 15px; font-size: 13px; }
.workflow-count { min-width: 26px; height: 26px; }

.responsive-filter-grid .mobile-filter-primary,
.responsive-filter-grid .advanced-filters { display: contents; }
.mobile-search-button,.mobile-filter-toggle { display: none; }

.address-fieldset,.address-fields { margin: 18px 0; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius-md); background: #fafcfe; }
.address-fieldset legend,.address-fields legend { padding: 0 8px; color: var(--brand-navy); font-weight: 800; }
.address-fieldset .field,.address-fields .field { margin: 6px 0; }

.support-layout,.admin-editor-grid { display: grid; grid-template-columns: minmax(0,1.35fr) minmax(310px,.65fr); gap: 14px; }
.support-layout > .card,.admin-editor-grid > .card { margin: 0 0 14px; }
.support-contact-grid { display: grid; gap: 9px; margin: 16px 0; }
.support-contact-card { display: flex; align-items: center; gap: 11px; padding: 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-soft); }
.support-contact-card > .ti { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: #fff0e8; color: var(--brand-orange); font-size: 19px; }
.support-contact-card span,.support-contact-card strong,.support-contact-card small { display: block; }
.support-contact-card small { color: var(--text-secondary); }
.support-contact-card--whatsapp > .ti { background: var(--success-soft); color: var(--success); }
.support-company { margin-top: 18px; padding-top: 15px; border-top: 1px solid var(--border); color: var(--text-secondary); font-size: 12px; }
.support-company p { margin: 5px 0; }
.support-company a { color: var(--brand-orange-dark); font-weight: 800; }
.support-description { margin-top: 16px; padding: 14px; border-radius: 8px; background: var(--surface-soft); white-space: normal; }
.support-history { display: grid; grid-template-columns: 28px 1fr; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.support-history:last-child { border-bottom: 0; }
.support-history strong { margin-right: 8px; }
.support-history p { margin: 6px 0; }
.support-history time { color: var(--text-secondary); font-size: 11px; }

.record-list,.audit-list,.admin-file-list { display: grid; gap: 8px; }
.record-link,.admin-file-row,.audit-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-soft); }
.record-link span,.record-link strong,.record-link small,.admin-file-row span,.admin-file-row strong,.admin-file-row small { display: block; }
.record-link small,.admin-file-row small,.audit-row small { color: var(--text-secondary); }
.admin-file-row > span:first-child { display: grid; grid-template-columns: 24px 1fr; gap: 3px 8px; align-items: center; min-width: 0; }
.admin-file-row > span:first-child .ti { grid-row: 1 / 3; color: var(--brand-orange); font-size: 20px; }
.admin-file-row > span:first-child strong { overflow-wrap: anywhere; }
.admin-file-row > span:last-child { flex: 0 0 auto; color: var(--danger); font-weight: 800; }
.admin-file-row input { accent-color: var(--danger); }
.audit-row { justify-content: flex-start; }
.audit-icon { display: grid; place-items: center; flex: 0 0 32px; width: 32px; height: 32px; border-radius: 8px; background: var(--surface-blue); color: #1479db; }
.audit-row strong,.audit-row small { display: block; }
.inline-actions { display: flex; align-items: center; gap: 7px; }
.inline-actions form { margin: 0; }

.whatsapp-prompt { display: grid; grid-template-columns: 42px 1fr auto; gap: 12px; align-items: center; margin: 0 0 14px; padding: 12px; border: 1px solid #a9dbc5; border-radius: 10px; background: var(--success-soft); }
.whatsapp-prompt-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 9px; background: #fff; color: var(--success); font-size: 23px; }
.whatsapp-prompt p { margin: 2px 0 0; color: #3e7160; font-size: 11px; }
.whatsapp-prompt-actions { display: flex; gap: 8px; }

.service-dock { position: fixed; z-index: 47; right: 20px; bottom: 20px; display: flex; gap: 8px; }
.dock-button { position: relative; display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid transparent; border-radius: 50%; color: #fff; font-size: 22px; cursor: pointer; box-shadow: 0 8px 22px rgba(8,43,73,.2); }
.dock-button--call { background: #1479db; }
.dock-button--whatsapp { background: var(--success); }
.dock-button--chat { background: var(--brand-orange); }
.dock-button[data-tooltip]::after { position: absolute; right: 0; bottom: calc(100% + 8px); width: max-content; padding: 6px 9px; border-radius: 6px; background: var(--brand-navy); color: #fff; font-size: 11px; font-weight: 800; opacity: 0; pointer-events: none; transform: translateY(3px); transition: opacity .15s,transform .15s; content: attr(data-tooltip); }
.dock-button[data-tooltip]:hover::after,.dock-button[data-tooltip]:focus-visible::after { opacity: 1; transform: translateY(0); }
.seva-chat { position: fixed; z-index: 48; right: 20px; bottom: 80px; display: flex; flex-direction: column; width: min(390px,calc(100vw - 28px)); max-height: min(590px,calc(100vh - 110px)); overflow: hidden; border: 1px solid var(--border); border-radius: 14px; background: #fff; box-shadow: 0 18px 48px rgba(8,43,73,.24); }
.seva-chat > header { display: flex; align-items: center; gap: 10px; padding: 13px; background: var(--brand-navy); color: #fff; }
.seva-chat > header strong,.seva-chat > header small { display: block; }
.seva-chat > header small { color: #bfd3e3; font-size: 10px; }
.seva-chat > header button { display: grid; place-items: center; width: 34px; height: 34px; margin-left: auto; border: 0; border-radius: 7px; background: rgba(255,255,255,.1); color: #fff; cursor: pointer; }
.seva-avatar { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; background: var(--brand-orange); font-size: 20px; }
.seva-messages { flex: 1; min-height: 190px; overflow-y: auto; padding: 13px; background: #f4f8fb; }
.seva-message { width: fit-content; max-width: 88%; margin-bottom: 9px; padding: 10px 11px; border-radius: 10px; background: #fff; color: #29465f; font-size: 12px; box-shadow: var(--shadow-sm); }
.seva-message--user { margin-left: auto; background: var(--brand-navy); color: #fff; }
.seva-action { display: block; width: fit-content; margin-top: 8px; color: var(--brand-orange-dark); font-weight: 800; }
.seva-quick { display: flex; gap: 6px; padding: 9px 12px; overflow-x: auto; border-top: 1px solid var(--border); }
.seva-quick button { flex: 0 0 auto; padding: 7px 9px; border: 1px solid var(--border-strong); border-radius: 999px; background: #fff; color: var(--brand-navy); font-size: 10px; font-weight: 800; cursor: pointer; }
.seva-input { display: grid; grid-template-columns: 1fr 40px; gap: 7px; padding: 11px; border-top: 1px solid var(--border); }
.seva-input input { min-width: 0; height: 40px; padding: 9px 10px; border: 1px solid var(--border-strong); border-radius: 7px; outline: 0; }
.seva-input button { display: grid; place-items: center; border: 0; border-radius: 7px; background: var(--brand-orange); color: #fff; cursor: pointer; }

.auth-page { display: flex; flex-direction: column; align-items: center; }
.auth { flex: 0 0 auto; margin: auto auto 0; }
.site-footer--auth { flex: 0 0 auto; width: min(100%,640px); margin: 18px auto auto; }

@media (max-width: 980px) {
    .support-layout,.admin-editor-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .site-footer { width: 100%; justify-items: center; align-content: center; margin-right: auto; margin-left: auto; text-align: center; }
    .site-footer > * { justify-self: center; }
    .developer-credit a { justify-content: center; background: var(--brand-orange); color: #fff; }
    .public-copy { text-align: center; }
    .public-copy > p { margin-right: auto; margin-left: auto; }
    .public-copy .public-kicker { justify-content: center; }
    .login-card > .ey,.login-card > h2,.login-card > .login-card-subtitle { display: block; text-align: center; }
    .customer-page-heading { text-align: center; }
    .customer-page-heading .sub { margin-right: auto; margin-left: auto; }
    .customer-account { gap: 7px; }
    .customer-account > strong { display: none; }
    .customer-account .avatar { display: none; }
    .customer-signout { min-height: 38px; padding: 7px 10px; font-size: 11px; }
    .customer-header .portal-brand { min-width: 0; }
    .customer-header .portal-brand-copy strong { overflow: hidden; max-width: 155px; text-overflow: ellipsis; }

    .responsive-filter-grid { display: block; }
    .responsive-filter-grid .mobile-filter-primary { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
    .responsive-filter-grid .mobile-filter-primary .search-field { grid-column: 1 / -1; margin: 0; }
    .mobile-search-button,.mobile-filter-toggle { display: inline-flex; width: 100%; }
    .responsive-filter-grid .advanced-filters { display: none; padding-top: 5px; }
    .responsive-filter-grid .advanced-filters.open { display: block; }
    .filter-panel .filter-actions { display: none; }

    .workflow-tabs { gap: 8px; }
    .workflow-tab { min-height: 48px; padding: 9px 13px; font-size: 12px; }
    .dashboard-summary .metric { min-height: 84px; }
    .inline-actions { align-items: stretch; flex-direction: column; }
    .inline-actions form,.inline-actions .btn { width: 100%; }
    .whatsapp-prompt { grid-template-columns: 38px 1fr; }
    .whatsapp-prompt-actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr; }
    .service-dock { right: 14px; bottom: 14px; }
    .dock-button { width: 44px; height: 44px; }
    .seva-chat { right: 14px; bottom: 67px; }
    .admin-file-row { align-items: flex-start; flex-direction: column; }
    .site-footer--auth { width: calc(100% - 28px); margin-bottom: 14px; }
}

/* Final cross-page consistency and mobile alignment overrides. */
.workspace-user form { margin: 0 0 0 4px; }
.staff-signout {
    min-height: 36px;
    padding: 7px 12px;
    border: 1px solid var(--brand-orange);
    background: #fff;
    color: var(--brand-orange-dark);
    box-shadow: none;
    white-space: nowrap;
}
.staff-signout:hover { background: var(--brand-orange); color: #fff; }

.customer-ticket-form { width: 100%; max-width: none; }
.customer-ticket-form .form-section { width: 100%; }
.customer-ticket-form > form > .btn { margin-top: 4px; }

.notification-routing-card form { width: min(100%, 900px); margin-top: 16px; }
.notification-routing-card textarea { min-height: 112px; resize: vertical; }
.mail-routing-overview { display: grid; grid-template-columns: minmax(0,1fr) 34px minmax(0,1fr); align-items: center; gap: 10px; margin-top: 18px; }
.mail-route-card { display: flex; align-items: flex-start; gap: 13px; min-height: 112px; padding: 17px; border: 1px solid var(--border); border-radius: 11px; }
.mail-route-card--customer { border-color: #f5cdb9; background: #fff5ef; }
.mail-route-card--internal { border-color: #bcd9f2; background: #eef7ff; }
.mail-route-icon { display: grid; flex: 0 0 auto; place-items: center; width: 42px; height: 42px; border-radius: 10px; font-size: 21px; }
.mail-route-card--customer .mail-route-icon { background: #ffe1d2; color: var(--brand-orange); }
.mail-route-card--internal .mail-route-icon { background: #d9edff; color: #0d67b5; }
.mail-route-card small { display: block; margin-bottom: 4px; color: var(--text-secondary); font-size: 9px; font-weight: 800; letter-spacing: .13em; }
.mail-route-card strong { display: block; color: var(--brand-navy); font-size: 15px; }
.mail-route-card p { margin: 5px 0 0; color: var(--text-secondary); font-size: 11px; line-height: 1.5; }
.mail-route-arrow { color: var(--brand-orange); font-size: 22px; text-align: center; }
.mail-recipient-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.mail-recipient-chips span { display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border: 1px solid #cce0ef; border-radius: 999px; background: #f5faff; color: #34566f; font-size: 11px; font-weight: 700; }
.privacy-note { display: flex; align-items: flex-start; gap: 10px; margin: 12px 0 16px; padding: 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-blue); color: var(--text-secondary); font-size: 12px; }
.privacy-note .ti { flex: 0 0 auto; margin-top: 2px; color: #1479db; font-size: 19px; }
.privacy-note strong { display: block; color: var(--brand-navy); }

.dock-button--chat { display: flex; width: auto; min-width: 48px; padding: 0 16px; border-radius: 999px; gap: 8px; box-shadow: 0 0 0 5px rgba(244,90,0,.13), 0 10px 26px rgba(8,43,73,.25); }
.dock-button--chat::before { position: absolute; inset: -6px; border: 2px solid rgba(244,90,0,.4); border-radius: inherit; content: ""; animation: seva-pulse 2.4s ease-out infinite; pointer-events: none; }
.dock-assistance-label { font-size: 12px; font-weight: 800; white-space: nowrap; }
.dock-button--chat[data-tooltip]::after { display: none; }
@keyframes seva-pulse { 0%,45% { opacity: .72; transform: scale(.94); } 75%,100% { opacity: 0; transform: scale(1.12); } }

.seva-chat { max-height: min(640px,calc(100dvh - 110px)); }
.seva-message { max-width: 92%; overflow-wrap: anywhere; word-break: normal; white-space: pre-wrap; }
.seva-action { padding-top: 2px; overflow-wrap: anywhere; }
.seva-quick { flex-wrap: wrap; overflow-x: visible; }
.seva-quick button { flex: 0 1 auto; }
.seva-input { align-items: end; }
.seva-input textarea { width: 100%; min-width: 0; min-height: 40px; max-height: 110px; padding: 9px 10px; overflow-y: auto; resize: none; border: 1px solid var(--border-strong); border-radius: 7px; outline: 0; line-height: 1.45; }
.seva-input textarea:focus { border-color: var(--brand-orange); box-shadow: 0 0 0 3px rgba(244,90,0,.1); }
.seva-input button { width: 40px; height: 40px; }
.seva-disclaimer { margin: 0; padding: 0 12px 10px; color: var(--text-secondary); font-size: 9px; text-align: center; }

.cookie-notice {
    position: fixed;
    z-index: 92;
    top: 50%;
    left: 50%;
    display: grid;
    grid-template-columns: 42px minmax(0,1fr) auto;
    align-items: center;
    gap: 12px;
    width: min(620px,calc(100vw - 40px));
    padding: 14px;
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 18px 48px rgba(8,43,73,.22);
    transform: translate(-50%,-50%);
}
.cookie-notice-open::after { position: fixed; z-index: 91; inset: 0; background: rgba(5,25,42,.56); backdrop-filter: blur(2px); content: ""; }
.cookie-notice__icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 9px; background: #fff0e8; color: var(--brand-orange); font-size: 21px; }
.cookie-notice strong,.cookie-notice small { display: block; }
.cookie-notice strong { margin-bottom: 2px; color: var(--brand-navy); }
.cookie-notice small { color: var(--text-secondary); font-size: 11px; line-height: 1.45; }
.cookie-notice .btn { white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
    .dock-button--chat::before { animation: none; }
}

@media (max-width: 720px) {
    .workspace-bar { gap: 8px; }
    .workspace-left { width: auto; flex: 1 1 auto; }
    .workspace-user { display: flex; flex: 0 0 auto; gap: 0; }
    .workspace-user > .avatar,.workspace-user > div { display: none; }
    .workspace-user form { margin: 0; }
    .staff-signout { min-height: 40px; padding: 8px 10px; font-size: 11px; }
    .staff-signout .ti { font-size: 16px; }

    .customer-ticket-form { padding: 16px; }
    .customer-ticket-form .account-summary,.customer-ticket-form .grid { width: 100%; }

    .site-footer,
    .site-footer--public,
    .site-footer--login,
    .site-footer--auth,
    .site-footer--portal {
        display: flex !important;
        flex-direction: column;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        max-width: 100%;
        margin-right: auto !important;
        margin-left: auto !important;
        padding-right: 12px;
        padding-left: 12px;
        text-align: center !important;
        white-space: normal;
    }
    .site-footer > *, .footer-brand, .developer-credit { width: 100%; justify-content: center !important; justify-items: center !important; text-align: center !important; }
    .developer-credit { display: flex; flex-direction: column; align-items: center; }
    .developer-credit a { width: fit-content; max-width: 100%; justify-content: center; }

    .dock-button--chat { min-width: 44px; height: 44px; padding: 0 13px; }
    .dock-assistance-label { font-size: 11px; }
    .seva-chat { inset: auto 10px 68px; width: auto; max-height: calc(100dvh - 84px); border-radius: 12px; }
    .seva-messages { min-height: 160px; }
    .seva-message { max-width: 94%; font-size: 12px; }
    .seva-quick { padding: 8px 10px; }
    .seva-quick button { min-height: 34px; }

    .cookie-notice { right: auto; bottom: auto; grid-template-columns: 36px 1fr; width: calc(100vw - 28px); max-height: calc(100dvh - 28px); padding: 14px; overflow-y: auto; }
    .cookie-notice__icon { width: 36px; height: 36px; }
    .cookie-notice .btn { grid-column: 1 / -1; width: 100%; }
}

@media (max-width: 430px) {
    .crumb { font-size: 10px; }
    .staff-signout { font-size: 0; width: 40px; padding: 8px; }
    .staff-signout .ti { margin: 0; font-size: 18px; }
    .dock-assistance-label { display: none; }
    .dock-button--chat { width: 44px; padding: 0; justify-content: center; }
    .dock-button--chat[data-tooltip]::after { display: block; }
}
