/* DocFlow — modern SaaS theme */
:root {
    --navy: #0b1426;
    --navy-2: #152347;
    --blue: #4f7cff;
    --blue-dark: #2f5be0;
    --accent: #16c79a;
    --accent-2: #ff6b6b;
    --bg: #f4f6fb;
    --surface: #ffffff;
    --border: #e2e8f4;
    --muted: #6b7a99;
    --text: #14233d;
    --radius: 16px;
    --shadow-sm: 0 6px 18px rgba(15,27,51,0.07);
    --shadow-md: 0 16px 40px rgba(15,27,51,0.10);
    --shadow-lg: 0 28px 70px rgba(15,27,51,0.14);
    --transition: 0.25s cubic-bezier(0.4,0,0.2,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Cairo', 'Inter', sans-serif;
    background: linear-gradient(180deg, #f6f8fc 0%, #eef1f8 100%);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header {
    position: sticky; top: 0; z-index: 100;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(14px) saturate(1.2);
    border-bottom: 1px solid rgba(226,232,244,0.6);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; color: var(--navy); }
.logo-mark { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg, var(--blue), var(--blue-dark)); display: grid; place-items: center; color: #fff; font-weight: 800; }
.nav { display: flex; gap: 28px; align-items: center; }
.nav a { color: var(--muted); font-weight: 600; font-size: 14px; transition: color var(--transition); }
.nav a:hover { color: var(--blue); }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 12px; font-weight: 700; font-size: 14px; border: none; cursor: pointer; transition: all var(--transition); }
.btn-primary { background: linear-gradient(135deg, var(--blue), var(--blue-dark)); color: #fff; box-shadow: 0 8px 22px rgba(79,124,255,0.35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(79,124,255,0.45); }
.btn-ghost { background: transparent; color: var(--navy); border: 1.5px solid var(--border); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }

/* Hero */
.hero { padding: 90px 0 60px; text-align: center; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(800px 400px at 50% 0%, rgba(79,124,255,0.12), transparent 70%); pointer-events: none; }
.hero h1 { font-size: 52px; font-weight: 900; line-height: 1.15; background: linear-gradient(120deg, var(--navy), var(--blue)); -webkit-background-clip: text; background-clip: text; color: transparent; margin-bottom: 18px; }
.hero p { font-size: 18px; color: var(--muted); max-width: 680px; margin: 0 auto 32px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 40px; justify-content: center; margin-top: 50px; flex-wrap: wrap; }
.stat { text-align: center; }
.stat-num { font-size: 32px; font-weight: 900; color: var(--navy); }
.stat-label { font-size: 13px; color: var(--muted); }

/* Features */
.section { padding: 80px 0; }
.section-title { text-align: center; font-size: 36px; font-weight: 900; color: var(--navy); margin-bottom: 12px; }
.section-sub { text-align: center; color: var(--muted); font-size: 16px; max-width: 600px; margin: 0 auto 50px; }
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; transition: all var(--transition); }
.feature-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: rgba(79,124,255,0.3); }
.feature-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; margin-bottom: 16px; background: linear-gradient(135deg, #eef3ff, #e0e8ff); }
.feature-card h3 { font-size: 18px; font-weight: 800; color: var(--navy); margin-bottom: 8px; }
.feature-card p { color: var(--muted); font-size: 14px; }

/* Pricing */
.pricing-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; max-width: 1000px; margin: 0 auto; }
.price-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 34px 28px; text-align: center; transition: all var(--transition); position: relative; }
.price-card.featured { border: 2px solid var(--blue); box-shadow: var(--shadow-md); transform: scale(1.04); }
.price-card.featured::before { content: 'Most Popular'; position: absolute; top: -14px; left: 50%; transform: translateX(-50%); background: var(--blue); color: #fff; padding: 6px 16px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.price-name { font-size: 18px; font-weight: 800; color: var(--navy); margin-bottom: 8px; }
.price-amount { font-size: 44px; font-weight: 900; color: var(--navy); margin: 16px 0; }
.price-amount span { font-size: 16px; color: var(--muted); font-weight: 500; }
.price-features { list-style: none; margin: 24px 0; text-align: right; }
.price-features li { padding: 8px 0; color: var(--muted); font-size: 14px; border-bottom: 1px solid var(--border); }
.price-features li::before { content: '✓ '; color: var(--accent); font-weight: 700; }

/* Footer */
.site-footer { background: var(--navy); color: #9db0d6; padding: 50px 0 30px; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; margin-bottom: 30px; }
.footer-grid h4 { color: #fff; font-size: 14px; margin-bottom: 14px; }
.footer-grid a { color: #9db0d6; font-size: 13px; display: block; margin-bottom: 8px; }
.footer-grid a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 20px; text-align: center; font-size: 12px; }

/* App page */
.app-layout { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.app-sidebar { background: linear-gradient(180deg, var(--navy), var(--navy-2)); color: #e9eef8; padding: 26px 18px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.app-sidebar .logo { color: #fff; margin-bottom: 30px; }
.app-nav { display: grid; gap: 6px; }
.app-nav a { padding: 12px 14px; color: #c0cce0; border-radius: 10px; font-size: 13px; font-weight: 500; transition: all var(--transition); }
.app-nav a:hover, .app-nav a.active { background: rgba(79,124,255,0.25); color: #fff; }
.app-main { padding: 32px 40px; }
.app-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.app-header h1 { font-size: 26px; font-weight: 900; color: var(--navy); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; margin-bottom: 22px; box-shadow: var(--shadow-sm); }
.card h2 { font-size: 18px; font-weight: 800; color: var(--navy); margin-bottom: 16px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; color: #4a5a78; margin-bottom: 6px; }
.field input, .field select, .field textarea { width: 100%; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 10px; font-size: 14px; background: #f7f9fd; transition: all var(--transition); font-family: inherit; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); background: #fff; box-shadow: 0 0 0 4px rgba(79,124,255,0.12); outline: none; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.template-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tpl-card { border: 1.5px solid var(--border); border-radius: 12px; padding: 16px; cursor: pointer; transition: all var(--transition); text-align: center; }
.tpl-card:hover { border-color: var(--blue); transform: translateY(-2px); }
.tpl-card.selected { border-color: var(--blue); background: #eef3ff; }
.tpl-card .tpl-icon { font-size: 32px; margin-bottom: 8px; }
.tpl-card .tpl-name { font-weight: 700; font-size: 14px; color: var(--navy); }

.recent-list { display: grid; gap: 10px; }
.recent-item { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; background: #f7f9fd; border-radius: 10px; border: 1px solid var(--border); }
.recent-item .name { font-weight: 600; color: var(--navy); }
.recent-item .meta { font-size: 12px; color: var(--muted); }

/* Responsive */
@media (max-width: 900px) {
    .features-grid, .pricing-grid, .template-picker { grid-template-columns: 1fr; }
    .hero h1 { font-size: 36px; }
    .app-layout { grid-template-columns: 1fr; }
    .app-sidebar { position: relative; height: auto; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .footer-grid { grid-template-columns: 1fr; }
    .hero-stats { gap: 20px; }
}
CSS
/* =========================================================
   DARK MODE
   ========================================================= */
:root[data-theme="dark"] {
    --bg: #0b1426;
    --surface: #152347;
    --border: #2a3a66;
    --muted: #9db0d6;
    --text: #e9eef8;
    --navy: #e9eef8;
}
:root[data-theme="dark"] body { background: linear-gradient(180deg, #0b1426 0%, #0f1b33 100%); color: var(--text); }
:root[data-theme="dark"] .site-header { background: rgba(15,27,51,0.85); border-color: rgba(42,58,102,0.6); }
:root[data-theme="dark"] .feature-card, :root[data-theme="dark"] .price-card, :root[data-theme="dark"] .card, :root[data-theme="dark"] .tpl-card, :root[data-theme="dark"] .recent-item { background: #1a2d4f; border-color: #2a3a66; }
:root[data-theme="dark"] .field input, :root[data-theme="dark"] .field select, :root[data-theme="dark"] .field textarea { background: #1f3360; border-color: #2a3a66; color: var(--text); }
:root[data-theme="dark"] .app-sidebar { background: linear-gradient(180deg, #080f1f, #0f1b33); }
:root[data-theme="dark"] .logo { color: #e9eef8; }
:root[data-theme="dark"] .nav a, :root[data-theme="dark"] .app-nav a { color: #9db0d6; }
:root[data-theme="dark"] .btn-ghost { color: #e9eef8; border-color: #2a3a66; }
:root[data-theme="dark"] .hero h1 { background: linear-gradient(120deg, #e9eef8, var(--blue)); -webkit-background-clip: text; background-clip: text; color: transparent; }
:root[data-theme="dark"] .section-title { color: #e9eef8; }
:root[data-theme="dark"] .app-header h1 { color: #e9eef8; }
:root[data-theme="dark"] .card h2 { color: #e9eef8; }
:root[data-theme="dark"] .tpl-card .tpl-name { color: #e9eef8; }
:root[data-theme="dark"] .recent-item .name { color: #e9eef8; }

.theme-toggle { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--border); background: var(--surface); cursor: pointer; display: grid; place-items: center; font-size: 18px; transition: all var(--transition); }
.theme-toggle:hover { border-color: var(--blue); transform: rotate(20deg); }

/* =========================================================
   NEW TEMPLATES GRID
   ========================================================= */
.tpl-card .tpl-badge { display: inline-block; font-size: 10px; padding: 3px 8px; border-radius: 999px; background: #edf2ff; color: var(--blue); font-weight: 700; margin-top: 6px; }
:root[data-theme="dark"] .tpl-card .tpl-badge { background: #2a3a66; color: #9db0d6; }
