body.dash-page {
  background: var(--ink, #05060b);
  font-family: var(--sans, "Outfit", system-ui, sans-serif);
  color: var(--pearl, #f3f1ec);
}

body.dash-page::before {
  background:
    radial-gradient(800px 420px at 0% 0%, rgba(212, 184, 150, 0.08), transparent 55%),
    radial-gradient(640px 420px at 100% 0%, rgba(72, 86, 180, 0.14), transparent 52%),
    radial-gradient(900px 480px at 50% 110%, rgba(28, 36, 80, 0.2), transparent 58%);
}

.dash-boot {
  min-height: 100vh;
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--mute, #c5c2bb);
  padding: 2rem;
  position: relative;
  z-index: 2;
  font-family: var(--sans, "Outfit", system-ui, sans-serif);
  font-size: 1.05rem;
}

.dash-root {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 250px 1fr;
  position: relative;
  z-index: 2;
}

.dash-sidebar {
  background: rgba(12, 14, 22, 0.72);
  backdrop-filter: blur(28px) saturate(140%);
  -webkit-backdrop-filter: blur(28px) saturate(140%);
  border-right: 1px solid var(--line, rgba(212, 184, 150, 0.18));
  display: flex;
  flex-direction: column;
  padding: 1.35rem 0.85rem;
}

.dash-sidebar .logo {
  padding: 0 0.65rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 500;
  color: var(--pearl);
  text-decoration: none;
  letter-spacing: 0.04em;
}

.logo-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #000;
  color: #1a1612;
  display: grid;
  place-items: center;
  font-size: 0.78rem;
  font-weight: 600;
  overflow: hidden;
}

.btn-new-app {
  margin: 0 0.45rem 0.9rem;
  width: calc(100% - 0.9rem);
  padding: 0.5rem 0.7rem;
  border-radius: 12px;
  border: 1px dashed var(--line, rgba(212, 184, 150, 0.16));
  background: transparent;
  color: var(--gold, #d4b896);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}
.btn-new-app:hover { background: rgba(212, 184, 150, 0.08); }

.lang-tabs { display: flex; gap: 0.4rem; flex-wrap: wrap; }
pre.snippet {
  margin: 0;
  padding: 1rem 1.2rem;
  white-space: pre-wrap;
  color: var(--gold, #d4b896);
  font-size: 0.85rem;
  overflow: auto;
}

.dash-sidebar .logo-img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: contain;
  background: #000;
}

.dash-app-select {
  margin: 0 0.45rem 0.45rem;
  padding: 0.6rem 0.7rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
  color: var(--pearl);
  width: calc(100% - 0.9rem);
  font: inherit;
  font-size: 0.85rem;
}

.dash-nav { flex: 1; overflow-y: auto; }

.dash-nav button {
  display: flex;
  align-items: center;
  width: 100%;
  text-align: left;
  padding: 0.58rem 0.85rem;
  border: none;
  background: transparent;
  color: var(--mute);
  font: inherit;
  font-size: 0.88rem;
  border-radius: 11px;
  cursor: pointer;
  margin-bottom: 2px;
}

.dash-nav button:hover { background: rgba(255, 255, 255, 0.04); color: var(--pearl); }
.dash-nav button.active {
  background: rgba(212, 184, 150, 0.14);
  color: var(--gold);
}

.dash-nav button.locked {
  opacity: 0.78;
}

.dash-nav .nav-lock {
  margin-left: auto;
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
}

.plan-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  margin: 0 0.45rem 0.9rem;
  padding: 0.42rem 0.5rem 0.42rem 0.7rem;
  border-radius: 12px;
  border: 1px solid var(--line, rgba(212, 184, 150, 0.18));
  background: rgba(0, 0, 0, 0.3);
}

.plan-chip-name {
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold, #d4b896);
}

.btn-upgrade {
  border: none;
  border-radius: 9px;
  padding: 0.32rem 0.58rem;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--gold, #d4b896);
  color: #1a1612;
}

.plan-chip.plan-enterprise .btn-upgrade {
  background: transparent;
  color: var(--gold, #d4b896);
  border: 1px solid var(--line, rgba(212, 184, 150, 0.18));
}

.plan-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 0 0 1.25rem;
  padding: 0.95rem 1.15rem;
  border-radius: 16px;
  border: 1px solid var(--line, rgba(212, 184, 150, 0.18));
  background: rgba(12, 14, 22, 0.55);
}

.plan-banner span {
  display: block;
  color: var(--mute, #c5c2bb);
  font-size: 0.86rem;
  margin-top: 0.18rem;
}

.plan-lock {
  padding: 1.25rem 1.4rem 1.45rem;
  max-width: 34rem;
}

.btn-sm.locked { opacity: 0.72; }

.dash-billing.pricing-grid {
  margin-top: 1.35rem;
}

.price-card.wanted {
  box-shadow: 0 0 0 1px rgba(212, 184, 150, 0.45);
}

.dash-foot {
  padding: 0.85rem 0.7rem 0.4rem;
  font-size: 0.72rem;
  color: var(--mute);
  border-top: 1px solid var(--line);
  word-break: break-all;
}

.dash-foot a { color: var(--gold); }

.dash-main {
  padding: 2rem 2.2rem 3rem;
  overflow: auto;
  max-height: 100vh;
}

.dash-main:has(.docs-frame) {
  padding: 0;
  overflow: hidden;
}

.docs-frame {
  width: 100%;
  height: 100vh;
  border: 0;
  background: transparent;
}

button.text-link {
  background: none;
  border: none;
  padding: 0;
  color: var(--gold);
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.dash-title {
  font-family: var(--sans);
  font-size: 1.85rem;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 0.3rem;
}

.dash-sub {
  color: var(--mute);
  font-size: 0.95rem;
  margin-bottom: 1.6rem;
  font-weight: 400;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  margin-bottom: 1.6rem;
}

.stat-card {
  background: var(--glass, rgba(12, 14, 22, 0.62));
  backdrop-filter: blur(18px);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.15rem 1.2rem;
}

.stat-card .val {
  font-family: var(--sans);
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.stat-card .lbl {
  font-size: 0.68rem;
  color: var(--mute);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.panel {
  background: var(--glass, rgba(12, 14, 22, 0.62));
  backdrop-filter: blur(22px);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 24px 60px rgba(0, 0, 0, 0.25);
}

.panel-head {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 1rem 1.2rem;
  border-bottom: 1px solid var(--line);
  gap: 0.75rem;
}

.panel-head h2 {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.toolbar, .inline-form {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.inline-form { padding: 1rem 1.2rem; }

.toolbar input, .toolbar select, .inline-form input,
.settings-form input:not([type="checkbox"]) {
  padding: 0.5rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
  color: var(--pearl);
  font: inherit;
  font-size: 0.85rem;
}

.dash-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

.dash-table th, .dash-table td {
  padding: 0.8rem 1.1rem;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.dash-table th {
  color: var(--mute);
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.68rem;
  background: rgba(0, 0, 0, 0.2);
}

.dash-table tr:hover td { background: rgba(212, 184, 150, 0.04); }

.btn-sm {
  padding: 0.38rem 0.72rem;
  font-size: 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--pearl);
  cursor: pointer;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.btn-sm.danger { border-color: rgba(232, 160, 160, 0.35); color: var(--danger); }
.btn-sm.primary {
  background: linear-gradient(180deg, #ead9c0, #b89262);
  border-color: transparent;
  color: #1a1612;
}

.alert-once {
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  background: rgba(157, 203, 154, 0.1);
  border: 1px solid rgba(157, 203, 154, 0.3);
  font-family: ui-monospace, monospace;
  font-size: 0.78rem;
  word-break: break-all;
}

.alert-error {
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  background: rgba(232, 160, 160, 0.1);
  border: 1px solid rgba(232, 160, 160, 0.3);
  color: var(--danger);
  font-size: 0.88rem;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.app-tile {
  background: var(--glass, rgba(12, 14, 22, 0.62));
  backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1.3rem;
  cursor: pointer;
  color: var(--pearl);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font: inherit;
}

.app-tile:hover { border-color: rgba(212, 184, 150, 0.45); }

.app-tile span { font-size: 0.75rem; color: var(--mute); }

.quick-actions {
  padding: 1rem 1.2rem;
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.row-actions { white-space: nowrap; }

.chk {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--mute);
}

.settings-form {
  padding: 1.3rem;
  display: grid;
  gap: 0.9rem;
  max-width: 480px;
}

.settings-form input:not([type="checkbox"]) { width: 100%; margin-top: 0.3rem; }

.gen-card {
  padding: 1.35rem 1.4rem 1.2rem;
}

.gen-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem 1rem;
  margin-bottom: 1.1rem;
}

.gen-grid label,
.gen-mask {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
}

.gen-grid input,
.gen-grid select {
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
  color: var(--pearl);
  font: inherit;
  font-size: 0.9rem;
  letter-spacing: 0;
  text-transform: none;
}

.gen-mask { grid-column: 1 / -1; }

.gen-mask .hint {
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--mute);
  margin-left: 0.4rem;
}

.gen-mask input {
  font-family: ui-monospace, monospace;
  letter-spacing: 0.08em;
  color: var(--gold);
}

.mask-presets { display: flex; gap: 0.4rem; flex-wrap: wrap; }

.lic-preview {
  font-size: 0.8rem;
  color: var(--mute);
  margin: 0 0 1rem;
}

.lic-preview code {
  color: var(--gold);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
}

.minted-keys pre {
  margin: 0.75rem 0 0;
  white-space: pre-wrap;
  color: var(--gold);
  font-size: 0.85rem;
}

.minted-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.hash-cell {
  max-width: 148px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.owner-box {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  color: var(--mute);
}

.owner-box code {
  color: var(--gold);
}

.panel-head .toolbar {
  margin-left: 0;
  width: 100%;
}

.file-upload {
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid var(--line);
}

.hash-cell {
  max-width: 22rem;
}

.hash-cell code {
  display: block;
  word-break: break-all;
  white-space: pre-wrap;
  color: var(--pearl);
  font-size: 0.7rem;
  line-height: 1.35;
}

.files-table .row-actions,
td.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.gen-sections {
  display: grid;
  grid-template-columns: 0.7fr 1.15fr 1.15fr;
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.gen-section {
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.2);
}

.gen-section h3 {
  margin: 0 0 0.7rem;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
  font-weight: 500;
}

.gen-format {
  margin-bottom: 1rem;
}

.gen-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.gen-section label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
}

.gen-section input,
.gen-section select,
.duration-row input,
.duration-row select,
.time-modal-card input,
.time-modal-card select {
  padding: 0.55rem 0.7rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
  color: var(--pearl);
  font: inherit;
  font-size: 0.9rem;
  letter-spacing: 0;
  text-transform: none;
}

.duration-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.duration-row input {
  flex: 1;
  min-width: 0;
}

.duration-row select {
  width: 8.6rem;
  flex: 0 0 8.6rem;
}

.gen-section .hint {
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  text-transform: none;
  color: var(--mute);
  margin-left: 0.35rem;
}

#lic-search {
  min-width: 220px;
  flex: 1;
}

.used-cell {
  min-width: 12rem;
}

.used-cell strong {
  display: block;
  margin-bottom: 0.3rem;
}

.seat-meta {
  display: flex;
  gap: 0.4rem;
  align-items: baseline;
  font-size: 0.72rem;
  color: var(--mute);
  margin-top: 0.18rem;
}

.seat-meta span {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  flex: 0 0 auto;
}

.seat-meta code {
  color: var(--pearl);
  word-break: break-all;
  font-size: 0.72rem;
}

.time-modal {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 12, 0.68);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: grid;
  place-items: center;
  z-index: 50;
  padding: 1rem;
}

.time-modal[hidden] {
  display: none !important;
}

.time-modal-backdrop {
  position: absolute;
  inset: 0;
}

.time-modal-card {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  background: rgba(12, 14, 22, 0.82);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 1.4rem 1.4rem 1.25rem;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.05) inset,
    0 30px 80px rgba(0, 0, 0, 0.5);
}

.time-modal-card h3 {
  margin: 0 0 0.3rem;
  font-family: var(--sans);
  font-weight: 600;
}

.time-modal-card .duration-row {
  margin-top: 0.85rem;
}

.time-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1.1rem;
}

@media (max-width: 900px) {
  .gen-grid { grid-template-columns: 1fr 1fr; }
  .gen-sections { grid-template-columns: 1fr; }
  .gen-pair { grid-template-columns: 1fr; }
}
