:root {
    --navy: #14233b;
    --navy-2: #1d3353;
    --gold: #d7a948;
    --cream: #f6f3ec;
    --white: #ffffff;
    --ink: #1b2430;
    --muted: #667085;
    --line: #e3e7ec;
    --success: #18794e;
    --danger: #b42318;
    --warning: #a15c00;
    --info: #175cd3;
    --shadow: 0 12px 32px rgba(16, 24, 40, .08);
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, Segoe UI, Arial, sans-serif; color: var(--ink); background: #eef1f5; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 250px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; background: linear-gradient(180deg, var(--navy), #0f1a2b); color: #fff; padding: 24px 18px; display: flex; flex-direction: column; }
.brand { display: flex; gap: 12px; align-items: center; padding: 4px 8px 26px; }
.brand-mark { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--gold); color: var(--navy); font-weight: 800; letter-spacing: .5px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.35); }
.brand strong { display: block; font-size: 18px; }
.brand small { color: #b9c5d6; }
.sidebar nav { display: grid; gap: 6px; }
.sidebar nav a { padding: 12px 14px; border-radius: 10px; color: #dbe4ef; font-size: 14px; }
.sidebar nav a:hover, .sidebar nav a.active { background: rgba(255,255,255,.10); color: #fff; }
.sidebar nav a.active { border-left: 3px solid var(--gold); }
.sidebar-footer { margin-top: auto; display: grid; gap: 5px; padding: 18px 10px 4px; color: #c7d2e0; border-top: 1px solid rgba(255,255,255,.12); }
.sidebar-footer strong { color: #fff; }
.sidebar-footer span { font-size: 12px; color: var(--gold); }
.sidebar-footer a { margin-top: 8px; font-size: 13px; color: #fff; }
.main-content { padding: 26px 30px 40px; min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.topbar h1 { margin: 0 0 4px; font-size: 28px; }
.topbar p { margin: 0; color: var(--muted); }
.topbar-date { color: var(--muted); font-size: 14px; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px; box-shadow: var(--shadow); }
.card h2, .card h3 { margin-top: 0; }
.metric { min-height: 132px; display: flex; flex-direction: column; justify-content: space-between; }
.metric-label { color: var(--muted); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.metric-value { font-size: 34px; font-weight: 800; margin-top: 18px; }
.metric-note { color: var(--muted); font-size: 13px; }
.toolbar { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn { appearance: none; border: 0; border-radius: 10px; padding: 10px 15px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-2); }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-secondary { background: #edf1f5; color: var(--ink); }
.btn-danger { background: #fee4e2; color: var(--danger); }
.btn-success { background: #dcfae6; color: var(--success); }
.btn-sm { padding: 7px 10px; font-size: 13px; }
.btn-block { width: 100%; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: top; }
th { background: #f8fafc; color: #475467; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
tr:last-child td { border-bottom: 0; }
tr:hover td { background: #fcfcfd; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .span-2 { grid-column: 1 / -1; }
label { display: grid; gap: 7px; color: #344054; font-size: 13px; font-weight: 700; }
input, select, textarea { width: 100%; border: 1px solid #ccd3dc; border-radius: 9px; padding: 10px 11px; background: #fff; color: var(--ink); outline: none; }
input:focus, select:focus, textarea:focus { border-color: #7f8ea3; box-shadow: 0 0 0 3px rgba(20, 35, 59, .08); }
textarea { min-height: 90px; resize: vertical; }
.help { color: var(--muted); font-size: 12px; font-weight: 400; }
.alert { padding: 12px 14px; border-radius: 10px; margin: 0 0 16px; border: 1px solid transparent; }
.alert-success { background: #ecfdf3; border-color: #abefc6; color: #067647; }
.alert-danger { background: #fef3f2; border-color: #fecdca; color: #b42318; }
.alert-warning { background: #fffaeb; border-color: #fedf89; color: #b54708; }
.alert-info { background: #eff8ff; border-color: #b2ddff; color: #175cd3; }
.badge { display: inline-flex; padding: 5px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.badge-success { background: #dcfae6; color: #067647; }
.badge-warning { background: #fef0c7; color: #b54708; }
.badge-info { background: #d1e9ff; color: #175cd3; }
.badge-danger { background: #fee4e2; color: #b42318; }
.badge-muted { background: #eaecf0; color: #475467; }
.auth-body { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at top left, #eef3f8, #dce3ec); }
.auth-card, .setup-card { width: min(460px, 100%); background: #fff; border-radius: 20px; padding: 30px; box-shadow: 0 24px 80px rgba(20,35,59,.16); }
.setup-card { width: min(760px, 100%); }
.auth-brand { display: flex; gap: 14px; align-items: center; margin-bottom: 24px; }
.auth-brand h1 { margin: 0 0 4px; font-size: 24px; }
.auth-brand p { margin: 0; color: var(--muted); }
.auth-card form { display: grid; gap: 16px; margin-bottom: 18px; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin: 26px 0 12px; }
.section-title h2 { margin: 0; font-size: 18px; }
.empty { padding: 38px; text-align: center; color: var(--muted); }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 9px 18px; }
.kv div:nth-child(odd) { color: var(--muted); }
.receipt { background: #fff; max-width: 900px; margin: 0 auto; border: 1px solid var(--line); padding: 28px; }
.receipt-head { display: flex; justify-content: space-between; gap: 20px; border-bottom: 2px solid var(--navy); padding-bottom: 16px; margin-bottom: 18px; }
.receipt h1 { margin: 0; font-size: 24px; }
.receipt h2 { font-size: 18px; margin: 22px 0 8px; }
.receipt-meta { text-align: right; }
.search-box { min-width: 260px; }
.item-row { border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 12px; background: #fcfcfd; }
.inline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.warning-box { background: #fffaeb; color: #7a2e0e; border: 1px solid #fedf89; border-radius: 10px; padding: 12px; }
@media (max-width: 980px) {
    .app-shell { grid-template-columns: 1fr; }
    .sidebar { position: relative; height: auto; }
    .sidebar nav { grid-template-columns: repeat(3, 1fr); }
    .sidebar-footer { display: none; }
    .grid-4, .grid-3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 680px) {
    .main-content { padding: 18px; }
    .sidebar nav { grid-template-columns: repeat(2, 1fr); }
    .grid-4, .grid-3, .grid-2, .form-grid { grid-template-columns: 1fr; }
    .form-grid .span-2 { grid-column: auto; }
    .topbar { align-items: flex-start; gap: 10px; }
    .topbar-date { display: none; }
    .kv { grid-template-columns: 1fr; }
    .receipt-head { display: block; }
    .receipt-meta { text-align: left; margin-top: 14px; }
}
@media print {
    body { background: #fff; }
    .sidebar, .topbar, .no-print, .alert { display: none !important; }
    .app-shell { display: block; }
    .main-content { padding: 0; }
    .receipt { border: 0; max-width: none; padding: 0; }
}

/* v0.1.1 operational enhancements */
.brand-logo { width: 48px; height: 48px; border-radius: 12px; background: #fff; display: grid; place-items: center; padding: 4px; overflow: hidden; }
.brand-logo img { width: 100%; height: 100%; object-fit: contain; }
.app-version { margin-top: 10px; opacity: .65; font-size: 10px !important; }
.page-footer { display: flex; justify-content: space-between; gap: 16px; color: var(--muted); font-size: 12px; margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); }
.narrow-card { width: min(760px, 100%); margin-inline: auto; }
.stack-actions { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #912018; }
.btn-danger-outline { background: #fff; color: var(--danger); border: 1px solid #fda29b; }
.document-preview { border: 1px dashed var(--line); border-radius: 12px; padding: 12px; width: fit-content; }
.document-preview img { display: block; max-width: 220px; max-height: 100px; object-fit: contain; }
.profile-heading { display: flex; align-items: center; gap: 14px; }
.profile-heading h2 { margin: 0 0 4px; }
.avatar-large, .avatar-placeholder { width: 72px; height: 72px; border-radius: 18px; object-fit: cover; }
.avatar-placeholder { display: grid; place-items: center; background: var(--navy); color: #fff; font-size: 26px; font-weight: 800; }
.avatar-medium { width: 90px; height: 90px; border-radius: 14px; object-fit: cover; }
.owner-summary { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; }
.small-value { font-size: clamp(20px, 2.3vw, 27px); }
.item-check { font-size: 15px; display: flex; }
.item-check input { width: auto; }
.item-meta { margin: 8px 0 14px; }
.payment-mini-list { display: grid; gap: 8px; }
.payment-mini-list > div { display: flex; justify-content: space-between; gap: 14px; border-top: 1px solid var(--line); padding-top: 8px; font-size: 13px; }
.amendment-detail { display: grid; gap: 8px; margin-top: 8px; min-width: 280px; }
.amendment-detail > div { border-left: 3px solid var(--gold); padding-left: 8px; }
.danger-zone { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-top: 22px; padding: 16px; border: 1px solid #fda29b; background: #fff7f6; border-radius: 14px; }
.check-label { display: flex; grid-template-columns: auto 1fr; align-items: center; justify-content: flex-start; flex-direction: row; }
.check-label input { width: auto; }
.storage-list { display: grid; gap: 14px; }
.storage-row { display: grid; grid-template-columns: minmax(120px, 1fr) 2fr auto; gap: 12px; align-items: center; }
.storage-row small { display: block; color: var(--muted); }
.storage-progress { height: 10px; background: #eef1f5; border-radius: 999px; overflow: hidden; }
.storage-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), #b97d18); border-radius: inherit; }
.report-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.report-card { min-height: 120px; display: flex; flex-direction: column; justify-content: space-between; }
.report-card h3 { margin: 0; font-size: 16px; }
.report-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.report-actions a { font-size: 12px; font-weight: 800; color: var(--info); }
.print-body { background: #fff; padding: 20px; }
.print-toolbar { max-width: 1100px; margin: 0 auto 16px; }
.receipt-brand { display: flex; align-items: flex-start; gap: 14px; }
.receipt-brand img { width: 72px; height: 72px; object-fit: contain; }
.receipt-brand p { margin: 5px 0 0; line-height: 1.45; }
.receipt-summary { margin-top: 24px; }
.signature-grid { margin-top: 48px; }
.receipt-note { margin-top: 22px; padding: 14px; background: #f8fafc; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; }
.receipt-footer { margin-top: 24px; padding-top: 12px; border-top: 1px solid var(--line); text-align: center; color: var(--muted); font-size: 11px; }
.thermal-print .receipt { width: 80mm; max-width: 80mm; padding: 5mm; border: 0; box-shadow: none; font-size: 11px; }
.thermal-print .receipt-head, .thermal-print .receipt-columns { display: block; }
.thermal-print .receipt-brand img { width: 44px; height: 44px; }
.thermal-print .receipt h1 { font-size: 17px; }
.thermal-print .receipt h2 { font-size: 13px; margin: 12px 0 5px; }
.thermal-print .receipt-meta { text-align: left; margin-top: 8px; }
.thermal-print table, .thermal-print thead, .thermal-print tbody, .thermal-print th, .thermal-print td, .thermal-print tr { display: block; }
.thermal-print thead { display: none; }
.thermal-print tr { border-top: 1px dashed #777; padding: 6px 0; }
.thermal-print td { border: 0; padding: 2px 0; font-size: 10px; }
.thermal-print td::before { font-weight: 700; }
.tag-sheet { max-width: 210mm; margin: 0 auto; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 8mm; }
.custody-tag { min-height: 72mm; border: 1.5px solid var(--navy); border-radius: 8px; padding: 7mm; font-size: 13px; display: grid; gap: 5px; position: relative; }
.tag-head { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.tag-head span { font-weight: 800; }
.tag-ref { position: absolute; bottom: 5mm; right: 7mm; font-size: 11px; color: var(--muted); }
.report-print { max-width: 1200px; margin: 0 auto; }
.report-head { display: flex; justify-content: space-between; gap: 24px; border-bottom: 2px solid var(--navy); padding-bottom: 14px; margin-bottom: 18px; }
.report-head h1 { margin: 0; font-size: 22px; }
.report-head p { margin: 5px 0 0; color: var(--muted); }
.report-signature { margin-top: 45px; text-align: right; }

@media (max-width: 980px) {
    .report-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 680px) {
    .owner-summary { grid-template-columns: 1fr; }
    .danger-zone, .storage-row, .report-head { display: flex; flex-direction: column; align-items: stretch; }
    .report-grid, .tag-sheet { grid-template-columns: 1fr; }
    .page-footer { display: none; }
}
@media print {
    @page { margin: 10mm; }
    .page-footer { display: none !important; }
    .print-body { padding: 0; }
    .receipt, .report-print { box-shadow: none; }
    .thermal-print { width: 80mm; }
    .thermal-print .receipt { width: 80mm; max-width: 80mm; }
    .tag-sheet { gap: 5mm; }
    .custody-tag { break-inside: avoid; }
    .report-print table { font-size: 10px; }
    .report-print th, .report-print td { padding: 6px; font-size: 9px; }
}

/* v0.1.2 — camera capture, editable storage and professional colour system */
:root {
    --navy: #102a43;
    --navy-2: #17466f;
    --navy-3: #0b1f33;
    --teal: #0f9f8f;
    --teal-dark: #08766b;
    --cyan: #1e88e5;
    --violet: #6d5bd0;
    --magenta: #c14b8a;
    --orange: #e9792b;
    --gold: #e7b54a;
    --cream: #fff8e8;
    --white: #ffffff;
    --ink: #142235;
    --muted: #64748b;
    --line: #dce5ef;
    --success: #11845b;
    --danger: #c4372d;
    --warning: #b76610;
    --info: #1769c2;
    --shadow: 0 14px 40px rgba(21, 49, 78, .09);
    --shadow-strong: 0 24px 70px rgba(13, 42, 67, .18);
}
body {
    background:
        radial-gradient(circle at 88% 2%, rgba(30, 136, 229, .10), transparent 28%),
        radial-gradient(circle at 28% 100%, rgba(15, 159, 143, .08), transparent 30%),
        #f3f7fb;
}
.sidebar {
    background:
        radial-gradient(circle at 20% 2%, rgba(45, 190, 174, .24), transparent 27%),
        linear-gradient(165deg, #123c5c 0%, #0b2d48 50%, #091f35 100%);
    box-shadow: 12px 0 38px rgba(8, 31, 53, .13);
}
.brand { padding-bottom: 22px; border-bottom: 1px solid rgba(255,255,255,.10); margin-bottom: 15px; }
.brand-mark {
    position: relative;
    width: 48px;
    height: 52px;
    border-radius: 15px 15px 19px 19px;
    background: linear-gradient(145deg, #f3ca68, #d99727);
    color: #0b2b47;
    box-shadow: 0 10px 24px rgba(231,181,74,.24), inset 0 0 0 1px rgba(255,255,255,.55);
}
.brand-mark::after { content: ''; position: absolute; inset: 5px; border: 1px solid rgba(16,42,67,.22); border-radius: 11px 11px 15px 15px; }
.brand strong { font-size: 19px; letter-spacing: -.02em; }
.brand small { color: #a9d9d4; }
.sidebar nav { gap: 7px; }
.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 13px;
    border: 1px solid transparent;
    transition: .18s ease;
}
.sidebar nav a:hover { transform: translateX(3px); background: rgba(255,255,255,.09); }
.sidebar nav a.active {
    border-left: 0;
    border-color: rgba(255,255,255,.13);
    background: linear-gradient(90deg, rgba(15,159,143,.34), rgba(255,255,255,.08));
    box-shadow: inset 3px 0 0 var(--gold);
}
.nav-icon { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; background: rgba(255,255,255,.09); color: #dff9f5; font-size: 13px; }
.main-content { position: relative; }
.main-content::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 5px; background: linear-gradient(90deg, var(--teal), var(--cyan), var(--violet), var(--gold)); }
.topbar { padding-top: 3px; }
.topbar h1 { font-size: clamp(24px, 2.3vw, 31px); letter-spacing: -.035em; color: #102a43; }
.topbar p { color: #688096; }
.topbar-date { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; box-shadow: 0 6px 20px rgba(20,50,80,.06); }
.card {
    border-color: rgba(205,219,232,.85);
    border-radius: 18px;
    box-shadow: var(--shadow);
    transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { box-shadow: 0 18px 46px rgba(21,49,78,.12); }
.card h2, .card h3 { color: #153a5b; letter-spacing: -.02em; }
.metric {
    position: relative;
    overflow: hidden;
    border-top: 4px solid var(--metric-accent, var(--cyan));
    background: linear-gradient(145deg, #fff 62%, var(--metric-tint, #eef7ff));
}
.metric::after { content: ''; position: absolute; width: 88px; height: 88px; border-radius: 50%; right: -26px; top: -26px; background: var(--metric-glow, rgba(30,136,229,.12)); }
.metric-blue { --metric-accent: #1e88e5; --metric-tint: #edf7ff; --metric-glow: rgba(30,136,229,.15); }
.metric-teal { --metric-accent: #0f9f8f; --metric-tint: #ebfbf7; --metric-glow: rgba(15,159,143,.15); }
.metric-violet { --metric-accent: #6d5bd0; --metric-tint: #f3f0ff; --metric-glow: rgba(109,91,208,.15); }
.metric-orange { --metric-accent: #e9792b; --metric-tint: #fff4eb; --metric-glow: rgba(233,121,43,.15); }
.metric-red { --metric-accent: #d34a45; --metric-tint: #fff1f0; --metric-glow: rgba(211,74,69,.15); }
.metric-gold { --metric-accent: #d99b22; --metric-tint: #fff8e8; --metric-glow: rgba(217,155,34,.16); }
.metric-pink { --metric-accent: #c14b8a; --metric-tint: #fff0f8; --metric-glow: rgba(193,75,138,.15); }
.metric-slate { --metric-accent: #5f7489; --metric-tint: #f0f5f8; --metric-glow: rgba(95,116,137,.14); }
.metric-label { color: #597087; font-weight: 800; }
.metric-value { color: #102a43; letter-spacing: -.04em; }
.dashboard-welcome {
    padding: 16px 18px;
    border-radius: 16px;
    background: linear-gradient(105deg, #eefaf8, #eef5ff 55%, #faf3ff);
    border: 1px solid #d9e8ef;
}
.btn { min-height: 40px; border-radius: 11px; transition: transform .15s ease, box-shadow .15s ease, filter .15s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, #143e62, #176b91); box-shadow: 0 8px 18px rgba(20,80,119,.18); }
.btn-primary:hover { background: linear-gradient(135deg, #0f3454, #125f83); }
.btn-gold { background: linear-gradient(135deg, #f0ca6e, #dc9d29); box-shadow: 0 8px 18px rgba(220,157,41,.20); }
.btn-success { background: linear-gradient(135deg, #168963, #0eaa8a); color: #fff; }
.btn-secondary { border: 1px solid #d7e0e9; background: linear-gradient(#fff, #f4f7fa); }
.btn-camera { background: linear-gradient(135deg, #6d5bd0, #3c75cc); color: #fff; box-shadow: 0 8px 18px rgba(83,97,201,.20); }
.table-wrap { border-radius: 14px; box-shadow: inset 0 1px 0 rgba(255,255,255,.75); }
th { background: linear-gradient(180deg, #f8fbfd, #edf3f8); color: #48637b; }
tr:hover td { background: #f4fbff; }
input, select, textarea { border-color: #cbd9e5; background: #fcfdff; transition: .16s ease; }
input:focus, select:focus, textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(30,136,229,.10); background: #fff; }
.item-row { border-left: 4px solid #6d5bd0; background: linear-gradient(130deg, #fff, #fbfaff); }
.section-title h2::after { content: ''; display: block; width: 42px; height: 3px; margin-top: 6px; border-radius: 10px; background: linear-gradient(90deg, var(--teal), var(--cyan)); }
.storage-progress { height: 11px; }
.storage-progress span { background: linear-gradient(90deg, var(--teal), var(--cyan), var(--violet)); }
.alert { box-shadow: 0 5px 16px rgba(20,50,80,.04); }
.badge { letter-spacing: .025em; }
.page-footer { color: #7890a6; }

/* Camera / upload control */
.capture-field {
    display: grid;
    gap: 9px;
    padding: 14px;
    border: 1px dashed #b8cad9;
    border-radius: 14px;
    background: linear-gradient(135deg, #fbfdff, #f5f9fd);
}
.capture-label { color: #344f68; font-size: 13px; font-weight: 800; }
.capture-actions { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
.capture-upload-button { cursor: pointer; }
.capture-preview { display: flex; align-items: center; gap: 12px; min-height: 48px; color: var(--muted); font-size: 12px; }
.capture-preview img { width: 88px; height: 66px; object-fit: cover; border-radius: 10px; border: 1px solid #ccdae6; box-shadow: 0 5px 14px rgba(20,50,80,.10); }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
body.camera-open { overflow: hidden; }
.camera-modal { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; padding: 22px; background: rgba(3,18,31,.78); backdrop-filter: blur(8px); }
.camera-modal[hidden] { display: none; }
.camera-dialog { width: min(880px, 100%); border-radius: 22px; overflow: hidden; background: #fff; box-shadow: 0 35px 100px rgba(0,0,0,.40); }
.camera-dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding: 18px 20px; background: linear-gradient(110deg, #102f4b, #17658a); color: #fff; }
.camera-dialog-head strong { display: block; font-size: 19px; }
.camera-dialog-head span { display: block; margin-top: 4px; color: #cae5ee; font-size: 12px; }
.camera-close { border: 0; background: rgba(255,255,255,.13); color: #fff; width: 36px; height: 36px; border-radius: 10px; cursor: pointer; font-size: 24px; line-height: 1; }
.camera-stage { position: relative; min-height: 360px; display: grid; place-items: center; background: #05111c; overflow: hidden; }
.camera-stage video { display: block; width: 100%; max-height: 65vh; object-fit: contain; }
.camera-frame-guide { position: absolute; inset: 9%; border: 2px solid rgba(255,255,255,.70); border-radius: 18px; box-shadow: 0 0 0 999px rgba(0,0,0,.12); pointer-events: none; }
.camera-frame-guide::before, .camera-frame-guide::after { content: ''; position: absolute; width: 38px; height: 38px; border-color: #65dccd; }
.camera-frame-guide::before { left: -2px; top: -2px; border-left: 4px solid #65dccd; border-top: 4px solid #65dccd; border-radius: 14px 0 0 0; }
.camera-frame-guide::after { right: -2px; bottom: -2px; border-right: 4px solid #65dccd; border-bottom: 4px solid #65dccd; border-radius: 0 0 14px 0; }
.camera-message { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); max-width: 520px; padding: 13px 16px; border-radius: 12px; background: rgba(4,22,37,.86); color: #fff; text-align: center; }
.camera-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; padding: 16px 20px; background: #f7fafc; }

/* Refined sign-in */
.auth-body { background: linear-gradient(145deg, #071c31, #0f4668 55%, #0b746d); }
.auth-layout { width: min(1050px, 100%); display: grid; grid-template-columns: 1.2fr .8fr; overflow: hidden; border-radius: 26px; background: #fff; box-shadow: 0 38px 110px rgba(0,0,0,.34); }
.auth-showcase { position: relative; min-height: 590px; padding: 54px; color: #fff; background: radial-gradient(circle at 90% 12%, rgba(104,218,204,.32), transparent 28%), linear-gradient(145deg, #123f62, #0b2c47 62%, #092139); }
.auth-showcase::after { content: ''; position: absolute; width: 280px; height: 280px; right: -90px; bottom: -100px; border: 55px solid rgba(255,255,255,.045); border-radius: 50%; }
.auth-shield { width: 78px; height: 86px; border-radius: 24px 24px 31px 31px; display: grid; place-items: center; background: linear-gradient(145deg, #f1c967, #d79a27); color: #0b2c47; font-size: 28px; font-weight: 900; box-shadow: 0 18px 36px rgba(0,0,0,.22); }
.auth-showcase h1 { margin: 34px 0 12px; font-size: clamp(34px, 4vw, 50px); line-height: 1.02; letter-spacing: -.055em; }
.auth-showcase p { max-width: 520px; color: #c8e4ea; line-height: 1.7; }
.auth-feature-list { display: grid; gap: 13px; margin-top: 34px; }
.auth-feature { display: flex; gap: 12px; align-items: center; color: #e9f8f7; }
.auth-feature span { width: 29px; height: 29px; border-radius: 9px; display: grid; place-items: center; background: rgba(62,203,185,.17); color: #79e3d5; }
.auth-card { width: auto; border-radius: 0; box-shadow: none; padding: 54px 42px; align-self: center; }
.auth-card .auth-brand { margin-bottom: 30px; }
.auth-card .auth-brand .brand-mark { flex: 0 0 auto; }
.auth-card small { color: #7990a5; }

@media (max-width: 850px) {
    .auth-layout { grid-template-columns: 1fr; }
    .auth-showcase { min-height: auto; padding: 34px; }
    .auth-showcase h1 { margin-top: 24px; }
    .auth-card { padding: 34px; }
}
@media (max-width: 680px) {
    .capture-actions .btn { flex: 1 1 auto; }
    .camera-modal { padding: 0; }
    .camera-dialog { min-height: 100%; border-radius: 0; display: flex; flex-direction: column; }
    .camera-stage { flex: 1; min-height: 0; }
    .camera-dialog-actions { justify-content: stretch; }
    .camera-dialog-actions .btn { flex: 1; }
    .auth-showcase { display: none; }
    .auth-layout { border-radius: 20px; }
}
@media print {
    .main-content::before { display: none; }
    .card:hover { box-shadow: none; }
    .capture-field, .camera-modal { display: none !important; }
}
