/* ═══════════════════════════════════════════════════════
   LANDING MANAGER — Design System
   Aesthetic: Refined Dark Luxury / Control Center
   ═══════════════════════════════════════════════════════ */

/* ── Tokens ─────────────────────────────────────────── */
:root {
  /* Canvas */
  --canvas:           #0a0a0f;
  --canvas-raised:    #101018;
  --surface-1:        #16161f;
  --surface-2:        #1e1e2b;
  --surface-3:        #262636;
  --surface-hover:    #2a2a3a;

  /* Gold accent — inherited from landing pages */
  --gold:             #d4a853;
  --gold-light:       #e8c675;
  --gold-dim:         #a07c30;
  --gold-glow:        rgba(212, 168, 83, 0.15);
  --gold-glow-strong: rgba(212, 168, 83, 0.3);

  /* Text */
  --text-1:           #f0ede6;
  --text-2:           #a8a5a0;
  --text-3:           #6b6966;
  --text-inverse:     #0a0a0f;

  /* Semantic */
  --success:          #34d399;
  --success-dim:      rgba(52, 211, 153, 0.15);
  --danger:           #f87171;
  --danger-dim:       rgba(248, 113, 113, 0.15);
  --warning:          #fbbf24;
  --info:             #60a5fa;

  /* Borders */
  --border:           rgba(255, 255, 255, 0.06);
  --border-hover:     rgba(255, 255, 255, 0.12);
  --border-gold:      rgba(212, 168, 83, 0.3);

  /* Spacing scale */
  --sp-1: 4px;   --sp-2: 8px;   --sp-3: 12px;
  --sp-4: 16px;  --sp-5: 20px;  --sp-6: 24px;
  --sp-8: 32px;  --sp-10: 40px; --sp-12: 48px;
  --sp-16: 64px;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Typography */
  --font-display: 'Bricolage Grotesque', system-ui, sans-serif;
  --font-body:    'Outfit', system-ui, sans-serif;

  --text-xs:  0.75rem;   --text-sm:  0.8125rem;
  --text-base: 0.9375rem; --text-md: 1rem;
  --text-lg:  1.125rem;  --text-xl: 1.375rem;
  --text-2xl: 1.75rem;   --text-3xl: 2.25rem;

  /* Shadows */
  --shadow-sm:  0 1px 2px rgba(0,0,0,0.3);
  --shadow-md:  0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg:  0 8px 32px rgba(0,0,0,0.5);
  --shadow-gold: 0 0 20px rgba(212,168,83,0.2);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --duration-fast: 150ms;
  --duration-normal: 250ms;
  --duration-slow: 400ms;

  /* Layout */
  --topbar-h: 56px;
  --sidebar-w: 260px;
  --content-max: 960px;
}

/* ── Reset ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text-1);
  background: var(--canvas);
  line-height: 1.5;
  min-height: 100dvh;
  overflow-x: hidden;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-light); }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
  font-size: inherit;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--sp-3) var(--sp-4);
  outline: none;
  transition: border-color var(--duration-fast);
  width: 100%;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--gold-dim);
  box-shadow: 0 0 0 3px var(--gold-glow);
}

textarea { resize: vertical; min-height: 80px; }

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23a8a5a0'%3E%3Cpath d='M2 4l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

::placeholder { color: var(--text-3); }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* ── Login Page ─────────────────────────────────────── */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: var(--sp-6);
  background:
    radial-gradient(ellipse at 30% 20%, rgba(212,168,83,0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(212,168,83,0.04) 0%, transparent 50%),
    var(--canvas);
}

.login-card {
  width: 100%;
  max-width: 380px;
  animation: loginEnter 0.6s var(--ease-out) both;
}

@keyframes loginEnter {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}

.login-brand {
  text-align: center;
  margin-bottom: var(--sp-10);
}

.login-brand svg {
  width: 48px;
  height: 48px;
  margin-bottom: var(--sp-4);
}

.login-brand h1 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.login-brand p {
  color: var(--text-3);
  font-size: var(--text-sm);
  margin-top: var(--sp-1);
}

.login-form {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-8);
}

.form-group {
  margin-bottom: var(--sp-5);
}

.form-group label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: var(--sp-2);
}

.login-error {
  background: var(--danger-dim);
  color: var(--danger);
  font-size: var(--text-sm);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-sm);
  margin-bottom: var(--sp-5);
  display: none;
}

.login-error.visible { display: block; }

.login-success {
  background: var(--success-dim);
  color: var(--success);
  font-size: var(--text-sm);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-sm);
  margin-bottom: var(--sp-5);
  display: none;
  align-items: center;
  gap: var(--sp-2);
}

.login-success svg { width: 18px; height: 18px; flex-shrink: 0; }
.login-success.visible { display: flex; }

.login-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--sp-3);
  margin-top: var(--sp-5);
}

.login-link {
  font-size: var(--text-sm);
  color: var(--gold);
  text-decoration: none;
  transition: color var(--duration-fast);
}

.login-link:hover { color: var(--gold-light); text-decoration: underline; }

.login-link-separator {
  color: var(--text-3);
  font-size: var(--text-xs);
}

.form-hint {
  background: var(--gold-glow);
  color: var(--gold-light);
  font-size: var(--text-sm);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-sm);
  margin-bottom: var(--sp-4);
  line-height: 1.5;
}

.user-badges {
  display: flex;
  gap: var(--sp-2);
  align-items: center;
  flex-wrap: wrap;
}

/* ── App Shell ──────────────────────────────────────── */
.app-shell {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

/* ── Topbar ─────────────────────────────────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--topbar-h);
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 var(--sp-4);
  gap: var(--sp-3);
}

.topbar-menu-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  transition: background var(--duration-fast);
}

.topbar-menu-btn:hover { background: var(--surface-2); }

.topbar-brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-md);
  letter-spacing: -0.02em;
  color: var(--text-1);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.topbar-brand svg { width: 24px; height: 24px; flex-shrink: 0; }

.topbar-spacer { flex: 1; }

.topbar-user {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--radius-full);
  background: var(--surface-2);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: background var(--duration-fast);
}

.topbar-user:hover { background: var(--surface-3); }

.topbar-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--gold-dim);
  color: var(--text-1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  font-weight: 600;
}

/* ── User Menu Dropdown ─────────────────────────────── */
.user-menu-wrapper { position: relative; }

.user-menu-dropdown {
  position: absolute;
  top: calc(100% + var(--sp-2));
  right: 0;
  min-width: 200px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--sp-1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: all var(--duration-fast);
  z-index: 200;
}

.user-menu-dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.user-menu-item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  width: 100%;
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--text-2);
  background: none;
  border: none;
  cursor: pointer;
  transition: all var(--duration-fast);
}

.user-menu-item svg { width: 16px; height: 16px; }
.user-menu-item:hover { background: var(--surface-2); color: var(--text-1); }
.user-menu-item-danger:hover { color: var(--danger); }
.user-menu-divider { height: 1px; background: var(--border); margin: var(--sp-1) 0; }

/* ── Sidebar ────────────────────────────────────────── */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-normal);
}

.sidebar-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  height: 100dvh;
  background: var(--canvas-raised);
  border-right: 1px solid var(--border);
  z-index: 201;
  transform: translateX(-100%);
  transition: transform var(--duration-normal) var(--ease-out);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.sidebar-overlay.open .sidebar {
  transform: translateX(0);
}

@media (min-width: 1024px) {
  .topbar-menu-btn { display: none; }

  .sidebar-overlay {
    position: static;
    opacity: 1;
    pointer-events: auto;
    background: none;
    z-index: auto;
    width: var(--sidebar-w);
    flex-shrink: 0;
  }

  .sidebar {
    position: sticky;
    top: 0;
    transform: none;
    height: 100dvh;
  }

  .app-body { display: flex; }
}

.sidebar-header {
  padding: var(--sp-5) var(--sp-5) var(--sp-4);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.sidebar-header svg { width: 28px; height: 28px; flex-shrink: 0; }

.sidebar-header h2 {
  font-family: var(--font-display);
  font-size: var(--text-md);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.sidebar-nav {
  padding: var(--sp-3);
  flex: 1;
}

.sidebar-section-label {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: var(--sp-4) var(--sp-3) var(--sp-2);
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-3);
  border-radius: var(--radius-md);
  color: var(--text-2);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: all var(--duration-fast);
}

.sidebar-link:hover {
  background: var(--surface-2);
  color: var(--text-1);
}

.sidebar-link.active {
  background: var(--gold-glow);
  color: var(--gold-light);
}

.sidebar-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.7;
}

.sidebar-link.active svg { opacity: 1; }

.sidebar-footer {
  padding: var(--sp-4);
  border-top: 1px solid var(--border);
}

/* ── Main Content ───────────────────────────────────── */
.main-content {
  flex: 1;
  min-width: 0;
  padding: var(--sp-6) var(--sp-4);
  max-width: 100%;
}

@media (min-width: 768px) {
  .main-content { padding: var(--sp-8) var(--sp-6); }
}

.page-header {
  margin-bottom: var(--sp-8);
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.page-header p {
  color: var(--text-2);
  font-size: var(--text-sm);
  margin-top: var(--sp-2);
}

.page-actions {
  display: flex;
  gap: var(--sp-3);
  margin-top: var(--sp-4);
  flex-wrap: wrap;
}

/* ── Breadcrumb ─────────────────────────────────────── */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--text-sm);
  color: var(--text-3);
  margin-bottom: var(--sp-4);
  flex-wrap: wrap;
}

.breadcrumb a { color: var(--text-2); }
.breadcrumb a:hover { color: var(--gold); }
.breadcrumb-sep { opacity: 0.4; }
.breadcrumb-current { color: var(--text-1); }

/* ── Buttons ────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  transition: all var(--duration-fast);
  white-space: nowrap;
  line-height: 1;
}

.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

.btn-primary {
  background: var(--gold);
  color: var(--text-inverse);
}

.btn-primary:hover {
  background: var(--gold-light);
  box-shadow: var(--shadow-gold);
}

.btn-primary:active { transform: scale(0.97); }

.btn-secondary {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-1);
}

.btn-secondary:hover {
  background: var(--surface-3);
  border-color: var(--border-hover);
}

.btn-danger {
  background: var(--danger-dim);
  color: var(--danger);
}

.btn-danger:hover { background: rgba(248, 113, 113, 0.25); }

.btn-ghost {
  color: var(--text-2);
  padding: var(--sp-2) var(--sp-3);
}

.btn-ghost:hover { color: var(--text-1); background: var(--surface-2); }

.btn-sm { padding: var(--sp-2) var(--sp-3); font-size: var(--text-xs); }
.btn-lg { padding: var(--sp-4) var(--sp-6); font-size: var(--text-base); }

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ── Cards / Panels ─────────────────────────────────── */
.card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}

.card:hover {
  border-color: var(--border-hover);
}

.card-interactive:hover {
  border-color: var(--border-gold);
  box-shadow: 0 0 0 1px var(--gold-glow);
  cursor: pointer;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-4);
}

.card-header h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  letter-spacing: -0.02em;
}

/* ── Data Grid ──────────────────────────────────────── */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
}

@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-4);
}

@media (min-width: 640px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
}

/* ── Site Card ──────────────────────────────────────── */
.site-card {
  padding: var(--sp-5);
}

.site-card-name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--sp-1);
}

.site-card-domain {
  font-size: var(--text-sm);
  color: var(--text-3);
  margin-bottom: var(--sp-4);
}

.site-card-stats {
  display: flex;
  gap: var(--sp-6);
  font-size: var(--text-sm);
}

.site-card-stat {
  display: flex;
  flex-direction: column;
}

.site-card-stat-value {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--gold);
}

.site-card-stat-label {
  color: var(--text-3);
  font-size: var(--text-xs);
}

.site-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--sp-4);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--border);
  font-size: var(--text-xs);
  color: var(--text-3);
}

/* ── Section Item ───────────────────────────────────── */
.section-item {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
}

.section-item-order {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-3);
  min-width: 28px;
  text-align: center;
}

.section-item-info { flex: 1; min-width: 0; }

.section-item-key {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-base);
}

.section-item-meta {
  display: flex;
  gap: var(--sp-3);
  font-size: var(--text-xs);
  color: var(--text-3);
  margin-top: var(--sp-1);
}

.section-item-actions {
  display: flex;
  gap: var(--sp-2);
}

/* ── Card Item (content card) ───────────────────────── */
.content-card {
  display: flex;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  align-items: flex-start;
}

.content-card-icon {
  font-size: 1.5rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  border-radius: var(--radius-md);
  flex-shrink: 0;
}

.content-card-info { flex: 1; min-width: 0; }

.content-card-title {
  font-weight: 500;
  font-size: var(--text-sm);
  margin-bottom: var(--sp-1);
}

.content-card-text {
  font-size: var(--text-xs);
  color: var(--text-3);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.content-card-toggle {
  flex-shrink: 0;
}

/* ── Toggle Switch ──────────────────────────────────── */
.toggle {
  position: relative;
  width: 40px;
  height: 22px;
  display: inline-block;
}

.toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.toggle-track {
  position: absolute;
  inset: 0;
  background: var(--surface-3);
  border-radius: var(--radius-full);
  transition: background var(--duration-fast);
  cursor: pointer;
}

.toggle-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: var(--text-2);
  border-radius: 50%;
  transition: all var(--duration-fast) var(--ease-out);
}

.toggle input:checked + .toggle-track {
  background: var(--gold-dim);
}

.toggle input:checked + .toggle-track::after {
  transform: translateX(18px);
  background: var(--gold-light);
}

/* ── Publish Button ─────────────────────────────────── */
.publish-btn {
  position: relative;
  overflow: hidden;
}

.publish-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transform: translateX(-100%);
  transition: none;
}

.publish-btn.publishing::after {
  animation: publishShine 1s ease infinite;
}

.publish-btn.published {
  background: var(--success);
}

@keyframes publishShine {
  to { transform: translateX(100%); }
}

/* ── Badge ──────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px var(--sp-2);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 500;
  line-height: 1.5;
}

.badge-gold  { background: var(--gold-glow); color: var(--gold-light); }
.badge-green { background: var(--success-dim); color: var(--success); }
.badge-red   { background: var(--danger-dim); color: var(--danger); }
.badge-muted { background: var(--surface-3); color: var(--text-3); }
.badge-pending { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }

/* ── Modal ──────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 300;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: modalOverlayIn 0.2s ease;
}

@media (min-width: 640px) {
  .modal-overlay { align-items: center; padding: var(--sp-6); }
}

@keyframes modalOverlayIn {
  from { opacity: 0; }
}

.modal {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  width: 100%;
  max-height: 90dvh;
  overflow-y: auto;
  animation: modalSlideUp 0.3s var(--ease-out);
}

@media (min-width: 640px) {
  .modal {
    max-width: 520px;
    border-radius: var(--radius-xl);
    animation: modalScaleIn 0.25s var(--ease-out);
  }
}

@keyframes modalSlideUp {
  from { transform: translateY(100%); }
}

@keyframes modalScaleIn {
  from { opacity: 0; transform: scale(0.95) translateY(10px); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-5) var(--sp-6);
  border-bottom: 1px solid var(--border);
}

.modal-header h2 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
}

.modal-body { padding: var(--sp-6); }

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--sp-3);
  padding: var(--sp-4) var(--sp-6);
  border-top: 1px solid var(--border);
}

/* ── Emoji Picker ───────────────────────────────────── */
.emoji-picker {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  width: 320px;
  max-height: 400px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
}

.emoji-picker-search {
  padding: var(--sp-3);
  border-bottom: 1px solid var(--border);
}

.emoji-picker-search input {
  background: var(--surface-2);
  border: none;
  border-radius: var(--radius-sm);
  padding: var(--sp-2) var(--sp-3);
  font-size: var(--text-sm);
}

.emoji-picker-categories {
  display: flex;
  gap: 0;
  padding: var(--sp-2) var(--sp-3);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}

.emoji-picker-categories::-webkit-scrollbar { display: none; }

.emoji-cat-btn {
  padding: var(--sp-1) var(--sp-2);
  border-radius: var(--radius-sm);
  font-size: 1.1rem;
  line-height: 1;
  flex-shrink: 0;
  transition: background var(--duration-fast);
}

.emoji-cat-btn:hover { background: var(--surface-2); }
.emoji-cat-btn.active { background: var(--gold-glow); }

.emoji-picker-grid {
  padding: var(--sp-3);
  overflow-y: auto;
  flex: 1;
}

.emoji-picker-grid-inner {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 2px;
}

.emoji-grid-item {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  font-size: 1.25rem;
  cursor: pointer;
  transition: all var(--duration-fast);
}

.emoji-grid-item:hover {
  background: var(--surface-hover);
  transform: scale(1.2);
}

.emoji-picker-label {
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: var(--sp-2) var(--sp-1);
  position: sticky;
  top: 0;
  background: var(--surface-1);
  grid-column: 1 / -1;
}

.emoji-selected-preview {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.emoji-selected-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-fast);
}

.emoji-selected-icon:hover {
  border-color: var(--gold-dim);
  background: var(--gold-glow);
}

/* ── Empty States ───────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: var(--sp-16) var(--sp-6);
  color: var(--text-3);
}

.empty-state-icon {
  font-size: 3rem;
  margin-bottom: var(--sp-4);
  opacity: 0.4;
}

.empty-state h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: var(--sp-2);
}

.empty-state p {
  font-size: var(--text-sm);
  max-width: 300px;
  margin: 0 auto var(--sp-6);
}

/* ── Toast / Notifications ──────────────────────────── */
.toast-container {
  position: fixed;
  bottom: var(--sp-6);
  right: var(--sp-4);
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  pointer-events: none;
}

.toast {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--sp-3) var(--sp-5);
  font-size: var(--text-sm);
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: toastIn 0.3s var(--ease-out);
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.toast.toast-out {
  animation: toastOut 0.2s ease forwards;
}

.toast-success { border-left: 3px solid var(--success); }
.toast-error   { border-left: 3px solid var(--danger); }
.toast-info    { border-left: 3px solid var(--info); }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px) scale(0.96); }
}

@keyframes toastOut {
  to { opacity: 0; transform: translateY(-10px) scale(0.96); }
}

/* ── Hosted Sites (WebHoster) ───────────────────────── */
.hosted-section {
  margin-top: var(--sp-8);
}

.hosted-section h2 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: var(--sp-4);
  color: var(--text-2);
}

.hosted-site {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
}

.hosted-site + .hosted-site { margin-top: var(--sp-2); }

.hosted-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.hosted-dot-active { background: var(--success); }
.hosted-dot-inactive { background: var(--text-3); }

.hosted-site-name { flex: 1; font-weight: 500; }

.hosted-badges {
  display: flex;
  gap: var(--sp-2);
}

/* ── User Manager ───────────────────────────────────── */
.user-row {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
}

.user-row + .user-row { border-top: 1px solid var(--border); }

.user-avatar-lg {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface-3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--gold);
  flex-shrink: 0;
}

.user-info { flex: 1; min-width: 0; }

.user-name { font-weight: 500; font-size: var(--text-sm); }

.user-email {
  font-size: var(--text-xs);
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Loading ────────────────────────────────────────── */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
}

/* ── Page transitions ───────────────────────────────── */
.page-enter {
  animation: pageIn 0.3s var(--ease-out);
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(8px); }
}

/* ── Utility ────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mt-auto { margin-top: auto; }
.text-gold { color: var(--gold); }
.text-muted { color: var(--text-3); }
.text-center { text-align: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-2 { gap: var(--sp-2); }
.gap-3 { gap: var(--sp-3); }
.gap-4 { gap: var(--sp-4); }
.mb-4 { margin-bottom: var(--sp-4); }
.mb-6 { margin-bottom: var(--sp-6); }
