/* ============================================================
   ZOOL — Design System v2 (Dark · Freebuff-inspired)
   ============================================================ */

:root {
  --bg: #121212;
  --bg-deep: #0a0a0a;
  --panel: #1a1a1a;
  --panel-2: #222222;
  --card: #1c1c1c;
  --ink: #ededed;
  --ink-soft: #b8b8b8;
  --muted: #8a8a8a;
  --green: #6366f1;
  --green-2: #818cf8;
  --green-deep: #0b0b13;
  --gold: #f59e0b;
  --gold-soft: rgba(245, 158, 11, 0.14);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --danger: #f87171;
  --nav-bg: rgba(18, 18, 18, 0.82);
  --topbar-bg: rgba(18, 18, 18, 0.88);
  --input-bg: #0f0f0f;
  --accent-fg: #fbbf24;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4), 0 4px 14px rgba(0,0,0,.35);
  --shadow-md: 0 2px 4px rgba(0,0,0,.45), 0 16px 40px rgba(0,0,0,.5);
  --radius: 16px;
  --radius-sm: 10px;
  --font-body: "Cairo", "Segoe UI", Tahoma, sans-serif;
  --font-display: "Cairo", "Segoe UI", Tahoma, sans-serif;
  --nav-h: 72px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

[dir="rtl"] body { letter-spacing: 0; }
[dir="ltr"] body { letter-spacing: 0.1px; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.25; }

a { color: var(--green-2); text-decoration: none; }
a:hover { color: #a5b4fc; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 700; font-size: 15px;
  padding: 12px 22px; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: all .18s ease; white-space: nowrap;
}
.btn-primary { background: var(--green); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--green-2); color: #fff; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-gold { background: var(--gold); color: #0f0f0f; }
.btn-gold:hover { background: #fbbf24; color: #0f0f0f; transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--green-2); color: var(--green-2); }
.btn-white { background: #fff; color: #312e81; }
.btn-white:hover { background: #e0e7ff; }
.btn-block { width: 100%; }
.btn-lg { padding: 15px 30px; font-size: 16px; }
.btn-sm { padding: 8px 16px; font-size: 13px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 22px; color: var(--ink); letter-spacing: .5px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px; flex: none;
  box-shadow: var(--shadow-sm);
  display: block;
}
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: var(--ink-soft); font-weight: 600; font-size: 14.5px; }
.nav-links a:hover { color: var(--green-2); }
.nav-actions { display: flex; align-items: center; gap: 12px; }

.lang-toggle {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 999px; padding: 5px; font-family: var(--font-body); font-weight: 700; font-size: 12.5px;
  cursor: pointer; color: var(--ink-soft);
}
.lang-toggle span { padding: 3px 10px; border-radius: 999px; }
.lang-toggle span.on { background: var(--green); color: #fff; }

/* ---------- مبدّل الوضع (داكن/فاتح) ---------- */
.theme-btn {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line-strong); background: var(--panel);
  color: var(--ink); font-size: 16px; cursor: pointer; display: inline-flex;
  align-items: center; justify-content: center; transition: all .15s; flex-shrink: 0;
}
.theme-btn:hover { border-color: var(--green-2); color: var(--green-2); }

/* الثيم الفاتح */
[data-theme="light"] {
  --bg: #f6f7f9;
  --bg-deep: #e9ebf0;
  --panel: #ffffff;
  --panel-2: #f3f4f7;
  --card: #ffffff;
  --ink: #111827;
  --ink-soft: #3f4753;
  --muted: #6b7280;
  --line: rgba(17, 24, 39, 0.10);
  --line-strong: rgba(17, 24, 39, 0.18);
  --gold-soft: rgba(245, 158, 11, 0.16);
  --nav-bg: rgba(246, 247, 249, 0.85);
  --topbar-bg: rgba(246, 247, 249, 0.9);
  --input-bg: #ffffff;
  --accent-fg: #92400e;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.06), 0 4px 14px rgba(15,23,42,.06);
  --shadow-md: 0 2px 4px rgba(15,23,42,.08), 0 16px 40px rgba(15,23,42,.12);
}

/* ---------- Hero ---------- */
.hero { padding: 84px 0 70px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(600px 320px at 85% 10%, rgba(99,102,241,.16), transparent 60%),
    radial-gradient(500px 300px at 10% 90%, rgba(245,158,11,.08), transparent 60%);
}
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; position: relative; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--gold-soft); color: var(--accent-fg);
  font-size: 13px; font-weight: 700; padding: 7px 15px; border-radius: 999px; margin-bottom: 20px;
  border: 1px solid rgba(245,158,11,.25);
}
.hero h1 { font-size: 52px; color: var(--ink); margin-bottom: 18px; }
.hero h1 .accent { color: var(--green-2); }
.hero-sub { font-size: 18px; color: var(--ink-soft); max-width: 540px; margin-bottom: 30px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 40px; }
.hero-stats { display: flex; gap: 40px; }
.stat b { display: block; font-family: var(--font-display); font-size: 30px; color: var(--ink); }
.stat span { font-size: 13.5px; color: var(--muted); }

/* Hero visual — chat mock */
.chat-mock {
  background: var(--panel); border: 1px solid var(--line); border-radius: 20px;
  box-shadow: var(--shadow-md); padding: 22px; position: relative;
}
.mock-head { display: flex; align-items: center; gap: 10px; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.mock-dot { width: 10px; height: 10px; border-radius: 50%; }
.mock-dot:nth-child(1) { background: #ff5f57; }
.mock-dot:nth-child(2) { background: #febc2e; }
.mock-dot:nth-child(3) { background: #28c840; }
.mock-title { font-size: 13px; color: var(--muted); font-weight: 600; margin-right: auto; }
[dir="rtl"] .mock-title { margin-right: 0; margin-left: auto; }
.mock-msg { border-radius: 14px; padding: 13px 16px; font-size: 14.5px; margin-bottom: 12px; max-width: 86%; }
.mock-user { background: var(--green); color: #fff; margin-left: auto; }
[dir="rtl"] .mock-user { margin-left: 0; margin-right: auto; }
.mock-agent { background: var(--panel-2); color: var(--ink); border: 1px solid var(--line); }
.mock-code {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 12px;
  background: #0d0d18; color: #a5b4fc; border-radius: 8px; padding: 10px 12px;
  margin-top: 8px; direction: ltr; text-align: left; overflow-x: auto; white-space: pre;
  border: 1px solid rgba(129,140,248,.15);
}
.mock-typing { display: inline-flex; gap: 4px; padding: 4px 2px; }
.mock-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--green-2); animation: blink 1.2s infinite; }
.mock-typing i:nth-child(2) { animation-delay: .2s; }
.mock-typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }

/* ---------- Sections ---------- */
.section { padding: 76px 0; }
.section-alt { background: var(--bg-deep); border-block: 1px solid var(--line); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 52px; }
.section-head .eyebrow { color: var(--accent-fg); font-weight: 700; font-size: 13.5px; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 10px; }
[dir="rtl"] .section-head .eyebrow { letter-spacing: 0; }
.section-head h2 { font-size: 38px; margin-bottom: 12px; color: var(--ink); }
.section-head p { color: var(--ink-soft); font-size: 16.5px; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px 24px; transition: all .2s ease;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-strong); }
.feature-icon {
  width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center;
  background: linear-gradient(135deg, #4c46e5, #818cf8); color: #fff; font-size: 22px; margin-bottom: 16px;
}
.feature h3 { font-size: 20px; margin-bottom: 8px; color: var(--ink); }
.feature p { color: var(--ink-soft); font-size: 14.5px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: step; }
.step { position: relative; padding: 26px 24px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.step::before {
  counter-increment: step; content: "0" counter(step);
  font-family: var(--font-display); font-size: 44px; color: var(--green-2);
  display: block; margin-bottom: 8px; line-height: 1;
}
.step h3 { font-size: 19px; margin-bottom: 6px; color: var(--ink); }
.step p { color: var(--ink-soft); font-size: 14.5px; }

.cta-band {
  background: linear-gradient(135deg, #221d5e, #4c46e5 55%, #6366f1);
  border-radius: 24px; padding: 56px 48px; text-align: center; color: #fff;
  position: relative; overflow: hidden; border: 1px solid rgba(129,140,248,.3);
}
.cta-band::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(400px 200px at 80% 0%, rgba(245,158,11,.2), transparent 60%);
}
.cta-band h2 { font-size: 34px; margin-bottom: 10px; color: #fff; position: relative; }
.cta-band p { color: #dbe1ff; margin-bottom: 26px; position: relative; }

.footer { border-top: 1px solid var(--line); padding: 40px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer small { color: var(--muted); }
.footer-links { display: flex; gap: 20px; font-size: 14px; }

/* ============================================================
   AUTH PAGE
   ============================================================ */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 1fr 1.1fr; }
.auth-brand {
  background: linear-gradient(150deg, #0b0b13 0%, #221d5e 55%, #4c46e5 100%);
  color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden; border-right: 1px solid var(--line);
}
[dir="ltr"] .auth-brand { border-right: none; border-left: 1px solid var(--line); }
.auth-brand::after {
  content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.1); top: -120px; left: -120px;
  box-shadow: 0 0 0 60px rgba(255,255,255,.03), 0 0 0 130px rgba(255,255,255,.02);
}
.auth-brand .brand { color: #fff; position: relative; z-index: 1; }
.auth-brand-quote { position: relative; z-index: 1; }
.auth-brand-quote h2 { font-size: 34px; margin-bottom: 14px; color: #fff; }
.auth-brand-quote p { color: #dbe1ff; font-size: 16px; }
.auth-brand-proof { display: flex; gap: 28px; position: relative; z-index: 1; }
.auth-brand-proof .stat b { color: #fbbf24; }

.auth-main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px; background: var(--bg); }
.auth-topbar { position: absolute; top: 0; right: 0; left: 0; display: flex; justify-content: space-between; padding: 20px 26px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card h1 { font-size: 30px; margin-bottom: 6px; color: #fff; }
.auth-card .sub { color: var(--muted); font-size: 15px; margin-bottom: 26px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13.5px; font-weight: 700; margin-bottom: 7px; color: var(--ink-soft); }
.input {
  width: 100%; font-family: var(--font-body); font-size: 15px; color: var(--ink);
  background: var(--input-bg); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 13px 16px; transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: var(--muted); }
.input:focus { outline: none; border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(99,102,241,.22); }
.input.err { border-color: var(--danger); }
.field-error { color: var(--danger); font-size: 12.5px; margin-top: 5px; min-height: 0; display: none; }
.field-error.show { display: block; }

.btn-google {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 12px;
  background: var(--panel); border: 1px solid var(--line-strong); color: var(--ink);
  font-weight: 700; font-size: 15px; padding: 13px; border-radius: var(--radius-sm);
  cursor: pointer; transition: all .15s;
}
.btn-google:hover { background: var(--panel-2); }
.btn-google svg { width: 19px; height: 19px; }
.divider { display: flex; align-items: center; gap: 14px; margin: 22px 0; color: var(--muted); font-size: 13px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.auth-switch { text-align: center; margin-top: 22px; font-size: 14.5px; color: var(--ink-soft); }
.auth-switch a { font-weight: 700; }
.tabs { display: flex; background: var(--panel); border-radius: 999px; padding: 4px; margin-bottom: 26px; border: 1px solid var(--line); }
.tab {
  flex: 1; text-align: center; padding: 10px; border-radius: 999px; font-weight: 700; font-size: 14px;
  color: var(--muted); cursor: pointer; border: none; background: transparent; font-family: var(--font-body);
  transition: all .15s;
}
.tab.on { background: var(--green); color: #fff; box-shadow: var(--shadow-sm); }

.note { background: var(--gold-soft); border: 1px solid rgba(245,158,11,.25); border-radius: var(--radius-sm); padding: 13px 16px; font-size: 13px; color: var(--accent-fg); margin-top: 18px; }

/* ============================================================
   APP — workspace
   ============================================================ */
.app-shell { display: grid; grid-template-columns: 280px 1fr; height: 100vh; }
.app-side {
  background: var(--bg-deep); color: var(--ink-soft); display: flex; flex-direction: column;
  padding: 22px 16px; overflow-y: auto; border-right: 1px solid var(--line);
}
[dir="ltr"] .app-side { border-right: none; border-left: 1px solid var(--line); }
.app-side .brand { color: var(--ink); margin-bottom: 26px; }
.side-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--muted); font-weight: 700; margin: 18px 0 8px; padding: 0 8px; }
[dir="rtl"] .side-label { letter-spacing: 0; }
.side-btn {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: right;
  background: transparent; border: 1px solid transparent; color: var(--ink-soft);
  padding: 10px 12px; border-radius: 10px; font-family: var(--font-body); font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all .13s; margin-bottom: 4px;
}
[dir="ltr"] .side-btn { text-align: left; }
.side-btn:hover { background: var(--line); }
.side-btn.on { background: rgba(99,102,241,.16); border-color: rgba(129,140,248,.3); color: var(--green); }
.side-item { color: var(--ink-soft); }
.history-list { overflow-y: auto; flex: 1; }
.history-item { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px; font-size: 13px; color: var(--ink-soft); cursor: pointer; }
.history-item:hover { background: var(--line); }
.history-item .trash { margin-left: auto; opacity: 0; transition: opacity .13s; background: none; border: none; color: #fca5a5; cursor: pointer; font-size: 14px; }
[dir="ltr"] .history-item .trash { margin-left: 0; margin-right: auto; }
.history-item:hover .trash { opacity: 1; }
.side-foot { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 8px; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, #4c46e5, #818cf8);
  color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 15px; flex-shrink: 0;
}
.side-user .u-name { font-weight: 700; font-size: 14px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 130px; }
.side-user .u-mail { font-size: 11.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 130px; }

.app-main { display: flex; flex-direction: column; min-width: 0; position: relative; }
.app-topbar {
  height: 62px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 26px; border-bottom: 1px solid var(--line); background: var(--topbar-bg);
  backdrop-filter: blur(10px); position: sticky; top: 0; z-index: 20;
}
.app-topbar h2 { font-size: 18px; color: var(--ink); }
.free-pill {
  background: var(--gold-soft); color: var(--accent-fg); font-size: 12.5px; font-weight: 700;
  padding: 6px 13px; border-radius: 999px; border: 1px solid rgba(245,158,11,.25);
}

.app-view { flex: 1; min-height: 0; display: flex; flex-direction: column; }
#chat-scroll { flex: 1; overflow-y: auto; padding: 30px 26px 20px; }
#view-projects { overflow-y: auto; padding: 30px 26px 20px; }
.chat-inner { max-width: 760px; margin: 0 auto; }
.msg { display: flex; gap: 12px; margin-bottom: 22px; }
.msg .avatar { width: 34px; height: 34px; font-size: 13px; }
.msg-body { flex: 1; min-width: 0; }
.msg-name { font-size: 12.5px; font-weight: 700; color: var(--muted); margin-bottom: 5px; }
.msg-bubble {
  background: var(--panel); border: 1px solid var(--line); border-radius: 4px 16px 16px 16px;
  padding: 14px 17px; font-size: 15px; line-height: 1.85; color: var(--ink);
}
[dir="ltr"] .msg-bubble { border-radius: 16px 4px 16px 16px; }
.msg.user .msg-bubble { background: var(--green); color: #fff; border-color: var(--green); border-radius: 16px 4px 16px 16px; }
[dir="ltr"] .msg.user .msg-bubble { border-radius: 4px 16px 16px 16px; }
.msg.user { flex-direction: row-reverse; }
[dir="ltr"] .msg.user { flex-direction: row; }
.msg.user .msg-name { text-align: left; }
[dir="rtl"] .msg.user .msg-name { text-align: right; }
.msg-bubble pre {
  background: #0d0d18; color: #a5b4fc; border: 1px solid rgba(129,140,248,.15);
  border-radius: 10px; padding: 14px; overflow-x: auto; font-size: 13px;
  direction: ltr; text-align: left; margin: 10px 0; line-height: 1.6;
}
.msg-bubble code { font-family: ui-monospace, Consolas, monospace; }
.typing-ind { display: inline-flex; gap: 5px; padding: 4px 0; }
.typing-step {
  display: block; margin-top: 8px; font-size: 12.5px; color: var(--muted);
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: .55; } 50% { opacity: 1; } }

/* المعاينة الحية للمواقع المُصممة */
.site-preview {
  margin-top: 12px; border: 1px solid var(--line);
  border-radius: 14px; overflow: hidden; background: var(--bg);
}
.preview-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 14px; background: var(--card); border-bottom: 1px solid var(--line);
  font-size: 13px; font-weight: 700; color: var(--ink);
}
.preview-toggle {
  background: var(--primary, #6366f1); color: #fff; border: 0; border-radius: 8px;
  padding: 6px 14px; font-size: 12px; font-weight: 600; cursor: pointer;
  font-family: var(--font-body); transition: opacity .15s;
}
.preview-toggle:hover { opacity: .85; }
.preview-frame-wrap {
  transition: max-height .25s ease; max-height: 560px; overflow: auto;
}
.preview-frame-wrap.hidden { max-height: 0; overflow: hidden; }
.preview-frame {
  width: 100%; height: 480px; border: 0; display: block; background: #fff;
}

.typing-ind i { width: 8px; height: 8px; border-radius: 50%; background: var(--green-2); animation: blink 1.2s infinite; }
.typing-ind i:nth-child(2) { animation-delay: .2s; }
.typing-ind i:nth-child(3) { animation-delay: .4s; }

.suggest { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 8px; }
.chip {
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: 999px;
  padding: 9px 16px; font-family: var(--font-body); font-size: 13.5px; font-weight: 600;
  color: var(--ink-soft); cursor: pointer; transition: all .15s;
}
.chip:hover { border-color: var(--green-2); color: var(--green-2); background: rgba(99,102,241,.1); }

.composer-wrap { padding: 16px 26px 22px; border-top: 1px solid var(--line); background: var(--bg); }
.composer {
  max-width: 760px; margin: 0 auto; background: var(--panel); border: 1px solid var(--line-strong);
  border-radius: 18px; padding: 10px 10px 10px 18px; display: flex; align-items: flex-end; gap: 10px;
  box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s;
}
.composer:focus-within { border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(99,102,241,.15); }
.composer textarea {
  flex: 1; border: none; outline: none; resize: none; background: transparent;
  font-family: var(--font-body); font-size: 15px; color: var(--ink); line-height: 1.6;
  max-height: 160px; min-height: 44px; padding: 10px 0;
}
.composer textarea::placeholder { color: var(--muted); }
.send-btn {
  width: 44px; height: 44px; border-radius: 14px; border: none; background: var(--green); color: #fff;
  font-size: 18px; cursor: pointer; display: grid; place-items: center; transition: all .15s; flex-shrink: 0;
}
.send-btn:hover { background: var(--green-2); transform: translateY(-1px); }
.send-btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }
.composer-note { max-width: 760px; margin: 10px auto 0; font-size: 12px; color: var(--muted); text-align: center; }

.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; padding-top: 10px; }
.project-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; transition: all .2s;
}
.project-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.project-card .p-type { font-size: 12px; color: var(--accent-fg); font-weight: 700; }
.project-card h3 { font-size: 17px; margin: 6px 0; color: var(--ink); }
.project-card p { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.project-card .p-time { font-size: 11.5px; color: var(--muted); }
.empty-state { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-state .big { font-size: 42px; margin-bottom: 10px; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero h1 { font-size: 40px; }
  .features, .steps { grid-template-columns: 1fr 1fr; }
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .app-shell { grid-template-columns: 1fr; }
  .app-side {
    position: fixed; top: 0; bottom: 0; right: 0; width: 284px; z-index: 70;
    transform: translateX(100%); transition: transform .22s ease;
    box-shadow: var(--shadow-md);
  }
  [dir="ltr"] .app-side { right: auto; left: 0; transform: translateX(-100%); }
  .app-side.open { transform: translateX(0); }
  [dir="ltr"] .app-side.open { transform: translateX(0); }
  .app-topbar .menu-btn { display: inline-flex; }
  .side-backdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 65;
    opacity: 0; pointer-events: none; transition: opacity .22s ease;
  }
  .side-backdrop.show { opacity: 1; pointer-events: auto; }
}

.menu-btn {
  display: none; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line-strong);
  background: var(--panel); color: var(--ink); font-size: 18px; cursor: pointer;
}

@media (max-width: 640px) {
  .features, .steps { grid-template-columns: 1fr; }
  .hero { padding: 56px 0 48px; }
  .hero h1 { font-size: 32px; }
  .hero-stats { gap: 22px; flex-wrap: wrap; }
  .nav-links { display: none; }
  .cta-band { padding: 40px 24px; }
}
