/* ==========================================================================
   Tag & Trace web — mirrors the Flutter mobile design system
   Light/dark tokens, cards, inputs, buttons, app shell, bottom nav.
   ========================================================================== */

:root {
    --primary: #2196F3;
    --primary-dark: #1976D2;
    --primary-light: #64B5F6;
    --primary-deep: #1565C0;
    --secondary: #03A9F4;
    --accent: #00BCD4;
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;
    --bg: #F8FAFB;
    --surface: #FFFFFF;
    --surface-2: #FFFFFF;
    --card: #FFFFFF;
    --text: #1F2937;
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --text-muted: #9CA3AF;
    --border: #E5E7EB;
    --border-light: #F0F2F5;
    --input-border: #E0E0E0;
    --divider: #E5E7EB;
    --nav: #FFFFFF;
    --shadow: 0 2px 10px rgba(17, 24, 39, .06);
    --shadow-lg: 0 8px 24px rgba(17, 24, 39, .10);
    --shadow-primary: 0 6px 16px rgba(33, 150, 243, .35);
    --radius-card: 16px;
    --radius-lg: 20px;
    --radius-input: 12px;
    --radius-btn: 12px;
    --safe-bottom: 20px;
    --chip-bg: #F1F3F6;
    --overlay: rgba(17, 24, 39, .45);
    --gradient-wave: linear-gradient(135deg, #1565C0 0%, #1E88E5 52%, #42A5F5 100%);
    color-scheme: light;
}

[data-theme="dark"] {
    --bg: #111827;
    --surface: #1F2937;
    --surface-2: #1E293B;
    --card: #1E293B;
    --text: #FFFFFF;
    --text-primary: #FFFFFF;
    --text-secondary: #9CA3AF;
    --text-muted: #6B7280;
    --border: #374151;
    --border-light: #263244;
    --input-border: #374151;
    --divider: #374151;
    --nav: #1F2937;
    --shadow: 0 2px 10px rgba(0, 0, 0, .25);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, .35);
    --chip-bg: #263244;
    --overlay: rgba(0, 0, 0, .6);
    color-scheme: dark;
}

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

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

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    min-height: 100vh;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

/* Material Symbols Rounded (self-contained sizing so a font failure can't \n   blow up the layout or show raw ligature text). */
.material-icons {
    font-family: 'Material Symbols Rounded' !important;
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    width: 1em;
    height: 1em;
    overflow: hidden;
    flex-shrink: 0;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}
.nav-item.active .material-icons {
    font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24;
}

::selection { background: rgba(33, 150, 243, .22); }

/* ---------------- Layout shell ---------------- */

.app-main {
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    padding-bottom: calc(118px + env(safe-area-inset-bottom, 0px));
    min-height: 100vh;
}
.app-main-chat { padding-bottom: 0; max-width: 100%; }
.app-errors { padding: 14px 20px 0; }
.sidebar { display: none; }

.page { width: 100%; }
.page-pad { padding: 20px; }
.page-narrow { max-width: 640px; margin: 0 auto; }
.page-medium { max-width: 780px; margin: 0 auto; }
.page-wide { max-width: 980px; margin: 0 auto; }

.guest-main { min-height: 100vh; }

.container {
    width: 100%;
    max-width: 980px;
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

.stack-8 > * + * { margin-top: 8px; }
.stack-12 > * + * { margin-top: 12px; }
.stack-16 > * + * { margin-top: 16px; }
.stack-20 > * + * { margin-top: 20px; }
.stack-24 > * + * { margin-top: 24px; }

.row { display: flex; align-items: center; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap { flex-wrap: wrap; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.grow { flex: 1; min-width: 0; }
.text-center { text-align: center; }
.muted { color: var(--text-secondary); }
.small { font-size: 13px; }
.tiny { font-size: 11px; }
.mono { font-family: 'Roboto Mono', ui-monospace, SFMono-Regular, Menlo, monospace; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------- Typography ---------------- */

h1, h2, h3, h4 { color: var(--text); font-weight: 700; line-height: 1.25; }
h1 { font-size: 24px; }
h2 { font-size: 18px; }
h3 { font-size: 16px; }
p { color: var(--text-secondary); }

.page-title { font-size: 24px; font-weight: 700; }
.page-subtitle { color: var(--text-secondary); font-size: 14px; margin-top: 4px; }
.section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin: 22px 0 12px;
}
.section-title .material-icons { font-size: 19px; color: var(--primary); }
.card-title { font-size: 16px; font-weight: 600; }

/* ---------------- Cards ---------------- */

.card {
    background: var(--card);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow);
    padding: 18px;
    border: 1px solid transparent;
    color: var(--text);
}
.card-lg { border-radius: var(--radius-lg); padding: 20px; }
.card-flat { box-shadow: none; border: 1px solid var(--border); }
.card + .card { margin-top: 14px; }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }

/* ---------------- Buttons ---------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 12px 20px;
    border-radius: var(--radius-btn);
    border: none;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease, opacity .15s ease;
    white-space: nowrap;
}
.btn:active { transform: scale(.985); }
.btn .material-icons { font-size: 19px; }
.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(33, 150, 243, .28);
}
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-primary:disabled {
    background: var(--primary);
    opacity: .55;
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}
.btn-gradient {
    background: var(--gradient-wave);
    color: #fff;
    box-shadow: var(--shadow-primary);
}
.btn-ghost {
    background: transparent;
    border: 1.5px solid var(--border);
    color: var(--text);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); background: rgba(33, 150, 243, .05); }
.btn-soft { background: rgba(33, 150, 243, .10); color: var(--primary); }
.btn-soft:hover { background: rgba(33, 150, 243, .16); color: var(--primary-dark); }
.btn-danger { background: rgba(239, 68, 68, .10); color: var(--error); }
.btn-danger:hover { background: var(--error); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-block { width: 100%; }
.btn-sm { min-height: 36px; padding: 8px 14px; font-size: 13px; border-radius: 10px; }
.btn-lg { min-height: 54px; padding: 16px 24px; font-size: 16px; }
.btn-icon {
    width: 40px;
    height: 40px;
    min-height: 0;
    padding: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--text-secondary);
    border: none;
}
.btn-icon:hover { background: var(--chip-bg); color: var(--primary); }
.btn-icon .material-icons { font-size: 22px; }

/* ---------------- Forms ---------------- */

.form-field { margin-bottom: 15px; }
.form-field:last-child { margin-bottom: 0; }
.form-field > label,
.form-field label.field-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 7px;
}
.form-field .hint { font-size: 12px; color: var(--text-secondary); margin-top: 6px; line-height: 1.45; }
.required { color: var(--error); }

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="file"],
select,
textarea {
    width: 100%;
    min-height: 48px;
    padding: 13px 14px;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--input-border);
    border-radius: var(--radius-input);
    font-size: 15px;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
    -webkit-appearance: none;
    appearance: none;
}
select {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='%236B7280'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 38px;
}
textarea { min-height: 110px; resize: vertical; line-height: 1.55; }
input::placeholder, textarea::placeholder { color: var(--text-muted); }
input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, .13);
}
input[type="file"] {
    padding: 10px 12px;
    font-size: 13px;
    color: var(--text-secondary);
    background: var(--bg);
    border-style: dashed;
}
input[type="date"] { min-height: 48px; }
input[type="radio"], input[type="checkbox"] { accent-color: var(--primary); }
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 0 14px;
}
.form-grid + .form-grid { margin-top: 0; }

/* Mobile style underlined auth inputs */
.auth-input {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--input-border);
    margin-bottom: 4px;
    transition: border-color .15s ease;
}
.auth-input:focus-within { border-bottom: 2px solid var(--primary); }
.auth-input .material-icons { font-size: 20px; color: var(--primary); flex-shrink: 0; }
.auth-input input {
    border: none;
    border-radius: 0;
    background: transparent;
    min-height: 50px;
    padding: 14px 2px;
    box-shadow: none !important;
}
.auth-input input:focus { box-shadow: none; }
.auth-input .prefix { font-weight: 600; color: var(--text); font-size: 15px; }
.auth-input .auth-prefix {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    padding: 4px 9px;
    border-radius: 8px;
    background: rgba(33, 150, 243, .10);
    border: 1px solid rgba(33, 150, 243, .20);
    color: var(--primary);
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}
.auth-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin: 2px 0 12px;
}

/* App PIN entry */
.pin-input {
    text-align: center;
    letter-spacing: 12px;
    font-size: 24px;
    font-weight: 700;
    text-indent: 12px; /* balances the trailing letter-spacing */
}
.pin-input::placeholder { letter-spacing: 8px; font-weight: 400; }
.pin-input-lg {
    font-size: 30px;
    letter-spacing: 16px;
    text-indent: 16px;
}
.auth-card .pin-input {
    border: 2px solid var(--input-border);
    border-radius: 14px;
    background: var(--surface);
}
.auth-card .pin-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(33, 150, 243, .13);
}

/* Type / provider options */
.type-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 14px;
    border: 1.5px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.type-option input { position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0; }
.type-option:hover { border-color: var(--primary-light); }
.type-option.selected,
.type-option:has(input:checked) {
    border-color: var(--primary);
    background: rgba(33, 150, 243, .06);
    box-shadow: 0 0 0 1px var(--primary) inset;
}
.type-option .material-icons { font-size: 22px; }

/* ---------------- Badges / pills ---------------- */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
    text-transform: capitalize;
}
.badge .material-icons { font-size: 13px; }
.badge-success { background: rgba(16, 185, 129, .12); color: #059669; }
.badge-info { background: rgba(33, 150, 243, .12); color: var(--primary-dark); }
.badge-warning { background: rgba(245, 158, 11, .14); color: #B45309; }
.badge-error { background: rgba(239, 68, 68, .12); color: #DC2626; }
.badge-neutral { background: var(--chip-bg); color: var(--text-secondary); }
[data-theme="dark"] .badge-success { color: #34D399; }
[data-theme="dark"] .badge-info { color: #64B5F6; }
[data-theme="dark"] .badge-warning { color: #FBBF24; }
[data-theme="dark"] .badge-error { color: #F87171; }

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(255, 255, 255, .2);
    color: #fff;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    cursor: pointer;
    transition: all .15s ease;
    white-space: nowrap;
}
.chip:hover { border-color: var(--primary-light); color: var(--primary); }
.chip.active, .chip.selected {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 3px 8px rgba(33, 150, 243, .25);
}
.chip-row {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 0 6px;
    scrollbar-width: none;
}
.chip-row::-webkit-scrollbar { display: none; }

/* ---------------- Avatar / icons ---------------- */

.avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
    object-fit: cover;
    overflow: hidden;
}
.avatar-lg { width: 64px; height: 64px; font-size: 22px; }
.avatar-glass { background: rgba(255, 255, 255, .22); color: #fff; border: 2px solid rgba(255, 255, 255, .5); }
.icon-tile {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(33, 150, 243, .10);
    color: var(--primary);
    flex-shrink: 0;
}
.icon-tile .material-icons { font-size: 21px; }
.icon-tile.green { background: rgba(16, 185, 129, .12); color: var(--success); }
.icon-tile.orange { background: rgba(245, 158, 11, .14); color: var(--warning); }
.icon-tile.red { background: rgba(239, 68, 68, .12); color: var(--error); }
.icon-tile.purple { background: rgba(139, 92, 246, .13); color: #8B5CF6; }
.icon-tile.grey { background: var(--chip-bg); color: var(--text-secondary); }
.icon-tile-lg { width: 54px; height: 54px; border-radius: 15px; }
.icon-tile-lg .material-icons { font-size: 27px; }

/* ---------------- App headers ---------------- */

.greeting-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 20px 0;
}
.greeting-header .greeting { font-size: 14px; color: var(--text-secondary); }
.greeting-header .name { font-size: 26px; font-weight: 700; color: var(--text); line-height: 1.2; margin-top: 2px; }
.pending-chip {
    display: inline-flex;
    margin-top: 7px;
    padding: 4px 10px;
    border-radius: 8px;
    background: rgba(245, 158, 11, .13);
    color: #B45309;
    font-size: 11px;
    font-weight: 600;
}
[data-theme="dark"] .pending-chip { background: #4E342E; color: #FFB74D; }
.header-actions { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.header-actions .btn-icon { color: var(--text-secondary); }
.header-lock-form { display: inline-flex; margin: 0; }
.header-lock-button:hover { color: var(--error) !important; background: rgba(239, 68, 68, .10); }

.gradient-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    padding: 22px 20px 24px;
    border-radius: 0;
    position: relative;
}
.gradient-header h1 { color: #fff; font-size: 24px; font-weight: 700; }
.gradient-header p { color: rgba(255, 255, 255, .85); font-size: 13px; margin-top: 3px; }
.gradient-header .btn-icon { color: #fff; background: rgba(255, 255, 255, .18); }
.gradient-header .btn-icon:hover { background: rgba(255, 255, 255, .3); color: #fff; }

.wave-header {
    position: relative;
    background: var(--gradient-wave);
    color: #fff;
    padding: 20px 20px 36px;
    overflow: hidden;
}
.wave-header::after {
    content: "";
    position: absolute;
    left: -10%;
    bottom: -46px;
    width: 120%;
    height: 80px;
    background: var(--bg);
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}
.wave-header > * { position: relative; z-index: 1; }
.wave-header .back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .2);
    color: #fff;
}
.wave-header .back .material-icons { font-size: 22px; }
.wave-title { color: #fff; font-size: 20px; font-weight: 700; }
.wave-sub { color: rgba(255, 255, 255, .88); font-size: 13px; margin-top: 3px; }

/* Auth screens */
.auth-screen {
    position: relative;
    min-height: 100vh;
    background: var(--bg);
    overflow: hidden;
    display: flex;
    justify-content: center;
}
.auth-hero {
    position: absolute;
    inset: 0 0 auto 0;
    height: 320px;
    background: var(--gradient-wave);
    overflow: hidden;
}
.auth-hero::after {
    content: "";
    position: absolute;
    left: -12%;
    bottom: -70px;
    width: 124%;
    height: 130px;
    background: var(--bg);
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}
.auth-hero-inner {
    position: relative;
    z-index: 1;
    padding: 54px 24px 0;
    text-align: center;
    color: #fff;
}
.auth-logo {
    width: 76px;
    height: 76px;
    border-radius: 20px;
    margin: 0 auto 12px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    box-shadow: 0 8px 22px rgba(13, 71, 161, .25);
}
.auth-logo img { width: 100%; height: 100%; object-fit: contain; }
.auth-brand { font-size: 26px; font-weight: 700; letter-spacing: .2px; }
.auth-tagline { font-size: 13px; opacity: .88; margin-top: 2px; }
.auth-lang {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 4px;
    color: #fff;
    background: rgba(255, 255, 255, .18);
    border: none;
    border-radius: 10px;
    padding: 6px 8px;
    font-size: 12px;
}
.auth-lang .material-icons { font-size: 17px; }
.auth-wrap {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 440px;
    padding: 244px 24px 40px;
    margin: 0 auto;
}
.auth-card {
    background: var(--card);
    border-radius: 20px;
    box-shadow: 0 18px 44px rgba(17, 24, 39, .14);
    padding: 24px 22px;
    animation: auth-in .45s ease both;
}
@keyframes auth-in {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}
.auth-card h2 { font-size: 24px; font-weight: 700; }
.auth-card .auth-sub { color: var(--text-secondary); font-size: 13px; margin: 3px 0 20px; }
.auth-card .auth-input { margin-bottom: 10px; }
.auth-card .forgot {
    display: block;
    text-align: right;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    margin: 4px 0 16px;
}
.auth-switch {
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 18px;
}
.auth-switch a { font-weight: 600; color: var(--primary); }
.auth-legal {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
    font-size: 12px;
    color: var(--text-muted);
}
.auth-legal a { color: var(--text-secondary); }
.auth-toggle {
    display: flex;
    gap: 6px;
    background: var(--chip-bg);
    padding: 4px;
    border-radius: 12px;
    margin-bottom: 18px;
}
.auth-toggle button {
    flex: 1;
    border: none;
    background: transparent;
    padding: 9px 10px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}
.auth-toggle button.active {
    background: var(--surface);
    color: var(--primary);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
}

/* ---------------- Alerts ---------------- */

.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 15px;
}
.alert .material-icons { font-size: 19px; flex-shrink: 0; }
.alert-error { background: rgba(239, 68, 68, .10); color: #B91C1C; border: 1px solid rgba(239, 68, 68, .30); }
.alert-success { background: rgba(16, 185, 129, .10); color: #047857; border: 1px solid rgba(16, 185, 129, .30); }
.alert-info { background: rgba(33, 150, 243, .09); color: #0369A1; border: 1px solid rgba(33, 150, 243, .25); }
.alert-warning { background: rgba(245, 158, 11, .11); color: #92400E; border: 1px solid rgba(245, 158, 11, .30); }
[data-theme="dark"] .alert-error { color: #F87171; }
[data-theme="dark"] .alert-success { color: #34D399; }
[data-theme="dark"] .alert-info { color: #64B5F6; }
[data-theme="dark"] .alert-warning { color: #FBBF24; }

/* ---------------- Bottom navigation ---------------- */

.bottom-nav {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    width: calc(100% - 40px);
    max-width: 560px;
    height: 72px;
    background: var(--nav);
    border-radius: 28px;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, .08), 0 4px 16px rgba(33, 150, 243, .08);
    display: flex;
    align-items: center;
    justify-content: space-evenly;
    z-index: 80;
    padding: 0 6px;
}
[data-theme="dark"] .bottom-nav { box-shadow: 0 -4px 24px rgba(0, 0, 0, .35), 0 4px 16px rgba(33, 150, 243, .12); }
.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 64px;
    height: 100%;
    color: var(--text-muted);
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}
.nav-item:hover { color: var(--primary); }
.nav-item .nav-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 0;
    border-radius: 12px;
    transition: all .2s ease;
}
.nav-item .material-icons { font-size: 26px; }
.nav-item .nav-label { font-size: 11px; line-height: 1; font-weight: 400; }
.nav-item.active { color: var(--primary); }
.nav-item.active .nav-icon-wrap {
    background: rgba(33, 150, 243, .10);
    padding: 6px 16px;
}
.nav-item.active .nav-label { font-weight: 600; }
.nav-center {
    width: 58px;
    height: 58px;
    margin-bottom: 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1565C0, #42A5F5);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 12px rgba(33, 150, 243, .40);
    flex-shrink: 0;
    text-decoration: none;
    border: none;
    transition: transform .15s ease;
}
.nav-center:hover { transform: translateY(-2px) scale(1.03); color: #fff; }
.nav-center .material-icons { font-size: 30px; color: #fff; }

.chat-fab {
    position: fixed;
    right: max(20px, calc((100vw - 980px) / 2 + 20px));
    bottom: calc(108px + env(safe-area-inset-bottom, 0px));
    height: 52px;
    padding: 0 18px;
    border-radius: 26px;
    background: var(--primary);
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
    box-shadow: 0 6px 16px rgba(33, 150, 243, .38);
    z-index: 79;
    text-decoration: none;
}
.chat-fab:hover { background: var(--primary-dark); color: #fff; }
.chat-fab .material-icons { font-size: 21px; }

/* ---------------- Dashboard ---------------- */

.overview-card {
    margin: 16px 20px 0;
    padding: 20px;
    border-radius: 20px;
    background: linear-gradient(135deg, #1565C0 0%, #1E88E5 52%, #42A5F5 100%);
    color: #fff;
    box-shadow: 0 8px 22px rgba(21, 101, 192, .28);
}
.overview-card h2 { color: #fff; font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.overview-card h2 .material-icons { font-size: 19px; opacity: .9; }
.overview-stats { display: flex; margin-top: 16px; }
.overview-stat { flex: 1; text-align: center; position: relative; }
.overview-stat + .overview-stat::before {
    content: "";
    position: absolute;
    left: 0;
    top: 12%;
    height: 76%;
    width: 1px;
    background: rgba(255, 255, 255, .22);
}
.overview-stat .value { font-size: 27px; font-weight: 700; line-height: 1.2; }
.overview-stat .label { font-size: 12px; color: rgba(255, 255, 255, .82); margin-top: 3px; }

.quick-actions {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 0 20px 4px;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
}
.quick-actions::-webkit-scrollbar { display: none; }
.quick-action {
    flex: 0 0 100px;
    width: 100px;
    height: 120px;
    border-radius: 20px;
    padding: 12px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #fff;
    text-decoration: none;
    text-align: center;
    scroll-snap-align: start;
    box-shadow: 0 4px 10px rgba(17, 24, 39, .13);
    transition: transform .15s ease;
}
.quick-action:hover { transform: translateY(-2px); color: #fff; }
.quick-action .qa-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .20);
    display: flex;
    align-items: center;
    justify-content: center;
}
.quick-action .qa-icon .material-icons { font-size: 24px; color: #fff; }
.quick-action .qa-label { font-size: 12px; font-weight: 600; line-height: 1.2; }
.qa-missing { background: linear-gradient(135deg, #667EEA, #764BA2); }
.qa-document { background: linear-gradient(135deg, #F093FB, #F5576C); }
.qa-vehicle { background: linear-gradient(135deg, #4FACFE, #00F2FE); }
.qa-motorcycle { background: linear-gradient(135deg, #43E97B, #38F9D7); }
.qa-plate { background: linear-gradient(135deg, #FA709A, #FEE140); }
.qa-permit { background: linear-gradient(135deg, #3F51B5, #5C6BC0); }
.qa-national { background: linear-gradient(135deg, #1565C0, #42A5F5); }
.qa-passport { background: linear-gradient(135deg, #6A1B9A, #AB47BC); }

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 20px;
    margin-bottom: 12px;
}
.section-heading h2 { font-size: 18px; font-weight: 700; }
.section-heading a { font-size: 14px; font-weight: 600; color: var(--primary); }

.report-card {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 14px;
    background: var(--card);
    border-radius: 16px;
    box-shadow: var(--shadow);
    text-decoration: none;
    color: var(--text);
    transition: transform .15s ease, box-shadow .15s ease;
}
.report-card:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); color: var(--text); }
.report-card .type-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
}
.report-card .type-icon .material-icons { font-size: 24px; }
.report-card .rc-body { flex: 1; min-width: 0; }
.report-card .rc-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.report-card .rc-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.report-card .rc-number { font-size: 11px; color: var(--text-secondary); }
.report-card .rc-date { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.report-card .material-icons.chevron { color: var(--text-muted); font-size: 20px; }

.type-missing { background: linear-gradient(135deg, #667EEA, #764BA2); }
.type-document { background: linear-gradient(135deg, #F093FB, #F5576C); }
.type-permit { background: linear-gradient(135deg, #3F51B5, #7986CB); }
.type-vehicle { background: linear-gradient(135deg, #4FACFE, #00F2FE); }
.type-motorcycle { background: linear-gradient(135deg, #43E97B, #38F9D7); }
.type-plate { background: linear-gradient(135deg, #FA709A, #FEE140); }

.empty-state {
    text-align: center;
    padding: 44px 24px;
    background: var(--card);
    border-radius: 18px;
    box-shadow: var(--shadow);
}
.empty-state .empty-icon {
    width: 76px;
    height: 76px;
    margin: 0 auto 14px;
    border-radius: 50%;
    background: rgba(33, 150, 243, .10);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}
.empty-state .empty-icon .material-icons { font-size: 36px; }
.empty-state h3 { font-size: 17px; font-weight: 700; margin-bottom: 5px; }
.empty-state p { font-size: 13px; max-width: 320px; margin: 0 auto 18px; }

/* ---------------- Report list ---------------- */

.list-search {
    background: var(--card);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 14px 16px 12px;
    margin: -12px 16px 0;
    position: relative;
    z-index: 2;
}
.search-box {
    display: flex;
    align-items: center;
    gap: 9px;
    background: var(--bg);
    border-radius: 14px;
    padding: 0 12px;
    height: 46px;
}
.search-box .material-icons { font-size: 20px; color: var(--text-muted); }
.search-box input {
    border: none;
    background: transparent;
    box-shadow: none !important;
    padding: 0;
    min-height: 0;
    height: 100%;
    font-size: 14px;
    border-radius: 0;
}
.list-filters { margin-top: 11px; }

/* ---------------- Report detail ---------------- */

.detail-hero {
    position: relative;
    background: linear-gradient(135deg, #1565C0 0%, #1E88E5 55%, #42A5F5 100%);
    color: #fff;
    padding: 14px 20px 52px;
    overflow: hidden;
}
.detail-hero::after {
    content: "";
    position: absolute;
    left: -8%;
    bottom: -38px;
    width: 116%;
    height: 76px;
    background: var(--bg);
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}
.detail-hero > * { position: relative; z-index: 1; }
.detail-hero-top { display: flex; align-items: center; justify-content: space-between; }
.detail-hero .back {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.detail-hero .hero-type {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 18px;
}
.detail-hero .hero-type .avatar { background: rgba(255, 255, 255, .22); }
.detail-hero h1 { color: #fff; font-size: 21px; font-weight: 700; }
.detail-hero p { color: rgba(255, 255, 255, .85); font-size: 12px; }
.invoice-card {
    background: var(--card);
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(17, 24, 39, .10);
    margin: -30px 20px 0;
    position: relative;
    z-index: 3;
    overflow: hidden;
}
.invoice-head {
    padding: 18px 18px 14px;
    border-bottom: 1px dashed var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.invoice-head .inv-label { font-size: 11px; color: var(--text-secondary); text-transform: uppercase; letter-spacing: .5px; }
.invoice-head .inv-number { font-size: 17px; font-weight: 700; margin-top: 2px; }
.invoice-head .inv-date { font-size: 11px; color: var(--text-secondary); margin-top: 3px; }
.invoice-section { padding: 16px 18px; border-bottom: 1px solid var(--border-light); }
.invoice-section:last-child { border-bottom: none; }
.invoice-section h3 { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; margin-bottom: 12px; }
.invoice-section h3 .material-icons { font-size: 18px; color: var(--primary); }
.field-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px 16px;
}
.field .field-label { font-size: 11px; color: var(--text-secondary); margin-bottom: 2px; }
.field .field-value { font-size: 13px; font-weight: 600; color: var(--text); word-break: break-word; }
.field-value.big { font-size: 15px; }
.description-box {
    padding: 12px 14px;
    background: var(--bg);
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text);
    margin-top: 13px;
}
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 13px;
}
.photo-grid img { width: 100%; border-radius: 12px; border: 1px solid var(--border-light); }

/* timeline */
.timeline { margin: 16px 20px 0; padding: 18px; }
.timeline h3 { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; margin-bottom: 16px; }
.timeline h3 .material-icons { color: var(--primary); font-size: 19px; }
.timeline-item { display: flex; gap: 12px; position: relative; padding-bottom: 16px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
    content: "";
    position: absolute;
    left: 10px;
    top: 22px;
    bottom: 0;
    width: 2px;
    background: var(--border);
}
.timeline-item:last-child::before { display: none; }
.timeline-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--chip-bg);
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}
.timeline-dot .material-icons { font-size: 14px; }
.timeline-item.done .timeline-dot { background: var(--success); color: #fff; }
.timeline-item.current .timeline-dot { background: var(--primary); color: #fff; box-shadow: 0 0 0 4px rgba(33, 150, 243, .16); }
.timeline-body .tl-title { font-size: 13px; font-weight: 600; color: var(--text); }
.timeline-body .tl-sub { font-size: 11px; color: var(--text-secondary); margin-top: 1px; }

/* recovery */
.recovery-card {
    margin: 16px 20px 0;
    border-radius: 18px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(16, 185, 129, .10), rgba(16, 185, 129, .04));
    border: 1.5px solid rgba(16, 185, 129, .45);
}
.recovery-card h2 { color: #047857; font-size: 17px; display: flex; align-items: center; gap: 9px; }
.recovery-card h2 .material-icons { font-size: 22px; }
[data-theme="dark"] .recovery-card h2 { color: #34D399; }
.recovery-card .field-label { color: #047857; }
[data-theme="dark"] .recovery-card .field-label { color: #34D399; }
.locked-card {
    margin: 16px 20px 0;
    text-align: center;
    border-radius: 18px;
    padding: 26px 20px;
    background: var(--card);
    box-shadow: var(--shadow);
}
.locked-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 14px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(245, 158, 11, .14);
    color: var(--warning);
}
.locked-icon .material-icons { font-size: 34px; }
.locked-card h2 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.locked-card p { font-size: 13px; max-width: 440px; margin: 0 auto 18px; }
.waiting-card { margin: 16px 20px 0; text-align: center; padding: 26px 20px; }

/* ---------------- Profile ---------------- */

.profile-hero {
    margin: 10px 20px 0;
    border-radius: 20px;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    box-shadow: 0 8px 22px rgba(33, 150, 243, .26);
}
.profile-hero .avatar { border: 2.5px solid rgba(255, 255, 255, .55); background: rgba(255, 255, 255, .2); }
.profile-hero .row.gap-12 { flex: 1; min-width: 0; }
.profile-hero .row.gap-12 > div:not(.avatar) { min-width: 0; }
.profile-hero h1 { color: #fff; font-size: 21px; font-weight: 700; margin-top: 12px; overflow-wrap: anywhere; }
.profile-hero p { color: rgba(255, 255, 255, .88); font-size: 13px; margin-top: 2px; overflow-wrap: anywhere; }
.profile-hero .row-between > a { flex-shrink: 0; }
.profile-hero .profile-badges { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.profile-hero .pill { font-size: 11px; padding: 4px 10px; }
.profile-stats {
    display: flex;
    gap: 10px;
    margin: 14px 20px 0;
}
.profile-stat {
    flex: 1;
    background: var(--card);
    border-radius: 14px;
    padding: 13px 8px;
    text-align: center;
    box-shadow: var(--shadow);
}
.profile-stat .value { font-size: 20px; font-weight: 700; color: var(--text); }
.profile-stat .label { font-size: 10px; color: var(--text-secondary); margin-top: 2px; }

.info-tile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid var(--border-light);
}
.info-tile:last-child { border-bottom: none; }
.info-tile .it-label { font-size: 12px; color: var(--text-secondary); }
.info-tile .it-value { font-size: 14px; font-weight: 500; color: var(--text); margin-top: 1px; word-break: break-word; }

.menu-card { margin: 14px 20px 0; padding: 4px 16px; }
.menu-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid var(--border-light);
    color: var(--text);
    text-decoration: none;
    background: transparent;
    border-left: none;
    border-right: none;
    border-top: none;
    width: 100%;
    text-align: left;
    font-size: 14px;
    font-weight: 500;
}
.menu-row:last-child { border-bottom: none; }
.menu-row:hover { color: var(--primary); }
.menu-row .menu-chevron { margin-left: auto; color: var(--text-muted); font-size: 20px; }
.menu-row.danger { color: var(--error); }
.menu-row.danger .material-icons { color: var(--error); }
.menu-card .menu-section-label {
    padding: 14px 0 6px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .6px;
    font-weight: 600;
    color: var(--text-secondary);
}

/* ---------------- Support chat ---------------- */

.chat-page {
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    max-width: 780px;
    margin: 0 auto;
    background: var(--bg);
}
.chat-top {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--card);
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}
.chat-top .back { color: var(--text); display: flex; }
.chat-top .avatar { background: linear-gradient(135deg, var(--primary), var(--primary-light)); }
.chat-top h1 { font-size: 16px; font-weight: 700; }
.chat-top .online { font-size: 11px; color: var(--success); display: flex; align-items: center; gap: 4px; }
.chat-top .online::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--success); display: inline-block; }
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--bg);
}
.chat-bubble {
    max-width: 84%;
    padding: 11px 14px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
    animation: bubble-in .18s ease both;
}
@keyframes bubble-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.chat-bubble.bot {
    align-self: flex-start;
    background: var(--card);
    color: var(--text);
    border: 1px solid var(--border-light);
    border-bottom-left-radius: 5px;
    box-shadow: 0 1px 3px rgba(17, 24, 39, .04);
}
.chat-bubble.user {
    align-self: flex-end;
    background: var(--primary);
    color: #fff;
    border-bottom-right-radius: 5px;
}
.chat-bubble.typing { color: var(--text-secondary); font-style: italic; }
.chat-suggestions {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 10px 16px 4px;
    background: var(--bg);
    flex-shrink: 0;
    scrollbar-width: none;
}
.chat-suggestions::-webkit-scrollbar { display: none; }
.chat-suggestions .chip { font-size: 12px; padding: 7px 12px; }
.chat-composer {
    display: flex;
    gap: 9px;
    align-items: flex-end;
    padding: 10px 14px calc(12px + env(safe-area-inset-bottom, 0px));
    background: var(--card);
    border-top: 1px solid var(--border-light);
    flex-shrink: 0;
}
.chat-composer input {
    flex: 1;
    min-height: 46px;
    border-radius: 23px;
    padding: 12px 16px;
    background: var(--bg);
    border-color: transparent;
}
.chat-composer .send-btn {
    width: 46px;
    height: 46px;
    min-height: 46px;
    padding: 0;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ---------------- Payments ---------------- */

.pay-hero {
    text-align: center;
    padding: 22px 20px 18px;
}
.pay-hero .lock-icon {
    width: 66px;
    height: 66px;
    margin: 0 auto 12px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    box-shadow: 0 6px 16px rgba(33, 150, 243, .3);
}
.pay-hero .lock-icon .material-icons { font-size: 30px; }
.pay-hero h1 { font-size: 21px; font-weight: 700; }
.pay-hero p { font-size: 13px; max-width: 440px; margin: 5px auto 0; }
.pay-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 0 20px;
    padding: 16px 18px;
    background: var(--card);
    border-radius: 16px;
    box-shadow: var(--shadow);
}
.pay-summary .amount { font-size: 22px; font-weight: 700; color: var(--primary); }
.pay-summary .amount-label { font-size: 11px; color: var(--text-secondary); }
.pay-methods { margin: 14px 20px 0; }
.provider-option { margin-bottom: 10px; }
.provider-logo {
    width: 44px;
    height: 44px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 12px;
    flex-shrink: 0;
}
.provider-mtn { background: #FFCC00; color: #111; }
.provider-airtel { background: #E41E38; color: #fff; font-weight: 700; font-size: 10px; }
.provider-card { background: var(--primary); color: #fff; }
.provider-card .material-icons { font-size: 23px; color: #fff; }
.pay-note { text-align: center; font-size: 12px; color: var(--text-secondary); line-height: 1.5; margin-top: 12px; }

/* Responsive checkout: Aurora (mobile) + Split Panel (desktop/tablet) */
.pc-shell { max-width: 460px; margin: 0 auto; padding: 0 0 28px; }
.pc-hero {
    position: relative;
    padding: 26px 22px 46px;
    border-radius: 0 0 26px 26px;
    background: linear-gradient(135deg, #1565C0, #1E88E5 55%, #42A5F5);
    color: #fff;
}
.pc-hero-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .25);
    display: grid;
    place-items: center;
}
.pc-hero-icon .material-icons { font-size: 24px; }
.pc-hero h1 { color: #fff; font-size: 20px; font-weight: 800; margin-top: 12px; }
.pc-hero p { color: #fff; font-size: 12px; opacity: .88; margin-top: 4px; }
.pc-hero .pc-amount {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -1.4px;
    margin-top: 12px;
}
.pc-layout { position: relative; margin: -24px 16px 0; display: block; }
.pc-aside { display: none; }
.pc-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 18px;
    box-shadow: var(--shadow-lg);
}
.pc-card h2 { font-size: 16px; font-weight: 800; }
.pc-hint { font-size: 11.5px; color: var(--text-secondary); margin: 4px 0 14px; }
.pc-methods { display: flex; flex-direction: column; gap: 9px; }
.pc-method-title { display: block; font-weight: 700; font-size: 13.5px; color: var(--text); }
.pc-method-sub { display: block; font-size: 11px; color: var(--text-secondary); margin-top: 2px; }
.pc-chevron { font-size: 18px; color: var(--text-muted); }
.pc-phone .form-control, .pc-phone input { width: 100%; }
.pc-lines {
    border-top: 1px solid var(--line);
    margin-top: 16px;
    padding-top: 12px;
}
.pc-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
    color: var(--text-secondary);
    margin: 7px 0;
}
.pc-line strong { color: var(--text); font-weight: 700; }
.pc-total { font-size: 13px; color: var(--text); font-weight: 700; margin-top: 10px; }
.pc-pay {
    width: 100%;
    margin-top: 16px;
    background: linear-gradient(135deg, var(--primary-deep), var(--primary));
    color: #fff;
    font-weight: 700;
}
.pc-pay .material-icons { font-size: 18px; }
.pc-note { display: flex; align-items: center; justify-content: center; gap: 6px; }
.pc-note .material-icons { font-size: 15px; color: var(--success); }
.pc-pending-top {
    display: none;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    border-left: 4px solid var(--warning);
    border-radius: 12px;
}
.pc-pending-top .grow { font-size: 12px; color: var(--text-secondary); line-height: 1.45; }
.pc-pending-top .grow strong { color: var(--text); }
.btn-check-pending {
    background: transparent;
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, .5);
    min-height: 32px;
    padding: 5px 10px;
    font-size: 11px;
    border-radius: 8px;
    flex-shrink: 0;
    box-shadow: none;
}
.btn-check-pending:hover {
    background: rgba(245, 158, 11, .12);
    color: var(--warning);
    filter: none;
    transform: none;
}
.pc-pending-inline {
    display: flex;
    align-items: center;
    gap: 9px;
    border-left: 4px solid var(--warning);
}
.pc-pending-inline .material-icons { color: var(--warning); }
.pc-pending-inline .grow { font-size: 11px; color: var(--text-secondary); line-height: 1.4; }
.pc-pending-inline .grow strong { color: var(--text); }
.pc-pending-inline .btn {
    background: transparent;
    color: var(--warning);
    border: 1px solid rgba(245, 158, 11, .5);
    min-height: 30px;
    padding: 5px 9px;
    font-size: 11px;
    border-radius: 8px;
    flex-shrink: 0;
    box-shadow: none;
}
.pc-pending-inline .btn:hover {
    background: rgba(245, 158, 11, .12);
    color: var(--warning);
    filter: none;
    transform: none;
}

@media (min-width: 900px) {
    .payment-topbar { display: none; }
    .pc-pending-top { display: flex; }
    .pc-pending-inline { display: none; }
    .pc-shell { max-width: 1040px; margin: 26px auto; padding: 0 24px 40px; }
    .pc-hero { display: none; }
    .pc-layout {
        margin: 0;
        display: grid;
        grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
        border: 1px solid var(--line);
        border-radius: 18px;
        overflow: hidden;
        box-shadow: var(--shadow-lg);
    }
    .pc-aside {
        display: flex;
        flex-direction: column;
        gap: 16px;
        padding: 24px;
        background: linear-gradient(160deg, #0D47A1, #1565C0 60%, #1976D2);
        color: #fff;
    }
    .pc-aside-badge {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        align-self: flex-start;
        padding: 5px 10px;
        border-radius: 999px;
        background: rgba(255, 255, 255, .16);
        border: 1px solid rgba(255, 255, 255, .22);
        font-size: 10px;
        font-weight: 700;
        letter-spacing: .4px;
    }
    .pc-aside-badge .material-icons { font-size: 13px; }
    .pc-aside-label { font-size: 10px; font-weight: 800; letter-spacing: .9px; text-transform: uppercase; color: rgba(255, 255, 255, .72); }
    .pc-aside-amount { font-size: 34px; font-weight: 800; letter-spacing: -1.3px; margin-top: 4px; }
    .pc-aside-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        font-size: 12px;
        color: rgba(255, 255, 255, .78);
        border-bottom: 1px solid rgba(255, 255, 255, .14);
        padding-bottom: 10px;
    }
    .pc-aside-row strong { color: #fff; font-weight: 700; }
    .pc-info {
        margin-top: auto;
        display: flex;
        align-items: flex-start;
        gap: 8px;
        padding: 12px;
        border-radius: 12px;
        background: rgba(255, 255, 255, .12);
        border: 1px solid rgba(255, 255, 255, .2);
        font-size: 11px;
        line-height: 1.5;
    }
    .pc-info .material-icons { font-size: 16px; flex-shrink: 0; }
    .pc-card { border: 0; border-radius: 0; box-shadow: none; padding: 24px; }
    .pc-card h2 { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
    .pc-card, .pc-pay { transition: none; }
}

.status-card { text-align: center; padding: 28px 22px; }
.status-icon {
    width: 84px;
    height: 84px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(33, 150, 243, .10);
    color: var(--primary);
}
.status-icon .material-icons { font-size: 42px; }
.status-icon.spinning .material-icons { animation: spin 1.4s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
.status-card h1 { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.status-card > p { font-size: 13px; margin-bottom: 18px; }
.pay-detail-box {
    padding: 13px 15px;
    background: var(--bg);
    border-radius: 12px;
    margin-bottom: 18px;
    text-align: left;
}
.pay-detail-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; padding: 4px 0; }
.pay-detail-row .label { color: var(--text-secondary); }
.pay-detail-row .value { font-weight: 600; text-align: right; }
.status-actions { display: flex; flex-direction: column; gap: 10px; }
.success-icon { background: rgba(16, 185, 129, .12); color: var(--success); }
.failed-icon { background: rgba(239, 68, 68, .12); color: var(--error); }

/* ---------------- Report type picker ---------------- */

.create-header { padding: 12px 20px 0; }
.create-header h1 { font-size: 24px; font-weight: 700; }
.create-header p { font-size: 13px; margin-top: 3px; }
.featured-types {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 0 20px 4px;
    scrollbar-width: none;
}
.featured-types::-webkit-scrollbar { display: none; }
.featured-type {
    flex: 0 0 150px;
    height: 110px;
    border-radius: 18px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(17, 24, 39, .14);
}
.featured-type:hover { color: #fff; transform: translateY(-2px); }
.featured-type .ft-icon { width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, .22); display: flex; align-items: center; justify-content: center; }
.featured-type .ft-icon .material-icons { font-size: 20px; }
.featured-type .ft-label { font-size: 13px; font-weight: 700; }
.type-list { margin: 0 20px; }
.type-list-row {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 13px 16px;
    background: var(--card);
    border-radius: 14px;
    box-shadow: var(--shadow);
    margin-bottom: 10px;
    color: var(--text);
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease;
}
.type-list-row:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); color: var(--text); }
.type-list-row .type-icon { width: 46px; height: 46px; border-radius: 13px; display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; }
.type-list-row .type-icon .material-icons { font-size: 23px; }
.type-list-row .tl-label { font-size: 14px; font-weight: 600; }
.type-list-row .tl-hint { font-size: 11px; color: var(--text-secondary); margin-top: 1px; }
.type-list-row .material-icons.chevron { color: var(--text-muted); font-size: 20px; margin-left: auto; }

/* ---------------- Misc ---------------- */

.divider { height: 1px; background: var(--border-light); margin: 14px 0; }
.mt-0 { margin-top: 0; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; } .mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; } .mb-20 { margin-bottom: 20px; } .mb-24 { margin-bottom: 24px; }
.mx-20 { margin-left: 20px; margin-right: 20px; }
.px-20 { padding-left: 20px; padding-right: 20px; }
.w-100 { width: 100%; }
.fw-600 { font-weight: 600; } .fw-700 { font-weight: 700; }
.text-success { color: var(--success); } .text-error { color: var(--error); }
.text-warning { color: var(--warning); } .text-primary { color: var(--primary); }

.hero-stat-row { display: flex; gap: 12px; margin-top: 14px; }
.hero-stat { flex: 1; background: rgba(255, 255, 255, .14); border-radius: 12px; padding: 10px 8px; text-align: center; }
.hero-stat .value { font-size: 19px; font-weight: 700; }
.hero-stat .label { font-size: 10px; opacity: .85; }

.report-status-hero { display: flex; align-items: center; gap: 8px; }

/* Legacy/other pages (about, features, edit forms) */
.page-heading { padding: 22px 20px 8px; }
.page-heading h1 { font-size: 24px; font-weight: 700; }
.page-heading p { font-size: 13px; margin-top: 4px; }
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}
.back-link:hover { color: var(--primary); }
.back-link .material-icons { font-size: 19px; }
.top-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: linear-gradient(135deg, #1565C0, #1E88E5 55%, #42A5F5);
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, .16);
    position: sticky;
    top: 0;
    z-index: 20;
}
.top-bar h1 { color: #fff; font-size: 18px; font-weight: 700; flex: 1; text-align: center; }
.top-bar .back { display: flex; color: #fff; }
.top-bar .back:hover { color: rgba(255, 255, 255, .8); }
.top-bar .back .material-icons { color: #fff; }

/* Flash messages */
.flash {
    position: fixed;
    top: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    width: calc(100% - 32px);
    max-width: 460px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    background: var(--card);
    color: var(--text);
    border-left: 4px solid var(--primary);
    animation: flash-in .25s ease both;
}
.flash.success { border-left-color: var(--success); }
.flash.error { border-left-color: var(--error); }
@keyframes flash-in { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------------- Responsive ---------------- */

@media (max-width: 340px) {
    .bottom-nav {
        width: calc(100% - 24px);
        padding: 0 4px;
    }
    .nav-item { width: 60px; }
    .nav-item.active .nav-icon-wrap { padding: 6px 12px; }
    .nav-center { width: 54px; height: 54px; margin-bottom: 14px; }
    .chat-fab { right: 12px; padding: 0 14px; }
}

@media (min-width: 768px) {
    .greeting-header { padding-top: 22px; }
    .quick-actions { padding-bottom: 6px; }
    .page-pad { padding: 24px; }
    .chat-page { height: calc(100vh - 0px); }
}

@media (min-width: 1024px) {
    .app-main { max-width: 980px; }
    .list-search { margin-left: 20px; margin-right: 20px; }
    .overview-card { margin-left: 20px; margin-right: 20px; }
    .profile-hero,
    .profile-stats,
    .menu-card { margin-left: 20px; margin-right: 20px; }
    .locked-card,
    .recovery-card,
    .waiting-card { margin-left: 20px; margin-right: 20px; }
    .chat-fab { bottom: 112px; }
}

@media (max-width: 420px) {
    .greeting-header .name { font-size: 23px; }
    .auth-wrap { padding-top: 228px; }
    .auth-hero { height: 300px; }
    .overview-card { padding: 17px; }
    .overview-stat .value { font-size: 24px; }
    .featured-type { flex-basis: 140px; }
}

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

/* ==========================================================================
   Desktop / laptop shell (1200px and up)
   Mobile and tablet keep the existing bottom-navigation layout.
   ========================================================================== */

@media (min-width: 1200px) {
    .app-content { min-height: 100vh; min-width: 0; }
    .app-shell.has-sidebar .app-content { margin-left: 248px; }
    .app-errors { padding: 0 0 20px; }

    .app-main {
        max-width: 1280px;
        padding: 34px 40px 56px;
    }
    .app-main-chat {
        max-width: none;
        padding: 0;
    }
    .bottom-nav,
    .chat-fab { display: none !important; }

    /* Sidebar */
    .sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 90;
        width: 248px;
        display: flex;
        flex-direction: column;
        padding: 22px 16px;
        background: var(--surface);
        border-right: 1px solid var(--border);
        overflow-y: auto;
        scrollbar-width: thin;
    }
    .sidebar-brand {
        display: flex;
        align-items: center;
        gap: 11px;
        padding: 2px 8px 18px;
        color: var(--text);
    }
    .sidebar-brand:hover { color: var(--text); }
    .sidebar-logo {
        width: 42px;
        height: 42px;
        border-radius: 13px;
        background: #fff;
        border: 1px solid var(--border-light);
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 7px;
        flex-shrink: 0;
        box-shadow: 0 4px 12px rgba(33, 150, 243, .14);
    }
    .sidebar-logo img { width: 100%; height: 100%; object-fit: contain; }
    .sidebar-brand-copy { display: flex; flex-direction: column; min-width: 0; }
    .sidebar-brand-copy strong {
        font-size: 16px;
        font-weight: 800;
        letter-spacing: -.2px;
        line-height: 1.2;
        color: var(--text);
    }
    .sidebar-brand-copy small {
        font-size: 10px;
        color: var(--text-muted);
        letter-spacing: .25px;
        margin-top: 2px;
    }
    .sidebar-nav {
        flex: 1;
        display: flex;
        flex-direction: column;
        gap: 3px;
        border-top: 1px solid var(--border-light);
        padding-top: 18px;
    }
    .sidebar-label {
        margin: 16px 12px 7px;
        font-size: 10px;
        font-weight: 700;
        letter-spacing: .7px;
        text-transform: uppercase;
        color: var(--text-muted);
    }
    .sidebar-label:first-child { margin-top: 0; }
    .sidebar-link {
        display: flex;
        align-items: center;
        gap: 11px;
        min-height: 43px;
        padding: 10px 12px;
        border-radius: 11px;
        color: var(--text-secondary);
        font-size: 14px;
        font-weight: 500;
        transition: background .15s ease, color .15s ease;
    }
    .sidebar-link .material-icons { font-size: 20px; }
    .sidebar-link:hover {
        background: var(--chip-bg);
        color: var(--primary);
    }
    .sidebar-link.active {
        background: rgba(33, 150, 243, .10);
        color: var(--primary);
        font-weight: 600;
    }
    .sidebar-link.active .material-icons {
        font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24;
    }
    .sidebar-cta {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-height: 46px;
        margin: 10px 0 2px;
        padding: 11px 14px;
        border-radius: 12px;
        background: linear-gradient(135deg, #1565C0, #2196F3);
        color: #fff;
        font-size: 13px;
        font-weight: 700;
        box-shadow: 0 5px 14px rgba(33, 150, 243, .28);
        transition: transform .15s ease, box-shadow .15s ease;
    }
    .sidebar-cta:hover {
        color: #fff;
        transform: translateY(-1px);
        box-shadow: 0 7px 18px rgba(33, 150, 243, .34);
    }
    .sidebar-cta.active { box-shadow: 0 0 0 3px rgba(33, 150, 243, .16), 0 5px 14px rgba(33, 150, 243, .28); }
    .sidebar-cta .material-icons { font-size: 19px; }
    .sidebar-live {
        width: 7px;
        height: 7px;
        margin-left: auto;
        border-radius: 50%;
        background: var(--success);
        box-shadow: 0 0 0 3px rgba(16, 185, 129, .13);
    }
    .sidebar-footer {
        border-top: 1px solid var(--border-light);
        padding-top: 12px;
        margin-top: 18px;
    }
    .sidebar-theme {
        width: 100%;
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 9px 12px;
        border: none;
        border-radius: 10px;
        background: transparent;
        color: var(--text-secondary);
        font-size: 13px;
        font-weight: 500;
        text-align: left;
    }
    .sidebar-theme:hover { background: var(--chip-bg); color: var(--primary); }
    .sidebar-theme .material-icons { font-size: 19px; }
    .sidebar-user {
        display: flex;
        align-items: center;
        gap: 9px;
        padding: 12px 8px 8px;
        min-width: 0;
    }
    .sidebar-avatar {
        width: 36px;
        height: 36px;
        font-size: 12px;
        background: linear-gradient(135deg, var(--primary-dark), var(--primary-light));
    }
    .sidebar-user-copy {
        display: flex;
        flex-direction: column;
        min-width: 0;
        line-height: 1.3;
    }
    .sidebar-user-copy strong {
        font-size: 12px;
        font-weight: 600;
        color: var(--text);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .sidebar-user-copy small {
        font-size: 10px;
        color: var(--text-muted);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .sidebar-logout {
        width: 100%;
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 9px 12px;
        margin-top: 4px;
        border: none;
        border-radius: 10px;
        background: transparent;
        color: var(--error);
        font-size: 13px;
        font-weight: 500;
        text-align: left;
    }
    .sidebar-logout:hover { background: rgba(239, 68, 68, .09); }
    .sidebar-logout .material-icons { font-size: 19px; }

    /* Shared desktop content */
    .app-main .card { padding: 22px; }
    .app-main .form-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 20px; }
    .app-main .form-field { margin-bottom: 18px; }
    .app-main .page-narrow { max-width: 860px; margin-left: auto; margin-right: auto; }
    .app-main .page-medium { max-width: 1040px; margin-left: auto; margin-right: auto; }
    .app-main .page-pad.page-narrow,
    .app-main .page-pad.page-medium { padding: 0; }
    .app-main .top-bar {
        position: static;
        margin-bottom: 24px;
        padding: 14px 18px;
        border: 1px solid rgba(255, 255, 255, .16);
        border-radius: 16px;
        box-shadow: 0 8px 20px rgba(33, 150, 243, .25);
    }

    /* Dashboard */
    .dashboard-page .greeting-header {
        align-items: center;
        padding: 0;
        margin-bottom: 26px;
    }
    .dashboard-page .greeting-header .greeting { font-size: 15px; }
    .dashboard-page .greeting-header .name { font-size: 32px; letter-spacing: -.5px; }
    .dashboard-page .header-actions { gap: 8px; }
    .dashboard-page .header-actions .btn-icon {
        width: 42px;
        height: 42px;
        background: var(--card);
        border: 1px solid var(--border-light);
        box-shadow: var(--shadow);
    }
    .dashboard-grid {
        display: grid;
        grid-template-columns: minmax(0, 1.55fr) minmax(330px, .85fr);
        gap: 24px;
        align-items: start;
    }
    .dashboard-main { min-width: 0; }
    .dashboard-main .overview-card {
        margin: 0;
        padding: 26px;
        border-radius: 22px;
    }
    .dashboard-main .overview-card h2 { font-size: 17px; }
    .dashboard-main .overview-stats { margin-top: 20px; }
    .dashboard-main .overview-stat .value { font-size: 34px; }
    .dashboard-main .overview-stat .label { font-size: 12px; }
    .dashboard-main .section-heading {
        margin: 28px 0 14px;
        padding: 0;
    }
    .dashboard-main .quick-actions {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 14px;
        padding: 0;
        overflow: visible;
    }
    .dashboard-main .quick-action {
        width: auto;
        height: 118px;
        flex: none;
        border-radius: 18px;
    }
    .dashboard-main .quick-action .qa-icon { width: 44px; height: 44px; }
    .dashboard-side { min-width: 0; }
    .dashboard-side .section-heading {
        margin: 0 0 14px;
        padding: 0;
    }
    .dashboard-side .px-20 { padding: 0; }
    .dashboard-side .stack-12 > * + * { margin-top: 14px; }
    .dashboard-side .report-card { padding: 16px; }
    .dashboard-side .empty-state { padding: 34px 20px; }

    /* Reports list */
    .reports-page .gradient-header {
        padding: 30px 32px;
        border-radius: 24px;
        box-shadow: 0 10px 28px rgba(33, 150, 243, .20);
    }
    .reports-page .gradient-header h1 { font-size: 30px; }
    .reports-page .gradient-header p { font-size: 14px; }
    .reports-page .list-search {
        display: flex;
        align-items: center;
        gap: 18px;
        margin: 22px 0 0;
        padding: 16px;
        border: 1px solid var(--border-light);
    }
    .reports-page .list-search .search-box { flex: 0 0 330px; }
    .reports-page .list-filters {
        flex: 1;
        margin: 0;
        padding: 0;
        flex-wrap: wrap;
        justify-content: flex-end;
        overflow: visible;
    }
    .reports-page #reportsWrap {
        width: 100%;
        margin: 24px 0 0;
        padding: 0;
    }
    .reports-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
        gap: 14px;
    }
    .reports-grid > * + * { margin-top: 0; }
    .reports-page .report-card {
        padding: 18px;
        border: 1px solid var(--border-light);
        box-shadow: none;
    }
    .reports-page .report-card:hover { box-shadow: var(--shadow-lg); }
    .reports-page .empty-state { max-width: 680px; margin: 0 auto; }

    /* Report detail */
    .report-detail-page {
        display: grid;
        grid-template-columns: minmax(0, 1.6fr) minmax(300px, .9fr);
        gap: 24px;
        align-items: start;
    }
    .report-detail-page .detail-hero {
        grid-column: 1 / -1;
        padding: 26px 30px 30px;
        border-radius: 24px;
        box-shadow: 0 12px 30px rgba(17, 24, 39, .16);
    }
    .report-detail-page .detail-hero::after { display: none; }
    .report-detail-page .detail-hero h1 { font-size: 30px; }
    .report-detail-page .detail-hero .hero-type { margin-top: 22px; }
    .report-detail-page .detail-hero .hero-type .avatar { width: 54px; height: 54px; }
    .report-detail-page .invoice-card {
        grid-column: 1;
        grid-row: 2;
        margin: 0;
        border: 1px solid var(--border-light);
        box-shadow: none;
    }
    .report-detail-page .invoice-head { padding: 22px 24px 18px; }
    .report-detail-page .invoice-head .inv-number { font-size: 20px; }
    .report-detail-page .invoice-section { padding: 20px 24px; }
    .report-detail-page .invoice-section h3 { font-size: 15px; margin-bottom: 16px; }
    .report-detail-page .field-grid { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 18px 24px; }
    .report-detail-page .field .field-value { font-size: 14px; }
    .report-detail-page .timeline {
        grid-column: 2;
        grid-row: 2 / span 2;
        position: sticky;
        top: 24px;
        margin: 0;
        padding: 22px;
        border: 1px solid var(--border-light);
        box-shadow: none;
    }
    .report-detail-page .timeline h3 { font-size: 16px; }
    .report-detail-page .recovery-card,
    .report-detail-page .locked-card,
    .report-detail-page .waiting-card {
        grid-column: 1;
        grid-row: 3;
        margin: 0;
    }
    .report-detail-page .detail-help-card {
        grid-column: 1 / -1;
        grid-row: 4;
        margin: 0;
    }

    /* Profile */
    .profile-page {
        display: grid;
        grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
        gap: 24px;
        align-items: start;
    }
    .profile-summary {
        position: sticky;
        top: 24px;
        min-width: 0;
    }
    .profile-page .profile-hero {
        margin: 0;
        padding: 26px;
        border-radius: 24px;
    }
    .profile-page .profile-hero h1 { font-size: 24px; }
    .profile-page .profile-hero .avatar-lg { width: 76px; height: 76px; }
    .profile-page .profile-stats { gap: 10px; margin: 14px 0 0; }
    .profile-page .profile-stat { padding: 16px 8px; }
    .profile-page .profile-stat .value { font-size: 24px; }
    .profile-content { min-width: 0; }
    .profile-content > .back-link { margin: 0 0 8px !important; }
    .profile-content .menu-card {
        margin: 0 0 16px;
        padding: 6px 20px;
        border: 1px solid var(--border-light);
        box-shadow: none;
    }
    .profile-content .menu-row { padding: 15px 0; }
    .profile-content > div:last-child {
        margin: 2px 0 0;
        padding: 0;
    }
    .profile-content > div:last-child form { max-width: 320px; }

    /* Support */
    .chat-page {
        max-width: 900px;
        margin: 0 auto;
        border-left: 1px solid var(--border-light);
        border-right: 1px solid var(--border-light);
    }
    .chat-top { padding: 18px 24px; }
    .chat-top h1 { font-size: 18px; }
    .chat-messages { padding: 24px 28px; }
    .chat-bubble { max-width: 72%; font-size: 14px; }
    .chat-suggestions { padding: 12px 24px 6px; }
    .chat-composer { padding: 14px 24px calc(16px + env(safe-area-inset-bottom, 0px)); }

    /* Report picker */
    .reports-choose-page .create-header { padding: 0; margin-bottom: 24px; }
    .reports-choose-page .create-header h1 { font-size: 30px; }
    .reports-choose-page .section-heading {
        margin: 26px 0 14px;
        padding: 0;
    }
    .reports-choose-page .featured-types {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 16px;
        padding: 0;
        overflow: visible;
    }
    .reports-choose-page .featured-type {
        width: auto;
        height: 142px;
        flex: none;
        padding: 18px;
    }
    .reports-choose-page .type-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        margin: 0;
    }
    .reports-choose-page .type-list-row { margin: 0; padding: 15px 18px; }
    .reports-choose-page > .card { margin: 24px 0 0; }

    /* Payments */
    .app-main .pay-hero { padding-top: 10px; }
    .app-main .page-narrow .pay-summary { margin-left: 0; margin-right: 0; }
    .app-main .page-narrow .pay-methods { margin: 18px 0 0; }
    .app-main .pay-methods .card { padding: 24px; }
    .app-main .status-card { padding: 36px 30px; }

    /* Auth: split-screen on large displays */
    .auth-screen {
        display: grid;
        grid-template-columns: minmax(420px, 46%) minmax(0, 1fr);
        min-height: 100vh;
        overflow: visible;
    }
    .auth-hero {
        position: relative;
        inset: auto;
        width: 100%;
        height: auto;
        min-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .auth-hero::after { display: none; }
    .auth-hero::before {
        content: "";
        position: absolute;
        inset: 0;
        background:
            radial-gradient(circle at 18% 20%, rgba(255, 255, 255, .16), transparent 30%),
            radial-gradient(circle at 82% 78%, rgba(255, 255, 255, .12), transparent 34%);
        pointer-events: none;
    }
    .auth-hero-inner {
        padding: 60px 48px;
        max-width: 540px;
        width: 100%;
    }
    .auth-logo { width: 92px; height: 92px; border-radius: 24px; padding: 15px; margin-bottom: 18px; }
    .auth-brand { font-size: 40px; letter-spacing: -.6px; }
    .auth-tagline { font-size: 15px; margin-top: 4px; }
    .auth-lang { top: 26px; right: 26px; }
    .auth-wrap {
        max-width: 540px;
        padding: 48px;
        align-self: center;
        justify-self: center;
    }
    .auth-card { padding: 34px 36px; border-radius: 24px; }
    .auth-card h2 { font-size: 28px; }
    .auth-card .auth-sub { font-size: 14px; margin-bottom: 24px; }
}

/* ==========================================================================
   Report submission flow, map picker, voice recorder and Ask Tag
   ========================================================================== */

.submission-page { padding-bottom: 44px; }
.submission-type,
.voice-type-head {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 14px;
    border: 1px solid var(--border-light);
    border-radius: 17px;
    background: var(--surface);
    box-shadow: var(--shadow);
}
.submission-type .type-icon,
.voice-type-head .type-icon {
    width: 50px;
    height: 50px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 5px 14px rgba(17, 24, 39, .14);
}
.submission-type .type-icon .material-icons,
.voice-type-head .type-icon .material-icons { font-size: 24px; }
.submission-intro { margin: 26px 2px 16px; }
.submission-intro h2 { font-size: 22px; font-weight: 800; letter-spacing: -.3px; margin: 0; }
.submission-intro p { color: var(--text-secondary); font-size: 13px; line-height: 1.55; margin: 6px 0 0; max-width: 640px; }
.submission-options { display: grid; grid-template-columns: 1fr; gap: 13px; }
.submission-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px;
    border-radius: 19px;
    border: 1px solid var(--border-light);
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
    overflow: hidden;
}
.submission-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--primary);
}
.submission-card.submission-voice::before { background: #7C4DFF; }
.submission-card:hover {
    color: var(--text);
    transform: translateY(-2px);
    border-color: rgba(33, 150, 243, .25);
    box-shadow: var(--shadow-lg);
}
.submission-card-icon {
    width: 54px;
    height: 54px;
    border-radius: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    flex-shrink: 0;
    background: linear-gradient(135deg, #1E88E5, #42A5F5);
    box-shadow: 0 7px 16px rgba(33, 150, 243, .25);
}
.submission-voice .submission-card-icon {
    background: linear-gradient(135deg, #7C4DFF, #B388FF);
    box-shadow: 0 7px 16px rgba(124, 77, 255, .24);
}
.submission-card-icon .material-icons { font-size: 27px; }
.submission-card-body { flex: 1; min-width: 0; }
.submission-card-title { display: block; font-size: 16px; font-weight: 800; letter-spacing: -.15px; }
.submission-card-text { display: block; color: var(--text-secondary); font-size: 12.5px; line-height: 1.5; margin-top: 3px; }
.submission-card-meta {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 9px;
    font-size: 11px;
    font-weight: 600;
    color: var(--primary);
    background: rgba(33, 150, 243, .08);
    border-radius: 999px;
    padding: 4px 9px;
}
.submission-card-meta .material-icons { font-size: 14px; }
.submission-voice .submission-card-meta { color: #6D3FE0; background: rgba(124, 77, 255, .09); }
.submission-chevron { color: var(--text-muted); flex-shrink: 0; }
.submission-note {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-top: 18px;
    padding: 12px 14px;
    border-radius: 13px;
    color: var(--text-secondary);
    background: var(--chip-bg);
    font-size: 12px;
    line-height: 1.5;
}
.submission-note .material-icons { font-size: 18px; color: var(--primary); flex-shrink: 0; }
.document-choice .document-id { background: linear-gradient(135deg, #F093FB, #F5576C); box-shadow: 0 7px 16px rgba(245, 87, 108, .22); }
.document-choice .document-passport { background: linear-gradient(135deg, #8E2DE2, #4A00E0); box-shadow: 0 7px 16px rgba(74, 0, 224, .22); }

.report-journey-head {
    display: flex;
    align-items: center;
    gap: 12px;
}
.report-journey-icon {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(33, 150, 243, .10);
    color: var(--primary);
    flex-shrink: 0;
}
.report-journey-eyebrow {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .7px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 2px;
}
.document-specific {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px dashed var(--border);
}
.document-specific .section-title { margin-top: 0; }
.document-specific .section-title .material-icons { font-size: 19px; }

/* Interactive map */
.location-picker {
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px dashed var(--border);
}
.location-picker-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.location-picker-title .hint { margin-top: 3px; }
.map-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 5px 5px 12px;
    border: 1px solid var(--input-border);
    border-radius: 13px;
    background: var(--surface);
    margin-bottom: 12px;
}
.map-search > .material-icons { color: var(--text-muted); font-size: 20px; }
.map-search input[type="search"],
.map-search input[type="text"] {
    flex: 1;
    min-width: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    min-height: 36px;
    padding: 5px 2px;
    font-size: 13px;
    outline: none;
}
.map-search input:focus { box-shadow: none; border-color: transparent; }
.map-search .btn { flex-shrink: 0; }
.map-canvas-wrap {
    position: relative;
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    background: #E8EEF5;
    isolation: isolate;
}
.map-canvas { height: 285px; width: 100%; z-index: 0; }
.map-canvas.map-unavailable {
    display: flex;
    align-items: center;
    justify-content: center;
}
.map-canvas-tip {
    position: absolute;
    left: 50%;
    bottom: 11px;
    transform: translateX(-50%);
    z-index: 500;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(17, 24, 39, .72);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
    pointer-events: none;
    backdrop-filter: blur(5px);
}
.map-canvas-tip .material-icons { font-size: 14px; }
.map-fallback {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 28px 20px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.45;
}
.map-fallback .material-icons { font-size: 38px; color: var(--primary); }
.map-fallback strong { color: var(--text); font-size: 15px; }
.map-picker-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 11px 1px 4px;
}
.map-picker-status {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    min-width: 0;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.4;
}
.map-picker-status .material-icons { font-size: 17px; color: var(--primary); flex-shrink: 0; }
.map-picker-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.map-picker-actions .btn { white-space: nowrap; }
.map-address-grid { margin-top: 10px !important; }
.map-coordinates { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.map-coordinates input {
    min-width: 0;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 12px;
    letter-spacing: .1px;
}
.tt-map-pin { background: transparent; border: 0; }
.tt-map-pin .material-icons {
    font-size: 40px;
    color: #E53935;
    filter: drop-shadow(0 4px 4px rgba(0, 0, 0, .28));
}
.leaflet-container { font-family: inherit; }
.leaflet-control-attribution { font-size: 9px !important; }
.leaflet-bar a { color: #333; }

/* Voice report and recorder */
.voice-report-page { padding-bottom: 44px; }
.voice-intro {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin: 18px 0;
    padding: 19px;
    border-radius: 19px;
    background: linear-gradient(135deg, rgba(124, 77, 255, .12), rgba(33, 150, 243, .08));
    border: 1px solid rgba(124, 77, 255, .14);
}
.voice-intro-icon {
    width: 48px;
    height: 48px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, #7C4DFF, #B388FF);
    flex-shrink: 0;
    box-shadow: 0 7px 18px rgba(124, 77, 255, .24);
}
.voice-intro h2 { font-size: 18px; line-height: 1.25; margin: 0; font-weight: 800; letter-spacing: -.2px; }
.voice-intro p { color: var(--text-secondary); font-size: 12.5px; line-height: 1.55; margin: 5px 0 0; }
.voice-prompts-card { margin-bottom: 16px; }
.voice-prompts { list-style: none; margin: 11px 0 0; padding: 0; display: grid; gap: 8px; }
.voice-prompts li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12.5px;
    line-height: 1.45;
    color: var(--text-secondary);
}
.voice-prompts li .material-icons { font-size: 17px; color: #7C4DFF; flex-shrink: 0; margin-top: 1px; }
.voice-recorder-card { margin-bottom: 16px; }
.voice-recorder {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 12px 0 4px;
}
.voice-orb {
    position: relative;
    width: 118px;
    height: 118px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 4px auto 10px;
}
.voice-orb-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 1px solid rgba(124, 77, 255, .23);
    background: rgba(124, 77, 255, .06);
}
.voice-orb-core {
    position: relative;
    z-index: 1;
    width: 78px;
    height: 78px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(135deg, #7C4DFF, #448AFF);
    box-shadow: 0 12px 26px rgba(92, 47, 213, .30);
    transition: transform .18s ease, background .18s ease;
}
.voice-orb-core .material-icons { font-size: 34px; }
.voice-recorder.recording .voice-orb-core {
    background: linear-gradient(135deg, #E53935, #FF7043);
    transform: scale(1.06);
    box-shadow: 0 12px 28px rgba(229, 57, 53, .32);
}
.voice-recorder.recording .voice-orb-ring {
    border-color: rgba(229, 57, 53, .30);
    background: rgba(229, 57, 53, .06);
    animation: voice-pulse 1.35s ease-out infinite;
}
@keyframes voice-pulse {
    0% { transform: scale(.88); opacity: .9; }
    70% { transform: scale(1.22); opacity: 0; }
    100% { transform: scale(1.22); opacity: 0; }
}
.voice-timer { font-size: 30px; line-height: 1; font-weight: 800; letter-spacing: .8px; font-variant-numeric: tabular-nums; }
.voice-record-status { min-height: 20px; margin-top: 7px; font-size: 12px; color: var(--text-secondary); line-height: 1.4; }
.voice-record-status.recording { color: var(--error); font-weight: 600; }
.voice-record-status.ready { color: var(--success); font-weight: 600; }
.voice-record-status.error { color: var(--error); }
.voice-controls { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: 14px; }
.voice-record-btn { min-width: 174px; }
.voice-stop-btn { background: var(--error); color: #fff; }
.voice-playback { width: 100%; max-width: 520px; margin-top: 14px; }
.voice-playback audio { width: 100%; accent-color: #7C4DFF; }
.voice-fallback {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 17px;
    padding: 12px;
    border: 1px dashed var(--border);
    border-radius: 14px;
    background: var(--bg);
}
.voice-fallback > .material-icons { color: var(--text-muted); font-size: 22px; flex-shrink: 0; }
.voice-fallback input[type="file"] {
    max-width: 245px;
    min-height: 38px;
    padding: 5px;
    font-size: 11px;
    background: var(--surface);
}
.voice-location-card { margin-bottom: 16px; }
.voice-location-card .location-picker { margin-top: 8px; padding-top: 0; border-top: 0; }
.voice-submit-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}
.voice-submit-row .btn-lg { flex: 1; max-width: 340px; }
.voice-playback-card {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 13px;
    border-radius: 14px;
    background: var(--bg);
    border: 1px solid var(--border-light);
}
.voice-playback-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, #7C4DFF, #448AFF);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.voice-playback-card audio { width: 100%; height: 40px; margin-top: 7px; accent-color: #7C4DFF; }
.voice-details-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 13px;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.45;
}
.voice-details-note .material-icons { font-size: 17px; color: var(--primary); flex-shrink: 0; }

/* Desktop Ask Tag bubble (mobile keeps the existing bottom-nav chat button) */
.ask-tag { display: none; }
.ask-tag-panel {
    position: fixed;
    right: 30px;
    bottom: 94px;
    z-index: 96;
    width: 364px;
    max-width: calc(100vw - 60px);
    height: 500px;
    max-height: calc(100vh - 128px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: 0 24px 70px rgba(17, 24, 39, .22);
    transform-origin: bottom right;
    animation: ask-tag-in .18s ease-out;
}
.ask-tag-panel[hidden] { display: none !important; }
@keyframes ask-tag-in {
    from { opacity: 0; transform: translateY(9px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.ask-tag-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 15px;
    color: #fff;
    background: linear-gradient(135deg, #1565C0, #2196F3 60%, #26C6DA);
}
.ask-tag-avatar {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .2);
    color: #fff;
    flex-shrink: 0;
}
.ask-tag-avatar .material-icons { font-size: 21px; }
.ask-tag-avatar-online {
    position: absolute;
    right: -1px;
    bottom: -1px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #4ADE80;
    border: 2px solid #1565C0;
}
.ask-tag-expand {
    width: 31px;
    height: 31px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .13);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    flex-shrink: 0;
}
.ask-tag-expand:hover { background: rgba(255, 255, 255, .24); color: #fff; }
.ask-tag-expand .material-icons { font-size: 16px; }
.ask-tag-label {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 8.5px;
    font-weight: 800;
    letter-spacing: .5px;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 5px;
}
.ask-tag-label .material-icons { font-size: 13px; }
.ask-tag-head strong { display: block; font-size: 14px; line-height: 1.2; }
.ask-tag-head small { display: flex; align-items: center; gap: 5px; font-size: 10px; opacity: .85; margin-top: 3px; }
.ask-tag-online { width: 6px; height: 6px; border-radius: 50%; background: #69F0AE; box-shadow: 0 0 0 2px rgba(105, 240, 174, .22); }
.ask-tag-close {
    width: 31px;
    height: 31px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .13);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ask-tag-close:hover { background: rgba(255, 255, 255, .24); }
.ask-tag-close .material-icons { font-size: 18px; }
.ask-tag-messages {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 15px;
    background:
        radial-gradient(circle at 100% 0%, rgba(33, 150, 243, .06), transparent 36%),
        var(--bg);
    scrollbar-width: thin;
}
.ask-tag-bubble {
    max-width: 84%;
    padding: 9px 12px;
    border-radius: 14px;
    font-size: 12.5px;
    line-height: 1.48;
    white-space: pre-line;
    overflow-wrap: anywhere;
}
.ask-tag-bubble.bot {
    align-self: flex-start;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-bottom-left-radius: 4px;
    box-shadow: 0 2px 7px rgba(17, 24, 39, .04);
}
.ask-tag-bubble.user {
    align-self: flex-end;
    color: #fff;
    background: linear-gradient(135deg, #1976D2, #2196F3);
    border-bottom-right-radius: 4px;
}
.ask-tag-bubble.typing { color: var(--text-muted); font-style: italic; }
.ask-tag-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 9px 14px 5px;
    background: var(--bg);
}
.ask-tag-suggestions[hidden] { display: none !important; }
.ask-tag-suggestions button {
    border: 1px solid rgba(33, 150, 243, .22);
    background: rgba(33, 150, 243, .07);
    color: var(--primary);
    border-radius: 999px;
    padding: 5px 9px;
    font-size: 10.5px;
    font-weight: 600;
}
.ask-tag-suggestions button:hover { background: rgba(33, 150, 243, .13); }
.ask-tag-form {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 12px 12px;
    background: var(--bg);
}
.ask-tag-form input {
    flex: 1;
    min-width: 0;
    min-height: 42px;
    border-radius: 999px;
    font-size: 12px;
    padding: 9px 14px;
    background: var(--surface);
}
.ask-tag-form button {
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(135deg, #1976D2, #2196F3);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 5px 12px rgba(33, 150, 243, .24);
}
.ask-tag-form button .material-icons { font-size: 19px; }
.ask-tag-fab {
    position: fixed;
    right: 30px;
    bottom: 26px;
    z-index: 97;
    min-width: 52px;
    height: 52px;
    padding: 0 18px 0 14px;
    border: 0;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    background: linear-gradient(135deg, #1565C0, #2196F3 60%, #26C6DA);
    box-shadow: 0 9px 24px rgba(21, 101, 192, .32);
    transition: transform .18s ease, box-shadow .18s ease;
}
.ask-tag-fab:hover { transform: translateY(-2px); box-shadow: 0 13px 30px rgba(21, 101, 192, .38); }
.ask-tag-fab .material-icons { font-size: 23px; }
.ask-tag-icon-close { display: none; }
.ask-tag.open .ask-tag-icon-chat { display: none; }
.ask-tag.open .ask-tag-icon-close { display: inline-block; }
.ask-tag-dot {
    position: absolute;
    top: 7px;
    right: 13px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #69F0AE;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, .8);
}
.ask-tag.open .ask-tag-dot { display: none; }

@media (min-width: 900px) {
    .submission-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .submission-card { min-height: 164px; align-items: flex-start; }
    .submission-card-icon { width: 48px; height: 48px; border-radius: 15px; }
    .submission-card .submission-chevron { align-self: center; }
    .submission-card-body { padding-top: 2px; }
    .submission-card-text { max-width: 360px; }
}

@media (max-width: 640px) {
    .submission-page { padding-left: 16px; padding-right: 16px; }
    .submission-type { padding: 12px; }
    .submission-type .type-icon,
    .voice-type-head .type-icon { width: 45px; height: 45px; border-radius: 13px; }
    .submission-card { padding: 15px; gap: 12px; }
    .submission-card-icon { width: 48px; height: 48px; border-radius: 15px; }
    .submission-card-title { font-size: 15px; }
    .submission-card-text { font-size: 12px; }
    .submission-intro h2 { font-size: 20px; }
    .map-canvas { height: 245px; }
    .map-picker-actions { width: 100%; margin-left: 0; }
    .map-picker-actions .btn { flex: 1; }
    .map-coordinates { grid-template-columns: 1fr; }
    .voice-fallback { flex-wrap: wrap; }
    .voice-fallback input[type="file"] { max-width: none; width: 100%; }
    .voice-submit-row { flex-direction: column-reverse; align-items: stretch; }
    .voice-submit-row .btn { width: 100%; max-width: none; }
    .voice-playback-card { align-items: flex-start; }
    .voice-playback-icon { width: 40px; height: 40px; }
}

@media (min-width: 1200px) {
    :root { --tt-sidebar-width: 248px; }
    html.sidebar-collapsed { --tt-sidebar-width: 82px; }

    .app-shell.has-sidebar .app-content {
        margin-left: var(--tt-sidebar-width);
        transition: margin-left .22s ease;
    }
    .sidebar {
        width: var(--tt-sidebar-width);
        transition: width .22s ease, padding .22s ease;
    }
    .sidebar-toggle {
        position: fixed;
        left: calc(var(--tt-sidebar-width) - 13px);
        top: 31px;
        z-index: 92;
        width: 27px;
        height: 27px;
        padding: 0;
        border: 1px solid var(--border);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--text-secondary);
        background: var(--surface);
        box-shadow: 0 4px 12px rgba(17, 24, 39, .13);
        transition: left .22s ease, color .15s ease, background .15s ease;
    }
    .sidebar-toggle:hover { color: var(--primary); background: var(--chip-bg); }
    .sidebar-toggle .material-icons { font-size: 17px; }

    html.sidebar-collapsed .sidebar { padding-left: 15px; padding-right: 15px; }
    html.sidebar-collapsed .sidebar-brand {
        justify-content: center;
        padding-left: 0;
        padding-right: 0;
    }
    html.sidebar-collapsed .sidebar-brand-copy,
    html.sidebar-collapsed .sidebar-label,
    html.sidebar-collapsed .sidebar-link-text,
    html.sidebar-collapsed .sidebar-user-copy { display: none; }
    html.sidebar-collapsed .sidebar-nav { align-items: center; }
    html.sidebar-collapsed .sidebar-link,
    html.sidebar-collapsed .sidebar-theme,
    html.sidebar-collapsed .sidebar-logout {
        width: 52px;
        min-height: 46px;
        padding: 0;
        justify-content: center;
        gap: 0;
        border-radius: 13px;
    }
    html.sidebar-collapsed .sidebar-link { position: relative; }
    html.sidebar-collapsed .sidebar-cta {
        width: 52px;
        height: 48px;
        min-height: 48px;
        padding: 0;
        margin: 10px auto 2px;
        gap: 0;
        border-radius: 14px;
    }
    html.sidebar-collapsed .sidebar-cta .sidebar-link-text { display: none; }
    html.sidebar-collapsed .sidebar-live {
        position: absolute;
        top: 10px;
        right: 10px;
        width: 6px;
        height: 6px;
        margin: 0;
    }
    html.sidebar-collapsed .sidebar-footer {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    html.sidebar-collapsed .sidebar-user {
        justify-content: center;
        padding-left: 0;
        padding-right: 0;
    }
    html.sidebar-collapsed .sidebar-theme .material-icons,
    html.sidebar-collapsed .sidebar-logout .material-icons { font-size: 20px; }

    .ask-tag { display: block; }
    .voice-report-page,
    .submission-page { max-width: 860px; margin-left: auto; margin-right: auto; }
    .voice-intro { padding: 22px; }
    .voice-recorder { padding-top: 18px; }
}


/* ============================ PHOTO CAPTURE ============================ */
[data-photo-capture] [hidden],
.photo-camera-modal [hidden] {
    display: none !important;
}

.photo-capture {
    display: flex;
    flex-direction: column;
    gap: 9px;
    min-width: 0;
}

.photo-capture-label {
    font-weight: 600;
}

.photo-capture-drop {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 158px;
    overflow: hidden;
    border: 1px dashed var(--border);
    border-radius: 16px;
    background: var(--bg);
}

.photo-capture-empty {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px;
    width: 100%;
    text-align: left;
    color: var(--text-secondary);
}

.photo-capture-empty > .material-icons {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: rgba(33, 150, 243, .10);
    color: var(--primary);
    font-size: 23px;
}

.photo-capture-empty strong {
    display: block;
    color: var(--text);
    font-size: 13px;
    margin-bottom: 2px;
}

.photo-capture-empty > div > span {
    display: block;
    font-size: 11.5px;
    line-height: 1.45;
}

.photo-capture-preview {
    width: 100%;
    background: #05080f;
}

.photo-capture-preview img {
    display: block;
    width: 100%;
    max-height: 300px;
    object-fit: contain;
}

.photo-capture-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.photo-capture-native {
    width: 100%;
}

.photo-capture.is-enhanced .photo-capture-native {
    display: none;
}

.photo-capture-error {
    display: none;
    align-items: flex-start;
    gap: 7px;
    padding: 9px 11px;
    border-radius: 11px;
    background: rgba(229, 57, 53, .09);
    border: 1px solid rgba(229, 57, 53, .18);
    color: var(--error);
    font-size: 11.5px;
    line-height: 1.45;
}

.photo-capture-error.visible {
    display: flex;
}

/* Full-screen camera dialog */
.photo-camera-modal {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    background: rgba(3, 8, 16, .84);
    backdrop-filter: blur(9px);
    -webkit-backdrop-filter: blur(9px);
    overscroll-behavior: contain;
}

body.photo-camera-open {
    overflow: hidden;
}

.photo-camera-dialog {
    width: min(760px, 100%);
    max-height: calc(100vh - 36px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: var(--surface);
    box-shadow: 0 30px 80px rgba(0, 0, 0, .42);
}

.photo-camera-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 15px 18px;
    border-bottom: 1px solid var(--border-light);
}

.photo-camera-eyebrow {
    color: var(--primary);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .11em;
    text-transform: uppercase;
}

.photo-camera-head h3 {
    margin: 1px 0 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--text);
}

.photo-camera-close {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 0;
    border-radius: 11px;
    background: var(--bg);
    color: var(--text-secondary);
    cursor: pointer;
}

.photo-camera-close:hover {
    background: var(--surface-2, var(--bg));
    color: var(--text);
}

.photo-camera-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 4 / 3;
    min-height: 220px;
    overflow: hidden;
    background: #05080f;
}

.photo-camera-stage video,
.photo-camera-stage img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.photo-camera-loading,
.photo-camera-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px;
    text-align: center;
    color: rgba(255, 255, 255, .78);
    background: radial-gradient(circle at 50% 35%, rgba(33, 150, 243, .20), transparent 52%);
}

.photo-camera-loading .material-icons,
.photo-camera-fallback .material-icons {
    font-size: 42px;
    color: #90CAF9;
}

.photo-camera-loading .material-icons {
    animation: photo-camera-pulse 1.5s ease-in-out infinite;
}

.photo-camera-fallback strong {
    color: #fff;
    font-size: 15px;
}

.photo-camera-fallback span:last-child {
    max-width: 290px;
    font-size: 12px;
    line-height: 1.5;
}

@keyframes photo-camera-pulse {
    0%, 100% { opacity: .55; transform: scale(.96); }
    50% { opacity: 1; transform: scale(1.04); }
}

.photo-camera-status {
    min-height: 40px;
    padding: 10px 18px;
    border-top: 1px solid var(--border-light);
    color: var(--text-secondary);
    font-size: 12.5px;
    line-height: 1.5;
}

.photo-camera-status.ready {
    color: var(--success);
    font-weight: 600;
}

.photo-camera-status.error {
    color: var(--error);
    font-weight: 600;
}

.photo-camera-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 11px 18px 16px;
    border-top: 1px solid var(--border-light);
}

.photo-camera-actions-left,
.photo-camera-actions-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.photo-camera-actions-right {
    margin-left: auto;
}

.photo-camera-actions .btn {
    white-space: nowrap;
}

@media (max-width: 640px) {
    .photo-camera-modal {
        align-items: stretch;
        padding: 0;
    }

    .photo-camera-dialog {
        width: 100%;
        height: 100%;
        max-height: none;
        border: 0;
        border-radius: 0;
    }

    .photo-camera-head {
        padding: 13px 15px;
        padding-top: calc(13px + env(safe-area-inset-top));
    }

    .photo-camera-stage {
        flex: 1;
        min-height: 0;
        aspect-ratio: auto;
    }

    .photo-camera-status {
        padding: 9px 15px;
        min-height: 38px;
    }

    .photo-camera-actions {
        padding: 10px 14px calc(12px + env(safe-area-inset-bottom));
    }

    .photo-camera-actions-left,
    .photo-camera-actions-right {
        width: 100%;
        margin-left: 0;
    }

    .photo-camera-actions-right .btn {
        flex: 1;
        justify-content: center;
    }

    .photo-capture-actions .btn {
        flex: 1 1 auto;
        justify-content: center;
    }
}

/* ------------------------------------------------------------------ */
/* Report progress (theme-aware, used on report detail + dashboard)    */
/* ------------------------------------------------------------------ */
/* Aurora Liquid progress: flowing gradient inside staggered segments.   */
/* "Action Required" is an admin-only red stage injected between          */
/* Investigating and Found, and always carries the admin's reason.        */
.report-progress {
    --rp-accent: var(--primary);
    display: block;
    margin-bottom: 22px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
}
.report-progress.is-error,
.report-progress.is-action { --rp-accent: var(--error); }
.rp-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
.rp-headcol { display: flex; flex-direction: column; }
.rp-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.1px;
    text-transform: uppercase;
    color: var(--text-muted);
}
.rp-title .material-icons { font-size: 14px; color: var(--rp-accent); }
.rp-status {
    margin-top: 4px;
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}
.report-progress.is-error .rp-status,
.report-progress.is-action .rp-status { color: var(--error); }
.rp-pct {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: -1.5px;
    line-height: 1;
    background: linear-gradient(135deg, #1E88E5, #00BCD4, #64B5F6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.report-progress.is-error .rp-pct,
.report-progress.is-action .rp-pct {
    background: linear-gradient(135deg, #C62828, #EF5350);
    -webkit-background-clip: text;
    background-clip: text;
}
.rp-segs { display: flex; gap: 7px; height: 18px; }
.rp-seg {
    flex: 1 1 0;
    min-width: 0;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    background: var(--border);
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, .08);
}
.rp-liquid {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    transform: translateX(-101%);
    background: linear-gradient(90deg, #1565C0, #1E88E5, #00BCD4, #64B5F6, #1565C0);
    background-size: 220% 100%;
    animation: rpFlow 2.8s linear infinite;
    transition: transform .85s cubic-bezier(.22, .61, .36, 1);
    box-shadow: 0 0 14px rgba(33, 150, 243, .55);
}
.rp-seg.on .rp-liquid { transform: translateX(0); }
.rp-seg.on:nth-child(2) .rp-liquid { transition-delay: .1s; }
.rp-seg.on:nth-child(3) .rp-liquid { transition-delay: .2s; }
.rp-seg.on:nth-child(4) .rp-liquid { transition-delay: .3s; }
.rp-seg.on:nth-child(5) .rp-liquid { transition-delay: .4s; }
.rp-seg::after {
    content: "";
    position: absolute;
    top: 0;
    left: -40%;
    width: 35%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .6), transparent);
    transform: skewX(-20deg);
    opacity: 0;
    animation: rpSheen 2.6s ease-in-out infinite;
}
.rp-seg.on::after { opacity: 1; }
.rp-dot {
    display: none;
    position: absolute;
    right: 3px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--primary);
    box-shadow: 0 0 10px var(--primary);
    animation: rpPulse 1.6s ease-in-out infinite;
}
.rp-seg.lead .rp-dot { display: block; }
.rp-seg.action .rp-liquid {
    background: linear-gradient(90deg, #C62828, #EF5350, #FF7043, #C62828);
    box-shadow: 0 0 14px rgba(239, 68, 68, .6);
}
.rp-seg.action .rp-dot {
    border-color: var(--error);
    box-shadow: 0 0 10px var(--error);
    animation: rpPulseRed 1.6s ease-in-out infinite;
}
.report-progress.is-error .rp-liquid {
    background: linear-gradient(90deg, #C62828, #EF5350, #FF7043, #C62828);
    box-shadow: 0 0 14px rgba(239, 68, 68, .6);
}
.report-progress.is-error .rp-dot {
    border-color: var(--error);
    box-shadow: 0 0 10px var(--error);
    animation: rpPulseRed 1.6s ease-in-out infinite;
}
.rp-foot { display: flex; gap: 7px; margin-top: 12px; }
.rp-foot span {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-muted);
    transition: color .3s ease;
}
.rp-foot span.on { color: var(--primary); }
.rp-foot span.action { color: var(--error); font-weight: 800; }
.report-progress.is-error .rp-foot span.on { color: var(--error); }
@keyframes rpFlow { 0% { background-position: 0% 50%; } 100% { background-position: 220% 50%; } }
@keyframes rpSheen { 0% { left: -40%; } 60%, 100% { left: 130%; } }
@keyframes rpPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(33, 150, 243, .55), 0 0 10px var(--primary); }
    50% { box-shadow: 0 0 0 8px rgba(33, 150, 243, 0), 0 0 10px var(--primary); }
}
@keyframes rpPulseRed {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, .55), 0 0 10px var(--error); }
    50% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0), 0 0 10px var(--error); }
}

/* Admin reason banner (only rendered while an admin action is open) */
.rp-reason {
    margin-top: 16px;
    padding: 13px 15px;
    border-radius: 12px;
    background: linear-gradient(135deg, #FEF2F2, #FFF1F2);
    border: 1px solid #FECACA;
    border-left: 4px solid var(--error);
}
.rp-reason .rh {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #B91C1C;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .6px;
}
.rp-reason .rh .material-icons { font-size: 16px; }
.rp-reason .rt {
    margin-top: 7px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.55;
    color: #7F1D1D;
}
.rp-reason .rm { margin-top: 8px; font-size: 10.5px; color: #991B1B; opacity: .85; }
.rp-reason .rp-cta { margin-top: 12px; }
.rp-reason .rp-cta .material-icons { font-size: 16px; }
[data-theme="dark"] .rp-reason {
    background: linear-gradient(135deg, rgba(127, 29, 29, .35), rgba(127, 29, 29, .2));
    border-color: #7F1D1D;
}
[data-theme="dark"] .rp-reason .rh { color: #FCA5A5; }
[data-theme="dark"] .rp-reason .rt { color: #FECACA; }
[data-theme="dark"] .rp-reason .rm { color: #FCA5A5; }

/* Compact aurora bar inside report cards (dashboard / lists) */
.rc-progress { display: flex; gap: 5px; margin-top: 8px; width: 100%; }
.rc-seg {
    flex: 1 1 0;
    min-width: 0;
    height: 6px;
    border-radius: 999px;
    background: var(--border);
    position: relative;
    overflow: hidden;
}
.rc-seg::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    transform: translateX(-101%);
    background: linear-gradient(90deg, #1565C0, #1E88E5, #00BCD4, #64B5F6, #1565C0);
    background-size: 220% 100%;
    animation: rpFlow 2.8s linear infinite;
    transition: transform .7s cubic-bezier(.22, .61, .36, 1);
}
.rc-seg.done::before { transform: translateX(0); }
.rc-seg.done:nth-child(2)::before { transition-delay: .08s; }
.rc-seg.done:nth-child(3)::before { transition-delay: .16s; }
.rc-seg.done:nth-child(4)::before { transition-delay: .24s; }
.rc-seg.done:nth-child(5)::before { transition-delay: .32s; }
.rc-seg.action::before,
.rc-progress.is-error .rc-seg.done::before {
    background: linear-gradient(90deg, #C62828, #EF5350, #FF7043, #C62828);
}

/* Full Aurora Liquid blend inside list cards (My Reports) */
.report-card.report-row {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}
.report-row .rc-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.report-progress.in-card {
    margin: 12px 0 0;
    padding: 12px;
    border: 1px solid rgba(33, 150, 243, .35);
    border-radius: 12px;
    background: rgba(33, 150, 243, .04);
}
.report-progress.in-card.is-error,
.report-progress.in-card.is-action {
    border-color: rgba(239, 68, 68, .4);
    background: rgba(239, 68, 68, .04);
}
.report-progress.in-card .rp-head { margin-bottom: 9px; align-items: flex-start; }
.report-progress.in-card .rp-title { font-size: 9px; letter-spacing: .9px; }
.report-progress.in-card .rp-status { margin-top: 3px; font-size: 12px; }
.report-progress.in-card .rp-pct { font-size: 20px; letter-spacing: -.8px; }
.report-progress.in-card .rp-segs { height: 12px; gap: 5px; }
.report-progress.in-card .rp-dot {
    right: 2px;
    width: 9px;
    height: 9px;
    border-width: 2px;
}
.report-progress.in-card .rp-foot { margin-top: 7px; gap: 5px; }
.report-progress.in-card .rp-foot span { font-size: 9px; }
.dashboard-side .report-progress.in-card .rp-foot span { font-size: 8px; }
.dashboard-side .report-progress.in-card .rp-title { font-size: 8px; }

/* Found / resolved — green aurora */
.report-progress.is-found { --rp-accent: var(--success); }
.report-progress.is-found .rp-status { color: var(--success); }
.report-progress.is-found .rp-pct {
    background: linear-gradient(135deg, #2E7D32, #43A047, #66BB6A);
    -webkit-background-clip: text;
    background-clip: text;
}
.report-progress.is-found .rp-liquid {
    background: linear-gradient(90deg, #2E7D32, #43A047, #66BB6A, #43A047, #2E7D32);
    box-shadow: 0 0 14px rgba(16, 185, 129, .55);
}
.report-progress.is-found .rp-dot {
    border-color: var(--success);
    box-shadow: 0 0 10px var(--success);
    animation: rpPulseGreen 1.6s ease-in-out infinite;
}
.report-progress.is-found .rp-foot span.on { color: var(--success); }
.report-progress.in-card.is-found {
    border-color: rgba(16, 185, 129, .45);
    background: rgba(16, 185, 129, .05);
}
.rc-progress.is-found .rc-seg.done::before {
    background: linear-gradient(90deg, #2E7D32, #43A047, #66BB6A, #2E7D32);
}
@keyframes rpPulseGreen {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, .55), 0 0 10px var(--success); }
    50% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0), 0 0 10px var(--success); }
}

@media (prefers-reduced-motion: reduce) {
    .rp-liquid,
    .rp-seg::after,
    .rp-dot,
    .rc-seg::before { animation: none; transition: none; }
}

@media (max-width: 420px) {
    .rp-foot span { font-size: 9px; }
    .rp-pct { font-size: 28px; }
    .rp-segs { height: 15px; gap: 5px; }
    .rp-foot { gap: 5px; }
}

/* ------------------------------------------------------------------ */
/* Superadmin panel                                                    */
/* ------------------------------------------------------------------ */
.admin-page {
    max-width: 1180px;
    margin: 0 auto;
    padding: 26px 24px 40px;
}
.admin-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.admin-head h1 { font-size: 26px; font-weight: 800; line-height: 1.15; }
.admin-head p { color: var(--text-secondary); font-size: 14px; margin-top: 4px; }
.admin-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}
.admin-stat {
    background: var(--card);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 16px 18px;
    box-shadow: var(--shadow);
}
.admin-stat .value { font-size: 26px; font-weight: 800; line-height: 1.1; color: var(--text); }
.admin-stat .label { font-size: 12px; color: var(--text-secondary); margin-top: 4px; display: flex; align-items: center; gap: 6px; }
.admin-stat .label .material-icons { font-size: 15px; color: var(--primary); }
.admin-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 22px 0 12px;
}
.admin-section-title h2 { font-size: 17px; font-weight: 700; }
.admin-section-title h2 span { color: var(--text-muted); font-weight: 500; }
.admin-table-wrap {
    background: var(--card);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.admin-table-scroll { overflow-x: auto; }
.admin-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 660px;
}
.admin-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-muted);
    background: var(--surface-2);
    border-bottom: 1px solid var(--border-light);
    white-space: nowrap;
}
.admin-table td {
    padding: 13px 16px;
    font-size: 14px;
    color: var(--text);
    border-top: 1px solid var(--border-light);
    vertical-align: middle;
}
.admin-table tbody tr:hover td { background: rgba(33, 150, 243, .04); }
[data-theme="dark"] .admin-table tbody tr:hover td { background: rgba(33, 150, 243, .08); }
.admin-user-cell { display: flex; align-items: center; gap: 11px; min-width: 0; }
.admin-avatar {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(33, 150, 243, .12);
    color: var(--primary);
    font-size: 16px;
    flex-shrink: 0;
}
.admin-user-name { font-weight: 600; font-size: 14px; line-height: 1.3; }
.admin-user-email { font-size: 12px; color: var(--text-secondary); line-height: 1.3; }
.admin-actions-cell { text-align: right; white-space: nowrap; }
.admin-manage { display: inline-block; text-align: left; position: relative; }
.admin-manage > summary {
    list-style: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 36px;
    padding: 8px 13px;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
}
.admin-manage > summary::-webkit-details-marker { display: none; }
.admin-manage[open] > summary { border-color: var(--primary); color: var(--primary); }
.admin-manage-panel {
    margin-top: 10px;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: var(--surface-2);
    width: min(340px, 78vw);
    text-align: left;
    box-shadow: var(--shadow-lg);
}
.admin-manage-panel + .admin-manage-panel { margin-top: 10px; }
.admin-panel-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-muted);
    margin-bottom: 7px;
}
.admin-inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.admin-inline-form input {
    flex: 1 1 130px;
    min-width: 0;
    min-height: 38px;
    padding: 8px 11px;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 13px;
}
.admin-inline-form input:focus { border-color: var(--primary); outline: none; }
.admin-danger-text { color: var(--error); }
.admin-empty {
    padding: 26px 18px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
}
.admin-empty .material-icons { display: block; font-size: 28px; margin-bottom: 6px; color: var(--text-muted); }
.admin-request-row {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    padding: 14px 18px;
    border-top: 1px solid var(--border-light);
}
.admin-request-row:first-of-type { border-top: none; }
.admin-request-main { flex: 1 1 240px; min-width: 0; }
.admin-request-id { font-weight: 600; font-size: 13px; word-break: break-all; }
.admin-request-meta { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.admin-note {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 13px 15px;
    border-radius: 14px;
    font-size: 13px;
    margin-bottom: 18px;
    background: rgba(245, 158, 11, .12);
    color: #92400E;
    border: 1px solid rgba(245, 158, 11, .25);
}
[data-theme="dark"] .admin-note { color: #FBBF24; }
.admin-note .material-icons { font-size: 19px; flex-shrink: 0; }
.admin-perm-table { min-width: 820px; }
.admin-perm-table td { vertical-align: top; }
.admin-perm-module { font-weight: 600; white-space: nowrap; }
.perm-check {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
    padding: 2px 0;
    white-space: nowrap;
}
.perm-check input { accent-color: var(--primary); }
.admin-perm-actions { display: flex; flex-direction: column; gap: 1px; }
.admin-save-bar {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
    flex-wrap: wrap;
}
.admin-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 14px;
}
.admin-back:hover { color: var(--primary); }

@media (max-width: 720px) {
    .admin-page { padding: 18px 16px 34px; }
    .admin-head h1 { font-size: 22px; }
}

/* ------------------------------------------------------------------ */
/* Notifications and desktop sidebar controls                         */
/* ------------------------------------------------------------------ */
.notification-wrap {
    position: relative;
    display: inline-flex;
}
.notification-trigger { position: relative; }
.notification-trigger[aria-expanded="true"] {
    background: var(--chip-bg);
    color: var(--primary);
}
.notification-badge {
    position: absolute;
    top: 3px;
    right: 3px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--error);
    color: #fff;
    border: 2px solid var(--surface);
    font-size: 9px;
    font-weight: 800;
    line-height: 1;
}
.notification-popover {
    position: absolute;
    z-index: 110;
    top: calc(100% + 10px);
    right: 0;
    width: min(360px, calc(100vw - 32px));
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--card);
    box-shadow: var(--shadow-lg), 0 12px 32px rgba(17, 24, 39, .12);
    color: var(--text);
    animation: notification-pop .16s ease-out;
}
.notification-popover[hidden] { display: none; }
@keyframes notification-pop {
    from { opacity: 0; transform: translateY(-5px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.notification-popover-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 16px 12px;
    border-bottom: 1px solid var(--border-light);
}
.notification-popover-head strong { font-size: 15px; }
.notification-popover-head span { font-size: 11px; color: var(--text-secondary); }
.notification-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    color: var(--text);
    border-bottom: 1px solid var(--border-light);
    transition: background .15s ease;
}
.notification-item:hover { background: var(--surface-2); color: var(--text); }
.notification-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    border-radius: 11px;
}
.notification-icon .material-icons { font-size: 18px; }
.notification-icon.warning { background: rgba(245, 158, 11, .14); color: var(--warning); }
.notification-icon.success { background: rgba(16, 185, 129, .13); color: var(--success); }
.notification-icon.info { background: rgba(33, 150, 243, .13); color: var(--primary); }
.notification-copy { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.notification-copy strong { font-size: 12px; line-height: 1.3; }
.notification-copy small { color: var(--text-secondary); font-size: 11px; line-height: 1.35; }
.notification-arrow { color: var(--text-muted); font-size: 18px; }
.notification-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 24px 16px;
    color: var(--text-secondary);
    text-align: center;
}
.notification-empty .material-icons { color: var(--success); font-size: 28px; margin-bottom: 3px; }
.notification-empty strong { color: var(--text); font-size: 13px; }
.notification-empty span:last-child { font-size: 11px; }
.notification-footer {
    display: block;
    padding: 11px 14px;
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    text-align: center;
    background: var(--surface-2);
}
.notification-footer:hover { color: var(--primary-dark); }

@media (max-width: 599px) {
    .notification-popover {
        position: fixed;
        top: 72px;
        right: 16px;
        width: min(360px, calc(100vw - 32px));
    }
}

@media (min-width: 1200px) {
    .sidebar-toggle {
        cursor: pointer;
        outline: none;
    }
    .sidebar-toggle:focus-visible {
        outline: 3px solid rgba(33, 150, 243, .32);
        outline-offset: 2px;
    }
    .sidebar-toggle::after {
        content: "";
        position: absolute;
        inset: -5px;
        border-radius: 50%;
    }
}

/* Web pattern unlock for locks created in the mobile app */
.web-pattern-grid {
    display: grid;
    grid-template-columns: repeat(3, 56px);
    justify-content: center;
    gap: 14px;
    padding: 14px 0 8px;
}
.web-pattern-dot {
    width: 56px;
    height: 56px;
    border: 2px solid var(--border);
    border-radius: 50%;
    background: var(--surface-2);
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease;
}
.web-pattern-dot:hover { border-color: var(--primary); color: var(--primary); transform: scale(1.04); }
.web-pattern-dot.selected {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 0 0 5px rgba(33, 150, 243, .14);
}

/* Drag-to-draw pattern pad (set + unlock), mirrors the mobile app */
.web-pattern-pad {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, 56px);
    justify-content: center;
    gap: 14px;
    padding: 14px 0 8px;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
}
.web-pattern-lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: visible;
    z-index: 1;
}
.web-pattern-pad .web-pattern-dot { position: relative; z-index: 2; }
.web-pattern-pad.error .web-pattern-dot.selected {
    background: var(--error);
    border-color: var(--error);
    box-shadow: 0 0 0 5px rgba(239, 68, 68, .16);
}
.lock-method-picker {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 16px;
}
.lock-method-option {
    border: 1.5px solid var(--border);
    border-radius: 14px;
    padding: 14px 12px;
    cursor: pointer;
    text-align: center;
    transition: border-color .2s ease, background .2s ease;
}
.lock-method-option:hover { border-color: var(--primary); }
.lock-method-option.active {
    border-color: var(--primary);
    background: rgba(33, 150, 243, .07);
}
.lock-method-option .material-icons {
    display: block;
    font-size: 26px;
    color: var(--primary);
    margin-bottom: 5px;
}
.lock-method-option strong { display: block; font-size: 13px; }
.lock-method-option small { display: block; font-size: 11px; color: var(--text-secondary); margin-top: 2px; }
.lock-pattern-hint { min-height: 18px; font-size: 12px; color: var(--text-secondary); margin-top: 6px; }

/* Flutter-style PIN dots + keypad for the web App Lock */
.web-pin-dots {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 18px 0 6px;
}
.web-pin-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--surface-2);
    border: 2px solid var(--border);
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.web-pin-dot.filled {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 0 0 5px rgba(33, 150, 243, .14);
}
.web-pin-keypad {
    display: grid;
    grid-template-columns: repeat(3, 56px);
    justify-content: center;
    gap: 12px;
    margin-top: 10px;
}
.web-pin-key {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: rgba(33, 150, 243, .06);
    color: var(--primary);
    font-size: 20px;
    font-weight: 600;
    cursor: pointer;
    display: grid;
    place-items: center;
    transition: background .15s ease, color .15s ease, transform .15s ease;
}
.web-pin-key:hover { background: var(--primary); color: #fff; transform: scale(1.05); }
.web-pin-key:active { transform: scale(.96); }
.web-pin-key.action .material-icons { font-size: 22px; }

/* Flutter-style blue hero on the App Lock setup page */
.lock-hero {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    border-radius: 20px;
    background: linear-gradient(135deg, #1565C0, #1E88E5, #42A5F5);
    color: #fff;
    margin-bottom: 16px;
    box-shadow: 0 8px 20px rgba(33, 150, 243, .28);
}
.lock-hero-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .18);
    display: grid;
    place-items: center;
    flex-shrink: 0;
}
.lock-hero h1 { font-size: 20px; font-weight: 700; }
.lock-hero p { font-size: 12px; opacity: .9; margin-top: 2px; line-height: 1.4; }

/* ---------- Location picker: place results + fullscreen + desktop split ----- */
.location-picker { position: relative; }
.map-canvas-wrap { position: relative; }
.map-results {
    position: absolute;
    top: 52px;
    left: 10px;
    right: 10px;
    z-index: 600;
    max-height: 230px;
    overflow-y: auto;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, .2);
}
.map-results[hidden] { display: none; }
.map-result {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
    border: 0;
    border-bottom: 1px solid var(--border-light);
    background: transparent;
    color: var(--text);
    text-align: left;
    padding: 9px 10px;
    cursor: pointer;
}
.map-result:last-child { border-bottom: 0; }
.map-result:hover { background: rgba(33, 150, 243, .07); }
.map-result .material-icons { font-size: 17px; color: var(--primary); flex-shrink: 0; }
.map-result b { display: block; font-size: 11.5px; font-weight: 700; line-height: 1.35; }
.map-result small { display: block; font-size: 9.5px; color: var(--muted); margin-top: 2px; }
.map-exit-fullscreen {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 950;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--card);
    color: var(--text);
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: var(--shadow);
}
.map-exit-fullscreen[hidden] { display: none; }
.map-exit-fullscreen .material-icons { font-size: 19px; }
.location-picker.fullscreen {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: var(--bg);
    border-radius: 0;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    overflow: auto;
}
body.map-fullscreen-open { overflow: hidden; }
.location-picker.fullscreen .map-canvas-wrap {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    height: calc(100vh - 210px);
    min-height: 320px;
}
.location-picker.fullscreen .map-canvas { height: 100%; min-height: 320px; }
.location-picker.fullscreen .map-results { top: 56px; max-height: 45vh; }
@media (min-width: 900px) {
    .location-picker {
        display: grid;
        grid-template-columns: minmax(0, 1.15fr) minmax(260px, .85fr);
        column-gap: 18px;
        row-gap: 10px;
        align-items: start;
    }
    .location-picker-title { grid-column: 1; grid-row: 1; }
    .map-search { grid-column: 1; grid-row: 2; }
    .map-canvas-wrap { grid-column: 1; grid-row: 3; }
    .map-picker-status-row { grid-column: 2; grid-row: 1; }
    .map-address-grid { grid-column: 2; grid-row: 2 / span 2; }
    .map-canvas { height: 340px; }
    .location-picker.fullscreen { display: flex; }
}
