:root {
  --primary: #2352d2;
  --primary-soft: #e9eefb;
  --accent: #d85373;
  --accent-soft: #fbeef1;
  --success: #26bf56;
  --danger: #eb4143;
  --warning: #a26800;
  --text: #010101;
  --strong: #2f2f2f;
  --muted: #6e7480;
  --line: #e7e7e7;
  --input: #f5f5f5;
  --surface: #ffffff;
  --page: #111827;
  --shadow: 0 18px 48px rgba(18, 28, 48, 0.18);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--page);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.phone-shell {
  position: relative;
  width: min(100vw, 390px);
  height: 100dvh;
  min-height: 0;
  margin: 0 auto;
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.screen {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface);
}

.statusbar {
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
}

.app-header {
  min-height: 55px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: var(--primary);
  color: #fff;
}

.header-title {
  min-width: 0;
  flex: 1;
}

.header-title strong,
.header-title span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-title strong {
  font-size: 15px;
  line-height: 1.05;
}

.header-title span {
  color: #dde6ff;
  font-size: 12px;
  line-height: 1.25;
}

.icon-button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--primary);
  font-size: 22px;
  font-weight: 900;
}

.icon-button.menu-button {
  background: transparent;
  color: #fff;
}

.icon-button.soft {
  border: 1px solid var(--accent);
  background: #fff;
  color: var(--accent);
}

.content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 16px 20px;
}

.stack {
  display: grid;
  gap: 12px;
}

.sticky-actions {
  display: grid;
  gap: 10px;
  padding-top: 4px;
}

.fixed-actions {
  flex: 0 0 auto;
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 10px 20px 14px;
}

.opening-screen {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 24px;
  padding: 0 20px 28px;
}

.opening-art {
  align-self: end;
  min-height: 330px;
  display: grid;
  place-items: center;
}

.brand-symbol,
.company-logo,
.avatar {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 900;
}

.brand-symbol {
  width: 168px;
  height: 168px;
  font-size: 44px;
}

.opening-copy {
  display: grid;
  gap: 8px;
  text-align: center;
}

.opening-copy h1 {
  margin: 0;
  color: var(--accent);
  font-size: 30px;
}

.opening-copy p {
  margin: 0;
  color: var(--muted);
}

.opening-actions {
  display: grid;
  gap: 12px;
}

.auth-screen .content {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 22px;
  padding-bottom: 28px;
}

.auth-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-mark {
  color: var(--accent);
  font-weight: 900;
}

.auth-copy {
  align-content: start;
  display: grid;
  gap: 12px;
}

.auth-copy h1,
.screen-title {
  margin: 0;
  color: var(--text);
  font-size: 24px;
  line-height: 1.15;
}

.muted,
.body-copy {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

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

.field span {
  color: var(--strong);
  font-size: 13px;
  font-weight: 750;
}

.field input,
.field textarea,
.search {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input);
  color: var(--text);
  outline: none;
  padding: 13px 14px;
}

.field textarea {
  resize: vertical;
}

.primary-button,
.secondary-button,
.outline-button,
.danger-button {
  min-height: 48px;
  width: 100%;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0 14px;
  font-weight: 850;
}

.primary-button {
  background: var(--primary);
  color: #fff;
}

.secondary-button {
  background: var(--accent);
  color: #fff;
}

.outline-button {
  background: #fff;
  color: var(--primary);
  border-color: var(--line);
}

.danger-button {
  background: var(--danger);
  color: #fff;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--primary);
  padding: 8px 4px;
  font-weight: 800;
}

.social-row,
.chip-row,
.meta-row,
.two-actions,
.company-actions,
.line-row,
.total-row,
.detail-header {
  display: flex;
  align-items: center;
}

.social-row {
  gap: 12px;
}

.social-button {
  flex: 1;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--strong);
  font-size: 20px;
  font-weight: 900;
}

.home-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.shortcut-card {
  min-height: 74px;
  border: 1px solid var(--primary-soft);
  border-radius: 8px;
  background: var(--primary-soft);
  color: var(--primary);
  padding: 10px;
  text-align: left;
}

.shortcut-card.accent {
  border-color: var(--accent-soft);
  background: var(--accent-soft);
  color: var(--accent);
}

.shortcut-card span,
.shortcut-card strong {
  display: block;
}

.shortcut-card span {
  font-size: 12px;
  font-weight: 800;
}

.shortcut-card strong {
  margin-top: 4px;
  font-size: 13px;
}

.search-row {
  display: grid;
  grid-template-columns: 1fr 46px;
  gap: 8px;
}

.scan-button {
  border: 1px solid var(--accent-soft);
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 18px;
  font-weight: 900;
}

.chip-row {
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--strong);
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 800;
}

.chip.active {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
}

.section-heading {
  display: grid;
  gap: 2px;
  margin-top: 4px;
}

.section-heading h2 {
  margin: 0;
  color: var(--strong);
  font-size: 17px;
  line-height: 1.25;
}

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

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

.product-card {
  min-height: 185px;
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px;
  color: inherit;
  text-align: left;
}

.product-image,
.product-hero,
.scanner-frame {
  display: grid;
  place-items: center;
  border-radius: 8px;
  background:
    radial-gradient(circle at 30% 25%, rgba(216, 83, 115, 0.18), transparent 34%),
    linear-gradient(135deg, #e9eefb, #ffffff);
}

.product-image {
  height: 82px;
}

.product-image::before {
  content: "";
  width: 58px;
  height: 42px;
  border-radius: 6px;
  border: 8px solid var(--primary);
  border-top-width: 12px;
  opacity: 0.72;
}

.product-copy {
  display: grid;
  gap: 3px;
}

.product-copy strong,
.product-copy b,
.product-copy em {
  display: block;
}

.product-copy strong {
  font-size: 13px;
}

.product-copy small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.product-copy b {
  color: var(--accent);
  font-size: 15px;
}

.product-copy em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.list-card,
.cart-line,
.payment-option,
.notification-card,
.job-card,
.quote-card,
.detail-card,
.summary-box,
.company-mini,
.upload-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: inherit;
}

.list-card {
  min-height: 74px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  text-align: left;
}

.card-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 900;
}

.list-copy {
  min-width: 0;
}

.list-copy strong,
.list-copy p {
  display: block;
  margin: 0;
}

.list-copy strong {
  font-size: 14px;
}

.list-copy p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  white-space: pre-line;
}

.trailing {
  color: var(--primary);
  font-weight: 900;
}

.product-hero {
  position: relative;
  min-height: 232px;
}

.product-hero::after {
  content: "";
  width: 164px;
  height: 114px;
  border-radius: 10px;
  border: 15px solid var(--primary);
  border-top-width: 24px;
  box-shadow: 0 18px 0 rgba(35, 82, 210, 0.14);
}

.favorite {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--accent);
  font-size: 22px;
}

.favorite.active {
  background: var(--accent);
  color: #fff;
}

.price-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.price-line strong {
  color: var(--text);
  font-size: 24px;
}

.price-line del {
  color: var(--danger);
  font-size: 14px;
}

.meta-row {
  flex-wrap: wrap;
  gap: 8px;
  color: var(--strong);
  font-size: 12px;
}

.two-actions {
  gap: 10px;
}

.two-actions > * {
  flex: 1;
}

.company-hero {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 20px 12px;
  border-radius: 8px;
  background: var(--primary-soft);
}

.company-logo {
  width: 72px;
  height: 72px;
  font-size: 22px;
}

.company-hero h1,
.company-hero p {
  margin: 0;
}

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

.company-actions button,
.module-button {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 850;
}

.company-mini {
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px;
}

.company-mini .company-logo {
  width: 50px;
  height: 50px;
  font-size: 15px;
}

.company-mini p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
}

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

.detail-card {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.detail-card.selected {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.detail-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.detail-header,
.line-row,
.total-row {
  justify-content: space-between;
  gap: 10px;
}

.line-row {
  color: var(--muted);
  font-size: 13px;
}

.total-row {
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-weight: 900;
}

.toggle {
  position: relative;
  width: 48px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: #d8dbe2;
}

.toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.18s ease;
}

.toggle.on {
  background: var(--success);
}

.toggle.on::after {
  transform: translateX(24px);
}

.cart-line {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
}

.cart-line p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.cart-line button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 7px 10px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 850;
}

.summary-box {
  min-height: 64px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px;
  text-align: left;
}

.summary-box.static {
  cursor: default;
}

.summary-box span {
  color: var(--muted);
}

.summary-box strong {
  color: var(--text);
  font-size: 17px;
}

.payment-option {
  min-height: 58px;
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px;
  text-align: left;
}

.payment-option.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.radio-dot {
  width: 20px;
  height: 20px;
  border: 2px solid #b8bdc6;
  border-radius: 50%;
}

.radio-dot.on {
  border: 6px solid var(--primary);
}

.empty-state,
.success-state {
  min-height: 420px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 12px;
  text-align: center;
}

.empty-state span,
.success-icon {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 34px;
  font-weight: 900;
}

.success-icon {
  background: #e8f8ee;
  color: var(--success);
}

.empty-state h1,
.success-state h1,
.success-state p {
  margin: 0;
}

.empty-state h1,
.success-state h1 {
  font-size: 20px;
}

.success-screen {
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 0 20px 28px;
}

.notification-card,
.job-card,
.quote-card {
  display: grid;
  gap: 8px;
  width: 100%;
  padding: 14px;
  text-align: left;
}

.notification-card p,
.job-card p,
.quote-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.notification-card span,
.job-card span,
.quote-card span {
  color: var(--primary);
  font-size: 12px;
  font-weight: 850;
}

.quote-card.static {
  cursor: default;
}

.quote-card b {
  color: var(--text);
}

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

.profile-head h1 {
  margin: 0;
  font-size: 20px;
}

.avatar {
  width: 62px;
  height: 62px;
}

.calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.calendar strong {
  grid-column: 1 / -1;
  margin-bottom: 4px;
}

.calendar span {
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.calendar button {
  min-height: 34px;
  border: 0;
  border-radius: 8px;
  background: var(--input);
  color: var(--strong);
  font-size: 12px;
}

.calendar button.active {
  background: var(--primary);
  color: #fff;
}

.commitment {
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  background: var(--primary-soft);
  padding: 12px;
}

.commitment span,
.commitment p {
  color: var(--muted);
  font-size: 12px;
}

.commitment strong,
.commitment p {
  display: block;
  margin: 4px 0 0;
}

.counter {
  justify-self: end;
  color: var(--muted);
  font-size: 12px;
}

.upload-card {
  width: 100%;
  min-height: 108px;
  border-style: dashed;
  color: var(--primary);
  font-weight: 850;
}

.upload-card span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.scanner-frame {
  min-height: 440px;
  border: 1px solid var(--line);
}

.scanner-frame span {
  color: var(--primary);
  font-size: 80px;
}

.scanner-frame p {
  margin: 0;
  color: var(--muted);
}

.select-search {
  text-align: left;
}

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

.bottom-nav {
  position: static;
  flex: 0 0 72px;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  height: 72px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.nav-button {
  min-width: 0;
  border: 0;
  background: #fff;
  color: #303646;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 3px;
  padding: 5px 2px 7px;
  font-size: 10.5px;
  font-weight: 850;
  line-height: 1.05;
}

.nav-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 900;
}

.nav-button.active {
  color: var(--primary);
}

.nav-button.active .nav-icon {
  background: var(--primary-soft);
}

.sheet-backdrop,
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: end center;
  background: rgba(0, 0, 0, 0.42);
}

.sheet {
  width: min(100vw, 390px);
  max-height: 80dvh;
  overflow: auto;
  border-radius: 20px 20px 0 0;
  background: #fff;
  padding: 8px 16px 20px;
}

.sheet-handle {
  width: 38px;
  height: 4px;
  margin: 2px auto 14px;
  border-radius: 999px;
  background: #d6d9df;
}

.sheet h2,
.modal h2 {
  margin: 0 0 6px;
  font-size: 20px;
}

.sheet p,
.modal p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.sheet-actions,
.modal-actions {
  display: grid;
  gap: 10px;
}

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

.quick-grid button,
.numeric-keypad button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  font-weight: 850;
}

.quick-grid button.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
}

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

.modal-backdrop {
  place-items: center;
  padding: 18px;
}

.modal {
  width: min(100%, 358px);
  border-radius: 12px;
  background: #fff;
  padding: 20px;
  box-shadow: var(--shadow);
}

.modal-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 24px;
  font-weight: 900;
}

.modal-icon.warning {
  background: #fff5dd;
  color: var(--warning);
}

.modal-icon.danger {
  background: #fde7e4;
  color: var(--danger);
}

.otp-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.otp-row button {
  height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--input);
  color: var(--text);
  font-size: 22px;
  font-weight: 900;
}

.timer-row {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}

@media (min-width: 760px) {
  body {
    display: grid;
    place-items: center;
    padding: 24px;
  }

  .phone-shell {
    height: 812px;
    min-height: 0;
    max-height: 812px;
    border-radius: 24px;
  }

  .screen {
    height: 812px;
    min-height: 0;
  }
}
