:root {
  color-scheme: dark;
  --bg: #050b15;
  --bg-2: #091321;
  --panel: rgba(16, 25, 40, .84);
  --panel-solid: #101a2a;
  --panel-2: #142136;
  --panel-3: #192a43;
  --text: #f7f9fc;
  --muted: #93a2b8;
  --muted-2: #65758d;
  --line: rgba(255,255,255,.09);
  --line-strong: rgba(255,255,255,.16);
  --shadow: 0 24px 70px rgba(0,0,0,.34), 0 2px 10px rgba(0,0,0,.22);
  --shadow-soft: 0 15px 38px rgba(0,0,0,.24);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 13px;
  --blue: #147eff;
  --blue-2: #55b6ff;
  --green: #34c759;
  --mint: #62e6c2;
  --orange: #ff9f0a;
  --yellow: #ffd60a;
  --red: #ff453a;
  --pink: #ff4fa2;
  --purple: #bf5af2;
  --cyan: #32d8ff;
  --indigo: #5e5ce6;
  --teal: #2dd4bf;
  --slate: #70829d;
  --sidebar-w: 92px;
  --topbar-h: 78px;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #eef2f7;
  --bg-2: #f7f9fc;
  --panel: rgba(255,255,255,.83);
  --panel-solid: #ffffff;
  --panel-2: #f3f6fa;
  --panel-3: #eaf0f7;
  --text: #101828;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --line: rgba(15,23,42,.08);
  --line-strong: rgba(15,23,42,.14);
  --shadow: 0 24px 70px rgba(40,55,75,.13), 0 2px 10px rgba(40,55,75,.07);
  --shadow-soft: 0 15px 38px rgba(40,55,75,.10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% -10%, rgba(24,126,255,.18), transparent 34%),
    radial-gradient(circle at 90% 5%, rgba(191,90,242,.12), transparent 28%),
    linear-gradient(145deg, var(--bg), var(--bg-2));
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Inter, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
button, input, select, textarea { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
svg { display: block; }
::selection { background: rgba(20,126,255,.32); }

.app-shell { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 12px;
  border-right: 1px solid var(--line);
  background: rgba(5,11,21,.76);
  backdrop-filter: blur(28px) saturate(140%);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
}
[data-theme="light"] .sidebar { background: rgba(246,249,253,.78); }

.brand-mark {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #ffffff, #dfe9f6);
  color: #07101d;
  box-shadow: 0 12px 28px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.8);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.8px;
  cursor: pointer;
  transition: transform .25s ease;
}
.brand-mark:hover { transform: translateY(-2px) scale(1.03); }

.sidebar-nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  margin-top: 26px;
  width: 100%;
  flex: 1;
}
.side-link {
  width: 58px;
  min-height: 58px;
  border: 0;
  border-radius: 19px;
  background: transparent;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--muted);
  position: relative;
  transition: .24s ease;
}
.side-link:hover { color: var(--text); background: rgba(255,255,255,.07); transform: translateY(-2px); }
.side-link.active { color: #fff; background: linear-gradient(145deg, #1c8cff, #0b66db); box-shadow: 0 12px 28px rgba(20,126,255,.35); }
.side-link .nav-tip {
  position: absolute;
  left: 72px;
  white-space: nowrap;
  padding: 8px 11px;
  border-radius: 10px;
  background: #0d1726;
  border: 1px solid var(--line);
  color: white;
  font-size: 12px;
  opacity: 0;
  transform: translateX(-6px);
  pointer-events: none;
  transition: .18s ease;
  box-shadow: var(--shadow-soft);
}
.side-link:hover .nav-tip { opacity: 1; transform: translateX(0); }
.side-bottom { display: grid; gap: 10px; }

.topbar {
  position: fixed;
  left: var(--sidebar-w);
  right: 0;
  top: 0;
  height: var(--topbar-h);
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: linear-gradient(to bottom, rgba(5,11,21,.88), rgba(5,11,21,.56));
  backdrop-filter: blur(24px) saturate(135%);
  -webkit-backdrop-filter: blur(24px) saturate(135%);
  border-bottom: 1px solid var(--line);
}
[data-theme="light"] .topbar { background: linear-gradient(to bottom, rgba(245,248,252,.9), rgba(245,248,252,.62)); }
.topbar-left { display: flex; align-items: center; gap: 15px; min-width: 0; }
.topbar-title-wrap { min-width: 0; }
.topbar-kicker { color: var(--muted); font-size: 12px; margin-bottom: 2px; }
.topbar-title { font-size: 20px; font-weight: 760; letter-spacing: -.4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.icon-button {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.06);
  width: 44px;
  height: 44px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  cursor: pointer;
  color: var(--muted);
  transition: .2s ease;
  position: relative;
}
.icon-button:hover { color: var(--text); background: rgba(255,255,255,.11); transform: translateY(-1px); }
.icon-button .dot {
  position: absolute;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--red);
  top: 8px; right: 8px;
  border: 2px solid var(--bg);
}

.search-trigger {
  border: 1px solid var(--line);
  background: rgba(255,255,255,.06);
  color: var(--muted);
  height: 44px;
  min-width: 250px;
  padding: 0 14px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: .2s ease;
}
.search-trigger:hover { background: rgba(255,255,255,.1); color: var(--text); }
.search-trigger kbd {
  margin-left: auto;
  padding: 3px 7px;
  border-radius: 7px;
  background: rgba(255,255,255,.08);
  border: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
}
.profile-button {
  height: 46px;
  border-radius: 16px;
  padding: 4px 10px 4px 5px;
  background: rgba(255,255,255,.07);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
}
.avatar {
  width: 36px; height: 36px; border-radius: 13px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, #75c8ff, #1b77ff);
  color: white; font-weight: 780; font-size: 13px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
}
.profile-copy { text-align: left; line-height: 1.15; }
.profile-copy strong { display:block; font-size: 12px; }
.profile-copy span { color: var(--muted); font-size: 10px; }

.main-content {
  margin-left: var(--sidebar-w);
  padding: calc(var(--topbar-h) + 22px) 28px 34px;
  min-height: 100vh;
}
.page { animation: pageIn .35s ease both; }
@keyframes pageIn { from { opacity:0; transform: translateY(8px); } to { opacity:1; transform:none; } }

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin: 5px 0 20px;
}
.page-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 7px;
}
.page-title { margin: 0; font-size: clamp(30px, 4vw, 49px); line-height: .98; letter-spacing: -2.2px; font-weight: 820; }
.page-subtitle { margin: 10px 0 0; color: var(--muted); max-width: 760px; line-height: 1.55; }
.page-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }

.btn {
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.06);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 680;
  font-size: 13px;
  cursor: pointer;
  transition: .2s ease;
}
.btn:hover { transform: translateY(-2px); background: rgba(255,255,255,.11); }
.btn.primary { background: linear-gradient(145deg, #1f8cff, #0b68dd); border-color: transparent; color: #fff; box-shadow: 0 12px 28px rgba(20,126,255,.28); }
.btn.danger { background: rgba(255,69,58,.14); color: #ff8b84; border-color: rgba(255,69,58,.2); }
.btn.small { min-height: 34px; border-radius: 11px; padding: 0 11px; font-size: 12px; }
.btn.ghost { background: transparent; }

.bento-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0,1fr));
  grid-auto-rows: 96px;
  gap: 14px;
}
.widget {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,.08);
  overflow: hidden;
  isolation: isolate;
  box-shadow: var(--shadow-soft);
  transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
  cursor: pointer;
}
.widget::after {
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(145deg, rgba(255,255,255,.16), transparent 32%, transparent 72%, rgba(0,0,0,.12));
  z-index:-1;
  pointer-events:none;
}
.widget:hover { transform: translateY(-4px) scale(1.005); box-shadow: 0 28px 65px rgba(0,0,0,.33); filter: saturate(1.04); }
.widget-content { height: 100%; padding: 19px; display:flex; flex-direction:column; }
.widget-title { font-size: 16px; font-weight: 770; letter-spacing: -.35px; }
.widget-label { font-size: 11px; color: rgba(255,255,255,.75); margin-top: 3px; }
.widget-value { font-size: 42px; line-height: 1; font-weight: 790; letter-spacing: -2px; margin-top: auto; }
.widget-footer { margin-top:auto; display:flex; align-items:center; justify-content:space-between; gap:12px; font-size:12px; color:rgba(255,255,255,.78); }
.widget .app-icon { background: rgba(255,255,255,.18); color:#fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.22); }

.span-2x2 { grid-column: span 6; grid-row: span 4; }
.span-2x1 { grid-column: span 6; grid-row: span 2; }
.span-1x2 { grid-column: span 3; grid-row: span 4; }
.span-1x1 { grid-column: span 3; grid-row: span 2; }
.span-wide { grid-column: span 9; grid-row: span 2; }
.span-small { grid-column: span 3; grid-row: span 2; }

.gradient-red { background: linear-gradient(145deg, #ff5a4e, #d8322b 74%); color:#fff; }
.gradient-blue { background: linear-gradient(145deg, #3aa9ff, #0975e7 75%); color:#fff; }
.gradient-cyan { background: linear-gradient(145deg, #25cef4, #078bb7 76%); color:#fff; }
.gradient-green { background: linear-gradient(145deg, #58db76, #15933f 78%); color:#fff; }
.gradient-yellow { background: linear-gradient(145deg, #ffe15e, #f0ae00 76%); color:#17130a; }
.gradient-orange { background: linear-gradient(145deg, #ffb24e, #f47d20 78%); color:#fff; }
.gradient-purple { background: linear-gradient(145deg, #cf79ff, #7a35d9 76%); color:#fff; }
.gradient-pink { background: linear-gradient(145deg, #ff77b9, #db2f7e 76%); color:#fff; }
.gradient-dark { background: linear-gradient(145deg, #1e2b3f, #0d1625 80%); color:#fff; }
.gradient-light { background: linear-gradient(145deg, #f9fbff, #dfe8f5 80%); color:#0b1320; }

.today-widget .widget-content { padding: 25px; }
.today-date { font-size: 13px; opacity: .85; }
.today-heading { font-size: 34px; font-weight: 800; letter-spacing: -1.5px; margin-top: 8px; }
.today-summary { font-size: 14px; line-height: 1.5; max-width: 520px; margin-top: 7px; opacity: .9; }
.today-list { margin-top: 20px; display: grid; gap: 9px; }
.today-list-row { display:flex; align-items:center; gap:10px; font-size:13px; }
.today-list-row span:first-child { width:7px; height:7px; border-radius:50%; background:rgba(255,255,255,.85); flex:none; }
.today-actions { display:flex; gap:9px; margin-top:auto; flex-wrap:wrap; }
.today-actions .btn { background:rgba(255,255,255,.16); border-color:rgba(255,255,255,.18); color:white; }
.today-actions .btn.primary { background:white; color:#d8322b; }

.module-widget .module-top { display:flex; align-items:flex-start; justify-content:space-between; }
.module-widget .module-icon { width:52px; height:52px; border-radius:17px; display:grid; place-items:center; background:rgba(255,255,255,.18); }
.module-widget .module-arrow { width:34px; height:34px; border-radius:12px; display:grid; place-items:center; background:rgba(255,255,255,.13); }
.module-widget .module-copy { margin-top:auto; }
.module-widget .module-copy h3 { margin:0; font-size:20px; line-height:1.08; letter-spacing:-.7px; }
.module-widget .module-copy p { margin:7px 0 0; font-size:12px; line-height:1.4; opacity:.8; }

.map-widget { background:#eaf3e8; color:#132018; }
.map-grid { position:absolute; inset:0; opacity:.95; background:
  linear-gradient(27deg, transparent 43%, rgba(240,201,74,.75) 44%, rgba(240,201,74,.75) 47%, transparent 48%),
  linear-gradient(105deg, transparent 47%, rgba(255,255,255,.95) 48%, rgba(255,255,255,.95) 51%, transparent 52%),
  linear-gradient(8deg, transparent 54%, rgba(255,255,255,.75) 55%, rgba(255,255,255,.75) 58%, transparent 59%),
  repeating-linear-gradient(0deg, transparent 0 26px, rgba(66,119,77,.11) 27px 28px),
  repeating-linear-gradient(90deg, transparent 0 34px, rgba(66,119,77,.1) 35px 36px);
}
.map-pin { position:absolute; top:42%; left:53%; transform:translate(-50%,-50%); width:46px; height:46px; border-radius:50% 50% 50% 10px; rotate:-45deg; background:#1f8cff; box-shadow:0 12px 26px rgba(31,140,255,.34); display:grid; place-items:center; }
.map-pin svg { rotate:45deg; color:#fff; }
.map-caption { position:absolute; left:17px; right:17px; bottom:15px; background:rgba(255,255,255,.78); backdrop-filter:blur(12px); padding:10px 12px; border-radius:13px; display:flex; justify-content:space-between; align-items:center; font-size:12px; }

.clock-face { width:84px; height:84px; border-radius:50%; background:#fff; color:#111; margin:auto; position:relative; box-shadow:inset 0 0 0 3px #121212, 0 10px 24px rgba(0,0,0,.22); }
.clock-face::before, .clock-face::after { content:""; position:absolute; left:50%; top:50%; transform-origin:bottom center; border-radius:3px; }
.clock-face::before { width:3px; height:25px; background:#111; transform:translate(-50%,-100%) rotate(40deg); }
.clock-face::after { width:2px; height:31px; background:#ff453a; transform:translate(-50%,-100%) rotate(190deg); }
.clock-dot { position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); width:7px; height:7px; border-radius:50%; background:#111; }

.weather-temp { font-size:50px; letter-spacing:-3px; font-weight:790; line-height:1; }
.weather-strip { display:grid; grid-template-columns:repeat(5,1fr); gap:5px; margin-top:auto; }
.weather-day { text-align:center; font-size:10px; opacity:.86; }
.weather-day strong { display:block; font-size:12px; margin-top:5px; }

.app-icon {
  width: 44px; height: 44px; border-radius: 15px;
  display: grid; place-items: center; flex: none;
}
.app-icon.small { width:34px; height:34px; border-radius:11px; }
.app-icon.large { width:58px; height:58px; border-radius:19px; }
.icon-tone-blue { background:rgba(20,126,255,.16); color:#61b3ff; }
.icon-tone-green { background:rgba(52,199,89,.16); color:#6fe58a; }
.icon-tone-orange { background:rgba(255,159,10,.16); color:#ffc05c; }
.icon-tone-yellow { background:rgba(255,214,10,.16); color:#ffe36c; }
.icon-tone-purple { background:rgba(191,90,242,.16); color:#d58cff; }
.icon-tone-cyan { background:rgba(50,216,255,.16); color:#76e8ff; }
.icon-tone-red { background:rgba(255,69,58,.16); color:#ff8e87; }
.icon-tone-pink { background:rgba(255,79,162,.16); color:#ff9dcc; }
.icon-tone-indigo { background:rgba(94,92,230,.16); color:#9d9cff; }
.icon-tone-mint { background:rgba(98,230,194,.16); color:#8df0d6; }
.icon-tone-teal { background:rgba(45,212,191,.16); color:#76e8d5; }
.icon-tone-slate { background:rgba(112,130,157,.16); color:#a9b8cc; }

.stats-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:13px; margin-bottom:16px; }
.stat-card {
  border-radius: var(--radius-md);
  border:1px solid var(--line);
  background: linear-gradient(145deg, rgba(255,255,255,.08), rgba(255,255,255,.035));
  padding:17px;
  min-height:136px;
  box-shadow:var(--shadow-soft);
  display:flex; flex-direction:column;
  transition:.22s ease;
}
.stat-card:hover { transform:translateY(-3px); background:linear-gradient(145deg, rgba(255,255,255,.11), rgba(255,255,255,.05)); }
.stat-top { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.stat-label { color:var(--muted); font-size:12px; }
.stat-value { font-size:31px; font-weight:790; letter-spacing:-1.3px; margin-top:auto; }
.stat-meta { font-size:11px; color:var(--muted); margin-top:5px; }

.content-grid { display:grid; grid-template-columns:minmax(0,1.6fr) minmax(290px,.74fr); gap:15px; }
.panel {
  border:1px solid var(--line);
  background:var(--panel);
  backdrop-filter:blur(20px) saturate(130%);
  -webkit-backdrop-filter:blur(20px) saturate(130%);
  border-radius:var(--radius-lg);
  box-shadow:var(--shadow-soft);
  overflow:hidden;
}
.panel-header { display:flex; align-items:center; justify-content:space-between; gap:15px; padding:17px 19px; border-bottom:1px solid var(--line); }
.panel-title { font-size:15px; font-weight:760; letter-spacing:-.25px; }
.panel-subtitle { color:var(--muted); font-size:11px; margin-top:3px; }
.panel-body { padding:17px 19px; }

.module-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:13px; }
.module-card {
  border:1px solid var(--line);
  background:linear-gradient(145deg, rgba(255,255,255,.08), rgba(255,255,255,.035));
  min-height:184px;
  border-radius:var(--radius-md);
  padding:18px;
  cursor:pointer;
  transition:.24s ease;
  position:relative;
  overflow:hidden;
}
.module-card::after { content:""; position:absolute; width:120px; height:120px; border-radius:50%; right:-45px; bottom:-55px; background:var(--glow,rgba(20,126,255,.14)); filter:blur(4px); }
.module-card:hover { transform:translateY(-4px); border-color:var(--line-strong); box-shadow:var(--shadow-soft); }
.module-card-head { display:flex; align-items:flex-start; justify-content:space-between; }
.module-card h3 { margin:22px 0 7px; font-size:17px; line-height:1.12; letter-spacing:-.45px; }
.module-card p { margin:0; color:var(--muted); font-size:12px; line-height:1.45; max-width:85%; }
.module-card-arrow { color:var(--muted); }

.tabs { display:flex; gap:5px; overflow:auto; padding:5px; background:rgba(255,255,255,.05); border:1px solid var(--line); border-radius:14px; scrollbar-width:none; }
.tabs::-webkit-scrollbar { display:none; }
.tab-button { border:0; background:transparent; color:var(--muted); white-space:nowrap; padding:9px 13px; border-radius:10px; font-size:12px; font-weight:690; cursor:pointer; transition:.18s; }
.tab-button:hover { color:var(--text); }
.tab-button.active { background:rgba(255,255,255,.1); color:var(--text); box-shadow:0 4px 15px rgba(0,0,0,.13); }

.toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:14px 18px; border-bottom:1px solid var(--line); }
.toolbar-left, .toolbar-right { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.input-shell { height:39px; min-width:210px; border-radius:12px; display:flex; align-items:center; gap:8px; padding:0 11px; border:1px solid var(--line); background:rgba(255,255,255,.05); color:var(--muted); }
.input-shell input { width:100%; background:transparent; border:0; outline:0; color:var(--text); font-size:12px; }
.input-shell input::placeholder { color:var(--muted-2); }
.select-shell { height:39px; border:1px solid var(--line); background:rgba(255,255,255,.05); color:var(--text); border-radius:12px; padding:0 10px; outline:0; font-size:12px; }

.data-table-wrap { overflow:auto; }
.data-table { width:100%; border-collapse:collapse; min-width:720px; }
.data-table th { text-align:left; padding:12px 18px; color:var(--muted); font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.7px; background:rgba(255,255,255,.025); border-bottom:1px solid var(--line); }
.data-table td { padding:14px 18px; border-bottom:1px solid var(--line); font-size:12px; }
.data-table tr:last-child td { border-bottom:0; }
.data-table tbody tr { transition:.18s; cursor:pointer; }
.data-table tbody tr:hover { background:rgba(255,255,255,.035); }
.table-primary { font-weight:700; }
.table-secondary { color:var(--muted); font-size:11px; margin-top:3px; }

.badge { display:inline-flex; align-items:center; gap:6px; border-radius:999px; padding:6px 9px; font-size:10px; font-weight:760; border:1px solid transparent; white-space:nowrap; }
.badge::before { content:""; width:6px; height:6px; border-radius:50%; background:currentColor; }
.badge-success { background:rgba(52,199,89,.12); color:#73e98f; border-color:rgba(52,199,89,.18); }
.badge-warning { background:rgba(255,159,10,.12); color:#ffc568; border-color:rgba(255,159,10,.18); }
.badge-danger { background:rgba(255,69,58,.12); color:#ff8c85; border-color:rgba(255,69,58,.18); }
.badge-info { background:rgba(20,126,255,.12); color:#77bcff; border-color:rgba(20,126,255,.18); }
.badge-progress { background:rgba(191,90,242,.12); color:#d68cff; border-color:rgba(191,90,242,.18); }
.badge-muted { background:rgba(148,163,184,.1); color:#9cabc0; border-color:rgba(148,163,184,.14); }

.activity-list { display:grid; gap:10px; }
.activity-item { display:flex; gap:11px; padding:11px; border-radius:14px; background:rgba(255,255,255,.035); border:1px solid var(--line); }
.activity-copy { min-width:0; }
.activity-copy strong { font-size:12px; display:block; }
.activity-copy span { font-size:10px; color:var(--muted); display:block; margin-top:4px; line-height:1.4; }

.progress-ring { width:88px; height:88px; border-radius:50%; display:grid; place-items:center; background:conic-gradient(var(--ring,var(--blue)) calc(var(--value)*1%), rgba(255,255,255,.08) 0); position:relative; }
.progress-ring::before { content:""; position:absolute; inset:8px; border-radius:50%; background:var(--panel-solid); }
.progress-ring strong { position:relative; z-index:1; font-size:19px; }
.progress-row { display:flex; align-items:center; gap:17px; }
.progress-details { flex:1; }
.progress-line { height:8px; border-radius:999px; background:rgba(255,255,255,.07); overflow:hidden; margin-top:8px; }
.progress-line span { display:block; height:100%; width:var(--value); background:linear-gradient(90deg, var(--blue), var(--cyan)); border-radius:inherit; }

.quick-list { display:grid; gap:9px; }
.quick-row { display:flex; align-items:center; gap:11px; padding:11px; border:1px solid var(--line); border-radius:14px; background:rgba(255,255,255,.03); cursor:pointer; transition:.18s; }
.quick-row:hover { background:rgba(255,255,255,.07); transform:translateX(3px); }
.quick-row-copy { min-width:0; flex:1; }
.quick-row-copy strong { display:block; font-size:12px; }
.quick-row-copy span { display:block; color:var(--muted); font-size:10px; margin-top:3px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.quick-count { font-size:22px; font-weight:780; letter-spacing:-1px; }

.nexa-nav { display:flex; gap:7px; padding:6px; border-radius:16px; border:1px solid var(--line); background:rgba(255,255,255,.05); width:max-content; max-width:100%; overflow:auto; }
.nexa-nav button { border:0; background:transparent; color:var(--muted); border-radius:11px; min-height:39px; padding:0 14px; font-weight:700; font-size:12px; cursor:pointer; white-space:nowrap; }
.nexa-nav button.active, .nexa-nav button:hover { background:rgba(255,255,255,.1); color:var(--text); }

.platform-grid, .property-grid, .account-grid, .report-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:13px; }
.platform-card, .property-card, .account-card, .report-card {
  border:1px solid var(--line);
  background:linear-gradient(145deg, rgba(255,255,255,.085), rgba(255,255,255,.035));
  border-radius:var(--radius-md);
  padding:17px;
  min-height:210px;
  position:relative;
  overflow:hidden;
  transition:.23s;
}
.platform-card:hover, .property-card:hover, .account-card:hover, .report-card:hover { transform:translateY(-4px); border-color:var(--line-strong); box-shadow:var(--shadow-soft); }
.platform-head, .property-head, .account-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; }
.platform-card h3, .property-card h3, .account-card h3, .report-card h3 { margin:16px 0 5px; font-size:17px; letter-spacing:-.45px; }
.platform-card p, .property-card p, .account-card p, .report-card p { margin:0; color:var(--muted); font-size:11px; line-height:1.45; }
.platform-meta { display:grid; gap:6px; margin-top:16px; }
.platform-meta-row { display:flex; justify-content:space-between; gap:12px; font-size:11px; color:var(--muted); }
.platform-meta-row strong { color:var(--text); font-weight:660; }
.card-actions { display:flex; gap:7px; flex-wrap:wrap; margin-top:16px; }

.property-map-mini { height:72px; border-radius:14px; margin-top:12px; position:relative; overflow:hidden; background:#dcebd9; }
.property-map-mini::before { content:""; position:absolute; inset:0; background:repeating-linear-gradient(30deg, transparent 0 20px, rgba(255,255,255,.75) 21px 24px), repeating-linear-gradient(110deg, transparent 0 27px, rgba(76,120,78,.1) 28px 30px); }
.property-map-mini::after { content:""; position:absolute; width:18px; height:18px; border-radius:50% 50% 50% 4px; background:var(--blue); left:52%; top:42%; transform:rotate(-45deg); box-shadow:0 8px 14px rgba(20,126,255,.28); }

.account-meta { display:grid; grid-template-columns:1fr 1fr; gap:8px; margin-top:14px; }
.meta-box { padding:9px; border-radius:12px; background:rgba(255,255,255,.045); border:1px solid var(--line); }
.meta-box span { display:block; color:var(--muted); font-size:9px; margin-bottom:4px; }
.meta-box strong { display:block; font-size:11px; }

.detail-hero { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:20px; align-items:center; padding:22px; border-radius:var(--radius-lg); border:1px solid var(--line); background:linear-gradient(145deg, rgba(255,255,255,.09), rgba(255,255,255,.03)); box-shadow:var(--shadow-soft); margin-bottom:14px; }
.detail-identity { display:flex; align-items:center; gap:15px; }
.detail-identity h2 { margin:0; font-size:24px; letter-spacing:-.9px; }
.detail-identity p { margin:6px 0 0; color:var(--muted); font-size:12px; }
.detail-actions { display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }

.checklist { display:grid; gap:9px; }
.check-row { display:flex; align-items:center; gap:11px; padding:12px; border:1px solid var(--line); border-radius:14px; background:rgba(255,255,255,.035); }
.check-row input { width:18px; height:18px; accent-color:var(--blue); }
.check-row label { flex:1; font-size:12px; cursor:pointer; }
.check-row.done label { color:var(--muted); text-decoration:line-through; }

.folder-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:13px; margin-bottom:15px; }
.folder-card { border:1px solid var(--line); border-radius:var(--radius-md); background:linear-gradient(145deg, rgba(255,255,255,.085), rgba(255,255,255,.03)); padding:17px; min-height:175px; cursor:pointer; transition:.22s; position:relative; overflow:hidden; }
.folder-card:hover { transform:translateY(-4px); border-color:var(--line-strong); box-shadow:var(--shadow-soft); }
.folder-card::after { content:""; position:absolute; width:110px; height:110px; right:-40px; bottom:-48px; border-radius:50%; background:var(--folder-glow,rgba(20,126,255,.15)); }
.folder-card h3 { margin:22px 0 6px; font-size:16px; letter-spacing:-.4px; max-width:82%; }
.folder-card p { margin:0; color:var(--muted); font-size:11px; }

.empty-state { padding:50px 20px; text-align:center; color:var(--muted); }
.empty-state .app-icon { margin:0 auto 14px; }

.overlay {
  position:fixed;
  inset:0;
  z-index:100;
  display:none;
  background:rgba(1,5,10,.68);
  backdrop-filter:blur(16px);
  -webkit-backdrop-filter:blur(16px);
  padding:8vh 20px 20px;
}
.overlay.open { display:block; animation:fadeIn .18s ease; }
@keyframes fadeIn { from{opacity:0} to{opacity:1} }
.command-box { width:min(760px,100%); margin:0 auto; background:var(--panel-solid); border:1px solid var(--line-strong); border-radius:24px; box-shadow:0 35px 110px rgba(0,0,0,.5); overflow:hidden; }
.command-input { height:70px; display:flex; align-items:center; gap:12px; padding:0 20px; border-bottom:1px solid var(--line); }
.command-input input { flex:1; border:0; outline:0; background:transparent; color:var(--text); font-size:18px; }
.command-results { max-height:62vh; overflow:auto; padding:10px; }
.command-item { display:flex; align-items:center; gap:12px; padding:12px; border-radius:14px; cursor:pointer; }
.command-item:hover, .command-item.active { background:rgba(255,255,255,.07); }
.command-item-copy { flex:1; min-width:0; }
.command-item-copy strong { display:block; font-size:13px; }
.command-item-copy span { display:block; font-size:10px; color:var(--muted); margin-top:3px; }
.command-item kbd { color:var(--muted); font-size:10px; }

.drawer {
  position:fixed;
  z-index:90;
  top:0;
  right:-430px;
  width:min(410px,100vw);
  height:100vh;
  background:rgba(11,18,29,.94);
  backdrop-filter:blur(26px);
  border-left:1px solid var(--line);
  transition:right .3s cubic-bezier(.22,.8,.24,1);
  box-shadow:-25px 0 80px rgba(0,0,0,.35);
  display:flex;
  flex-direction:column;
}
[data-theme="light"] .drawer { background:rgba(250,252,255,.96); }
.drawer.open { right:0; }
.drawer-header { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:20px; border-bottom:1px solid var(--line); }
.drawer-body { padding:13px; overflow:auto; }
.notification-item { display:flex; gap:12px; padding:13px; border-radius:16px; border:1px solid transparent; }
.notification-item:hover { background:rgba(255,255,255,.05); border-color:var(--line); }
.notification-copy { flex:1; }
.notification-copy strong { display:block; font-size:12px; }
.notification-copy p { margin:4px 0 0; color:var(--muted); font-size:10px; line-height:1.45; }
.notification-time { color:var(--muted-2); font-size:9px; }

.dropdown {
  position:fixed;
  z-index:85;
  min-width:260px;
  padding:8px;
  border-radius:18px;
  border:1px solid var(--line-strong);
  background:var(--panel-solid);
  box-shadow:var(--shadow);
  display:none;
}
.dropdown.open { display:block; animation:dropIn .18s ease; }
@keyframes dropIn { from { opacity:0; transform:translateY(-6px) scale(.98); } to { opacity:1; transform:none; } }
.dropdown-head { padding:10px 11px 13px; border-bottom:1px solid var(--line); margin-bottom:6px; }
.dropdown-head strong { display:block; font-size:13px; }
.dropdown-head span { display:block; color:var(--muted); font-size:10px; margin-top:3px; }
.dropdown-item { width:100%; border:0; background:transparent; color:var(--text); display:flex; align-items:center; gap:10px; padding:10px 11px; border-radius:12px; cursor:pointer; text-align:left; font-size:12px; }
.dropdown-item:hover { background:rgba(255,255,255,.06); }
.dropdown-item .check { margin-left:auto; color:var(--blue); }
.dropdown-sep { height:1px; background:var(--line); margin:6px 4px; }

.modal-backdrop { position:fixed; inset:0; z-index:110; display:none; place-items:center; padding:20px; background:rgba(1,5,10,.7); backdrop-filter:blur(14px); }
.modal-backdrop.open { display:grid; }
.modal { width:min(620px,100%); max-height:88vh; overflow:auto; background:var(--panel-solid); border:1px solid var(--line-strong); border-radius:25px; box-shadow:0 40px 120px rgba(0,0,0,.55); }
.modal-header { display:flex; justify-content:space-between; align-items:flex-start; gap:15px; padding:20px; border-bottom:1px solid var(--line); }
.modal-header h3 { margin:0; font-size:21px; letter-spacing:-.7px; }
.modal-header p { margin:5px 0 0; color:var(--muted); font-size:11px; }
.modal-body { padding:20px; }
.modal-footer { display:flex; justify-content:flex-end; gap:8px; padding:16px 20px 20px; }
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:13px; }
.form-field { display:grid; gap:6px; }
.form-field.full { grid-column:1/-1; }
.form-field label { font-size:11px; color:var(--muted); }
.form-field label .required { color:var(--red); }
.form-field input, .form-field select, .form-field textarea { width:100%; border:1px solid var(--line); background:rgba(255,255,255,.045); color:var(--text); border-radius:13px; padding:11px 12px; outline:0; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color:rgba(20,126,255,.55); box-shadow:0 0 0 3px rgba(20,126,255,.12); }
.form-field textarea { min-height:95px; resize:vertical; }

.toast-stack { position:fixed; z-index:140; right:20px; bottom:20px; display:grid; gap:10px; }
.toast { min-width:280px; max-width:360px; padding:13px 14px; border-radius:15px; border:1px solid var(--line-strong); background:var(--panel-solid); box-shadow:var(--shadow); display:flex; align-items:center; gap:10px; animation:toastIn .25s ease; }
@keyframes toastIn { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:none; } }
.toast-copy strong { display:block; font-size:12px; }
.toast-copy span { color:var(--muted); font-size:10px; display:block; margin-top:3px; }

.mobile-nav { display:none; }
.mobile-menu-button { display:none; }

.login-page {
  min-height:100vh;
  display:grid;
  grid-template-columns:minmax(0,1.2fr) minmax(380px,.8fr);
  background:
    radial-gradient(circle at 10% 10%, rgba(20,126,255,.22), transparent 30%),
    radial-gradient(circle at 88% 18%, rgba(191,90,242,.16), transparent 27%),
    linear-gradient(145deg,#040a13,#0a1422);
}
.login-showcase { padding:42px; display:flex; flex-direction:column; min-height:100vh; }
.login-brand { display:flex; align-items:center; gap:13px; font-weight:780; font-size:18px; }
.login-hero { margin:auto 0; max-width:720px; }
.login-hero h1 { margin:0; font-size:clamp(48px,6vw,82px); line-height:.92; letter-spacing:-4px; }
.login-hero p { color:#9babc0; max-width:620px; font-size:16px; line-height:1.6; }
.login-mini-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:11px; margin-top:28px; }
.login-mini { min-height:120px; border-radius:22px; padding:16px; display:flex; flex-direction:column; box-shadow:var(--shadow-soft); }
.login-mini strong { margin-top:auto; font-size:14px; }
.login-panel-wrap { display:grid; place-items:center; padding:30px; background:rgba(255,255,255,.035); border-left:1px solid rgba(255,255,255,.08); backdrop-filter:blur(20px); }
.login-card { width:min(440px,100%); background:rgba(13,22,36,.78); border:1px solid rgba(255,255,255,.1); border-radius:30px; padding:28px; box-shadow:0 35px 100px rgba(0,0,0,.35); }
.login-card h2 { margin:20px 0 5px; font-size:30px; letter-spacing:-1.3px; }
.login-card > p { margin:0 0 22px; color:#8fa0b7; font-size:13px; }
.login-card .form-field { margin-bottom:13px; }
.login-card .form-field input { min-height:48px; }
.login-submit { width:100%; min-height:48px; margin-top:7px; }
.login-footer { margin-top:18px; color:#718198; font-size:10px; line-height:1.5; text-align:center; }

@media (max-width: 1220px) {
  .span-2x2 { grid-column:span 8; }
  .span-1x2 { grid-column:span 4; }
  .span-1x1 { grid-column:span 4; }
  .span-2x1 { grid-column:span 8; }
  .stats-grid { grid-template-columns:repeat(2,1fr); }
  .folder-grid { grid-template-columns:repeat(2,1fr); }
  .module-grid, .platform-grid, .property-grid, .account-grid, .report-grid { grid-template-columns:repeat(2,1fr); }
}

@media (max-width: 900px) {
  :root { --sidebar-w:0px; --topbar-h:70px; }
  .sidebar { transform:translateX(-105%); width:260px; align-items:stretch; padding:15px; transition:.28s ease; }
  .sidebar.open { transform:translateX(0); }
  .brand-mark { margin-left:2px; }
  .sidebar-nav { align-items:stretch; }
  .side-link { width:100%; min-height:48px; padding:0 13px; display:flex; justify-content:flex-start; gap:12px; border-radius:14px; }
  .side-link .nav-tip { position:static; opacity:1; transform:none; background:transparent; border:0; padding:0; box-shadow:none; color:inherit; font-size:12px; }
  .side-bottom { margin-top:auto; }
  .topbar { left:0; padding:0 16px; }
  .mobile-menu-button { display:grid; }
  .search-trigger { min-width:44px; width:44px; padding:0; justify-content:center; }
  .search-trigger span, .search-trigger kbd { display:none; }
  .profile-copy { display:none; }
  .profile-button { width:46px; padding:4px; }
  .main-content { margin-left:0; padding:calc(var(--topbar-h) + 18px) 16px 92px; }
  .content-grid { grid-template-columns:1fr; }
  .bento-grid { grid-template-columns:repeat(8,1fr); }
  .span-2x2, .span-2x1 { grid-column:span 8; }
  .span-1x2, .span-1x1, .span-small { grid-column:span 4; }
  .module-grid, .platform-grid, .property-grid, .account-grid, .report-grid { grid-template-columns:repeat(2,1fr); }
  .mobile-nav { position:fixed; z-index:45; left:12px; right:12px; bottom:12px; height:64px; display:grid; grid-template-columns:repeat(5,1fr); padding:6px; border-radius:22px; background:rgba(10,18,30,.9); border:1px solid var(--line-strong); backdrop-filter:blur(20px); box-shadow:var(--shadow); }
  [data-theme="light"] .mobile-nav { background:rgba(255,255,255,.9); }
  .mobile-nav button { border:0; background:transparent; color:var(--muted); border-radius:16px; display:grid; place-items:center; cursor:pointer; }
  .mobile-nav button.active { color:#fff; background:linear-gradient(145deg,#1b8cff,#0c68dc); }
  .login-page { grid-template-columns:1fr; }
  .login-showcase { display:none; }
  .login-panel-wrap { min-height:100vh; border:0; }
}

@media (max-width: 640px) {
  .topbar-title { font-size:16px; max-width:150px; }
  .topbar-kicker { display:none; }
  .topbar-actions { gap:6px; }
  .icon-button { width:40px; height:40px; border-radius:13px; }
  .profile-button { width:40px; height:40px; border-radius:13px; }
  .avatar { width:30px; height:30px; border-radius:10px; font-size:11px; }
  .page-heading { align-items:flex-start; flex-direction:column; }
  .page-actions { justify-content:flex-start; }
  .page-title { font-size:34px; letter-spacing:-1.5px; }
  .bento-grid { grid-template-columns:repeat(4,1fr); grid-auto-rows:92px; }
  .span-2x2, .span-2x1, .span-1x2, .span-1x1, .span-wide, .span-small { grid-column:span 4; }
  .span-2x2 { grid-row:span 4; }
  .span-1x2 { grid-row:span 3; }
  .span-1x1, .span-2x1, .span-wide, .span-small { grid-row:span 2; }
  .today-heading { font-size:27px; }
  .today-summary { font-size:12px; }
  .stats-grid, .module-grid, .platform-grid, .property-grid, .account-grid, .report-grid, .folder-grid { grid-template-columns:1fr; }
  .stat-card { min-height:122px; }
  .toolbar { align-items:stretch; flex-direction:column; }
  .toolbar-left, .toolbar-right { width:100%; }
  .input-shell { flex:1; min-width:0; }
  .detail-hero { grid-template-columns:1fr; }
  .detail-actions { justify-content:flex-start; }
  .form-grid { grid-template-columns:1fr; }
  .form-field.full { grid-column:auto; }
  .modal { border-radius:22px; }
  .login-panel-wrap { padding:18px; }
  .login-card { padding:22px; }
}

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

/* ========================================================================== 
   HELPRITE DESK — APPLE SYSTEM UI REFINEMENT
   Uses Apple-like system neutrals, iOS semantic colours and supplied branding.
   ========================================================================== */
:root {
  color-scheme: dark;
  --bg: #000000;
  --bg-2: #000000;
  --panel: rgba(28, 28, 30, .92);
  --panel-solid: #1c1c1e;
  --panel-2: #2c2c2e;
  --panel-3: #3a3a3c;
  --text: #f5f5f7;
  --muted: #a1a1a6;
  --muted-2: #6e6e73;
  --line: rgba(255, 255, 255, .10);
  --line-strong: rgba(255, 255, 255, .16);
  --shadow: 0 24px 70px rgba(0, 0, 0, .44), 0 1px 0 rgba(255, 255, 255, .04) inset;
  --shadow-soft: 0 12px 34px rgba(0, 0, 0, .28), 0 1px 0 rgba(255, 255, 255, .035) inset;
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --blue: #0a84ff;
  --blue-2: #64d2ff;
  --green: #30d158;
  --mint: #63e6be;
  --orange: #ff9f0a;
  --yellow: #ffd60a;
  --red: #ff453a;
  --pink: #ff375f;
  --purple: #bf5af2;
  --cyan: #64d2ff;
  --indigo: #5e5ce6;
  --teal: #5ac8fa;
  --slate: #8e8e93;
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f5f7;
  --bg-2: #f5f5f7;
  --panel: rgba(255, 255, 255, .94);
  --panel-solid: #ffffff;
  --panel-2: #f2f2f7;
  --panel-3: #e5e5ea;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --muted-2: #8e8e93;
  --line: rgba(0, 0, 0, .08);
  --line-strong: rgba(0, 0, 0, .14);
  --shadow: 0 22px 60px rgba(0, 0, 0, .11), 0 1px 0 rgba(255, 255, 255, .85) inset;
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, .08), 0 1px 0 rgba(255, 255, 255, .8) inset;
  --blue: #007aff;
  --blue-2: #32ade6;
  --green: #34c759;
  --orange: #ff9500;
  --yellow: #ffcc00;
  --red: #ff3b30;
  --pink: #ff2d55;
  --purple: #af52de;
  --cyan: #32ade6;
  --indigo: #5856d6;
  --teal: #5ac8fa;
}

body {
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  letter-spacing: -.005em;
}

::selection { background: rgba(10, 132, 255, .32); }

.brand-on-light { display: none !important; }
[data-theme="light"] .brand-on-dark { display: none !important; }
[data-theme="light"] .brand-on-light { display: block !important; }

.brand-mark {
  width: 58px;
  height: 58px;
  padding: 4px;
  border: 0;
  border-radius: 18px;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.brand-mark:hover { transform: scale(1.035); background: rgba(255, 255, 255, .055); }
[data-theme="light"] .brand-mark:hover { background: rgba(0, 0, 0, .045); }

.brand-full { display: inline-flex; width: min(250px, 62vw); }
.brand-full img { display: block; width: 100%; height: auto; object-fit: contain; }
.login-card-logo { display: inline-flex; width: 190px; max-width: 72%; }
.login-card-logo img { width: 100%; height: auto; object-fit: contain; }

.sidebar {
  background: rgba(0, 0, 0, .82);
  border-right-color: rgba(255, 255, 255, .09);
  backdrop-filter: saturate(180%) blur(26px);
  -webkit-backdrop-filter: saturate(180%) blur(26px);
}
[data-theme="light"] .sidebar { background: rgba(245, 245, 247, .84); }

.side-link { border-radius: 16px; }
.side-link:hover { background: rgba(255, 255, 255, .08); transform: none; }
[data-theme="light"] .side-link:hover { background: rgba(0, 0, 0, .055); }
.side-link.active {
  color: #fff;
  background: var(--blue);
  box-shadow: 0 10px 26px rgba(10, 132, 255, .28);
}
.side-link .nav-tip { background: rgba(44, 44, 46, .98); border-color: rgba(255, 255, 255, .12); }
[data-theme="light"] .side-link .nav-tip { background: rgba(255, 255, 255, .98); color: #1d1d1f; border-color: rgba(0, 0, 0, .1); }

.topbar {
  background: rgba(0, 0, 0, .72);
  border-bottom-color: rgba(255, 255, 255, .09);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
}
[data-theme="light"] .topbar { background: rgba(245, 245, 247, .78); }

.icon-button,
.search-trigger,
.profile-button,
.btn {
  background: rgba(255, 255, 255, .075);
  border-color: rgba(255, 255, 255, .11);
  box-shadow: none;
}
[data-theme="light"] .icon-button,
[data-theme="light"] .search-trigger,
[data-theme="light"] .profile-button,
[data-theme="light"] .btn { background: rgba(255, 255, 255, .86); border-color: rgba(0, 0, 0, .08); }
.icon-button:hover,
.search-trigger:hover,
.btn:hover { background: rgba(255, 255, 255, .13); transform: none; }
[data-theme="light"] .icon-button:hover,
[data-theme="light"] .search-trigger:hover,
[data-theme="light"] .btn:hover { background: #fff; }

.avatar { background: var(--blue); box-shadow: none; }
.btn.primary {
  background: var(--blue);
  border-color: var(--blue);
  box-shadow: none;
}
.btn.primary:hover { background: #409cff; border-color: #409cff; }
[data-theme="light"] .btn.primary:hover { background: #0071e3; border-color: #0071e3; }

.page-title { font-weight: 740; letter-spacing: -.055em; }
.page-subtitle { color: var(--muted); }

.widget {
  border-color: rgba(255, 255, 255, .085);
  box-shadow: var(--shadow-soft);
}
[data-theme="light"] .widget { border-color: rgba(0, 0, 0, .06); }
.widget::after { display: none; }
.widget:hover { transform: translateY(-2px); filter: none; box-shadow: var(--shadow); }

.gradient-red { background: #ff453a; color: #fff; }
.gradient-blue { background: #0a84ff; color: #fff; }
.gradient-cyan { background: #64d2ff; color: #111; }
.gradient-green { background: #30d158; color: #07130b; }
.gradient-yellow { background: #ffd60a; color: #111; }
.gradient-orange { background: #ff9f0a; color: #111; }
.gradient-purple { background: #bf5af2; color: #fff; }
.gradient-pink { background: #ff375f; color: #fff; }
.gradient-dark { background: #1c1c1e; color: #fff; }
.gradient-light { background: #f2f2f7; color: #1d1d1f; }
[data-theme="light"] .gradient-red { background: #ff3b30; }
[data-theme="light"] .gradient-blue { background: #007aff; }
[data-theme="light"] .gradient-cyan { background: #32ade6; }
[data-theme="light"] .gradient-green { background: #34c759; }
[data-theme="light"] .gradient-yellow { background: #ffcc00; }
[data-theme="light"] .gradient-orange { background: #ff9500; }
[data-theme="light"] .gradient-purple { background: #af52de; }
[data-theme="light"] .gradient-pink { background: #ff2d55; }
[data-theme="light"] .gradient-dark { background: #1d1d1f; }
[data-theme="light"] .gradient-light { background: #fff; }

.widget .app-icon,
.module-widget .module-icon,
.module-widget .module-arrow { background: rgba(255, 255, 255, .2); box-shadow: none; }
.gradient-cyan .module-icon,
.gradient-cyan .module-arrow,
.gradient-yellow .module-icon,
.gradient-yellow .module-arrow,
.gradient-orange .module-icon,
.gradient-orange .module-arrow,
.gradient-green .module-icon,
.gradient-green .module-arrow { background: rgba(0, 0, 0, .12); }

.today-actions .btn { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.18); }
.today-actions .btn.primary { background: #fff; border-color: #fff; color: #ff3b30; }

.map-widget { background: #e6efe3; color: #1d2a20; }
.map-pin { background: #007aff; box-shadow: 0 10px 24px rgba(0, 122, 255, .28); }
.map-caption { background: rgba(255, 255, 255, .82); border: 1px solid rgba(0, 0, 0, .04); }

.stat-card,
.panel,
.module-card,
.platform-card,
.folder-card,
.detail-hero {
  background: var(--panel-solid);
  border-color: var(--line);
  box-shadow: var(--shadow-soft);
}
.stat-card:hover,
.module-card:hover,
.platform-card:hover,
.folder-card:hover { background: var(--panel-2); transform: translateY(-2px); }
[data-theme="light"] .stat-card:hover,
[data-theme="light"] .module-card:hover,
[data-theme="light"] .platform-card:hover,
[data-theme="light"] .folder-card:hover { background: #fff; }

.icon-tone-blue { background: rgba(10,132,255,.14); color:#0a84ff; }
.icon-tone-green { background: rgba(48,209,88,.14); color:#30d158; }
.icon-tone-orange { background: rgba(255,159,10,.14); color:#ff9f0a; }
.icon-tone-yellow { background: rgba(255,214,10,.14); color:#ffd60a; }
.icon-tone-purple { background: rgba(191,90,242,.14); color:#bf5af2; }
.icon-tone-cyan { background: rgba(100,210,255,.14); color:#64d2ff; }
.icon-tone-red { background: rgba(255,69,58,.14); color:#ff453a; }
.icon-tone-pink { background: rgba(255,55,95,.14); color:#ff375f; }
.icon-tone-indigo { background: rgba(94,92,230,.14); color:#7d7aff; }
.icon-tone-mint { background: rgba(99,230,190,.14); color:#63e6be; }
.icon-tone-teal { background: rgba(90,200,250,.14); color:#5ac8fa; }
.icon-tone-slate { background: rgba(142,142,147,.14); color:#aeaeb2; }
[data-theme="light"] .icon-tone-blue { color:#007aff; }
[data-theme="light"] .icon-tone-green { color:#248a3d; }
[data-theme="light"] .icon-tone-orange { color:#c93400; }
[data-theme="light"] .icon-tone-yellow { color:#8a6d00; }
[data-theme="light"] .icon-tone-purple { color:#8944ab; }
[data-theme="light"] .icon-tone-cyan { color:#0071a4; }
[data-theme="light"] .icon-tone-red { color:#d70015; }
[data-theme="light"] .icon-tone-pink { color:#d30f45; }
[data-theme="light"] .icon-tone-indigo { color:#3634a3; }
[data-theme="light"] .icon-tone-mint { color:#0f7f66; }
[data-theme="light"] .icon-tone-teal { color:#0071a4; }
[data-theme="light"] .icon-tone-slate { color:#636366; }

.badge-success { color:#30d158; }
.badge-warning { color:#ff9f0a; }
.badge-danger { color:#ff453a; }
.badge-info { color:#64d2ff; }
.badge-progress { color:#bf5af2; }
[data-theme="light"] .badge-success { color:#248a3d; }
[data-theme="light"] .badge-warning { color:#9a6700; }
[data-theme="light"] .badge-danger { color:#d70015; }
[data-theme="light"] .badge-info { color:#0071a4; }
[data-theme="light"] .badge-progress { color:#8944ab; }

.progress-line span { background: var(--blue); }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(10,132,255,.18); }

.mobile-nav { background: rgba(28, 28, 30, .88); }
[data-theme="light"] .mobile-nav { background: rgba(255, 255, 255, .9); }
.mobile-nav button.active { background: var(--blue); }

.login-page {
  background: #000;
  color: #f5f5f7;
}
.login-showcase {
  background: #000;
  position: relative;
  overflow: hidden;
}
.login-showcase::after {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  left: -220px;
  bottom: -280px;
  background: rgba(10,132,255,.12);
  filter: blur(2px);
  pointer-events: none;
}
.login-brand,
.login-hero,
.login-security-note { position: relative; z-index: 1; }
.login-hero h1 { font-weight: 720; letter-spacing: -.065em; }
.login-hero p { color: #a1a1a6; }
.login-mini { border: 1px solid rgba(255,255,255,.08); box-shadow: none; }
.login-security-note { color: #6e6e73; font-size: 11px; }
.login-panel-wrap {
  background: #f5f5f7;
  border-left: 0;
  backdrop-filter: none;
}
.login-card {
  color: #1d1d1f;
  background: #fff;
  border: 1px solid rgba(0,0,0,.06);
  border-radius: 28px;
  box-shadow: 0 28px 70px rgba(0,0,0,.16);
}
.login-card > p,
.login-card .form-field label,
.login-options,
.login-footer { color: #6e6e73; }
.login-card .form-field input {
  color: #1d1d1f;
  background: #f5f5f7;
  border-color: rgba(0,0,0,.08);
}
.login-card .form-field input:focus { border-color: #007aff; box-shadow: 0 0 0 3px rgba(0,122,255,.15); }
.login-options { display:flex; justify-content:space-between; align-items:center; margin:4px 0 10px; font-size:11px; }
.login-link { border:0; background:none; color:#007aff; cursor:pointer; padding:0; }
.login-card .brand-on-dark { display: none !important; }
.login-card .brand-on-light { display: block !important; }

@media (max-width: 900px) {
  .sidebar .brand-mark { margin: 0 0 8px; }
  .login-panel-wrap { background: #f5f5f7; }
}


/* ==============================================================
   Persistent role interface, adaptive branding and Apple back link
   Added without altering the original interface declarations above.
   ============================================================== */
.role-hidden { display: none !important; }
.dropdown-item.role-selected { color: var(--text); background: rgba(0,122,255,.11); }
.role-active-check { margin-left: auto; color: #0a84ff; display: inline-grid; place-items: center; }
.apple-back-link {
  width: max-content;
  min-height: 34px;
  margin: 0 0 14px;
  padding: 0 11px 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,.055);
  color: #0a84ff;
  font-size: 13px;
  font-weight: 620;
  letter-spacing: -.12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
  transition: transform .18s ease, background .18s ease, border-color .18s ease;
}
.apple-back-link:hover { transform: translateX(-2px); background: rgba(10,132,255,.10); border-color: rgba(10,132,255,.24); }
.apple-back-link:focus-visible { outline: 3px solid rgba(10,132,255,.22); outline-offset: 2px; }
[data-theme="light"] .apple-back-link { background: rgba(255,255,255,.82); box-shadow: 0 2px 10px rgba(0,0,0,.035); }

/* ==============================================================
   Apple-style authentication pages
   ============================================================== */
.apple-auth-page {
  min-height: 100vh;
  margin: 0;
  background: #000;
  color: #f5f5f7;
  display: grid;
  grid-template-rows: auto 1fr auto;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", Inter, Segoe UI, sans-serif;
}
[data-theme="light"] .apple-auth-page { background: #f5f5f7; color: #1d1d1f; }
.apple-auth-header {
  min-height: 64px;
  padding: 10px clamp(18px,3vw,40px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.76);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
}
[data-theme="light"] .apple-auth-header { background: rgba(250,250,252,.78); border-color: rgba(0,0,0,.08); }
.apple-auth-header .auth-wordmark { width: 146px; display: inline-flex; align-items: center; }
.apple-auth-header .auth-wordmark img { width: 100%; height: auto; object-fit: contain; }
.apple-auth-header-actions { display: flex; align-items: center; gap: 9px; }
.apple-auth-back {
  min-height: 36px;
  padding: 0 12px 0 9px;
  border-radius: 999px;
  border: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #2997ff;
  background: transparent;
  font-size: 14px;
  font-weight: 590;
}
.apple-auth-back:hover { background: rgba(255,255,255,.075); }
[data-theme="light"] .apple-auth-back:hover { background: rgba(0,0,0,.045); }
.auth-theme-button {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.13);
  background: rgba(255,255,255,.07);
  color: inherit;
  display: grid;
  place-items: center;
  cursor: pointer;
}
[data-theme="light"] .auth-theme-button { border-color: rgba(0,0,0,.09); background: rgba(255,255,255,.72); }
.apple-auth-main { display: grid; place-items: center; padding: 48px 20px 34px; }
.apple-auth-card {
  width: min(100%, 460px);
  text-align: center;
  padding: 8px 18px 24px;
}
.apple-auth-symbol {
  width: 82px;
  height: 82px;
  margin: 0 auto 24px;
  border-radius: 25px;
  display: grid;
  place-items: center;
  background: #fff;
  box-shadow: 0 20px 55px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.9);
}
.apple-auth-symbol img { width: 70px; height: 70px; object-fit: contain; }
[data-theme="light"] .apple-auth-symbol { box-shadow: 0 18px 48px rgba(0,0,0,.12); }
.apple-auth-card h1 { margin: 0; font-size: clamp(30px,5vw,40px); line-height: 1.08; letter-spacing: -.045em; font-weight: 700; }
.apple-auth-intro { margin: 12px auto 28px; max-width: 380px; color: #a1a1a6; font-size: 16px; line-height: 1.5; }
[data-theme="light"] .apple-auth-intro { color: #6e6e73; }
.apple-auth-form { text-align: left; }
.apple-auth-fields {
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 15px;
  background: #1c1c1e;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}
[data-theme="light"] .apple-auth-fields { background: #fff; border-color: rgba(0,0,0,.16); box-shadow: 0 5px 22px rgba(0,0,0,.055); }
.apple-auth-field { position: relative; border-bottom: 1px solid rgba(255,255,255,.11); }
.apple-auth-field:last-child { border-bottom: 0; }
[data-theme="light"] .apple-auth-field { border-color: rgba(0,0,0,.10); }
.apple-auth-field label { position: absolute; left: 16px; top: 8px; color: #8e8e93; font-size: 11px; pointer-events: none; }
.apple-auth-field input {
  width: 100%;
  min-height: 58px;
  padding: 24px 48px 7px 16px;
  border: 0;
  outline: 0;
  background: transparent;
  color: inherit;
  font-size: 16px;
  border-radius: 0;
}
.apple-auth-field:focus-within { box-shadow: inset 0 0 0 2px #0a84ff; z-index: 1; }
.auth-password-toggle { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: 0; border-radius: 50%; background: transparent; color: #8e8e93; display: grid; place-items: center; cursor: pointer; }
.auth-password-toggle:hover,.auth-password-toggle.active { color: #0a84ff; background: rgba(10,132,255,.10); }
.apple-auth-options { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 14px 2px 20px; color: #a1a1a6; font-size: 13px; }
[data-theme="light"] .apple-auth-options { color: #6e6e73; }
.apple-auth-check { display: inline-flex; align-items: center; gap: 8px; }
.apple-auth-link { color: #2997ff; font-weight: 560; }
.apple-auth-link:hover { text-decoration: underline; }
.apple-auth-submit {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 999px;
  background: #0071e3;
  color: #fff;
  font-size: 16px;
  font-weight: 650;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, opacity .18s ease;
}
.apple-auth-submit:hover { background: #0077ed; transform: translateY(-1px); }
.apple-auth-submit:disabled { opacity: .65; cursor: wait; transform: none; }
.apple-auth-secondary { width: 100%; min-height: 48px; margin-top: 11px; border-radius: 999px; border: 1px solid rgba(255,255,255,.17); background: transparent; color: inherit; display: inline-flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 600; }
[data-theme="light"] .apple-auth-secondary { border-color: rgba(0,0,0,.16); }
.apple-auth-note { margin: 22px auto 0; color: #6e6e73; font-size: 12px; line-height: 1.55; text-align: center; }
.apple-auth-status-icon { width: 70px; height: 70px; margin: 0 auto 23px; border-radius: 50%; display: grid; place-items: center; background: rgba(48,209,88,.14); color: #30d158; }
.apple-auth-status-icon.warning { background: rgba(255,159,10,.14); color: #ff9f0a; }
.apple-auth-email { color: inherit; font-weight: 650; }
.apple-auth-otp { display: grid; grid-template-columns: repeat(6,1fr); gap: 8px; margin: 6px 0 20px; }
.apple-auth-otp input { width: 100%; aspect-ratio: 1/1.12; min-width: 0; border-radius: 13px; border: 1px solid rgba(255,255,255,.16); background: #1c1c1e; color: inherit; text-align: center; font-size: 25px; font-weight: 650; outline: 0; }
.apple-auth-otp input:focus { border-color: #0a84ff; box-shadow: 0 0 0 3px rgba(10,132,255,.18); }
[data-theme="light"] .apple-auth-otp input { background: #fff; border-color: rgba(0,0,0,.16); }
.apple-auth-footer { padding: 18px 20px 26px; color: #6e6e73; font-size: 11px; text-align: center; }
@media (max-width: 600px) {
  .apple-auth-header { min-height: 58px; padding: 8px 14px; }
  .apple-auth-header .auth-wordmark { width: 124px; }
  .apple-auth-main { align-items: start; padding-top: 36px; }
  .apple-auth-card { padding-inline: 4px; }
  .apple-auth-card h1 { font-size: 31px; }
  .apple-auth-intro { font-size: 15px; }
  .apple-auth-otp { gap: 6px; }
  .apple-auth-otp input { border-radius: 11px; font-size: 21px; }
}


/* Revision 5: persistent role preview and complete Apple authentication flow. */
.role-preview-list { max-height: min(44vh, 360px); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.role-preview-list .dropdown-item { flex-shrink: 0; }
.auth-inline-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px 14px; margin-top: 17px; font-size: 13px; }
.auth-inline-links a { color: #2997ff; font-weight: 560; }
.auth-inline-links a:hover { text-decoration: underline; }


/* ===== Helprite Desk v6: Apple heading, controls and feedback ===== */

/* Back action: right side of the title area, with existing page actions beneath it. */
.page-heading {
  align-items: flex-start;
}
.page-heading-side {
  flex: 0 0 auto;
  min-width: max-content;
  padding-top: 26px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: flex-start;
  gap: 16px;
}
.page-heading-side .page-actions {
  max-width: 540px;
}
.apple-back-link.page-heading-back {
  margin: 0;
  min-height: 38px;
  padding: 0 14px 0 10px;
  background: rgba(44,44,46,.72);
  border-color: rgba(255,255,255,.14);
  color: #0a84ff;
  box-shadow: 0 1px 0 rgba(255,255,255,.06) inset, 0 5px 18px rgba(0,0,0,.16);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}
[data-theme="light"] .apple-back-link.page-heading-back {
  background: rgba(255,255,255,.82);
  border-color: rgba(0,0,0,.10);
  color: #007aff;
  box-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 5px 18px rgba(0,0,0,.06);
}
.apple-back-link.page-heading-back:hover {
  transform: translateY(-1px);
  background: rgba(58,58,60,.9);
}
[data-theme="light"] .apple-back-link.page-heading-back:hover {
  background: #fff;
}

/* Apple form control tokens. */
:root[data-theme="dark"] {
  --apple-control-bg: #1c1c1e;
  --apple-control-bg-hover: #242426;
  --apple-control-border: rgba(255,255,255,.14);
  --apple-control-border-strong: rgba(255,255,255,.22);
  --apple-control-placeholder: #636366;
  --apple-control-disabled: #151517;
  --apple-control-shadow: 0 1px 0 rgba(255,255,255,.055) inset, 0 1px 2px rgba(0,0,0,.20);
  --apple-alert-bg: rgba(38,38,40,.94);
  --apple-alert-separator: rgba(255,255,255,.13);
}
:root[data-theme="light"] {
  --apple-control-bg: #ffffff;
  --apple-control-bg-hover: #f9f9fb;
  --apple-control-border: rgba(0,0,0,.14);
  --apple-control-border-strong: rgba(0,0,0,.22);
  --apple-control-placeholder: #8e8e93;
  --apple-control-disabled: #f2f2f7;
  --apple-control-shadow: 0 1px 0 rgba(255,255,255,.9) inset, 0 1px 2px rgba(0,0,0,.045);
  --apple-alert-bg: rgba(248,248,250,.96);
  --apple-alert-separator: rgba(0,0,0,.12);
}

.static-form .panel-body {
  padding: 24px;
}
.static-form .form-grid {
  gap: 18px 16px;
}
.static-form .form-field {
  gap: 8px;
}
.static-form .form-field label {
  color: var(--text);
  font-size: 13px;
  line-height: 1.3;
  font-weight: 650;
  letter-spacing: -.08px;
}
.static-form .form-field label .required,
.static-form .required {
  color: #ff453a;
}
.static-form .form-field input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
.static-form .form-field select,
.static-form .form-field textarea,
.form-field input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]),
.form-field select,
.form-field textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 1px solid var(--apple-control-border);
  border-radius: 12px;
  background-color: var(--apple-control-bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", Inter, "Segoe UI", sans-serif;
  font-size: 15px;
  font-weight: 430;
  line-height: 1.35;
  letter-spacing: -.12px;
  outline: none;
  box-shadow: var(--apple-control-shadow);
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}
.static-form .form-field textarea,
.form-field textarea {
  min-height: 118px;
  padding-top: 13px;
  resize: vertical;
}
.static-form .form-field input::placeholder,
.static-form .form-field textarea::placeholder,
.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--apple-control-placeholder);
  opacity: 1;
}
.static-form .form-field input:hover:not(:disabled):not([readonly]),
.static-form .form-field select:hover:not(:disabled),
.static-form .form-field textarea:hover:not(:disabled):not([readonly]),
.form-field input:hover:not(:disabled):not([readonly]),
.form-field select:hover:not(:disabled),
.form-field textarea:hover:not(:disabled):not([readonly]) {
  background-color: var(--apple-control-bg-hover);
  border-color: var(--apple-control-border-strong);
}
.static-form .form-field input:focus,
.static-form .form-field select:focus,
.static-form .form-field textarea:focus,
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: #0a84ff;
  background-color: var(--apple-control-bg);
  box-shadow: 0 0 0 4px rgba(10,132,255,.18), var(--apple-control-shadow);
}
[data-theme="light"] .static-form .form-field input:focus,
[data-theme="light"] .static-form .form-field select:focus,
[data-theme="light"] .static-form .form-field textarea:focus,
[data-theme="light"] .form-field input:focus,
[data-theme="light"] .form-field select:focus,
[data-theme="light"] .form-field textarea:focus {
  border-color: #007aff;
  box-shadow: 0 0 0 4px rgba(0,122,255,.14), var(--apple-control-shadow);
}
.static-form .form-field:focus-within > label,
.form-field:focus-within > label {
  color: #0a84ff;
}
[data-theme="light"] .static-form .form-field:focus-within > label,
[data-theme="light"] .form-field:focus-within > label {
  color: #007aff;
}

/* Native selects with a restrained macOS chevron. */
.static-form .form-field select,
.form-field select,
.select-shell {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 42px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a1a1a6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px;
}
.static-form select option,
.form-field select option,
.select-shell option {
  background: #1c1c1e;
  color: #f5f5f7;
  font-size: 15px;
}
[data-theme="light"] .static-form select option,
[data-theme="light"] .form-field select option,
[data-theme="light"] .select-shell option {
  background: #fff;
  color: #1d1d1f;
}

/* Date, time and date-time inputs keep native Apple controls but match the surface. */
:root[data-theme="dark"] input[type="date"],
:root[data-theme="dark"] input[type="time"],
:root[data-theme="dark"] input[type="datetime-local"],
:root[data-theme="dark"] input[type="month"],
:root[data-theme="dark"] input[type="week"] {
  color-scheme: dark;
}
:root[data-theme="light"] input[type="date"],
:root[data-theme="light"] input[type="time"],
:root[data-theme="light"] input[type="datetime-local"],
:root[data-theme="light"] input[type="month"],
:root[data-theme="light"] input[type="week"] {
  color-scheme: light;
}
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator,
input[type="week"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: .72;
}

/* Apple checkbox and radio treatment. */
.static-form input[type="checkbox"],
.static-form input[type="radio"],
[data-permission-section] input[type="checkbox"],
.apple-auth-check input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-height: 20px;
  margin: 0;
  flex: 0 0 20px;
  accent-color: #0a84ff;
}

/* File controls follow the same rounded control surface. */
.static-form input[type="file"]::file-selector-button,
.form-field input[type="file"]::file-selector-button {
  margin: -5px 12px -5px -7px;
  min-height: 36px;
  padding: 0 13px;
  border: 0;
  border-radius: 9px;
  background: rgba(10,132,255,.14);
  color: #0a84ff;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}
[data-theme="light"] .static-form input[type="file"]::file-selector-button,
[data-theme="light"] .form-field input[type="file"]::file-selector-button {
  color: #007aff;
  background: rgba(0,122,255,.10);
}

/* Read-only View pages are unmistakably non-editable. */
.static-form[data-form-mode="view"] input,
.static-form[data-form-mode="view"] select,
.static-form[data-form-mode="view"] textarea,
.static-form[data-readonly-view="true"] input,
.static-form[data-readonly-view="true"] select,
.static-form[data-readonly-view="true"] textarea {
  opacity: 1;
  color: var(--text);
  background-color: var(--apple-control-disabled);
  border-color: transparent;
  box-shadow: none;
  cursor: default;
  -webkit-text-fill-color: var(--text);
}
.static-form[data-form-mode="view"] .form-field:focus-within > label,
.static-form[data-readonly-view="true"] .form-field:focus-within > label {
  color: var(--text);
}

/* Search and filter controls use the same Apple method without changing layout. */
.input-shell,
.select-shell {
  min-height: 42px;
  border-radius: 12px;
  border-color: var(--apple-control-border);
  background-color: var(--apple-control-bg);
  box-shadow: var(--apple-control-shadow);
}
.input-shell input,
.table-search,
.select-shell,
.table-filter {
  font-size: 14px;
}
.select-shell:focus,
.table-filter:focus,
.table-search:focus {
  border-color: #0a84ff;
  box-shadow: 0 0 0 4px rgba(10,132,255,.16), var(--apple-control-shadow);
}

/* Existing modal windows restyled as macOS/iOS system sheets. */
.modal-backdrop {
  background: rgba(0,0,0,.46);
  -webkit-backdrop-filter: saturate(120%) blur(18px);
  backdrop-filter: saturate(120%) blur(18px);
}
.modal {
  width: min(620px,100%);
  border: 1px solid var(--apple-alert-separator);
  border-radius: 22px;
  background: var(--apple-alert-bg);
  box-shadow: 0 28px 90px rgba(0,0,0,.42), 0 1px 0 rgba(255,255,255,.08) inset;
  -webkit-backdrop-filter: saturate(180%) blur(34px);
  backdrop-filter: saturate(180%) blur(34px);
}
.modal-header {
  padding: 22px 22px 18px;
  border-color: var(--apple-alert-separator);
}
.modal-header h3 {
  font-size: 20px;
  font-weight: 720;
  letter-spacing: -.45px;
}
.modal-header p {
  font-size: 13px;
  line-height: 1.45;
}
.modal-body { padding: 22px; }
.modal-footer {
  padding: 16px 22px 22px;
  border-top: 1px solid var(--apple-alert-separator);
}

/* Apple feedback notifications. */
.toast-stack {
  top: calc(var(--topbar-h) + 14px);
  right: 22px;
  bottom: auto;
  width: min(380px, calc(100vw - 32px));
  gap: 10px;
  pointer-events: none;
}
.apple-auth-page .toast-stack { top: 78px; }
.toast {
  min-width: 0;
  width: 100%;
  max-width: none;
  padding: 12px 14px 12px 12px;
  border: 1px solid var(--apple-alert-separator);
  border-radius: 17px;
  background: var(--apple-alert-bg);
  box-shadow: 0 18px 55px rgba(0,0,0,.30), 0 1px 0 rgba(255,255,255,.08) inset;
  gap: 11px;
  pointer-events: auto;
  -webkit-backdrop-filter: saturate(180%) blur(28px);
  backdrop-filter: saturate(180%) blur(28px);
}
.toast-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  background: #0a84ff;
  box-shadow: 0 5px 14px rgba(10,132,255,.24);
}
.toast.toast-success .toast-icon { background:#30d158; box-shadow:0 5px 14px rgba(48,209,88,.22); }
.toast.toast-danger .toast-icon { background:#ff453a; box-shadow:0 5px 14px rgba(255,69,58,.22); }
.toast.toast-warning .toast-icon { background:#ff9f0a; box-shadow:0 5px 14px rgba(255,159,10,.22); }
.toast-copy { min-width: 0; }
.toast-copy strong {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -.12px;
}
.toast-copy span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

/* Apple alert/prompt created by shared JavaScript. */
.apple-alert-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  padding: 22px;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,.46);
  opacity: 0;
  transition: opacity .18s ease;
  -webkit-backdrop-filter: saturate(120%) blur(18px);
  backdrop-filter: saturate(120%) blur(18px);
}
.apple-alert-backdrop.open { opacity: 1; }
.apple-alert {
  width: min(370px,100%);
  overflow: hidden;
  border: 1px solid var(--apple-alert-separator);
  border-radius: 22px;
  background: var(--apple-alert-bg);
  color: var(--text);
  text-align: center;
  box-shadow: 0 34px 110px rgba(0,0,0,.46), 0 1px 0 rgba(255,255,255,.10) inset;
  transform: scale(.94) translateY(8px);
  opacity: 0;
  transition: transform .2s cubic-bezier(.2,.8,.2,1), opacity .18s ease;
  -webkit-backdrop-filter: saturate(180%) blur(36px);
  backdrop-filter: saturate(180%) blur(36px);
}
.apple-alert-backdrop.open .apple-alert {
  transform: scale(1) translateY(0);
  opacity: 1;
}
.apple-alert-content { padding: 24px 25px 21px; }
.apple-alert-icon {
  width: 50px;
  height: 50px;
  margin: 0 auto 14px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  color: #fff;
  background: #0a84ff;
  box-shadow: 0 10px 25px rgba(10,132,255,.22);
}
.apple-alert-icon.success { background:#30d158; box-shadow:0 10px 25px rgba(48,209,88,.20); }
.apple-alert-icon.warning { background:#ff9f0a; box-shadow:0 10px 25px rgba(255,159,10,.22); }
.apple-alert-icon.danger { background:#ff453a; box-shadow:0 10px 25px rgba(255,69,58,.22); }
.apple-alert-title {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 740;
  letter-spacing: -.38px;
}
.apple-alert-message {
  margin: 8px auto 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
  max-width: 300px;
}
.apple-alert-actions {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  border-top: 1px solid var(--apple-alert-separator);
}
.apple-alert-button {
  min-height: 50px;
  padding: 0 14px;
  border: 0;
  border-left: 1px solid var(--apple-alert-separator);
  background: transparent;
  color: #0a84ff;
  font: inherit;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}
.apple-alert-button:first-child { border-left: 0; }
.apple-alert-button:hover { background: rgba(255,255,255,.065); }
[data-theme="light"] .apple-alert-button { color: #007aff; }
[data-theme="light"] .apple-alert-button:hover { background: rgba(0,0,0,.035); }
.apple-alert-button.primary { font-weight: 740; }
.apple-alert-button.destructive { color: #ff453a; }
[data-theme="light"] .apple-alert-button.destructive { color: #d70015; }

@media (max-width: 760px) {
  .page-heading-side {
    width: 100%;
    min-width: 0;
    padding-top: 0;
    gap: 12px;
  }
  .apple-back-link.page-heading-back { align-self: flex-end; }
  .page-heading-side .page-actions {
    width: 100%;
    max-width: none;
    justify-content: flex-start;
  }
  .static-form .panel-body { padding: 18px; }
  .toast-stack { top: 14px; right: 16px; }
}

/* Fully controlled Apple checkbox and radio appearance. */
.static-form input[type="checkbox"],
[data-permission-section] input[type="checkbox"],
.apple-auth-check input[type="checkbox"] {
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  width: 20px;
  height: 20px;
  min-height: 20px;
  padding: 0;
  border: 1px solid var(--apple-control-border-strong);
  border-radius: 6px;
  background: var(--apple-control-bg);
  box-shadow: var(--apple-control-shadow);
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.static-form input[type="checkbox"]:checked,
[data-permission-section] input[type="checkbox"]:checked,
.apple-auth-check input[type="checkbox"]:checked {
  border-color: #0a84ff;
  background: #0a84ff;
  box-shadow: 0 2px 7px rgba(10,132,255,.28);
}
.static-form input[type="checkbox"]:checked::after,
[data-permission-section] input[type="checkbox"]:checked::after,
.apple-auth-check input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.static-form input[type="radio"] {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  min-height: 20px;
  padding: 0;
  border: 1px solid var(--apple-control-border-strong);
  border-radius: 50%;
  background: var(--apple-control-bg);
  box-shadow: var(--apple-control-shadow);
  cursor: pointer;
}
.static-form input[type="radio"]:checked {
  border: 6px solid #0a84ff;
  background: #fff;
}
.static-form input[type="checkbox"]:focus-visible,
.static-form input[type="radio"]:focus-visible,
[data-permission-section] input[type="checkbox"]:focus-visible,
.apple-auth-check input[type="checkbox"]:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 4px rgba(10,132,255,.18);
}
.static-form input[type="checkbox"]:disabled,
.static-form input[type="radio"]:disabled,
[data-permission-section] input[type="checkbox"]:disabled,
.apple-auth-check input[type="checkbox"]:disabled {
  opacity: .52;
  cursor: default;
}

/* ========================================================================== 
   HELPRITE DESK v7 — MOBILE/TABLET RESPONSIVE REFINEMENT
   Keeps the existing Apple visual language and only improves responsive flow.
   ========================================================================== */
html { -webkit-text-size-adjust: 100%; }
body { overflow-x: hidden; }
.topbar-left,
.topbar-actions,
.topbar-title-wrap,
.page-heading > div:first-child,
.panel-header > *,
.toolbar-left,
.toolbar-right { min-width: 0; }
.icon-button svg,
.search-trigger svg,
.profile-button svg,
.mobile-nav svg,
.app-icon svg { display: block; margin: auto; }
.data-table-wrap {
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-inline: contain;
}
.tab-button[aria-selected="true"] { color: var(--text); }
.tab-button:focus-visible,
.nexa-nav button:focus-visible {
  outline: 3px solid rgba(10,132,255,.20);
  outline-offset: 1px;
}
[data-tab-panel][hidden] { display: none !important; }

@media (max-width: 1024px) {
  .panel-header,
  .toolbar {
    flex-wrap: wrap;
  }
  .panel-header > .tabs,
  .toolbar-left > .tabs {
    max-width: 100%;
  }
  .tabs {
    max-width: 100%;
  }
  .platform-card,
  .property-card,
  .account-card,
  .report-card,
  .module-card,
  .folder-card {
    min-width: 0;
  }
}

@media (max-width: 760px) {
  :root { --topbar-h: 68px; }

  .topbar {
    min-height: var(--topbar-h);
    height: var(--topbar-h);
    padding: 0 12px;
    gap: 8px;
  }
  .topbar-left {
    flex: 1 1 auto;
    gap: 8px;
    overflow: hidden;
  }
  .topbar-title-wrap { flex: 1 1 auto; overflow: hidden; }
  .topbar-title {
    max-width: none;
    font-size: 15px;
    line-height: 1.15;
  }
  .topbar-actions {
    flex: 0 0 auto;
    gap: 4px;
  }
  .mobile-menu-button,
  .topbar .icon-button,
  .topbar .search-trigger,
  .topbar .profile-button {
    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;
    border-radius: 13px;
    padding: 0;
  }
  .topbar .profile-button .avatar {
    width: 30px;
    height: 30px;
    border-radius: 10px;
  }
  .topbar .profile-button > svg { display: none; }

  .main-content {
    padding: calc(var(--topbar-h) + 16px) 14px calc(92px + env(safe-area-inset-bottom));
  }
  .page { width: 100%; min-width: 0; }
  .page-heading {
    width: 100%;
    gap: 16px;
    margin-bottom: 18px;
  }
  .page-title {
    font-size: clamp(31px, 9vw, 38px);
    line-height: 1.02;
    letter-spacing: -.055em;
    overflow-wrap: anywhere;
  }
  .page-description {
    max-width: 100%;
    font-size: 14px;
    line-height: 1.55;
  }
  .page-heading-side {
    width: 100%;
    min-width: 0;
    gap: 12px;
  }
  .page-heading-side .page-actions {
    width: 100%;
    max-width: 100%;
    gap: 8px;
    flex-wrap: wrap;
  }
  .page-heading-side .page-actions .btn {
    max-width: 100%;
  }

  /* Keep page/module menus in a compact two-column Apple grid on phones. */
  .stats-grid,
  .module-grid,
  .platform-grid,
  .property-grid,
  .account-grid,
  .report-grid,
  .folder-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
  .stat-card {
    min-height: 126px;
    padding: 14px;
  }
  .stat-top { gap: 7px; }
  .stat-value { font-size: 28px; }
  .stat-label { font-size: 11px; }
  .stat-meta {
    max-width: 78px;
    font-size: 10px;
    text-align: right;
    line-height: 1.25;
  }
  .module-card,
  .folder-card {
    min-height: 158px;
    padding: 14px;
  }
  .platform-card,
  .property-card,
  .account-card,
  .report-card {
    min-height: 188px;
    padding: 14px;
  }
  .module-card h3,
  .folder-card h3,
  .platform-card h3,
  .property-card h3,
  .account-card h3,
  .report-card h3 {
    margin-top: 15px;
    font-size: 15px;
    line-height: 1.18;
    overflow-wrap: anywhere;
  }
  .module-card p,
  .folder-card p,
  .platform-card p,
  .property-card p,
  .account-card p,
  .report-card p {
    max-width: 100%;
    font-size: 10.5px;
    line-height: 1.38;
  }
  .module-card-arrow { margin-left: 5px; }
  .app-icon { width: 40px; height: 40px; border-radius: 13px; }
  .app-icon.small { width: 34px; height: 34px; border-radius: 11px; }

  /* Tabs become a true two-column segmented menu instead of overflowing. */
  .panel-header {
    align-items: center;
    padding: 14px;
  }
  .panel-header > .tabs {
    flex: 1 1 calc(100% - 50px);
    order: 1;
  }
  .panel-header > .icon-button {
    order: 2;
    flex: 0 0 auto;
  }
  .tabs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
    overflow: visible;
  }
  .tab-button {
    width: 100%;
    min-width: 0;
    min-height: 39px;
    padding: 8px 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: normal;
    text-align: center;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }
  .nexa-nav {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0,1fr));
    overflow: visible;
  }
  .nexa-nav button {
    width: 100%;
    min-width: 0;
    padding: 0 9px;
    white-space: normal;
    line-height: 1.2;
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
    padding: 13px 14px;
  }
  .toolbar-left,
  .toolbar-right {
    width: 100%;
    align-items: stretch;
  }
  .toolbar-left .input-shell,
  .toolbar-left .select-shell,
  .toolbar-left .table-filter {
    width: 100%;
    flex: 1 1 100%;
    min-width: 0;
  }
  .toolbar-left > .tabs { flex: 1 1 100%; }
  .toolbar-right { justify-content: flex-start; }
  .toolbar[data-pagination-for] .toolbar-right {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }
  .toolbar[data-pagination-for] .toolbar-right > * { flex: 0 0 auto; }

  .data-table { min-width: 680px; }
  .data-table th { padding: 11px 14px; }
  .data-table td { padding: 13px 14px; }

  .detail-identity { align-items: flex-start; }
  .detail-identity h2 { font-size: 21px; }
  .detail-actions { width: 100%; justify-content: flex-start; }
  .detail-actions .btn { flex: 1 1 auto; }

  .mobile-nav {
    left: 12px;
    right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    height: 64px;
    padding: 6px;
    align-items: stretch;
  }
  .mobile-nav a,
  .mobile-nav button {
    min-width: 0;
    min-height: 50px;
    border: 0;
    border-radius: 16px;
    background: transparent;
    color: var(--muted);
    display: grid;
    place-items: center;
    text-decoration: none;
    cursor: pointer;
  }
  .mobile-nav a.active,
  .mobile-nav button.active {
    color: #fff;
    background: var(--blue);
  }
  [data-theme="light"] .mobile-nav a.active,
  [data-theme="light"] .mobile-nav button.active { color: #fff; }

  /* Mobile dropdowns behave like Apple bottom sheets and no longer fall off-screen. */
  #profileDropdown,
  #recordActionsDropdown {
    left: 12px !important;
    right: 12px !important;
    top: auto !important;
    bottom: calc(84px + env(safe-area-inset-bottom)) !important;
    width: auto;
    min-width: 0;
    max-height: calc(100dvh - 116px - env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
    border-radius: 22px;
  }
  .role-preview-list { max-height: min(38vh, 300px); }

  .drawer {
    width: min(410px, 100vw);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .modal-backdrop,
  .apple-alert-backdrop {
    padding: 14px;
    padding-bottom: calc(14px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 520px) {
  .topbar { padding-inline: 10px; }
  .topbar-actions { gap: 3px; }
  .mobile-menu-button,
  .topbar .icon-button,
  .topbar .search-trigger,
  .topbar .profile-button {
    width: 36px;
    min-width: 36px;
    height: 36px;
    min-height: 36px;
    border-radius: 12px;
  }
  .topbar-title { font-size: 14px; }
  .topbar .profile-button .avatar { width: 28px; height: 28px; }
  .main-content { padding-inline: 12px; }

  .module-card,
  .folder-card { min-height: 150px; padding: 13px; }
  .platform-card,
  .property-card,
  .account-card,
  .report-card { min-height: 176px; padding: 13px; }
  .module-card h3,
  .folder-card h3,
  .platform-card h3,
  .property-card h3,
  .account-card h3,
  .report-card h3 { font-size: 14px; }
  .account-meta { grid-template-columns: 1fr; }
  .card-actions { display: grid; grid-template-columns: 1fr; }
  .card-actions .btn { width: 100%; }
}

@media (max-width: 430px) {
  /* Lower-priority actions remain available in the side menu on narrow phones. */
  .topbar-actions > a[href="reports.php"],
  .topbar-actions > a[href="admin.php"] { display: none; }
  .topbar-title { font-size: 14px; }
  .page-title { font-size: 31px; }
}

/* ========================================================================== 
   HELPRITE DESK v8 — MENU, HEADING AND MOBILE NAVIGATION REFINEMENT
   Preserves the existing Apple interface while applying the requested layout.
   ========================================================================== */

/* Remove decorative corner colour/glow from every menu grid card. */
.module-card::after,
.folder-card::after {
  display: none !important;
  content: none !important;
}
.module-card,
.folder-card,
.platform-card,
.property-card,
.account-card,
.report-card {
  background-image: none !important;
  background-color: var(--panel-solid) !important;
}

/* A clear Apple-style visual divider between statistics and menu options. */
.section-divider {
  width: 100%;
  min-width: 0;
  margin: 20px 0 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
}
.section-divider::after {
  content: "";
  height: 1px;
  flex: 1 1 auto;
  background: var(--line-strong);
}
.section-divider > span {
  flex: 0 0 auto;
  font-size: 14px;
  line-height: 1;
  font-weight: 720;
  letter-spacing: -.18px;
}
.panel-body > .section-divider:first-child { margin-top: 0; }

/* Back is part of the title row on every application page. */
.page-heading-copy {
  flex: 1 1 auto;
  min-width: 0;
}
.page-title-row {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.page-title-row .page-title {
  flex: 1 1 auto;
  min-width: 0;
}
.page-title-row .page-heading-back {
  flex: 0 0 auto;
  margin: 1px 0 0;
}
.page-heading-side {
  padding-top: 26px;
}

/* Profile initials/photo fully cover the mobile profile button. */
.avatar img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: inherit;
}

/* Mobile sidebar close control. */
.sidebar-mobile-head { display: contents; }
.sidebar-close-button,
.sidebar-scrim { display: none; }

@media (max-width: 900px) {
  .sidebar {
    z-index: 82;
  }
  .sidebar-mobile-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
    min-height: 58px;
    padding: 0 2px 8px;
  }
  .sidebar-mobile-head .brand-mark {
    margin: 0;
  }
  .sidebar-close-button {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.07);
    color: var(--text);
    cursor: pointer;
  }
  [data-theme="light"] .sidebar-close-button {
    background: rgba(255,255,255,.88);
    border-color: rgba(0,0,0,.08);
  }
  .sidebar-scrim {
    position: fixed;
    inset: 0;
    z-index: 81;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(0,0,0,.30);
    opacity: 0;
    pointer-events: none;
    transition: opacity .22s ease;
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
  }
  .sidebar.open + .sidebar-scrim {
    display: block;
    opacity: 1;
    pointer-events: auto;
  }

  /* Remove the unintended white pills behind sidebar menu labels. */
  .sidebar .side-link .nav-tip,
  [data-theme="light"] .sidebar .side-link .nav-tip {
    position: static !important;
    opacity: 1 !important;
    transform: none !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: inherit !important;
    font-size: 14px !important;
    line-height: 1.25;
    font-weight: 560;
    pointer-events: none;
  }
  .sidebar .side-link {
    min-height: 50px;
    gap: 14px;
  }
  .sidebar .side-link svg { flex: 0 0 auto; }

  .topbar .profile-button {
    padding: 0;
    overflow: hidden;
    border: 0;
    background: transparent;
  }
  .topbar .profile-button .avatar {
    width: 100% !important;
    height: 100% !important;
    border-radius: inherit !important;
    box-shadow: none;
  }
}

@media (max-width: 760px) {
  /* Title and Back stay on the same line; other actions remain below. */
  .page-heading {
    align-items: stretch;
    gap: 12px;
  }
  .page-title-row {
    align-items: center;
    gap: 10px;
  }
  .page-title-row .page-title {
    font-size: clamp(28px, 8.2vw, 36px);
    line-height: 1.04;
  }
  .page-title-row .page-heading-back {
    min-height: 36px;
    padding: 0 12px 0 9px;
    white-space: nowrap;
  }
  .page-heading-side {
    width: 100%;
    padding-top: 0;
    gap: 10px;
  }
  .page-heading-side .page-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .section-divider {
    margin: 18px 0 12px;
    gap: 10px;
  }
  .section-divider > span { font-size: 15px; }

  /* Home: Today remains full width, all remaining widgets form a two-column grid. */
  body[data-page-route="/home"] .bento-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: auto;
    gap: 10px;
  }
  body[data-page-route="/home"] .bento-grid > .widget {
    grid-column: span 1 !important;
    grid-row: auto !important;
    min-width: 0;
    min-height: 205px;
  }
  body[data-page-route="/home"] .bento-grid > .today-widget {
    grid-column: 1 / -1 !important;
    min-height: 410px;
  }
  body[data-page-route="/home"] .bento-grid > .map-widget {
    min-height: 205px;
  }
  body[data-page-route="/home"] .module-widget .widget-content {
    padding: 15px;
  }
  body[data-page-route="/home"] .module-widget .module-copy h3 {
    font-size: 17px;
    line-height: 1.12;
  }
  body[data-page-route="/home"] .module-widget .module-copy p {
    font-size: 11px;
  }
  body[data-page-route="/home"] .module-widget .module-icon {
    width: 46px;
    height: 46px;
    border-radius: 15px;
  }
}

@media (max-width: 430px) {
  .page-title-row { gap: 8px; }
  .page-title-row .page-title { font-size: 28px; }
  .page-title-row .page-heading-back {
    min-height: 34px;
    padding-inline: 8px 10px;
    font-size: 12px;
  }
  body[data-page-route="/home"] .bento-grid > .widget { min-height: 190px; }
  body[data-page-route="/home"] .bento-grid > .today-widget { min-height: 405px; }
  body[data-page-route="/home"] .module-widget .module-copy h3 { font-size: 15px; }
  body[data-page-route="/home"] .module-widget .module-copy p { font-size: 10px; }
}


/* ========================================================================== 
   HELPRITE DESK v9 — MOBILE TOPBAR BRAND
   On phone and tablet layouts, replace the current page title in the fixed
   header with the official Helprite Desk logo. Desktop layout is unchanged.
   ========================================================================== */
.mobile-topbar-brand {
  display: none;
  align-items: center;
  justify-content: flex-start;
  flex: 0 1 112px;
  width: 112px;
  height: 38px;
  min-width: 82px;
  overflow: hidden;
}
.mobile-topbar-brand img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
}

@media (max-width: 760px) {
  .topbar-title-wrap {
    display: none !important;
  }
  .mobile-topbar-brand {
    display: flex;
  }
}

@media (max-width: 520px) {
  .mobile-topbar-brand {
    flex-basis: 104px;
    width: 104px;
    height: 36px;
  }
}

@media (max-width: 390px) {
  .mobile-topbar-brand {
    flex-basis: 92px;
    width: 92px;
    min-width: 74px;
    height: 34px;
  }
}


/* ===== Helprite Drive v10: Google Drive / iCloud inspired workspace ===== */
:root{
  --drive-accent:#0aa7ad;
  --drive-accent-strong:#078e94;
  --drive-blue:#0a84ff;
  --drive-bg:#f5f7fa;
  --drive-surface:#ffffff;
  --drive-surface-2:#f8fafc;
  --drive-border:#dce3eb;
  --drive-text:#071a3a;
  --drive-muted:#69778f;
  --drive-folder:#e7ba2d;
  --drive-shadow:0 14px 36px rgba(35,48,68,.08);
}
[data-theme="dark"]{
  --drive-bg:#08111f;
  --drive-surface:#101b2b;
  --drive-surface-2:#132237;
  --drive-border:rgba(255,255,255,.10);
  --drive-text:#f5f8fc;
  --drive-muted:#91a0b5;
  --drive-folder:#e6b92e;
  --drive-shadow:0 18px 45px rgba(0,0,0,.28);
}
.drive-experience{background:var(--drive-bg);}
.drive-experience .main-content.drive-main-content{padding:calc(var(--topbar-h) + 14px) 14px 24px;background:var(--drive-bg);}
.drive-workspace{display:grid;grid-template-columns:310px minmax(0,1fr);gap:14px;max-width:1880px;margin:0 auto;align-items:start;min-height:calc(100vh - var(--topbar-h) - 38px);color:var(--drive-text);}
.drive-local-sidebar{position:sticky;top:calc(var(--topbar-h) + 14px);max-height:calc(100vh - var(--topbar-h) - 28px);overflow:auto;scrollbar-width:thin;background:var(--drive-surface);border:1px solid var(--drive-border);border-radius:14px;padding:18px;box-shadow:0 1px 0 rgba(255,255,255,.35) inset;}
.drive-user-card{display:flex;align-items:center;gap:12px;padding:0 0 16px;border-bottom:1px solid var(--drive-border);}
.drive-user-avatar,.drive-table-avatar{display:grid;place-items:center;color:#fff;background:linear-gradient(145deg,#31a9ff,#0074e8);font-weight:750;overflow:hidden;box-shadow:inset 0 1px 0 rgba(255,255,255,.35);}
.drive-user-avatar{width:42px;height:42px;border-radius:50%;font-size:12px;flex:0 0 auto;}
.drive-user-card div{min-width:0}.drive-user-card strong{display:block;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drive-user-card span:last-child{display:block;color:var(--drive-muted);font-size:12px;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.drive-dropzone-mini{width:100%;min-height:116px;margin:16px 0;padding:14px;border:1px dashed var(--drive-border);border-radius:10px;background:var(--drive-surface);color:var(--drive-text);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;cursor:pointer;transition:.2s ease}.drive-dropzone-mini>svg{width:34px;height:34px;padding:8px;border-radius:7px;color:#fff;background:var(--drive-accent)}.drive-dropzone-mini strong{font-size:14px}.drive-dropzone-mini span{font-size:12px;color:var(--drive-muted)}.drive-dropzone-mini:hover{border-color:var(--drive-accent);background:color-mix(in srgb,var(--drive-accent) 5%,var(--drive-surface))}
.drive-local-nav{display:grid;gap:3px;padding-bottom:16px;border-bottom:1px solid var(--drive-border)}.drive-local-link{min-height:36px;border-radius:7px;display:flex;align-items:center;gap:9px;padding:0 8px;color:var(--drive-text);font-size:13px;font-weight:580}.drive-local-link:hover{background:var(--drive-surface-2)}.drive-local-link.active{background:color-mix(in srgb,var(--drive-accent) 9%,var(--drive-surface-2));font-weight:700}.drive-local-link svg{color:var(--drive-text)}.drive-local-link b{margin-left:auto;min-width:22px;padding:2px 7px;border-radius:6px;background:color-mix(in srgb,var(--drive-accent) 12%,var(--drive-surface-2));color:var(--drive-text);font-size:10px;text-align:center}
.drive-storage-block{padding-top:16px}.drive-storage-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.drive-storage-title strong{font-size:12px}.drive-storage-title span{padding:2px 6px;border-radius:5px;background:#24b861;color:#fff;font-size:9px;font-weight:700}.drive-storage-card{display:grid;grid-template-columns:1fr auto;gap:3px;padding:10px;border:1px solid var(--drive-border);border-radius:10px;margin-bottom:12px}.drive-storage-card strong,.drive-storage-type strong{font-size:11px}.drive-storage-card span,.drive-storage-type small{display:block;color:var(--drive-muted);font-size:10px;margin-top:2px}.drive-storage-card>b{font-size:9px;color:var(--drive-accent)}.drive-storage-card i,.drive-storage-type i{grid-column:1/-1;height:4px;border-radius:999px;background:var(--drive-surface-2);overflow:hidden;margin-top:7px}.drive-storage-card i span,.drive-storage-type i span{display:block;height:100%;border-radius:inherit;background:var(--drive-accent)}
.drive-storage-type{display:grid;grid-template-columns:30px minmax(0,1fr) auto;gap:8px;align-items:center;margin:7px 0}.drive-type-icon{width:30px;height:30px;border-radius:8px;display:grid;place-items:center}.drive-type-icon.cyan{background:#dbfbfa;color:#00a6a7}.drive-type-icon.blue{background:#e8f3ff;color:#087be8}.drive-type-icon.orange{background:#fff5df;color:#d99100}.drive-type-icon.indigo{background:#edf0ff;color:#4667f2}.drive-type-icon.red{background:#fff0ef;color:#f33}.drive-type-icon.green{background:#e8faee;color:#18a654}.drive-storage-type>b{font-size:10px;font-weight:600}.drive-storage-type i{grid-column:1/-1;margin-top:-2px}
.drive-canvas{min-width:0}.drive-command-bar{min-height:54px;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:8px 10px 8px 16px;background:var(--drive-surface);border:1px solid var(--drive-border);border-radius:7px}.drive-breadcrumbs{display:flex;align-items:center;min-width:0;gap:8px;color:var(--drive-accent);font-size:13px;font-weight:620}.drive-breadcrumbs a,.drive-breadcrumb-current{display:flex;align-items:center;gap:6px;white-space:nowrap}.drive-breadcrumb-current{min-width:0;overflow:hidden;text-overflow:ellipsis}.drive-breadcrumb-sep{color:var(--drive-muted)}.drive-command-actions{display:flex;align-items:center;gap:8px;position:relative}.drive-local-toggle{display:none}
.drive-segmented{display:flex;overflow:hidden;border:1px solid var(--drive-border);border-radius:6px;background:var(--drive-surface)}.drive-segmented a,.drive-segmented button{width:31px;height:31px;border:0;border-right:1px solid var(--drive-border);background:transparent;color:var(--drive-text);display:grid;place-items:center;cursor:pointer}.drive-segmented>*:last-child{border-right:0}.drive-segmented .active{background:#001431;color:#fff}.drive-segmented button[data-drive-view="grid"].active,.drive-segmented button[data-drive-view="list"].active{background:#d9ecff;color:#0876da;box-shadow:inset 0 0 0 1px #87c1ff}[data-theme="dark"] .drive-segmented button[data-drive-view].active{background:#163a5e;color:#79bdff}
.drive-btn{min-height:31px;padding:0 10px;border-radius:6px;border:1px solid var(--drive-border);background:var(--drive-surface);color:var(--drive-text);display:inline-flex;align-items:center;justify-content:center;gap:6px;font-size:11px;font-weight:650;cursor:pointer;transition:.18s}.drive-btn:hover{transform:translateY(-1px);filter:brightness(.98)}.drive-btn.outline{border-color:var(--drive-accent);color:var(--drive-accent)}.drive-btn.solid{background:var(--drive-accent);border-color:var(--drive-accent);color:#fff}.drive-btn.neutral{background:var(--drive-surface-2)}.drive-btn.danger{background:#ff3b30;border-color:#ff3b30;color:#fff}.drive-popover-wrap{position:relative}
.drive-upload-menu,.drive-filter-menu{position:absolute;z-index:80;top:calc(100% + 6px);right:0;min-width:170px;padding:6px;background:var(--drive-surface);border:1px solid var(--drive-border);border-radius:7px;box-shadow:var(--drive-shadow);opacity:0;visibility:hidden;transform:translateY(-5px);transition:.16s}.drive-upload-menu.open,.drive-filter-menu.open{opacity:1;visibility:visible;transform:none}.drive-upload-menu button,.drive-filter-menu button{width:100%;min-height:36px;border:0;background:transparent;color:var(--drive-muted);display:flex;align-items:center;gap:8px;padding:0 10px;border-radius:5px;text-align:left;font-size:12px;cursor:pointer}.drive-upload-menu button:hover,.drive-filter-menu button:hover,.drive-filter-menu button.active{background:var(--drive-surface-2);color:var(--drive-text)}
.drive-title-row{display:grid;grid-template-columns:minmax(0,1fr) 320px auto;align-items:end;gap:10px;padding:14px 0 10px;border-bottom:1px solid var(--drive-border)}.drive-title-row h1{margin:0 0 9px;font-size:17px;line-height:1.2;letter-spacing:-.2px}.drive-filter-btn{min-height:29px;padding:0 10px;border:1px solid var(--drive-border);border-radius:6px;background:var(--drive-surface);color:var(--drive-text);display:flex;align-items:center;gap:7px;font-size:11px;cursor:pointer}.drive-filter-menu{left:0;right:auto;min-width:190px}.drive-search-wrap{min-height:31px;border:1px solid var(--drive-border);border-radius:6px;background:var(--drive-surface);display:flex;align-items:center;gap:8px;padding:0 10px;color:var(--drive-muted)}.drive-search-wrap input{width:100%;border:0;outline:0;background:transparent;color:var(--drive-text);font-size:11px}.drive-search-wrap input::placeholder{color:var(--drive-muted)}.drive-back-btn{min-height:31px;padding:0 10px;border:1px solid var(--drive-border);border-radius:6px;background:var(--drive-surface);display:flex;align-items:center;gap:5px;font-size:11px;font-weight:650}
.drive-folder-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(190px,1fr));gap:14px;padding:16px 0}.drive-folder-card{position:relative;min-width:0;min-height:204px;border:1px solid var(--drive-border);border-radius:12px;background:color-mix(in srgb,var(--drive-blue) 2%,var(--drive-surface));overflow:visible;transition:.18s}.drive-folder-card:hover{border-color:color-mix(in srgb,var(--drive-blue) 34%,var(--drive-border));box-shadow:0 10px 28px rgba(32,82,138,.08);transform:translateY(-1px)}.drive-folder-open{height:100%;min-height:204px;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:35px 16px 18px;text-align:center}.drive-folder-art{width:82px;color:var(--drive-folder);margin-bottom:18px}.drive-folder-art svg{width:100%;height:auto}.drive-folder-card strong{display:block;width:100%;font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.drive-folder-card small{color:var(--drive-muted);font-size:11px;margin-top:5px}.drive-lock{position:absolute;left:11px;top:10px;width:29px;height:29px;border:1px solid var(--drive-border);border-radius:7px;display:grid;place-items:center;color:var(--drive-muted);background:var(--drive-surface-2)}.drive-more{position:absolute;right:7px;top:7px;width:30px;height:30px;border:0;border-radius:7px;background:transparent;color:var(--drive-text);display:grid;place-items:center;cursor:pointer}.drive-more:hover{background:var(--drive-surface-2)}.drive-item-check{position:absolute;left:10px;top:48px;opacity:0;transition:.15s}.drive-folder-card:hover .drive-item-check,.drive-item-check:has(input:checked){opacity:1}.drive-item-check input,.drive-row-check input{position:absolute;opacity:0}.drive-item-check span,.drive-row-check span{width:14px;height:14px;border:1px solid var(--drive-border);border-radius:3px;background:var(--drive-surface);display:block}.drive-item-check input:checked+span,.drive-row-check input:checked+span{background:var(--drive-accent);border-color:var(--drive-accent);box-shadow:inset 0 0 0 3px var(--drive-surface)}.drive-star{position:absolute;right:11px;bottom:10px;width:29px;height:29px;border:0;border-radius:7px;background:transparent;color:var(--drive-muted);display:grid;place-items:center;cursor:pointer;opacity:0}.drive-folder-card:hover .drive-star,.drive-star.active{opacity:1}.drive-star.active{color:#e2a900}.drive-star.active svg{fill:currentColor}
.drive-folder-grid.is-list{display:grid;grid-template-columns:1fr;gap:8px}.drive-folder-grid.is-list .drive-folder-card{min-height:64px}.drive-folder-grid.is-list .drive-folder-open{min-height:62px;padding:8px 75px 8px 54px;align-items:flex-start;justify-content:center;text-align:left}.drive-folder-grid.is-list .drive-folder-art{position:absolute;left:22px;width:29px;margin:0}.drive-folder-grid.is-list .drive-lock{display:none}.drive-folder-grid.is-list .drive-item-check{left:9px;top:25px}.drive-folder-grid.is-list .drive-star{right:39px;bottom:17px}
.drive-activity-section{margin-top:2px}.drive-section-heading{display:flex;align-items:center;justify-content:space-between;margin:0 0 8px}.drive-section-heading h2{margin:0;font-size:17px}.drive-section-heading button{width:30px;height:30px;border:1px solid var(--drive-border);border-radius:6px;background:var(--drive-surface);color:var(--drive-text);display:grid;place-items:center;cursor:pointer}.drive-table-wrap{position:relative;border:1px solid var(--drive-border);border-radius:7px;background:var(--drive-surface);overflow:auto}.drive-activity-table{width:100%;min-width:820px;border-collapse:collapse;font-size:12px}.drive-activity-table th{height:45px;padding:0 10px;text-align:left;background:var(--drive-surface-2);font-weight:650;color:var(--drive-text);border-bottom:1px solid var(--drive-border)}.drive-activity-table td{height:57px;padding:7px 10px;border-bottom:1px solid var(--drive-border);color:var(--drive-muted)}.drive-activity-table tr:last-child td{border-bottom:0}.drive-activity-table tr:hover td{background:color-mix(in srgb,var(--drive-blue) 2%,var(--drive-surface))}.drive-file-name{display:flex;align-items:center;gap:8px;min-width:300px}.drive-file-name strong{display:block;color:var(--drive-text);font-size:12px;font-weight:580}.drive-file-name small,.drive-activity-table td>small{display:block;color:var(--drive-muted);font-size:10px;margin-top:3px}.drive-file-icon{width:34px;height:34px;border-radius:7px;background:var(--drive-surface-2);display:grid;place-items:center;flex:0 0 auto;font-size:8px;font-weight:800}.drive-file-icon.pdf{color:#ff2d2d}.drive-file-icon.doc{color:#0a9ba4}.drive-file-icon.folder{color:#d8aa20}.drive-file-icon.share{color:#397cff}.drive-file-icon.trash{color:#ff3b30}.drive-table-avatar{width:20px;height:20px;border-radius:50%;font-size:6px}.drive-table-more{width:28px;height:28px;border:0;background:transparent;color:var(--drive-text);border-radius:6px;display:grid;place-items:center;cursor:pointer}.drive-table-more:hover{background:var(--drive-surface-2)}.drive-no-results{min-height:220px;display:flex;flex-direction:column;align-items:center;justify-content:center;color:var(--drive-muted);gap:6px}.drive-no-results strong{font-size:15px;color:var(--drive-text)}.drive-no-results span{font-size:12px}.drive-no-results[hidden]{display:none}
.drive-empty-state{min-height:245px;margin-top:14px;border:1px solid var(--drive-border);border-radius:7px;background:var(--drive-surface);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;color:var(--drive-muted)}.drive-empty-state svg{color:var(--drive-muted)}.drive-empty-state strong{font-size:17px;color:var(--drive-text)}.drive-empty-state span{font-size:12px}
.drive-context-menu{position:fixed;z-index:150;width:205px;padding:6px;background:var(--drive-surface);border:1px solid var(--drive-border);border-radius:7px;box-shadow:0 18px 45px rgba(0,0,0,.15);opacity:0;visibility:hidden;transform:scale(.97);transform-origin:top right;transition:.12s}.drive-context-menu.open{opacity:1;visibility:visible;transform:scale(1)}.drive-context-menu button{width:100%;min-height:31px;padding:0 9px;border:0;border-radius:5px;background:transparent;color:var(--drive-muted);display:flex;align-items:center;gap:9px;text-align:left;font-size:11px;cursor:pointer}.drive-context-menu button:hover{background:var(--drive-surface-2);color:var(--drive-text)}.drive-context-menu>div{height:1px;background:var(--drive-border);margin:5px -6px}.drive-context-menu button.danger{color:#ff3b30}
.drive-modal-backdrop{position:fixed;inset:0;z-index:200;background:rgba(10,18,28,.55);display:flex;align-items:center;justify-content:center;padding:20px;opacity:0;visibility:hidden;transition:.18s}.drive-modal-backdrop.open{opacity:1;visibility:visible}.drive-modal{width:min(100%,790px);max-height:calc(100vh - 40px);overflow:auto;border:1px solid var(--drive-border);border-radius:7px;background:var(--drive-surface);box-shadow:0 32px 90px rgba(0,0,0,.25);transform:translateY(8px) scale(.99);transition:.18s}.drive-modal-backdrop.open .drive-modal{transform:none}.drive-modal-small{max-width:500px}.drive-modal>header{min-height:72px;padding:14px 20px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--drive-border)}.drive-modal header h2{margin:0;font-size:19px}.drive-modal header p{margin:4px 0 0;color:var(--drive-muted);font-size:12px}.drive-modal header button{width:34px;height:34px;border:0;background:transparent;color:var(--drive-muted);display:grid;place-items:center;cursor:pointer}.drive-modal-body{padding:18px}.drive-modal footer{display:flex;justify-content:flex-end;gap:8px;padding:14px 20px;border-top:1px solid var(--drive-border)}
.drive-upload-zone{min-height:210px;border:1px solid var(--drive-border);border-radius:7px;background:var(--drive-surface);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;color:var(--drive-text);text-align:center;padding:20px}.drive-upload-zone>svg{width:56px;height:56px;padding:12px;border-radius:7px;background:#ececf8;color:var(--drive-accent)}[data-theme="dark"] .drive-upload-zone>svg{background:#1b2c43}.drive-upload-zone strong{font-size:18px}.drive-upload-zone span{font-size:12px;color:var(--drive-muted)}.drive-upload-zone.is-dragging{border-color:var(--drive-accent);box-shadow:inset 0 0 0 2px color-mix(in srgb,var(--drive-accent) 25%,transparent);background:color-mix(in srgb,var(--drive-accent) 4%,var(--drive-surface))}
.drive-upload-settings{margin-top:14px;border:1px solid var(--drive-border);border-radius:7px}.drive-upload-settings h3{margin:0;padding:9px 20px;border-bottom:1px solid var(--drive-border);display:flex;align-items:center;gap:7px;font-size:14px}.drive-upload-settings>div{display:grid;grid-template-columns:1fr 1fr;gap:14px;padding:18px}.drive-form-field{display:grid;gap:7px}.drive-form-field.full{grid-column:1/-1}.drive-form-field>span,.drive-check-field>span:first-child{font-size:12px;font-weight:650;color:var(--drive-text)}.drive-form-field b{color:#ff3b30}.drive-form-field input,.drive-form-field select,.drive-form-field textarea{width:100%;min-height:39px;border:1px solid var(--drive-border);border-radius:6px;background:var(--drive-surface);color:var(--drive-text);padding:0 12px;outline:0;font-size:12px}.drive-form-field textarea{padding:10px 12px;resize:vertical}.drive-form-field input:focus,.drive-form-field select:focus,.drive-form-field textarea:focus{border-color:var(--drive-blue);box-shadow:0 0 0 3px color-mix(in srgb,var(--drive-blue) 15%,transparent)}.drive-check-field{display:grid;gap:11px}.drive-check-field>span:last-child{font-size:12px;color:var(--drive-text)}
.drive-full-form-card{max-width:860px;margin:18px auto;padding:22px;border:1px solid var(--drive-border);border-radius:10px;background:var(--drive-surface)}.drive-full-form-card>h2{margin:0;font-size:20px}.drive-full-form-card>p{color:var(--drive-muted);font-size:13px}.drive-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:20px}.drive-full-form-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:22px}.drive-upload-choice{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-top:18px}.drive-danger-card{text-align:center}.drive-danger-card>svg{margin:0 auto 12px;color:#ff3b30}
.drive-floating-settings{position:fixed;right:0;top:50%;z-index:60;width:44px;height:46px;border:0;border-radius:6px 0 0 6px;background:var(--drive-accent);color:#fff;display:grid;place-items:center;box-shadow:0 8px 24px rgba(0,0,0,.12);cursor:pointer}.drive-footer{text-align:center;color:var(--drive-muted);font-size:11px;padding:18px 0 2px}
.drive-local-scrim{display:none}
@media(max-width:1180px){.drive-workspace{grid-template-columns:260px minmax(0,1fr)}.drive-folder-grid{grid-template-columns:repeat(auto-fill,minmax(165px,1fr))}.drive-local-sidebar{padding:14px}.drive-title-row{grid-template-columns:minmax(0,1fr) 250px auto}}
@media(max-width:900px){.drive-experience .main-content.drive-main-content{padding-left:10px;padding-right:10px}.drive-workspace{grid-template-columns:1fr}.drive-local-sidebar{position:fixed;left:10px;top:calc(var(--topbar-h) + 10px);bottom:82px;width:min(310px,calc(100vw - 30px));max-height:none;z-index:120;transform:translateX(calc(-100% - 24px));transition:.22s;box-shadow:0 24px 65px rgba(0,0,0,.25)}.drive-local-sidebar.open{transform:none}.drive-local-toggle{width:32px;height:32px;border:1px solid var(--drive-border);border-radius:6px;background:var(--drive-surface);color:var(--drive-text);display:grid;place-items:center}.drive-command-bar{padding-left:10px}.drive-breadcrumbs{font-size:12px}.drive-title-row{grid-template-columns:minmax(0,1fr) minmax(180px,280px) auto}.drive-upload-settings>div{grid-template-columns:1fr}.drive-check-field,.drive-form-field.full{grid-column:1}.drive-folder-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.drive-floating-settings{display:none}}
@media(max-width:680px){.drive-experience .main-content.drive-main-content{padding-top:calc(var(--topbar-h) + 8px);padding-bottom:94px}.drive-command-bar{align-items:flex-start;flex-direction:column;padding:9px}.drive-command-actions{width:100%;justify-content:flex-end;flex-wrap:wrap}.drive-breadcrumbs{width:100%;overflow-x:auto;padding:2px}.drive-btn span{display:none}.drive-btn{width:33px;padding:0}.drive-btn.solid{width:auto;padding:0 9px}.drive-btn.solid span{display:inline}.drive-title-row{grid-template-columns:minmax(0,1fr) auto;align-items:center}.drive-title-row>div:first-child{grid-column:1}.drive-search-wrap{grid-column:1/-1;grid-row:2}.drive-back-btn{grid-column:2;grid-row:1;align-self:start;margin-top:0}.drive-folder-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding-top:12px}.drive-folder-card,.drive-folder-open{min-height:158px}.drive-folder-open{padding:32px 10px 14px}.drive-folder-art{width:62px;margin-bottom:12px}.drive-folder-card strong{font-size:12px}.drive-folder-card small{font-size:10px}.drive-lock{width:25px;height:25px;left:7px;top:7px}.drive-more{right:3px;top:3px}.drive-star{right:5px;bottom:5px}.drive-activity-table{min-width:760px}.drive-section-heading h2{font-size:16px}.drive-modal-backdrop{align-items:flex-end;padding:0}.drive-modal{width:100%;max-height:92vh;border-radius:16px 16px 0 0}.drive-modal>header{padding:14px 16px}.drive-modal-body{padding:14px}.drive-modal footer{padding:12px 14px}.drive-upload-zone{min-height:185px}.drive-upload-settings>div{padding:14px}.drive-form-grid,.drive-upload-choice{grid-template-columns:1fr}.drive-form-field.full{grid-column:1}.drive-full-form-card{padding:16px}.drive-context-menu{width:220px}.drive-footer{padding-bottom:8px}}
@media(max-width:390px){.drive-segmented a,.drive-segmented button{width:29px}.drive-command-actions{gap:5px}.drive-breadcrumbs span{max-width:150px;overflow:hidden;text-overflow:ellipsis}.drive-folder-grid{gap:8px}.drive-folder-card,.drive-folder-open{min-height:148px}}

/* ===== Helprite Drive v11: Apple-style information side panel ===== */
.drive-info-wrap {
  position: fixed;
  inset: 0;
  z-index: 520;
  pointer-events: none;
  visibility: hidden;
}
.drive-info-wrap.open {
  pointer-events: auto;
  visibility: visible;
}
.drive-info-scrim {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: rgba(0,0,0,.48);
  opacity: 0;
  transition: opacity .22s ease;
  -webkit-backdrop-filter: blur(1px);
  backdrop-filter: blur(1px);
}
.drive-info-wrap.open .drive-info-scrim { opacity: 1; }
.drive-info-drawer {
  --info-border: color-mix(in srgb, var(--drive-text) 12%, transparent);
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(410px, 100vw);
  display: grid;
  grid-template-rows: auto minmax(0,1fr);
  overflow: hidden;
  background: var(--drive-surface);
  color: var(--drive-text);
  border-left: 1px solid var(--info-border);
  box-shadow: -24px 0 72px rgba(0,0,0,.24);
  transform: translateX(102%);
  transition: transform .25s cubic-bezier(.2,.78,.2,1);
}
.drive-info-wrap.open .drive-info-drawer { transform: translateX(0); }
.drive-info-header {
  min-height: 62px;
  padding: 0 14px 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #080b0d;
  color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.drive-info-header h2 {
  margin: 0;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 720;
  letter-spacing: -.25px;
}
.drive-info-header > div { display: flex; align-items: center; gap: 2px; }
.drive-info-icon-button {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.drive-info-icon-button:hover { background: rgba(255,255,255,.10); }
.drive-info-icon-button:active { transform: scale(.94); }
.drive-info-icon-button.star { color: #ffd60a; }
.drive-info-icon-button.star.active svg { fill: currentColor; }
.drive-info-icon-button.danger { color: #fff; }
.drive-info-icon-button.danger:hover { color: #ff453a; }
.drive-info-scroll {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb,var(--drive-muted) 55%,transparent) transparent;
  padding-bottom: max(20px,env(safe-area-inset-bottom));
}
.drive-info-hero {
  min-height: 138px;
  padding: 18px 18px 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  background: var(--drive-surface-2);
  border-bottom: 1px solid var(--info-border);
}
.drive-info-hero-icon {
  width: 58px;
  height: 52px;
  display: grid;
  place-items: center;
  margin-bottom: 3px;
}
.drive-info-hero-icon svg { width: 100%; height: 100%; display: block; }
.drive-info-hero-icon.folder { color: #e8b92c; }
.drive-info-hero-icon.file { color: #ff2d2d; width: 48px; height: 58px; }
.drive-info-hero > div { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; max-width: 100%; }
.drive-info-hero strong {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 680;
}
.drive-info-size {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 7px;
  border-radius: 6px;
  background: #12b8bd;
  color: #fff;
  font-size: 10px;
  line-height: 1;
  font-weight: 760;
}
.drive-info-hero small { color: var(--drive-muted); font-size: 11px; }
.drive-info-section { padding: 14px 16px 0; }
.drive-info-section h3,
.drive-info-section-title h3 {
  margin: 0 0 9px;
  color: var(--drive-text);
  font-size: 15px;
  line-height: 1.2;
  font-weight: 650;
  letter-spacing: -.15px;
}
.drive-info-facts {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  overflow: hidden;
  border: 1px solid var(--info-border);
  border-radius: 7px;
  background: var(--drive-surface);
}
.drive-info-facts > div {
  min-height: 74px;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  text-align: center;
  border-left: 1px solid var(--info-border);
}
.drive-info-facts > div:first-child { border-left: 0; }
.drive-info-facts span { color: var(--drive-muted); font-size: 10px; }
.drive-info-facts strong { font-size: 11px; line-height: 1.45; font-weight: 560; overflow-wrap: anywhere; }
.drive-info-owner,
.drive-info-description,
.drive-info-contents,
.drive-info-activity-list,
.drive-info-members {
  border: 1px solid var(--info-border);
  border-radius: 7px;
  background: var(--drive-surface-2);
}
.drive-info-owner { padding: 10px; display: grid; gap: 4px; }
.drive-info-owner strong { font-size: 12px; line-height: 1.35; }
.drive-info-owner em { color: var(--drive-muted); font-style: normal; font-weight: 500; }
.drive-info-owner span { color: var(--drive-muted); font-size: 10px; }
.drive-info-description { min-height: 42px; padding: 10px; color: var(--drive-muted); font-size: 11px; line-height: 1.45; }
.drive-info-content-row {
  min-height: 66px;
  padding: 9px 10px;
  display: grid;
  grid-template-columns: 28px minmax(0,1fr) auto;
  align-items: center;
  gap: 9px;
}
.drive-info-content-row > div { min-width: 0; }
.drive-info-content-row strong { display: block; font-size: 12px; }
.drive-info-content-row small { display: block; margin-top: 3px; color: var(--drive-muted); font-size: 10px; }
.drive-info-content-row > span:last-child { color: var(--drive-text); font-size: 10px; }
.mini-folder { width: 24px; height: 22px; color: #e8b92c; display: grid; place-items: center; }
.mini-folder svg { width: 100%; height: 100%; }
.drive-info-activity-list { padding: 0 10px; max-height: 250px; overflow-y: auto; background: var(--drive-surface); }
.drive-info-activity {
  min-height: 66px;
  padding: 10px 0;
  display: grid;
  grid-template-columns: 32px minmax(0,1fr);
  align-items: start;
  gap: 8px;
  border-top: 1px solid var(--info-border);
  color: var(--drive-text);
  font-size: 11px;
  line-height: 1.35;
}
.drive-info-activity:first-child { border-top: 0; }
.drive-info-activity strong { font-weight: 670; }
.drive-info-activity small { display: block; margin-top: 3px; color: var(--drive-muted); font-size: 10px; }
.drive-info-avatar {
  width: 31px;
  height: 31px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(145deg,#18233a,#0aaeb5);
  color: #fff;
  font-size: 9px;
  font-weight: 750;
  box-shadow: 0 0 0 1px color-mix(in srgb,var(--drive-text) 9%,transparent);
}
.drive-info-avatar.muted { background: #d7d8da; color: #8a8c90; }
.drive-info-section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.drive-info-section-title button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--drive-accent);
  font-size: 10px;
  cursor: pointer;
}
.drive-info-members { padding: 5px 10px; background: var(--drive-surface); }
.drive-info-member {
  min-height: 58px;
  display: grid;
  grid-template-columns: 34px minmax(0,1fr) auto;
  align-items: center;
  gap: 9px;
  border-top: 1px solid var(--info-border);
}
.drive-info-member:first-child { border-top: 0; }
.drive-info-member > div { min-width: 0; }
.drive-info-member strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.drive-info-member small { display: block; margin-top: 3px; color: var(--drive-muted); font-size: 10px; }
.drive-info-badge {
  max-width: 115px;
  padding: 3px 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: 5px;
  background: var(--drive-surface-2);
  color: var(--drive-text);
  font-size: 8px;
  font-weight: 700;
}
.drive-info-badge.owner { background: #08b8bd; color: #fff; }
body.drive-info-open { overflow: hidden; }

/* Keep every global record-action and Drive item menu deterministic. */
#recordActionsDropdown:not(.open),
.drive-context-menu:not(.open),
[data-drive-upload-menu]:not(.open),
[data-drive-filter-menu]:not(.open) { pointer-events: none; }

@media (max-width: 760px) {
  .drive-info-drawer { width: min(430px,100vw); }
  .drive-info-header { min-height: 58px; padding-left: 16px; }
  .drive-info-header h2 { font-size: 17px; }
  .drive-info-section { padding-left: 14px; padding-right: 14px; }
  .drive-info-hero { min-height: 130px; }
}

@media (max-width: 430px) {
  .drive-info-drawer { width: 100vw; border-left: 0; }
  .drive-info-facts strong { font-size: 10px; }
  .drive-info-member { grid-template-columns: 34px minmax(0,1fr); }
  .drive-info-badge { grid-column: 2; justify-self: start; margin: -6px 0 7px; }
}

/* ========================================================================== 
   HELPRITE DESK v12 — HOME DASHBOARD ONE-SCREEN DESKTOP FIT
   Keeps the established Apple widget layout, but lets the complete home
   dashboard occupy the available desktop/laptop viewport without a page
   scrollbar. Phone and tablet card sizing remains controlled by the existing
   responsive rules above.
   ========================================================================== */
@media (min-width: 901px) {
  html:has(body[data-page-route="/home"]),
  body[data-page-route="/home"] {
    height: 100%;
    overflow: hidden;
  }

  body[data-page-route="/home"] .app-shell {
    height: 100dvh;
    min-height: 0;
  }

  body[data-page-route="/home"] .main-content {
    height: 100dvh;
    min-height: 0;
    padding-top: calc(var(--topbar-h) + 14px);
    padding-bottom: 12px;
    overflow: hidden;
  }

  body[data-page-route="/home"] .page {
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
  }

  body[data-page-route="/home"] .page-heading {
    align-items: flex-end;
    margin: 0 0 12px;
    gap: 16px;
  }

  body[data-page-route="/home"] .page-eyebrow {
    margin-bottom: 4px;
    font-size: 12px;
  }

  body[data-page-route="/home"] .page-title {
    font-size: clamp(34px, 3vw, 44px);
    line-height: 1;
    letter-spacing: -2px;
  }

  body[data-page-route="/home"] .page-subtitle {
    margin-top: 5px;
    font-size: 14px;
    line-height: 1.35;
  }

  body[data-page-route="/home"] .page-heading-side {
    padding-top: 0;
  }

  body[data-page-route="/home"] .page-actions .btn,
  body[data-page-route="/home"] .page-heading-back {
    min-height: 38px;
    border-radius: 13px;
  }

  body[data-page-route="/home"] .bento-grid {
    height: 100%;
    min-height: 0;
    grid-template-rows: repeat(8, minmax(0, 1fr));
    grid-auto-rows: unset;
    gap: 10px;
  }

  body[data-page-route="/home"] .widget {
    min-height: 0;
    border-radius: 20px;
  }

  body[data-page-route="/home"] .widget-content {
    min-height: 0;
    padding: 14px;
  }

  body[data-page-route="/home"] .today-widget .widget-content {
    padding: 18px;
  }

  body[data-page-route="/home"] .today-date {
    font-size: 12px;
  }

  body[data-page-route="/home"] .today-heading {
    margin-top: 5px;
    font-size: clamp(27px, 2.15vw, 32px);
    line-height: 1.02;
    letter-spacing: -1.15px;
  }

  body[data-page-route="/home"] .today-summary {
    margin-top: 5px;
    max-width: 560px;
    font-size: 12.5px;
    line-height: 1.35;
  }

  body[data-page-route="/home"] .today-list {
    margin-top: 10px;
    gap: 5px;
  }

  body[data-page-route="/home"] .today-list-row {
    gap: 8px;
    font-size: 12px;
    line-height: 1.25;
  }

  body[data-page-route="/home"] .today-actions {
    gap: 8px;
  }

  body[data-page-route="/home"] .today-actions .btn {
    min-height: 34px;
    padding-inline: 13px;
    border-radius: 12px;
    font-size: 12px;
  }

  body[data-page-route="/home"] .module-widget .module-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }

  body[data-page-route="/home"] .module-widget .module-icon svg {
    width: 23px;
    height: 23px;
  }

  body[data-page-route="/home"] .module-widget .module-arrow {
    width: 34px;
    height: 34px;
    border-radius: 12px;
  }

  body[data-page-route="/home"] .module-widget .module-copy h3 {
    font-size: 17px;
    line-height: 1.08;
    letter-spacing: -.5px;
  }

  body[data-page-route="/home"] .module-widget .module-copy p {
    margin-top: 4px;
    font-size: 10.5px;
    line-height: 1.25;
  }

  body[data-page-route="/home"] .map-pin {
    width: 42px;
    height: 42px;
  }

  body[data-page-route="/home"] .map-caption {
    left: 12px;
    right: 12px;
    bottom: 12px;
    padding: 9px 11px;
    border-radius: 13px;
    font-size: 11px;
  }

  body[data-page-route="/home"] .map-caption strong {
    font-size: 12px;
  }

  body[data-page-route="/home"] .widget-title {
    font-size: 14px;
  }

  body[data-page-route="/home"] .widget-label {
    margin-top: 2px;
    font-size: 10px;
  }

  body[data-page-route="/home"] .weather-temp {
    font-size: 38px;
    letter-spacing: -2px;
  }

  body[data-page-route="/home"] .weather-strip {
    gap: 4px;
  }

  body[data-page-route="/home"] .weather-day {
    padding: 5px 4px;
    border-radius: 9px;
    font-size: 9px;
  }

  body[data-page-route="/home"] .clock-face {
    width: 58px;
    height: 58px;
  }

  body[data-page-route="/home"] .clock-face::before {
    height: 18px;
  }

  body[data-page-route="/home"] .clock-face::after {
    height: 22px;
  }
}

@media (min-width: 901px) and (max-height: 740px) {
  body[data-page-route="/home"] .main-content {
    padding-top: calc(var(--topbar-h) + 9px);
    padding-bottom: 8px;
  }

  body[data-page-route="/home"] .page-heading {
    margin-bottom: 8px;
  }

  body[data-page-route="/home"] .page-eyebrow {
    display: none;
  }

  body[data-page-route="/home"] .page-title {
    font-size: 34px;
  }

  body[data-page-route="/home"] .page-subtitle {
    margin-top: 3px;
    font-size: 12px;
  }

  body[data-page-route="/home"] .bento-grid {
    gap: 8px;
  }

  body[data-page-route="/home"] .widget {
    border-radius: 17px;
  }

  body[data-page-route="/home"] .today-widget .widget-content {
    padding: 14px;
  }

  body[data-page-route="/home"] .today-heading {
    font-size: 25px;
  }

  body[data-page-route="/home"] .today-summary {
    font-size: 11px;
  }

  body[data-page-route="/home"] .today-list {
    margin-top: 7px;
    gap: 3px;
  }

  body[data-page-route="/home"] .today-list-row {
    font-size: 10.5px;
  }

  body[data-page-route="/home"] .today-actions .btn {
    min-height: 30px;
  }

  body[data-page-route="/home"] .module-widget .module-icon {
    width: 38px;
    height: 38px;
  }

  body[data-page-route="/home"] .module-widget .module-arrow {
    width: 30px;
    height: 30px;
  }

  body[data-page-route="/home"] .module-widget .module-copy h3 {
    font-size: 15px;
  }

  body[data-page-route="/home"] .module-widget .module-copy p {
    font-size: 9.5px;
  }
}


/* HELPRITE V13 PROFILE EXPERIENCE */
.profile-photo-picker{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:18px;padding:18px;margin-bottom:18px;border:1px solid var(--line);border-radius:18px;background:rgba(255,255,255,.035)}
[data-theme="light"] .profile-photo-picker{background:#f8fafc}
.profile-photo-preview{width:92px;height:92px;border-radius:28px;display:grid;place-items:center;overflow:hidden;background:linear-gradient(145deg,#1688ff,#005fce);background-size:cover;background-position:center;color:#fff;font-size:28px;font-weight:780;letter-spacing:-1px;box-shadow:0 14px 34px rgba(10,132,255,.24),inset 0 1px 0 rgba(255,255,255,.26)}
.profile-photo-preview.has-photo{background-color:var(--panel-2)}
.profile-photo-copy{min-width:0}.profile-photo-copy h3{margin:0 0 4px;font-size:16px;letter-spacing:-.3px}.profile-photo-copy p{margin:0;color:var(--muted);font-size:12px;line-height:1.5}
.profile-photo-actions{display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin-top:12px}.profile-photo-actions input[type=file]{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.profile-photo-actions label{cursor:pointer}
.profile-hero{position:relative;overflow:hidden;border:1px solid var(--line);border-radius:26px;background:var(--panel);box-shadow:var(--shadow-soft);padding:26px;margin-bottom:18px}
.profile-hero::after{content:"";position:absolute;inset:auto -90px -130px auto;width:330px;height:330px;border-radius:50%;background:radial-gradient(circle,rgba(10,132,255,.18),transparent 68%);pointer-events:none}
.profile-hero-main{position:relative;z-index:1;display:flex;align-items:center;gap:20px}.profile-hero-avatar{width:108px;height:108px;flex:0 0 auto;border-radius:32px;display:grid;place-items:center;background:linear-gradient(145deg,#1688ff,#0069d9);color:#fff;font-size:34px;font-weight:800;letter-spacing:-1.5px;box-shadow:0 18px 42px rgba(10,132,255,.28),inset 0 1px 0 rgba(255,255,255,.3);background-size:cover;background-position:center}
.profile-hero-copy{min-width:0;flex:1}.profile-hero-copy h2{margin:0;font-size:28px;line-height:1.05;letter-spacing:-1px}.profile-hero-copy p{margin:7px 0 0;color:var(--muted);font-size:13px}.profile-hero-meta{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:13px}.profile-hero-actions{display:flex;gap:9px;align-items:center;flex-wrap:wrap;margin-left:auto}
.profile-layout{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(290px,.75fr);gap:18px;align-items:start}.profile-stack{display:grid;gap:18px}
.profile-section{border:1px solid var(--line);border-radius:20px;background:var(--panel);box-shadow:var(--shadow-soft);overflow:hidden}.profile-section-head{padding:16px 18px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:12px}.profile-section-head h3{margin:0;font-size:15px;letter-spacing:-.25px}.profile-section-head p{margin:3px 0 0;color:var(--muted);font-size:11px}.profile-section-body{padding:18px}
.profile-details{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}.profile-detail{min-width:0;padding:13px 14px;border-radius:14px;background:rgba(255,255,255,.035);border:1px solid var(--line)}[data-theme="light"] .profile-detail{background:#f8fafc}.profile-detail span{display:block;color:var(--muted);font-size:10px;text-transform:uppercase;letter-spacing:.05em;font-weight:700}.profile-detail strong{display:block;margin-top:5px;font-size:13px;line-height:1.35;overflow-wrap:anywhere}.profile-detail small{display:block;margin-top:3px;color:var(--muted);font-size:11px}
.profile-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:18px}.profile-metric{padding:14px;border:1px solid var(--line);border-radius:15px;background:rgba(255,255,255,.035)}[data-theme="light"] .profile-metric{background:#f8fafc}.profile-metric strong{font-size:21px;letter-spacing:-.7px}.profile-metric span{display:block;margin-top:3px;color:var(--muted);font-size:10px}
.profile-security-list,.profile-activity-list{display:grid;gap:0}.profile-security-item,.profile-activity-item{display:flex;align-items:flex-start;gap:11px;padding:12px 0;border-bottom:1px solid var(--line)}.profile-security-item:last-child,.profile-activity-item:last-child{border-bottom:0}.profile-security-icon,.profile-activity-icon{width:34px;height:34px;flex:0 0 auto;border-radius:11px;display:grid;place-items:center;background:rgba(10,132,255,.12);color:var(--blue)}.profile-security-copy,.profile-activity-copy{min-width:0;flex:1}.profile-security-copy strong,.profile-activity-copy strong{font-size:12px}.profile-security-copy p,.profile-activity-copy p{margin:3px 0 0;color:var(--muted);font-size:11px;line-height:1.4}.profile-security-state{font-size:10px;color:var(--green);font-weight:700;white-space:nowrap}
.profile-permission-summary{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.profile-permission-summary .badge{font-size:10px}
.profile-edit-note{display:flex;gap:10px;align-items:flex-start;padding:13px 14px;border-radius:14px;background:rgba(10,132,255,.09);border:1px solid rgba(10,132,255,.18);color:var(--text);font-size:12px;line-height:1.5;margin-bottom:18px}.profile-edit-note svg{flex:0 0 auto;color:var(--blue);margin-top:1px}
.password-strength{height:6px;border-radius:999px;background:var(--panel-3);overflow:hidden;margin-top:8px}.password-strength span{display:block;width:78%;height:100%;border-radius:inherit;background:var(--green)}
@media(max-width:960px){.profile-layout{grid-template-columns:1fr}.profile-hero-main{align-items:flex-start}.profile-hero-actions{margin-left:0}}
@media(max-width:700px){.profile-photo-picker{grid-template-columns:1fr;text-align:center}.profile-photo-preview{margin:auto}.profile-photo-actions{justify-content:center}.profile-hero{padding:19px;border-radius:21px}.profile-hero-main{display:grid;text-align:center}.profile-hero-avatar{width:92px;height:92px;border-radius:28px;margin:auto}.profile-hero-copy h2{font-size:24px}.profile-hero-meta,.profile-hero-actions{justify-content:center}.profile-details{grid-template-columns:1fr}.profile-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}.profile-metric{padding:11px 9px}.profile-metric strong{font-size:18px}}
@media(max-width:430px){.profile-metrics{grid-template-columns:1fr}.profile-hero-actions .btn{flex:1;justify-content:center}}

/* HELPRITE V14 NATIVE SELECTS AND PAGE ACTION ALIGNMENT */

/* All page-heading actions share one predictable Apple button size. */
.page-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  column-gap: 22px;
  row-gap: 12px;
}
.page-heading-copy {
  width: 100%;
  min-width: 0;
}
.page-heading-side {
  width: auto;
  min-width: 0;
  max-width: none;
  padding-top: 26px;
  align-items: flex-end;
  gap: 10px;
}
.page-heading-side .page-actions {
  width: auto;
  max-width: none;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 9px;
}
.page-heading-side .page-actions .btn,
.page-title-row .apple-back-link.page-heading-back {
  min-height: 42px;
  height: 42px;
  padding: 0 15px;
  border-radius: 14px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  line-height: 1;
  font-weight: 680;
  white-space: nowrap;
  text-decoration: none;
  vertical-align: middle;
}
.page-title-row .apple-back-link.page-heading-back {
  margin-top: 1px;
  min-width: 82px;
}
.page-title-row .apple-back-link.page-heading-back:hover {
  transform: translateY(-2px);
}
.page-heading-side .page-actions .btn svg,
.page-title-row .apple-back-link.page-heading-back svg {
  flex: 0 0 auto;
}

/* Native Apple-style selects: no enhanced replacement layer or generated markup. */
select,
.form-field select,
.filter-select,
.drive-form-field select {
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 13px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 38px !important;
}
select[multiple],
.form-field select[multiple] {
  appearance: auto;
  -webkit-appearance: auto;
  background-image: none;
  padding-right: 12px !important;
}

@media (max-width: 1180px) {
  .page-heading-side .page-actions {
    flex-wrap: wrap;
    max-width: 620px;
  }
}

@media (max-width: 760px) {
  .page-heading {
    display: block;
  }
  .page-title-row {
    align-items: center;
  }
  .page-title-row .apple-back-link.page-heading-back {
    min-height: 42px;
    height: 42px;
    min-width: 82px;
    padding: 0 13px;
    font-size: 13px;
    border-radius: 14px;
  }
  .page-heading-side {
    width: 100%;
    padding-top: 12px;
    align-items: stretch;
  }
  .page-heading-side .page-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .page-heading-side .page-actions .btn {
    width: 100%;
    min-width: 0;
    white-space: normal;
    text-align: center;
  }
}

@media (max-width: 430px) {
  .page-title-row .apple-back-link.page-heading-back {
    min-height: 42px;
    height: 42px;
    min-width: 78px;
    padding: 0 11px;
    font-size: 12.5px;
  }
}

/* HELPRITE V15 — PAGE ACTION ORDER AND SINGLE-LINE DESKTOP HEADING */

/* The title remains on the left; every page action shares one right-side row. */
.page-heading {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 22px;
}
.page-heading-copy {
  min-width: 0;
}
.page-title-row {
  display: block;
}
.page-heading-side {
  width: auto;
  min-width: 0;
  max-width: none;
  padding-top: 0;
  align-self: center;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
}
.page-heading-side .page-actions {
  width: auto;
  max-width: none;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

/* Back is a normal-sized action and always appears last at the far right. */
.page-heading-side .apple-back-link.page-heading-back {
  order: 999;
  margin: 0;
  min-width: 82px;
  min-height: 42px;
  height: 42px;
  padding: 0 15px;
  border-radius: 14px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  line-height: 1;
  font-weight: 680;
  white-space: nowrap;
  text-decoration: none;
  vertical-align: middle;
}
.page-heading-side .apple-back-link.page-heading-back:hover {
  transform: translateY(-2px);
}

/* Desktop and laptop: keep all title actions on one horizontal line. */
@media (min-width: 1181px) {
  .page-heading-side .page-actions {
    flex-wrap: nowrap;
  }
}

/* Tablet: allow a clean wrap only when the available width is genuinely limited. */
@media (min-width: 761px) and (max-width: 1180px) {
  .page-heading {
    align-items: start;
  }
  .page-heading-side {
    padding-top: 26px;
  }
  .page-heading-side .page-actions {
    max-width: 610px;
    flex-wrap: wrap;
  }
}

/* Mobile keeps the established two-column action layout, with Back in the final cell. */
@media (max-width: 760px) {
  .page-heading {
    display: block;
  }
  .page-title-row {
    display: block;
  }
  .page-heading-side {
    width: 100%;
    padding-top: 12px;
    display: block;
  }
  .page-heading-side .page-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .page-heading-side .page-actions .btn,
  .page-heading-side .apple-back-link.page-heading-back {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    height: 42px;
    margin: 0;
  }
}


/* HELPRITE V18 LIVE WEATHER + LOCAL TIME */
.home-weather-widget,
.home-clock-widget {
  cursor: default;
}

.weather-widget-content,
.clock-widget-content {
  min-width: 0;
}

.weather-head,
.clock-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.weather-updated::before {
  content: " · ";
}

.weather-refresh-button {
  width: 31px;
  height: 31px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 11px;
  background: rgba(255,255,255,.09);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  flex: none;
  transition: transform .2s ease, background .2s ease, opacity .2s ease;
}

.weather-refresh-button:hover {
  background: rgba(255,255,255,.16);
  transform: translateY(-1px);
}

.weather-refresh-button:focus-visible {
  outline: 3px solid rgba(10,132,255,.34);
  outline-offset: 2px;
}

.weather-refresh-button.is-loading svg {
  animation: helprite-weather-spin .8s linear infinite;
}

@keyframes helprite-weather-spin {
  to { transform: rotate(360deg); }
}

.weather-current {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 7px;
  min-width: 0;
}

.weather-symbol {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.11);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
  font-size: 23px;
  line-height: 1;
  flex: none;
}

.weather-temp {
  display: flex;
  align-items: flex-start;
  gap: 1px;
}

.weather-temp sup {
  font-size: .38em;
  line-height: 1;
  margin-top: .16em;
  letter-spacing: 0;
}

.weather-condition {
  margin-top: 1px;
  font-size: 11px;
  line-height: 1.2;
  color: rgba(255,255,255,.78);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.weather-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 5px 0 7px;
  color: rgba(255,255,255,.68);
  font-size: 9.5px;
  line-height: 1.15;
}

.weather-meta span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.weather-strip {
  margin-top: auto;
}

.weather-day {
  min-width: 0;
  padding: 5px 3px;
  border-radius: 9px;
  background: rgba(255,255,255,.065);
  line-height: 1;
}

.weather-day span,
.weather-day i,
.weather-day strong {
  display: block;
}

.weather-day span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weather-day i {
  height: 13px;
  margin-top: 3px;
  font-size: 12px;
  font-style: normal;
  line-height: 13px;
}

.weather-day strong {
  margin-top: 3px;
}

.weather-day.is-loading {
  opacity: .58;
}

.clock-widget-content .widget-label {
  color: rgba(11,19,32,.62);
}

.clock-live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 7px;
  border-radius: 999px;
  background: rgba(52,199,89,.12);
  color: #15803d;
  font-size: 9px;
  font-weight: 760;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.clock-live-indicator i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34c759;
  box-shadow: 0 0 0 4px rgba(52,199,89,.12);
}

.clock-layout {
  display: grid;
  grid-template-columns: 74px minmax(0,1fr);
  align-items: center;
  gap: 12px;
  margin-top: auto;
  margin-bottom: auto;
  min-width: 0;
}

.clock-face {
  width: 70px;
  height: 70px;
  margin: 0;
}

.clock-face::before,
.clock-face::after {
  content: none;
}

.clock-hand {
  position: absolute;
  left: 50%;
  bottom: 50%;
  transform-origin: 50% 100%;
  transform: translateX(-50%) rotate(0deg);
  border-radius: 999px;
  will-change: transform;
}

.clock-hour-hand {
  width: 4px;
  height: 20px;
  background: #111;
  z-index: 2;
}

.clock-minute-hand {
  width: 3px;
  height: 27px;
  background: #111;
  z-index: 3;
}

.clock-second-hand {
  width: 1.5px;
  height: 29px;
  background: #ff453a;
  z-index: 4;
}

.clock-dot {
  z-index: 5;
}

.clock-tick {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2px;
  height: 6px;
  margin-left: -1px;
  margin-top: -33px;
  border-radius: 2px;
  background: rgba(17,17,17,.65);
  transform-origin: 1px 33px;
}

.clock-tick.tick-3 { transform: rotate(90deg); }
.clock-tick.tick-6 { transform: rotate(180deg); }
.clock-tick.tick-9 { transform: rotate(270deg); }

.clock-digital {
  min-width: 0;
}

.clock-time {
  color: #0b1320;
  font-size: clamp(18px, 1.65vw, 27px);
  font-weight: 790;
  letter-spacing: -.9px;
  line-height: 1;
  white-space: nowrap;
}

.clock-date {
  margin-top: 7px;
  color: rgba(11,19,32,.72);
  font-size: 10.5px;
  font-weight: 650;
  line-height: 1.2;
}

.clock-offset {
  margin-top: 3px;
  color: rgba(11,19,32,.5);
  font-size: 9.5px;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

html[data-theme="dark"] .home-clock-widget.gradient-light {
  background: linear-gradient(145deg, #f9fbff, #dfe8f5 80%);
  color: #0b1320;
}

@media (min-width: 901px) and (max-height: 900px) {
  body[data-page-route="/home"] .weather-current {
    margin-top: 4px;
  }

  body[data-page-route="/home"] .weather-symbol {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    font-size: 19px;
  }

  body[data-page-route="/home"] .weather-meta {
    margin: 3px 0 5px;
    font-size: 8.8px;
  }

  body[data-page-route="/home"] .weather-day {
    padding: 4px 2px;
  }

  body[data-page-route="/home"] .weather-day i {
    height: 11px;
    margin-top: 2px;
    font-size: 10px;
    line-height: 11px;
  }

  body[data-page-route="/home"] .clock-layout {
    grid-template-columns: 60px minmax(0,1fr);
    gap: 9px;
  }

  body[data-page-route="/home"] .clock-face {
    width: 58px;
    height: 58px;
  }

  body[data-page-route="/home"] .clock-hour-hand { height: 16px; }
  body[data-page-route="/home"] .clock-minute-hand { height: 21px; }
  body[data-page-route="/home"] .clock-second-hand { height: 23px; }

  body[data-page-route="/home"] .clock-tick {
    margin-top: -27px;
    transform-origin: 1px 27px;
  }

  body[data-page-route="/home"] .clock-tick.tick-3 { transform: rotate(90deg); }
  body[data-page-route="/home"] .clock-tick.tick-6 { transform: rotate(180deg); }
  body[data-page-route="/home"] .clock-tick.tick-9 { transform: rotate(270deg); }

  body[data-page-route="/home"] .clock-date {
    margin-top: 5px;
    font-size: 9.5px;
  }

  body[data-page-route="/home"] .clock-offset {
    font-size: 8.8px;
  }
}

@media (max-width: 900px) {
  .weather-symbol {
    width: 38px;
    height: 38px;
  }

  .clock-layout {
    grid-template-columns: 66px minmax(0,1fr);
  }

  .clock-face {
    width: 64px;
    height: 64px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .weather-refresh-button.is-loading svg {
    animation: none;
  }
}


/* ========================================================================== 
   V19 · Task Calendar + contextual analytics charts
   ========================================================================== */
.analytics-divider{margin-top:22px}
.analytics-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:14px 0 22px}
.analytics-grid.single{grid-template-columns:minmax(0,1fr)}
.analytics-grid.triple{grid-template-columns:repeat(3,minmax(0,1fr))}
.analytics-card{min-width:0;background:var(--panel);border:1px solid var(--line);border-radius:var(--radius-xl);box-shadow:var(--shadow-card);overflow:hidden}
.analytics-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding:18px 18px 0}
.analytics-card-title{font-size:16px;font-weight:750;letter-spacing:-.35px;color:var(--text)}
.analytics-card-subtitle{margin-top:4px;color:var(--muted);font-size:12px;line-height:1.45}
.analytics-card-badge{display:inline-flex;align-items:center;min-height:26px;padding:0 9px;border-radius:999px;background:var(--chip);border:1px solid var(--line);font-size:10px;font-weight:700;color:var(--muted);white-space:nowrap}
.analytics-card-body{padding:10px 14px 15px}
.hd-chart{position:relative;width:100%;height:260px;min-width:0;overflow:hidden}
.hd-chart.compact{height:220px}
.hd-chart svg{display:block;width:100%;height:100%;overflow:visible}
.hd-chart-grid{stroke:var(--line);stroke-width:1}
.hd-chart-axis{fill:var(--muted);font-size:10px;font-weight:600}
.hd-chart-label{fill:var(--muted);font-size:10px;font-weight:600}
.hd-chart-line{fill:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.hd-chart-area{opacity:.1}
.hd-chart-point{stroke:var(--panel-solid);stroke-width:2;cursor:pointer}
.hd-chart-bar{rx:7;ry:7;cursor:pointer;transition:opacity .15s,transform .15s;transform-box:fill-box;transform-origin:center bottom}
.hd-chart-bar:hover{opacity:.78;transform:scaleY(1.02)}
.hd-chart-legend{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:8px 14px;margin-top:6px;color:var(--muted);font-size:10px;font-weight:650}
.hd-chart-legend span{display:inline-flex;align-items:center;gap:6px}
.hd-chart-legend i{width:8px;height:8px;border-radius:999px;display:inline-block}
.hd-pie-wrap{height:100%;display:grid;grid-template-columns:minmax(150px,.9fr) minmax(160px,1.1fr);align-items:center;gap:18px;padding:8px 8px 4px}
.hd-pie{position:relative;width:min(190px,100%);aspect-ratio:1;border-radius:50%;margin:auto;box-shadow:inset 0 0 0 1px rgba(255,255,255,.08)}
.hd-pie:after{content:"";position:absolute;inset:24%;border-radius:50%;background:var(--panel-solid);box-shadow:0 0 0 1px var(--line)}
.hd-pie-center{position:absolute;inset:31%;display:grid;place-items:center;z-index:1;text-align:center}
.hd-pie-center strong{font-size:24px;line-height:1;letter-spacing:-1px}
.hd-pie-center span{margin-top:4px;color:var(--muted);font-size:9px;font-weight:700;text-transform:uppercase;letter-spacing:.08em}
.hd-pie-legend{display:grid;gap:10px}
.hd-pie-item{display:grid;grid-template-columns:10px 1fr auto;align-items:center;gap:8px;color:var(--muted);font-size:11px}
.hd-pie-item i{width:9px;height:9px;border-radius:999px}
.hd-pie-item strong{color:var(--text);font-size:12px}
.hd-chart-tooltip{position:fixed;z-index:500;pointer-events:none;opacity:0;transform:translate(-50%,-110%);padding:7px 9px;border-radius:10px;background:rgba(20,20,22,.94);color:#fff;font-size:10px;font-weight:650;box-shadow:0 10px 30px rgba(0,0,0,.25);transition:opacity .08s;white-space:nowrap}
.hd-chart-tooltip.show{opacity:1}

/* Task module */
.task-shell{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:14px;align-items:start}
.task-calendar-panel,.task-side-panel{background:var(--panel);border:1px solid var(--line);border-radius:var(--radius-xl);box-shadow:var(--shadow-card);overflow:hidden}
.task-calendar-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 16px;border-bottom:1px solid var(--line);flex-wrap:wrap}
.task-calendar-nav,.task-view-switch{display:flex;align-items:center;gap:6px}
.task-calendar-title{font-size:18px;font-weight:780;letter-spacing:-.5px;min-width:170px;text-align:center}
.task-toolbar-btn{height:36px;min-width:36px;padding:0 11px;border:1px solid var(--line);border-radius:11px;background:var(--control);color:var(--text);display:inline-flex;align-items:center;justify-content:center;gap:7px;font-size:11px;font-weight:700;cursor:pointer}
.task-toolbar-btn:hover{background:var(--hover)}
.task-toolbar-btn.active{background:var(--blue);border-color:var(--blue);color:#fff}
.task-filter-bar{display:grid;grid-template-columns:minmax(180px,1fr) repeat(3,minmax(120px,170px));gap:9px;padding:12px 16px;border-bottom:1px solid var(--line)}
.task-filter-bar .input,.task-filter-bar select{width:100%;height:38px}
.task-calendar-weekdays{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));border-bottom:1px solid var(--line);background:var(--control)}
.task-calendar-weekdays span{padding:10px 8px;text-align:center;color:var(--muted);font-size:10px;font-weight:750;text-transform:uppercase;letter-spacing:.06em}
.task-calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));background:var(--line);gap:1px}
.task-calendar-day{position:relative;min-height:130px;background:var(--panel-solid);padding:8px;overflow:hidden;transition:background .15s}
.task-calendar-day:hover,.task-calendar-day.drag-over{background:var(--hover)}
.task-calendar-day.outside{opacity:.48}
.task-calendar-day.today{box-shadow:inset 0 0 0 2px var(--blue)}
.task-day-head{display:flex;align-items:center;justify-content:space-between;gap:6px;margin-bottom:6px}
.task-day-number{width:25px;height:25px;border-radius:999px;display:grid;place-items:center;color:var(--text);font-size:11px;font-weight:750}
.task-calendar-day.today .task-day-number{background:var(--blue);color:#fff}
.task-day-add{width:24px;height:24px;border:0;border-radius:8px;background:transparent;color:var(--muted);display:grid;place-items:center;opacity:0;cursor:pointer}
.task-calendar-day:hover .task-day-add{opacity:1}
.task-day-events{display:grid;gap:4px}
.task-event{position:relative;display:block;width:100%;border:0;border-left:3px solid var(--blue);border-radius:7px;background:color-mix(in srgb,var(--blue) 12%,var(--panel-solid));color:var(--text);padding:5px 6px;text-align:left;font-size:9px;font-weight:700;line-height:1.3;cursor:pointer;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.task-event[data-priority="Urgent"]{border-left-color:var(--red);background:color-mix(in srgb,var(--red) 12%,var(--panel-solid))}
.task-event[data-priority="High"]{border-left-color:var(--orange);background:color-mix(in srgb,var(--orange) 12%,var(--panel-solid))}
.task-event[data-status="Completed"]{opacity:.6;text-decoration:line-through}
.task-more{border:0;background:transparent;color:var(--blue);font-size:9px;font-weight:750;padding:2px 3px;cursor:pointer}
.task-week-view{display:grid;grid-template-columns:repeat(7,minmax(130px,1fr));min-width:920px;background:var(--line);gap:1px}
.task-week-day{min-height:520px;background:var(--panel-solid);padding:10px}
.task-week-day-head{position:sticky;top:0;background:var(--panel-solid);padding-bottom:8px;margin-bottom:8px;border-bottom:1px solid var(--line);font-size:11px;font-weight:750}
.task-week-event{margin-bottom:7px;padding:9px;border-radius:10px;background:var(--control);border-left:3px solid var(--blue);font-size:10px;cursor:pointer}
.task-week-event strong{display:block;font-size:11px;margin-bottom:3px}
.task-agenda{display:grid;gap:12px;padding:14px}
.task-agenda-group{border:1px solid var(--line);border-radius:14px;overflow:hidden}
.task-agenda-date{padding:10px 12px;background:var(--control);font-size:11px;font-weight:750}
.task-agenda-row{display:grid;grid-template-columns:74px minmax(0,1fr) auto;align-items:center;gap:10px;padding:11px 12px;border-top:1px solid var(--line);cursor:pointer}
.task-agenda-row:hover{background:var(--hover)}
.task-agenda-time{font-size:10px;color:var(--muted);font-weight:700}
.task-agenda-copy strong{display:block;font-size:12px}
.task-agenda-copy span{font-size:10px;color:var(--muted)}
.task-side-section{padding:16px;border-bottom:1px solid var(--line)}
.task-side-section:last-child{border-bottom:0}
.task-side-title{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:12px;font-size:13px;font-weight:760}
.task-mini-list{display:grid;gap:8px}
.task-mini-item{padding:10px;border:1px solid var(--line);border-radius:12px;background:var(--control);cursor:pointer}
.task-mini-item strong{display:block;font-size:11px;margin-bottom:3px}
.task-mini-item span{font-size:9px;color:var(--muted)}
.task-color-dot{width:8px;height:8px;border-radius:999px;display:inline-block;margin-right:6px;background:var(--blue)}
.task-empty{display:grid;place-items:center;text-align:center;min-height:240px;padding:30px;color:var(--muted)}
.task-empty svg{margin-bottom:10px;opacity:.5}
.task-empty strong{display:block;color:var(--text);font-size:14px;margin-bottom:5px}
.task-modal-backdrop{position:fixed;inset:0;z-index:360;display:none;place-items:center;padding:18px;background:rgba(0,0,0,.5);backdrop-filter:blur(14px)}
.task-modal-backdrop.open{display:grid}
.task-modal{width:min(680px,100%);max-height:92vh;overflow:auto;border:1px solid var(--line-strong);border-radius:24px;background:var(--panel-solid);box-shadow:0 40px 110px rgba(0,0,0,.45)}
.task-modal-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:20px;border-bottom:1px solid var(--line)}
.task-modal-header h3{margin:0;font-size:20px;letter-spacing:-.5px}.task-modal-header p{margin:4px 0 0;color:var(--muted);font-size:11px}
.task-modal-body{padding:20px}.task-modal-footer{display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:14px 20px 20px}
.task-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.task-form-grid .field-full{grid-column:1/-1}
.task-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.task-detail-item{padding:12px;border-radius:13px;background:var(--control);border:1px solid var(--line)}.task-detail-item span{display:block;color:var(--muted);font-size:9px;text-transform:uppercase;letter-spacing:.06em;font-weight:750;margin-bottom:4px}.task-detail-item strong{font-size:12px}
.task-table-actions{display:flex;justify-content:flex-end;gap:5px}.task-action-btn{width:32px;height:32px;border:1px solid var(--line);border-radius:9px;background:var(--control);color:var(--text);display:grid;place-items:center;cursor:pointer}.task-action-btn:hover{background:var(--hover)}
.task-pagination{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 16px;border-top:1px solid var(--line);color:var(--muted);font-size:10px}.task-pagination-controls{display:flex;gap:5px}.task-page-btn{min-width:34px;height:34px;border:1px solid var(--line);border-radius:9px;background:var(--control);color:var(--text);font-size:10px;font-weight:700;cursor:pointer}.task-page-btn.active{background:var(--blue);border-color:var(--blue);color:#fff}.task-page-btn:disabled{opacity:.4;cursor:not-allowed}

@media(max-width:1100px){.analytics-grid.triple{grid-template-columns:repeat(2,minmax(0,1fr))}.task-shell{grid-template-columns:1fr}.task-side-panel{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}.task-side-section{border-bottom:0;border-right:1px solid var(--line)}.task-side-section:last-child{border-right:0}}
@media(max-width:780px){.analytics-grid,.analytics-grid.triple{grid-template-columns:1fr}.hd-chart{height:240px}.hd-pie-wrap{grid-template-columns:1fr;gap:8px}.hd-pie{width:150px}.task-filter-bar{grid-template-columns:1fr 1fr}.task-filter-bar>*:first-child{grid-column:1/-1}.task-calendar-title{order:-1;width:100%;text-align:left}.task-calendar-toolbar{align-items:flex-start}.task-calendar-day{min-height:110px;padding:6px}.task-day-number{width:22px;height:22px}.task-event{font-size:8px;padding:4px}.task-side-panel{grid-template-columns:1fr}.task-side-section{border-right:0;border-bottom:1px solid var(--line)}.task-form-grid,.task-detail-grid{grid-template-columns:1fr}.task-form-grid .field-full{grid-column:1}.task-modal-backdrop{align-items:flex-end;padding:0}.task-modal{width:100%;max-height:94vh;border-radius:22px 22px 0 0}.task-agenda-row{grid-template-columns:58px minmax(0,1fr)}}
@media(max-width:520px){.task-calendar-weekdays span{font-size:8px;padding:8px 2px}.task-calendar-day{min-height:88px}.task-event{border-left-width:2px}.task-day-add{display:none}.task-filter-bar{grid-template-columns:1fr}.task-filter-bar>*:first-child{grid-column:auto}.task-view-switch .task-toolbar-btn{padding:0 8px}.task-view-switch .task-toolbar-btn span{display:none}.task-pagination{align-items:flex-start;flex-direction:column}}

/* Task editor form alignment */
.task-modal .field,
.task-modal label.field{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  align-content:start;
  gap:7px;
  min-width:0;
}
.task-modal .field>span{
  display:block;
  color:var(--text);
  font-size:11px;
  font-weight:700;
  line-height:1.3;
}
.task-modal .input,
.task-modal select,
.task-modal textarea{
  display:block;
  width:100%;
  min-width:0;
  max-width:none;
  margin:0;
}
.task-modal textarea.input{height:auto;min-height:96px;resize:vertical}
.task-modal .required{color:var(--red)}

/* ========================================================================== 
   V20 · Universal Apple field system and task workspace refinements
   Keeps the established Helprite Desk design while normalising every
   editable field, filter, task form and task register control.
   ========================================================================== */

/* Shared Apple field primitives used by task pages and any non-static form. */
:where(label.field, .field) {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: start;
  gap: 8px;
  min-width: 0;
}

:where(label.field, .field) > span:first-child {
  display: block;
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -.08px;
}

:where(
  .input,
  label.field > input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]),
  label.field > select,
  label.field > textarea,
  .field > input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]),
  .field > select,
  .field > textarea,
  .task-filter-bar > input,
  .task-filter-bar > select,
  [data-task-list-page] .search-box > input,
  [data-task-list-page] .filter-row > select
) {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  height: 46px;
  margin: 0;
  padding: 0 14px;
  border: 1px solid var(--apple-control-border);
  border-radius: 13px;
  background-color: var(--apple-control-bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", Inter, "Segoe UI", sans-serif;
  font-size: 14px;
  font-weight: 430;
  line-height: 1.35;
  letter-spacing: -.1px;
  outline: none;
  box-shadow: var(--apple-control-shadow);
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

:where(
  label.field > textarea,
  .field > textarea,
  textarea.input
) {
  height: auto;
  min-height: 118px;
  padding: 12px 14px;
  resize: vertical;
}

:where(
  label.field > select,
  .field > select,
  .task-filter-bar > select,
  [data-task-list-page] .filter-row > select
) {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 42px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238e8e93' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px;
}

:where(
  .input,
  label.field > input,
  label.field > textarea,
  .field > input,
  .field > textarea,
  .task-filter-bar > input,
  [data-task-list-page] .search-box > input
)::placeholder {
  color: var(--apple-control-placeholder);
  opacity: 1;
}

:where(
  .input,
  label.field > input:not(:disabled):not([readonly]),
  label.field > select:not(:disabled),
  label.field > textarea:not(:disabled):not([readonly]),
  .field > input:not(:disabled):not([readonly]),
  .field > select:not(:disabled),
  .field > textarea:not(:disabled):not([readonly]),
  .task-filter-bar > input:not(:disabled),
  .task-filter-bar > select:not(:disabled),
  [data-task-list-page] .search-box > input:not(:disabled),
  [data-task-list-page] .filter-row > select:not(:disabled)
):hover {
  background-color: var(--apple-control-bg-hover);
  border-color: var(--apple-control-border-strong);
}

:where(
  .input,
  label.field > input,
  label.field > select,
  label.field > textarea,
  .field > input,
  .field > select,
  .field > textarea,
  .task-filter-bar > input,
  .task-filter-bar > select,
  [data-task-list-page] .search-box > input,
  [data-task-list-page] .filter-row > select
):focus {
  border-color: var(--blue);
  background-color: var(--apple-control-bg);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 17%, transparent), var(--apple-control-shadow);
}

:where(label.field, .field):focus-within > span:first-child {
  color: var(--blue);
}

:where(
  label.field > input,
  label.field > select,
  label.field > textarea,
  .field > input,
  .field > select,
  .field > textarea
):disabled,
:where(
  label.field > input,
  label.field > textarea,
  .field > input,
  .field > textarea
)[readonly] {
  opacity: 1;
  color: var(--text);
  background: var(--apple-control-disabled);
  border-color: transparent;
  box-shadow: none;
  cursor: default;
  -webkit-text-fill-color: var(--text);
}

:where(label.field, .field) .required {
  color: var(--red);
}

:where(label.field, .field) select option,
.task-filter-bar select option,
[data-task-list-page] .filter-row select option {
  background: var(--panel-solid);
  color: var(--text);
  font-size: 14px;
}

/* Keep native date/time pickers, but align their typography and spacing. */
:where(.input, label.field > input, .field > input)[type="date"],
:where(.input, label.field > input, .field > input)[type="time"],
:where(.input, label.field > input, .field > input)[type="datetime-local"],
:where(.input, label.field > input, .field > input)[type="month"],
:where(.input, label.field > input, .field > input)[type="week"] {
  padding-right: 12px;
}

/* Task register toolbar — compact, aligned and visually consistent. */
[data-task-list-page] .table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel-solid) 86%, transparent);
}

[data-task-list-page] .search-box {
  flex: 1 1 300px;
  min-width: 220px;
}

[data-task-list-page] .search-box > input {
  max-width: 440px;
}

[data-task-list-page] .filter-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(145px, 190px));
  align-items: center;
  gap: 8px;
}

[data-task-list-page] .table-wrap,
[data-task-list-page] .task-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

[data-task-list-page] .task-register-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  table-layout: auto;
}

[data-task-list-page] .task-register-table th {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--control) 72%, transparent);
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: .065em;
  white-space: nowrap;
}

[data-task-list-page] .task-register-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-size: 12px;
  vertical-align: middle;
}

[data-task-list-page] .task-register-table tbody tr {
  transition: background .15s ease;
}

[data-task-list-page] .task-register-table tbody tr:hover {
  background: var(--hover);
}

[data-task-list-page] .task-register-table tbody tr:last-child td {
  border-bottom: 0;
}

[data-task-list-page] .task-register-table td:first-child {
  min-width: 280px;
}

[data-task-list-page] .task-register-table td:nth-child(2) {
  min-width: 190px;
}

[data-task-list-page] .task-register-table td:nth-child(3) {
  min-width: 150px;
}

[data-task-list-page] .task-register-table .table-subtext {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.35;
}

/* Task calendar search/filter row. */
.task-filter-bar {
  align-items: center;
  background: color-mix(in srgb, var(--panel-solid) 88%, transparent);
}

.task-filter-bar > :first-child {
  min-width: 0;
}

/* Dedicated task create/edit forms. */
#taskRecordForm {
  width: 100%;
}

#taskRecordForm .form-grid {
  gap: 17px 15px;
}

#taskRecordForm .field.span-2 {
  grid-column: 1 / -1;
}

/* Task modal form surfaces. */
.task-modal .task-modal-body {
  padding: 20px;
}

.task-modal .task-form-grid {
  gap: 17px 15px;
}

.task-modal .input,
.task-modal select,
.task-modal textarea {
  min-height: 46px;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--apple-control-border);
  border-radius: 13px;
  background-color: var(--apple-control-bg);
  color: var(--text);
  font-size: 14px;
  box-shadow: var(--apple-control-shadow);
}

.task-modal textarea.input,
.task-modal textarea {
  height: auto;
  min-height: 118px;
  padding: 12px 14px;
}

.task-modal select {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238e8e93' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 14px;
}

.task-modal .input:focus,
.task-modal select:focus,
.task-modal textarea:focus {
  border-color: var(--blue);
  background-color: var(--apple-control-bg);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 17%, transparent), var(--apple-control-shadow);
  outline: none;
}

.task-modal .task-modal-footer {
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel-solid) 94%, transparent);
}

/* Better horizontal alignment on medium and small screens. */
@media (max-width: 1100px) {
  [data-task-list-page] .table-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  [data-task-list-page] .search-box,
  [data-task-list-page] .search-box > input {
    width: 100%;
    max-width: none;
  }

  [data-task-list-page] .filter-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  :where(
    .input,
    label.field > input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]),
    label.field > select,
    label.field > textarea,
    .field > input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]),
    .field > select,
    .field > textarea,
    .task-filter-bar > input,
    .task-filter-bar > select,
    [data-task-list-page] .search-box > input,
    [data-task-list-page] .filter-row > select
  ) {
    min-height: 48px;
    height: 48px;
    border-radius: 13px;
    font-size: 16px;
  }

  :where(label.field > textarea, .field > textarea, textarea.input) {
    height: auto;
    min-height: 124px;
  }

  [data-task-list-page] .filter-row {
    grid-template-columns: 1fr;
  }

  [data-task-list-page] .task-register-table {
    min-width: 900px;
  }

  .task-filter-bar {
    grid-template-columns: 1fr !important;
    gap: 8px;
  }

  .task-filter-bar > *:first-child {
    grid-column: auto !important;
  }

  #taskRecordForm .form-grid,
  .task-modal .task-form-grid {
    grid-template-columns: 1fr;
  }

  #taskRecordForm .field.span-2,
  .task-modal .task-form-grid .field-full {
    grid-column: 1;
  }
}

/* ========================================================================== 
   HELPRITE DESK v23 — SIDEBAR BRAND VISIBILITY ON EVERY VIEWPORT
   Keep the Helprite mark fixed at the top of the navigation rail. The mark
   must never shrink when the available screen height is small; the menu area
   becomes scrollable instead.
   ========================================================================== */
.sidebar {
  overflow: hidden;
}

.sidebar-mobile-head {
  flex: 0 0 auto;
  min-width: 0;
}

.sidebar .brand-mark,
.sidebar-mobile-head .brand-mark {
  flex: 0 0 58px;
  width: 58px;
  min-width: 58px;
  max-width: 58px;
  height: 58px;
  min-height: 58px;
  max-height: 58px;
  position: relative;
  z-index: 2;
  overflow: hidden;
}

.sidebar .brand-mark img,
.sidebar-mobile-head .brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: center;
  flex: 0 0 auto;
}

.sidebar-nav {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-block: 2px 8px;
}

.sidebar-nav::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.side-bottom {
  flex: 0 0 auto;
}

/* Compact only the vertical rhythm on short desktop/laptop displays. */
@media (min-width: 901px) and (max-height: 760px) {
  .sidebar {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .sidebar .brand-mark,
  .sidebar-mobile-head .brand-mark {
    flex-basis: 52px;
    width: 52px;
    min-width: 52px;
    max-width: 52px;
    height: 52px;
    min-height: 52px;
    max-height: 52px;
  }

  .sidebar-nav {
    margin-top: 12px;
    gap: 5px;
  }

  .side-link {
    width: 52px;
    min-height: 48px;
    border-radius: 15px;
  }

  .side-bottom {
    gap: 5px;
  }
}

/* Drawer mode: keep the logo visible while the links scroll independently. */
@media (max-width: 900px) {
  .sidebar {
    overflow: hidden;
  }

  .sidebar-mobile-head {
    flex: 0 0 66px;
    min-height: 66px;
  }

  .sidebar-mobile-head .brand-mark {
    flex-basis: 54px;
    width: 54px;
    min-width: 54px;
    max-width: 54px;
    height: 54px;
    min-height: 54px;
    max-height: 54px;
  }

  .sidebar-nav {
    flex: 1 1 auto;
    min-height: 0;
  }
}

/* Establish a real, non-collapsing desktop brand row (overrides display:contents). */
.sidebar-mobile-head {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 58px;
}

@media (max-width: 900px) {
  .sidebar-mobile-head {
    justify-content: space-between;
  }
}

/* ========================================================================== 
   HELPRITE DESK v24 — UNIVERSAL HEADER BRAND + REFINED LIVE WIDGETS
   The full Helprite Desk logo now lives in the top bar on every application
   page. The navigation rail begins immediately with Home. Weather and local
   time retain their live functionality with a more responsive Apple layout.
   ========================================================================== */

/* Sidebar: no brand block; begin navigation at the top of the rail. */
.sidebar {
  padding-top: 10px;
}
.sidebar-mobile-head {
  display: none;
  width: 0;
  height: 0;
  min-height: 0;
  flex: 0 0 0;
}
.sidebar-nav {
  margin-top: 0;
  padding-top: 0;
}

/* Full system logo replaces the workspace/page title in the top bar. */
.topbar-system-logo {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  width: clamp(156px, 12vw, 205px);
  height: calc(var(--topbar-h) - 12px);
  min-height: 42px;
  max-height: 56px;
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 12px;
}
.topbar-system-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
}
.topbar-system-logo:focus-visible {
  outline: 3px solid rgba(10,132,255,.28);
  outline-offset: 2px;
}

/* The old title block is intentionally retired. */
.topbar-title-wrap,
.mobile-topbar-brand {
  display: none !important;
}

/* Mobile drawer: preserve the close toggle without reserving a logo row. */
@media (max-width: 900px) {
  .sidebar {
    padding-top: 10px;
  }
  .sidebar-mobile-head {
    display: block;
    position: absolute;
    top: 10px;
    right: 10px;
    width: 42px;
    height: 42px;
    min-height: 42px;
    z-index: 5;
    pointer-events: none;
  }
  .sidebar-mobile-head .sidebar-close-button {
    pointer-events: auto;
  }
  .sidebar-nav {
    margin-top: 0;
    padding-top: 0;
  }
  .topbar-system-logo {
    width: clamp(116px, 34vw, 150px);
    height: 42px;
    min-height: 38px;
    border-radius: 10px;
  }
}

@media (max-width: 420px) {
  .topbar-system-logo {
    width: clamp(102px, 30vw, 124px);
    height: 38px;
  }
}

/* Apple-style live weather card. */
.home-weather-widget {
  background:
    radial-gradient(circle at 82% 15%, rgba(255,255,255,.24), transparent 26%),
    linear-gradient(155deg, #38a8ff 0%, #0a84ff 42%, #0757c7 100%);
  border-color: rgba(255,255,255,.22);
  box-shadow: 0 18px 38px rgba(0,94,204,.24), inset 0 1px 0 rgba(255,255,255,.28);
}
.home-weather-widget::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255,255,255,.17), transparent 34%, transparent 72%, rgba(0,0,0,.08));
  z-index: -1;
}
.weather-widget-content,
.clock-widget-content {
  padding: clamp(13px, 1.25vw, 18px) !important;
}
.weather-head,
.clock-head {
  align-items: center;
}
.weather-head .widget-title,
.clock-head .widget-title {
  font-size: clamp(14px, 1.15vw, 17px);
  letter-spacing: -.35px;
}
.weather-head .widget-label,
.clock-head .widget-label {
  font-size: clamp(9px, .72vw, 11px);
}
.weather-refresh-button {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(255,255,255,.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
}
.weather-current {
  flex: 1 1 auto;
  margin-top: clamp(7px, 1vh, 12px);
  gap: clamp(9px, 1vw, 14px);
}
.weather-symbol {
  width: clamp(42px, 4.2vw, 58px);
  height: clamp(42px, 4.2vw, 58px);
  border-radius: clamp(14px, 1.4vw, 18px);
  font-size: clamp(23px, 2.3vw, 31px);
  background: rgba(255,255,255,.17);
  border: 1px solid rgba(255,255,255,.12);
}
.weather-temp {
  font-size: clamp(37px, 4vw, 56px) !important;
  letter-spacing: clamp(-3px, -.2vw, -1.5px) !important;
}
.weather-condition {
  max-width: 15ch;
  font-size: clamp(10px, .78vw, 12px);
}
.weather-meta {
  margin: clamp(5px, .7vh, 9px) 0;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(255,255,255,.09);
  font-size: clamp(8.5px, .67vw, 10px);
}
.weather-strip {
  grid-template-columns: repeat(5, minmax(38px, 1fr));
  gap: clamp(4px, .45vw, 7px) !important;
}
.weather-day {
  padding: clamp(5px, .6vw, 8px) 3px !important;
  border-radius: 10px !important;
  background: rgba(255,255,255,.10) !important;
  border: 1px solid rgba(255,255,255,.06);
}
.weather-day strong {
  font-size: clamp(10px, .82vw, 13px);
}

/* Apple-style live local-time card. */
.home-clock-widget.gradient-light {
  background:
    radial-gradient(circle at 88% 12%, rgba(10,132,255,.15), transparent 28%),
    linear-gradient(145deg, rgba(255,255,255,.98), rgba(231,239,249,.96));
  border-color: rgba(255,255,255,.7);
  box-shadow: 0 18px 38px rgba(35,57,82,.16), inset 0 1px 0 rgba(255,255,255,.95);
}
html[data-theme="dark"] .home-clock-widget.gradient-light {
  background:
    radial-gradient(circle at 88% 12%, rgba(10,132,255,.22), transparent 30%),
    linear-gradient(145deg, #f9fbff, #dce7f4 88%);
}
.clock-live-indicator {
  min-height: 25px;
  padding: 5px 9px;
  box-shadow: inset 0 0 0 1px rgba(52,199,89,.10);
}
.clock-layout {
  grid-template-columns: minmax(64px, .72fr) minmax(0, 1.28fr);
  gap: clamp(10px, 1.2vw, 18px);
  width: 100%;
  margin-block: auto;
}
.clock-face {
  width: clamp(64px, 6vw, 88px);
  height: clamp(64px, 6vw, 88px);
  border: 1px solid rgba(11,19,32,.09);
  box-shadow: inset 0 0 0 3px #111827, 0 12px 25px rgba(21,39,62,.18);
}
.clock-hour-hand {
  height: clamp(18px, 1.75vw, 25px);
}
.clock-minute-hand {
  height: clamp(24px, 2.35vw, 34px);
}
.clock-second-hand {
  height: clamp(27px, 2.55vw, 37px);
}
.clock-time {
  font-size: clamp(20px, 2vw, 31px);
  letter-spacing: clamp(-1.2px, -.08vw, -.5px);
  font-variant-numeric: tabular-nums;
}
.clock-date {
  margin-top: 7px;
  font-size: clamp(10px, .78vw, 12px);
}
.clock-offset {
  margin-top: 4px;
  font-size: clamp(9px, .7vw, 10.5px);
}

/* Tablet/mobile widgets receive comfortable dimensions and do not crush text. */
@media (max-width: 900px) {
  .home-weather-widget,
  .home-clock-widget {
    min-height: 210px;
  }
  .weather-widget-content,
  .clock-widget-content {
    padding: 15px !important;
  }
  .weather-strip {
    overflow-x: auto;
    scrollbar-width: none;
  }
  .weather-strip::-webkit-scrollbar { display: none; }
  .clock-layout {
    grid-template-columns: 76px minmax(0,1fr);
  }
  .clock-face {
    width: 72px;
    height: 72px;
  }
}

@media (max-width: 620px) {
  body[data-page-route="/home"] .home-weather-widget,
  body[data-page-route="/home"] .home-clock-widget,
  body[class*="role-"] .home-weather-widget,
  body[class*="role-"] .home-clock-widget {
    grid-column: 1 / -1 !important;
    grid-row: span 2 !important;
    min-height: 205px;
  }
  .weather-current {
    margin-top: 8px;
  }
  .weather-meta {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .weather-strip {
    grid-template-columns: repeat(5, minmax(54px,1fr));
  }
  .clock-layout {
    grid-template-columns: 82px minmax(0,1fr);
  }
  .clock-face {
    width: 78px;
    height: 78px;
  }
  .clock-time {
    font-size: clamp(25px, 8vw, 34px);
  }
}

/* ========================================================================== 
   HELPRITE DESK v25 — HEADER LOGO CONTAINMENT + MOBILE DRAWER BRAND
   Protect the full wordmark from intrinsic-size overflow on cached browsers,
   while restoring the logo inside the opened mobile navigation drawer.
   ========================================================================== */
.topbar {
  overflow: hidden;
}

.topbar-left {
  height: 100%;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.topbar-system-logo {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  width: clamp(156px, 12vw, 205px) !important;
  min-width: 156px !important;
  max-width: 205px !important;
  height: 56px !important;
  min-height: 42px !important;
  max-height: calc(var(--topbar-h) - 12px) !important;
  flex: 0 0 auto !important;
  overflow: hidden !important;
  border-radius: 12px;
  contain: layout paint;
  line-height: 0;
}

.topbar-system-logo img {
  position: static !important;
  inset: auto !important;
  display: block;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  min-height: 0 !important;
  max-height: 100% !important;
  object-fit: contain !important;
  object-position: left center !important;
  transform: none !important;
  margin: 0 !important;
}

/* The desktop rail remains icon-only and begins with Home. */
@media (min-width: 901px) {
  .sidebar-mobile-head {
    display: none !important;
  }
}

/* Mobile/tablet drawer restores the full system wordmark next to Close. */
@media (max-width: 900px) {
  .sidebar {
    padding-top: 10px;
  }

  .sidebar-mobile-head {
    display: flex !important;
    position: relative !important;
    inset: auto !important;
    width: 100% !important;
    height: 60px !important;
    min-height: 60px !important;
    flex: 0 0 60px !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px;
    padding: 2px 0 8px !important;
    pointer-events: auto !important;
    z-index: 5;
  }

  .sidebar-mobile-brand {
    display: inline-flex;
    align-items: center;
    width: min(170px, calc(100% - 54px));
    height: 48px;
    max-width: 170px;
    overflow: hidden;
    border-radius: 10px;
    line-height: 0;
    flex: 0 1 auto;
  }

  .sidebar-mobile-brand img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: left center !important;
  }

  .sidebar-mobile-head .sidebar-close-button {
    position: static !important;
    inset: auto !important;
    width: 42px;
    height: 42px;
    min-width: 42px;
    flex: 0 0 42px;
  }

  .sidebar-nav {
    margin-top: 0 !important;
    padding-top: 2px !important;
  }

  .topbar-system-logo {
    width: clamp(116px, 34vw, 150px) !important;
    min-width: 116px !important;
    max-width: 150px !important;
    height: 42px !important;
    min-height: 38px !important;
    max-height: 42px !important;
  }
}

@media (max-width: 420px) {
  .topbar-system-logo {
    width: clamp(102px, 30vw, 124px) !important;
    min-width: 102px !important;
    max-width: 124px !important;
    height: 38px !important;
  }

  .sidebar-mobile-brand {
    width: min(150px, calc(100% - 54px));
    height: 44px;
  }
}


/* ========================================================================== 
   HELPRITE DESK v27 — PROFESSIONAL ACCOUNT PROFILE + SIDEBAR HOVER TOOLTIPS
   ========================================================================== */

/* Account Profile: isolate the page from compact Home-dashboard rules. */
.account-profile-page .main-content {
  padding-bottom: 42px;
}
.account-profile-page .account-profile-heading {
  margin-bottom: 18px;
}
.account-profile-page .account-profile-view {
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
}

.account-profile-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(360px, 1.15fr) minmax(420px, 1fr) auto;
  align-items: center;
  gap: 24px;
  min-height: 176px;
  padding: 24px;
  margin-bottom: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 25px;
  background:
    radial-gradient(circle at 92% 15%, rgba(10,132,255,.22), transparent 30%),
    radial-gradient(circle at 68% 110%, rgba(94,92,230,.13), transparent 37%),
    var(--panel);
  box-shadow: var(--shadow-soft);
}
.account-profile-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(125deg, rgba(255,255,255,.055), transparent 38%);
}
.account-profile-identity,
.account-profile-contact-summary,
.account-profile-hero-actions {
  position: relative;
  z-index: 1;
}
.account-profile-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 18px;
}
.account-profile-avatar {
  position: relative;
  width: 104px;
  height: 104px;
  flex: 0 0 104px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 31px;
  background: linear-gradient(145deg, #2997ff, #0064d9 74%);
  color: #fff;
  box-shadow: 0 18px 42px rgba(10,132,255,.28), inset 0 1px 0 rgba(255,255,255,.35);
  font-size: 31px;
  font-weight: 800;
  letter-spacing: -1.2px;
}
.account-profile-avatar i {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 23px;
  height: 23px;
  border: 4px solid var(--panel-solid);
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 4px 12px rgba(0,0,0,.28);
}
.account-profile-name { min-width: 0; }
.account-profile-kicker {
  margin-bottom: 6px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 760;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.account-profile-name h2 {
  margin: 0;
  font-size: clamp(25px, 2.1vw, 34px);
  line-height: 1.02;
  letter-spacing: -1.25px;
}
.account-profile-name > p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.account-profile-name > p span { margin: 0 5px; }
.account-profile-badges {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 12px;
}

.account-profile-contact-summary {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 4px 0;
}
.account-profile-contact-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 37px minmax(0,1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: color-mix(in srgb, var(--panel-2) 84%, transparent);
}
.account-profile-mini-icon {
  width: 37px;
  height: 37px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: rgba(10,132,255,.13);
  color: var(--blue);
}
.account-profile-contact-item div { min-width: 0; }
.account-profile-contact-item small,
.account-profile-contact-item strong { display: block; }
.account-profile-contact-item small {
  color: var(--muted);
  font-size: 9px;
  font-weight: 720;
  letter-spacing: .045em;
  text-transform: uppercase;
}
.account-profile-contact-item strong {
  margin-top: 2px;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-profile-contact-item em {
  color: var(--green);
  font-size: 9px;
  font-style: normal;
  font-weight: 750;
}
.account-profile-hero-actions {
  display: grid;
  gap: 9px;
  min-width: 168px;
}
.account-profile-hero-actions .btn { width: 100%; }

.account-profile-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.account-profile-metrics article {
  min-width: 0;
  min-height: 100px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}
.account-profile-metrics span,
.account-profile-metrics strong,
.account-profile-metrics small { display: block; }
.account-profile-metrics span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 720;
  letter-spacing: .045em;
  text-transform: uppercase;
}
.account-profile-metrics strong {
  margin-top: 8px;
  font-size: 18px;
  letter-spacing: -.35px;
}
.account-profile-metrics small {
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-profile-grid {
  display: grid;
  grid-template-columns: minmax(0,1.55fr) minmax(340px,.75fr);
  gap: 14px;
  align-items: start;
}
.account-profile-primary,
.account-profile-secondary {
  display: grid;
  gap: 14px;
  min-width: 0;
}
.account-profile-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  box-shadow: var(--shadow-soft);
}
.account-profile-card-head {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.account-profile-card-head > div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
}
.account-profile-card-head h3 {
  margin: 0;
  font-size: 15px;
  letter-spacing: -.25px;
}
.account-profile-card-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.4;
}
.account-profile-card-head.compact { min-height: 70px; }
.account-profile-section-icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(10,132,255,.13);
  color: var(--blue);
}
.account-profile-section-icon.tone-purple { background: rgba(191,90,242,.13); color: var(--purple); }
.account-profile-section-icon.tone-green { background: rgba(48,209,88,.13); color: var(--green); }
.account-profile-section-icon.tone-orange { background: rgba(255,159,10,.14); color: var(--orange); }

.account-profile-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 10px;
  padding: 15px;
}
.account-profile-detail {
  min-width: 0;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: color-mix(in srgb, var(--panel-2) 82%, transparent);
}
.account-profile-detail > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 730;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.account-profile-detail strong {
  margin-top: 5px;
  overflow-wrap: anywhere;
  font-size: 12.5px;
  line-height: 1.35;
}
.account-profile-detail small {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  color: var(--green);
  font-size: 9.5px;
}
.account-profile-detail small i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.account-profile-setting-list { padding: 0 15px; }
.account-profile-setting {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 66px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.account-profile-setting:last-child { border-bottom: 0; }
.account-profile-setting > div { min-width: 0; }
.account-profile-setting strong,
.account-profile-setting span { display: block; }
.account-profile-setting strong { font-size: 12.5px; }
.account-profile-setting > div > span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.4;
}
.account-profile-value-pill {
  flex: 0 0 auto;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--panel-2) 86%, transparent);
  color: var(--text);
  font-size: 9.5px;
  font-weight: 720;
  white-space: nowrap;
}
.account-profile-value-pill.success { color: var(--green); }

.account-profile-security-list { padding: 4px 15px 8px; }
.account-profile-security-row {
  display: grid;
  grid-template-columns: 36px minmax(0,1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 68px;
  border-bottom: 1px solid var(--line);
}
.account-profile-security-row:last-child { border-bottom: 0; }
.account-profile-security-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: rgba(10,132,255,.13);
  color: var(--blue);
}
.account-profile-security-row div { min-width: 0; }
.account-profile-security-row strong,
.account-profile-security-row span { display: block; }
.account-profile-security-row strong { font-size: 11.5px; }
.account-profile-security-row div span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.35;
}
.account-profile-security-row a,
.account-profile-security-row .account-profile-text-action,
.account-profile-security-row em {
  color: var(--green);
  font-size: 9.5px;
  font-style: normal;
  font-weight: 750;
  white-space: nowrap;
}
.account-profile-security-row a:hover,
.account-profile-security-row .account-profile-text-action:hover { text-decoration: underline; }

.account-profile-timeline { padding: 7px 15px 10px; }
.account-profile-timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 14px minmax(0,1fr);
  gap: 10px;
  padding: 10px 0;
}
.account-profile-timeline-item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 29px;
  bottom: -5px;
  width: 1px;
  background: var(--line);
}
.account-profile-timeline-item > i {
  position: relative;
  z-index: 1;
  width: 11px;
  height: 11px;
  margin-top: 3px;
  border: 3px solid color-mix(in srgb, var(--blue) 25%, var(--panel));
  border-radius: 50%;
  background: var(--blue);
}
.account-profile-timeline-item > i.success {
  border-color: color-mix(in srgb, var(--green) 25%, var(--panel));
  background: var(--green);
}
.account-profile-timeline-item strong,
.account-profile-timeline-item span,
.account-profile-timeline-item small { display: block; }
.account-profile-timeline-item strong { font-size: 11.5px; }
.account-profile-timeline-item span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9.5px;
}
.account-profile-timeline-item small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.account-profile-completion {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px;
}
.account-profile-completion-ring {
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--green) 0 100%, var(--panel-3) 0);
  box-shadow: inset 0 0 0 7px var(--panel);
}
.account-profile-completion-ring span {
  font-size: 11px;
  font-weight: 780;
}
.account-profile-completion h3 { margin: 0; font-size: 13px; }
.account-profile-completion p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

/* Sidebar tooltips are rendered at body level so they are never clipped by
   the narrow navigation rail or its scroll container. */
.sidebar-hover-tooltip {
  position: fixed;
  z-index: 1000;
  max-width: 260px;
  padding: 8px 11px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 10px;
  background: rgba(30,30,32,.96);
  color: #fff;
  box-shadow: 0 12px 32px rgba(0,0,0,.3);
  font-size: 12px;
  font-weight: 620;
  line-height: 1.2;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(-5px,0,0) scale(.98);
  transition: opacity .14s ease, transform .14s ease;
}
.sidebar-hover-tooltip.show {
  opacity: 1;
  transform: translate3d(0,0,0) scale(1);
}
[data-theme="light"] .sidebar-hover-tooltip {
  border-color: rgba(0,0,0,.09);
  background: rgba(255,255,255,.97);
  color: #1d1d1f;
  box-shadow: 0 12px 30px rgba(0,0,0,.14);
}
@media (min-width: 901px) {
  .sidebar .side-link .nav-tip { display: none !important; }
}
@media (max-width: 900px) {
  .sidebar-hover-tooltip { display: none !important; }
}

@media (max-width: 1280px) {
  .account-profile-hero {
    grid-template-columns: minmax(330px,1fr) minmax(340px,.85fr);
  }
  .account-profile-hero-actions {
    grid-column: 1 / -1;
    grid-template-columns: repeat(2,minmax(0,1fr));
    width: min(380px,100%);
    margin-left: auto;
  }
}
@media (max-width: 1050px) {
  .account-profile-grid { grid-template-columns: 1fr; }
  .account-profile-secondary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .account-profile-secondary .account-profile-completion { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .account-profile-hero { grid-template-columns: 1fr; }
  .account-profile-contact-summary { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .account-profile-contact-item {
    grid-template-columns: 37px minmax(0,1fr);
  }
  .account-profile-contact-item em { display: none; }
  .account-profile-hero-actions {
    grid-column: auto;
    width: 100%;
    margin-left: 0;
  }
  .account-profile-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 700px) {
  .account-profile-page .account-profile-heading { margin-bottom: 14px; }
  .account-profile-hero { padding: 18px; border-radius: 21px; }
  .account-profile-identity { align-items: flex-start; }
  .account-profile-avatar { width: 82px; height: 82px; flex-basis: 82px; border-radius: 25px; font-size: 25px; }
  .account-profile-contact-summary { grid-template-columns: 1fr; }
  .account-profile-hero-actions { grid-template-columns: 1fr; }
  .account-profile-detail-grid { grid-template-columns: 1fr; }
  .account-profile-secondary { grid-template-columns: 1fr; }
  .account-profile-secondary .account-profile-completion { grid-column: auto; }
}
@media (max-width: 460px) {
  .account-profile-identity { display: grid; text-align: center; }
  .account-profile-avatar { margin: 0 auto; }
  .account-profile-badges { justify-content: center; }
  .account-profile-metrics { grid-template-columns: 1fr; }
  .account-profile-setting { align-items: flex-start; flex-direction: column; gap: 8px; }
  .account-profile-value-pill { align-self: flex-start; }
}

/* HELPRITE DESK v28 — account security icon alignment and inline password modal */
.account-profile-security-icon {
  position: relative;
  overflow: hidden;
  flex: 0 0 36px;
  line-height: 0;
}
.account-profile-security-icon svg {
  display: block;
  width: 18px;
  height: 18px;
  margin: 0;
  transform: none;
}
.account-profile-security-icon-shield {
  background: rgba(48,209,88,.13);
  color: var(--green);
}
.account-profile-security-icon-key {
  background: rgba(191,90,242,.14);
  color: var(--purple);
}
.account-profile-text-action {
  appearance: none;
  -webkit-appearance: none;
  padding: 6px 0 6px 10px;
  border: 0;
  background: transparent;
  color: var(--green);
  font: inherit;
  font-size: 9.5px;
  font-weight: 750;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}
.account-profile-text-action:hover,
.account-profile-text-action:focus-visible {
  color: color-mix(in srgb, var(--green) 82%, white);
  text-decoration: underline;
  outline: none;
}

.account-password-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(0,0,0,.56);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s ease, visibility .2s ease;
  -webkit-backdrop-filter: saturate(125%) blur(18px);
  backdrop-filter: saturate(125%) blur(18px);
}
.account-password-modal-backdrop.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.account-password-modal {
  width: min(520px,100%);
  max-height: min(760px,92vh);
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: 26px;
  background: color-mix(in srgb, var(--panel-solid) 96%, transparent);
  color: var(--text);
  box-shadow: 0 36px 120px rgba(0,0,0,.52), 0 1px 0 rgba(255,255,255,.08) inset;
  opacity: 0;
  transform: translateY(14px) scale(.965);
  transition: opacity .2s ease, transform .24s cubic-bezier(.2,.8,.2,1);
  -webkit-backdrop-filter: saturate(180%) blur(32px);
  backdrop-filter: saturate(180%) blur(32px);
}
.account-password-modal-backdrop.open .account-password-modal {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.account-password-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 22px 18px;
  border-bottom: 1px solid var(--line);
}
.account-password-modal-heading {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}
.account-password-modal-icon {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(10,132,255,.14);
  color: var(--blue);
  box-shadow: 0 8px 22px rgba(10,132,255,.12);
}
.account-password-modal-icon svg { display: block; }
.account-password-modal-heading h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.15;
  letter-spacing: -.45px;
}
.account-password-modal-heading p {
  margin: 5px 0 0;
  max-width: 355px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.45;
}
.account-password-modal-close {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-2);
  color: var(--muted);
  cursor: pointer;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}
.account-password-modal-close:hover {
  background: var(--hover);
  color: var(--text);
  transform: scale(1.03);
}
.account-password-modal-body {
  display: grid;
  gap: 16px;
  padding: 22px;
}
.account-password-field {
  display: grid;
  gap: 7px;
}
.account-password-field > span {
  color: var(--text);
  font-size: 11.5px;
  font-weight: 700;
}
.password-input-shell {
  position: relative;
}
.password-input-shell .input {
  width: 100%;
  min-height: 48px;
  padding-right: 48px;
}
.password-visibility-button {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  transform: translateY(-50%);
  cursor: pointer;
}
.password-visibility-button:hover,
.password-visibility-button:focus-visible {
  background: var(--hover);
  color: var(--text);
  outline: none;
}
.field-error {
  min-height: 14px;
  color: var(--red);
  font-size: 10px;
  line-height: 1.35;
}
.account-password-requirements {
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--panel-2) 86%, transparent);
}
.account-password-requirements strong {
  display: block;
  margin-bottom: 9px;
  font-size: 11.5px;
}
.account-password-requirements ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.account-password-requirements li {
  position: relative;
  padding-left: 19px;
  color: var(--muted);
  font-size: 10.5px;
}
.account-password-requirements li::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 50%;
  width: 8px;
  height: 8px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  transform: translateY(-50%);
}
.account-password-requirements li.valid {
  color: var(--green);
}
.account-password-requirements li.valid::before {
  background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 15%, transparent);
}
.account-password-modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  padding: 15px 22px 22px;
  border-top: 1px solid var(--line);
}
.account-password-modal-footer .btn {
  min-width: 118px;
  justify-content: center;
}
body.password-modal-open { overflow: hidden; }

@media (max-width: 620px) {
  .account-password-modal-backdrop {
    align-items: end;
    padding: 0;
  }
  .account-password-modal {
    width: 100%;
    max-height: 94vh;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 25px 25px 0 0;
  }
  .account-password-modal-header,
  .account-password-modal-body {
    padding-right: 18px;
    padding-left: 18px;
  }
  .account-password-modal-heading p { font-size: 12px; }
  .account-password-modal-footer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding-right: 18px;
    padding-left: 18px;
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
  }
  .account-password-modal-footer .btn { width: 100%; min-width: 0; }
}

/* ========================================================================== 
   HELPRITE DESK v29 — MOBILE WEATHER + LOCAL TIME REFINEMENT
   Keeps both live utilities readable on phones, removes the status badge,
   and gives the clock a calm Apple-style card composition.
   ========================================================================== */
.clock-live-indicator {
  display: none !important;
}

.home-clock-widget.gradient-light {
  overflow: hidden;
}

.home-clock-widget.gradient-light::before {
  content: "";
  position: absolute;
  width: 150px;
  height: 150px;
  right: -62px;
  bottom: -72px;
  border-radius: 50%;
  background: rgba(10,132,255,.10);
  filter: blur(2px);
  pointer-events: none;
  z-index: -1;
}

.clock-digital {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
}

@media (max-width: 620px) {
  /* These utility cards must never be squeezed into half-width phone columns. */
  body[data-page-route="/home"] .bento-grid > .home-weather-widget,
  body[data-page-route="/home"] .bento-grid > .home-clock-widget,
  body[class*="role-"] .bento-grid > .home-weather-widget,
  body[class*="role-"] .bento-grid > .home-clock-widget {
    grid-column: 1 / -1 !important;
    grid-row: auto !important;
    min-height: 188px !important;
  }

  .home-weather-widget,
  .home-clock-widget {
    border-radius: 24px !important;
  }

  .weather-widget-content,
  .clock-widget-content {
    padding: 16px 17px !important;
  }

  .clock-head {
    min-height: 34px;
    align-items: flex-start;
  }

  .clock-head > div {
    min-width: 0;
  }

  .clock-head .widget-title {
    font-size: 16px;
    line-height: 1.15;
  }

  .clock-head .widget-label {
    margin-top: 3px;
    font-size: 10px;
    line-height: 1.2;
  }

  .clock-layout {
    grid-template-columns: 94px minmax(0, 1fr) !important;
    align-items: center;
    gap: 18px !important;
    width: 100%;
    margin: auto 0 0;
    padding-top: 8px;
  }

  .clock-face {
    width: 90px !important;
    height: 90px !important;
    margin: 0 !important;
    border-width: 0;
    box-shadow:
      inset 0 0 0 3px #111827,
      0 12px 24px rgba(21,39,62,.16),
      0 1px 0 rgba(255,255,255,.85);
  }

  .clock-hour-hand {
    height: 25px !important;
  }

  .clock-minute-hand {
    height: 34px !important;
  }

  .clock-second-hand {
    height: 37px !important;
  }

  .clock-tick {
    margin-top: -42px !important;
    transform-origin: 1px 42px !important;
  }

  .clock-tick.tick-3 { transform: rotate(90deg) !important; }
  .clock-tick.tick-6 { transform: rotate(180deg) !important; }
  .clock-tick.tick-9 { transform: rotate(270deg) !important; }

  .clock-time {
    font-size: clamp(32px, 10vw, 42px) !important;
    line-height: .95;
    letter-spacing: -1.8px;
  }

  .clock-date {
    margin-top: 9px;
    max-width: 22ch;
    font-size: 12px !important;
    line-height: 1.25;
  }

  .clock-offset {
    margin-top: 5px;
    font-size: 10.5px !important;
    line-height: 1.25;
  }

  /* Weather remains fully usable and visually balanced beside the clock. */
  .weather-head .widget-title {
    font-size: 16px;
  }

  .weather-current {
    margin-top: 8px;
  }

  .weather-symbol {
    width: 48px;
    height: 48px;
    border-radius: 15px;
    font-size: 26px;
  }

  .weather-temp {
    font-size: 45px !important;
  }

  .weather-meta {
    justify-content: space-between;
    flex-wrap: nowrap;
    margin: 7px 0;
  }

  .weather-strip {
    grid-template-columns: repeat(5, minmax(52px, 1fr));
    overflow: visible;
  }
}

@media (max-width: 390px) {
  body[data-page-route="/home"] .bento-grid > .home-weather-widget,
  body[data-page-route="/home"] .bento-grid > .home-clock-widget,
  body[class*="role-"] .bento-grid > .home-weather-widget,
  body[class*="role-"] .bento-grid > .home-clock-widget {
    min-height: 180px !important;
  }

  .weather-widget-content,
  .clock-widget-content {
    padding: 14px 15px !important;
  }

  .clock-layout {
    grid-template-columns: 82px minmax(0, 1fr) !important;
    gap: 13px !important;
  }

  .clock-face {
    width: 80px !important;
    height: 80px !important;
  }

  .clock-hour-hand { height: 22px !important; }
  .clock-minute-hand { height: 30px !important; }
  .clock-second-hand { height: 33px !important; }

  .clock-tick {
    margin-top: -37px !important;
    transform-origin: 1px 37px !important;
  }

  .clock-time {
    font-size: clamp(29px, 9.5vw, 36px) !important;
  }

  .clock-date {
    margin-top: 7px;
    font-size: 11px !important;
  }

  .clock-offset {
    font-size: 9.5px !important;
  }

  .weather-strip {
    grid-template-columns: repeat(5, minmax(48px, 1fr));
    gap: 4px !important;
    overflow-x: auto;
  }
}

/* ========================================================================== 
   HELPRITE DESK v30 — MOBILE TWO-COLUMN WEATHER + FULL LOCAL TIME
   Keeps Weather and Local Time side-by-side while ensuring HH:MM:SS remains
   fully visible on narrow phones without clipping or horizontal overflow.
   ========================================================================== */
@media (max-width: 620px) {
  body[data-page-route="/home"] .bento-grid > .home-weather-widget,
  body[data-page-route="/home"] .bento-grid > .home-clock-widget,
  body[class*="role-"] .bento-grid > .home-weather-widget,
  body[class*="role-"] .bento-grid > .home-clock-widget {
    grid-column: span 1 !important;
    grid-row: auto !important;
    min-width: 0 !important;
    min-height: 224px !important;
  }

  .home-weather-widget,
  .home-clock-widget {
    width: 100%;
    min-width: 0;
    border-radius: 22px !important;
  }

  .weather-widget-content,
  .clock-widget-content {
    min-width: 0;
    padding: 13px !important;
  }

  .clock-head {
    min-height: 31px;
    margin-bottom: 3px;
  }

  .clock-head .widget-title,
  .weather-head .widget-title {
    font-size: 14px !important;
    line-height: 1.15;
  }

  .clock-head .widget-label,
  .weather-head .widget-label {
    margin-top: 2px;
    font-size: 9px !important;
    line-height: 1.15;
  }

  .clock-layout {
    display: grid !important;
    grid-template-columns: clamp(52px, 14vw, 68px) minmax(0, 1fr) !important;
    align-items: center !important;
    gap: clamp(7px, 2vw, 11px) !important;
    width: 100%;
    min-width: 0;
    margin: auto 0 0 !important;
    padding-top: 5px !important;
  }

  .clock-face {
    width: clamp(52px, 14vw, 68px) !important;
    height: clamp(52px, 14vw, 68px) !important;
    min-width: 52px;
    margin: 0 !important;
    box-shadow:
      inset 0 0 0 2.5px #111827,
      0 9px 18px rgba(21,39,62,.15),
      0 1px 0 rgba(255,255,255,.82) !important;
  }

  .clock-hour-hand {
    height: clamp(14px, 3.9vw, 19px) !important;
  }

  .clock-minute-hand {
    height: clamp(19px, 5.1vw, 25px) !important;
  }

  .clock-second-hand {
    height: clamp(21px, 5.6vw, 28px) !important;
  }

  .clock-tick {
    margin-top: calc(clamp(52px, 14vw, 68px) / -2 + 4px) !important;
    transform-origin: 1px calc(clamp(52px, 14vw, 68px) / 2 - 4px) !important;
  }

  .clock-digital {
    width: 100%;
    min-width: 0;
    overflow: visible;
  }

  .clock-time {
    display: block;
    width: 100%;
    min-width: 0;
    white-space: nowrap;
    overflow: visible;
    font-size: clamp(17px, 5.05vw, 25px) !important;
    line-height: 1 !important;
    letter-spacing: clamp(-1.25px, -.24vw, -.7px) !important;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum" 1;
  }

  .clock-date {
    margin-top: 7px !important;
    max-width: none !important;
    font-size: clamp(8.7px, 2.45vw, 11px) !important;
    line-height: 1.2 !important;
  }

  .clock-offset {
    margin-top: 4px !important;
    font-size: clamp(8px, 2.2vw, 9.5px) !important;
    line-height: 1.15 !important;
    white-space: normal;
  }

  .weather-current {
    gap: 8px;
    margin-top: 7px !important;
  }

  .weather-symbol {
    width: clamp(38px, 10vw, 46px) !important;
    height: clamp(38px, 10vw, 46px) !important;
    border-radius: 13px !important;
    font-size: clamp(21px, 5.8vw, 26px) !important;
  }

  .weather-temp {
    font-size: clamp(31px, 9vw, 42px) !important;
    line-height: .95;
  }

  .weather-condition {
    font-size: clamp(9px, 2.4vw, 11px) !important;
    line-height: 1.15;
  }

  .weather-meta {
    gap: 5px !important;
    margin: 7px 0 !important;
    padding: 5px 6px !important;
    font-size: clamp(7.5px, 2vw, 9px) !important;
    white-space: nowrap;
    overflow: hidden;
  }

  .weather-strip {
    grid-template-columns: repeat(5, minmax(42px, 1fr)) !important;
    gap: 4px !important;
    overflow-x: auto !important;
    overflow-y: hidden;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .weather-strip::-webkit-scrollbar {
    display: none;
  }

  .weather-day {
    min-width: 42px;
    padding: 5px 2px !important;
    border-radius: 9px !important;
  }

  .weather-day span,
  .weather-day strong {
    font-size: clamp(8px, 2.1vw, 9.5px) !important;
  }
}

@media (max-width: 390px) {
  body[data-page-route="/home"] .bento-grid > .home-weather-widget,
  body[data-page-route="/home"] .bento-grid > .home-clock-widget,
  body[class*="role-"] .bento-grid > .home-weather-widget,
  body[class*="role-"] .bento-grid > .home-clock-widget {
    grid-column: span 1 !important;
    min-height: 214px !important;
  }

  .weather-widget-content,
  .clock-widget-content {
    padding: 11px !important;
  }

  .clock-layout {
    grid-template-columns: 50px minmax(0, 1fr) !important;
    gap: 6px !important;
  }

  .clock-face {
    width: 50px !important;
    height: 50px !important;
    min-width: 50px;
  }

  .clock-hour-hand { height: 14px !important; }
  .clock-minute-hand { height: 18px !important; }
  .clock-second-hand { height: 21px !important; }

  .clock-tick {
    margin-top: -21px !important;
    transform-origin: 1px 21px !important;
  }

  .clock-time {
    font-size: clamp(16px, 4.75vw, 19px) !important;
    letter-spacing: -1px !important;
  }

  .clock-date {
    font-size: 8.6px !important;
  }

  .clock-offset {
    font-size: 7.9px !important;
  }
}

/* Full digital-time composition: seconds and AM/PM remain visible. */
.clock-time {
  display: flex;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
  white-space: nowrap;
}

.clock-time-value {
  min-width: 0;
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  font-variant-numeric: tabular-nums;
}

.clock-period {
  flex: 0 0 auto;
  font-size: .36em;
  font-weight: 750;
  line-height: 1;
  letter-spacing: .02em;
  text-transform: uppercase;
  opacity: .68;
}

@media (max-width: 620px) {
  .clock-time {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 2px !important;
    width: 100%;
  }

  .clock-time-value {
    min-width: 0;
    white-space: nowrap;
  }

  .clock-period {
    padding-bottom: 1px;
    font-size: clamp(6px, 1.65vw, 8px) !important;
  }
}
