/* ===========================================================
   DILMAN Accounts — hub landing page
   Separate from auth.css (login/register keep their own look).
=========================================================== */

:root {
  --ink: #0b0e15;
  --panel: #141824;
  --panel-2: #1b2130;
  --panel-3: #1f2436;
  --line: #262d40;
  --line-soft: rgba(255, 255, 255, 0.06);
  --paper: #eeeae2;
  --muted: #8991a6;
  --muted-2: #626b80;
  --violet: #8b5cf6;
  --violet-deep: #5B21B6;
  --mint: #43d9a3;
  --amber: #e2a53a;
  --red: #ef6461;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.hub {
  min-height: 100vh;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(238, 234, 226, 0.05) 1px, transparent 0);
  background-size: 26px 26px;
  background-attachment: fixed;
}

a { color: inherit; }

.hub-shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 24px 72px;
}

/* Top bar ------------------------------------------------- */
.hub-topbar {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 28px;
}

.hub-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.01em;
  color: var(--paper);
}

.hub-brand-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--violet), var(--violet-deep));
  color: #fff;
  font-weight: 800;
  font-size: 13px;
}

.hub-brand-icon.hub-brand-logo {
  background: none;
  box-shadow: none;
  object-fit: contain;
}

.hub-topbar-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--muted-2);
}

/* Body: rail + main --------------------------------------- */
.hub-body {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 28px;
  align-items: start;
}

/* Identity / security rail --------------------------------- */
.hub-rail {
  position: sticky;
  top: 28px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 24px;
}

.hub-id-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.hub-avatar {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 19px;
  color: #fff;
  background: linear-gradient(135deg, var(--violet), var(--violet-deep));
  overflow: hidden;
}

.hub-avatar img { width: 100%; height: 100%; object-fit: cover; }

.hub-avatar.is-guest {
  background: var(--panel-2);
  color: var(--muted);
  font-size: 17px;
}

.hub-id-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 17px;
  font-weight: 700;
  margin: 0 0 5px;
  line-height: 1.2;
}

.hub-pills { display: flex; gap: 6px; flex-wrap: wrap; }

.hub-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  text-transform: capitalize;
}

.hub-pill.is-plan { color: var(--violet); border-color: rgba(139, 92, 246, 0.35); background: rgba(139, 92, 246, 0.08); }
.hub-pill.is-staff { color: var(--mint); border-color: rgba(67, 217, 163, 0.35); background: rgba(67, 217, 163, 0.08); }

.hub-guest-copy {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
  margin: 0 0 18px;
}

.hub-guest-copy strong { color: var(--paper); }

/* Security checklist ----------------------------------------- */
.hub-checklist {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line-soft);
  margin-top: 4px;
  padding-top: 14px;
  gap: 12px;
}

.hub-check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
}

.hub-check-dot {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 1px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
}

.hub-check-dot.is-good { background: rgba(67, 217, 163, 0.15); color: var(--mint); }
.hub-check-dot.is-warn { background: rgba(226, 165, 58, 0.15); color: var(--amber); }

.hub-check-body { flex: 1; min-width: 0; }
.hub-check-label { color: var(--paper); font-weight: 500; }
.hub-check-detail { display: block; color: var(--muted-2); font-size: 12px; margin-top: 1px; font-family: 'JetBrains Mono', monospace; }

.hub-check-action { color: var(--violet); font-weight: 600; text-decoration: none; }
.hub-check-action:hover { text-decoration: underline; }

.hub-rail-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}

.hub-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  font-family: inherit;
}

.hub-btn-primary {
  background: linear-gradient(135deg, var(--violet), var(--violet-deep));
  color: #fff;
  width: 100%;
}
.hub-btn-primary:hover { filter: brightness(1.08); }

.hub-btn-ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--paper);
}
.hub-btn-ghost:hover { background: var(--panel-2); }

.hub-link-muted {
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
}
.hub-link-muted:hover { color: var(--paper); }

.hub-rail-note {
  margin-top: 14px;
  font-size: 12px;
  text-align: center;
  color: var(--muted-2);
}
.hub-rail-note a { color: var(--violet); font-weight: 600; text-decoration: none; }
.hub-rail-note a:hover { text-decoration: underline; }

/* Main column ------------------------------------------------ */
.hub-main { min-width: 0; }

.hub-main-intro {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 700;
  margin: 4px 0 4px;
}

.hub-main-sub {
  margin: 0 0 22px;
  font-size: 13.5px;
  color: var(--muted);
}

/* Featured tile ------------------------------------------- */
.hub-feature {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  background: linear-gradient(145deg, var(--panel-3), var(--panel));
  border: 1px solid rgba(139, 92, 246, 0.28);
  border-radius: 18px;
  padding: 26px 28px;
  margin-bottom: 30px;
  text-decoration: none;
  color: var(--paper);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.hub-feature:hover { border-color: rgba(139, 92, 246, 0.55); transform: translateY(-1px); }

.hub-feature-left { display: flex; align-items: center; gap: 18px; }

.hub-feature-icon {
  width: 54px;
  height: 54px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(139, 92, 246, 0.14);
  color: var(--violet);
  font-size: 22px;
}

.hub-feature h2 {
  margin: 0 0 4px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 19px;
  font-weight: 700;
}

.hub-feature p { margin: 0; font-size: 13px; color: var(--muted); max-width: 46ch; }

.hub-feature.is-locked { opacity: 0.6; }
.hub-feature.is-locked:hover { transform: none; border-color: rgba(139, 92, 246, 0.28); }

/* Tool groups ------------------------------------------------ */
.hub-group { margin-bottom: 30px; }

.hub-group-head {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--paper);
  margin: 0 0 12px;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}

.hub-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  text-decoration: none;
  color: var(--paper);
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.hub-tile:hover {
  border-color: rgba(139, 92, 246, 0.4);
  background: var(--panel-2);
  transform: translateY(-2px);
}

.hub-tile.is-locked { opacity: 0.55; }
.hub-tile.is-locked:hover { transform: none; border-color: var(--line); background: var(--panel); }

.hub-tile-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 12px; }

.hub-tile-icon {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: var(--panel-2);
  color: var(--violet);
  font-size: 14px;
}

.hub-tile.is-locked .hub-tile-icon { color: var(--muted); }

.hub-tile-lock { color: var(--muted-2); font-size: 12px; }

.hub-tile-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  color: var(--muted-2);
}

.hub-tile h3 {
  margin: 0 0 5px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14.5px;
  font-weight: 600;
}

.hub-tile p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
}

/* Footer ------------------------------------------------- */
.hub-footer {
  margin-top: 8px;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
  font-size: 13px;
  color: var(--muted-2);
}

.hub-footer a { color: var(--muted); text-decoration: none; font-weight: 600; }
.hub-footer a:hover { color: var(--paper); }

/* Responsive ------------------------------------------------ */
@media (max-width: 860px) {
  .hub-body { grid-template-columns: 1fr; }
  .hub-rail { position: static; }
}

@media (max-width: 560px) {
  .hub-feature { flex-direction: column; align-items: flex-start; }
  .hub-feature .hub-btn { width: 100%; }
  .hub-rail-actions { flex-direction: column; align-items: stretch; }
  .hub-rail-actions .hub-link-muted { text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .hub-tile, .hub-feature { transition: none; }
}
