/* ─────────────────────────────────────────────────────────────
   WeatherGrid · Observer App — Design System
   Mobile (390px) prototype rendered inside a 1440px desktop stage.
   ───────────────────────────────────────────────────────────── */

:root {
  /* ── Color · Surface ── */
  --bg-page:        #f4f4f5;
  --bg-card:        #ffffff;
  --bg-muted:       #fafafa;
  --bg-soft:        #f4f4f5;

  /* ── Color · Text ── */
  --text-strong:    #09090b;
  --text-body:      #52525b;
  --text-muted:     #71717a;
  --text-subtle:    #a1a1aa;

  /* ── Color · Border ── */
  --border-default: #e4e4e7;
  --border-strong:  #d4d4d8;

  /* ── Color · Brand ── */
  --brand:          #2563eb;
  --brand-hover:    #1d4ed8;
  --brand-soft:     #eff6ff;
  --brand-ring:     rgba(37, 99, 235, 0.12);

  /* ── Color · Semantic ── */
  --success:        #15803d;
  --success-bg:     #f0fdf4;
  --success-border: #bbf7d0;
  --success-dot:    #22c55e;
  --warning:        #b45309;
  --warning-bg:     #fffbeb;
  --warning-border: #fde68a;
  --warning-dot:    #f59e0b;
  --danger:         #b91c1c;
  --danger-strong:  #ef4444;
  --danger-bg:      #fef2f2;
  --danger-border:  #fecaca;
  --info:           #1d4ed8;
  --info-bg:        #eff6ff;
  --info-border:    #bfdbfe;

  /* ── Device chrome ── */
  --device-shell:   #18181b;

  /* ── Typography ── */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --fs-title:     22px;
  --fs-card:      15px;
  --fs-body:      14px;
  --fs-label:     13px;
  --fs-helper:    12px;
  --fs-hint:      11px;
  --fs-badge:     10px;
  --fs-micro:      9px;

  /* ── Spacing scale (4·6·8·10·12·14·16·18·20·24) ── */
  --sp-1:  4px;
  --sp-2:  6px;
  --sp-3:  8px;
  --sp-4: 10px;
  --sp-5: 12px;
  --sp-6: 14px;
  --sp-7: 16px;
  --sp-8: 18px;
  --sp-9: 20px;
  --sp-10:24px;

  /* ── Radii ── */
  --r-tab:   6px;
  --r-input: 8px;
  --r-card: 10px;
  --r-pill: 999px;

  /* ── Shadows ── */
  --shadow-card:   0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-tab:    0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-pop:    0 10px 24px -8px rgba(24,24,27,0.18), 0 4px 10px -4px rgba(24,24,27,0.12);
  --shadow-frame:  0 30px 60px -20px rgba(24,24,27,0.35), 0 10px 25px -10px rgba(24,24,27,0.2);
  --ring-focus:    0 0 0 3px var(--brand-ring);

  /* ── Motion ── */
  --ease-out:     cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out:  cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast:    150ms;
  --dur-normal:  250ms;
  --dur-slow:    350ms;
}

/* ── Base ─────────────────────────────────────────────────────── */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body {
  font-family: var(--font-sans);
  color: var(--text-strong);
  background: var(--bg-page);
  font-size: var(--fs-body);
  line-height: 1.45;
}

body {
  min-height: 100vh;
}

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

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

input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); border-radius: 999px; }
::-webkit-scrollbar-track { background: transparent; }

/* ── Desktop stage (1440 fixed) ────────────────────────────────── */
.desktop-stage {
  width: 1440px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 48px 24px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  background:
    radial-gradient(1200px 600px at 50% -80px, #eef2ff 0%, transparent 60%),
    var(--bg-page);
}

.stage-label {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: var(--fs-label);
  font-weight: 500;
}

.stage-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success-dot);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.15);
}

/* ── Phone frame ───────────────────────────────────────────────── */
.phone {
  width: 390px;
  height: 844px;
  background: var(--bg-card);
  border-radius: 44px;
  border: 10px solid var(--device-shell);
  box-shadow: var(--shadow-frame);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.status-bar {
  height: 44px;
  flex-shrink: 0;
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-strong);
  position: relative;
  z-index: 4;
}

.notch {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 28px;
  background: var(--device-shell);
  border-radius: 20px;
}

.status-time {
  position: relative;
  z-index: 1;
}

.status-right {
  display: flex;
  align-items: center;
  gap: 6px;
}
.status-right svg {
  width: 16px;
  height: 11px;
  color: var(--text-strong);
}

.home-indicator {
  position: absolute;
  bottom: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 130px;
  height: 4px;
  background: var(--device-shell);
  border-radius: 2px;
  z-index: 5;
  pointer-events: none;
}

/* ── App root flex layout ──────────────────────────────────────── */
#app {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: var(--bg-card);
}

.screen-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--bg-card);
  padding-bottom: 8px;
}

/* ── App header ────────────────────────────────────────────────── */
.app-header {
  padding: 12px 20px 16px;
  border-bottom: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  flex-shrink: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.02em;
}
.brand-text {
  display: flex;
  flex-direction: column;
}
.brand-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-strong);
  line-height: 1.2;
}
.brand-sub {
  font-size: var(--fs-hint);
  color: var(--text-muted);
  line-height: 1.2;
}

.header-actions {
  display: flex;
  gap: 6px;
}

.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border-default);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  transition: background var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out);
}
.icon-btn:hover {
  background: var(--bg-soft);
}
.icon-btn:active {
  transform: scale(0.96);
}
.icon-btn svg {
  width: 16px;
  height: 16px;
  color: var(--text-body);
}
.icon-btn .badge {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 50%;
  background: var(--danger-strong);
  color: #fff;
  font-size: 9px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bg-card);
}

/* ── Page intro ────────────────────────────────────────────────── */
.page-intro {
  padding: 20px 20px 12px;
  background: var(--bg-card);
}

.breadcrumb {
  font-size: var(--fs-helper);
  color: var(--text-muted);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.breadcrumb .crumb-link {
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease-out);
}
.breadcrumb .crumb-link:hover {
  color: var(--text-strong);
}
.breadcrumb .crumb-sep {
  color: var(--text-subtle);
}
.breadcrumb .current {
  color: var(--text-strong);
  font-weight: 500;
}

.page-title {
  font-size: var(--fs-title);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-strong);
  margin-bottom: 4px;
}

.page-desc {
  font-size: var(--fs-label);
  color: var(--text-muted);
  line-height: 1.5;
}

/* ── Tabs (segmented control) ──────────────────────────────────── */
.tabs {
  margin: 16px 20px 0;
  background: var(--bg-soft);
  border-radius: var(--r-input);
  padding: 4px;
  display: flex;
  gap: 4px;
  position: relative;
}
.tab {
  flex: 1;
  padding: 8px 12px;
  text-align: center;
  font-size: var(--fs-label);
  font-weight: 500;
  color: var(--text-muted);
  border-radius: var(--r-tab);
  cursor: pointer;
  transition: color var(--dur-fast) var(--ease-out),
              background var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
  user-select: none;
}
.tab:hover:not(.active) {
  color: var(--text-strong);
}
.tab.active {
  background: var(--bg-card);
  color: var(--text-strong);
  box-shadow: var(--shadow-tab);
}

/* ── Card ──────────────────────────────────────────────────────── */
.card {
  margin: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--r-card);
  padding: 18px;
  animation: card-in var(--dur-slow) var(--ease-out);
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}
.card-title {
  font-size: var(--fs-card);
  font-weight: 600;
  color: var(--text-strong);
}
.card-sub {
  font-size: var(--fs-helper);
  color: var(--text-muted);
  margin-bottom: 18px;
}

/* ── Pill (status / live sync) ─────────────────────────────────── */
.pill {
  font-size: var(--fs-badge);
  font-weight: 500;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--success-border);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: default;
}
.pill .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--success-dot);
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6);
  animation: pulse-dot 2.4s var(--ease-in-out) infinite;
}

/* ── Form fields ───────────────────────────────────────────────── */
.field {
  margin-bottom: 16px;
}
.field-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--fs-label);
  font-weight: 500;
  color: var(--text-strong);
  margin-bottom: 6px;
}
.field-label .req {
  color: var(--danger-strong);
  margin-left: 2px;
}
.field-hint {
  font-size: var(--fs-hint);
  color: var(--text-subtle);
  font-weight: 400;
}

.input {
  width: 100%;
  height: 40px;
  border: 1px solid var(--border-default);
  border-radius: var(--r-input);
  padding: 0 12px;
  font-size: var(--fs-body);
  color: var(--text-strong);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  transition: border-color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
}
.input:hover {
  border-color: var(--border-strong);
}
.input.open,
.input.focused {
  border-color: var(--brand);
  box-shadow: var(--ring-focus);
}
.input .placeholder {
  color: var(--text-subtle);
}
.input .value {
  color: var(--text-strong);
}
.input svg {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  transition: transform var(--dur-fast) var(--ease-out);
}
.input.open svg {
  transform: rotate(180deg);
}

.input-numeric {
  position: relative;
}
.input-numeric input {
  width: 100%;
  height: 40px;
  border: 1px solid var(--border-default);
  border-radius: var(--r-input);
  padding: 0 48px 0 12px;
  font-size: var(--fs-body);
  color: var(--text-strong);
  background: var(--bg-card);
  outline: none;
  transition: border-color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out);
}
.input-numeric input::placeholder {
  color: var(--text-subtle);
}
.input-numeric input:focus {
  border-color: var(--brand);
  box-shadow: var(--ring-focus);
}
.input-numeric.invalid input {
  border-color: var(--danger-strong);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12);
}
.input-suffix {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: var(--fs-label);
  color: var(--text-muted);
  font-weight: 500;
  pointer-events: none;
}

.helper {
  font-size: var(--fs-helper);
  color: var(--text-muted);
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
  min-height: 16px;
}
.helper.success { color: var(--success); }
.helper.error   { color: var(--danger);  }
.helper svg {
  width: 12px;
  height: 12px;
}

.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ── Buttons ───────────────────────────────────────────────────── */
.actions {
  display: flex;
  gap: 8px;
  margin-top: 20px;
}
.btn {
  height: 42px;
  border-radius: var(--r-input);
  font-family: inherit;
  font-size: var(--fs-body);
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  padding: 0 16px;
  transition: background var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out),
              opacity var(--dur-fast) var(--ease-out);
}
.btn:active {
  transform: scale(0.97);
}
.btn.is-pulse {
  animation: btn-pulse 180ms var(--ease-out);
}
.btn-primary {
  flex: 1;
  background: var(--brand);
  color: #fff;
}
.btn-primary:hover {
  background: var(--brand-hover);
}
.btn-primary[disabled],
.btn-primary.disabled {
  background: var(--brand);
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.btn-secondary {
  background: var(--bg-card);
  color: var(--text-strong);
  border-color: var(--border-default);
}
.btn-secondary:hover {
  background: var(--bg-soft);
}
.btn-block { width: 100%; }

/* ── Last submission card ──────────────────────────────────────── */
.last-card {
  margin: 0 20px 24px;
  background: var(--bg-muted);
  border: 1px solid var(--border-default);
  border-radius: var(--r-card);
  padding: 14px;
  animation: card-in var(--dur-slow) var(--ease-out) 80ms backwards;
}
.last-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.last-title {
  font-size: var(--fs-helper);
  font-weight: 600;
  color: var(--text-strong);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.last-link {
  font-size: var(--fs-helper);
  color: var(--brand);
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.last-link:hover {
  text-decoration: underline;
}
.last-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-default);
  font-size: var(--fs-helper);
}
.last-row:last-child {
  border-bottom: none;
}
.last-row .lbl {
  color: var(--text-muted);
}
.last-row .val {
  color: var(--text-strong);
  font-weight: 500;
}

.last-card.is-empty {
  background: var(--bg-muted);
}
.last-card.is-empty .empty-line {
  font-size: var(--fs-helper);
  color: var(--text-subtle);
  padding: 6px 0;
  text-align: center;
}

/* ── Submissions table (My Submissions tab) ────────────────────── */
.submissions {
  margin: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--r-card);
  overflow: hidden;
  animation: fade-in var(--dur-fast) var(--ease-out);
}
.submissions-head {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border-default);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.submissions-head .card-title {
  font-size: var(--fs-card);
}
.submissions-count {
  font-size: var(--fs-helper);
  color: var(--text-muted);
}
.sub-table {
  width: 100%;
  border-collapse: collapse;
}
.sub-table th {
  font-size: var(--fs-badge);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  text-align: left;
  padding: 10px 14px;
  background: var(--bg-muted);
  border-bottom: 1px solid var(--border-default);
}
.sub-table th.right { text-align: right; }
.sub-table td {
  padding: 11px 14px;
  font-size: var(--fs-helper);
  color: var(--text-strong);
  border-bottom: 1px solid var(--border-default);
}
.sub-table td.muted {
  color: var(--text-muted);
}
.sub-table td.right { text-align: right; }
.sub-table tr:last-child td {
  border-bottom: none;
}
.sub-table tr:hover td {
  background: var(--bg-muted);
}

.sub-location {
  font-weight: 500;
  color: var(--text-strong);
}
.sub-sublabel {
  color: var(--text-muted);
  font-size: var(--fs-badge);
  margin-top: 2px;
}

.sub-empty {
  padding: 36px 20px;
  text-align: center;
  font-size: var(--fs-label);
  color: var(--text-muted);
  background: var(--bg-card);
}
.sub-empty .sub-empty-icon {
  width: 40px;
  height: 40px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: var(--bg-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-subtle);
}
.sub-empty .sub-empty-icon svg { width: 18px; height: 18px; }
.sub-empty strong {
  display: block;
  color: var(--text-strong);
  font-size: var(--fs-body);
  font-weight: 600;
  margin-bottom: 4px;
}

/* ── Bottom nav ────────────────────────────────────────────────── */
.bottom-nav {
  display: flex;
  border-top: 1px solid var(--border-default);
  background: var(--bg-card);
  padding: 8px 0 22px;
  flex-shrink: 0;
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: var(--fs-badge);
  color: var(--text-muted);
  font-weight: 500;
  cursor: pointer;
  padding: 4px 0;
  transition: color var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
}
.nav-item:hover {
  color: var(--text-strong);
}
.nav-item:active {
  transform: scale(0.96);
}
.nav-item.active {
  color: var(--brand);
}
.nav-item svg {
  width: 20px;
  height: 20px;
}

/* ── Login screen ──────────────────────────────────────────────── */
.login-screen {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 60%, #eef2ff 100%);
  padding: 24px 22px 28px;
  overflow-y: auto;
}
.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 12px 0 18px;
}
.login-logo {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 22px;
  box-shadow: 0 8px 18px -6px rgba(37, 99, 235, 0.5);
  margin-bottom: 12px;
}
.login-app-name {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-strong);
}
.login-app-sub {
  font-size: var(--fs-label);
  color: var(--text-muted);
  margin-top: 2px;
}
.login-title {
  font-size: var(--fs-title);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-strong);
  margin-bottom: 4px;
}
.login-desc {
  font-size: var(--fs-label);
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.5;
}
.login-section-label {
  font-size: var(--fs-helper);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.login-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}
.user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-default);
  border-radius: var(--r-card);
  padding: 12px;
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-out),
              box-shadow var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
  opacity: 0;
  animation: card-in var(--dur-slow) var(--ease-out) forwards;
}
.user-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}
.user-card.selected {
  border-color: var(--brand);
  box-shadow: var(--ring-focus);
  background: #fbfdff;
}
.user-card .avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  flex-shrink: 0;
}
.user-card .user-info {
  flex: 1;
  min-width: 0;
}
.user-card .user-name {
  font-size: var(--fs-body);
  font-weight: 600;
  color: var(--text-strong);
  line-height: 1.3;
}
.user-card .user-meta {
  font-size: var(--fs-hint);
  color: var(--text-muted);
  margin-top: 1px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.user-card .role-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 6px;
  border-radius: var(--r-pill);
  background: var(--brand-soft);
  color: var(--brand);
}
.user-card .check-mark {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out);
}
.user-card.selected .check-mark {
  background: var(--brand);
  border-color: var(--brand);
}
.user-card.selected .check-mark svg {
  width: 12px;
  height: 12px;
  color: #fff;
}
.user-card:not(.selected) .check-mark svg {
  display: none;
}

.login-footer {
  margin-top: auto;
  padding-top: 12px;
}
.login-footer .login-fineprint {
  font-size: var(--fs-hint);
  color: var(--text-subtle);
  text-align: center;
  margin-top: 10px;
  line-height: 1.5;
}

/* ── Dropdown panel ────────────────────────────────────────────── */
.dropdown-panel {
  position: absolute;
  z-index: 30;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--r-input);
  box-shadow: var(--shadow-pop);
  padding: 4px;
  max-height: 240px;
  overflow-y: auto;
  animation: dropdown-in var(--dur-fast) var(--ease-out);
  min-width: 200px;
}
.dropdown-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: var(--fs-label);
  color: var(--text-strong);
  transition: background var(--dur-fast) var(--ease-out);
  opacity: 0;
  animation: option-in var(--dur-fast) var(--ease-out) forwards;
}
.dropdown-option:hover {
  background: var(--bg-soft);
}
.dropdown-option.selected {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 500;
}
.dropdown-option .dd-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 10px;
  font-weight: 600;
}
.dropdown-option .dd-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--text-muted);
}
.dropdown-option .dd-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dropdown-option .dd-check {
  margin-left: auto;
  color: var(--brand);
  width: 14px;
  height: 14px;
}
.dropdown-option:not(.selected) .dd-check {
  visibility: hidden;
}

/* ── Toasts ────────────────────────────────────────────────────── */
.toast-container {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 88px; /* above bottom nav + home indicator */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  z-index: 50;
  padding: 0 16px;
}
.toast {
  pointer-events: auto;
  max-width: 320px;
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--text-strong);
  color: #fff;
  font-size: var(--fs-helper);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-pop);
  animation: toast-in var(--dur-normal) var(--ease-out);
}
.toast.leaving {
  animation: toast-out 200ms var(--ease-in-out) forwards;
}
.toast .toast-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.toast.success { background: #064e3b; }
.toast.success .toast-icon { color: #6ee7b7; }
.toast.error   { background: #7f1d1d; }
.toast.error .toast-icon  { color: #fca5a5; }
.toast.info    { background: #1e293b; }
.toast.info .toast-icon   { color: #93c5fd; }

/* ── Keyframes ─────────────────────────────────────────────────── */
@keyframes dropdown-in {
  0%   { opacity: 0; transform: translateY(-4px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes option-in {
  0%   { opacity: 0; transform: translateY(-2px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes toast-in {
  0%   { opacity: 0; transform: translateY(12px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes toast-out {
  0%   { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(8px); }
}
@keyframes card-in {
  0%   { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes fade-in {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}
@keyframes btn-pulse {
  0%   { transform: scale(1);    }
  50%  { transform: scale(0.97); }
  100% { transform: scale(1);    }
}
@keyframes pulse-dot {
  0%   { box-shadow: 0 0 0 0   rgba(34, 197, 94, 0.55); }
  70%  { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);    }
  100% { box-shadow: 0 0 0 0   rgba(34, 197, 94, 0);    }
}

/* ── Utility ───────────────────────────────────────────────────── */
.no-cursor { cursor: default !important; }
.hide      { display: none !important; }
.flex      { display: flex; }
.flex-1    { flex: 1; }
.gap-4     { gap: 4px; }
.gap-8     { gap: 8px; }
.muted     { color: var(--text-muted); }

/* ── Feedback overlay (when it injects, allow it) ──────────────── */
.fb-overlay, .fb-popup {
  font-family: var(--font-sans);
}
