/*
 * Doify UI System v20 — the final visual layer shared by every module.
 * Keep component-specific rules in components.css and geometry in forms.css;
 * this file owns visual consistency, responsive polish and authentication UI.
 */
:root {
    --bg: #f4f6fb;
    --panel: #ffffff;
    --surface: #ffffff;
    --surface-subtle: #f8f9fd;
    --text: #182230;
    --muted: #667085;
    --line: #e4e8f0;
    --border: #e4e8f0;
    --primary: #5b67e8;
    --primary-dark: #4652ce;
    --primary-soft: #eef0ff;
    --success: #0da678;
    --danger: #dc4863;
    --warning: #e59a17;
    --purple: #8158df;
    --radius: 16px;
    --radius-sm: 10px;
    --radius-lg: 20px;
    --shadow: 0 1px 2px rgba(16,24,40,.025), 0 8px 24px rgba(23,35,62,.04);
    --shadow-md: 0 16px 40px rgba(23,35,62,.08);
}

html { background: var(--bg); }
body {
    background:
        radial-gradient(circle at 8% 3%, rgba(91,103,232,.055), transparent 22rem),
        var(--bg);
    color: var(--text);
    text-rendering: optimizeLegibility;
}

/* Common application frame */
.topbar {
    border-color: rgba(220,226,236,.92);
    background: rgba(255,255,255,.91);
    box-shadow: 0 1px 0 rgba(16,24,40,.02);
    backdrop-filter: blur(18px) saturate(145%);
}
.topbar-brand strong { letter-spacing: -.2px; }
.nav-dropdown > summary { border: 1px solid transparent; }
.nav-dropdown > summary:hover,
.nav-dropdown.active > summary { border-color: #e3e7f7; background: #f6f7ff; }
.dropdown-panel { border-color: #e1e6ef; border-radius: 15px; box-shadow: 0 22px 55px rgba(19,31,58,.13); }
.dropdown-panel a { border: 1px solid transparent; }
.dropdown-panel a:hover { border-color: #e6e9f7; background: #f7f8ff; }
.icon-button { border-color: #e3e7ef; background: #fff; }
.content { max-width: 1540px; padding: 26px clamp(18px,2.4vw,34px) 38px; }

/* Consistent page hierarchy */
.page-head {
    min-height: 68px;
    align-items: center;
    margin-bottom: 18px;
    padding: 0 2px;
}
.page-head > div:first-child { min-width: 0; }
.page-head h1 { margin: 3px 0 4px; color: #172033; font-size: clamp(21px,2vw,27px); font-weight: 780; letter-spacing: -.55px; }
.page-head p { max-width: 760px; color: #6d788b; line-height: 1.8; }
.eyebrow { color: #5965d9; font-weight: 780; letter-spacing: .01em; }
.head-actions { flex-wrap: wrap; justify-content: flex-end; }

.panel {
    border-color: var(--line);
    border-radius: var(--radius);
    background: rgba(255,255,255,.98);
    box-shadow: var(--shadow);
}
.panel-head { min-height: 39px; margin-bottom: 16px; }
.panel h2, .panel-head h2 { color: #202b3c; font-size: 15px; font-weight: 760; letter-spacing: -.15px; }
.panel-head p { color: #778195; font-size: 11px; line-height: 1.75; }
.count-chip, .badge { border: 1px solid rgba(91,103,232,.09); }
.section-hub { gap: 10px; margin-bottom: 17px; }
.section-hub a {
    min-height: 84px;
    position: relative;
    overflow: hidden;
    border-color: #e1e6ef;
    border-radius: 15px;
    background: linear-gradient(145deg,#fff,#f9faff);
    box-shadow: var(--shadow);
}
.section-hub a::after { content: ''; width: 34px; height: 34px; position: absolute; left: -15px; bottom: -16px; border-radius: 50%; background: rgba(91,103,232,.08); transition: transform .2s ease; }
.section-hub a:hover { border-color: #b9c0f2; box-shadow: 0 10px 24px rgba(52,65,130,.08); transform: translateY(-2px); }
.section-hub a:hover::after { transform: scale(1.5); }
.section-hub strong { color: #29364a; font-size: 11.5px; }

/* Tables and dense information */
.table-wrap { border-color: #e5e9f0; border-radius: 12px; background: #fff; }
table { font-variant-numeric: tabular-nums; }
th { padding: 10px 12px; color: #6f7b8d; background: #f7f8fb; font-size: 10.5px; font-weight: 750; }
td { padding: 11px 12px; color: #344054; }
tbody tr:nth-child(even) { background: #fcfcfe; }
tbody tr:hover { background: #f7f8ff; }
.table-action { border: 1px solid #e0e5f7; color: #4e59ca; background: #f5f6ff; }

/* Navigation and row operations keep the same visual language even in legacy views. */
.page-head > a:not(.button),
.page-head > :is(.head-actions,.page-actions) > a:not(.button),
.panel-head > a:not(.button),
.button-row > a:not(.button) {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 7px 11px;
    border: 1px solid #dfe4ec;
    border-radius: 9px;
    color: #4652bd;
    background: #fff;
    box-shadow: none;
    font-size: 10.5px;
    font-weight: 700;
    line-height: 1.35;
    white-space: nowrap;
    transition: border-color .18s ease,background .18s ease,color .18s ease,transform .18s ease;
}
.page-head > a:not(.button)::before { content: "←"; font-size: 13px; line-height: 1; }
.page-head > a:not(.button):hover,
.page-head > :is(.head-actions,.page-actions) > a:not(.button):hover,
.panel-head > a:not(.button):hover,
.button-row > a:not(.button):hover {
    border-color: #bdc6ea;
    color: #3f4bb8;
    background: #f6f7ff;
    transform: translateY(-1px);
}
.table-wrap tbody td:last-child:has(> a:not(.button):not(.table-action)) {
    font-size: 0;
    white-space: nowrap;
}
.table-wrap tbody td:last-child > a:not(.button):not(.table-action),
.table-wrap tbody td:last-child > .button-row > a:not(.button):not(.table-action) {
    min-height: 29px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 2px 3px;
    padding: 4px 9px;
    border: 1px solid #dfe4f2;
    border-radius: 8px;
    color: #4b57c3;
    background: #f7f8ff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.35;
    white-space: nowrap;
    transition: border-color .18s ease,background .18s ease,color .18s ease,transform .18s ease;
}
.table-wrap tbody td:last-child > a:not(.button):not(.table-action):hover,
.table-wrap tbody td:last-child > .button-row > a:not(.button):not(.table-action):hover {
    border-color: #bfc7ef;
    color: #3542ae;
    background: #eef0ff;
    transform: translateY(-1px);
}
.table-wrap tbody td:last-child :is(.link-danger,.link.danger) {
    min-height: 29px;
    margin: 2px 3px;
    padding: 4px 9px !important;
    border: 1px solid #f0ccd3 !important;
    border-radius: 8px;
    color: #b33e54 !important;
    background: #fff6f7 !important;
    box-shadow: none;
    font-size: 10px;
    font-weight: 700;
}
.table-wrap tbody td:last-child :is(.link-danger,.link.danger):hover { border-color: #e4abb6 !important; color: #992b40 !important; background: #ffedef !important; box-shadow: none; }
.empty:not(td):not(th) { min-height: 130px; display: grid; place-items: center; margin: 0; border: 1px dashed #dce2ec; border-radius: 12px; background: #fafbfc; }
td.empty, th.empty { display: table-cell !important; width: auto !important; min-height: 0; height: 132px; padding: 30px 18px; border: 0; color: var(--muted); background: #fafbfc; text-align: center; vertical-align: middle; }
.table-wrap tbody tr:only-child > td.empty { border-radius: 0 0 11px 11px; }

/* Unified searchable people picker: single and multiple selections share one sortable table. */
.people-native-select,
.people-picker-source {
    width: 1px !important;
    height: 1px !important;
    position: absolute !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    opacity: 0 !important;
    white-space: nowrap !important;
}
.people-picker-host { width: 100%; min-width: 0; align-self: end; }
.people-table-picker { width: 100%; position: relative; margin-top: 0; }
.people-table-picker .people-multi-trigger {
    height: var(--form-control-height,40px);
    min-height: var(--form-control-height,40px);
    grid-template-columns: minmax(0,1fr) auto 18px;
    padding: 5px 10px;
    border-color: #d8dee9;
    border-radius: 9px;
    background: #fff;
    box-shadow: none;
}
.people-table-picker .people-multi-trigger:hover,
.people-table-picker .people-multi-trigger:focus-visible { border-color: #7e88ea; background: #fbfcff; box-shadow: 0 0 0 3px rgba(91,103,232,.1); }
.people-table-picker .people-multi-trigger.invalid { border-color: #d34f68; box-shadow: 0 0 0 3px rgba(211,79,104,.1); }
.people-table-picker .people-multi-trigger-text { color: #2f3e55; font-size: 11px; }
.people-table-picker .people-multi-trigger-count { color: #7b8798; font-size: 9px; }
.people-table-picker .people-multi-panel {
    position: fixed;
    z-index: 700;
    min-width: 0;
    display: flex;
    flex-direction: column;
    padding: 12px;
    overflow: hidden;
    border: 1px solid #ccd6e4;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 24px 65px rgba(26,39,64,.24);
}
.people-table-picker .people-multi-panel[hidden] { display: none !important; }
.people-table-picker .people-multi-head { flex: 0 0 auto; grid-template-columns: minmax(0,1fr) 36px; }
.people-table-picker .people-multi-search { min-height: 40px; border-radius: 9px; font-size: 11px; }
.people-table-picker .people-picker-close { width: 36px; height: 36px; min-height: 36px; border-radius: 9px; box-shadow: none; }
.people-table-picker .people-multi-actions { flex: 0 0 auto; min-height: 38px; gap: 12px; padding: 5px 2px 9px; }
.people-table-picker .people-picker-link { min-height: 27px; padding: 3px 7px; border-radius: 7px; box-shadow: none; font-size: 9.5px; }
.people-picker-table-wrap { flex: 1 1 auto; min-height: 135px; overflow: auto; border: 1px solid #e2e7ef; border-radius: 11px; background: #fff; }
.people-picker-table { width: 100%; min-width: 430px; table-layout: fixed; border-collapse: separate; border-spacing: 0; direction: rtl; }
.people-picker-table th { position: sticky; z-index: 2; top: 0; height: 37px; padding: 0 7px; overflow: hidden; border-bottom: 1px solid #dde4ee; background: #f5f7fb; color: #5f6e83; font-size: 9.5px; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.people-picker-table th button { width: 100%; min-height: 35px; display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 0; overflow: hidden; border: 0; border-radius: 0; color: inherit; background: transparent; box-shadow: none; font: inherit; white-space: nowrap; }
.people-picker-table th button:hover { color: #4856c8; background: transparent; box-shadow: none; }
.people-picker-table th button i { min-width: 13px; color: #8c98aa; font-size: 10px; font-style: normal; }
.people-picker-table td { height: 41px; padding: 6px 7px; overflow: hidden; border-bottom: 1px solid #edf1f5; color: #344054; background: #fff; font-size: 10.5px; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.people-picker-table tbody tr { cursor: pointer; outline: none; }
.people-picker-table tbody tr:last-child td { border-bottom: 0; }
.people-picker-table tbody tr:hover td,
.people-picker-table tbody tr:focus td { background: #f7f9ff; }
.people-picker-table tbody tr.selected td { background: #f0f4ff; color: #2f4382; }
.people-picker-table .people-check-column { width: 40px; text-align: center; }
.people-picker-table :is(th,td):nth-child(2) { width: 104px; }
.people-picker-table :is(th,td):nth-child(3) { width: 112px; }
.people-picker-table :is(th,td):nth-child(4) { width: auto; }
.people-row-check { width: 18px; height: 18px; min-height: 18px; position: relative; padding: 0; border: 1.5px solid #aeb9ca; border-radius: 5px; background: #fff; box-shadow: none; }
.people-row-check:hover { border-color: #6674e7; background: #f7f8ff; box-shadow: none; }
.people-row-check[aria-checked="true"] { border-color: #5969e8; background: #5969e8; }
.people-row-check[aria-checked="true"]::after { content: "✓"; position: absolute; inset: -2px 0 0; color: #fff; font-size: 12px; font-weight: 800; }
.people-picker-empty { min-height: 145px; display: grid; place-items: center; margin: 0; color: #7a8798; font-size: 10.5px; }
.people-picker-empty[hidden] { display: none !important; }
@media (max-width: 700px) {
    .people-table-picker .people-multi-trigger { grid-template-columns: minmax(0,1fr) 18px; }
    .people-table-picker .people-multi-trigger-count { grid-column: 1 / -1; }
    .people-table-picker .people-multi-panel { max-height: calc(100dvh - 94px) !important; padding: 10px; }
    .people-table-picker .people-multi-actions { flex-wrap: wrap; gap: 5px 10px; }
    .people-table-picker .people-selected-count { width: 100%; }
    .people-picker-table-wrap { min-height: 190px; }
    .people-picker-table { min-width: 430px; }
    .people-picker-table th, .people-picker-table td { padding-inline: 6px; }
    .people-table-picker.open::before { content: ""; position: fixed; z-index: 699; inset: 0; background: rgba(18,29,48,.38); backdrop-filter: blur(2px); }
}

/* Buttons and forms */
button, .button { border-radius: 9px; background: linear-gradient(135deg,#6672ed,#5360df); box-shadow: 0 5px 14px rgba(80,93,218,.17); }
button:hover, .button:hover { background: linear-gradient(135deg,#5966df,#4652ce); box-shadow: 0 8px 18px rgba(80,93,218,.2); }
.button.secondary { border-color: #dfe4ec; background: #fff; }
.button.secondary:hover { border-color: #cfd6e2; background: #f8f9fb; box-shadow: none; }
input, select, textarea { border-color: #d8dee9; border-radius: 9px; background: #fff; }
input:hover, select:hover, textarea:hover { border-color: #b9c3d4; }
input:focus, select:focus, textarea:focus { border-color: #7e88ea; box-shadow: 0 0 0 3px rgba(91,103,232,.11); }
.form-section, .employee-form-section, .settings-section { border-color: #e2e7ef; background: #fafbfe; }
.form-actions { background: linear-gradient(to bottom,rgba(255,255,255,0),#fff 38%); }
.filter-bar { border: 1px solid #e2e7ef; background: #fff; box-shadow: var(--shadow); }
.alert { border-radius: 11px; box-shadow: 0 5px 16px rgba(25,39,68,.035); }

/* Dashboard refinement */
.welcome-banner { border: 1px solid #dfe5f7; background: linear-gradient(120deg,#f0f3ff,#f4f8ff 53%,#eefbf8); }
.stats article { border-color: rgba(220,226,236,.8); box-shadow: var(--shadow); }
.user-overview-card, .overview-section { border-color: #e2e7ef; box-shadow: var(--shadow); }

/* Premium authentication shell */
.guest-auth-page { min-height: 100dvh; background: #f1f3f8; }
.guest-auth-page .guest-shell { min-height: 100dvh; grid-template-columns: minmax(560px,1.35fr) minmax(390px,.78fr); }
.guest-auth-page .guest-visual {
    min-height: calc(100dvh - 28px);
    margin: 14px;
    padding: clamp(24px,3.2vw,46px);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 26px;
    isolation: isolate;
    color: #fff;
    background:
        linear-gradient(145deg,rgba(15,23,50,.08),rgba(21,25,60,.2)),
        linear-gradient(135deg,#111938 0%,#272b66 49%,#3e43a4 100%);
    box-shadow: 0 22px 60px rgba(20,25,65,.18);
}
.guest-auth-page .guest-visual::before { width: 480px; height: 480px; left: -210px; bottom: -270px; border: 70px solid rgba(255,255,255,.035); background: rgba(102,114,237,.14); z-index: -1; }
.guest-aurora { position: absolute; z-index: -1; border-radius: 50%; filter: blur(3px); pointer-events: none; }
.guest-aurora-one { width: 320px; height: 320px; top: -160px; right: 18%; background: rgba(104,213,207,.17); }
.guest-aurora-two { width: 260px; height: 260px; bottom: 5%; left: 12%; background: rgba(126,93,237,.2); }
.guest-auth-page .guest-brand { justify-content: flex-start; color: #fff; }
.guest-auth-page .guest-brand > span:last-child { display: grid; line-height: 1.3; }
.guest-auth-page .guest-brand strong { font-size: 17px; letter-spacing: -.2px; }
.guest-auth-page .guest-brand strong b { margin-inline-start: 3px; color: #bfc7ff; font-size: 12px; }
.guest-auth-page .guest-brand small { color: rgba(235,239,255,.65); font-size: 9px; }
.guest-brand-logo-wrap { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; background: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.13); }

.guest-product-preview { width: min(620px,82%); position: relative; z-index: 1; margin: auto; direction: rtl; }
.preview-window { overflow: hidden; border: 1px solid rgba(255,255,255,.26); border-radius: 18px; background: rgba(255,255,255,.95); box-shadow: 0 28px 80px rgba(3,8,31,.3); transform: perspective(1100px) rotateY(-3deg) rotateX(1deg); }
.preview-window > header { min-height: 39px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 0 13px; border-bottom: 1px solid #e8eaf1; color: #5f6b80; background: #fbfcff; font-size: 8.5px; }
.preview-window > header > span { direction: ltr; justify-self: end; display: flex; gap: 4px; }
.preview-window > header i { width: 6px; height: 6px; display: block; border-radius: 50%; background: #cdd3df; }
.preview-window > header i:first-child { background: #6bd1b2; }
.preview-window > header strong { color: #263248; font-size: 9px; }
.preview-window > header em { justify-self: start; font-style: normal; }
.preview-body { padding: 14px; }
.preview-metrics { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.preview-metrics > span { min-height: 55px; display: grid; align-content: center; gap: 2px; padding: 8px 10px; border: 1px solid #e9ebf2; border-radius: 10px; background: #f9faff; }
.preview-metrics small { color: #7b8497; font-size: 7.5px; }
.preview-metrics b { color: #303c57; font-size: 15px; }
.preview-board { display: grid; grid-template-columns: 1.1fr .9fr; gap: 9px; margin-top: 9px; }
.preview-chart { min-height: 96px; position: relative; display: flex; align-items: flex-end; gap: 7px; padding: 15px 13px 13px; overflow: hidden; border: 1px solid #e9ebf2; border-radius: 11px; background: linear-gradient(180deg,#fbfcff,#f6f8ff); }
.preview-chart > span { width: 12%; display: block; border-radius: 4px 4px 2px 2px; background: linear-gradient(#7782ef,#b9c0ff); }
.preview-chart > span:nth-child(1){height:36%}.preview-chart > span:nth-child(2){height:54%}.preview-chart > span:nth-child(3){height:43%}.preview-chart > span:nth-child(4){height:74%}.preview-chart > span:nth-child(5){height:63%}.preview-chart > span:nth-child(6){height:86%}
.preview-chart > i { width: 76%; height: 38px; position: absolute; top: 21px; right: 12%; border-top: 2px solid #32b69b; border-radius: 50%; transform: rotate(-8deg); opacity: .8; }
.preview-flow { display: grid; gap: 5px; }
.preview-flow > span { display: grid; grid-template-columns: 7px 1fr; gap: 1px 6px; align-content: center; padding: 6px 8px; border: 1px solid #e9ebf2; border-radius: 9px; background: #fff; }
.preview-flow i { width: 7px; height: 7px; grid-row: 1/3; align-self: center; border-radius: 50%; background: #6d78e9; box-shadow: 0 0 0 3px #eef0ff; }
.preview-flow span:first-child i { background: #20af86; box-shadow: 0 0 0 3px #e5f8f2; }
.preview-flow span:last-child i { background: #aab2c2; box-shadow: 0 0 0 3px #f0f2f5; }
.preview-flow b { color: #354057; font-size: 7.5px; }
.preview-flow em { color: #8a93a4; font-size: 6.5px; font-style: normal; }
.preview-float { position: absolute; z-index: 2; display: flex; align-items: center; gap: 9px; padding: 10px 12px; border: 1px solid rgba(255,255,255,.5); border-radius: 13px; color: #27334a; background: rgba(255,255,255,.95); box-shadow: 0 18px 35px rgba(4,10,38,.22); backdrop-filter: blur(9px); }
.preview-float > span:first-child:not(.preview-avatars) { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 9px; color: #fff; background: linear-gradient(135deg,#6673ed,#8d63e9); font-size: 13px; }
.preview-float div { display: grid; gap: 2px; }
.preview-float strong { font-size: 8.5px; }.preview-float small { color: #778195; font-size: 7px; }
.preview-float-reminder { left: -46px; top: 29%; }
.preview-float-team { right: -40px; bottom: -24px; }
.preview-avatars { direction: ltr; display: flex; padding-left: 7px; }
.preview-avatars i { width: 25px; height: 25px; display: grid; place-items: center; margin-left: -7px; border: 2px solid #fff; border-radius: 50%; color: #4b57c9; background: #e9ecff; font-size: 7px; font-style: normal; font-weight: 800; }

.guest-auth-page .guest-copy { max-width: 670px; z-index: 1; margin: 17px 0 0; }
.guest-auth-page .guest-copy > span { color: #9ce8df; font-size: 10.5px; letter-spacing: .02em; }
.guest-auth-page .guest-copy h2 { margin: 6px 0 9px; color: #fff; font-size: clamp(27px,3vw,44px); line-height: 1.35; letter-spacing: -1.2px; }
.guest-auth-page .guest-copy p { max-width: 650px; margin: 0; color: rgba(233,237,255,.75); font-size: 11px; line-height: 1.9; }
.guest-capabilities { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px; }
.guest-capabilities span { padding: 5px 9px; border: 1px solid rgba(255,255,255,.15); border-radius: 999px; color: rgba(244,246,255,.82); background: rgba(255,255,255,.07); font-size: 8px; backdrop-filter: blur(6px); }

.guest-auth-page .auth-card {
    width: min(428px,calc(100% - 38px));
    max-height: calc(100dvh - 24px);
    padding: 22px 24px 18px;
    overflow-y: auto;
    border-color: #e1e5ed;
    border-radius: 22px;
    box-shadow: 0 24px 70px rgba(26,37,65,.11);
    scrollbar-width: thin;
}
.guest-login-page { overflow: hidden; }
.guest-login-page .auth-card { overflow: hidden; }
.guest-auth-page .auth-card h1 { margin: 1px 0 2px; color: #172033; font-size: 23px; }
.guest-auth-page .auth-card .muted { margin: 0; color: #737e91; font-size: 10.5px; }
.login-heading { margin-bottom: 11px; }
.login-heading .eyebrow { display: block; margin-bottom: 2px; font-size: 9.5px; }
.login-audience { gap: 7px; margin-bottom: 11px; }
.login-audience > span { justify-content: flex-start; gap: 8px; min-height: 42px; padding: 6px 9px; border-color: #e3e7ef; border-radius: 10px; background: #fafbfe; }
.login-audience > span > i { width: 24px; height: 24px; display: grid; place-items: center; flex: 0 0 24px; border-radius: 7px; color: #5864d9; background: #eef0ff; font-size: 10px; font-style: normal; font-weight: 800; }
.login-audience > span > span { display: grid; line-height: 1.35; }
.login-audience strong { color: #354057; font-size: 10px; }.login-audience small { color: #8490a1; font-size: 8.5px; }
.guest-login-page .form-stack { gap: 8px; }
.guest-login-page .form-stack > label { gap: 3px; font-size: 10.5px; }
.guest-login-page form :where(input:not([type=checkbox]):not([type=radio]),select) { height: 38px; min-height: 38px; }
.guest-login-page input { padding: 7px 10px; }
.captcha-field { gap: 4px !important; }
.captcha-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.captcha-label small { color: #8b95a6; font-size: 8.5px; font-weight: 400; }
.guest-login-page .captcha-image-row { gap: 6px; margin: 0; }
.guest-login-page .captcha-image-row img { width: calc(100% - 62px); height: 48px; flex: 1 1 auto; border-color: #dbe1ed; border-radius: 9px; background: #f7f8fc; }
.guest-login-page .captcha-refresh { width: 56px; min-width: 56px; min-height: 48px; height: 48px; margin: 0; flex-direction: column; gap: 0; padding: 4px; border: 1px solid #e0e4f5; color: #5360d4; background: #f3f4ff; font-size: 8px; box-shadow: none; }
.guest-login-page .captcha-refresh:hover { background: #e9ebff; transform: none; }
.guest-login-page .remember-login { min-height: 33px; grid-template-columns: 18px 1fr auto; column-gap: 6px; padding: 5px 7px; border: 0; background: transparent; }
.guest-login-page .remember-login input { width: 15px; height: 15px; min-height: 15px; }
.guest-login-page .remember-login span { font-size: 9.5px; }
.guest-login-page .remember-login small { grid-column: auto; font-size: 8px; white-space: nowrap; }
.guest-login-page .auth-card form > button[type=submit] { min-height: 40px; margin-top: 0; border-radius: 10px; }
.login-form-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.login-form-footer .login-security-note { min-width: 0; color: #8a94a5; font-size: 8px; text-align: right; }
.login-form-footer .auth-help { flex: 0 0 auto; color: #4f5ccc; font-size: 9px; white-space: nowrap; }
.guest-auth-page .guest-legal { gap: 3px 5px; margin-top: 11px; padding: 9px 0 0; border-color: #edf0f4; }
.guest-auth-page .guest-legal a { min-height: 21px; padding: 2px 5px; color: #8993a3; background: transparent; font-size: 7.8px; }
.guest-auth-page .guest-legal a:hover { color: #4d59cb; background: #f0f2ff; }
.guest-auth-page .guest-install-button { min-height: 36px; margin-top: 8px; }
.guest-auth-page .alert { margin-bottom: 10px; padding: 9px 11px; font-size: 10px; }

@media (max-width: 1180px) {
    .guest-auth-page .guest-shell { grid-template-columns: minmax(480px,1.1fr) minmax(390px,.9fr); }
    .guest-product-preview { width: 88%; }
    .preview-float-reminder { left: -22px; }
    .preview-float-team { right: -20px; }
}

@media (max-height: 720px) and (min-width: 901px) {
    .guest-auth-page .guest-visual { padding-block: 22px; }
    .guest-product-preview { width: min(540px,76%); }
    .preview-body { padding: 10px; }
    .preview-metrics > span { min-height: 46px; }
    .preview-board { margin-top: 7px; }
    .preview-chart { min-height: 78px; }
    .preview-flow > span { padding-block: 4px; }
    .guest-auth-page .guest-copy { margin-top: 10px; }
    .guest-auth-page .guest-copy h2 { font-size: 29px; }
    .guest-auth-page .guest-copy p { line-height: 1.65; }
    .guest-capabilities { margin-top: 7px; }
}

@media (max-width: 900px) {
    .guest-auth-page { overflow: hidden; background: linear-gradient(180deg,#f0f2fb,#f7f8fb); }
    .guest-auth-page .guest-shell { display: block; height: 100dvh; min-height: 0; overflow: hidden; padding: max(8px,env(safe-area-inset-top)) 0 max(8px,env(safe-area-inset-bottom)); }
    .guest-auth-page .auth-card { width: min(480px,calc(100% - 16px)); height: calc(100dvh - 16px); min-height: 0; max-height: none; padding: 22px 24px; overflow-y: auto; justify-content: center; border-radius: 22px; }
    .guest-auth-page .mobile-brand { margin-bottom: 20px; }
    .guest-auth-page .mobile-brand > span:last-child { display: grid; line-height: 1.2; }
    .guest-auth-page .mobile-brand small { color: var(--muted); font-size: 9px; }
}

@media (max-width: 700px) {
    .content { padding: 16px 12px 92px; }
    .page-head { min-height: 0; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
    .page-head h1 { font-size: 21px; }
    .page-head .head-actions { width: 100%; justify-content: stretch; }
    .page-head .head-actions > :where(a,button,form) { flex: 1 1 auto; }
    .panel { padding: 13px; border-radius: 14px; }
    .panel-head { align-items: flex-start; }
    .section-hub { margin-inline: -12px; padding-inline: 12px; }
    .mobile-record-card { border-color: #e1e6ef; border-radius: 14px; box-shadow: var(--shadow); }
}

@media (max-width: 430px) {
    .guest-auth-page .auth-card { width: calc(100% - 12px); height: calc(100dvh - 12px); padding: 18px 17px 14px; border-radius: 19px; }
    .guest-auth-page .mobile-brand { margin-bottom: 15px; }
    .login-audience { grid-template-columns: 1fr 1fr; }
    .login-audience > span { padding: 5px 6px; }
    .guest-login-page .captcha-image-row { display: flex; grid-template-columns: none; }
    .guest-login-page .captcha-image-row img { width: calc(100% - 62px); max-width: none; }
    .guest-login-page .captcha-refresh { width: 56px; }
    .guest-login-page .remember-login { grid-template-columns: 18px 1fr; }
    .guest-login-page .remember-login small { display: none; }
    .login-form-footer { align-items: flex-start; }
    .guest-auth-page .guest-legal { display: flex; gap: 2px 4px; }
    .guest-auth-page .guest-legal a { width: auto; min-height: 20px; padding: 2px 4px; white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
