/* Qanawat's final visual layer. Component behavior lives in app/workspace/kiosk.css.
   Deep red is sampled from the logo; semantic status colors stay distinct. */
:root {
  --brand: #722F37;
  --brand-dark: #54232A;
  --brand-light: #943F49;
  --brand-tint: #FAEFF0;
  --bg: #F6F5F7;
  --card: #FFFFFF;
  --text: #28252C;
  --muted: #6C6570;
  --subtle: #756E79;
  --line: #E9E5E9;
  --line-strong: #CFC5CC;
  --radius: 16px;
  --shadow: 0 2px 4px #2E192003, 0 6px 24px #2E192005;
  --font: 'Carlito', Calibri, 'Segoe UI', system-ui, sans-serif;
  --awning: var(--brand);
}
html, body { background: var(--bg); }
.brand img, .login-logo, .topbar-mark, .story-mark { filter: none; }
.btn { border-radius: 10px; min-height: 40px; transition: background .18s, border-color .18s, box-shadow .18s; }
.btn-primary { background: var(--brand); border-color: var(--brand); box-shadow: 0 3px 8px #722F371A; }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); box-shadow: 0 4px 12px #722F3729; }
.btn:active { transform: translateY(1px); }
.btn:disabled { transform: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid #AC626E; outline-offset: 3px; }
.input { border-color: var(--line-strong); border-radius: 10px; background-color: #fff; }
.input:focus { border-color: var(--brand); outline-color: #722F3740; }
.input::placeholder { color: #79717C; }
.card { padding: 22px; border-color: var(--line); box-shadow: var(--shadow); }
.card-head { margin-bottom: 18px; }
.card-head h3 { font-size: 18px; letter-spacing: -.015em; }
.card-head > a { color: var(--brand); }
.eyebrow { color: var(--brand); }

/* Navigation: a calm white rail, one group per category, and a strong active state. */
@media screen {
  .sidebar { background: #fff; border-right: 1px solid var(--line); }
  .brand { padding: 27px 24px 20px; border: 0; }
  .brand::before { display: none; }
  .brand img { max-width: 184px; }
  .brand-caption { margin-top: 17px; color: var(--brand); font-size: 10px; letter-spacing: .17em; }
  .nav-group { display: block; padding: 20px 12px 8px; color: #817582; font-size: 10px; letter-spacing: .13em; }
  #nav { padding: 0 14px 18px; gap: 0; }
  .nav-section { display: grid; gap: 3px; }
  .nav-item { min-height: 43px; padding: 10px 12px; font-size: 14px; font-weight: 400; border: 0; border-radius: 10px; }
  .nav-item:hover { transform: none; color: var(--brand); background: var(--brand-tint); }
  .nav-item.active { color: #fff; background: var(--brand); box-shadow: 0 4px 10px #722F3717; font-weight: 700; }
  .nav-item.active .nav-icon { color: #fff; }
  .nav-item.active .badge { background: #fff; color: var(--brand); }
  .nav-icon { color: #857A85; }
  .sidebar-foot { margin: 0 18px; padding: 14px 0 18px; border-color: var(--line); }
  .sidebar-foot .btn { color: var(--muted); border-color: var(--line); font-size: 12px; }
  .partner-label { color: var(--muted); font-size: 9px; }
  .partner-label::before { background: var(--brand); }
}
.nav-search { display: flex; gap: 8px; align-items: center; margin: 0 22px 6px; padding: 0 10px; flex: none; min-height: 40px; background: #F7F5F7; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); }
.nav-search:focus-within { border-color: var(--brand); outline: 2px solid #722F3730; }
.nav-search > .ui-icon { width: 16px; height: 16px; }
.nav-search input { width: 100%; min-width: 0; min-height: 40px; background: none; border: 0; color: var(--text); font-size: 13px; }
.nav-search input:focus-visible { outline: none; }
.nav-search kbd { font: inherit; font-size: 11px; border: 1px solid #DED7DE; border-radius: 4px; padding: 0 5px; }
.nav-empty { padding: 20px 12px; font-size: 13px; color: var(--muted); }
.topbar { background: #FFFFFFF2; backdrop-filter: blur(12px); min-height: 76px; border-color: var(--line); padding-left: 32px; padding-right: 32px; }
.topbar h1 { color: var(--text); font-size: 17px; font-weight: 700; letter-spacing: -.015em; }
.topbar .bell { width: 40px; height: 40px; background: #fff; border-color: var(--line); border-radius: 12px; }
.avatar { border: 1px solid #EEDADD; background: var(--brand-tint); color: var(--brand); border-radius: 50%; }
.user-chip { padding-left: 16px; border-left: 1px solid var(--line); }
.user-meta strong { font-size: 13px; }
main#main { padding: 30px 32px 40px; gap: 22px; margin: 0 auto; }
.page-head h2 { font-size: 28px; letter-spacing: -.035em; line-height: 1.2; }
.page-head p { margin-top: 6px; }

/* Overview: distinct header, task shortcuts, then the numbers. */
.dashboard-head { padding: 30px 32px; background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; position: relative; }
.dashboard-head::before { content: ''; position: absolute; top: 0; left: 0; bottom: 0; width: 5px; background: var(--brand); }
.dashboard-head::after { display: none; }
.dashboard-head h2 { font-size: clamp(28px, 2.5vw, 36px); color: var(--text); line-height: 1.15; }
.dashboard-head .eyebrow { color: var(--brand); font-size: 10px; letter-spacing: .12em; margin-bottom: 9px; display: block; }
.dashboard-head p { color: var(--muted); max-width: 540px; font-size: 15px; }
.dashboard-head .actions { gap: 8px; }
.quick-links { gap: 12px; }
.quick-links a { padding: 17px 18px; border-radius: 13px; border-color: var(--line); background: #fff; box-shadow: none; font-size: 14px; }
.quick-links a:hover { background: #FFFAFB; border-color: #C89EA7; box-shadow: 0 4px 14px #722F3708; }
.quick-icon, .kpi-icon { background: var(--brand-tint); color: var(--brand); border-radius: 11px; }
.kpi-grid { gap: 14px; }
.kpi { border: 1px solid var(--line); padding: 21px; gap: 11px; border-radius: 15px; box-shadow: var(--shadow); }
.kpi-label { font-size: 11px; color: var(--muted); letter-spacing: .055em; }
.kpi-value { font-size: 36px; font-variant-numeric: tabular-nums; letter-spacing: -.04em; color: var(--text); line-height: 1.1; }
.kpi-sub { font-size: 12px; line-height: 1.5; }
.kpi-heading { gap: 10px; }
.kpi-accent { background: #FFF8F9; border-color: #E6C9CF; }
.kpi-accent .kpi-value { color: var(--brand); }
.kpi-warn { border-top: 3px solid #D59A43; }
.kpi-bad { border-top: 3px solid var(--bad); }
.kpi-ok { border-top: 3px solid var(--ok); }
.kpi-bad .kpi-value { color: var(--bad); }
.kpi-icon { width: 36px; height: 36px; }
.summary-cell { background: #F8F6F8; border-color: var(--line); border-radius: 10px; padding: 12px 14px; }
.summary-cell.total { background: var(--brand); border-color: var(--brand); }
.summary-cell strong { font-size: 26px; font-variant-numeric: tabular-nums; }
.bar-fill, .col-bar { background: var(--brand); }
.col-bar { border-radius: 5px 5px 0 0; min-height: 2px; }
.col-chart { background-image: repeating-linear-gradient(to top, transparent 0, transparent 44px, #E9E5E980 45px, transparent 46px); }
.health-row { padding: 14px 6px; border-radius: 6px; }
.health-row:hover { background: #FCF8F9; }
.kiosk-alert { margin: 0; }
.filter-bar { border-radius: 13px; border-color: var(--line); background: #fff; padding: 16px; }
.data-table th { background: #F7F5F7; color: #746874; padding-top: 13px; padding-bottom: 13px; font-size: 10px; }
.data-table td { padding-top: 13px; padding-bottom: 13px; border-bottom-color: #F0ECF0; }
.data-table tbody tr:hover td { background: #FCF8F9; }
.table-wrap { border-radius: 10px; }
.tabs { gap: 6px; }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); }
.pill { border-radius: 7px; padding: 4px 9px; font-weight: 700; }
.progress { height: 7px; background: #EEE9EE; }
.push-prompt { background: #fff; border-color: var(--line); margin-left: 32px; margin-right: 32px; }

.attention-card .eyebrow { font-size: 9px; letter-spacing: .12em; display: block; margin-bottom: 5px; }
.attention-caption { color: var(--muted); font-size: 12px; }
.attention-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.attention-item { display: flex; align-items: center; gap: 12px; padding: 15px; border: 1px solid var(--line); border-radius: 12px; color: var(--text); text-decoration: none !important; }
.attention-item:hover { background: #FFF9FA; border-color: #C89EA7; }
.attention-item > span:nth-child(2) { flex: 1; min-width: 0; }
.attention-item strong { display: block; font-size: 14px; }
.attention-item small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.attention-icon { width: 36px; height: 36px; display: grid; place-items: center; background: #FAEFF0; color: var(--brand); border-radius: 10px; flex: none; }
.attention-icon .ui-icon { width: 18px; height: 18px; }
.attention-count { padding: 3px 9px; background: #FFF5E7; color: #8C5611; border-radius: 7px; font-size: 13px; font-weight: 700; }
.attention-item > .ui-icon { width: 15px; height: 15px; color: var(--muted); }
.attention-clear { display: flex; align-items: center; gap: 16px; padding: 14px 0; }
.attention-clear > .ui-icon { background: var(--ok-bg); color: var(--ok); padding: 10px; width: 44px; height: 44px; border-radius: 50%; }
.attention-clear p { color: var(--muted); font-size: 13px; margin-top: 3px; }
@media (max-width: 1100px) { .attention-list { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 380px) { .attention-item { padding: 12px; gap: 8px; } .attention-item small { font-size: 11px; } .attention-item > .ui-icon { display: none; } }

/* Sign-in: brand story on the left, a focused and familiar form on the right. */
.login-page { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); background: #fff; }
.login-story { background: #54232A; color: #fff; padding: clamp(36px, 4.5vw, 76px); gap: 28px; border: 0; justify-content: center; }
.login-story::before { display: block; content: ''; position: absolute; z-index: -1; width: 620px; height: 620px; right: -380px; top: -300px; border: 90px solid #FFFFFF04; border-radius: 50%; pointer-events: none; }
.login-story::after { display: block; content: ''; position: absolute; z-index: -1; width: 450px; height: 450px; left: -320px; bottom: -260px; border: 80px solid #FFFFFF04; border-radius: 50%; pointer-events: none; }
.story-label { display: flex; color: #fff; font-size: 12px; letter-spacing: .12em; gap: 12px; }
.story-mark { width: 35px; height: 35px; padding: 4px; border-radius: 10px; background: #fff; }
.story-edition { margin-left: auto; border-color: #FFFFFF38; color: #E9C9CE; font-size: 8px; padding: 5px 8px; }
.story-copy { margin-top: 20px; }
.login-story .story-eyebrow { color: #E9C9CE; font-size: 10px; letter-spacing: .13em; }
.story-copy h1 { margin-top: 16px; font-size: clamp(40px, 4.4vw, 66px); font-weight: 700; line-height: 1.06; letter-spacing: -.045em; }
.login-story h1 span { color: #E8ADB6; }
.story-copy p { margin-top: 22px; color: #E5CCD0; font-size: 17px; line-height: 1.65; max-width: 410px; }
.story-workflow { max-width: 470px; padding: 21px 24px; background: #FFFFFF08; border: 1px solid #FFFFFF25; border-radius: 18px; box-shadow: 0 16px 35px #28121815; }
.story-workflow-head { color: #E9C9CE; font-size: 9px; letter-spacing: .14em; padding-bottom: 8px; }
.story-step { padding: 13px 0; gap: 15px; }
.story-step + .story-step { border-color: #FFFFFF14; }
.story-step-icon { width: 39px; height: 39px; border: 1px solid #FFFFFF25; background: #FFFFFF09; color: #F3CED4; border-radius: 12px; }
.story-step strong { font-size: 15px; color: #fff; }
.story-step small { color: #DFBFC5; font-size: 12px; margin-top: 3px; }
.story-step-number { color: #D7B2BA; font-size: 11px; }
.story-features { border-top: 0; padding-top: 0; gap: 16px; }
.story-features span { color: #E5CCD0; font-size: 11px; }
.story-features .ui-icon { color: #E5CCD0; }
.story-footer { color: #D4ADB5; font-size: 11px; }
.login-main { padding: 48px clamp(32px, 5vw, 80px); background: #fff; }
.login-card { padding: 0; border: 0; background: none; box-shadow: none; max-width: 386px; gap: 28px; }
.login-logo { max-width: 235px; margin-bottom: 18px; }
.login-heading .eyebrow { color: var(--brand); font-size: 10px; letter-spacing: .13em; }
.login-card h2 { font-size: 42px; letter-spacing: -.045em; margin-top: 9px; }
.login-heading > .muted { color: var(--muted); font-size: 16px; max-width: 340px; }
.login-card .input { border: 1px solid #BDB1BB; background: #FDFCFD; border-radius: 10px; min-height: 54px; }
.login-card .input:hover { border-color: var(--brand-light); }
.login-card .input:focus { background: #fff; border-color: var(--brand); outline: 3px solid #722F3725; outline-offset: 1px; }
.login-card #pw-show { top: 5px; right: 5px; }
.login-card .btn-primary { min-height: 54px; border-radius: 10px; font-size: 16px; }
.login-card .btn-primary:disabled { background: #9B6F77; border-color: #9B6F77; }
.login-status:empty { display: none; }
.login-help { background: #F7F5F7; border: 1px solid var(--line); border-radius: 12px; padding: 16px; color: var(--muted); font-size: 12px; }
.login-help strong { color: var(--text); font-size: 13px; }
.login-help > .ui-icon { color: var(--brand); }
.login-foot { width: 100%; max-width: 386px; margin-top: 28px; color: var(--muted); font-size: 11px; text-align: left; }

/* Field sales: large touch targets and progress without decorative storefronts. */
.kiosk-hero { background: #fff; border-radius: 18px; border-color: var(--line); box-shadow: var(--shadow); }
.kh-awning { height: 5px; background: var(--brand); }
.kh-awning::after { display: none; }
.kh-body { padding: 25px 24px 22px; gap: 9px; }
.kh-body h2, .role-agent .kiosk-hero h2 { font-size: 32px; letter-spacing: -.035em; }
.kh-body .eyebrow { color: var(--brand); font-size: 10px; letter-spacing: .1em; }
.kh-shift { border-top: 1px solid var(--line); background: #FAF8FA; padding: 15px 24px; }
.role-agent .hero-cta, .hero-cta { background: var(--brand); border-radius: 16px; box-shadow: 0 6px 18px #722F3718; }
.hero-cta::after { display: none; }
.hero-cta small { color: #F0DCE0; }
.agent-tiles a { padding: 20px 10px; border-color: var(--line); border-radius: 15px; gap: 8px; }
.agent-tiles a:hover { border-color: #C89EA7; }
.agent-tiles .at-ico { width: 43px; height: 43px; background: var(--brand-tint); color: var(--brand); }
.agent-tiles small { font-size: 12px; }
.agent-day-stats strong { color: var(--brand); }
.agent-breakdown { border-color: var(--line); background: #fff; }
.kd-awning { height: 4px; background: var(--brand); }
.kd-card.is-warn .kd-awning { background: var(--warn); }
.kd-card.is-bad .kd-awning { background: var(--bad); }
.bn-fab-btn { background: var(--brand); box-shadow: 0 5px 15px #722F3730; }
.bottom-nav { border-color: var(--line); background: #fff; }
.bn-item.active { color: var(--brand); }
.bn-fab.active .bn-fab-btn { background: var(--brand-dark); }

@media (min-width: 821px) {
  .backend-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
/* Keep the complete sign-in form comfortable on laptop-height screens. */
#login-geo:empty { display: none; }
@media (min-width: 821px) and (max-height: 850px) {
  .login-story { padding: 32px clamp(32px, 4vw, 64px); gap: 20px; }
  .story-copy { margin-top: 4px; }
  .story-copy h1 { font-size: clamp(38px, 3.8vw, 54px); }
  .story-copy p { font-size: 16px; margin-top: 16px; }
  .story-step { padding: 10px 0; }
  .story-features, .story-footer { display: none; }
  .login-main { padding-top: 30px; padding-bottom: 30px; }
  .login-card { gap: 22px; }
  .login-logo { max-width: 210px; margin-bottom: 4px; }
  .login-card h2 { font-size: 38px; }
  .login-foot { margin-top: 20px; }
}
@media (min-width: 821px) and (max-width: 1100px) {
  .login-story { padding: 32px; }
  .story-copy h1 { font-size: 44px; }
  .story-workflow { padding: 18px; }
  .story-edition, .story-step-number { display: none; }
  main#main { padding: 24px; }
  .backend-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .login-page { display: flex; flex-direction: column; background: #fff; }
  .login-story { padding: max(18px, env(safe-area-inset-top, 0px)) 24px 18px; min-height: 0; gap: 0; }
  .story-label { font-size: 11px; }
  .story-mark { width: 30px; height: 30px; border-radius: 8px; }
  .story-edition { display: inline; font-size: 7px; }
  .story-copy, .login-story .story-workflow, .story-features, .story-footer { display: none; }
  .login-main { padding: 34px max(24px, env(safe-area-inset-right, 0px)) calc(26px + var(--safe-b)) max(24px, env(safe-area-inset-left, 0px)); justify-content: flex-start; }
  .login-card { gap: 25px; }
  .login-logo { max-width: 205px; margin-bottom: 8px; }
  .login-card h2 { font-size: 36px; }
  .login-heading > .muted { font-size: 15px; }
  .login-help { padding: 14px; }
  .login-foot { margin-top: 24px; }
  .topbar { min-height: 64px; padding-left: 12px; padding-right: 12px; }
  .topbar h1 { font-size: 16px; }
  .brand { padding: 24px 22px 18px; }
  .nav-search input { font-size: 16px; min-height: 44px; }
  .nav-item { min-height: 46px; }
  .nav-search kbd { display: none; }
  .sidebar .drawer-user .avatar { color: var(--brand); }
  main#main { padding: 20px 16px calc(var(--bottom-nav-h) + var(--safe-b) + 24px); gap: 17px; }
  .page-head h2 { font-size: 26px; }
  .dashboard-head { padding: 24px 21px; border-radius: 16px; }
  .dashboard-head h2 { font-size: 29px; }
  .dashboard-head p { font-size: 14px; }
  .dashboard-head .actions { width: 100%; }
  .dashboard-head .btn { min-height: 44px; }
  .card { padding: 18px; }
  .card-head { margin-bottom: 15px; }
  .quick-links { display: flex; gap: 9px; }
  .quick-links a { font-size: 12px; padding: 14px 8px; flex: 1 1 0; flex-direction: column; text-align: center; }
  .role-backend .quick-links a { flex: 1 1 0; flex-direction: column; text-align: center; padding: 14px 8px; }
  .role-backend .quick-links a > .ui-icon { display: none; }
  .kpi { padding: 17px; gap: 10px; }
  .kpi-grid { gap: 10px; }
  .kpi-value { font-size: 30px; }
  .kpi-label { font-size: 10px; }
  .kpi-value small { font-size: 12px; }
  .push-prompt { margin: 14px 16px 0; }
  .kh-body { padding: 23px 20px 20px; }
  .kh-body h2, .role-agent .kiosk-hero h2 { font-size: 28px; }
  .kh-shift { padding: 14px 20px; }
  .role-agent .hero-cta { background: var(--brand); padding: 20px; border-radius: 15px; }
  .agent-tiles a { padding: 16px 8px; }
  .bottom-nav .bn-item { min-height: 52px; }
  .filter-bar { padding: 13px; }
}
@media (max-width: 380px) {
  main#main { padding-left: 12px; padding-right: 12px; }
  .login-main { padding: 26px 20px calc(24px + var(--safe-b)); }
  .login-card { gap: 22px; }
  .login-logo { max-width: 180px; }
  .story-edition { display: none; }
  .kpi { padding: 14px; }
  .kpi-value { font-size: 27px; }
  .quick-links { gap: 6px; }
  .quick-links a { padding: 12px 6px; }
  .agent-tiles small { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .nav-search { display: none; }
  .dashboard-head { border: 0; background: #fff; padding: 0; }
  .dashboard-head::before { display: none; }
  .card, .kpi { box-shadow: none; }
}
