/* ═══════════════════════════════════════════════════════════════
   Syaahi iON — Master Stylesheet
   The Phygital Publishing House by iViRTH
   © iViRTH. All Rights Reserved.
   ═══════════════════════════════════════════════════════════════ */

/* ─── VARIABLES ─────────────────────────────────────────────── */
:root {
  --bg:         #0B0F19;
  --bg-surface: #111827;
  --bg-card:    #141B2D;
  --bg-hover:   #1a2240;
  --gold:       #D4AF37;
  --gold-dim:   #a8892a;
  --cyan:       #00FFCC;
  --cyan-dim:   #00ccaa;
  --text:       #EAEAEA;
  --text-muted: #9CA3AF;
  --text-ghost: #6B7280;
  --border:     rgba(255,255,255,0.08);
  --border-gold: rgba(212,175,55,0.3);
  --border-cyan: rgba(0,255,204,0.3);
  --glass:      rgba(255,255,255,0.04);
  --shadow:     0 8px 32px rgba(0,0,0,0.5);
  --radius:     8px;
  --font-serif: 'Cinzel', serif;
  --font-body:  'Crimson Pro', 'Georgia', serif;
  --font-ui:    'Inter', sans-serif;
  --font-mono:  'JetBrains Mono', monospace;
  --glow-gold:  0 0 20px rgba(212,175,55,0.3);
  --glow-cyan:  0 0 20px rgba(0,255,204,0.3);
}

/* ─── RESET & BASE ───────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; transition: color .2s; }
a:hover { color: var(--gold); }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: var(--font-ui); }
input, textarea, select { font-family: var(--font-ui); }

/* ─── TYPOGRAPHY ─────────────────────────────────────────────── */
h1, h2, h3 { font-family: var(--font-serif); line-height: 1.2; }
h1 { font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 700; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 600; }
h3 { font-size: clamp(1.1rem, 2vw, 1.4rem); font-weight: 600; }
p { line-height: 1.7; }
.text-gold { color: var(--gold); }
.text-cyan { color: var(--cyan); }
.text-muted { color: var(--text-muted); }
.font-mono { font-family: var(--font-mono); }
.font-serif { font-family: var(--font-body); }

/* ─── NAVIGATION ─────────────────────────────────────────────── */
.syaahi-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.5rem;
  background: rgba(11,15,25,0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.nav-brand .brand-logo {
  display: flex; align-items: center; gap: .6rem;
  font-family: var(--font-serif); font-size: 1.15rem; font-weight: 700;
  color: var(--text);
}
.nav-brand .brand-logo em {
  font-style: normal; color: var(--gold);
}
.nav-brand .brand-logo svg { flex-shrink: 0; }
.nav-links { display: flex; gap: .25rem; }
.nav-link {
  font-size: .85rem; font-weight: 500;
  padding: .45rem .9rem; border-radius: var(--radius);
  color: var(--text-muted); transition: all .2s;
}
.nav-link:hover, .nav-link.active {
  color: var(--text); background: var(--glass);
}
.nav-link.active { color: var(--gold); }
.nav-user { display: flex; align-items: center; gap: .75rem; position: relative; }
.tier-badge {
  font-family: var(--font-mono); font-size: .65rem; font-weight: 700;
  padding: 3px 8px; border-radius: 20px; text-transform: uppercase;
}
.tier-scribe  { background: rgba(107,114,128,.2); color: var(--text-muted); border: 1px solid rgba(107,114,128,.3); }
.tier-artisan { background: rgba(0,255,204,.1); color: var(--cyan); border: 1px solid var(--border-cyan); }
.tier-author  { background: rgba(212,175,55,.15); color: var(--gold); border: 1px solid var(--border-gold); }
.user-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  border: 2px solid var(--border-gold);
  overflow: hidden; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-card);
  font-family: var(--font-serif); font-weight: 700; font-size: .9rem;
  color: var(--gold);
  transition: border-color .2s;
}
.user-avatar:hover { border-color: var(--gold); }
.user-avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: 200px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  display: none; flex-direction: column; overflow: hidden;
}
.user-menu.open { display: flex; }
.user-menu-header { padding: .75rem 1rem; border-bottom: 1px solid var(--border); }
.user-menu-header strong { display: block; font-size: .9rem; margin-bottom: 2px; }
.user-menu-header small { color: var(--text-muted); font-size: .75rem; }
.user-menu a {
  padding: .6rem 1rem; font-size: .85rem;
  color: var(--text-muted); transition: all .15s;
}
.user-menu a:hover { background: var(--bg-hover); color: var(--text); }
.logout-link { color: #EF4444 !important; border-top: 1px solid var(--border); }
.nav-hamburger {
  display: none; flex-direction: column; gap: 4px;
  background: none; border: none; padding: .5rem;
}
.nav-hamburger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: .3s; }

/* ─── LAYOUT ─────────────────────────────────────────────────── */
.page-wrapper { padding-top: 64px; min-height: 100vh; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.container-sm { max-width: 800px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 3rem 0; }

/* ─── CARDS ─────────────────────────────────────────────────── */
.card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  transition: border-color .2s, transform .2s;
}
.card:hover { border-color: rgba(212,175,55,.25); }
.card-gold { border-color: var(--border-gold); }
.card-cyan { border-color: var(--border-cyan); }
.card-glow { box-shadow: var(--glow-gold); }

/* ─── BUTTONS ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .65rem 1.4rem; border-radius: var(--radius);
  font-size: .875rem; font-weight: 600; border: none;
  transition: all .2s; white-space: nowrap;
}
.btn-gold {
  background: var(--gold); color: #0B0F19;
}
.btn-gold:hover { background: #e8c23a; color: #0B0F19; box-shadow: var(--glow-gold); }
.btn-cyan {
  background: var(--cyan); color: #0B0F19;
}
.btn-cyan:hover { background: var(--cyan-dim); box-shadow: var(--glow-cyan); }
.btn-outline {
  background: transparent; color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }
.btn-ghost {
  background: var(--glass); color: var(--text-muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text); background: var(--bg-hover); }
.btn-danger { background: #DC2626; color: #fff; }
.btn-danger:hover { background: #B91C1C; }
.btn-full { width: 100%; }
.btn-sm { padding: .4rem 1rem; font-size: .8rem; }
.btn-lg { padding: .85rem 2rem; font-size: 1rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ─── FORMS ──────────────────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block; margin-bottom: .4rem;
  font-size: .8rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .5px;
  color: var(--gold);
}
.form-input {
  width: 100%; padding: .7rem .9rem;
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text); font-size: .9rem;
  transition: border-color .2s;
  -webkit-appearance: none;
}
.form-input:focus {
  outline: none; border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(0,255,204,.1);
}
.form-input::placeholder { color: var(--text-ghost); }
.form-input[type="file"] { cursor: pointer; }
textarea.form-input { resize: vertical; min-height: 120px; }
select.form-input { cursor: pointer; }
.form-hint { font-size: .78rem; color: var(--text-muted); margin-top: .35rem; }
.form-error { font-size: .78rem; color: #EF4444; margin-top: .35rem; }

/* ─── ALERTS ─────────────────────────────────────────────────── */
.alert {
  padding: .85rem 1rem; border-radius: var(--radius);
  margin-bottom: 1.25rem; font-size: .875rem;
  display: flex; gap: .6rem; align-items: flex-start;
}
.alert-error   { background: rgba(220,38,38,.15); border: 1px solid rgba(220,38,38,.3); color: #FCA5A5; }
.alert-success { background: rgba(0,255,204,.1);  border: 1px solid var(--border-cyan); color: var(--cyan); }
.alert-warn    { background: rgba(212,175,55,.1);  border: 1px solid var(--border-gold); color: var(--gold); }
.alert-info    { background: var(--glass); border: 1px solid var(--border); color: var(--text-muted); }

/* ─── AUTH PAGES ─────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  position: relative; padding: 2rem 1rem;
}
.auth-bg {
  position: fixed; inset: 0; z-index: 0;
  background: radial-gradient(ellipse at 20% 50%, rgba(0,255,204,.05) 0%, transparent 60%),
              radial-gradient(ellipse at 80% 20%, rgba(212,175,55,.06) 0%, transparent 50%),
              var(--bg);
}
.auth-particles { position: absolute; inset: 0; }
.auth-container {
  position: relative; z-index: 1;
  width: 100%; max-width: 440px;
  display: flex; flex-direction: column; align-items: center; gap: 1.5rem;
}
.auth-brand { text-align: center; }
.auth-brand .brand-logo {
  display: inline-flex; align-items: center; gap: .75rem;
  font-family: var(--font-serif); font-size: 1.5rem; font-weight: 700;
  color: var(--text); margin-bottom: .5rem;
}
.auth-brand .brand-logo em { font-style: normal; color: var(--gold); }
.auth-tagline { font-size: .85rem; color: var(--text-muted); font-family: var(--font-mono); letter-spacing: 1px; }
.auth-card {
  width: 100%;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 2rem;
  box-shadow: var(--shadow), 0 0 60px rgba(212,175,55,.05);
}
.auth-card h2 { font-size: 1.5rem; margin-bottom: .25rem; }
.auth-card p { color: var(--text-muted); font-size: .875rem; margin-bottom: 1.5rem; }
.auth-divider {
  display: flex; align-items: center; gap: .75rem; margin: 1.25rem 0;
  color: var(--text-ghost); font-size: .72rem; text-transform: uppercase; letter-spacing: 1px;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.auth-oauth-row { display: flex; gap: .75rem; margin-bottom: 1.25rem; }
.btn-oauth {
  flex: 1; padding: .65rem; background: var(--bg-surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); font-size: .85rem; font-weight: 500;
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  transition: all .2s;
}
.btn-oauth:hover { border-color: var(--gold); color: var(--gold); }
.auth-footer-note { font-size: .75rem; color: var(--text-ghost); font-family: var(--font-mono); }
.auth-switch { text-align: center; margin-top: 1rem; font-size: .875rem; color: var(--text-muted); }
.auth-switch a { color: var(--gold); font-weight: 600; }

/* ─── DASHBOARD ──────────────────────────────────────────────── */
.dashboard-grid {
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  display: flex; flex-direction: column; gap: .5rem;
}
.stat-card .stat-label {
  font-size: .75rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .8px; color: var(--text-muted);
}
.stat-card .stat-value {
  font-family: var(--font-serif); font-size: 2rem; font-weight: 700; color: var(--gold);
}
.stat-card .stat-sub { font-size: .8rem; color: var(--text-ghost); }
.page-header {
  padding: 2.5rem 0 1.5rem;
  border-bottom: 1px solid var(--border); margin-bottom: 2rem;
}
.page-header h1 { margin-bottom: .35rem; }
.page-header p { color: var(--text-muted); }

/* ─── STUDIO ─────────────────────────────────────────────────── */
.studio-layout {
  display: flex; height: calc(100vh - 64px);
  overflow: hidden;
}
.studio-sidebar-left {
  width: 240px; flex-shrink: 0;
  background: var(--bg-card); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; overflow-y: auto;
  padding: 1rem;
}
.studio-sidebar-right {
  width: 300px; flex-shrink: 0;
  background: var(--bg-card); border-left: 1px solid var(--border);
  display: flex; flex-direction: column;
}
.studio-canvas-area {
  flex: 1; background: #f3f4f6; overflow-y: auto;
  display: flex; justify-content: center; align-items: flex-start;
  padding: 2.5rem 1.5rem;
}
.studio-paper {
  background: #fff; color: #111;
  width: 100%; max-width: 780px; min-height: 1100px;
  box-shadow: 0 4px 40px rgba(0,0,0,.2);
  padding: 3rem 4rem;
  font-family: 'Crimson Pro', Georgia, serif; font-size: 1.1rem; line-height: 1.8;
}
.studio-toolbar {
  height: 56px; background: #fff; border-bottom: 1px solid #e5e7eb;
  display: flex; align-items: center; padding: 0 1rem; gap: .5rem;
  position: sticky; top: 0; z-index: 5;
  flex-wrap: wrap;
}
.tool-btn {
  padding: .35rem .6rem; background: none; border: 1px solid transparent;
  border-radius: 4px; font-size: .875rem; color: #374151;
  transition: all .15s; cursor: pointer;
}
.tool-btn:hover { background: #f3f4f6; border-color: #e5e7eb; }
.tool-btn.active { background: #e5e7eb; }
.tool-sep { width: 1px; height: 22px; background: #e5e7eb; margin: 0 .25rem; }
[contenteditable] { outline: none; }
[contenteditable]:empty::before { content: attr(data-placeholder); color: #9CA3AF; }

/* ─── AI CHAT ─────────────────────────────────────────────────── */
.ai-chat-wrap {
  display: flex; flex-direction: column; height: 100%;
}
.ai-chat-tabs {
  display: flex; border-bottom: 1px solid var(--border);
}
.ai-tab {
  flex: 1; padding: .65rem; text-align: center; cursor: pointer;
  font-size: .8rem; font-weight: 600; color: var(--text-muted);
  border: none; background: none; transition: all .15s;
}
.ai-tab.active { color: var(--gold); border-bottom: 2px solid var(--gold); }
.ai-messages {
  flex: 1; overflow-y: auto; padding: 1rem;
  display: flex; flex-direction: column; gap: .75rem;
}
.ai-msg {
  padding: .75rem .9rem; border-radius: 8px; font-size: .85rem; line-height: 1.5;
}
.ai-msg.from-ai {
  background: rgba(0,255,204,.07); border: 1px solid var(--border-cyan);
  color: var(--text);
}
.ai-msg.from-user {
  background: rgba(212,175,55,.08); border: 1px solid var(--border-gold);
  color: var(--text); margin-left: 2rem;
}
.ai-msg.loading { opacity: .6; animation: pulse 1.5s infinite; }
@keyframes pulse { 0%,100% { opacity:.6 } 50% { opacity:.3 } }
.ai-input-area {
  padding: .75rem; border-top: 1px solid var(--border);
  display: flex; gap: .5rem;
}
.ai-input-area input {
  flex: 1; padding: .55rem .75rem;
  background: var(--bg-surface); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text); font-size: .84rem;
}
.ai-input-area input:focus { outline: none; border-color: var(--cyan); }
.ai-input-area button {
  padding: .55rem .85rem; background: var(--gold); border: none;
  border-radius: var(--radius); color: #0B0F19; font-weight: 700;
  font-size: .8rem;
}

/* ─── NEWS FEED ──────────────────────────────────────────────── */
.news-masthead {
  text-align: center; padding: 2rem 0 1.5rem;
  border-bottom: 3px double var(--border);
  margin-bottom: 2rem;
}
.news-masthead h1 {
  font-family: var(--font-serif); font-size: clamp(2rem, 6vw, 4rem);
  font-weight: 900; letter-spacing: -1px;
}
.news-masthead .tagline {
  font-family: var(--font-mono); font-size: .8rem;
  text-transform: uppercase; letter-spacing: 2px; color: var(--text-muted);
  margin-top: .35rem;
}
.news-date-bar {
  font-family: var(--font-mono); font-size: .78rem;
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
  padding: .5rem 0; margin-top: 1rem;
  display: flex; justify-content: center; gap: 1.5rem; color: var(--text-ghost);
}
.news-grid {
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
}
.news-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem;
  transition: all .2s; display: flex; flex-direction: column;
}
.news-card:hover {
  border-color: var(--border-gold);
  box-shadow: 5px 5px 0 rgba(212,175,55,.15);
  transform: translateY(-3px);
}
.news-card .source-tag {
  font-family: var(--font-mono); font-size: .65rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
  background: var(--gold); color: #0B0F19;
  padding: 2px 7px; display: inline-block; margin-bottom: .75rem;
}
.news-card h3 {
  font-family: var(--font-serif); font-size: 1.2rem;
  line-height: 1.35; margin-bottom: .5rem; color: var(--text);
}
.news-card .news-body {
  font-family: var(--font-body); font-size: .95rem; line-height: 1.65;
  color: var(--text-muted); flex: 1;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.news-card-footer {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 1rem; padding-top: .75rem;
  border-top: 1px dashed var(--border);
}
.news-tags { display: flex; gap: .5rem; flex-wrap: wrap; }
.news-tag {
  font-size: .7rem; color: var(--text-ghost); font-family: var(--font-mono);
  padding: 2px 6px; border: 1px solid var(--border); border-radius: 3px;
}

/* ─── BOOKS / SHELF ──────────────────────────────────────────── */
.book-grid {
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.book-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; transition: all .2s;
}
.book-card:hover { border-color: var(--border-gold); transform: translateY(-4px); }
.book-cover {
  height: 260px; background: var(--bg-surface);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
  font-family: var(--font-serif); font-size: 1.2rem; color: rgba(255,255,255,.15);
}
.book-cover-inner {
  position: absolute; inset: .5rem; border: 1px solid rgba(212,175,55,.2);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 1rem; text-align: center; gap: .5rem;
}
.book-cover-title { font-family: var(--font-serif); font-size: .9rem; color: var(--gold); line-height: 1.3; }
.book-cover-author { font-size: .7rem; color: var(--text-muted); font-family: var(--font-mono); }
.book-info { padding: 1rem; }
.book-tag-label {
  font-size: .65rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1px; color: var(--cyan); display: block; margin-bottom: .35rem;
}
.book-title-sm { font-family: var(--font-serif); font-size: .95rem; margin-bottom: .2rem; }
.book-status {
  font-size: .7rem; font-family: var(--font-mono); color: var(--text-ghost);
  margin-top: .35rem;
}

/* ─── UPGRADE BANNER ─────────────────────────────────────────── */
.upgrade-banner {
  background: linear-gradient(135deg, rgba(212,175,55,.1) 0%, rgba(0,255,204,.05) 100%);
  border: 1px solid var(--border-gold); border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  margin-bottom: 2rem; flex-wrap: wrap;
}
.upgrade-banner p { font-size: .9rem; color: var(--text-muted); }
.upgrade-banner strong { color: var(--gold); }

/* ─── TICKER ─────────────────────────────────────────────────── */
.ticker-wrap {
  background: rgba(212,175,55,.08); border-bottom: 1px solid var(--border-gold);
  padding: .45rem 0; overflow: hidden; position: relative;
}
.ticker-track {
  display: flex; white-space: nowrap;
  animation: ticker 30s linear infinite;
}
.ticker-track span {
  font-family: var(--font-mono); font-size: .72rem;
  color: var(--gold); padding: 0 3rem;
}
@keyframes ticker { from { transform: translateX(100vw); } to { transform: translateX(-100%); } }

/* ─── TABS ───────────────────────────────────────────────────── */
.tabs { display: flex; border-bottom: 1px solid var(--border); margin-bottom: 1.5rem; gap: .25rem; }
.tab-btn {
  padding: .65rem 1.25rem; background: none; border: none;
  color: var(--text-muted); font-size: .875rem; font-weight: 500; cursor: pointer;
  border-bottom: 2px solid transparent; transition: all .2s;
}
.tab-btn.active { color: var(--gold); border-bottom-color: var(--gold); }
.tab-btn:hover { color: var(--text); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ─── SUBSCRIPTION PLANS ─────────────────────────────────────── */
.plans-grid {
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.plan-card {
  background: var(--bg-card); border: 2px solid var(--border);
  border-radius: 12px; padding: 2rem;
  text-align: center; position: relative; transition: all .2s;
}
.plan-card:hover { transform: translateY(-4px); }
.plan-card.featured { border-color: var(--gold); box-shadow: var(--glow-gold); }
.plan-card.featured::before {
  content: 'POPULAR'; position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--gold); color: #0B0F19; font-size: .65rem; font-weight: 900;
  padding: 3px 12px; border-radius: 20px; font-family: var(--font-mono); letter-spacing: 1px;
}
.plan-name { font-family: var(--font-serif); font-size: 1.5rem; margin-bottom: .35rem; }
.plan-price { font-size: 2.5rem; font-weight: 900; color: var(--gold); margin: .75rem 0; }
.plan-price span { font-size: 1rem; font-weight: 400; color: var(--text-muted); }
.plan-features { text-align: left; margin: 1.5rem 0; display: flex; flex-direction: column; gap: .6rem; }
.plan-feature { display: flex; gap: .6rem; font-size: .875rem; align-items: flex-start; }
.plan-feature .icon-check { color: var(--cyan); flex-shrink: 0; }
.plan-feature .icon-lock { color: var(--text-ghost); flex-shrink: 0; }
.plan-feature.locked { color: var(--text-ghost); }

/* ─── FOOTER ─────────────────────────────────────────────────── */
.syaahi-footer {
  border-top: 1px solid var(--border); padding: 2rem 0; margin-top: 4rem;
}
.footer-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem;
}
.footer-brand { display: flex; flex-direction: column; }
.footer-brand strong { font-family: var(--font-serif); color: var(--gold); }
.footer-brand span { font-size: .75rem; color: var(--text-ghost); font-family: var(--font-mono); }
.footer-links { display: flex; gap: 1.5rem; }
.footer-links a { font-size: .8rem; color: var(--text-muted); transition: color .2s; }
.footer-links a:hover { color: var(--gold); }
.footer-copy { font-size: .75rem; color: var(--text-ghost); font-family: var(--font-mono); }

/* ─── LOADING / SKELETON ─────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-hover) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius);
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── MODAL ──────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.7); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.modal-overlay.hidden { display: none; }
.modal-box {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 12px; padding: 2rem; width: 100%; max-width: 500px;
  box-shadow: var(--shadow);
}
.modal-box h3 { margin-bottom: 1rem; font-family: var(--font-serif); }
.modal-actions { display: flex; gap: .75rem; justify-content: flex-end; margin-top: 1.5rem; }

/* ─── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .studio-sidebar-right { display: none; }
  .studio-sidebar-left { display: none; }
  .studio-sidebar-left.mobile-open { display: flex; position: fixed; left: 0; top: 64px; bottom: 0; z-index: 50; }
  .studio-canvas-area { padding: 1rem; }
  .studio-paper { padding: 1.5rem; }
}
@media (max-width: 640px) {
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
  .auth-oauth-row { flex-direction: column; }
  .upgrade-banner { flex-direction: column; }
}

/* ─── SCROLLBAR ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-ghost); }

/* ─── PWA INSTALL BANNER ─────────────────────────────────────── */
.pwa-install-banner {
  position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%);
  background: var(--bg-card); border: 1px solid var(--border-gold);
  border-radius: 12px; padding: 1rem 1.5rem;
  display: flex; align-items: center; gap: 1rem;
  box-shadow: var(--shadow); z-index: 500;
  max-width: 420px; width: calc(100% - 2rem);
}
.pwa-install-banner.hidden { display: none; }
.pwa-install-banner p { font-size: .875rem; color: var(--text-muted); flex: 1; }
.pwa-install-banner strong { color: var(--gold); }

/* ─── OFFLINE INDICATOR ──────────────────────────────────────── */
.offline-bar {
  display: none; position: fixed; top: 64px; left: 0; right: 0; z-index: 90;
  background: rgba(220,38,38,.9); color: #fff; text-align: center;
  padding: .5rem; font-size: .8rem; font-family: var(--font-mono);
}
.offline-bar.show { display: block; }
