:root {
  --navy: #0f1b2d;
  --navy-2: #14243a;
  --terracotta: #e76f3c;
  --terracotta-dark: #c95b2e;
  --sandstone: #ddb892;
  --cream: #f6f3ee;
  --slate: #28323c;
  --muted: #667085;
  --line: #e4e8ef;
  --soft: #f7f8fa;
  --white: #ffffff;
  --green: #2dc08e;
  --amber: #f5a623;
  --red: #e53e3e;
  --blue: #4285f4;
  --shadow: 0 18px 45px rgba(15, 27, 45, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--slate);
  font-family: Inter, system-ui, sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.home-screen {
  min-height: 100vh;
  padding: 24px;
}

.login-screen {
  align-items: center;
  display: flex;
  min-height: 100vh;
  justify-content: center;
  padding: 24px;
}

.login-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
  max-width: 560px;
  padding: 28px;
  width: 100%;
}

.login-card h1 {
  color: var(--navy);
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: 0;
  line-height: 1.08;
  margin: 10px 0 12px;
}

.login-card p {
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 20px;
}

.login-card label {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.login-card label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.login-card input,
.login-card select {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--slate);
  height: 44px;
  outline: 0;
  padding: 0 12px;
}

.login-card input:focus,
.login-card select:focus {
  border-color: var(--terracotta);
}

.login-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.demo-users {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 20px;
}

.demo-users button {
  align-items: center;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--slate);
  display: flex;
  gap: 10px;
  padding: 10px;
  text-align: left;
}

.demo-users button > strong {
  align-items: center;
  background: var(--navy);
  border-radius: 999px;
  color: var(--white);
  display: flex;
  flex: 0 0 auto;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.demo-users span,
.demo-users em {
  display: block;
}

.demo-users em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  margin-top: 2px;
}

.home-top,
.topbar,
.hero-band,
.dashboard-header,
.panel-heading,
.top-actions,
.role-switcher,
.unit-row,
.task-item,
.bottom-tabs,
.device-toolbar,
.android-appbar,
.mobile-welcome {
  align-items: center;
  display: flex;
}

.home-top {
  justify-content: space-between;
  margin: 0 auto 42px;
  max-width: 1180px;
}

.brand-lockup {
  align-items: center;
  display: flex;
  gap: 12px;
  min-width: 0;
}

.brand-lockup img {
  background: var(--white);
  border-radius: 12px;
  flex: 0 0 auto;
  height: 44px;
  object-fit: cover;
  width: 44px;
}

.brand-lockup.logo-only img {
  background: transparent;
  border-radius: 0;
  height: 48px;
  object-fit: contain;
  object-position: left center;
  width: min(100%, 190px);
}

.sidebar .brand-lockup.logo-only {
  background: var(--white);
  border-radius: 8px;
  justify-content: center;
  padding: 8px;
}

.sidebar .brand-lockup.logo-only img {
  height: 38px;
  object-position: center;
  width: 100%;
}

.brand-lockup strong,
.home-hero h1,
.dashboard-header h1,
.panel h2,
.stat-card strong,
.choice-card strong,
.phone-top strong,
.pay-card strong,
.android-appbar strong,
.mobile-screen-title h1,
.modal h2 {
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
}

.brand-lockup strong {
  color: var(--navy);
  display: block;
  font-size: 19px;
}

.sidebar .brand-lockup strong,
.sidebar .brand-lockup span {
  color: var(--white);
}

.brand-lockup span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-hero {
  display: grid;
  gap: 36px;
  grid-template-columns: minmax(0, 1.1fr) minmax(340px, 0.9fr);
  margin: 0 auto;
  max-width: 1180px;
}

.hero-logo-large {
  display: block;
  height: 96px;
  max-width: min(560px, 80vw);
  object-fit: contain;
  object-position: left center;
}

.eyebrow {
  color: var(--terracotta);
  display: block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  margin-top: 26px;
  text-transform: uppercase;
}

.compact-eyebrow {
  margin-top: 0;
}

.home-hero h1 {
  color: var(--navy);
  font-size: clamp(36px, 5vw, 62px);
  letter-spacing: 0;
  line-height: 1.05;
  margin: 12px 0 18px;
  max-width: 820px;
}

.home-hero p,
.dashboard-header p,
.mobile-screen-title p,
.modal p {
  color: var(--muted);
  line-height: 1.65;
  margin: 0;
}

.hero-actions,
.inline-actions,
.mobile-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-actions {
  margin-top: 26px;
}

.choice-grid {
  display: grid;
  gap: 16px;
}

.choice-card,
.flow-card,
.mini-stat {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  color: var(--slate);
  padding: 22px;
  text-align: left;
}

.choice-card:hover,
.flow-card:hover,
.unit-row.clickable:hover,
.mini-stat:hover {
  border-color: var(--terracotta);
  transform: translateY(-1px);
}

.choice-card span,
.flow-card span {
  align-items: center;
  background: #fff5ef;
  border-radius: 999px;
  color: var(--terracotta);
  display: flex;
  height: 48px;
  justify-content: center;
  margin-bottom: 18px;
  width: 48px;
}

.choice-card svg,
.flow-card svg,
.metric-icon svg,
.nav-item svg,
.icon-button svg,
.mode-pill svg,
.primary-action svg,
.secondary-action svg,
.back-link svg,
.bottom-tabs svg,
.android-appbar svg,
.mini-stat svg {
  height: 21px;
  width: 21px;
}

.nav-item svg,
.back-link svg {
  flex: 0 0 21px;
}

.choice-card strong,
.flow-card strong {
  color: var(--navy);
  display: block;
  font-size: 22px;
}

.choice-card em,
.flow-card em,
.mini-stat em {
  color: var(--muted);
  display: block;
  font-style: normal;
  line-height: 1.55;
  margin-top: 8px;
}

.app-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: var(--navy);
  color: var(--white);
  display: flex;
  flex-direction: column;
  gap: 18px;
  height: 100vh;
  padding: 22px 16px;
  position: sticky;
  top: 0;
}

.back-link {
  align-items: center;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  color: var(--white);
  display: flex;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
}

.back-link.dark {
  background: var(--white);
  color: var(--navy);
}

.nav-list {
  display: grid;
  gap: 4px;
}

.nav-item {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.76);
  display: flex;
  gap: 12px;
  height: 48px;
  padding: 0 14px;
  text-align: left;
  width: 100%;
}

.nav-item.active,
.nav-item:hover {
  background: rgba(231, 111, 60, 0.18);
  color: var(--white);
}

.nav-item.active {
  box-shadow: inset 3px 0 0 var(--terracotta);
}

.sidebar-panel {
  background: var(--navy-2);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  margin-top: auto;
  padding: 16px;
}

.sidebar-panel span {
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
}

.sidebar-panel strong {
  display: block;
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-size: 28px;
  margin: 8px 0 10px;
}

.progress-track {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 99px;
  height: 7px;
  overflow: hidden;
}

.progress-fill {
  background: var(--terracotta);
  height: 100%;
  width: 86%;
}

.workspace {
  min-width: 0;
  padding: 0 24px 36px;
}

.topbar {
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  gap: 18px;
  height: 64px;
  justify-content: space-between;
  margin: 0 -24px;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 4;
}

.search-field {
  align-items: center;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  gap: 10px;
  max-width: 470px;
  min-width: 260px;
  padding: 0 12px;
  width: 42vw;
}

.search-field svg {
  color: var(--muted);
  flex: 0 0 18px;
  height: 18px;
  width: 18px;
}

.search-field input {
  background: transparent;
  border: 0;
  height: 42px;
  outline: 0;
  width: 100%;
}

.top-actions {
  gap: 10px;
}

.top-actions .mode-pill {
  white-space: nowrap;
}

.icon-button,
.bottom-tabs button {
  align-items: center;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--slate);
  display: inline-flex;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.primary-action,
.secondary-action,
.mode-pill,
.pay-card button,
.mobile-action-row button {
  align-items: center;
  border-radius: 8px;
  display: inline-flex;
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-size: 14px;
  font-weight: 700;
  gap: 8px;
  height: 42px;
  justify-content: center;
  padding: 0 16px;
}

.primary-action {
  background: var(--terracotta);
  border: 0;
  color: var(--white);
}

.primary-action.alt {
  background: var(--navy);
}

.primary-action:hover,
.pay-card button:hover {
  background: var(--terracotta-dark);
}

.secondary-action,
.mode-pill {
  background: var(--white);
  border: 1.5px solid var(--terracotta);
  color: var(--terracotta);
}

.mode-pill {
  border-color: var(--line);
  color: var(--slate);
}

.mode-pill.active {
  background: var(--navy);
  border-color: var(--navy);
  color: var(--white);
}

.full {
  width: 100%;
}

.avatar {
  align-items: center;
  background: var(--navy);
  border-radius: 999px;
  color: var(--white);
  display: flex;
  font-weight: 800;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.hero-band {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  justify-content: space-between;
  margin: 0 -24px 28px;
  padding: 18px 24px;
}

.hero-logo {
  display: block;
  height: 54px;
  max-width: min(360px, 54vw);
  object-fit: contain;
  object-position: left center;
}

.hero-band p {
  color: var(--muted);
  font-size: 13px;
  margin: 2px 0 0;
}

.role-switcher {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  gap: 4px;
  padding: 4px;
}

.role-tab {
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  font-weight: 800;
  height: 34px;
  padding: 0 14px;
}

.role-tab.active {
  background: var(--navy);
  color: var(--white);
}

.dashboard-header {
  align-items: flex-end;
  gap: 20px;
  justify-content: space-between;
  margin: 0 auto 22px;
  max-width: 1200px;
}

.dashboard-header h1 {
  color: var(--navy);
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: 0;
  line-height: 1.14;
  margin: 7px 0;
}

.date-chip {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--navy);
  flex: 0 0 auto;
  font-weight: 800;
  padding: 11px 14px;
}

.stats-grid,
.content-grid,
.operations-grid,
.module-grid {
  display: grid;
  gap: 18px;
  margin: 0 auto 18px;
  max-width: 1200px;
}

.stats-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.content-grid {
  grid-template-columns: minmax(0, 1.55fr) minmax(320px, 0.85fr);
}

.operations-grid,
.module-grid {
  align-items: start;
  grid-template-columns: minmax(0, 1fr) 360px;
}

.stat-card,
.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.stat-card {
  min-height: 120px;
  overflow: hidden;
  padding: 18px;
  position: relative;
  text-align: left;
}

.stat-main {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.metric-icon {
  align-items: center;
  background: var(--terracotta);
  border-radius: 999px;
  color: var(--white);
  display: flex;
  height: 48px;
  justify-content: center;
  width: 48px;
}

.stat-card span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  font-weight: 800;
  margin-top: 14px;
  text-transform: uppercase;
}

.stat-card strong {
  color: var(--navy);
  display: block;
  font-size: 31px;
  margin-top: 4px;
}

.trend {
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 9px;
}

.trend.good {
  background: #e6f9f3;
  color: #178b67;
}

.trend.warn {
  background: #fef3d7;
  color: #a86909;
}

.trend.bad {
  background: #fee2e2;
  color: var(--red);
}

.stat-bar {
  background: var(--terracotta);
  bottom: 0;
  height: 4px;
  left: 0;
  position: absolute;
  right: 0;
}

.panel {
  padding: 18px;
}

.panel-heading {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.panel h2 {
  color: var(--navy);
  font-size: 19px;
  letter-spacing: 0;
  margin: 4px 0 0;
}

.bar-chart {
  align-items: end;
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(6, minmax(34px, 1fr));
  height: 260px;
  padding-top: 18px;
}

.bar-item {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-rows: 1fr auto;
  height: 100%;
}

.bar-track {
  align-items: end;
  background: var(--soft);
  border-radius: 8px;
  display: flex;
  height: 100%;
  overflow: hidden;
}

.bar-fill {
  background: linear-gradient(180deg, var(--terracotta), var(--sandstone));
  border-radius: 8px 8px 0 0;
  width: 100%;
}

.bar-item span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.task-list,
.unit-table,
.form-stack,
.phone-list,
.modal-steps {
  display: grid;
  gap: 10px;
}

.unit-row,
.task-item {
  background: var(--soft);
  border: 1px solid transparent;
  border-radius: 8px;
  color: inherit;
  gap: 14px;
  justify-content: space-between;
  min-height: 64px;
  padding: 12px 14px;
  text-align: left;
  width: 100%;
}

.row-actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.unit-row strong,
.phone-list strong {
  color: var(--navy);
  display: block;
  font-size: 14px;
}

.unit-row span,
.phone-list span,
.phone-top span,
.pay-card span,
.android-appbar span,
.mobile-welcome span {
  color: var(--muted);
  display: block;
  font-size: 12px;
  margin-top: 3px;
}

.status-chip {
  border-radius: 999px;
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 800;
  padding: 5px 10px;
}

.status-paid {
  background: #e6f9f3;
  color: #178b67;
}

.status-pending {
  background: #fef3d7;
  color: #a86909;
}

.status-open {
  background: #fee2e2;
  color: var(--red);
}

.flow-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-stack label {
  display: grid;
  gap: 6px;
}

.form-stack label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.form-stack input {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--slate);
  height: 44px;
  outline: 0;
  padding: 0 12px;
}

.secondary-action.compact {
  height: 32px;
  padding: 0 10px;
}

.empty-state {
  align-items: center;
  background: var(--soft);
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  display: grid;
  gap: 4px;
  justify-items: center;
  min-height: 150px;
  padding: 18px;
  text-align: center;
}

.empty-state strong {
  color: var(--navy);
}

.form-stack input:focus {
  border-color: var(--terracotta);
}

.mobile-preview,
.android-stage {
  background: var(--navy);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 20px;
}

.phone-frame {
  background: #f8fafc;
  border: 8px solid #0a1322;
  border-radius: 32px;
  margin: 0 auto;
  max-width: 320px;
  min-height: 580px;
  overflow: hidden;
  padding: 16px;
}

.phone-frame.live {
  max-width: 390px;
  min-height: 780px;
  padding: 0;
  position: relative;
}

.phone-frame.small {
  min-height: 540px;
}

.phone-top {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.phone-top img,
.mobile-welcome img {
  border-radius: 12px;
  height: 42px;
  object-fit: cover;
  width: 42px;
}

.pay-card {
  background: var(--navy);
  border-radius: 8px;
  color: var(--white);
  padding: 18px;
}

.pay-card strong {
  color: var(--white);
  display: block;
  font-size: 27px;
  margin: 8px 0 16px;
}

.pay-card button {
  background: var(--terracotta);
  border: 0;
  color: var(--white);
  width: 100%;
}

.phone-list button,
.payment-box,
.mobile-action-row button {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: inherit;
  padding: 13px;
  text-align: left;
}

.phone-list button {
  width: 100%;
}

.phone-list em.status-chip {
  display: inline-flex;
  font-style: normal;
  margin-top: 8px;
}

.android-stage {
  border-radius: 0;
  min-height: 100vh;
}

.device-toolbar {
  gap: 12px;
  justify-content: center;
  margin-bottom: 20px;
}

.android-appbar {
  background: var(--navy);
  color: var(--white);
  gap: 12px;
  justify-content: space-between;
  padding: 18px 16px;
}

.android-appbar span {
  color: rgba(255, 255, 255, 0.7);
}

.android-body {
  height: 640px;
  overflow: auto;
  padding: 16px;
}

.mobile-welcome {
  gap: 10px;
  margin-bottom: 14px;
}

.mobile-welcome strong {
  color: var(--navy);
  display: block;
  font-size: 20px;
}

.mobile-card-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 14px 0;
}

.mini-stat {
  box-shadow: none;
  padding: 13px;
}

.mini-stat span {
  color: var(--terracotta);
}

.mini-stat strong {
  color: var(--navy);
  display: block;
  font-size: 20px;
  margin-top: 8px;
}

.mini-stat em {
  font-size: 12px;
  margin-top: 3px;
}

.mobile-screen-title h1 {
  color: var(--navy);
  font-size: 24px;
  margin: 6px 0 8px;
}

.mobile-action-row {
  margin: 14px 0;
}

.mobile-action-row button {
  background: #fff5ef;
  color: var(--terracotta);
  height: 38px;
  justify-content: center;
  padding: 0 12px;
}

.payment-box {
  margin-bottom: 12px;
}

.qr-card {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px;
  justify-items: center;
  padding: 18px;
  text-align: center;
}

.qr-card strong {
  color: var(--navy);
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
}

.qr-card span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.qr-grid {
  background:
    linear-gradient(90deg, var(--navy) 10px, transparent 10px) 0 0 / 20px 20px,
    linear-gradient(var(--navy) 10px, transparent 10px) 0 0 / 20px 20px,
    var(--white);
  border: 10px solid var(--white);
  box-shadow: 0 0 0 1px var(--line);
  height: 132px;
  width: 132px;
}

.payment-box span {
  color: var(--muted);
  font-size: 12px;
}

.payment-box strong {
  color: var(--navy);
  display: block;
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-size: 28px;
  margin: 6px 0 12px;
}

.bottom-tabs {
  background: var(--white);
  border-top: 1px solid var(--line);
  bottom: 0;
  gap: 4px;
  justify-content: space-between;
  left: 0;
  padding: 8px;
  position: sticky;
  right: 0;
}

.bottom-tabs button {
  border: 0;
  color: var(--muted);
  display: grid;
  font-size: 10px;
  gap: 2px;
  height: 52px;
  place-items: center;
  width: 20%;
}

.bottom-tabs button.active {
  background: #fff5ef;
  color: var(--terracotta);
}

.modal-backdrop {
  align-items: center;
  background: rgba(15, 27, 45, 0.56);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 18px;
  position: fixed;
  z-index: 20;
}

.modal {
  background: var(--white);
  border-radius: 12px;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.22);
  max-width: 520px;
  padding: 24px;
  position: relative;
  width: 100%;
}

.modal-close {
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--slate);
  height: 34px;
  position: absolute;
  right: 16px;
  top: 16px;
  width: 34px;
}

.modal h2 {
  color: var(--navy);
  font-size: 26px;
  margin: 8px 0 10px;
}

.modal-steps {
  margin: 18px 0;
}

.modal-steps div {
  align-items: center;
  background: var(--soft);
  border-radius: 8px;
  display: flex;
  gap: 10px;
  padding: 11px;
}

.modal-steps svg {
  color: var(--green);
  flex: 0 0 auto;
  height: 18px;
  width: 18px;
}

.toast {
  background: var(--navy);
  border-left: 4px solid var(--terracotta);
  border-radius: 8px;
  bottom: 20px;
  box-shadow: var(--shadow);
  color: var(--white);
  font-weight: 800;
  max-width: 320px;
  padding: 14px 16px;
  position: fixed;
  right: 20px;
  z-index: 30;
}

@media (max-width: 1120px) {
  .home-hero,
  .content-grid,
  .operations-grid,
  .module-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid,
  .flow-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 80px minmax(0, 1fr);
  }

  .sidebar {
    padding: 18px 10px;
  }

  .sidebar .brand-lockup div,
  .nav-item span,
  .sidebar-panel,
  .back-link span {
    display: none;
  }

  .sidebar .brand-lockup.logo-only,
  .back-link,
  .nav-item {
    justify-content: center;
  }

  .sidebar .brand-lockup.logo-only {
    background: transparent;
    padding: 0;
  }

  .sidebar .brand-lockup.logo-only img {
    background: var(--white);
    border-radius: 12px;
    height: 44px;
    object-fit: cover;
    width: 44px;
  }

  .nav-item,
  .back-link {
    padding: 0;
  }

  .topbar {
    align-items: stretch;
    height: auto;
    flex-direction: column;
    padding-bottom: 12px;
    padding-top: 12px;
  }

  .search-field {
    max-width: none;
    width: 100%;
  }

  .top-actions {
    flex-wrap: wrap;
  }
}

@media (max-width: 680px) {
  .home-screen,
  .workspace {
    padding: 14px;
  }

  .home-top,
  .hero-band,
  .dashboard-header,
  .device-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    display: none;
  }

  .topbar,
  .hero-band {
    margin-left: -14px;
    margin-right: -14px;
    padding-left: 14px;
    padding-right: 14px;
  }

  .hero-logo-large {
    height: 72px;
  }

  .role-switcher {
    overflow-x: auto;
  }

  .stats-grid,
  .flow-grid {
    grid-template-columns: 1fr;
  }

  .choice-card {
    padding: 18px;
  }

  .demo-users {
    grid-template-columns: 1fr;
  }

  .row-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .mode-pill,
  .secondary-action,
  .primary-action {
    min-width: 0;
  }

  .android-stage {
    padding: 12px;
  }

  .phone-frame.live {
    border-width: 5px;
    border-radius: 28px;
    min-height: 720px;
    width: 100%;
  }
}

/* Final visual overrides for the refined app shell */
body {
  background:
    radial-gradient(circle at top left, rgba(231, 111, 60, 0.08), transparent 32vw),
    linear-gradient(180deg, #fbfaf8 0%, var(--cream) 58%, #f4f7fa 100%);
}

.sidebar {
  background: linear-gradient(180deg, #0f1b2d 0%, #111f34 58%, #07101e 100%);
  gap: 20px;
}

.sidebar .brand-lockup.logo-only {
  border-radius: 12px;
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.14);
}

.nav-list {
  overflow: auto;
  padding-right: 2px;
}

.nav-item {
  border-radius: 10px;
}

.nav-item.active,
.nav-item:hover {
  background: linear-gradient(90deg, rgba(231, 111, 60, 0.24), rgba(231, 111, 60, 0.08));
}

.sidebar-account {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  margin-top: auto;
  padding: 10px;
}

.account-card {
  align-items: center;
  background: transparent;
  border: 0;
  color: var(--white);
  display: flex;
  gap: 10px;
  padding: 4px;
  text-align: left;
  width: 100%;
}

.account-avatar,
.profile-avatar {
  align-items: center;
  background: var(--terracotta);
  border-radius: 999px;
  color: var(--white);
  display: flex;
  flex: 0 0 auto;
  font-weight: 800;
  height: 40px;
  justify-content: center;
  width: 40px;
}

.account-card strong,
.account-card em {
  display: block;
}

.account-card em {
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  font-style: normal;
  margin-top: 2px;
}

.account-actions {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr;
  margin-top: 10px;
}

.account-actions button {
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  color: rgba(255, 255, 255, 0.88);
  display: flex;
  height: 36px;
  justify-content: center;
}

.account-actions svg {
  height: 18px;
  width: 18px;
}

.account-actions button:hover {
  background: var(--terracotta);
  color: var(--white);
}

.topbar {
  backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.86);
}

.notification-button {
  position: relative;
}

.notification-button span {
  align-items: center;
  background: var(--terracotta);
  border: 2px solid var(--white);
  border-radius: 999px;
  color: var(--white);
  display: flex;
  font-size: 10px;
  font-weight: 800;
  height: 18px;
  justify-content: center;
  min-width: 18px;
  padding: 0 4px;
  position: absolute;
  right: -6px;
  top: -6px;
}

.avatar-button {
  border: 0;
}

.hero-band.app-subbar {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(228, 232, 239, 0.78);
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(15, 27, 45, 0.08);
  margin: 18px auto;
  max-width: 1200px;
  padding: 14px 16px;
}

.subbar-actions,
.profile-identity,
.profile-actions {
  align-items: center;
  display: flex;
}

.subbar-actions,
.profile-actions {
  gap: 10px;
}

.panel,
.stat-card {
  border-radius: 12px;
  box-shadow: 0 10px 28px rgba(15, 27, 45, 0.08);
}

.panel:hover,
.stat-card:hover {
  border-color: rgba(231, 111, 60, 0.38);
}

.unit-row,
.task-item {
  background: #fbfcfd;
  border-radius: 10px;
}

.profile-hero {
  align-items: center;
  background: linear-gradient(135deg, var(--navy), #1b3555);
  border-radius: 16px;
  box-shadow: 0 18px 45px rgba(15, 27, 45, 0.14);
  color: var(--white);
  display: flex;
  justify-content: space-between;
  margin: 0 auto 18px;
  max-width: 1200px;
  padding: 24px;
}

.profile-identity {
  gap: 16px;
}

.profile-avatar {
  border: 4px solid rgba(255, 255, 255, 0.16);
  height: 72px;
  width: 72px;
}

.profile-hero h1 {
  color: var(--white);
  font-family: "Plus Jakarta Sans", Inter, sans-serif;
  font-size: 32px;
  letter-spacing: 0;
  margin: 6px 0;
}

.profile-hero p {
  color: rgba(255, 255, 255, 0.72);
  margin: 0;
}

.profile-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) 360px;
  margin: 0 auto 18px;
  max-width: 1200px;
}

.settings-list {
  display: grid;
  gap: 10px;
}

.settings-list label {
  align-items: center;
  background: #fbfcfd;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  min-height: 54px;
  padding: 12px 14px;
}

.settings-list span {
  color: var(--navy);
  font-weight: 800;
}

.settings-list input {
  accent-color: var(--terracotta);
  height: 18px;
  width: 18px;
}

.android-stage {
  background: linear-gradient(160deg, #0f1b2d, #182b46);
}

.android-appbar {
  background: linear-gradient(135deg, var(--navy), #18304d);
}

.android-appbar button {
  align-items: center;
  background: rgba(255, 255, 255, 0.1);
  border: 0;
  border-radius: 999px;
  color: var(--white);
  display: flex;
  height: 38px;
  justify-content: center;
  width: 38px;
}

@media (max-width: 900px) {
  .sidebar-account .account-card span:not(.account-avatar) {
    display: none;
  }

  .account-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .profile-hero,
  .profile-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .profile-grid {
    grid-template-columns: 1fr;
  }

  .subbar-actions {
    align-items: stretch;
    flex-direction: column;
  }
}
