/* ==========================================================================
   SPPG Care — design system
   ========================================================================== */
:root {
    --brand: #0D5C46;
    --brand-dark: #083f30;
    --brand-mid: #0A4C3B;
    --brand-soft: rgba(13, 92, 70, .08);
    --brand-softer: rgba(13, 92, 70, .045);
    --accent: #B7DE4A;
    --accent-soft: rgba(183, 222, 74, .2);
    --ink: #13251E;
    --ink-soft: #2C3F36;
    --muted: #6A7E74;
    --muted-2: #8CA097;
    --bg: #F3F7F3;
    --bg-2: #EAF1EB;
    --card: #FFFFFF;
    --line: #E1EAE3;
    --line-strong: #D3E0D7;
    --success: #21835C;
    --success-bg: #E7F5ED;
    --warning: #B97813;
    --warning-bg: #FFF4DD;
    --danger: #C44837;
    --danger-bg: #FDEBE8;
    --info: #256E9F;
    --info-bg: #E8F3FA;
    --neutral: #60746A;
    --neutral-bg: #EEF3EF;
    --shadow-sm: 0 1px 2px rgba(19, 37, 30, .04), 0 4px 12px rgba(19, 37, 30, .035);
    --shadow-md: 0 14px 40px rgba(13, 53, 40, .08);
    --shadow-lg: 0 32px 90px rgba(8, 45, 33, .16);
    --radius-sm: 12px;
    --radius: 18px;
    --radius-lg: 26px;
    --sidebar: 264px;
    --topbar: 72px;
    --font: "Inter", "Segoe UI Variable", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    color: var(--ink);
    background: var(--bg);
    font: 14.5px/1.55 var(--font);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}
body.no-scroll { overflow: hidden; }
a { color: var(--brand); text-decoration: none; }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
p { margin: 0 0 14px; }
h1, h2, h3, h4 { margin: 0; font-weight: 800; letter-spacing: -.035em; color: var(--ink); line-height: 1.15; }
h1 { font-size: clamp(28px, 3.4vw, 40px); }
h2 { font-size: 24px; }
h3 { font-size: 18px; }
h4 { font-size: 15px; letter-spacing: -.015em; }
::selection { background: var(--accent); color: #18351f; }

.icon { width: 20px; height: 20px; flex: 0 0 auto; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 24px; height: 24px; }
.icon-xl { width: 30px; height: 30px; }

.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.strong { font-weight: 800; }
.nowrap { white-space: nowrap; }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.mt-0 { margin-top: 0 !important; }
.mt-8 { margin-top: 8px !important; }
.mt-12 { margin-top: 12px !important; }
.mt-16 { margin-top: 16px !important; }
.mt-24 { margin-top: 24px !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-8 { margin-bottom: 8px !important; }
.mb-16 { margin-bottom: 16px !important; }
.w-full { width: 100%; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.flex-wrap { flex-wrap: wrap; }
.hide { display: none !important; }

/* --------------------------------------------------------------------------
   Brand
-------------------------------------------------------------------------- */
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--brand); }
.brand strong { display: block; font-size: 18px; font-weight: 900; letter-spacing: -.04em; line-height: 1.1; }
.brand small { display: block; color: var(--muted); font-size: 9.5px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; margin-top: 4px; }
.brand-light { color: #fff; }
.brand-light small { color: rgba(255,255,255,.58); }
.brand-mark {
    width: 44px; height: 44px; border-radius: 14px; display: inline-grid; place-items: center;
    color: var(--brand); background: var(--brand-soft); flex: 0 0 auto;
}
.brand-mark svg { width: 34px; height: 34px; }
.brand-mark-lg { width: 52px; height: 52px; border-radius: 16px; background: rgba(255,255,255,.11); color: var(--accent); }
.brand-mark-lg svg { width: 40px; height: 40px; }
.tenant-logo { width: 42px; height: 42px; border-radius: 13px; object-fit: cover; background: #fff; border: 1px solid var(--line); }

/* --------------------------------------------------------------------------
   Buttons
-------------------------------------------------------------------------- */
.btn {
    --btn-bg: var(--brand);
    --btn-fg: #fff;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 42px; padding: 0 17px; border: 1px solid transparent; border-radius: 12px;
    background: var(--btn-bg); color: var(--btn-fg); font-size: 12.5px; font-weight: 800;
    letter-spacing: .005em; line-height: 1; white-space: nowrap; transition: .18s ease;
    box-shadow: 0 4px 10px rgba(13, 92, 70, .12);
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.04); box-shadow: 0 7px 18px rgba(13, 92, 70, .18); }
.btn:active { transform: translateY(0); }
.btn .icon { width: 17px; height: 17px; }
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-dark)); color: #fff; }
.btn-accent { background: var(--accent); color: #18351F; box-shadow: 0 6px 18px rgba(183, 222, 74, .22); }
.btn-ghost { background: #fff; color: var(--ink-soft); border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-soft { background: var(--brand-soft); color: var(--brand); box-shadow: none; }
.btn-soft:hover { background: rgba(13, 92, 70, .14); }
.btn-danger { background: var(--danger); color: #fff; box-shadow: 0 4px 10px rgba(196, 72, 55, .16); }
.btn-danger-soft { background: var(--danger-bg); color: var(--danger); box-shadow: none; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-wa { background: #1FA855; color: #fff; box-shadow: 0 6px 18px rgba(31, 168, 85, .2); }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 11.5px; border-radius: 10px; }
.btn-sm .icon { width: 15px; height: 15px; }
.btn-lg { min-height: 50px; padding: 0 22px; font-size: 13.5px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn-icon { width: 38px; min-height: 38px; padding: 0; border-radius: 11px; }
.btn[disabled], .btn.disabled { opacity: .55; pointer-events: none; }
.btn-group { display: inline-flex; gap: 8px; flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   Badges, pills, alerts
-------------------------------------------------------------------------- */
.badge {
    display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 999px;
    font-size: 10.5px; font-weight: 800; line-height: 1.2; white-space: nowrap;
}
.badge .icon { width: 12px; height: 12px; }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-neutral { background: var(--neutral-bg); color: var(--neutral); }
.badge-brand { background: var(--brand-soft); color: var(--brand); }
.badge-accent { background: var(--accent-soft); color: #526D13; }
.pill {
    display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px;
    background: var(--neutral-bg); color: var(--neutral); font-size: 10.5px; font-weight: 800;
}
.pill-daily { background: #FFF3D9; color: #98620C; }
.pill-weekly { background: #E7F1FF; color: #2C66B1; }
.pill-monthly { background: #EDEAFF; color: #6A4EC4; }
.pill-yearly { background: #E4F6EE; color: #247554; }
.pill .icon { width: 12px; height: 12px; }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; display: inline-block; }
.alert {
    display: flex; align-items: flex-start; gap: 11px; padding: 13px 15px; border-radius: 14px;
    border: 1px solid transparent; font-size: 12.5px; margin-bottom: 18px;
}
.alert .icon { margin-top: 1px; }
.alert-success { background: var(--success-bg); border-color: #CEEDDB; color: #216646; }
.alert-danger { background: var(--danger-bg); border-color: #F6D5CF; color: #9C3528; }
.alert-warning { background: var(--warning-bg); border-color: #F5E1B9; color: #83570D; }
.alert-info { background: var(--info-bg); border-color: #CFE6F4; color: #245E85; }
.notice {
    display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 13px;
    background: var(--brand-softer); border: 1px dashed var(--line-strong); color: var(--muted); font-size: 12px;
}
.notice .icon { width: 17px; height: 17px; color: var(--brand); margin-top: 1px; }
.notice-warning { background: var(--warning-bg); border-color: #F1DBAE; color: #7C5510; }
.notice b { color: var(--ink); }

/* --------------------------------------------------------------------------
   App shell & sidebar
-------------------------------------------------------------------------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
    width: var(--sidebar); background: #092F24; color: rgba(255,255,255,.72);
    position: fixed; inset: 0 auto 0 0; z-index: 50; display: flex; flex-direction: column;
    padding: 22px 16px 16px; overflow: hidden;
}
.sidebar::before {
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background:
        radial-gradient(circle at 15% 0%, rgba(183,222,74,.12), transparent 30%),
        radial-gradient(circle at 100% 85%, rgba(183,222,74,.06), transparent 28%);
}
.sidebar-top { position: relative; z-index: 1; padding: 0 8px 20px; }
.sidebar .brand strong { color: #fff; font-size: 17px; }
.sidebar .brand small { color: rgba(255,255,255,.48); }
.sidebar .brand-mark { color: var(--accent); background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.08); }
.tenant-switch {
    position: relative; z-index: 1; margin: 2px 4px 18px; padding: 12px; border-radius: 15px;
    background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.075);
    display: flex; align-items: center; gap: 10px; color: #fff;
}
.tenant-switch .tenant-avatar {
    width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: #17301F;
    display: grid; place-items: center; font-size: 11px; font-weight: 900; flex: 0 0 auto;
}
.tenant-switch b { display: block; font-size: 11.5px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px; }
.tenant-switch small { display: block; color: rgba(255,255,255,.46); font-size: 9px; font-weight: 700; letter-spacing: .06em; margin-top: 3px; text-transform: uppercase; }
.tenant-switch .icon { width: 14px; height: 14px; margin-left: auto; opacity: .45; }
.sidebar-nav { position: relative; z-index: 1; flex: 1; overflow-y: auto; padding: 0 4px 8px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.14) transparent; }
.nav-label {
    padding: 15px 12px 7px; color: rgba(255,255,255,.33); font-size: 8.5px; font-weight: 800;
    letter-spacing: .14em; text-transform: uppercase;
}
.nav-item {
    display: flex; align-items: center; gap: 11px; min-height: 43px; padding: 0 12px; margin: 2px 0;
    border-radius: 11px; color: rgba(255,255,255,.64); font-size: 12.5px; font-weight: 650; transition: .18s ease;
}
.nav-item .icon { width: 18px; height: 18px; opacity: .8; }
.nav-item:hover { background: rgba(255,255,255,.055); color: #fff; }
.nav-item.is-active { background: rgba(183,222,74,.13); color: #fff; box-shadow: inset 2px 0 0 var(--accent); }
.nav-item.is-active .icon { color: var(--accent); opacity: 1; }
.nav-item .nav-count {
    margin-left: auto; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px;
    background: rgba(255,255,255,.1); display: grid; place-items: center; font-size: 9px; font-weight: 800;
}
.nav-item.is-active .nav-count { background: var(--accent); color: #17301F; }
.nav-item.nav-danger { color: #FFB0A4; }
.sidebar-foot { position: relative; z-index: 1; padding: 12px 4px 0; border-top: 1px solid rgba(255,255,255,.075); }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 12px; }
.sidebar-user:hover { background: rgba(255,255,255,.05); }
.avatar {
    width: 35px; height: 35px; border-radius: 11px; display: grid; place-items: center; flex: 0 0 auto;
    background: var(--brand-soft); color: var(--brand); font-size: 10.5px; font-weight: 900;
}
.avatar-sm { width: 30px; height: 30px; border-radius: 9px; font-size: 9px; }
.avatar-lg { width: 52px; height: 52px; border-radius: 16px; font-size: 15px; }
.sidebar-user .avatar { background: rgba(255,255,255,.09); color: #fff; }
.sidebar-user b { display: block; color: #fff; font-size: 11.5px; line-height: 1.3; }
.sidebar-user small { display: block; color: rgba(255,255,255,.4); font-size: 9.5px; margin-top: 2px; }
.sidebar-user .icon { margin-left: auto; width: 15px; height: 15px; opacity: .35; }
.sidebar-scrim { display: none; }

.main { margin-left: var(--sidebar); min-width: 0; flex: 1; }
.topbar {
    height: var(--topbar); display: flex; align-items: center; gap: 16px; padding: 0 30px;
    position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.86);
    backdrop-filter: blur(18px); border-bottom: 1px solid rgba(221,232,224,.8);
}
.topbar-title { min-width: 0; }
.topbar-title small { display: block; color: var(--muted-2); font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.topbar-title b { display: block; font-size: 13px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-spacer { flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
    width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 11px; background: #fff;
    display: grid; place-items: center; color: var(--ink-soft); position: relative; transition: .16s;
}
.icon-btn:hover { border-color: var(--line-strong); background: var(--bg); color: var(--brand); }
.icon-btn .indicator { position: absolute; top: 8px; right: 8px; width: 6px; height: 6px; background: var(--danger); border-radius: 50%; border: 1.5px solid #fff; }
.menu-toggle { display: none; }
.mode-banner {
    display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 10px;
    background: var(--warning-bg); color: #79530C; font-size: 10.5px; font-weight: 800;
}
.mode-banner .icon { width: 14px; height: 14px; }
.user-menu { position: relative; }
.user-menu summary { list-style: none; display: flex; align-items: center; gap: 9px; cursor: pointer; padding: 4px; border-radius: 10px; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover { background: var(--bg); }
.user-menu b { font-size: 11.5px; display: block; line-height: 1.2; }
.user-menu small { font-size: 9.5px; color: var(--muted); display: block; }
.dropdown {
    position: absolute; right: 0; top: calc(100% + 8px); min-width: 210px; padding: 7px;
    background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-md); z-index: 100;
}
.dropdown a, .dropdown button {
    width: 100%; display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: 9px;
    background: none; border: 0; color: var(--ink-soft); font-size: 12px; font-weight: 650; text-align: left;
}
.dropdown a:hover, .dropdown button:hover { background: var(--bg); color: var(--brand); }
.dropdown .icon { width: 16px; height: 16px; }
.dropdown hr { border: 0; border-top: 1px solid var(--line); margin: 5px 0; }

.page { padding: 28px 30px 42px; max-width: 1500px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.page-head h1 { font-size: clamp(23px, 2.4vw, 30px); letter-spacing: -.04em; }
.page-head p { margin: 6px 0 0; color: var(--muted); font-size: 12.5px; max-width: 700px; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.eyebrow {
    display: inline-flex; align-items: center; gap: 6px; font-size: 9px; font-weight: 850;
    letter-spacing: .13em; text-transform: uppercase; color: var(--brand); margin-bottom: 9px;
}
.eyebrow-light { color: var(--accent); }
.eyebrow .dot { width: 5px; height: 5px; }
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--muted-2); font-weight: 700; margin-bottom: 7px; }
.breadcrumb .icon { width: 12px; height: 12px; }

/* --------------------------------------------------------------------------
   Cards & layout primitives
-------------------------------------------------------------------------- */
.card {
    background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow-sm); overflow: hidden;
}
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 18px 20px 0; }
.card-head h3 { font-size: 15px; letter-spacing: -.025em; }
.card-head p { margin: 4px 0 0; font-size: 11.5px; color: var(--muted); }
.card-head .link { font-size: 10.5px; font-weight: 800; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.card-head .link .icon { width: 13px; height: 13px; }
.card-body { padding: 18px 20px 20px; }
.card-body-tight { padding: 10px 12px 12px; }
.card-footer { padding: 12px 20px; border-top: 1px solid var(--line); background: #FBFDFB; }
.grid { display: grid; gap: 16px; }
.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)); }
.grid-main { grid-template-columns: minmax(0, 1.55fr) minmax(300px, .85fr); }
.grid-wide { grid-template-columns: minmax(0, 1fr) 330px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.section-gap { margin-top: 20px; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card-section { padding: 18px 20px; border-bottom: 1px solid var(--line); }
.card-section:last-child { border-bottom: 0; }

/* --------------------------------------------------------------------------
   Dashboard
-------------------------------------------------------------------------- */
.hero {
    position: relative; overflow: hidden; border-radius: var(--radius-lg); padding: 26px 28px;
    color: #fff; background: linear-gradient(125deg, #0A3C2D 0%, #0D5C46 58%, #167558 100%);
    box-shadow: 0 20px 50px rgba(9, 62, 45, .18);
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: center;
}
.hero::before {
    content: ""; position: absolute; inset: 0;
    background:
        radial-gradient(circle at 86% 20%, rgba(183,222,74,.22), transparent 24%),
        radial-gradient(circle at 70% 95%, rgba(255,255,255,.07), transparent 30%);
}
.hero::after {
    content: ""; position: absolute; width: 280px; height: 280px; border: 1px solid rgba(255,255,255,.09);
    border-radius: 50%; right: -90px; top: -130px;
}
.hero-copy { position: relative; z-index: 2; }
.hero h2 { color: #fff; font-size: clamp(24px, 3vw, 34px); letter-spacing: -.045em; margin: 7px 0 8px; }
.hero p { color: rgba(255,255,255,.64); font-size: 12.5px; max-width: 540px; margin: 0; }
.hero-meta { display: flex; align-items: center; gap: 15px; flex-wrap: wrap; margin-top: 19px; font-size: 10.5px; color: rgba(255,255,255,.6); }
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero-meta .icon { width: 14px; height: 14px; opacity: .7; }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.hero-actions .btn-ghost { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.18); box-shadow: none; }
.hero-actions .btn-ghost:hover { background: rgba(255,255,255,.16); }
.hero-actions .btn-accent { color: #16351E; }
.hero-side { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.compliance-ring {
    --p: 0; width: 148px; height: 148px; border-radius: 50%; position: relative;
    background: conic-gradient(var(--accent) calc(var(--p) * 1%), rgba(255,255,255,.12) 0);
    display: grid; place-items: center;
}
.compliance-ring::before { content: ""; position: absolute; inset: 10px; background: #0B4736; border-radius: 50%; }
.compliance-ring .ring-inner { position: relative; z-index: 2; text-align: center; }
.compliance-ring strong { display: block; color: #fff; font-size: 35px; letter-spacing: -.07em; line-height: 1; }
.compliance-ring small { display: block; color: rgba(255,255,255,.48); font-size: 8.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; margin-top: 6px; }
.ring-caption { color: rgba(255,255,255,.54); font-size: 10px; text-align: center; }
.ring-caption b { color: #fff; }

.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-top: 16px; }
.stat-card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 17px;
    box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 12px; min-height: 122px;
}
.stat-top { display: flex; align-items: center; justify-content: space-between; }
.stat-icon { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.stat-icon .icon { width: 18px; height: 18px; }
.stat-icon.warn { background: var(--warning-bg); color: var(--warning); }
.stat-icon.danger { background: var(--danger-bg); color: var(--danger); }
.stat-icon.info { background: var(--info-bg); color: var(--info); }
.stat-icon.success { background: var(--success-bg); color: var(--success); }
.stat-trend { font-size: 9.5px; font-weight: 800; color: var(--muted-2); display: inline-flex; align-items: center; gap: 4px; }
.stat-trend .icon { width: 12px; height: 12px; }
.stat-value { font-size: 28px; font-weight: 850; letter-spacing: -.055em; line-height: 1; }
.stat-label { color: var(--muted); font-size: 10.5px; font-weight: 650; }
.stat-label b { color: var(--ink); font-weight: 800; }

.content-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(290px, .8fr); gap: 16px; margin-top: 16px; align-items: start; }
.dashboard-bottom { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, .8fr); gap: 16px; margin-top: 16px; align-items: start; }
.field-grid.report-filter-form { grid-template-columns: 1fr 1fr 1fr 1fr auto; align-items: end; }
.stack-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.task-row {
    display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line);
    transition: background .15s;
}
.task-row:last-child { border-bottom: 0; }
.task-row:hover { background: #FAFCFA; }
.task-type {
    width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: 0 0 auto;
    background: var(--brand-soft); color: var(--brand); position: relative;
}
.task-type .icon { width: 18px; height: 18px; }
.task-type .freq-dot { position: absolute; right: -2px; bottom: -2px; width: 13px; height: 13px; border-radius: 50%; border: 2px solid #fff; background: var(--accent); }
.task-main { min-width: 0; flex: 1; }
.task-main b { display: block; font-size: 12px; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-main small { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 10px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-meta { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.task-meta .badge { font-size: 9.5px; }
.task-action { color: var(--muted-2); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; }
.task-action:hover { background: var(--brand-soft); color: var(--brand); }

.finding-row { display: flex; gap: 11px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.finding-row:last-child { border-bottom: 0; }
.finding-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: 0 0 auto; background: var(--danger-bg); color: var(--danger); }
.finding-icon.attention { background: var(--warning-bg); color: var(--warning); }
.finding-icon .icon { width: 15px; height: 15px; }
.finding-main { min-width: 0; flex: 1; }
.finding-main b { font-size: 11.5px; display: block; }
.finding-main p { font-size: 10.5px; color: var(--muted); margin: 2px 0 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.finding-main small { color: var(--muted-2); font-size: 9.5px; display: block; margin-top: 5px; }
.score-list { padding: 6px 20px 16px; }
.score-item { padding: 9px 0; }
.score-line { display: flex; align-items: center; justify-content: space-between; gap: 9px; margin-bottom: 6px; font-size: 10.5px; font-weight: 700; }
.score-line span { display: flex; align-items: center; gap: 6px; color: var(--ink-soft); }
.score-line .icon { width: 14px; height: 14px; color: var(--muted-2); }
.score-line small { color: var(--muted-2); font-size: 9px; font-weight: 800; }
.progress { height: 5px; border-radius: 999px; background: #EDF2EE; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--brand); border-radius: inherit; transition: width .5s ease; }
.progress.accent > span { background: var(--accent); }
.progress.warning > span { background: var(--warning); }
.progress.danger > span { background: var(--danger); }
.week-chart { display: flex; align-items: flex-end; gap: 8px; height: 110px; padding: 14px 20px 4px; }
.week-bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; height: 100%; justify-content: flex-end; }
.week-bar .bar-track { width: 100%; max-width: 26px; height: 82px; border-radius: 7px 7px 3px 3px; background: #EDF2EE; display: flex; align-items: flex-end; overflow: hidden; }
.week-bar .bar { width: 100%; min-height: 2px; background: var(--brand); border-radius: 7px 7px 3px 3px; opacity: .9; }
.week-bar span { font-size: 8.5px; color: var(--muted-2); font-weight: 800; }
.legend { display: flex; align-items: center; gap: 13px; padding: 0 20px 14px; font-size: 9.5px; color: var(--muted); }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 3px; background: var(--brand); margin-right: 5px; }
.legend i.light { background: #DDEAE0; }
.quick-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 12px 20px 18px; }
.quick-action {
    display: flex; align-items: center; gap: 9px; padding: 11px; border-radius: 12px;
    background: #F8FBF8; border: 1px solid var(--line); color: var(--ink-soft); font-size: 10.5px; font-weight: 750;
}
.quick-action:hover { border-color: var(--brand); color: var(--brand); background: #fff; }
.quick-action .icon { width: 16px; height: 16px; color: var(--brand); }
.manager-strip {
    margin-top: 16px; padding: 13px 17px; border-radius: 14px; background: #F0F7EF;
    border: 1px solid #D8E7D9; display: flex; align-items: center; gap: 10px; font-size: 11px; color: #47614D;
}
.manager-strip .icon { color: var(--brand); width: 17px; height: 17px; }
.manager-strip a { margin-left: auto; font-weight: 800; white-space: nowrap; }

/* --------------------------------------------------------------------------
   Tables
-------------------------------------------------------------------------- */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; min-width: 720px; }
.table th {
    text-align: left; padding: 10px 14px; font-size: 9px; font-weight: 850; letter-spacing: .09em;
    text-transform: uppercase; color: var(--muted-2); background: #F9FBF9; border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 11.5px; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: #FBFDFB; }
.table .cell-main { display: flex; align-items: center; gap: 10px; min-width: 160px; }
.table .cell-main b { display: block; font-size: 11.5px; font-weight: 750; color: var(--ink); }
.table .cell-main small { display: block; color: var(--muted); font-size: 9.5px; margin-top: 2px; }
.table .cell-icon { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: 0 0 auto; }
.table .cell-icon .icon { width: 16px; height: 16px; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table-actions { display: flex; align-items: center; justify-content: flex-end; gap: 5px; }
.table-tools { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.table-footer { display: flex; align-items: center; justify-content: space-between; padding: 12px 18px; color: var(--muted); font-size: 10.5px; border-top: 1px solid var(--line); }

/* filter bar */
.filter-bar {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 16px;
    background: #fff; border: 1px solid var(--line); border-radius: 15px; box-shadow: var(--shadow-sm); margin-bottom: 16px;
}
.filter-bar .field-inline { position: relative; flex: 0 1 auto; }
.filter-bar .field-inline .icon { position: absolute; left: 11px; top: 50%; width: 15px; height: 15px; transform: translateY(-50%); color: var(--muted-2); }
.filter-bar select, .filter-bar input {
    height: 38px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
    padding: 0 11px; font-size: 11px; font-weight: 650; min-width: 120px;
}
.filter-bar .search-field input { padding-left: 33px; min-width: 180px; }
.filter-bar select:focus, .filter-bar input:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
.filter-bar .spacer { flex: 1; }
.filter-chip-row { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-chip {
    display: inline-flex; align-items: center; gap: 5px; padding: 7px 11px; border-radius: 999px;
    border: 1px solid var(--line); background: #fff; color: var(--muted); font-size: 10px; font-weight: 800;
}
.filter-chip:hover { border-color: var(--brand); color: var(--brand); }
.filter-chip.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.filter-chip .icon { width: 13px; height: 13px; }

/* --------------------------------------------------------------------------
   Forms
-------------------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span, .field > label, .field-label { font-size: 10.5px; font-weight: 800; color: var(--ink-soft); letter-spacing: .01em; }
.field > span small, .field-label small { font-weight: 600; color: var(--muted-2); }
.field input, .field select, .field textarea, .form-control {
    width: 100%; min-height: 43px; border: 1px solid var(--line-strong); border-radius: 11px;
    background: #fff; padding: 0 12px; font-size: 12.5px; color: var(--ink); transition: .16s;
}
.field textarea { padding: 11px 12px; min-height: 88px; resize: vertical; line-height: 1.55; }
.field input::placeholder, .field textarea::placeholder { color: #A9B6AF; }
.field input:focus, .field select:focus, .field textarea:focus {
    outline: 3px solid var(--brand-soft); border-color: var(--brand); outline-offset: 0;
}
.field input[readonly] { background: #F6F9F6; color: var(--muted); }
.field .hint { font-size: 9.5px; color: var(--muted-2); line-height: 1.5; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field-grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.stack-form { display: flex; flex-direction: column; gap: 15px; }
.form-section-title {
    display: flex; align-items: center; gap: 9px; font-size: 10px; font-weight: 850; letter-spacing: .08em;
    text-transform: uppercase; color: var(--muted); margin-top: 4px;
}
.form-section-title span {
    width: 20px; height: 20px; border-radius: 6px; background: var(--brand-soft); color: var(--brand);
    display: grid; place-items: center; font-size: 9px;
}
.form-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-top: 6px; }
.switch-row {
    display: flex; align-items: flex-start; gap: 11px; padding: 13px 14px; border: 1px solid var(--line);
    border-radius: 13px; cursor: pointer; background: #FBFDFB;
}
.switch-row input { position: absolute; opacity: 0; pointer-events: none; }
.switch-ui {
    width: 36px; height: 21px; background: #D5E1D9; border-radius: 999px; flex: 0 0 auto;
    position: relative; transition: .18s; margin-top: 1px;
}
.switch-ui::after {
    content: ""; position: absolute; top: 3px; left: 3px; width: 15px; height: 15px; border-radius: 50%;
    background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: .18s;
}
.switch-row input:checked + .switch-ui { background: var(--brand); }
.switch-row input:checked + .switch-ui::after { left: 18px; }
.switch-row b { display: block; font-size: 11.5px; }
.switch-row small { display: block; color: var(--muted); font-size: 10px; margin-top: 2px; line-height: 1.45; }
.check-row { display: flex; align-items: flex-start; gap: 8px; font-size: 11px; color: var(--ink-soft); }
.check-row input { width: 16px; height: 16px; accent-color: var(--brand); margin-top: 1px; }
.toggle-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.toggle-chip { position: relative; }
.toggle-chip input { position: absolute; opacity: 0; }
.toggle-chip span {
    display: flex; align-items: center; justify-content: center; gap: 4px; min-height: 34px; padding: 0 8px;
    border: 1px solid var(--line); border-radius: 9px; background: #fff; font-size: 9.5px; font-weight: 800; color: var(--muted);
    transition: .15s; cursor: pointer;
}
.toggle-chip input:checked + span { background: var(--brand-soft); border-color: var(--brand); color: var(--brand); }
.form-note { font-size: 10px; color: var(--muted-2); margin-top: -4px; }
.required { color: var(--danger); }

/* File upload */
.upload-box {
    border: 1.5px dashed var(--line-strong); border-radius: 14px; background: #FAFCFA;
    padding: 20px; text-align: center; cursor: pointer; transition: .18s;
}
.upload-box:hover, .upload-box.dragover { border-color: var(--brand); background: var(--brand-softer); }
.upload-box .icon { width: 26px; height: 26px; color: var(--brand); margin-bottom: 7px; }
.upload-box b { display: block; font-size: 11.5px; }
.upload-box small { display: block; font-size: 9.5px; color: var(--muted); margin-top: 3px; }
.upload-box input { display: none; }
.photo-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.photo-thumb { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--bg); }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }
.photo-thumb .remove { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border: 0; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; }
.photo-thumb .remove .icon { width: 12px; height: 12px; }
.signature-wrap { border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 8px; }
.signature-pad { width: 100%; height: 130px; display: block; border-radius: 9px; background: #FBFDFB; touch-action: none; }
.signature-tools { display: flex; justify-content: space-between; align-items: center; padding: 6px 4px 0; font-size: 9.5px; color: var(--muted); }
.text-button { background: none; border: 0; color: var(--brand); font-size: 10px; font-weight: 800; padding: 4px; }

/* --------------------------------------------------------------------------
   Checklist / log form
-------------------------------------------------------------------------- */
.pm-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.pm-side { position: sticky; top: calc(var(--topbar) + 16px); display: flex; flex-direction: column; gap: 14px; }
.pm-device-card { padding: 19px; border-radius: var(--radius); background: linear-gradient(140deg, #0A3D2E, #0D5C46); color: #fff; position: relative; overflow: hidden; }
.pm-device-card::after { content: ""; position: absolute; width: 140px; height: 140px; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; right: -45px; top: -70px; }
.pm-device-card .code { font-size: 9px; font-weight: 850; letter-spacing: .12em; color: var(--accent); text-transform: uppercase; }
.pm-device-card h3 { color: #fff; font-size: 18px; margin: 5px 0 4px; }
.pm-device-card p { color: rgba(255,255,255,.55); font-size: 10.5px; margin: 0; }
.pm-device-card .meta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 14px; font-size: 9.5px; color: rgba(255,255,255,.64); }
.pm-device-card .meta span { display: inline-flex; align-items: center; gap: 4px; }
.pm-device-card .meta .icon { width: 12px; height: 12px; }
.pm-checklist-head {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
    padding: 20px 20px 16px; border-bottom: 1px solid var(--line);
}
.pm-checklist-head h2 { font-size: 18px; }
.pm-checklist-head p { margin: 4px 0 0; color: var(--muted); font-size: 10.5px; }
.pm-progress { min-width: 115px; text-align: right; }
.pm-progress b { font-size: 15px; font-weight: 850; letter-spacing: -.03em; }
.pm-progress small { display: block; color: var(--muted-2); font-size: 9px; font-weight: 800; margin-top: 2px; text-transform: uppercase; letter-spacing: .08em; }
.pm-progress .progress { margin-top: 7px; }
.check-item { padding: 17px 20px; border-bottom: 1px solid var(--line); }
.check-item:last-child { border-bottom: 0; }
.check-item-top { display: flex; gap: 11px; align-items: flex-start; }
.check-number {
    width: 25px; height: 25px; border-radius: 8px; background: var(--brand-soft); color: var(--brand);
    display: grid; place-items: center; font-size: 9.5px; font-weight: 850; flex: 0 0 auto; margin-top: 1px;
}
.check-copy { min-width: 0; flex: 1; }
.check-copy b { display: block; font-size: 12.5px; line-height: 1.4; }
.check-copy p { color: var(--muted); font-size: 10.5px; margin: 3px 0 0; }
.check-copy .standard { display: flex; align-items: flex-start; gap: 5px; margin-top: 5px; font-size: 9.5px; color: var(--success); }
.check-copy .standard .icon { width: 12px; height: 12px; margin-top: 1px; }
.result-options { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin: 11px 0 0 36px; max-width: 430px; }
.result-option { position: relative; }
.result-option input { position: absolute; opacity: 0; }
.result-option span {
    display: flex; align-items: center; justify-content: center; gap: 4px; height: 33px; border-radius: 8px;
    border: 1px solid var(--line); font-size: 9.5px; font-weight: 800; color: var(--muted); transition: .15s; cursor: pointer;
}
.result-option span .icon { width: 12px; height: 12px; }
.result-option input[value="ok"]:checked + span { background: var(--success-bg); border-color: var(--success); color: var(--success); }
.result-option input[value="attention"]:checked + span { background: var(--warning-bg); border-color: var(--warning); color: var(--warning); }
.result-option input[value="fail"]:checked + span { background: var(--danger-bg); border-color: var(--danger); color: var(--danger); }
.result-option input[value="na"]:checked + span { background: var(--neutral-bg); border-color: var(--neutral); color: var(--neutral); }
.check-note { margin: 9px 0 0 36px; }
.check-note input { width: 100%; height: 35px; font-size: 11px; border: 1px solid var(--line-strong); border-radius: 9px; padding: 0 11px; }
.item-photo-wrap { margin: 9px 0 0 36px; }
.item-photo-wrap summary { font-size: 9.5px; color: var(--muted); font-weight: 750; cursor: pointer; }
.item-photo-wrap input[type=file] { margin-top: 7px; font-size: 10px; }
.log-detail-head { background: linear-gradient(135deg, #0A3D2E, #0D5C46); color: #fff; padding: 23px; position: relative; overflow: hidden; }
.log-detail-head h2 { color: #fff; font-size: 20px; }
.log-detail-head p { color: rgba(255,255,255,.6); font-size: 10.5px; margin: 4px 0 0; }
.log-result-list { padding: 0 20px 12px; }
.log-result-row { display: flex; align-items: flex-start; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.log-result-row:last-child { border-bottom: 0; }
.log-result-row .badge { flex: 0 0 auto; }
.log-result-row b { font-size: 11.5px; display: block; }
.log-result-row p { font-size: 10px; color: var(--muted); margin: 2px 0 0; }
.verify-panel { padding: 18px 20px; border-top: 1px solid var(--line); background: #FBFDFB; }
.verify-done { display: flex; gap: 11px; align-items: flex-start; padding: 16px 20px; background: var(--success-bg); border-top: 1px solid #CDEAD8; }
.verify-done .icon { color: var(--success); }
.verify-done b { display: block; font-size: 11.5px; color: #216646; }
.verify-done small { display: block; color: #4B7F64; font-size: 9.5px; margin-top: 2px; }

/* --------------------------------------------------------------------------
   Reports
-------------------------------------------------------------------------- */
.report-hero {
    position: relative; padding: 23px; border-radius: var(--radius-lg); color: #fff;
    background: linear-gradient(125deg, #0B3D2E, #0D5C46 70%, #177A57); overflow: hidden;
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: end;
}
.report-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 82% 20%, rgba(183,222,74,.16), transparent 30%); }
.report-hero > * { position: relative; z-index: 1; }
.report-hero h2 { color: #fff; font-size: 25px; }
.report-hero p { color: rgba(255,255,255,.58); font-size: 10.5px; margin: 5px 0 0; }
.report-hero .big-number { font-size: 42px; font-weight: 850; letter-spacing: -.07em; color: var(--accent); line-height: .9; }
.report-hero .big-number small { display: block; font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.45); margin-top: 8px; font-weight: 800; }
.report-summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; margin-top: 14px; }
.report-summary-cell { padding: 14px 16px; border-right: 1px solid var(--line); }
.report-summary-cell:last-child { border-right: 0; }
.report-summary-cell small { font-size: 9px; color: var(--muted-2); text-transform: uppercase; letter-spacing: .07em; font-weight: 800; display: block; }
.report-summary-cell b { display: block; font-size: 22px; font-weight: 850; letter-spacing: -.05em; margin-top: 4px; }
.report-summary-cell span { display: block; font-size: 9px; color: var(--muted); margin-top: 2px; }
.wa-preview {
    white-space: pre-wrap; font-size: 11px; line-height: 1.75; color: #23372D;
    background: #EAF7EE; border: 1px solid #CFE9D7; border-radius: 15px; padding: 18px;
    max-height: 480px; overflow-y: auto; font-family: inherit;
}
.wa-preview-wrap { position: relative; }
.wa-preview-wrap::before { content: "WhatsApp"; position: absolute; top: -9px; left: 15px; background: #fff; padding: 0 8px; font-size: 8px; font-weight: 850; text-transform: uppercase; letter-spacing: .1em; color: #1FA855; }
.recipient-list { display: flex; flex-direction: column; gap: 7px; }
.recipient-card {
    display: flex; align-items: flex-start; gap: 9px; padding: 10px 11px; border: 1px solid var(--line);
    border-radius: 11px; background: #fff; font-size: 10.5px;
}
.recipient-card input { margin-top: 2px; accent-color: var(--brand); }
.recipient-card b { display: block; font-size: 10.5px; }
.recipient-card small { display: block; color: var(--muted); font-size: 9px; margin-top: 2px; }

/* --------------------------------------------------------------------------
   Tenant manager
-------------------------------------------------------------------------- */
.manager-hero {
    background: linear-gradient(120deg, #0A3A2C, #0C523F); border-radius: var(--radius-lg);
    padding: 25px 27px; color: #fff; position: relative; overflow: hidden;
}
.manager-hero::after { content: ""; position: absolute; width: 300px; height: 300px; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; right: -110px; top: -150px; }
.manager-hero h1 { color: #fff; font-size: 29px; }
.manager-hero p { color: rgba(255,255,255,.55); font-size: 11.5px; margin: 5px 0 0; }
.manager-hero .hero-actions { margin-top: 16px; }
.tenant-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.tenant-card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
    box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 14px;
}
.tenant-card-head { display: flex; align-items: flex-start; gap: 12px; }
.tenant-card-head .tenant-logo { width: 44px; height: 44px; }
.tenant-card-title { flex: 1; min-width: 0; }
.tenant-card-title h3 { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tenant-card-title p { color: var(--muted); font-size: 10px; margin: 3px 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tenant-card-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.tenant-card-stats div { background: #FBFDFB; padding: 9px 10px; }
.tenant-card-stats b { display: block; font-size: 16px; font-weight: 850; letter-spacing: -.04em; }
.tenant-card-stats small { display: block; color: var(--muted-2); font-size: 8px; text-transform: uppercase; letter-spacing: .06em; font-weight: 800; margin-top: 1px; }
.tenant-card-actions { display: flex; gap: 6px; align-items: center; }
.tenant-card-actions .btn { flex: 1; }
.clone-note { display: flex; align-items: flex-start; gap: 8px; font-size: 9.5px; color: var(--muted); padding: 9px 11px; border-radius: 9px; background: var(--brand-softer); }
.clone-note .icon { width: 14px; height: 14px; color: var(--brand); margin-top: 1px; }
.manager-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 16px 0; }
.manager-stat { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.manager-stat small { display: block; font-size: 9px; color: var(--muted-2); text-transform: uppercase; letter-spacing: .08em; font-weight: 850; }
.manager-stat b { display: block; font-size: 24px; font-weight: 850; letter-spacing: -.055em; margin-top: 4px; }

/* --------------------------------------------------------------------------
   Settings
-------------------------------------------------------------------------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
    display: inline-flex; align-items: center; gap: 6px; padding: 11px 14px; border-bottom: 2px solid transparent;
    font-size: 11px; font-weight: 800; color: var(--muted); white-space: nowrap;
}
.tab .icon { width: 15px; height: 15px; }
.tab:hover { color: var(--brand); }
.tab.is-active { color: var(--brand); border-bottom-color: var(--brand); }
.settings-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 18px; align-items: start; }
.settings-nav { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; position: sticky; top: calc(var(--topbar) + 16px); }
.settings-nav a { display: flex; align-items: center; gap: 9px; padding: 10px 11px; border-radius: 9px; font-size: 11px; font-weight: 750; color: var(--muted); }
.settings-nav a:hover { background: var(--bg); color: var(--brand); }
.settings-nav a.is-active { background: var(--brand-soft); color: var(--brand); }
.settings-nav .icon { width: 16px; height: 16px; }
.settings-nav hr { border: 0; border-top: 1px solid var(--line); margin: 7px 6px; }
.setting-section { padding: 20px; }
.setting-section + .setting-section { border-top: 1px solid var(--line); }
.setting-section h3 { font-size: 15px; }
.setting-section > p { color: var(--muted); font-size: 10.5px; margin: 5px 0 17px; }
.color-row { display: flex; align-items: center; gap: 10px; }
.color-input { width: 47px; height: 43px; border: 1px solid var(--line-strong); border-radius: 10px; padding: 4px; background: #fff; }
.cron-box { display: flex; align-items: center; gap: 8px; padding: 11px 12px; background: #0D2E24; color: #C8E0D2; border-radius: 11px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10px; overflow-x: auto; }
.cron-box code { flex: 1; white-space: nowrap; }
.cron-box .icon-btn { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.1); color: #fff; width: 30px; height: 30px; }
.wa-token-line { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); background: var(--bg); border-radius: 10px; font-family: ui-monospace, monospace; font-size: 10.5px; color: var(--muted); }
.user-list { display: flex; flex-direction: column; }
.user-row { display: flex; align-items: center; gap: 11px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.user-row:last-child { border-bottom: 0; }
.user-row .user-main { flex: 1; min-width: 0; }
.user-row b { display: block; font-size: 11.5px; }
.user-row small { display: block; font-size: 9.5px; color: var(--muted); margin-top: 2px; }
.user-row .badge { flex: 0 0 auto; }
.empty-mini { padding: 14px; border: 1px dashed var(--line-strong); border-radius: 11px; color: var(--muted); font-size: 10px; text-align: center; }

/* --------------------------------------------------------------------------
   Empty states & pagination
-------------------------------------------------------------------------- */
.empty {
    display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
    padding: 42px 22px; color: var(--muted);
}
.empty-icon { width: 52px; height: 52px; border-radius: 16px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin-bottom: 12px; }
.empty-icon .icon { width: 24px; height: 24px; }
.empty h3 { font-size: 15px; margin-bottom: 5px; }
.empty p { font-size: 10.5px; max-width: 330px; margin: 0 0 14px; }
.pagination { display: flex; align-items: center; gap: 6px; justify-content: center; padding: 14px; }
.pagination a, .pagination span { min-width: 31px; height: 31px; padding: 0 8px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--line); font-size: 10px; font-weight: 800; color: var(--muted); background: #fff; }
.pagination .current { background: var(--brand); color: #fff; border-color: var(--brand); }

/* --------------------------------------------------------------------------
   Flash, PWA, bottom nav
-------------------------------------------------------------------------- */
.flash-wrap { position: fixed; top: calc(var(--topbar) + 10px); right: 18px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: min(390px, calc(100vw - 32px)); }
.flash {
    display: flex; align-items: flex-start; gap: 9px; background: #fff; border: 1px solid var(--line);
    border-radius: 13px; padding: 12px 13px; box-shadow: var(--shadow-md); font-size: 11.5px; animation: flashIn .3s ease;
}
.flash .icon { width: 17px; height: 17px; flex: 0 0 auto; }
.flash-success .icon { color: var(--success); }
.flash-error .icon { color: var(--danger); }
.flash-info .icon { color: var(--info); }
.flash-warning .icon { color: var(--warning); }
.flash button { margin-left: auto; background: none; border: 0; color: var(--muted); padding: 0; }
@keyframes flashIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.install-pwa {
    position: fixed; bottom: 82px; left: 50%; transform: translateX(-50%); z-index: 90;
    background: #0A3528; color: #fff; border: 1px solid rgba(255,255,255,.1); border-radius: 15px;
    padding: 10px 12px; box-shadow: var(--shadow-lg); display: none; align-items: center; gap: 10px;
    width: min(430px, calc(100vw - 28px));
}
.install-pwa.show { display: flex; }
.install-pwa .brand-mark { width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,.08); color: var(--accent); }
.install-pwa .brand-mark svg { width: 25px; height: 25px; }
.install-pwa b { font-size: 10.5px; display: block; }
.install-pwa small { font-size: 8.5px; color: rgba(255,255,255,.5); display: block; }
.install-pwa .btn { margin-left: auto; min-height: 31px; font-size: 9.5px; padding: 0 10px; }
.install-pwa .close { background: none; border: 0; color: rgba(255,255,255,.4); padding: 4px; }
.bottom-nav { display: none; }
.offline-badge { display: none; position: fixed; top: 0; left: 0; right: 0; z-index: 300; background: var(--warning); color: #fff; text-align: center; font-size: 10px; font-weight: 800; padding: 5px; }

/* --------------------------------------------------------------------------
   Auth / login
-------------------------------------------------------------------------- */
.auth-body {
    min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
    background: #F3F7F3;
}
.auth-visual {
    position: relative; overflow: hidden; background: #092F24; color: #fff; padding: 38px 48px;
    display: flex; flex-direction: column; justify-content: space-between; min-height: 100vh;
}
.auth-visual::before {
    content: ""; position: absolute; inset: 0;
    background:
        radial-gradient(circle at 75% 20%, rgba(183,222,74,.15), transparent 25%),
        radial-gradient(circle at 20% 85%, rgba(255,255,255,.05), transparent 30%);
}
.auth-visual::after {
    content: ""; position: absolute; width: 600px; height: 600px; border: 1px solid rgba(255,255,255,.06);
    border-radius: 50%; left: -260px; bottom: -380px; box-shadow: 0 0 0 80px rgba(255,255,255,.02), 0 0 0 160px rgba(255,255,255,.015);
}
.auth-visual > * { position: relative; z-index: 2; }
.auth-copy { max-width: 570px; padding: 40px 0; }
.auth-copy .eyebrow { color: var(--accent); }
.auth-copy h1 { color: #fff; font-size: clamp(34px, 4.6vw, 58px); line-height: 1.02; letter-spacing: -.055em; margin: 14px 0 18px; }
.auth-copy h1 span { color: var(--accent); }
.auth-copy p { color: rgba(255,255,255,.56); font-size: 13px; line-height: 1.75; max-width: 480px; }
.auth-preview {
    display: flex; flex-direction: column; gap: 10px; max-width: 440px; margin-top: 28px;
    padding: 15px; border-radius: 18px; background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.08);
    backdrop-filter: blur(8px);
}
.auth-preview-head { display: flex; align-items: center; justify-content: space-between; }
.auth-preview-head b { font-size: 10px; }
.auth-preview-head span { font-size: 8.5px; color: var(--accent); }
.auth-preview-row { display: flex; align-items: center; gap: 9px; padding: 8px 9px; border-radius: 10px; background: rgba(255,255,255,.05); }
.auth-preview-row .icon { width: 15px; height: 15px; color: var(--accent); }
.auth-preview-row span { font-size: 9.5px; color: rgba(255,255,255,.7); flex: 1; }
.auth-preview-row small { font-size: 8px; color: var(--accent); font-weight: 800; }
.auth-preview-foot { display: flex; align-items: center; gap: 12px; margin-top: 2px; font-size: 8.5px; color: rgba(255,255,255,.38); }
.auth-preview-foot b { color: rgba(255,255,255,.7); }
.auth-badges { display: flex; gap: 16px; flex-wrap: wrap; font-size: 8.5px; color: rgba(255,255,255,.36); }
.auth-badges span { display: flex; align-items: center; gap: 5px; }
.auth-badges .icon { width: 12px; height: 12px; color: var(--accent); }
.auth-panel { display: flex; align-items: center; justify-content: center; padding: 34px 28px; position: relative; }
.auth-form-wrap { width: 100%; max-width: 388px; }
.auth-form-wrap h2 { font-size: 28px; letter-spacing: -.05em; }
.auth-form-wrap > p { font-size: 11.5px; color: var(--muted); margin: 7px 0 23px; }
.auth-form { display: flex; flex-direction: column; gap: 13px; }
.auth-form .field input { height: 47px; border-radius: 12px; font-size: 13px; }
.input-icon-wrap { position: relative; }
.input-icon-wrap .icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 17px; color: var(--muted-2); }
.input-icon-wrap input { padding-left: 39px; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 43px; }
.password-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border: 0; background: none; color: var(--muted-2); display: grid; place-items: center; border-radius: 7px; }
.password-toggle:hover { background: var(--bg); color: var(--ink); }
.password-toggle .icon { width: 16px; }
.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 10px; color: var(--muted); }
.auth-submit { min-height: 48px; border-radius: 13px; font-size: 12.5px; margin-top: 4px; }
.auth-tenant {
    display: flex; align-items: center; gap: 10px; padding: 10px 11px; border: 1px solid var(--line);
    border-radius: 13px; background: #fff; margin-bottom: 18px;
}
.auth-tenant .tenant-logo { width: 38px; height: 38px; border-radius: 10px; }
.auth-tenant b { display: block; font-size: 11px; }
.auth-tenant small { display: block; font-size: 9px; color: var(--muted); margin-top: 1px; }
.auth-tenant .badge { margin-left: auto; }
.auth-footer { margin-top: 31px; font-size: 9px; color: var(--muted-2); line-height: 1.7; }
.auth-footer a { font-weight: 800; }
.auth-top-link { position: absolute; top: 25px; right: 28px; display: flex; align-items: center; gap: 5px; font-size: 9.5px; font-weight: 800; color: var(--muted); }
.auth-top-link .icon { width: 13px; }
.demo-hint { border: 1px dashed var(--line-strong); background: #FBFDFB; border-radius: 12px; padding: 10px 12px; font-size: 9.5px; color: var(--muted); margin-top: 14px; line-height: 1.6; }
.demo-hint b { color: var(--ink); }
.auth-logo-mobile { display: none; }

/* --------------------------------------------------------------------------
   Install
-------------------------------------------------------------------------- */
.install-body { background: #F3F7F3; min-height: 100vh; }
.install-shell { display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); min-height: 100vh; }
.install-aside { position: relative; overflow: hidden; background: #092F24; color: #fff; padding: 34px 45px; display: flex; flex-direction: column; }
.install-aside::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 78% 15%, rgba(183,222,74,.16), transparent 24%), radial-gradient(circle at 10% 90%, rgba(255,255,255,.06), transparent 28%); }
.install-aside > * { position: relative; z-index: 2; }
.install-pitch { margin: auto 0; max-width: 500px; padding: 40px 0; }
.install-pitch h1 { color: #fff; font-size: clamp(38px, 4vw, 54px); line-height: 1.02; letter-spacing: -.055em; margin: 14px 0 17px; }
.install-pitch p { color: rgba(255,255,255,.56); font-size: 13px; line-height: 1.8; max-width: 440px; }
.install-points { display: flex; flex-direction: column; gap: 15px; max-width: 460px; }
.install-points > div { display: flex; align-items: flex-start; gap: 11px; }
.install-points .icon { width: 18px; height: 18px; color: var(--accent); margin-top: 2px; }
.install-points b { display: block; font-size: 11px; color: #fff; }
.install-points small { display: block; font-size: 9px; color: rgba(255,255,255,.4); margin-top: 2px; }
.install-foot { font-size: 8.5px; color: rgba(255,255,255,.3); padding-top: 28px; letter-spacing: .03em; }
.install-main { display: flex; align-items: flex-start; justify-content: center; padding: 36px 28px; }
.install-card { width: 100%; max-width: 610px; background: #fff; border: 1px solid var(--line); border-radius: 26px; box-shadow: var(--shadow-lg); padding: 32px; }
.install-card h1 { font-size: 29px; letter-spacing: -.05em; }
.install-card > p { color: var(--muted); font-size: 11.5px; margin: 7px 0 22px; }
.install-card .stack-form { gap: 14px; }
.install-card .field input { height: 43px; }
.install-card .switch-row { background: #FBFDFB; }
.install-card .demo-fields, .install-card .manual-fields { display: none; }
.credential-box { display: flex; flex-direction: column; gap: 10px; margin: 18px 0; }
.credential-box > div { padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px; background: #FBFDFB; }
.credential-box small { display: block; font-size: 8.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted-2); font-weight: 850; }
.credential-box strong { display: block; font-size: 11px; margin-top: 4px; word-break: break-all; }
.credential-box code { display: inline-block; padding: 5px 8px; border-radius: 6px; background: #0A3528; color: var(--accent); font-size: 11px; margin-top: 6px; }
.req-details { border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; background: #FBFDFB; }
.req-details summary { display: flex; align-items: center; gap: 7px; font-size: 10.5px; font-weight: 800; cursor: pointer; list-style: none; }
.req-details summary::-webkit-details-marker { display: none; }
.req-details summary .icon { width: 15px; height: 15px; color: var(--brand); }
.req-ok { margin-left: auto; font-size: 8.5px; padding: 3px 7px; border-radius: 999px; background: var(--success-bg); color: var(--success); }
.req-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; margin-top: 11px; font-size: 9.5px; }
.req-list > div { display: flex; align-items: center; gap: 5px; color: var(--muted); }
.req-list .icon { width: 13px; height: 13px; }
.req-list .ok .icon { color: var(--success); }
.req-list .bad .icon { color: var(--danger); }

/* --------------------------------------------------------------------------
   Footer / misc
-------------------------------------------------------------------------- */
.app-footer { padding: 22px 2px 4px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted-2); font-size: 9px; }
.app-footer span { display: inline-flex; align-items: center; gap: 5px; }
.app-footer .icon { width: 12px; height: 12px; }
.page-loading { display: grid; place-items: center; min-height: 70vh; }
.spinner { width: 26px; height: 26px; border: 3px solid var(--brand-soft); border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast-inline { display: flex; align-items: center; gap: 8px; font-size: 10.5px; padding: 9px 12px; border-radius: 9px; background: var(--bg); color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.hash { font-family: ui-monospace, monospace; font-size: 9.5px; color: var(--muted-2); }

/* --------------------------------------------------------------------------
   Responsive
-------------------------------------------------------------------------- */
@media (max-width: 1200px) {
    :root { --sidebar: 244px; }
    .page { padding: 24px 22px 38px; }
    .topbar { padding: 0 22px; }
    .grid-main { grid-template-columns: minmax(0, 1.35fr) minmax(280px, .8fr); }
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .manager-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1024px) {
    .sidebar { transform: translateX(-104%); transition: transform .22s ease; box-shadow: 20px 0 60px rgba(0,0,0,.18); }
    .sidebar.open { transform: none; }
    .sidebar-scrim { display: block; position: fixed; inset: 0; background: rgba(5,25,18,.45); z-index: 40; opacity: 0; pointer-events: none; transition: .2s; backdrop-filter: blur(2px); }
    .sidebar-scrim.open { opacity: 1; pointer-events: auto; }
    .main { margin-left: 0; }
    .menu-toggle { display: grid; }
    .topbar { padding: 0 18px; }
    .page { padding: 22px 18px 96px; }
    .grid-main, .grid-wide, .dashboard-bottom { grid-template-columns: 1fr; }
    .report-filter-form { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
    .pm-layout { grid-template-columns: 1fr; }
    .pm-side { position: static; order: 2; }
    .settings-layout { grid-template-columns: 1fr; }
    .settings-nav { position: static; display: flex; overflow-x: auto; gap: 4px; padding: 6px; }
    .settings-nav a { white-space: nowrap; padding: 8px 10px; }
    .settings-nav hr { display: none; }
    .tenant-grid { grid-template-columns: 1fr; }
    .bottom-nav {
        display: flex; position: fixed; z-index: 80; bottom: 0; left: 0; right: 0;
        background: rgba(255,255,255,.95); backdrop-filter: blur(18px); border-top: 1px solid var(--line);
        padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around;
    }
    .bottom-item {
        display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
        min-width: 58px; padding: 5px; border-radius: 10px; color: var(--muted-2); font-size: 8px; font-weight: 800;
    }
    .bottom-item .icon { width: 19px; height: 19px; }
    .bottom-item.is-active { color: var(--brand); background: var(--brand-soft); }
    .bottom-item .bottom-plus { width: 36px; height: 36px; border-radius: 12px; background: var(--brand); color: #fff; display: grid; place-items: center; margin-top: -17px; border: 3px solid #fff; box-shadow: 0 6px 14px rgba(13,92,70,.22); }
    .bottom-item .bottom-plus .icon { width: 18px; height: 18px; }
    .auth-body { grid-template-columns: 1fr; }
    .auth-visual { display: none; }
    .auth-panel { min-height: 100vh; min-height: 100dvh; padding: 32px 22px; }
    .auth-logo-mobile { display: flex; justify-content: center; margin-bottom: 26px; }
    .auth-top-link { top: 20px; right: 20px; }
    .install-shell { grid-template-columns: 1fr; }
    .install-aside { display: none; }
    .install-main { padding: 22px 16px; }
    .install-card { padding: 24px; border-radius: 20px; }
    .app-footer { padding-bottom: 16px; }
}
@media (max-width: 760px) {
    .desktop-only { display: none !important; }
    .topbar { height: 62px; gap: 10px; }
    .topbar-title small { display: none; }
    .topbar-title b { font-size: 12px; }
    .topbar-actions { gap: 5px; }
    .mode-banner span { display: none; }
    .user-menu summary b, .user-menu summary small { display: none; }
    .user-menu summary .icon { display: none; }
    .page { padding: 18px 14px 92px; }
    .page-head { flex-direction: column; align-items: flex-start; gap: 12px; margin-bottom: 17px; }
    .page-head p { font-size: 11.5px; }
    .page-actions { width: 100%; }
    .page-actions .btn { flex: 1; }
    .hero { grid-template-columns: 1fr; padding: 22px; gap: 20px; }
    .hero-side { flex-direction: row; justify-content: flex-start; gap: 14px; }
    .compliance-ring { width: 112px; height: 112px; }
    .compliance-ring strong { font-size: 28px; }
    .compliance-ring::before { inset: 8px; }
    .ring-caption { text-align: left; font-size: 9px; }
    .hero-actions .btn { flex: 1; }
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
    .stat-card { padding: 13px; min-height: 109px; gap: 9px; }
    .stat-value { font-size: 24px; }
    .stat-icon { width: 31px; height: 31px; }
    .stat-icon .icon { width: 16px; height: 16px; }
    .content-grid { grid-template-columns: 1fr; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .field-grid, .field-grid-3 { grid-template-columns: 1fr; }
    .card { border-radius: 16px; }
    .card-pad { padding: 16px; }
    .card-head { padding: 15px 16px 0; }
    .card-body { padding: 15px 16px 16px; }
    .task-row, .finding-row { padding-left: 16px; padding-right: 16px; }
    .task-meta .badge:not(.task-status) { display: none; }
    .task-type { width: 34px; height: 34px; }
    .report-hero { grid-template-columns: 1fr; }
    .report-hero .big-number { font-size: 34px; }
    .report-summary-grid { grid-template-columns: repeat(2, 1fr); }
    .report-summary-cell { border-bottom: 1px solid var(--line); }
    .report-summary-cell:nth-child(2) { border-right: 0; }
    .report-summary-cell:nth-child(3), .report-summary-cell:nth-child(4) { border-bottom: 0; }
    .manager-stats { gap: 8px; }
    .manager-stat { padding: 12px; }
    .manager-stat b { font-size: 21px; }
    .tenant-card { padding: 15px; }
    .tenant-card-actions { flex-wrap: wrap; }
    .tenant-card-actions .btn { flex: 1 1 auto; }
    .pm-device-card { padding: 17px; }
    .result-options { margin-left: 0; grid-template-columns: repeat(4, 1fr); }
    .check-note, .item-photo-wrap { margin-left: 0; }
    .check-item { padding: 15px 16px; }
    .photo-grid { grid-template-columns: repeat(3, 1fr); }
    .filter-bar { gap: 6px; padding: 10px; }
    .filter-bar select, .filter-bar input { height: 36px; font-size: 10.5px; min-width: 0; }
    .filter-bar .field-inline { flex: 1 1 140px; }
    .filter-bar select { width: 100%; }
    .filter-bar .spacer { display: none; }
    .flash-wrap { top: 70px; right: 10px; left: 10px; max-width: none; }
    .install-card { padding: 21px 17px; }
    .auth-panel { padding: 25px 20px; }
    .auth-form-wrap h2 { font-size: 25px; }
    .toggle-grid { grid-template-columns: repeat(2, 1fr); }
    .settings-nav { margin-left: -2px; margin-right: -2px; }
    .settings-nav a span { display: none; }
    .settings-nav .icon { width: 19px; height: 19px; }
    .table { min-width: 640px; }
    .app-footer { flex-direction: column; align-items: flex-start; gap: 5px; font-size: 8.5px; }
    .wa-preview { font-size: 10.5px; padding: 14px; }
}
@media (max-width: 420px) {
    .stats-grid { gap: 8px; }
    .stat-card { padding: 12px; min-height: 100px; }
    .stat-value { font-size: 22px; }
    .stat-label { font-size: 9.5px; }
    .hero { padding: 18px; }
    .hero-actions { flex-direction: column; }
    .hero-actions .btn { width: 100%; }
    .quick-actions { padding: 10px 14px 15px; }
    .quick-action { font-size: 9.5px; padding: 9px; }
    .auth-form-wrap { max-width: none; }
    .auth-top-link { font-size: 8.5px; }
}

/* --------------------------------------------------------------------------
   Print
-------------------------------------------------------------------------- */
@media print {
    @page { margin: 12mm; }
    body { background: #fff !important; color: #111; font-size: 10pt; }
    .sidebar, .topbar, .bottom-nav, .page-actions, .filter-bar, .flash-wrap, .install-pwa, .app-footer, .no-print, .btn, .tabs { display: none !important; }
    .main { margin: 0 !important; }
    .page { padding: 0 !important; max-width: none !important; }
    .card, .hero, .report-hero { box-shadow: none !important; border: 1px solid #ddd !important; break-inside: avoid; }
    .hero, .report-hero, .pm-device-card, .log-detail-head { background: #fff !important; color: #111 !important; }
    .hero h2, .hero p, .hero .eyebrow, .report-hero h2, .report-hero p, .log-detail-head h2, .log-detail-head p { color: #111 !important; }
    .hero-side, .hero-actions, .compliance-ring { display: none !important; }
    .grid-main, .grid-wide, .grid-2, .grid-3, .report-summary-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .table { min-width: 0 !important; }
    .table th, .table td { padding: 6px 7px !important; font-size: 8pt; }
    a { color: #111 !important; }
    .print-only { display: block !important; }
}
.print-only { display: none; }
