/* ── RESET ── */
* { margin:0; padding:0; box-sizing:border-box; }

/* ── TOKENS ── */
:root {
  --bg: #050405;
  --surface: #121014;
  --surface-2: #1a161b;
  --surface-3: #241f22;
  --text: #f0ebe6;
  --text-secondary: #b0a89f;
  --accent: #b85c50;
  --accent-hover: #c9756a;
  --success: #58a873;
  --warning: #d4a843;
  --danger: #c45050;
  --border: rgba(240,235,230,0.08);
  --font-display: 'Playfair Display', 'Georgia', serif;
  --font-body: 'Inter', 'Helvetica Neue', Arial, sans-serif;
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ── APP SHELL ── */
.studio-app {
  display: flex;
  min-height: 100vh;
}

/* ── SIDEBAR ── */
.studio-sidebar {
  width: 240px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 28px 20px;
  position: fixed;
  top: 0; left: 0; bottom: 0;
}

.sidebar-header {
  margin-bottom: 32px;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text);
}

.tagline {
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-top: 4px;
}

.nav-list {
  list-style: none;
  flex: 1;
}

.nav-item {
  margin-bottom: 2px;
}

.nav-item a {
  display: block;
  padding: 10px 14px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 6px;
  font-size: 0.9rem;
  transition: all 0.15s;
}

.nav-item a:hover {
  background: var(--surface-2);
  color: var(--text);
}

.nav-item.active a {
  background: var(--surface-3);
  color: var(--accent);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.user-name {
  font-weight: 600;
  font-size: 0.9rem;
}

.user-role {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* logout button */
.btn-logout {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 8px 12px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-family: var(--font-body);
  cursor: pointer;
  transition: all 0.15s;
}

.btn-logout:hover {
  background: rgba(196,80,80,0.1);
  border-color: var(--danger);
  color: var(--danger);
}

/* Login page colour tokens */
:root {
  --color-bg: #0c0b1a;
  --color-elevated: #16161d;
  --color-text: #e6e1da;
  --color-muted: #6b6560;
  --color-accent: #b85c50;
}

/* ── MAIN ── */
.studio-main {
  flex: 1;
  margin-left: 240px;
  padding: 28px 36px;
  max-width: 1200px;
}

.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
}

.page-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 500;
}

.actions {
  display: flex;
  gap: 12px;
}

/* ── BUTTONS ── */
.btn {
  padding: 10px 20px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  font-family: var(--font-body);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

/* ── STATS ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px 22px;
}

.stat-number {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ── PANELS ── */
.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px 28px;
  margin-bottom: 20px;
}

.panel-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 16px;
}

/* ── TABLES ── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.data-table th {
  text-align: left;
  padding: 12px 14px;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
}

.data-table tr:last-child td {
  border-bottom: none;
}

/* ── BADGES ── */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.badge-platform_admin { background: var(--accent); color:#fff; }
.badge-editor { background: var(--warning); color:#000; }
.badge-active { background: var(--success); color:#fff; }
.badge-inactive { background: var(--danger); color:#fff; }
.badge-plan-pro { background: var(--accent); color:#fff; }
.badge-plan-standard { background: var(--surface-3); color: var(--text); }

/* ── TAGS ── */
.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 3px;
  background: var(--surface-3);
  font-size: 0.72rem;
  color: var(--text-secondary);
  margin-right: 4px;
}

/* ── CODE ── */
code {
  font-family: 'SF Mono', 'Monaco', monospace;
  font-size: 0.82rem;
  background: var(--surface-2);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-secondary);
}
