:root {
  --bg:        #0a0e1a;
  --bg-2:      #0e1424;
  --panel:     #131a2d;
  --panel-2:   #18203a;
  --hair:      #1f2840;
  --hair-2:    #2a3550;
  --ink:       #e8ecf2;
  --ink-2:     #c7cfdc;
  --muted:     #8a92a0;
  --muted-2:   #6a7280;
  --accent:    #8e95a4;
  --orange:    #ee5e1e;
  --success:   #3fb96a;
  --danger:    #e5544a;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: 'Geist', ui-sans-serif, system-ui, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

.mono { font-family: 'JetBrains Mono', monospace; }

.ai-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.ai-bg .ai-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--hair) 1px, transparent 1.5px);
  background-size: 32px 32px;
  opacity: 0.5;
}

.ai-bg .ai-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 18% 8%, rgba(238, 94, 30, 0.12), transparent 60%),
    radial-gradient(ellipse 70% 60% at 85% 95%, rgba(142, 149, 164, 0.1), transparent 60%);
}

.portal-shell, main.portal-shell { position: relative; z-index: 1; }

@keyframes rvIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.rv { animation: rvIn 0.5s cubic-bezier(0.16, 0.84, 0.34, 1) both; }

@media (prefers-reduced-motion: reduce) {
  .rv { animation: none; }
}

button, input { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0.25rem; font-size: 1.65rem; line-height: 1.1; letter-spacing: -0.02em; font-weight: 500; }
h2 { margin-bottom: 0.2rem; font-size: 1.3rem; letter-spacing: -0.02em; font-weight: 500; }
h3 { margin-bottom: 0.2rem; font-size: 1.05rem; letter-spacing: -0.01em; font-weight: 500; }
p { margin-bottom: 0; color: var(--muted); line-height: 1.45; }
code { font-family: 'JetBrains Mono', monospace; }
.hidden { display: none !important; }

.portal-shell { min-height: 100vh; }

.auth-view {
  height: 100vh;
  overflow: hidden;
  padding: 0;
}

.auth-shell {
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.auth-aside {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2rem;
  padding: 3rem 3.5rem;
  background:
    radial-gradient(ellipse 70% 55% at 15% 12%, rgba(238, 94, 30, 0.16), transparent 60%),
    radial-gradient(ellipse 60% 60% at 90% 90%, rgba(142, 149, 164, 0.1), transparent 60%),
    var(--bg-2);
  border-right: 1px solid var(--hair);
  overflow: hidden;
}

.auth-logo {
  height: 2.6rem;
  width: auto;
  object-fit: contain;
}

.auth-aside-copy h1 {
  max-width: 22rem;
  font-size: 2.1rem;
  line-height: 1.15;
}

.auth-aside-copy p {
  max-width: 24rem;
  margin-top: 0.6rem;
  font-size: 0.95rem;
}

.auth-highlights {
  display: grid;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--ink-2);
  font-size: 0.88rem;
}

.auth-highlights li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.hl-dot {
  width: 0.5rem;
  height: 0.5rem;
  flex: none;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 0 4px rgba(238, 94, 30, 0.14);
}

.auth-form-panel {
  height: 100%;
  overflow-y: auto;
  display: flex;
  justify-content: center;
  padding: 2.5rem 1.5rem;
}

.auth-form-inner {
  width: min(420px, 100%);
  margin: auto 0;
}

.auth-mobile-brand { display: none; }

.auth-form-subtitle {
  margin-bottom: 1.1rem;
  font-size: 0.9rem;
}

@media (max-width: 960px) {
  .auth-view { height: auto; min-height: 100vh; overflow: visible; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-form-panel { height: auto; padding: 2rem 1.25rem; }
  .auth-mobile-brand { display: flex; margin-bottom: 1rem; }
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.brand-row.compact { margin-bottom: 0; }

.brand-row.compact span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.brand-mark {
  height: 2.4rem;
  width: auto;
  object-fit: contain;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 0.3rem;
  color: var(--orange);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.section-label::before {
  content: "";
  width: 14px;
  height: 1px;
  background: var(--muted);
}

.tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.tab {
  border: 1px solid var(--hair);
  background: var(--bg);
  color: var(--muted);
  border-radius: 5px;
  min-height: 2.25rem;
  font-weight: 500;
}

.tab.active {
  background: var(--orange);
  color: #0a0e1a;
  border-color: var(--orange);
  font-weight: 600;
}

.auth-inline-row {
  margin: 0;
  text-align: right;
}

.text-link {
  border: 0;
  padding: 0;
  background: none;
  color: var(--orange);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
}

.text-link:hover { text-decoration: underline; }

.stack-form { display: grid; gap: 0.55rem; }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.55rem; }
label { display: grid; gap: 0.25rem; }
label span { color: var(--muted); font-size: 0.82rem; }

input {
  width: 100%;
  min-height: 2.3rem;
  border: 1px solid var(--hair);
  border-radius: 5px;
  padding: 0.48rem 0.6rem;
  background: var(--bg);
  color: var(--ink);
}

.password-field { position: relative; }
.password-field input { padding-right: 4.2rem; }

.eye-button {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  min-height: 1.65rem;
  border: 0;
  border-radius: 4px;
  padding: 0 0.5rem;
  color: var(--orange);
  background: transparent;
  font-size: 0.78rem;
  font-weight: 600;
}

.eye-button:hover { background: var(--panel-2); }

.field-error {
  color: var(--danger);
  font-size: 0.82rem;
  line-height: 1.35;
}

input:focus {
  outline: 2px solid rgba(238, 94, 30, 0.22);
  border-color: rgba(238, 94, 30, 0.6);
}

.button {
  min-height: 2.3rem;
  border: 1px solid var(--orange);
  border-radius: 5px;
  background: var(--orange);
  color: #0a0e1a;
  padding: 0.48rem 0.78rem;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.button:hover {
  background: #d6521a;
  border-color: #d6521a;
  transform: translateY(-1px);
  box-shadow: 0 10px 22px -12px rgba(238, 94, 30, 0.55);
}
.button.ghost { background: transparent; color: var(--ink); border-color: var(--hair); }
.button.ghost:hover { background: var(--panel-2); box-shadow: none; }
.button.full { width: 100%; }
.button:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
.button.is-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  opacity: 0.85;
  cursor: wait;
  transform: none;
  box-shadow: none;
}
.button.is-loading:hover {
  background: var(--orange);
  border-color: var(--orange);
  transform: none;
  box-shadow: none;
}
.text-link.is-loading {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  opacity: 0.7;
  cursor: wait;
  pointer-events: none;
}
.btn-spinner {
  width: 0.95rem;
  height: 0.95rem;
  border: 2px solid color-mix(in oklch, currentColor 25%, transparent);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: btnSpin 0.7s linear infinite;
  flex-shrink: 0;
}
.button .btn-spinner {
  border-color: rgba(10, 14, 26, 0.25);
  border-top-color: #0a0e1a;
}
@keyframes btnSpin {
  to { transform: rotate(360deg); }
}

.status {
  margin-bottom: 0.7rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--hair);
  border-radius: 5px;
  background: var(--panel);
}
.status.error { color: var(--danger); border-color: rgba(229, 84, 74, 0.4); }
.status.success { color: var(--success); border-color: rgba(63, 185, 106, 0.4); }

.dashboard-view {
  min-height: 100vh;
}

.dash-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in oklch, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hair);
}

.dash-topbar-inner {
  max-width: 1360px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.25rem;
  padding: 0.9rem 2rem;
}

.dash-topbar-title h2 { font-size: 1.15rem; }

.dash-content {
  max-width: 1360px;
  margin: 0 auto;
  padding: 1.1rem 2rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.dash-row-squares {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  align-items: start;
}

.dash-row-squares > * {
  min-height: 260px;
}

.dash-topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  justify-self: end;
}

.profile-menu { position: relative; }

.profile-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.3rem;
  padding: 0.25rem 0.75rem 0.25rem 0.25rem;
  border: 1px solid var(--hair);
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--ink);
  font-size: 0.82rem;
}

.profile-chip:hover { border-color: var(--hair-2); }

.account-avatar-sm {
  width: 1.85rem;
  height: 1.85rem;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(155deg, rgba(238, 94, 30, 0.28), rgba(238, 94, 30, 0.08));
  border: 1px solid var(--hair-2);
  color: var(--orange);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  font-weight: 600;
}

.profile-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  z-index: 6;
  min-width: 12rem;
  padding: 0.35rem;
  background: var(--panel);
  border: 1px solid var(--hair);
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.dropdown-item {
  display: block;
  width: 100%;
  min-height: 2.1rem;
  padding: 0 0.6rem;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  font-size: 0.85rem;
}

.dropdown-item:hover { background: var(--panel-2); }

.license-list { display: grid; gap: 10rem; }

.license-group-title {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  color: var(--ink);
}

.license-group-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 0.7rem; }

.license-card,
.storage-card,
.retention-card {
  background: var(--panel);
  border: 1px solid var(--hair);
  border-radius: 6px;
  box-shadow: var(--shadow);
  padding: 0.9rem;
  transition: border-color 0.2s ease;
}

.license-card:hover,
.storage-card:hover,
.retention-card:hover { border-color: var(--hair-2); }

.license-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.5rem;
}

.key-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  align-items: center;
}

.license-key {
  overflow-wrap: anywhere;
  padding: 0.55rem 0.65rem;
  border-radius: 5px;
  border: 1px solid var(--hair);
  background: var(--bg);
  color: var(--orange);
  font-size: 0.9rem;
  font-weight: 600;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem;
  margin-top: 0.5rem;
}

.meta-box {
  border: 1px solid var(--hair);
  border-radius: 5px;
  padding: 0.45rem 0.6rem;
  background: var(--bg);
}

.meta-box span {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  margin-bottom: 0.2rem;
}

.device-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--hair);
  font-size: 0.8rem;
  color: var(--muted);
}

.device-row .button { min-height: 2rem; font-size: 0.78rem; }

.badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 0.18rem 0.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge.active { color: var(--success); background: rgba(63, 185, 106, 0.12); }
.badge.expired { color: var(--danger); background: rgba(229, 84, 74, 0.12); }

/* ---------- storage ---------- */
.storage-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.9rem;
}

.storage-head span {
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
}

.storage-overview {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.storage-donut {
  --used-color: var(--orange);
  position: relative;
  width: 6.5rem;
  height: 6.5rem;
  flex: none;
  border-radius: 50%;
  background: conic-gradient(var(--used-color) calc(var(--percent, 0) * 1%), var(--hair) 0);
}

.storage-donut.storage-full { --used-color: var(--danger); }

.storage-donut::before {
  content: "";
  position: absolute;
  inset: 0.7rem;
  border-radius: 50%;
  background: var(--panel);
  border: 1px solid var(--hair);
}

.storage-donut .donut-label {
  position: absolute;
  inset: 0.7rem;
  display: grid;
  place-items: center;
  text-align: center;
  line-height: 1.15;
}

.storage-donut .donut-label .donut-percent {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
}

.storage-donut .donut-label .donut-caption {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.6rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.storage-legend {
  display: grid;
  gap: 0.5rem;
  flex: 1;
  min-width: 0;
}

.legend-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
}

.legend-dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 50%;
  flex: none;
}

.legend-dot.used { background: var(--orange); }
.legend-dot.used.storage-full { background: var(--danger); }
.legend-dot.free { background: var(--hair); }

.legend-row .legend-label { color: var(--muted); }
.legend-row .legend-value { margin-left: auto; color: var(--ink); font-weight: 500; }

.storage-tiers {
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px dashed var(--hair);
}

/* ---------- retention ---------- */
.retention-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.75rem;
}

.retention-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.6rem;
}

.retention-head span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.retention-stepper {
  display: flex;
  align-items: stretch;
  gap: 0.6rem;
}

.retention-step-btn {
  width: 2.3rem;
  height: 2.3rem;
  flex: none;
  align-self: center;
  display: grid;
  place-items: center;
  border: 1px solid var(--hair);
  border-radius: 4px;
  background: var(--panel-2);
  color: var(--ink);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1;
}

.retention-step-btn:hover { border-color: var(--orange); color: var(--orange); }
.retention-step-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.retention-value {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.45rem 0.6rem;
  border: 1px solid var(--hair);
  border-radius: 5px;
  background: var(--bg);
}

.retention-days {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.3rem;
}

.retention-days input {
  width: 4.5rem;
  border: 0;
  background: transparent;
  padding: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.1;
  text-align: right;
}

.retention-days input:focus { outline: none; }

.retention-days .unit {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.retention-years {
  font-size: 0.72rem;
  color: var(--muted);
}

.retention-actions {
  display: flex;
  justify-content: flex-end;
}

.storage-tiers-disabled {
  opacity: 0.55;
}

.storage-tiers-disabled button {
  pointer-events: none;
}

.storage-tiers-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.storage-tiers-head span {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.storage-stepper {
  display: flex;
  align-items: center;
  gap: 1rem;
  border: 1px solid var(--hair);
  border-radius: 5px;
  padding: 0.85rem 1rem;
  background: var(--bg);
}

.stepper-control {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.stepper-btn {
  width: 2.1rem;
  height: 2.1rem;
  min-height: 0;
  border: 1px solid var(--hair-2);
  border-radius: 5px;
  background: var(--panel);
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1;
  padding: 0;
}

.stepper-btn:hover { background: var(--panel-2); }

.stepper-amount {
  min-width: 4.5rem;
  text-align: center;
}

.stepper-amount .amount-value {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink);
}

.stepper-amount .amount-unit {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stepper-price {
  flex: 1;
  text-align: right;
}

.stepper-price .price-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.1rem;
  color: var(--orange);
  font-weight: 600;
}

.stepper-price .price-note {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
}

.storage-stepper .button {
  min-height: 2.3rem;
  white-space: nowrap;
}

.storage-note {
  margin: 0 0 0.6rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
}

.storage-warn {
  color: var(--danger);
  font-weight: 500;
}

.tier-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.tier-option {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 6.5rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--hair-2);
  border-radius: 5px;
  background: var(--panel);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.tier-option:hover:not(:disabled) { background: var(--panel-2); }

.tier-option.active {
  border-color: var(--orange);
  background: var(--panel-2);
}

.tier-option:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.tier-option-label {
  font-size: 0.8rem;
  font-weight: 600;
}

.tier-option-price {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.68rem;
  color: var(--muted);
}

.unit-picker {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.85rem 0.9rem;
  border: 1px solid var(--hair);
  border-radius: 5px;
  background: var(--bg);
}

.unit-picker-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.unit-picker-value {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex: 1;
}

#storage-buy-now {
  margin-left: auto;
  white-space: nowrap;
}

.unit-picker-value input {
  width: 4.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
  border: 1px solid var(--hair);
  border-radius: 5px;
  padding: 0.35rem 0.5rem;
  background: var(--bg);
}

.unit-picker-value input.qty-val {
  width: auto;
  min-width: 5.5rem;
  text-align: center;
  cursor: default;
}

.unit-picker-value span {
  font-size: 0.85rem;
  color: var(--muted);
}

.pay-panel {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--hair);
  border-radius: 5px;
  background: var(--bg);
}

.pay-summary {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px dashed var(--hair);
}

.pay-summary strong {
  display: block;
  font-size: 1.15rem;
  color: var(--ink);
}

.pay-amount { text-align: right; }

.pay-amount strong {
  font-family: 'JetBrains Mono', monospace;
  color: var(--orange);
}

.pay-label {
  display: block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pay-rows {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.pay-row {
  display: grid;
  grid-template-columns: 8.5rem 1fr auto;
  align-items: center;
  gap: 0.6rem;
}

.pay-value {
  color: var(--ink);
  font-size: 0.85rem;
  word-break: break-all;
}

.pay-row .button {
  min-height: 1.9rem;
  padding: 0 0.7rem;
  font-size: 0.72rem;
}

.pay-confirm {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding-top: 0.7rem;
  border-top: 1px dashed var(--hair);
}

.pay-confirm-row {
  display: flex;
  gap: 0.55rem;
}

.pay-confirm-row input {
  flex: 1;
  min-width: 0;
}

.pay-confirm-row .button {
  min-height: 2.3rem;
  white-space: nowrap;
}

/* ---------- modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(5, 7, 14, 0.72);
  backdrop-filter: blur(2px);
}

.modal-panel {
  width: min(440px, 100%);
  padding: 1.1rem;
  background: var(--panel);
  border: 1px solid var(--hair);
  border-radius: 6px;
  box-shadow: var(--shadow);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.55rem;
  margin-top: 0.3rem;
}

@media (max-width: 760px) {
  .dash-row-squares { grid-template-columns: 1fr; }
  .dash-row-squares > * { min-height: 0; }
  .dash-topbar-inner { grid-template-columns: 1fr; align-items: stretch; padding: 0.9rem 1rem; }
  .dash-topbar-actions { justify-self: stretch; justify-content: space-between; }
  .dash-content { padding: 1.25rem 1rem 2rem; }
  .license-head { align-items: stretch; flex-direction: column; }
  .device-row { flex-direction: column; align-items: stretch; }
  .form-row, .meta-grid, .key-row { grid-template-columns: 1fr; }
  .storage-stepper { flex-direction: column; align-items: stretch; }
  .pay-row { grid-template-columns: 1fr auto; }
  .pay-row .pay-label { grid-column: 1 / -1; }
  .pay-confirm-row { flex-direction: column; }
  .storage-overview { flex-direction: column; align-items: stretch; text-align: center; }
  .storage-overview .storage-donut { margin: 0 auto; }
  .legend-row .legend-value { margin-left: 0.5rem; }
}

a.tab {
  display: grid;
  place-items: center;
  text-decoration: none;
}

a.dropdown-item {
  text-decoration: none;
  line-height: 2.1rem;
}

.dash-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.dash-nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.4rem 0.7rem;
  border-radius: 5px;
  font-weight: 500;
}

.dash-nav a.active,
.dash-nav a:hover {
  color: var(--ink);
  background: var(--panel-2);
}

.dash-nav a.active { color: var(--orange); }
