*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: #000000;
  color: var(--ez-ink);
  font-family: var(--font-sans);
  font-size: var(--text-md);
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  display: block;
  min-height: 100dvh;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
}

a {
  color: var(--ez-forest);
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ========== iPhone device frame ========== */
.device-stage {
  min-height: 100dvh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 2.5vh, 28px) 12px;
  background:
    radial-gradient(ellipse 70% 50% at 50% 40%, rgba(168, 230, 15, 0.06), transparent 55%),
    #ececec;
  box-sizing: border-box;
}

.device-shell {
  /* Cropped purple iPhone frame ~ 661/1400 */
  --device-aspect: 0.4721;
  position: relative;
  height: min(92dvh, 920px);
  width: calc(min(92dvh, 920px) * var(--device-aspect));
  max-width: min(430px, 94vw);
  max-height: calc(min(430px, 94vw) / var(--device-aspect));
  flex-shrink: 0;
  /* External shadow biased right + bottom — larger & darker */
  filter:
    drop-shadow(14px 22px 18px rgba(0, 0, 0, 0.32))
    drop-shadow(24px 40px 48px rgba(0, 0, 0, 0.28))
    drop-shadow(8px 14px 10px rgba(0, 0, 0, 0.2));
}

.device-bezel {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  user-select: none;
  z-index: 30;
}

/* Full glass under bezel — oversized slightly so stage bg never peeks at corners */
.device-screen {
  position: absolute;
  left: 4.4%;
  top: 2.1%;
  width: 91.2%;
  height: 93.6%;
  border-radius: 48px;
  overflow: hidden;
  z-index: 10;
  background: #03140e;
  transform: translateZ(0);
}

/* Dark underlay matching glass so any subpixel AA shows dark, not stage gray */
.device-shell::before {
  content: "";
  position: absolute;
  left: 4.4%;
  top: 2.1%;
  width: 91.2%;
  height: 93.6%;
  border-radius: 48px;
  background: #03140e;
  z-index: 5;
  pointer-events: none;
}

/* App shell — fills device screen */
#app {
  width: 100%;
  height: 100%;
  max-width: none;
  min-height: 100%;
  background: var(--ez-bg-glow);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: inherit;
}

/* Login must paint full screen including top under the island */
#app.is-login,
#app.is-login .app-main,
#app.is-login .login-screen {
  background: #03140e;
}

#app.is-login {
  background: #041a12;
}

#app.is-login .app-header,
#app.is-login .tabbar {
  display: none;
}

#app.is-login .app-main {
  padding: 0;
  padding-bottom: 0;
  flex: 1;
  min-height: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* Real phone / PWA standalone: drop the decorative frame */
@media (display-mode: standalone) {
  .device-stage {
    padding: 0;
    background: var(--ez-bg);
  }
  .device-shell {
    width: 100%;
    height: 100dvh;
    max-width: none;
    max-height: none;
    filter: none;
  }
  .device-bezel {
    display: none;
  }
  .device-screen {
    inset: 0;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
  }
}

@media (max-width: 380px) and (max-height: 720px) {
  /* Very small viewports: still keep frame but allow full use */
  .device-stage {
    padding: 8px;
  }
}

/* Header — extra top pad for Dynamic Island under the bezel */
.app-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: calc(var(--header-h) + max(var(--safe-top), 22px));
  padding: max(var(--safe-top), 22px) var(--space-4) 0;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  background: rgba(238, 243, 240, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--ez-separator);
}

.app-header__brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  flex: 1;
}

.app-header__mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #041a12;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-glow);
  overflow: hidden;
  padding: 5px;
}

.app-header__mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.app-header__titles {
  min-width: 0;
}

.app-header__title {
  font-size: var(--text-md);
  font-weight: var(--weight-semibold);
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-header__sub {
  font-size: var(--text-xs);
  color: var(--ez-ink-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  display: grid;
  place-items: center;
  color: var(--ez-ink);
  position: relative;
  transition: background var(--dur-fast) var(--ease-out);
}

.icon-btn:hover,
.icon-btn:focus-visible {
  background: var(--ez-surface-secondary);
  outline: none;
}

.icon-btn:focus-visible {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ez-leaf) 35%, transparent);
}

.badge-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: var(--radius-pill);
  background: var(--ez-red);
  color: white;
  font-size: 10px;
  font-weight: var(--weight-bold);
  display: grid;
  place-items: center;
  line-height: 1;
}

/* Main scroll */
.app-main {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: var(--space-4);
  padding-bottom: calc(var(--tabbar-h) + var(--safe-bottom) + var(--space-8));
  scroll-behavior: smooth;
}

.screen {
  animation: screen-in var(--dur) var(--ease-out);
}

@keyframes screen-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .screen {
    animation: none;
  }
  * {
    transition: none !important;
  }
}

/* Bottom tab bar — lifted above home-indicator / rounded screen clip */
.tabbar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  height: auto;
  min-height: calc(var(--tabbar-h) + var(--safe-bottom));
  padding: 8px var(--space-2) var(--safe-bottom);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: start;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  border-top: 1px solid var(--ez-separator);
  box-shadow: 0 -8px 28px rgba(6, 40, 29, 0.05);
  box-sizing: border-box;
}

.tabbar__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  color: var(--ez-ink-tertiary);
  font-size: 10px;
  line-height: 1.15;
  font-weight: var(--weight-medium);
  min-height: var(--tabbar-h);
  padding: 6px 2px 0;
  border-radius: var(--radius-md);
  transition: color var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
  white-space: nowrap;
  overflow: visible;
}

.tabbar__item span {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tabbar__item svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tabbar__item.is-active {
  color: var(--ez-forest);
  background: color-mix(in srgb, var(--ez-lime) 16%, transparent);
  font-weight: var(--weight-semibold);
}

.tabbar__item:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--ez-leaf) 40%, transparent);
}

/* Typography helpers */
.eyebrow {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ez-ink-tertiary);
}

.h1 {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  letter-spacing: -0.03em;
  margin: 0 0 var(--space-1);
  line-height: 1.15;
}

.h2 {
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  letter-spacing: -0.02em;
  margin: 0;
}

.muted {
  color: var(--ez-ink-secondary);
  font-size: var(--text-sm);
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

/* Cards */
.card {
  background: var(--ez-surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(255, 255, 255, 0.65);
  padding: var(--space-4);
}

.card + .card {
  margin-top: var(--space-3);
}

.card--flush {
  padding: 0;
  overflow: hidden;
}

.card__section {
  padding: var(--space-4);
}

.card__section + .card__section {
  border-top: 1px solid var(--ez-separator);
}

.stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.stack-sm {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: var(--space-5) 0 var(--space-3);
}

.section-title:first-child {
  margin-top: 0;
}

/* Signature: faixa status card */
.faixa-card {
  position: relative;
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  color: white;
  overflow: hidden;
  box-shadow: var(--shadow-float);
  border: 0;
}

.faixa-card::after {
  content: "";
  position: absolute;
  inset: auto -20% -40% 40%;
  height: 140%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 60%);
  pointer-events: none;
}

.faixa-card--verde {
  background:
    radial-gradient(120% 90% at 100% 0%, rgba(212, 255, 58, 0.28), transparent 50%),
    linear-gradient(145deg, #1aa866 0%, #06281d 100%);
}

.faixa-card--amarelo {
  background: linear-gradient(145deg, #f0b429 0%, #a66b08 100%);
  color: #1c1405;
}

.faixa-card--vermelho {
  background: linear-gradient(145deg, #f2554a 0%, #8f1e18 100%);
}

.faixa-card__label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.85;
}

.faixa-card__days {
  font-size: var(--text-hero);
  font-weight: var(--weight-bold);
  letter-spacing: -0.04em;
  line-height: 1;
  margin: var(--space-2) 0;
  font-variant-numeric: tabular-nums;
}

.faixa-card__action {
  font-size: var(--text-md);
  font-weight: var(--weight-medium);
  max-width: 28ch;
  line-height: 1.35;
  opacity: 0.95;
}

.faixa-card__meta {
  margin-top: var(--space-4);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(8px);
}

.faixa-card--amarelo .chip {
  background: rgba(0, 0, 0, 0.08);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  background: var(--ez-surface-secondary);
  color: var(--ez-ink-secondary);
}

.pill--verde {
  background: var(--ez-faixa-verde-soft);
  color: var(--ez-faixa-verde);
}

.pill--amarelo {
  background: var(--ez-faixa-amarelo-soft);
  color: #9a6c00;
}

.pill--vermelho {
  background: var(--ez-faixa-vermelho-soft);
  color: var(--ez-faixa-vermelho);
}

.pill--ecash {
  background: #efeaf8;
  color: var(--ez-ecash);
}

.pill--brl {
  background: var(--ez-mint);
  color: var(--ez-forest-deep);
}

.pill--muted {
  background: #ececee;
  color: var(--ez-ink-secondary);
}

.pill--warn {
  background: #fff1e0;
  color: #b35c00;
}

/* List rows */
.list {
  background: var(--ez-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--ez-separator);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.list-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  width: 100%;
  text-align: left;
  border-bottom: 1px solid var(--ez-separator);
  transition: background var(--dur-fast) var(--ease-out);
  color: inherit;
}

.list-row:last-child {
  border-bottom: 0;
}

.list-row:hover,
.list-row:focus-visible {
  background: var(--ez-surface-secondary);
  outline: none;
}

.list-row__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--ez-mint);
  color: var(--ez-forest);
  flex-shrink: 0;
  font-size: 14px;
  font-weight: var(--weight-bold);
}

.list-row__body {
  flex: 1;
  min-width: 0;
}

.list-row__title {
  font-weight: var(--weight-medium);
  font-size: var(--text-md);
}

.list-row__sub {
  font-size: var(--text-sm);
  color: var(--ez-ink-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.list-row__meta {
  text-align: right;
  flex-shrink: 0;
}

.list-row__chev {
  color: var(--ez-ink-tertiary);
  font-size: 18px;
  line-height: 1;
}

/* Money */
.money {
  font-variant-numeric: tabular-nums;
  font-weight: var(--weight-semibold);
  letter-spacing: -0.02em;
}

.money--brl {
  color: var(--ez-brl);
}

.money--ecash {
  color: var(--ez-ecash);
}

.money-lg {
  font-size: var(--text-2xl);
  font-weight: var(--weight-bold);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

/* Progress bars */
.progress {
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--ez-surface-secondary);
  overflow: hidden;
}

.progress__bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--ez-lime), var(--ez-leaf) 45%, var(--ez-forest-deep));
  min-width: 2px;
  transition: width var(--dur) var(--ease-out);
}

.progress-block {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.progress-block__head {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  font-size: var(--text-sm);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 44px;
  padding: 0 var(--space-4);
  border-radius: var(--radius-md);
  font-weight: var(--weight-semibold);
  font-size: var(--text-md);
  transition: transform var(--dur-fast) var(--ease-out), opacity var(--dur-fast);
}

.btn:active {
  transform: scale(0.98);
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ez-leaf) 40%, transparent);
}

.btn--primary {
  background: linear-gradient(135deg, #14965a 0%, #06281d 100%);
  color: white;
  box-shadow: 0 6px 18px rgba(6, 40, 29, 0.22);
}

.btn--primary:hover {
  filter: brightness(1.06);
}

.btn--lime {
  background: linear-gradient(135deg, var(--ez-lime-soft), var(--ez-lime));
  color: #0a1f12;
  box-shadow: 0 8px 24px rgba(168, 230, 15, 0.28);
  font-weight: var(--weight-bold);
}

.btn--lime:hover {
  filter: brightness(1.04);
}

.btn--secondary {
  background: var(--ez-mint);
  color: var(--ez-forest-deep);
}

.btn--ghost {
  background: transparent;
  color: var(--ez-forest);
  border: 1px solid var(--ez-separator-strong);
}

.btn--block {
  width: 100%;
}

.btn--sm {
  min-height: 34px;
  padding: 0 var(--space-3);
  font-size: var(--text-sm);
  border-radius: var(--radius-sm);
}

/* Forms */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--ez-ink-secondary);
}

.field input,
.field select,
.field textarea {
  min-height: 44px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--ez-separator-strong);
  background: var(--ez-surface);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--ez-leaf);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ez-leaf) 25%, transparent);
}

.segmented {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  padding: 4px;
  background: var(--ez-surface-secondary);
  border-radius: var(--radius-md);
}

.segmented button {
  min-height: 34px;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--ez-ink-secondary);
}

.segmented button.is-active {
  background: var(--ez-surface);
  color: var(--ez-ink);
  box-shadow: var(--shadow-card);
  font-weight: var(--weight-semibold);
}

/* Filters chips row */
.chips-scroll {
  display: flex;
  gap: var(--space-2);
  overflow-x: auto;
  padding-bottom: var(--space-1);
  margin: 0 calc(-1 * var(--space-4));
  padding-left: var(--space-4);
  padding-right: var(--space-4);
  scrollbar-width: none;
}

.chips-scroll::-webkit-scrollbar {
  display: none;
}

.filter-chip {
  flex-shrink: 0;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  background: var(--ez-surface);
  border: 1px solid var(--ez-separator);
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: var(--ez-ink-secondary);
}

.filter-chip.is-active {
  background: var(--ez-forest-deep);
  border-color: var(--ez-forest-deep);
  color: white;
}

/* Estimate badge */
.estimate-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: var(--weight-bold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: #fff6e5;
  color: #9a5b00;
  border: 1px solid #f0d7a0;
}

.apurado-tag {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 10px;
  font-weight: var(--weight-bold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--ez-mint);
  color: var(--ez-forest-deep);
}

/* Alert */
.alert {
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  line-height: 1.4;
  border: 1px solid transparent;
}

.alert--info {
  background: #eaf3ff;
  border-color: #c8def8;
  color: #0a4a8a;
}

.alert--warn {
  background: #fff6e5;
  border-color: #f0d7a0;
  color: #7a4a00;
}

.alert--danger {
  background: var(--ez-faixa-vermelho-soft);
  border-color: #f5c0bc;
  color: #8a1f18;
}

.alert--ok {
  background: var(--ez-faixa-verde-soft);
  border-color: #b8e4cb;
  color: #145c40;
}

/* Empty / note */
.footnote {
  font-size: var(--text-xs);
  color: var(--ez-ink-tertiary);
  margin-top: var(--space-4);
  line-height: 1.45;
}

/* Funnel counters */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-2);
}

.stat {
  background: var(--ez-surface);
  border: 1px solid var(--ez-separator);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-2);
  text-align: center;
}

.stat__value {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.stat__label {
  font-size: 10px;
  color: var(--ez-ink-secondary);
  margin-top: 2px;
}

/* Tree / rede nodes */
.gen-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: var(--space-4) 0 var(--space-2);
  padding: 0 var(--space-1);
}

.gen-header__title {
  font-weight: var(--weight-semibold);
  font-size: var(--text-sm);
}

.node {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-3);
  border-bottom: 1px solid var(--ez-separator);
}

.node:last-child {
  border-bottom: 0;
}

.node__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: var(--weight-semibold);
  font-size: var(--text-sm);
  color: white;
  background: var(--ez-forest);
}

.node__avatar.is-amarelo {
  background: var(--ez-faixa-amarelo);
  color: #1c1405;
}

.node__avatar.is-vermelho {
  background: var(--ez-faixa-vermelho);
}

.node__avatar.is-inativo {
  background: #a1a1a6;
}

/* Timeline checklist */
.checklist {
  list-style: none;
  margin: 0;
  padding: 0;
}

.checklist li {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: var(--space-3);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--ez-separator);
  font-size: var(--text-sm);
}

.checklist li:last-child {
  border-bottom: 0;
}

.check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: bold;
}

.check--done {
  background: var(--ez-faixa-verde);
  color: white;
}

.check--todo {
  background: var(--ez-surface-secondary);
  color: var(--ez-ink-tertiary);
  border: 1.5px solid var(--ez-separator-strong);
}

/* Sim result */
.sim-result {
  background: linear-gradient(180deg, var(--ez-mint) 0%, var(--ez-surface) 48%);
  border: 1px solid var(--ez-mint-strong);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}

.sim-result__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-3);
  padding: var(--space-2) 0;
}

.sim-result__row + .sim-result__row {
  border-top: 1px dashed var(--ez-mint-strong);
}

/* Notification items */
.notif {
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--ez-separator);
}

.notif:last-child {
  border-bottom: 0;
}

.notif__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 5px;
  background: var(--ez-leaf);
}

.notif__dot.is-warn {
  background: var(--ez-orange);
}

.notif__dot.is-danger {
  background: var(--ez-red);
}

.notif__dot.is-read {
  background: var(--ez-separator-strong);
}

.notif.is-unread {
  background: color-mix(in srgb, var(--ez-mint) 45%, white);
}

/* More menu grid */
.menu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.menu-tile {
  background: var(--ez-surface);
  border: 1px solid var(--ez-separator);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  text-align: left;
  box-shadow: var(--shadow-card);
  min-height: 108px;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  transition: transform var(--dur-fast) var(--ease-out);
}

.menu-tile:active {
  transform: scale(0.98);
}

.menu-tile__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--ez-mint);
  color: var(--ez-forest-deep);
  font-weight: var(--weight-bold);
}

.menu-tile__title {
  font-weight: var(--weight-semibold);
  font-size: var(--text-md);
}

.menu-tile__sub {
  font-size: var(--text-xs);
  color: var(--ez-ink-secondary);
  line-height: 1.35;
}

/* Install banner */
.install-hint {
  margin-top: var(--space-4);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: var(--ez-surface);
  border: 1px dashed var(--ez-separator-strong);
  font-size: var(--text-xs);
  color: var(--ez-ink-secondary);
}

/* Utilities */
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mb-0 { margin-bottom: 0; }
.gap-2 { gap: var(--space-2); }
.w-full { width: 100%; }
.text-right { text-align: right; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ========== Login ========== */
.login-screen {
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  color: #f4fff8;
  background:
    radial-gradient(ellipse 90% 55% at 80% 10%, rgba(168, 230, 15, 0.22), transparent 55%),
    radial-gradient(ellipse 70% 45% at 10% 90%, rgba(31, 155, 104, 0.35), transparent 50%),
    linear-gradient(165deg, #03140e 0%, #0a2f22 48%, #041a12 100%);
}

.login-screen__mesh {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(168, 230, 15, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(168, 230, 15, 0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black, transparent 75%);
  pointer-events: none;
}

.login-screen__glow {
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168, 230, 15, 0.35), transparent 65%);
  top: -40px;
  right: -60px;
  filter: blur(8px);
  pointer-events: none;
}

.login-screen__content {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  padding: max(var(--safe-top), 20px) var(--space-5) max(var(--safe-bottom), 20px);
  gap: var(--space-5);
  min-height: 0;
  width: 100%;
  box-sizing: border-box;
}

.login-screen__content > .login-brand,
.login-screen__content > .login-card,
.login-screen__content > .login-footer {
  flex-shrink: 0;
}

.login-screen__content > .login-footer {
  margin-top: 0;
}

.login-brand {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}

.login-brand__mark {
  width: 112px;
  height: 112px;
  object-fit: contain;
  filter: drop-shadow(0 0 28px rgba(168, 230, 15, 0.45));
}

.login-brand__wordmark {
  width: min(260px, 72vw);
  height: auto;
}

.login-brand__tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(200, 232, 216, 0.75);
  margin: 0;
}

.login-brand__title {
  margin: var(--space-2) 0 0;
  font-size: var(--text-xl);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #f4fff8;
}

.login-brand__sub {
  margin: 0;
  font-size: var(--text-sm);
  color: rgba(200, 232, 216, 0.7);
  max-width: 28ch;
  line-height: 1.45;
}

.login-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(168, 230, 15, 0.18);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.login-card .field label {
  color: rgba(244, 255, 248, 0.72);
}

.login-card .field input {
  background: rgba(4, 20, 15, 0.45);
  border-color: rgba(168, 230, 15, 0.22);
  color: #f4fff8;
}

.login-card .field input::placeholder {
  color: rgba(200, 232, 216, 0.4);
}

.login-card .field input:focus {
  border-color: var(--ez-lime);
  box-shadow: 0 0 0 3px rgba(168, 230, 15, 0.2);
}

.login-error {
  display: none;
  margin-top: var(--space-3);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: rgba(224, 58, 48, 0.16);
  border: 1px solid rgba(224, 58, 48, 0.35);
  color: #ffb4ae;
  font-size: var(--text-sm);
}

.login-error.is-visible {
  display: block;
}

.login-hint {
  margin-top: var(--space-4);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: rgba(168, 230, 15, 0.08);
  border: 1px dashed rgba(168, 230, 15, 0.28);
  font-size: var(--text-xs);
  color: rgba(212, 255, 58, 0.85);
  line-height: 1.4;
}

.login-footer {
  text-align: center;
  font-size: 11px;
  color: rgba(200, 232, 216, 0.45);
  line-height: 1.5;
}

.list {
  background: var(--ez-surface);
  backdrop-filter: blur(10px);
}

.menu-tile {
  background: var(--ez-surface);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.7);
}

.menu-tile__icon {
  background: linear-gradient(145deg, color-mix(in srgb, var(--ez-lime) 35%, white), var(--ez-mint));
}

.login-brand__name {
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  background: linear-gradient(135deg, #e8ff7a 0%, #a8e60f 55%, #7bc40a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 20px rgba(168, 230, 15, 0.25));
}
