/* ===========================================================================
 * hosting.css — Hosting section: one-page-per-server control panel.
 * Loaded after dashboard.css; reuses its tokens (--db-border, ink colors).
 * =========================================================================== */

:root {
  --hp-line:   rgba(255,255,255,.10);
  --hp-line-2: rgba(255,255,255,.16);
  --hp-bg:     rgba(255,255,255,.02);
  --hp-bg-2:   rgba(255,255,255,.04);
  --hp-bg-hi:  rgba(255,255,255,.06);
  --hp-amber:  #e0b341;
  --hp-lime:   #c3ff00;
  --hp-red:    #ff6b6b;
  --hp-grey:   #888;
}

/* ---- List page (server cards) ---- */
.db-server-list { display: flex; flex-direction: column; gap: 10px; }

.db-server-card {
  display: grid;
  grid-template-columns: 14px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--hp-line);
  border-radius: 10px;
  background: var(--hp-bg);
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease, transform .06s ease;
}
.db-server-card:hover { background: var(--hp-bg-hi); border-color: var(--hp-line-2); }
.db-server-card:active { transform: scale(.998); }
.db-server-card[data-role="member"] { border-style: dashed; }

.db-server-card .meta { min-width: 0; }
.db-server-card .meta .title {
  font-weight: 600; font-size: 14px;
  display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap;
}
.db-server-card .meta .title .status-word { opacity: .8; font-weight: 400; }
.db-server-card .meta .title .pending {
  color: var(--hp-amber); font-weight: 500; opacity: .9;
}
.db-server-card .meta .sub {
  opacity: .7; font-size: 12px; margin-top: 3px;
  font-family: var(--font-mono, ui-monospace, "JetBrains Mono", monospace);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.db-server-card .right {
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
  justify-content: flex-end;
}
.db-server-card .mini-spark { width: 80px; height: 22px; opacity: .8; }
.db-server-card .mini-stat { font-size: 12px; opacity: .85; white-space: nowrap; }
.db-server-card .price { font-size: 12px; opacity: .85; font-variant-numeric: tabular-nums; }
.db-server-card .open-arrow {
  opacity: .55; font-size: 18px; line-height: 1; margin-left: 4px;
}
.db-server-card:hover .open-arrow { opacity: 1; }

.badge-status {
  display: inline-block; width: 10px; height: 10px; border-radius: 999px;
  background: var(--hp-grey);
  box-shadow: 0 0 0 2px rgba(255,255,255,.06);
}
.badge-status[data-status="running"]      { background: var(--hp-lime); box-shadow: 0 0 8px rgba(195,255,0,.45); }
.badge-status[data-status="stopped"]      { background: var(--hp-grey); }
.badge-status[data-status="error"]        { background: var(--hp-red);  box-shadow: 0 0 8px rgba(255,107,107,.45); }
.badge-status[data-status="requested"],
.badge-status[data-status="provisioning"],
.badge-status[data-status="destroying"],
.badge-status[data-status="pending"]      { background: var(--hp-amber); animation: hp-pulse 1.6s ease-in-out infinite; }
@keyframes hp-pulse { 0%,100% { opacity: 1 } 50% { opacity: .35 } }

.db-aggregate-burn {
  text-align: right; opacity: .8; font-size: 12px;
  margin: 10px 4px 0; font-variant-numeric: tabular-nums;
}

/* ---- Server detail (sub-nav + tab pane) ---- */
.db-detail-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding-bottom: 12px; margin-bottom: 14px;
  border-bottom: 1px dashed var(--hp-line);
}
.db-detail-head .back {
  background: none; border: 0; color: inherit; cursor: pointer;
  opacity: .7; font-size: 13px;
}
.db-detail-head .back:hover { opacity: 1; }
.db-detail-head .name { font-size: 20px; font-weight: 600; }
.db-detail-head .sub {
  opacity: .7; font-size: 12px;
  font-family: var(--font-mono, ui-monospace, "JetBrains Mono", monospace);
}

.db-server-detail {
  display: grid; grid-template-columns: 200px 1fr; gap: 18px; align-items: start;
}
.db-subnav {
  display: flex; flex-direction: column; gap: 2px;
  padding: 6px; border: 1px solid var(--hp-line); border-radius: 10px;
  background: var(--hp-bg);
  position: sticky; top: 16px;
}
.db-subnav-item {
  background: none; border: 0; color: inherit;
  text-align: left; padding: 8px 10px; border-radius: 6px;
  font-size: 13px; cursor: pointer; opacity: .85;
}
.db-subnav-item:hover { background: var(--hp-bg-hi); opacity: 1; }
.db-subnav-item.active {
  background: var(--hp-bg-hi); opacity: 1;
  box-shadow: inset 2px 0 0 var(--hp-lime);
}
.db-subnav-item .glyph { display: inline-block; width: 16px; opacity: .6; }

.db-tab-pane { min-width: 0; }
.db-tab-loading, .db-empty-tab {
  padding: 24px; text-align: center; opacity: .7; font-size: 13px;
}

/* ---- Quick actions row ---- */
.db-quick-actions {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 8px; margin-top: 10px;
}

/* ---- Activity event list ---- */
.db-event-list { display: flex; flex-direction: column; gap: 4px; }
.db-event-row {
  display: grid; grid-template-columns: 130px 1fr; gap: 10px;
  padding: 6px 8px; border-radius: 6px; font-size: 13px;
}
.db-event-row:hover { background: var(--hp-bg-hi); }
.db-event-row .when { opacity: .65; font-family: var(--font-mono, monospace); font-size: 12px; }
.db-event-row .what .action { font-weight: 500; }
.db-event-row .what .actor { opacity: .7; font-size: 12px; margin-left: 6px; }

/* ---- Tags / labels ---- */
.db-tag {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  background: rgba(195,255,0,.10); color: #d4ff63;
  font-size: 11px; line-height: 1.6;
  font-family: var(--font-mono, monospace);
  border: 1px solid rgba(195,255,0,.18);
  margin-right: 4px;
}
.db-tag[data-kind="shared"] {
  background: rgba(255,255,255,.06); color: #ccc;
  border-color: rgba(255,255,255,.14);
}

/* ---- Danger zone (Settings/Destroy) ---- */
.db-danger-zone {
  margin-top: 18px; padding: 14px;
  border: 1px solid rgba(255,107,107,.30); border-radius: 10px;
  background: rgba(255,107,107,.04);
}
.db-danger-zone .title { color: var(--hp-red); font-weight: 600; margin-bottom: 6px; }

/* ---- Sub-nav mobile (horizontal scroll) ---- */
@media (max-width: 900px) {
  .db-server-detail { grid-template-columns: 1fr; }
  .db-subnav {
    flex-direction: row; gap: 6px;
    overflow-x: auto; padding: 6px;
    position: static;
    scrollbar-width: none;
  }
  .db-subnav::-webkit-scrollbar { display: none; }
  .db-subnav-item { white-space: nowrap; flex: 0 0 auto; padding: 6px 10px; }
  .db-subnav-item.active { box-shadow: inset 0 -2px 0 var(--hp-lime); }
}

/* ---- Phase F4 — Notifications bell + dropdown (light-theme dashboard) ---- */
.db-notif { position: relative; }
.db-notif-btn {
  background: transparent; border: 1px solid var(--ink-line); color: var(--ink-mute);
  width: 32px; height: 32px; border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer; position: relative; padding: 0;
}
.db-notif-btn:hover { border-color: var(--ink-mute); color: var(--ink); }
.db-notif-bell { width: 18px; height: 18px; display: block; }
.db-notif-count {
  position: absolute; top: -6px; right: -6px;
  background: var(--hp-red, #ff6b6b); color: #fff;
  border-radius: 999px; min-width: 18px; height: 18px;
  font-size: 11px; line-height: 18px; padding: 0 5px;
  font-family: var(--font-sans, 'Geist', system-ui, sans-serif); font-weight: 600;
  box-shadow: 0 0 0 1px var(--canvas-paper, #fff);
}
.db-notif-dropdown {
  position: absolute; right: 0; top: calc(100% + 6px);
  width: 380px; max-height: 70vh; overflow: hidden;
  background: var(--canvas-paper); color: var(--ink);
  border: 1px solid var(--ink-line);
  border-radius: 10px; box-shadow: 0 12px 32px rgba(11,15,31,.18);
  z-index: 100; display: flex; flex-direction: column;
}
/* Re-assert hidden — the .db-notif-dropdown selector above sets
   `display: flex`, which has equal specificity to `[hidden]` and wins
   on source order, leaving the panel stuck open. */
.db-notif-dropdown[hidden] { display: none !important; }
.db-notif-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-bottom: 1px solid var(--ink-line);
}
.db-notif-head-actions { display: flex; align-items: center; gap: 6px; }
.db-notif-close {
  appearance: none; background: transparent; border: 0;
  color: var(--ink-mute);
  font-size: 18px; line-height: 1; padding: 4px 8px;
  border-radius: 5px;
  cursor: pointer;
}
.db-notif-close:hover { background: rgba(11,15,31,.06); color: var(--ink); }
.db-notif-list { overflow-y: auto; flex: 1 1 auto; }
.db-notif-item {
  padding: 10px 12px; border-bottom: 1px dashed var(--ink-line);
  cursor: pointer;
}
.db-notif-item:hover { background: rgba(11,15,31,.04); }
.db-notif-item.unread { background: rgba(199,248,72,.12); }
.db-notif-item.unread .db-notif-item-title { font-weight: 600; }
.db-notif-item-title { font-size: 13px; color: var(--ink); }
.db-notif-item-body { font-size: 12px; color: var(--ink-mute); margin-top: 2px; }
.db-notif-item-meta { font-size: 11px; color: var(--ink-mute); opacity: .8; margin-top: 4px; }
.db-notif-foot {
  padding: 8px 12px; border-top: 1px solid var(--ink-line);
  text-align: center;
}
@media (max-width: 700px) {
  .db-notif-dropdown { width: 92vw; right: -12px; }
}

/* ── Deploy wizard (round 3) ───────────────────────────────────────────── */
.hz-steps { display:flex; align-items:center; gap:6px; margin:0 0 16px; flex-wrap:wrap; }
.hz-step { display:flex; align-items:center; gap:8px; opacity:.5; }
.hz-step.active, .hz-step.done { opacity:1; }
.hz-dot {
  width:24px; height:24px; border-radius:999px; display:grid; place-items:center;
  font-family:var(--font-mono); font-size:12px; font-weight:600;
  background:var(--ink-soft, #1f1f1f); color:var(--ink-mute); border:1px solid var(--ink-line);
}
.hz-step.active .hz-dot { background:var(--lime, #C7F848); color:var(--ink, #0B0F1F); border-color:var(--lime, #C7F848); }
.hz-step.done .hz-dot { background:transparent; color:var(--lime-deep, #7a9a00); border-color:var(--lime-deep, #7a9a00); }
.hz-label { font-family:var(--font-mono); font-size:12px; }
.hz-sep { flex:1 1 18px; height:1px; min-width:14px; background:var(--ink-line); }

.hz-nav { display:flex; justify-content:space-between; align-items:center; margin-top:16px; gap:10px; }

.hz-plans { display:grid; grid-template-columns:repeat(auto-fit, minmax(180px,1fr)); gap:12px; margin-top:4px; }
.hz-plan {
  text-align:left; cursor:pointer; padding:16px; border-radius:12px;
  background:var(--canvas-paper, #fff); border:1px solid var(--ink-line);
  transition:border-color .2s, transform .2s, box-shadow .2s;
}
.hz-plan:hover { transform:translateY(-2px); border-color:var(--ink); }
.hz-plan.sel { border-color:var(--lime, #C7F848); box-shadow:inset 0 0 0 1.5px var(--lime, #C7F848); }
.hz-plan-name { font-family:var(--font-display, "Pixelify Sans"); font-size:17px; }
.hz-plan-price { font-family:var(--font-display, "Pixelify Sans"); font-size:26px; line-height:1; margin:4px 0; }
.hz-plan-price span { font-family:var(--font-mono); font-size:12px; color:var(--ink-mute); }
.hz-plan-specs { list-style:none; margin:6px 0 0; padding:0; display:flex; flex-direction:column; gap:3px; }
.hz-plan-specs li { font-family:var(--font-mono); font-size:12px; color:var(--ink-soft, #41465a); }

.hz-summary { display:flex; flex-direction:column; gap:6px; font-family:var(--font-mono); font-size:13px; margin:6px 0 14px; }
.hz-summary > div { display:flex; justify-content:space-between; gap:12px; }
.hz-summary .hz-due { border-top:1px solid var(--ink-line); padding-top:6px; margin-top:2px; }
.hz-fundbox { padding:12px; border:1px solid var(--signal-danger); margin:12px 0; }

/* Prominent wallet bar on the hosting list */
.hz-wallet-bar { border-left:4px solid var(--lime, #C7F848); }
