:root {
  --bg: #f6f8f7;
  --surface: #ffffff;
  --surface-2: #eef5f2;
  --ink: #17211f;
  --muted: #60716c;
  --line: #dbe5e1;
  --teal: #0f766e;
  --teal-dark: #0c5f59;
  --coral: #f26d5b;
  --amber: #e0a51c;
  --blue: #2563eb;
  --shadow: 0 18px 50px rgba(20, 43, 39, .12);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100svh;
  background: #f8fbfa;
  color: var(--ink);
  overflow-x: hidden;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
}

.sidebar {
  display: none;
  background: #13201d;
  color: #f4fbf8;
  padding: 24px 18px;
  flex-direction: column;
  gap: 34px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
}

.brand strong,
.brand span {
  display: block;
}

.brand span {
  color: #a8beb8;
  font-size: 13px;
  margin-top: 2px;
}

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

.nav-item,
.bottom-item,
.icon-button,
.action-button,
.submit-button {
  border: 0;
}

.nav-item {
  min-height: 46px;
  width: 100%;
  color: #d9e9e4;
  background: transparent;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  text-align: left;
}

.nav-item.active,
.nav-item:hover {
  background: rgba(255, 255, 255, .1);
  color: #fff;
}

.nav-icon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, .12);
}

.ui-icon,
.quick-icon {
  width: 24px;
  height: 24px;
  position: relative;
  display: inline-block;
  color: currentColor;
  flex: 0 0 auto;
}

.ui-home::before {
  content: "";
  position: absolute;
  left: 5px;
  right: 5px;
  bottom: 3px;
  height: 11px;
  border: 2px solid currentColor;
  border-top: 0;
  border-radius: 2px;
}

.ui-home::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-left: 2px solid currentColor;
  border-top: 2px solid currentColor;
  transform: rotate(45deg);
  border-radius: 2px;
}

.ui-profile::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 3px;
  width: 8px;
  height: 8px;
  border: 2px solid currentColor;
  border-radius: 999px;
}

.ui-profile::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  bottom: 3px;
  height: 9px;
  border: 2px solid currentColor;
  border-radius: 999px 999px 3px 3px;
  border-bottom-width: 2px;
}

.ui-mail::before {
  content: "";
  position: absolute;
  inset: 5px 3px;
  border: 2px solid currentColor;
  border-radius: 2px;
}

.ui-mail::after {
  content: "";
  position: absolute;
  left: 5px;
  right: 5px;
  top: 8px;
  height: 8px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
}

.ui-calendar::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 2px solid currentColor;
  border-radius: 3px;
}

.ui-calendar::after {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  top: 9px;
  border-top: 2px solid currentColor;
}

.quick-icon-contracts::before,
.quick-icon-staff-contracts::before {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  top: 5px;
  height: 2px;
  background: currentColor;
  box-shadow: 0 6px 0 currentColor, 0 12px 0 currentColor;
}

.quick-icon-requests::before,
.quick-icon-staff-requests::before {
  content: "";
  position: absolute;
  left: 11px;
  top: 4px;
  width: 3px;
  height: 16px;
  background: currentColor;
  border-radius: 2px;
}

.quick-icon-requests::after,
.quick-icon-staff-requests::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 11px;
  width: 16px;
  height: 3px;
  background: currentColor;
  border-radius: 2px;
}

.quick-icon-call::before,
.quick-icon-staff-call::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 5px;
  width: 14px;
  height: 14px;
  border: 3px solid currentColor;
  border-top-color: transparent;
  border-left-color: transparent;
  border-radius: 50%;
  transform: rotate(35deg);
}

.quick-icon-staff-clients::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 3px;
  width: 8px;
  height: 8px;
  background: currentColor;
  border-radius: 999px;
}

.quick-icon-staff-clients::after {
  content: "";
  position: absolute;
  left: 5px;
  right: 5px;
  bottom: 4px;
  height: 9px;
  background: currentColor;
  border-radius: 999px 999px 3px 3px;
}

.main {
  padding: 0;
}

.topbar {
  display: none !important;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 24px;
}

.top-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(26px, 3vw, 40px);
  line-height: 1.1;
}

h2 {
  font-size: 22px;
  margin-bottom: 0;
}

h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.install-button {
  min-height: 36px;
  border: 0;
  border-radius: 8px;
  background: #13201d;
  color: #fff;
  padding: 0 14px;
  font-weight: 900;
}

.customer-badge {
  min-height: 36px;
  border-radius: 8px;
  background: #e6f4f1;
  color: var(--teal-dark);
  display: inline-grid;
  place-items: center;
  padding: 0 14px;
  font-weight: 900;
}

.mobile-preview {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  align-items: stretch;
  justify-content: center;
}

.phone {
  width: 100%;
  min-height: 100svh;
  border: 0;
  border-radius: 0;
  background: #f8fbfa;
  box-shadow: none;
  padding: 14px 12px 92px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: hidden;
}

.phone::before {
  content: none;
  width: 90px;
  height: 5px;
  border-radius: 999px;
  background: #182522;
  opacity: .28;
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
}

.phone-top {
  margin-top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.phone-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.icon-button {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--coral);
  display: grid;
  place-items: center;
}

.notify-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--coral);
  display: block;
}

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

.metric {
  min-height: 78px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.metric strong {
  display: block;
  font-size: 22px;
  line-height: 1;
  margin-bottom: 8px;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

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

.action-button {
  min-height: 74px;
  border-radius: 8px;
  background: #e8f3f0;
  color: var(--teal-dark);
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 8px;
  font-weight: 800;
}

.action-button span {
  width: 26px;
  height: 26px;
}

.action-button small {
  font-size: 12px;
}

.content-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  flex: 0 0 auto;
  min-height: auto;
  max-height: none;
  overflow: auto;
}

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

.row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
}

.row strong,
.row span,
.row small {
  display: block;
}

.row span,
.row small {
  color: var(--muted);
}

.row-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.request-row {
  align-items: start;
}

.request-row .row-actions {
  align-items: stretch;
  min-width: 150px;
}

.attachment-note,
.field-help {
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 800;
}

.pill {
  border-radius: 999px;
  padding: 6px 9px;
  background: #e6f4f1;
  color: var(--teal-dark);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.pill.hot {
  background: #fff0ed;
  color: #b83b2d;
}

.pill.waiting {
  background: #fff6d9;
  color: #8a6200;
}

.tiny-button {
  min-height: 31px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--teal-dark);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
}

.danger-button {
  border-color: #f3b6ae;
  background: #fff1ef;
  color: #9f2e24;
}

.wide-button {
  width: 100%;
  margin: 0 0 10px;
  min-height: 42px;
}

.request-form {
  display: grid;
  gap: 10px;
}

.compact-form {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
  padding: 12px;
  margin-bottom: 12px;
}

.auth-form {
  margin-top: 10px;
}

.auth-hub {
  display: grid;
  gap: 10px;
}

.auth-choice {
  min-height: 74px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfc;
  color: var(--ink);
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 13px;
  text-align: left;
  text-decoration: none;
}

.auth-choice.primary {
  background: #13201d;
  color: #fff;
}

.auth-choice strong,
.auth-choice span {
  display: block;
}

.auth-choice span {
  color: inherit;
  opacity: .72;
  font-size: 13px;
  line-height: 1.3;
}

.legal-links {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 4px;
  font-size: 12px;
  font-weight: 800;
}

.legal-links a {
  color: var(--teal-dark);
  text-decoration: none;
}

.legal-links a:hover {
  text-decoration: underline;
}

.auth-shortcuts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 14px;
  margin-top: 4px;
  font-size: 13px;
  font-weight: 900;
}

.auth-shortcuts a,
.link-button {
  color: var(--teal-dark);
  text-decoration: none;
}

.auth-shortcuts a:hover,
.link-button:hover {
  text-decoration: underline;
}

.link-button {
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.logout-button {
  width: 100%;
  margin-top: 12px;
}

.profile-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 12px 0;
}

.service-button {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #e8f3f0;
  color: var(--teal-dark);
  display: grid;
  place-items: center;
  padding: 10px;
  text-align: center;
  text-decoration: none;
  font-weight: 900;
}

.service-button.primary {
  background: #13201d;
  color: #fff;
}

.emergency-actions {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.emergency-button {
  min-height: 72px;
  align-content: center;
  gap: 3px;
  line-height: 1.15;
  padding: 8px 4px;
  font-size: 14px;
  word-break: normal;
  overflow-wrap: anywhere;
}

.emergency-button strong {
  font-size: 18px;
  color: #13201d;
}

.emergency-mark {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  position: relative;
  display: grid;
  place-items: center;
  margin-bottom: 2px;
  color: #fff;
  font-size: 17px;
  font-weight: 900;
}

.emergency-medical {
  background: #d83b3b;
}

.emergency-medical::before,
.emergency-medical::after {
  content: "";
  position: absolute;
  background: #fff;
  border-radius: 2px;
}

.emergency-medical::before {
  width: 14px;
  height: 4px;
}

.emergency-medical::after {
  width: 4px;
  height: 14px;
}

.emergency-fire {
  background: #df7d18;
}

.emergency-fire::before {
  content: "";
  width: 10px;
  height: 16px;
  background: #fff;
  border-radius: 9px 9px 9px 3px;
  transform: rotate(28deg);
}

.emergency-police {
  background: #1d5d9f;
}

.emergency-police::before {
  content: "";
  width: 14px;
  height: 16px;
  background: #fff;
  clip-path: polygon(50% 0, 88% 16%, 82% 66%, 50% 100%, 18% 66%, 12% 16%);
}

.contracts-list {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.two-col {
  grid-template-columns: 1fr 1fr;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
  background: #fbfdfc;
}

.field input[type="file"] {
  padding: 10px;
}

.photo-input {
  display: block;
  margin-top: 8px;
}

.photo-pick-button {
  display: grid;
  place-items: center;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #e9f7f4;
  color: var(--teal-dark);
  font-size: 16px;
  font-weight: 900;
}

.field textarea {
  min-height: 92px;
  resize: vertical;
}

.submit-button {
  min-height: 44px;
  border-radius: 8px;
  background: var(--coral);
  color: #fff;
  font-weight: 900;
}

.section-subtitle {
  margin-top: 16px;
}

.app-version-banner {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid #14b8a6;
  border-radius: 8px;
  background: #dff8f3;
  color: var(--teal-dark);
  font-size: 14px;
  font-weight: 900;
  text-align: center;
}

.staff-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.staff-role-pill {
  border-radius: 999px;
  background: #13201d;
  color: #fff;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.secretary-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f6fbf9;
  padding: 12px;
  margin-bottom: 14px;
}

.section-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.section-row p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.section-row > span {
  min-width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #13201d;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
}

.staff-priority {
  border-color: #f4b7ae;
}

.staff-extra-panel {
  display: grid;
  gap: 12px;
}

.staff-mode .phone {
  background:
    radial-gradient(circle at 50% 0%, rgba(232, 243, 240, .9), transparent 42%),
    #fbfdfc;
  gap: 18px;
  padding: 26px 18px 104px;
  overflow-y: auto;
}

.staff-mode .phone-top {
  order: 1;
  display: grid;
  grid-template-columns: 38px 1fr 48px;
  align-items: center;
  column-gap: 12px;
  row-gap: 20px;
}

.staff-mode .phone-top::before {
  content: "";
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  color: var(--teal-dark);
  background:
    linear-gradient(currentColor, currentColor) 7px 10px / 24px 3px no-repeat,
    linear-gradient(currentColor, currentColor) 7px 18px / 24px 3px no-repeat,
    linear-gradient(currentColor, currentColor) 7px 26px / 24px 3px no-repeat;
}

.staff-mode .phone-top > div {
  display: contents;
}

.staff-mode .phone-label {
  grid-column: 2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--teal-dark);
  font-size: 20px;
  font-weight: 900;
}

.staff-mode .phone-label::before {
  content: "";
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #0f312d url("assets/icon.svg") center / 34px 34px no-repeat;
  box-shadow: 0 8px 18px rgba(15, 118, 110, .18);
}

.staff-mode .phone-top h2 {
  grid-column: 1 / -1;
  font-size: 27px;
  line-height: 1.12;
  letter-spacing: 0;
}

.staff-mode .phone-top h2 span {
  color: var(--teal-dark);
}

.staff-mode .icon-button {
  grid-column: 3;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #edf5f3;
  color: var(--teal-dark);
}

.staff-mode .icon-button span {
  font-size: 0;
}


.staff-mode .content-panel {
  order: 2;
  border: 0;
  background: transparent;
  padding: 0;
  overflow: visible;
}

.staff-mode .status-grid {
  order: 3;
  gap: 12px;
}

.staff-mode .quick-actions {
  order: 4;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.staff-mode .staff-extra-panel {
  order: 5;
}

.staff-hero-card {
  position: relative;
  min-height: 170px;
  display: grid;
  grid-template-columns: 78px 1fr 1.15fr 16px;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 12px 32px rgba(20, 43, 39, .08);
  padding: 20px 18px;
}

.hero-icon,
.round-icon {
  border-radius: 999px;
  background: #e5f4ef;
  color: var(--teal-dark);
  display: grid;
  place-items: center;
  font-weight: 900;
}

.hero-icon {
  width: 70px;
  height: 70px;
  background: #fff2d9;
  color: #d49300;
  font-size: 30px;
}

.hero-main h3 {
  margin-bottom: 12px;
  font-size: 20px;
  line-height: 1.18;
}

.hero-main strong {
  display: block;
  color: var(--teal-dark);
  font-size: 78px;
  line-height: .86;
  letter-spacing: 0;
}

.hero-breakdown {
  display: grid;
  gap: 11px;
  color: var(--ink);
  font-size: 16px;
}

.hero-breakdown span {
  display: flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
}

.hero-breakdown b {
  color: var(--teal-dark);
  font-weight: 900;
}

.hero-mini-icon {
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-radius: 999px;
  display: inline-block;
  position: relative;
}

.hero-urgent {
  color: var(--coral);
  border-radius: 3px;
  transform: rotate(45deg);
}

.hero-calls {
  color: #168a56;
  border-top-color: transparent;
  border-left-color: transparent;
  transform: rotate(35deg);
}

.hero-waiting {
  color: var(--amber);
}

.hero-arrow {
  color: var(--teal-dark);
  font-size: 40px;
  line-height: 1;
}

.staff-metric {
  min-height: 150px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 7px;
  border-radius: 18px;
  padding: 14px 10px;
  box-shadow: 0 10px 24px rgba(20, 43, 39, .07);
}

.staff-metric strong {
  margin: 0;
  color: var(--teal-dark);
  font-size: 46px;
}

.staff-metric small {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.2;
}

.staff-metric em {
  margin-top: 5px;
  color: var(--teal-dark);
  font-style: normal;
  font-size: 14px;
  font-weight: 900;
}

.metric-icon {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: #e5f4ef;
}

.staff-mode .action-button {
  min-height: 90px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .9);
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(20, 43, 39, .06);
}

.staff-mode .action-button span {
  color: var(--teal-dark);
  width: 30px;
  height: 30px;
}

.staff-mode .action-button small {
  color: var(--teal-dark);
  font-size: 14px;
}

.staff-next-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 10px 26px rgba(20, 43, 39, .07);
  padding: 18px;
}

.staff-next-head,
.staff-next-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.staff-next-head {
  margin-bottom: 14px;
}

.staff-next-head h3 {
  margin: 0;
  font-size: 18px;
}

.staff-next-item {
  justify-content: flex-start;
}

.staff-next-item > div {
  flex: 1;
  min-width: 0;
}

.staff-next-item strong,
.staff-next-item span,
.staff-next-item small {
  display: block;
}

.staff-next-item span,
.staff-next-item small {
  color: var(--muted);
}

.round-icon {
  width: 48px;
  height: 48px;
}

.staff-search {
  margin-bottom: 12px;
}

.staff-search input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .94);
  color: var(--ink);
  padding: 0 14px;
  font-weight: 700;
}

.staff-request-form {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, .92);
  padding: 14px;
  margin-bottom: 16px;
  box-shadow: 0 10px 24px rgba(20, 43, 39, .06);
}

.staff-mode .bottom-nav {
  width: calc(100% - 24px);
  left: 12px;
  bottom: 10px;
  border: 1px solid rgba(219, 229, 225, .8);
  border-radius: 16px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 -10px 35px rgba(20, 43, 39, .12);
}

.empty {
  color: var(--muted);
  background: #fbfdfc;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 0;
}

.bottom-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  border-top: 1px solid var(--line);
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  margin-top: 0;
  background: #f8fbfa;
  position: fixed;
  left: 0;
  bottom: 0;
  z-index: 12;
  width: 100%;
  transform: none;
  box-shadow: 0 -10px 26px rgba(20, 43, 39, .08);
}

.bottom-item {
  min-height: 50px;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
}

.bottom-item .ui-icon {
  width: 24px;
  height: 24px;
}

.bottom-item small {
  font-size: 11px;
}

.bottom-item.active {
  background: #e6f4f1;
  color: var(--teal-dark);
}

.workbench {
  display: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
}

.sync-badge {
  background: #e8f8ef;
  color: #126b38;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 900;
}

.integration-row {
  display: grid;
  grid-template-columns: 1fr 26px 1fr 26px 1fr;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}

.integration {
  min-height: 122px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  display: grid;
  align-content: start;
  gap: 12px;
}

.integration-icon {
  width: 44px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #13201d;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.integration small {
  display: block;
  color: var(--muted);
  margin-top: 4px;
}

.connector {
  height: 2px;
  background: var(--line);
}

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

.activity {
  border-left: 4px solid var(--teal);
  background: #f8fbfa;
  padding: 12px;
  border-radius: 0 8px 8px 0;
}

.activity.coral {
  border-color: var(--coral);
}

.activity.blue {
  border-color: var(--blue);
}

.activity strong,
.activity span {
  display: block;
}

.activity span {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 20;
  min-width: min(340px, calc(100vw - 28px));
  transform: translate(-50%, 16px);
  opacity: 0;
  pointer-events: none;
  background: #13201d;
  color: #fff;
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: var(--shadow);
  text-align: center;
  font-weight: 800;
  transition: opacity .18s ease, transform .18s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: none;
  }

  .main {
    padding: 0;
  }

  .topbar {
    display: grid;
  }

  .top-actions {
    justify-items: stretch;
  }

  .mobile-preview {
    grid-template-columns: 1fr;
  }

  .phone {
    min-height: 100svh;
    max-width: none;
    margin: 0;
  }

  .integration-row {
    grid-template-columns: 1fr;
  }

  .connector {
    width: 2px;
    height: 18px;
    justify-self: center;
  }
}

@media (max-width: 520px) {
  .main {
    padding: 0;
  }

  h1 {
    font-size: 24px;
  }

  .phone {
    border-width: 0;
    border-radius: 0;
    padding: 14px 10px 88px;
  }

  .phone-top h2 {
    font-size: 21px;
  }

  .content-panel {
    padding: 12px;
  }

  .status-grid,
  .quick-actions {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .staff-mode .phone {
    padding: 24px 14px 104px;
    gap: 16px;
  }

  .staff-mode .phone-top {
    grid-template-columns: 34px 1fr 44px;
    row-gap: 18px;
  }

  .staff-mode .phone-label {
    font-size: 18px;
  }

  .staff-mode .phone-label::before {
    width: 38px;
    height: 38px;
    background-size: 31px 31px;
  }

  .staff-mode .phone-top h2 {
    font-size: 24px;
  }

  .staff-hero-card {
    min-height: 144px;
    grid-template-columns: 58px 1fr;
    gap: 12px;
    padding: 16px;
  }

  .hero-icon {
    width: 56px;
    height: 56px;
    font-size: 24px;
  }

  .hero-main h3 {
    font-size: 18px;
    margin-bottom: 6px;
  }

  .hero-main strong {
    font-size: 58px;
  }

  .hero-breakdown {
    grid-column: 1 / -1;
    grid-template-columns: 1fr;
    gap: 6px;
    font-size: 14px;
  }

  .hero-arrow {
    position: absolute;
    right: 16px;
    top: 18px;
    font-size: 30px;
  }

  .staff-mode .quick-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .staff-mode .action-button {
    min-height: 78px;
    padding: 8px 4px;
  }

  .staff-mode .action-button small {
    font-size: 12px;
  }

  .staff-metric {
    min-height: 124px;
  }

  .staff-metric strong {
    font-size: 38px;
  }

  .staff-metric small {
    font-size: 13px;
  }

  .metric strong {
    font-size: 19px;
  }

  .staff-mode .staff-metric strong {
    font-size: 38px;
  }

  .staff-mode .staff-metric small {
    font-size: 13px;
  }

  .action-button small,
  .metric span {
    font-size: 11px;
  }

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

  .row-actions {
    justify-items: stretch;
  }

  .pill,
  .tiny-button {
    text-align: center;
  }

.two-col {
    grid-template-columns: 1fr;
  }
}

.vehicle-access {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  width: 100%;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.vehicle-access > strong {
  color: var(--teal-dark);
}

.vehicle-access small,
.vehicle-users {
  color: var(--muted);
  font-size: 13px;
}

.vehicle-users {
  display: grid;
  gap: 4px;
}

.vehicle-access-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.vehicle-access-form .field {
  margin: 0;
}

.vehicle-access-form .field label {
  font-size: 12px;
}

.vehicle-access-form .tiny-button {
  grid-column: 1 / -1;
}

@media (min-width: 720px) {
  .vehicle-access-form {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
