/* === Reset & Base === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #111;
  --bg-card: #161616;
  --bg-hover: #1a1a1a;
  --border: #222;
  --text-primary: #e0e0e0;
  --text-secondary: #888;
  --text-muted: #555;
  --accent: #ff1a1a;
  --accent-hover: #cc0000;
  --accent-dim: rgba(255, 26, 26, 0.1);
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius: 8px;
  --radius-sm: 4px;
  --font-mono: 'Courier New', Consolas, monospace;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent-hover);
}

code {
  font-family: var(--font-mono);
  background: var(--bg-hover);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-size: 0.9em;
  color: var(--accent);
}

pre {
  font-family: var(--font-mono);
  background: var(--bg-card);
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow-x: auto;
}

pre code {
  background: none;
  padding: 0;
  color: var(--text-primary);
}

/* === Container === */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* === App Layout === */
.app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.main-content {
  flex: 1;
}

/* === Header === */
.header {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
  font-size: 1.25rem;
  font-weight: 700;
}

.logo:hover {
  color: var(--text-primary);
}

.logo-icon {
  color: var(--accent);
  font-size: 1.5rem;
}

.accent {
  color: var(--accent);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-link {
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--text-primary);
}

.btn-signup {
  background: var(--accent);
  color: #fff;
  padding: 0.4rem 1rem;
  border-radius: var(--radius);
  font-weight: 600;
}

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

.btn-logout {
  color: var(--text-muted);
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 8px;
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--border);
}

.user-name {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* === Footer === */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 2rem 0;
  margin-top: auto;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-link {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-copy {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* === Buttons === */
.btn {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
  text-align: center;
}

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

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

.btn-secondary {
  background: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.btn-lg {
  padding: 0.8rem 2rem;
  font-size: 1rem;
}

.btn-sm {
  padding: 0.4rem 1rem;
  font-size: 0.8rem;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: background 0.2s;
}

.btn-icon:hover {
  background: var(--bg-hover);
}

/* === Hero === */
.hero {
  padding: 6rem 0 4rem;
  text-align: center;
}

.hero-badge {
  display: inline-block;
  background: var(--accent-dim);
  color: var(--accent);
  padding: 0.3rem 1rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255, 26, 26, 0.2);
}

.hero-title {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 3rem;
}

.hero-code {
  max-width: 700px;
  margin: 0 auto;
}

.hero-code pre {
  text-align: left;
  font-size: 0.9rem;
}

/* === Features === */
.features {
  padding: 4rem 0;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 3rem;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 3rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.2s, transform 0.2s;
}

.feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* === CTA Section === */
.cta-section {
  padding: 5rem 0;
  text-align: center;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.cta-section h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.cta-section p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

/* === Auth Pages === */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem 1.5rem;
  min-height: calc(100vh - 60px - 80px);
}

.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-header .logo-icon {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.5rem;
}

.auth-header h1 {
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.auth-header p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.auth-providers {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.btn-provider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-hover);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-provider:hover {
  background: var(--bg-primary);
  border-color: var(--accent);
  color: var(--text-primary);
}

.btn-provider.google:hover { border-color: #4285f4; }
.btn-provider.discord:hover { border-color: #5865f2; }
.btn-provider.github:hover { border-color: #333; }

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* === Pricing === */
.pricing-page {
  padding: 4rem 0;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  position: relative;
  transition: border-color 0.2s;
}

.pricing-card:hover {
  border-color: var(--accent);
}

.pricing-card.featured {
  border-color: var(--accent);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: #fff;
  padding: 0.25rem 1rem;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
}

.pricing-header {
  margin-bottom: 1.5rem;
}

.pricing-header h3 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.pricing-price {
  margin: 1rem 0;
}

.price {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent);
}

.period {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.pricing-features {
  list-style: none;
  margin-bottom: 1.5rem;
}

.pricing-features li {
  padding: 0.5rem 0;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.pricing-notice {
  text-align: center;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-muted);
}

/* === Dashboard === */
.dashboard-layout {
  display: flex;
  min-height: calc(100vh - 60px);
}

.sidebar {
  width: 240px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  padding: 1.5rem;
  flex-shrink: 0;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.sidebar-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--border);
}

.sidebar-user-info {
  display: flex;
  flex-direction: column;
}

.sidebar-username {
  font-size: 0.9rem;
  font-weight: 600;
}

.sidebar-tier {
  font-size: 0.7rem;
  padding: 1px 6px;
  border-radius: 100px;
  display: inline-block;
  margin-top: 2px;
  width: fit-content;
}

.tier-basic { background: rgba(255,255,255,0.1); color: var(--text-secondary); }
.tier-premium { background: rgba(255, 26, 26, 0.15); color: var(--accent); }
.tier-enterprise { background: rgba(255, 215, 0, 0.15); color: #ffd700; }

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.7rem 0.8rem;
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: all 0.2s;
}

.sidebar-link:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.sidebar-link.active {
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 600;
}

.sidebar-icon {
  font-size: 1rem;
}

.dashboard-content {
  flex: 1;
  padding: 2rem;
  overflow-x: hidden;
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}

.dashboard-header h1 {
  font-size: 1.5rem;
}

/* === Stats Cards === */
.stats-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.stat-icon {
  font-size: 2rem;
}

.stat-info {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 1.5rem;
  font-weight: 700;
}

.stat-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* === Files Table === */
.files-table-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.files-table {
  width: 100%;
  border-collapse: collapse;
}

.files-table th {
  text-align: left;
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
}

.files-table td {
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
}

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

.files-table tr:hover td {
  background: var(--bg-hover);
}

.files-table tr.disabled-row td {
  opacity: 0.5;
}

.status-badge {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 100px;
  font-weight: 600;
}

.status-active {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
}

.status-disabled {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

.link-copy {
  display: flex;
  gap: 4px;
}

.link-input {
  flex: 1;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.5rem;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

.copy-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.3rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

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

/* === Upload === */
.upload-container {
  max-width: 700px;
}

.upload-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.tab-btn {
  flex: 1;
  background: none;
  border: none;
  color: var(--text-secondary);
  padding: 0.75rem;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all 0.2s;
}

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

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

.dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 3rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 1rem;
}

.dropzone:hover, .dropzone.dragover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.dropzone-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 0.5rem;
}

.dropzone-hint {
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

.file-input {
  display: none;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.form-input, .form-textarea {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.6rem 0.8rem;
  color: var(--text-primary);
  font-size: 0.9rem;
  transition: border-color 0.2s;
}

.form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-textarea {
  resize: vertical;
  font-family: var(--font-mono);
}

.upload-result {
  margin-top: 1rem;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.upload-result.success {
  border-color: var(--success);
}

.upload-result.error {
  border-color: var(--danger);
}

/* === Account === */
.account-settings {
  max-width: 600px;
}

.setting-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.setting-card h3 {
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.profile-preview {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.profile-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 3px solid var(--border);
}

.profile-info {
  display: flex;
  flex-direction: column;
}

.profile-name {
  font-size: 1.1rem;
  font-weight: 600;
}

.profile-email {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.providers-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.provider-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.8rem;
  background: var(--bg-hover);
  border-radius: var(--radius);
  font-size: 0.9rem;
}

.provider-item.linked .provider-status {
  color: var(--success);
}

.provider-status {
  color: var(--text-muted);
}

.form-result {
  margin-top: 1rem;
  padding: 0.5rem;
  border-radius: var(--radius);
  font-size: 0.85rem;
}

.form-result.success { background: rgba(34,197,94,0.1); color: var(--success); }
.form-result.error { background: rgba(239,68,68,0.1); color: var(--danger); }

/* === Billing === */
.billing-container {
  max-width: 700px;
}

.current-plan-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.plan-display {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}

.plan-name {
  font-size: 1.5rem;
  font-weight: 700;
}

.plan-files {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.plan-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.plan-option {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  text-align: center;
}

.plan-option.current {
  border-color: var(--accent);
}

.plan-option h4 {
  margin-bottom: 0.5rem;
}

.plan-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.plan-option p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.invoice-stub {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.empty-state {
  color: var(--text-muted);
  text-align: center;
  padding: 2rem;
}

/* === Live Chart === */
.live-chart-widget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 2rem;
  overflow: hidden;
}

.live-chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
}

.live-chart-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.live-chart-title h3 {
  font-size: 1rem;
}

.live-pill {
  background: rgba(34, 197, 94, 0.15);
  color: var(--success);
  padding: 2px 10px;
  border-radius: 100px;
  font-size: 0.75rem;
  font-weight: 700;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.live-update-note {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.chart-container {
  padding: 1rem;
}

.chart-container canvas {
  width: 100% !important;
  height: auto !important;
}

.chart-footer {
  display: flex;
  gap: 2rem;
  padding: 0.75rem 1.5rem;
  border-top: 1px solid var(--border);
}

.chart-stat {
  display: flex;
  flex-direction: column;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.stat-value {
  font-size: 1.1rem;
  font-weight: 700;
}

/* === Recent Activity === */
.recent-activity {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.recent-activity h2 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.activity-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-sm);
  background: var(--bg-hover);
  font-size: 0.85rem;
}

.activity-icon {
  font-size: 0.9rem;
}

.activity-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.activity-file {
  font-weight: 600;
}

.activity-time {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.activity-ip {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 0.8rem;
}

/* === Docs === */
.docs-page {
  padding: 3rem 0;
}

.docs-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 3rem;
}

.docs-sidebar {
  position: sticky;
  top: 80px;
  height: fit-content;
}

.docs-sidebar h3 {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.docs-sidebar ul {
  list-style: none;
}

.docs-sidebar li {
  margin-bottom: 0.5rem;
}

.docs-sidebar a {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.docs-sidebar a:hover {
  color: var(--accent);
}

.docs-content h1 {
  font-size: 2rem;
  margin-bottom: 2rem;
}

.docs-content section {
  margin-bottom: 2.5rem;
}

.docs-content h2 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.docs-content p, .docs-content li {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.docs-content ol, .docs-content ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.code-block {
  position: relative;
  margin: 1rem 0;
}

.code-block pre {
  padding-right: 80px;
}

.code-block .copy-btn {
  position: absolute;
  top: 8px;
  right: 8px;
}

.tier-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

.tier-table th, .tier-table td {
  padding: 0.6rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.tier-table th {
  background: var(--bg-secondary);
  color: var(--text-muted);
  font-size: 0.8rem;
  text-transform: uppercase;
}

/* === Admin === */
.admin-layout {
  display: flex;
  min-height: calc(100vh - 60px);
}

.admin-sidebar {
  width: 200px;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  padding: 1.5rem;
  flex-shrink: 0;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-link {
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius);
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: all 0.2s;
}

.admin-link:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.admin-link.active {
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 600;
}

.admin-content {
  flex: 1;
  padding: 2rem;
}

.admin-content h1 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.admin-content h2 {
  font-size: 1.2rem;
  margin: 2rem 0 1rem;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

.admin-table-container {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th {
  text-align: left;
  padding: 0.6rem 0.8rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
  white-space: nowrap;
}

.admin-table td {
  padding: 0.5rem 0.8rem;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.admin-table tr:hover td {
  background: var(--bg-hover);
}

.actions-cell {
  display: flex;
  gap: 4px;
  align-items: center;
}

.tier-select {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 0.2rem 0.4rem;
  font-size: 0.8rem;
}

.search-bar {
  margin-bottom: 1rem;
}

.search-bar form {
  display: flex;
  gap: 8px;
}

.search-input {
  flex: 1;
  max-width: 400px;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 1.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* === Error Page === */
.error-page {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 1.5rem;
  text-align: center;
}

.error-code {
  font-size: 6rem;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.error-page h2 {
  font-size: 2rem;
  margin: 1rem 0;
}

.error-page p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

/* === Responsive === */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .admin-stats { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
  .nav { display: none; }
  .menu-toggle { display: block; }
  .nav.open { display: flex; flex-direction: column; position: absolute; top: 60px; left: 0; right: 0; background: var(--bg-secondary); border-bottom: 1px solid var(--border); padding: 1rem; gap: 1rem; }

  .hero-title { font-size: 2rem; }
  .hero-cta { flex-direction: column; align-items: center; }

  .features-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .stats-cards { grid-template-columns: 1fr; }
  .plan-options { grid-template-columns: 1fr; }
  .admin-stats { grid-template-columns: repeat(2, 1fr); }

  .sidebar { display: none; }
  .dashboard-content { padding: 1rem; }
  .docs-layout { grid-template-columns: 1fr; }
  .docs-sidebar { display: none; }

  .footer-inner { flex-direction: column; gap: 1rem; text-align: center; }
}
