/* HamanPayam responsive design system: refined desktop workspace and touch-first mobile UI. */
:root {
  --pn-ink: #17243a;
  --pn-muted: #728098;
  --pn-primary: #5658d8;
  --pn-primary-dark: #4144b7;
  --pn-teal: #14977f;
  --pn-canvas: #f3f6fb;
  --pn-surface: #ffffff;
  --pn-line: #e5eaf2;
  --pn-shadow: 0 14px 38px rgba(28, 42, 70, .075);
  --pn-shadow-soft: 0 5px 18px rgba(28, 42, 70, .055);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { min-width: 320px; color: var(--pn-ink); background: var(--pn-canvas); font-size: 14px; line-height: 1.85; }
body.drawer-open { overflow: hidden; }
button, input, select, textarea { font: inherit; }
a { color: var(--pn-primary); text-underline-offset: 3px; }
a:hover { color: var(--pn-primary-dark); }
::selection { color: #fff; background: var(--pn-primary); }
:focus-visible { outline: 3px solid rgba(86, 88, 216, .4); outline-offset: 3px; }

/* Shared header */
.topbar {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: clamp(12px, 2vw, 28px);
  min-height: 76px; padding: 10px clamp(18px, 4vw, 68px); border-bottom: 1px solid rgba(224, 230, 240, .82);
  background: rgba(255, 255, 255, .94); box-shadow: 0 5px 24px rgba(25, 39, 66, .045); backdrop-filter: blur(18px);
}
.brand { display: inline-flex; align-items: center; gap: 11px; flex: 0 0 auto; color: var(--pn-ink); text-decoration: none; font-size: 18px; font-weight: 900; line-height: 1.2; letter-spacing: -.35px; }
.brand:hover { color: var(--pn-ink); }
.brand-mark { display: grid; place-items: center; width: 43px; height: 43px; border: 1px solid rgba(255,255,255,.44); border-radius: 15px; color: #fff; background: linear-gradient(145deg, #7778ef, #5253ce 60%, #287f9b); box-shadow: 0 8px 18px rgba(83, 84, 205, .24); font-size: 19px; }
.brand > span { display: flex; flex-direction: column; gap: 4px; }
.brand small { color: #8994a8; font-size: 9px; font-weight: 600; letter-spacing: 0; }
.workspace-top-context { display: flex; flex-direction: column; min-width: 0; margin-inline-start: 5px; padding-inline-start: 22px; border-inline-start: 1px solid var(--pn-line); line-height: 1.45; }
.workspace-top-context small { color: #8a96aa; font-size: 9px; }
.workspace-top-context strong { max-width: 290px; overflow: hidden; color: #34415a; font-size: 12px; font-weight: 850; text-overflow: ellipsis; white-space: nowrap; }
.top-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; min-width: 0; margin-inline-start: auto; }
.top-link { color: #5f6c82; font-size: 12px; font-weight: 750; text-decoration: none; }
.top-link:hover { color: var(--pn-primary); }
.user-label { max-width: 230px; overflow: hidden; padding: 6px 12px; border: 1px solid var(--pn-line); border-radius: 99px; background: #f8f9fc; color: #66738a; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.top-actions form { margin: 0; }
.public-nav { display: flex; align-items: center; justify-content: center; gap: 4px; margin-inline: auto; }
.public-nav a { padding: 9px 12px; border-radius: 11px; color: #59667d; font-size: 11px; font-weight: 750; text-decoration: none; white-space: nowrap; transition: background .18s ease, color .18s ease; }
.public-nav a:hover, .public-nav a.active, .public-nav a[aria-current="page"] { color: var(--pn-primary); background: #f0f0ff; box-shadow: inset 0 0 0 1px #e1e1ff; }
.public-nav-toggle, .mobile-menu { display: none; align-items: center; justify-content: center; flex: 0 0 auto; width: 44px; height: 44px; border: 1px solid var(--pn-line); border-radius: 13px; color: #45536b; background: #fff; box-shadow: var(--pn-shadow-soft); cursor: pointer; }
.public-nav-toggle { gap: 8px; width: auto; padding-inline: 14px; font-size: 11px; font-weight: 800; }
.public-nav-toggle span { font-size: 16px; }
.public-route .top-actions .btn { min-height: 42px; }

/* Desktop workspace shell */
.shell { grid-template-columns: 270px minmax(0, 1fr); max-width: 1920px; min-height: calc(100vh - 76px); margin: 0 auto; }
.sidebar {
  position: sticky; top: 76px; width: auto; height: calc(100vh - 76px); padding: 22px 15px 18px;
  border: 0; border-inline-start: 1px solid rgba(255,255,255,.08); color: #e9edf7;
  background: radial-gradient(ellipse at 85% 3%, rgba(95, 99, 214, .26), transparent 34%), linear-gradient(165deg, #17243b, #101a2d 70%, #111d32);
  box-shadow: 8px 0 28px rgba(20, 32, 54, .09);
}
.sidebar-heading { padding: 5px 8px 19px; margin-bottom: 8px; border-bottom-color: rgba(255,255,255,.12); }
.sidebar-avatar { width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.25); border-radius: 15px; box-shadow: 0 7px 18px rgba(0,0,0,.18); }
.sidebar-heading strong { color: #fff; font-size: 12px; }
.sidebar-heading small { color: #aab6cc; }
.nav-section-label { margin: 16px 10px 5px; color: #8291ad; font-size: 9px; font-weight: 800; letter-spacing: .25px; }
.sidebar-link { position: relative; min-height: 45px; padding: 9px 11px; border: 1px solid transparent; border-radius: 12px; color: #c2ccdd; font-size: 11px; font-weight: 700; }
.sidebar-link i { flex: 0 0 27px; width: 27px; height: 27px; border-radius: 9px; color: #aeb5ff; background: rgba(255,255,255,.08); font-size: 14px; }
.sidebar-link:hover, .sidebar-link:focus { color: #fff; background: rgba(255,255,255,.09); border-color: rgba(255,255,255,.05); transform: translateX(-2px); }
.sidebar-link.active { color: #fff; background: linear-gradient(100deg, rgba(105,105,231,.24), rgba(68,183,166,.12)); border-color: rgba(145,148,255,.22); box-shadow: inset -3px 0 #8183ff; }
.sidebar-link.active i { color: #fff; background: rgba(124,127,255,.31); }
.side-note { margin-top: auto; padding: 13px 14px; border: 1px solid rgba(255,255,255,.11); border-radius: 14px; color: #b6c2d5; background: rgba(255,255,255,.055); }
.side-note strong { color: #e8edfa; font-size: 10px; }
.side-note p { margin: 3px 0 0; color: #aab6cc; font-size: 9px; line-height: 1.9; }
.main { max-width: none; width: 100%; min-height: calc(100vh - 76px); padding: clamp(26px, 3vw, 48px) clamp(22px, 3.6vw, 58px) 24px; }
.foot { padding: 26px 10px 8px; color: #8b96a9; font-size: 10px; }
.sidebar-backdrop { display: none; }

/* Page headings, surfaces and controls */
.heading { align-items: flex-start; flex-wrap: wrap; gap: 18px; margin: 0 0 25px; }
.heading h1, .sms-inbox-heading h1 { color: #1d2940; font-size: clamp(25px, 2.25vw, 34px); font-weight: 900; line-height: 1.45; letter-spacing: -.65px; }
.heading h1 { margin: 3px 0 3px; }
.heading > div > small, .heading small, .section-intro small { color: var(--pn-primary); font-size: 10px; font-weight: 850; }
.heading .subheading, .subheading { margin: 3px 0 0; color: var(--pn-muted); font-size: 13px; }
.panel, .stats article { border: 1px solid var(--pn-line); border-radius: 19px; background: var(--pn-surface); box-shadow: var(--pn-shadow-soft); }
.panel { padding: clamp(18px, 2vw, 26px); }
.panel h2 { color: #283650; font-size: 16px; font-weight: 850; letter-spacing: -.2px; }
.panel > p, .panel p.muted { color: var(--pn-muted); }
.btn { min-height: 44px; padding: 9px 17px; border-radius: 12px; font-size: 12px; font-weight: 800; line-height: 1.4; transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { border-color: transparent; color: #fff; background: linear-gradient(135deg, #6c6de9, #5153ce); box-shadow: 0 8px 19px rgba(83, 84, 205, .2); }
.btn-primary:hover, .btn-primary:focus { border-color: transparent; color: #fff; background: linear-gradient(135deg, #5e60d9, #4144b7); box-shadow: 0 11px 23px rgba(83, 84, 205, .26); }
.btn-outline { border-color: #dfe5ef; color: #53617a; background: #fff; }
.btn-outline:hover { border-color: #c7c9f4; color: var(--pn-primary); background: #f8f8ff; }
.btn-danger { border-color: #f1d8dc; color: #b34759; background: #fff9fa; }
.form-control, .form-select { min-height: 48px; padding: 10px 14px; border: 1px solid #dfe5ef; border-radius: 12px; color: var(--pn-ink); background-color: #fff; font-size: 13px; transition: border-color .15s ease, box-shadow .15s ease; }
.form-control::placeholder { color: #a0a9b8; }
.form-control:focus, .form-select:focus { border-color: #8a8af0; box-shadow: 0 0 0 4px rgba(86,88,216,.11); }
.auth label, .panel label, .form-grid label { margin: 8px 0 6px; color: #4b5870; font-size: 12px; font-weight: 800; }
.alert, .success, .error { border-radius: 12px; }
.success, .alert-success { padding: 11px 14px; border: 1px solid #c8ebdc; color: #19785e; background: #f0fbf6; }
.error { color: #b54452; }
.table-wrap { border: 1px solid var(--pn-line); border-radius: 15px; background: #fff; box-shadow: var(--pn-shadow-soft); overscroll-behavior-inline: contain; }
.table-wrap table { min-width: 680px; margin: 0; color: #36445c; font-size: 12px; }
.table-wrap th { color: #77849a; background: #f7f8fb; font-size: 10px; font-weight: 850; white-space: nowrap; }
.table-wrap td, .table-wrap th { padding: 12px 14px; vertical-align: middle; }
.table-wrap tbody tr:hover { background: #fafaff; }
.table-wrap td { overflow-wrap: anywhere; }
.pagination, .sms-pagination { gap: 10px; }

/* Workspace dashboard */
.dashboard-heading { align-items: center; }
.dashboard-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; flex-wrap: wrap; max-width: 590px; padding: 10px 12px; border: 1px solid var(--pn-line); border-radius: 15px; background: rgba(255,255,255,.84); box-shadow: var(--pn-shadow-soft); }
.auto-refresh-choice { display: inline-flex; align-items: center; gap: 7px; margin: 0; color: #66748a; font-size: 10px; font-weight: 750; }
.auto-refresh-choice input { width: 16px; height: 16px; accent-color: var(--pn-primary); }
.refresh-status { flex-basis: 100%; color: #8792a5; font-size: 9px; text-align: end; }
.dashboard-notice, .plan-required-banner { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0 0 18px; padding: 16px 19px; border: 1px solid #e5e8ff; border-radius: 16px; background: linear-gradient(100deg, #f8f8ff, #fff); box-shadow: var(--pn-shadow-soft); }
.dashboard-notice p, .plan-required-banner p { margin: 2px 0 0; color: #728098; font-size: 11px; }
.dashboard-notice small { color: var(--pn-primary); font-weight: 850; }
.plan-required-banner { border-color: #f1e4c2; background: linear-gradient(105deg, #fffaf0, #fff); }
.plan-required-banner b { color: #604e2d; }
.plan-usage { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 24px; margin: 0 0 20px; padding: 14px 17px; border: 1px solid var(--pn-line); border-radius: 15px; background: #fff; box-shadow: var(--pn-shadow-soft); color: #6e7b91; font-size: 11px; }
.plan-usage b { color: #283650; }
.plan-usage a { margin-inline-start: auto; font-weight: 800; text-decoration: none; }
.stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 24px; }
.stats article { position: relative; min-width: 0; min-height: 132px; padding: 20px 21px; overflow: hidden; }
.stats article::after { position: absolute; top: 19px; right: 0; width: 3px; height: 35px; border-radius: 4px 0 0 4px; background: linear-gradient(var(--pn-primary), #46b99e); content: ""; }
.stats span { color: #718096; font-size: 11px; font-weight: 750; }
.stats strong { color: #202d45; font-size: 27px; font-weight: 900; letter-spacing: -.5px; }
.stats small { color: #8e99aa; font-size: 10px; }
.sms-dashboard-section { margin-top: 26px; }
.sms-section-heading { margin-bottom: 14px; }
.sms-section-heading small { color: var(--pn-primary); font-size: 10px; font-weight: 850; }
.sms-section-heading h2 { color: #22314a; font-size: 20px; font-weight: 900; }
.dashboard-sms-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.dashboard-sms-card { padding: 17px; }
.dashboard-sms-text { font-size: 13px; }

/* Raw SMS inbox */
.sms-inbox-page { max-width: 1260px; }
.sms-inbox-hero { min-height: 190px; padding: clamp(24px, 3.5vw, 38px); border: 0; border-radius: 25px; color: #fff; background: radial-gradient(circle at 10% 0%, rgba(63, 185, 166, .22), transparent 28%), radial-gradient(circle at 87% 0%, rgba(129, 122, 255, .38), transparent 34%), linear-gradient(118deg, #18243c, #202c50 64%, #26396a); box-shadow: 0 19px 42px rgba(24, 35, 65, .18); }
.sms-inbox-heading h1 { color: #fff; font-size: clamp(26px, 2.4vw, 34px); }
.sms-inbox-heading p { max-width: 650px; color: #c0cade; font-size: 12px; }
.sms-inbox-kicker { border: 1px solid rgba(255,255,255,.12); color: #baf3de; background: rgba(31, 178, 132, .15); }
.sms-live-dot { box-shadow: 0 0 0 4px rgba(61,205,153,.18); }
.sms-total-card { min-width: 196px; border: 1px solid rgba(255,255,255,.17); border-radius: 18px; color: #fff; background: rgba(255,255,255,.09); box-shadow: 0 12px 25px rgba(6,15,35,.12); backdrop-filter: blur(12px); }
.sms-total-icon { color: #fff; background: linear-gradient(140deg, rgba(129,123,255,.65), rgba(42,173,158,.45)); }
.sms-total-card strong { font-size: 25px; }
.sms-total-card small { color: #c4cee0; font-size: 10px; }
.sms-toolbar { align-items: center; gap: 20px; padding: 19px 21px !important; border-radius: 17px; }
.sms-search-form label { color: #45536b; font-size: 11px; font-weight: 850; }
.sms-card { padding: 20px 22px; border-color: #e7ebf2; border-radius: 19px; box-shadow: 0 7px 22px rgba(29,43,68,.055); transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease; }
.sms-card:hover { border-color: #d8d9f5; box-shadow: 0 14px 30px rgba(29,43,68,.085); transform: translateY(-2px); }
.sms-card-header { padding-bottom: 15px; }
.sms-sender-avatar { width: 43px; height: 43px; border: 1px solid #e3e3fb; border-radius: 14px; background: linear-gradient(145deg, #f0efff, #e9f8f5); font-size: 10px; }
.sms-sender-meta strong { color: #23314a; font-size: 13px; }
.sms-sender-meta span { margin-top: 2px; font-size: 10px; }
.sms-received-time { color: #7f8ba0; font-size: 10px; }
.sms-body-heading { color: #53627a; font-size: 11px; }
.sms-copy-button { min-height: 38px; padding: 7px 12px; border-radius: 9px; color: #514fc7; background: #fafaff; }
.sms-raw-text { min-height: 62px; padding: 17px 18px; border: 1px solid #e9edf4; border-inline-start: 3px solid #6869df; border-radius: 13px; color: #202c42; background: #f8f9fc; font-size: 14px; line-height: 2.05; }
.sms-empty { padding: 54px 22px !important; border-style: dashed; box-shadow: none; }
.sms-empty-icon { width: 56px; height: 56px; border-radius: 18px; }
.sms-empty h2 { font-size: 18px; }
.sms-empty p { font-size: 12px; }
.sms-pagination { padding: 23px 0; }
.sms-page-count { font-size: 11px; }

/* Public pages */
.public { max-width: 1500px; padding: clamp(24px, 4vw, 55px) clamp(16px, 4vw, 62px); }
.hero { position: relative; grid-template-columns: minmax(0, 1.05fr) minmax(330px, .95fr); gap: clamp(26px, 5vw, 76px); align-items: center; margin: 4px 0 20px; padding: clamp(28px, 5vw, 66px); border: 1px solid #e5e7f7; border-radius: 30px; background: radial-gradient(ellipse at 85% 2%, #e9e9ff 0, transparent 33%), radial-gradient(ellipse at 1% 100%, #e4f6f3 0, transparent 31%), linear-gradient(130deg, #fff, #f9faff); box-shadow: var(--pn-shadow); }
.hero h1 { max-width: 740px; color: #1b2942; font-size: clamp(32px, 4vw, 52px); line-height: 1.6; }
.hero p { max-width: 600px; color: #6c7890; font-size: 14px; line-height: 2.1; }
.hero-copy > small { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border: 1px solid #e5e5fa; border-radius: 99px; background: rgba(255,255,255,.78); font-size: 10px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 23px; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.hero-trust span { padding: 6px 10px; border: 1px solid #e9edf3; border-radius: 99px; color: #637188; background: rgba(255,255,255,.76); font-size: 9px; }
.hero-visual { min-height: 340px; }
.mock { position: relative; z-index: 2; width: min(100%, 370px); padding: 24px; border: 1px solid rgba(255,255,255,.86); border-radius: 24px; background: rgba(255,255,255,.91); box-shadow: 0 26px 65px rgba(55,62,125,.18); backdrop-filter: blur(15px); }
.mock-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 15px; color: #fff; background: linear-gradient(140deg,#7779ee,#4c9dba); font-size: 20px; }
.mock-message-meta { display: flex; align-items: center; gap: 12px; }
.mock-message-meta .mock-icon { flex: 0 0 46px; }
.mock-message-meta > div { display: flex; flex-direction: column; gap: 1px; }
.mock-message-meta small { color: #78869c; font-size: 10px; }
.mock-message-meta strong { color: #1d2b43; font-size: 17px; }
.mock-sms { margin: 17px 0 0; padding: 14px 15px; border: 1px solid #e8ebf2; border-inline-start: 3px solid var(--pn-primary); border-radius: 12px; color: #2b3850; background: #f8f9fc; font: 11px/2 Vazir,Vazirmatn,Tahoma,Arial,sans-serif; text-align: start; white-space: pre-wrap; overflow-wrap: anywhere; unicode-bidi: plaintext; }
.mock > small { display: block; margin-top: 14px; color: #78869c; font-size: 10px; }
.mock > strong { display: block; margin: 2px 0 12px; color: #1d2b43; font-size: 20px; }
.mock-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid #edf0f5; font-size: 10px; }
.mock-row span { color: #8691a3; }
.mock-row b { color: #36445e; text-align: left; }
.mock-detected { line-height: 1.9; }
.mock-state { display: flex; align-items: center; gap: 8px; margin-top: 13px; padding: 9px 11px; border-radius: 10px; color: #187a60; background: #effaf5; font-size: 10px; }
.features-section { padding: 64px 3px 20px; }
.section-intro { max-width: 760px; margin: 0 auto 24px; text-align: center; }
.section-intro h2 { margin: 4px 0 8px; color: #202e47; font-size: clamp(22px, 2.6vw, 30px); font-weight: 900; }
.section-intro p { color: #78849a; font-size: 12px; }
.features { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.feature-card { min-height: 205px; padding: 24px; transition: transform .18s ease, box-shadow .18s ease; }
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--pn-shadow); }
.feature-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; color: var(--pn-primary); background: #f0f0ff; font-size: 17px; font-weight: 900; }
.feature-card h2 { margin: 13px 0 6px; font-size: 15px; }
.feature-card p { margin: 0; color: #748198; font-size: 11px; line-height: 2; }
.home-flow { padding: 50px 4px 15px; }
.flow-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
.flow-grid article { min-height: 164px; padding: 22px; border-color: var(--pn-line); border-radius: 18px; box-shadow: var(--pn-shadow-soft); }
.flow-grid article > span { width: 35px; height: 35px; border: 1px solid #e0e1fa; border-radius: 12px; }
.flow-grid h3 { color: #283650; font-size: 14px; }
.flow-grid p { color: #748198; font-size: 11px; }
.home-truth { border-radius: 23px; box-shadow: var(--pn-shadow-soft); }
.truth-note { padding: 20px; border: 1px solid #e7eaf4; border-radius: 17px; background: rgba(255,255,255,.8); }
.truth-note strong { color: #293751; font-size: 13px; }
.truth-note a, .text-link { font-size: 11px; font-weight: 850; }
.home-cta { padding: 28px 32px; border-radius: 22px; box-shadow: 0 16px 35px rgba(38,40,105,.19); }
.home-cta h2 { font-size: 20px; }
.public-disclaimer { font-size: 11px; }
.info-hero { border-radius: 26px; box-shadow: var(--pn-shadow); }
.info-hero h1 { line-height: 1.5; }
.info-grid, .coverage-grid, .security-grid { gap: 16px; }
.info-card, .coverage-card, .security-card { border-radius: 18px; box-shadow: var(--pn-shadow-soft); }
.info-callout, .info-endnote, .caution { border-radius: 15px; }
.auth { width: min(calc(100% - 32px), 520px); margin: clamp(30px, 7vh, 78px) auto; padding: clamp(24px, 4vw, 36px); border: 1px solid var(--pn-line); border-radius: 23px; background: #fff; box-shadow: 0 24px 70px rgba(29,42,68,.12); }
.auth > small { display: inline-block; margin-bottom: 4px; color: var(--pn-primary); font-size: 10px; font-weight: 850; }
.auth h1 { margin: 3px 0 18px; color: #1d2b43; font-size: 25px; font-weight: 900; }
.auth form { gap: 10px; }
.auth .full { min-height: 49px; margin-top: 7px; }
.auth > p { margin: 18px 0 0; color: #78849a; font-size: 11px; text-align: center; }
.admin-login-page { background: radial-gradient(ellipse at 100% 0%, #f0efff, transparent 44%), #fff; }
.public-footer { margin-top: 12px; border-top: 1px solid var(--pn-line); background: #fff; }
.profile-heading { align-items: center; }
.profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.profile-card { position: relative; min-width: 0; margin: 0; padding: 24px; }
.profile-card-mark { display: grid; place-items: center; width: 43px; height: 43px; margin-bottom: 14px; border: 1px solid #e2e3fb; border-radius: 14px; color: var(--pn-primary); background: linear-gradient(145deg,#f2f1ff,#ecf8f5); font-size: 18px; }
.profile-clock-mark { color: #188773; background: linear-gradient(145deg,#e9faf4,#eef9f9); border-color: #d7f1e8; }
.profile-lock-mark { color: #8b5fb6; background: linear-gradient(145deg,#f6efff,#f0f2ff); border-color: #ebe1f8; }
.profile-card-kicker { color: #8692a6; font-size: 10px; font-weight: 800; }
.profile-card h2 { margin: 2px 0 14px; font-size: 18px; }
.profile-details { display: grid; gap: 8px; margin: 0; }
.profile-details > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-width: 0; padding: 10px 12px; border: 1px solid #edf0f5; border-radius: 11px; background: #fafbfc; }
.profile-details dt { color: #7d899c; font-size: 10px; font-weight: 700; }
.profile-details dd { max-width: 65%; margin: 0; overflow-wrap: anywhere; color: #34425a; font-size: 11px; font-weight: 800; }
.profile-status-pill { display: inline-flex; padding: 3px 9px; border: 1px solid #ccebdd; border-radius: 99px; color: #18795e; background: #f0fbf6; font-size: 9px; }
.profile-card-description { min-height: 42px; margin: -7px 0 14px; color: #77849a; font-size: 11px; line-height: 1.9; }
.profile-settings-form { display: grid; gap: 9px; }
.profile-settings-form label { margin: 0; }
.profile-settings-form .btn { margin-top: 6px; }
.profile-password-card { grid-column: 1 / -1; }
.profile-password-form { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)) auto; align-items: end; gap: 12px; }
.profile-password-form > div { min-width: 0; }
.profile-password-form label { display: block; margin: 0 0 6px; }
.profile-password-form .btn { min-width: 150px; }
.profile-status { margin-bottom: 16px; }

/* Admin workspace */
.admin-shell { grid-template-columns: 272px minmax(0,1fr); max-width: 1920px; margin: 0 auto; background: transparent; }
.admin-sidebar { top: 76px; width: auto; height: calc(100vh - 76px); padding: 23px 15px 20px; background: radial-gradient(ellipse at 85% 0%, rgba(109,113,225,.25), transparent 32%), linear-gradient(165deg,#17243b,#101a2d); }
.admin-brand-block { padding: 3px 8px 19px; margin-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,.12); }
.admin-brand-mark { border-radius: 14px; box-shadow: 0 7px 18px rgba(0,0,0,.2); }
.admin-nav-caption { margin: 15px 10px 4px; color: #8291ad; font-size: 9px; font-weight: 850; }
.admin-nav-link { min-height: 45px; padding: 9px 11px; border: 1px solid transparent; border-radius: 12px; color: #c3cddd; font-size: 11px; transition: background .18s, color .18s, transform .18s; }
.admin-nav-link:hover { color: #fff; background: rgba(255,255,255,.09); transform: translateX(-2px); }
.admin-nav-link.active { border-color: rgba(145,148,255,.22); color: #fff; background: linear-gradient(100deg,rgba(105,105,231,.24),rgba(68,183,166,.12)); box-shadow: inset -3px 0 #8183ff; }
.admin-main { padding: 0 clamp(20px,3.5vw,52px) 30px; }
.admin-pagebar { min-height: 78px; margin: 0 0 23px; border-bottom-color: var(--pn-line); }
.admin-pagebar strong { color: #263550; font-size: 17px; }
.admin-avatar { border-radius: 14px; box-shadow: 0 8px 18px rgba(83,84,205,.18); }
.admin-content { max-width: 1500px; margin: 0 auto; }
.admin-intro { border-radius: 22px; box-shadow: var(--pn-shadow); }
.admin-metric-grid { gap: 15px; }
.admin-metric { border: 1px solid var(--pn-line); border-radius: 18px; box-shadow: var(--pn-shadow-soft); }
.admin-module { min-height: 98px; border: 1px solid var(--pn-line); border-radius: 16px; background: #fff; box-shadow: var(--pn-shadow-soft); transition: transform .17s, box-shadow .17s, border-color .17s; }
.admin-module:hover { border-color: #d5d5f2; box-shadow: var(--pn-shadow); transform: translateY(-2px); }
.admin-route .panel { border-radius: 18px; box-shadow: var(--pn-shadow-soft); }
.admin-route .heading h1 { font-size: clamp(24px,2.2vw,31px); }
.admin-route .form-control, .admin-route .form-select { min-height: 47px; border-radius: 11px; }
.admin-alert { border-radius: 13px; }
.cms-page-link, .cms-section-card, .admin-directory-card { border-radius: 16px; }
.admin-footer { color: #929caf; }

/* Medium screens */
@media (max-width: 1120px) {
  .topbar { gap: 13px; }
  .public-nav { gap: 1px; }
  .public-nav a { padding-inline: 8px; font-size: 10px; }
  .shell { grid-template-columns: 246px minmax(0,1fr); }
  .admin-shell { grid-template-columns: 246px minmax(0,1fr); }
  .main { padding-inline: 28px; }
  .stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .admin-metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 920px) {
  .public-nav { display: none; }
  .public-nav-toggle { display: inline-flex; }
  .public-nav.open { position: absolute; top: calc(100% + 7px); right: 14px; left: 14px; z-index: 55; display: grid; gap: 4px; padding: 9px; border: 1px solid var(--pn-line); border-radius: 16px; background: #fff; box-shadow: 0 18px 45px rgba(25,39,66,.16); }
  .public-nav.open a { padding: 11px 13px; border-radius: 10px; font-size: 12px; }
  .shell, .admin-shell { display: block; min-height: calc(100vh - 68px); }
  .topbar { min-height: 68px; }
  .workspace-route .mobile-menu, .admin-route .mobile-menu { display: inline-flex; }
  .sidebar, .admin-sidebar { position: fixed; top: 68px; right: 0; bottom: 0; z-index: 80; width: min(320px, 88vw); height: auto; overflow-y: auto; transform: translateX(105%); transition: transform .24s cubic-bezier(.2,.8,.2,1); box-shadow: -18px 0 45px rgba(15,25,45,.3); }
  .sidebar.open, .admin-sidebar.open { transform: translateX(0); }
  .sidebar-backdrop { position: fixed; inset: 68px 0 0; z-index: 70; display: block; border: 0; background: rgba(13,22,39,.52); opacity: 0; pointer-events: none; transition: opacity .2s ease; }
  .sidebar-backdrop.open { opacity: 1; pointer-events: auto; }
  .main { min-height: calc(100vh - 68px); padding: 28px clamp(18px,4vw,38px) 25px; }
  .admin-main { padding-inline: clamp(18px,4vw,38px); }
  .admin-sidebar-backdrop { display: block; }
  .hero { grid-template-columns: 1fr; gap: 18px; }
  .hero-copy { max-width: 820px; }
  .hero-visual { min-height: 300px; }
  .hero-visual .mock { margin: 0 auto; }
  .feature-card { min-height: 185px; }
  .dashboard-sms-list { grid-template-columns: 1fr; }
}

/* Touch-first mobile */
@media (max-width: 680px) {
  html { scroll-padding-top: 72px; }
  .topbar { min-height: 62px; gap: 9px; padding: 8px 12px; }
  .brand { gap: 8px; font-size: 15px; }
  .brand-mark { width: 38px; height: 38px; border-radius: 13px; font-size: 17px; }
  .brand small { display: none; }
  .workspace-top-context { margin-inline-start: auto; padding-inline-start: 10px; }
  .workspace-top-context small { display: none; }
  .workspace-top-context strong { max-width: 115px; font-size: 10px; }
  .mobile-menu { width: 42px; height: 42px; border-radius: 12px; font-size: 18px; }
  .public-nav-toggle { min-height: 42px; padding-inline: 10px; font-size: 10px; }
  .top-actions { gap: 6px; }
  .top-actions .user-label, .workspace-route .top-actions .top-link { display: none; }
  .admin-route .admin-top-label, .admin-route .top-actions .top-link { display: none; }
  .workspace-route .support-mode-label { display: none; }
  .top-actions .btn { min-height: 42px; padding: 7px 10px; border-radius: 10px; font-size: 10px; }
  .public-route .top-actions .top-link { display: inline-flex; padding: 6px 4px; font-size: 10px; }
  .public-route .top-actions .btn { padding-inline: 11px; }
  .shell, .admin-shell { min-height: calc(100vh - 62px); }
  .sidebar, .admin-sidebar { top: 62px; width: min(310px, 88vw); }
  .sidebar-backdrop { inset-block-start: 62px; }
  .main { min-height: calc(100vh - 62px); padding: 21px 15px 20px; }
  .admin-main { padding: 0 15px 22px; }
  .admin-route .topbar { min-height: 62px; }
  .heading { margin-bottom: 18px; gap: 12px; }
  .profile-heading > .btn { width: 100%; }
  .heading h1, .sms-inbox-heading h1 { font-size: 24px; }
  .heading .subheading, .subheading { font-size: 11px; }
  .panel { padding: 17px; border-radius: 16px; }
  .panel h2 { font-size: 15px; }
  .btn { min-height: 44px; padding-inline: 13px; }
  .form-control, .form-select { min-height: 47px; }
  .stats { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-bottom: 17px; }
  .stats article { min-height: 105px; padding: 14px; border-radius: 15px; }
  .stats span { font-size: 10px; }
  .stats strong { font-size: 21px; }
  .stats article::after { top: 15px; height: 27px; }
  .dashboard-heading { align-items: stretch; }
  .dashboard-actions { max-width: none; justify-content: flex-start; padding: 10px; }
  .refresh-status { text-align: start; }
  .dashboard-notice, .plan-required-banner { align-items: flex-start; flex-direction: column; padding: 14px; }
  .plan-required-banner .btn { width: 100%; }
  .plan-usage { align-items: flex-start; gap: 8px; flex-direction: column; padding: 12px 14px; }
  .plan-usage a { margin-inline-start: 0; }
  .sms-inbox-hero { align-items: stretch; gap: 16px; min-height: 0; padding: 22px 19px; border-radius: 20px; }
  .sms-inbox-heading p { font-size: 11px; }
  .sms-total-card { min-width: 0; width: 100%; }
  .sms-toolbar { align-items: stretch; gap: 12px; padding: 14px !important; }
  .sms-search-row { flex-wrap: wrap; }
  .sms-search-row .form-control { flex-basis: 100%; }
  .sms-search-row .btn { flex: 1; }
  .sms-card { padding: 14px; border-radius: 16px; }
  .sms-card-header { align-items: flex-start; gap: 8px; }
  .sms-received-time { max-width: 115px; white-space: normal; text-align: left; }
  .sms-raw-text { padding: 13px; font-size: 12px; line-height: 2; }
  .sms-pagination { justify-content: space-between; gap: 6px; }
  .sms-pagination .btn { min-height: 40px; padding: 6px 9px; font-size: 9px; }
  .sms-page-count { font-size: 9px; white-space: nowrap; }
  .public { padding: 17px 13px 28px; }
  .hero { gap: 10px; margin: 0 0 13px; padding: 24px 19px; border-radius: 22px; }
  .hero h1 { font-size: clamp(27px, 8vw, 36px); line-height: 1.65; }
  .hero p { font-size: 12px; line-height: 2; }
  .hero-actions { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 18px; }
  .hero-actions .btn { width: 100%; }
  .hero-trust { gap: 6px; }
  .hero-trust span { font-size: 8px; }
  .hero-visual { min-height: 260px; }
  .mock { padding: 19px; border-radius: 19px; }
  .features-section { padding-top: 40px; }
  .features { grid-template-columns: 1fr; gap: 11px; }
  .feature-card { min-height: 0; padding: 19px; }
  .home-flow { padding-top: 38px; }
  .flow-grid { grid-template-columns: 1fr; gap: 10px; }
  .flow-grid article { min-height: 0; padding: 18px; }
  .home-truth { grid-template-columns: 1fr; gap: 12px; margin: 19px 0; padding: 17px; border-radius: 18px; }
  .home-cta { align-items: stretch; flex-direction: column; gap: 13px; padding: 21px; border-radius: 18px; }
  .home-cta .btn { width: 100%; }
  .info-hero { margin-bottom: 15px; padding: 22px 18px; border-radius: 20px; }
  .info-hero h1 { font-size: 25px; }
  .info-hero > p { font-size: 11px; }
  .info-grid, .coverage-grid, .security-grid { grid-template-columns: 1fr; gap: 10px; }
  .auth { width: 100%; margin: 25px auto; padding: 22px 18px; border-radius: 19px; }
  .auth h1 { font-size: 22px; }
  .public-footer-inner { gap: 17px; }
  .public-footer-links { gap: 8px 14px; }
  .admin-pagebar { min-height: 68px; margin-bottom: 17px; }
  .admin-pagebar strong { font-size: 14px; }
  .admin-metric-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .admin-metric { min-height: 120px; padding: 14px; }
  .admin-section-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
  .admin-module-grid { grid-template-columns: 1fr; gap: 9px; }
  .admin-module { min-height: 78px; }
  .cms-admin-layout, .cms-section-grid, .admin-user-manage-grid { grid-template-columns: 1fr; }
  .cms-page-workspace { min-width: 0; }
  .cms-page-link { min-width: 0; }
  .admin-intro { align-items: flex-start; flex-direction: column; padding: 19px; }
  .admin-intro .btn { width: 100%; }
  .admin-directory-grid { grid-template-columns: 1fr; }
  .device-create { grid-template-columns: 1fr; }
  .device-create .btn { width: 100%; }
  .devices { grid-template-columns: 1fr; gap: 11px; }
  .actions { flex-wrap: wrap; gap: 7px; }
  .actions form, .actions .btn { flex: 1 1 auto; }
  .columns { grid-template-columns: 1fr; gap: 12px; }
  .profile-grid { grid-template-columns: 1fr; gap: 11px; }
  .profile-password-card { grid-column: auto; }
  .profile-password-form { grid-template-columns: 1fr; gap: 9px; }
  .profile-password-form .btn { width: 100%; }
  .plan-grid { grid-template-columns: 1fr; gap: 12px; }
  .plan-card { min-height: 0; padding: 20px; }
  .table-wrap { margin-inline: -2px; border-radius: 12px; }
  .table-wrap table { min-width: 620px; font-size: 11px; }
  .table-wrap td, .table-wrap th { padding: 10px; }
  .team-role-cards { grid-template-columns: 1fr; }
  .team-member-row { align-items: flex-start; flex-wrap: wrap; }
  .billing-instructions { padding: 14px; }
}

@media (max-width: 390px) {
  .topbar { gap: 7px; padding-inline: 9px; }
  .brand { gap: 6px; font-size: 13px; }
  .brand-mark { width: 35px; height: 35px; }
  .workspace-top-context { padding-inline-start: 7px; }
  .workspace-top-context strong { max-width: 82px; font-size: 9px; }
  .mobile-menu { width: 40px; height: 40px; }
  .top-actions .btn { min-height: 40px; padding-inline: 8px; font-size: 9px; }
  .public-route .top-actions .top-link { font-size: 9px; }
  .main { padding-inline: 12px; }
  .sms-card-header { flex-direction: column; }
  .sms-received-time { max-width: none; text-align: start; }
  .sms-pagination .btn { padding-inline: 6px; }
  .sms-page-count { font-size: 8px; }
  .admin-metric-grid { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* Public navigation: a quiet, confident desktop bar and a clear mobile menu. */
.public-route .topbar {
  min-height: 82px; padding-inline: clamp(18px, 4.5vw, 76px); border-bottom: 1px solid #e7ebf3;
  background: rgba(255,255,255,.96); box-shadow: 0 8px 28px rgba(24,37,63,.055);
}
.public-route .brand { gap: 12px; font-size: 19px; }
.public-route .brand-mark { width: 46px; height: 46px; border-radius: 16px; background: linear-gradient(145deg,#777af0,#5054cf 58%,#228f9c); box-shadow: 0 9px 20px rgba(81,84,207,.25); }
.public-route .brand small { color: #8490a5; font-size: 9px; letter-spacing: .05px; }
.public-route .public-nav { gap: 3px; padding: 5px; border: 1px solid #e8edf5; border-radius: 17px; background: #f6f8fb; }
.public-route .public-nav a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 12px; border: 1px solid transparent; border-radius: 12px; color: #57657c; font-size: 10px; font-weight: 800; transition: color .18s ease, background .18s ease, transform .18s ease, box-shadow .18s ease; }
.public-route .public-nav a:hover { color: #494bc0; background: #fff; transform: translateY(-1px); }
.public-route .public-nav a.active, .public-route .public-nav a[aria-current="page"] { color: #484abe; border-color: #e4e5fb; background: #fff; box-shadow: 0 3px 10px rgba(55,63,130,.08); }
.public-route .public-nav-account { display: none !important; }
.public-route .top-actions { gap: 12px; }
.public-route .top-actions .top-link { padding: 9px 4px; color: #59677d; font-size: 11px; font-weight: 850; }
.public-route .top-actions .btn-primary { border: 0; border-radius: 12px; background: linear-gradient(120deg,#6468e4,#4d51c9); box-shadow: 0 8px 18px rgba(80,83,202,.2); }
.public-route .top-actions .btn-primary:hover { background: linear-gradient(120deg,#575bd4,#4145b9); box-shadow: 0 10px 22px rgba(80,83,202,.27); transform: translateY(-1px); }
.public-route .public-nav-toggle { border-color: #e5e9f1; border-radius: 13px; color: #46546a; background: #fff; transition: border-color .18s ease, color .18s ease, box-shadow .18s ease; }
.public-route .public-nav-toggle:hover, .public-route .public-nav-toggle[aria-expanded="true"] { border-color: #d7d8f6; color: #4e50c6; box-shadow: 0 7px 18px rgba(32,43,75,.09); }

.sms-inbox-tools { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 8px 10px; min-width: 230px; }
.sms-inbox-tools .sms-total-card { min-width: 0; }
.sms-inbox-refresh { min-height: 42px; white-space: nowrap; }
.sms-inbox-status { grid-column: 1 / -1; margin: 0; color: #76839a; font-size: 9px; text-align: end; }

@media (min-width: 921px) and (max-width: 1120px) {
  .public-route .topbar { gap: 12px; padding-inline: 20px; }
  .public-route .brand { gap: 8px; font-size: 16px; }
  .public-route .brand-mark { width: 40px; height: 40px; }
  .public-route .public-nav { gap: 1px; padding: 4px; }
  .public-route .public-nav a { min-height: 38px; padding-inline: 8px; font-size: 9px; }
  .public-route .top-actions { gap: 7px; }
}

@media (max-width: 920px) {
  .public-route .topbar { min-height: 72px; padding-inline: 16px; gap: 12px; }
  .public-route .public-nav.open { top: calc(100% + 10px); right: 14px; left: 14px; gap: 6px; padding: 12px; border: 1px solid #e3e8f1; border-radius: 19px; background: rgba(255,255,255,.99); box-shadow: 0 20px 48px rgba(19,31,56,.2); }
  .public-route .public-nav.open a { min-height: 45px; padding: 9px 13px; border: 1px solid #eef1f6; border-radius: 12px; background: #f8f9fc; font-size: 11px; }
  .public-route .public-nav.open a.active, .public-route .public-nav.open a[aria-current="page"] { border-color: #dedffc; color: #4d4fc4; background: #f0f0ff; }
  .public-route .public-nav.open .public-nav-account { display: inline-flex !important; grid-column: 1 / -1; justify-content: center; color: #fff; border-color: transparent; background: linear-gradient(120deg,#6367e3,#4d51c9); }
}

@media (max-width: 680px) {
  .public-route .topbar { min-height: 66px; padding: 8px 13px; gap: 8px; }
  .public-route .brand { gap: 8px; font-size: 15px; }
  .public-route .brand-mark { width: 38px; height: 38px; border-radius: 13px; font-size: 17px; }
  .public-route .brand small { display: none; }
  .public-route .public-nav-toggle { min-height: 42px; height: 42px; padding-inline: 10px; font-size: 10px; }
  .public-route .public-nav.open { right: 10px; left: 10px; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .public-route .public-nav.open a { justify-content: flex-start; min-width: 0; padding-inline: 11px; font-size: 10px; }
  .sms-inbox-hero { align-items: flex-start; }
  .sms-inbox-tools { width: 100%; min-width: 0; grid-template-columns: minmax(0,1fr) auto; }
  .sms-inbox-status { text-align: start; }
}

@media (max-width: 390px) {
  .public-route .topbar { padding-inline: 9px; gap: 6px; }
  .public-route .brand { gap: 6px; font-size: 13px; }
  .public-route .brand-mark { width: 35px; height: 35px; }
  .public-route .top-actions { gap: 4px; }
  .public-route .top-actions .top-link { display: none; }
  .public-route .public-nav-toggle { padding-inline: 8px; }
  .public-route .public-nav.open { grid-template-columns: 1fr; }
  .public-route .public-nav.open .public-nav-account { grid-column: auto; }
  .sms-inbox-tools .sms-total-card { padding-inline: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .public-route .public-nav a, .public-route .public-nav-toggle, .public-route .top-actions .btn-primary { transition: none; }
}
