:root {
  --bg: #f7f8fc; --surface: #fff; --ink: #0f172a; --muted: #5b6478; --line: #e5e8f0;
  --brand: #3b5bfd; --brand-2: #7c3aed; --brand-ink: #fff; --soft: #eef1ff;
  --ok: #0f9d58; --warn: #d97706; --bad: #dc2626;
  --radius: 14px; --shadow: 0 1px 2px rgba(15,23,42,.06), 0 8px 24px rgba(15,23,42,.06);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink); background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; line-height: 1.5; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.02em; }
button, input, select, textarea { font: inherit; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; font-weight: 600; white-space: nowrap; }
.btn:hover { background: #f1f3f9; text-decoration: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { background: #2f4de0; }
.btn.danger { color: var(--bad); }
.btn.sm { padding: 6px 12px; font-size: .85rem; border-radius: 8px; }
.btn.lg { padding: 14px 26px; font-size: 1.05rem; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.icon-btn { border: 0; background: transparent; cursor: pointer; padding: 6px 8px; border-radius: 8px; color: var(--muted); }
.icon-btn:hover { background: #eef0f6; color: var(--ink); }

/* logo */
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; color: var(--ink); }
.logo:hover { text-decoration: none; }
.logo-mark { width: 32px; height: 32px; border-radius: 9px; background: linear-gradient(135deg, var(--brand), var(--brand-2));
  display: grid; place-items: center; color: #fff; font-size: 1rem; }

/* ---------- landing ---------- */
.site-nav { position: sticky; top: 0; z-index: 10; background: rgba(247,248,252,.85); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.site-nav .container { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.site-nav nav { display: flex; gap: 26px; }
.site-nav nav a { color: var(--muted); font-weight: 500; }
.site-nav nav a:hover { color: var(--ink); text-decoration: none; }
.hero { padding: 96px 0 72px; text-align: center; background:
  radial-gradient(800px 360px at 50% -10%, rgba(59,91,253,.16), transparent), radial-gradient(500px 300px at 85% 10%, rgba(124,58,237,.12), transparent); }
.hero h1 { font-size: clamp(2.4rem, 5vw, 4rem); max-width: 860px; margin: 0 auto 20px; }
.hero h1 span { background: linear-gradient(90deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { font-size: 1.2rem; color: var(--muted); max-width: 640px; margin: 0 auto 32px; }
.hero .cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.badge { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--soft); color: var(--brand); font-weight: 600; font-size: .85rem; margin-bottom: 18px; }
.trust { margin-top: 42px; display: flex; gap: 28px; justify-content: center; flex-wrap: wrap; color: var(--muted); font-size: .95rem; }
.mock { margin: 56px auto 0; max-width: 940px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); text-align: left; overflow: hidden; }
.mock-bar { display: flex; gap: 6px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.mock-bar i { width: 11px; height: 11px; border-radius: 50%; background: #e2e5ee; }
.mock-body { display: grid; grid-template-columns: 200px 1fr; min-height: 260px; }
.mock-side { border-right: 1px solid var(--line); padding: 16px; display: grid; gap: 8px; align-content: start; }
.mock-side div { padding: 8px 10px; border-radius: 8px; color: var(--muted); font-size: .9rem; }
.mock-side div.on { background: var(--soft); color: var(--brand); font-weight: 600; }
.mock-main { padding: 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; align-content: start; }
.mock-file { border: 1px solid var(--line); border-radius: 12px; padding: 14px; font-size: .9rem; }
.mock-file b { display: block; font-size: 1.6rem; }
section.block { padding: 88px 0; }
section.block.alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 48px; }
.section-head h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
.section-head p { color: var(--muted); font-size: 1.1rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.feature .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--soft); display: grid; place-items: center; font-size: 1.3rem; margin-bottom: 14px; }
.feature h3 { font-size: 1.1rem; }
.feature p { color: var(--muted); margin: 0; }
.pricing { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.plan { display: flex; flex-direction: column; position: relative; }
.plan.popular { border: 2px solid var(--brand); box-shadow: var(--shadow); }
.plan .tag { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--brand); color: #fff; font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.plan .price { font-size: 2rem; font-weight: 800; margin: 8px 0 2px; }
.plan .price small { font-size: .9rem; font-weight: 500; color: var(--muted); }
.plan ul { list-style: none; padding: 0; margin: 16px 0 20px; display: grid; gap: 8px; font-size: .92rem; flex: 1; }
.plan li::before { content: "✓"; color: var(--ok); font-weight: 700; margin-right: 8px; }
.plan.current { border-color: var(--ok); }
.check-list { list-style: none; padding: 0; display: grid; gap: 12px; }
.check-list li { padding-left: 30px; position: relative; }
.check-list li::before { content: "🔒"; position: absolute; left: 0; }
.job { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.job h3 { font-size: 1.05rem; margin: 0 0 4px; }
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; margin-top: 40px; }
.stats-row b { display: block; font-size: 2rem; }
footer.site-footer { padding: 48px 0; color: var(--muted); font-size: .92rem; }
footer.site-footer .container { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
footer.site-footer nav { display: flex; gap: 20px; flex-wrap: wrap; }

/* ---------- login ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; background:
  radial-gradient(700px 400px at 20% 0%, rgba(59,91,253,.14), transparent), radial-gradient(600px 400px at 100% 100%, rgba(124,58,237,.12), transparent); }
.auth-card { width: 100%; max-width: 420px; text-align: center; padding: 40px 32px; box-shadow: var(--shadow); }
.auth-card .gsi { display: flex; justify-content: center; margin: 24px 0 8px; min-height: 44px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .85rem; margin: 20px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.field { display: grid; gap: 6px; text-align: left; margin-bottom: 12px; }
.field label { font-size: .85rem; font-weight: 600; color: var(--muted); }
.input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.input:focus { outline: 2px solid rgba(59,91,253,.35); border-color: var(--brand); }
.notice { background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; padding: 10px 12px; border-radius: 10px; font-size: .85rem; text-align: left; }

/* ---------- app shell ---------- */
.shell { display: grid; grid-template-columns: 260px 1fr; grid-template-rows: 64px 1fr; height: 100vh; }
.topbar { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; padding: 0 20px; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar .logo { width: 220px; }
.search { flex: 1; max-width: 640px; position: relative; }
.search input { width: 100%; padding: 10px 16px 10px 40px; border-radius: 999px; border: 1px solid transparent; background: #eef1f7; }
.search input:focus { background: #fff; border-color: var(--line); outline: none; box-shadow: var(--shadow); }
.search::before { content: "⌕"; position: absolute; left: 15px; top: 50%; transform: translateY(-52%); color: var(--muted); font-size: 1.15rem; }
.user-chip { margin-left: auto; display: flex; align-items: center; gap: 10px; position: relative; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; display: grid; place-items: center; font-weight: 700; overflow: hidden; border: 0; cursor: pointer; padding: 0; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.menu { position: absolute; top: calc(100% + 8px); right: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); min-width: 240px; padding: 8px; z-index: 30; }
.menu .who { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.menu button, .menu a { display: block; width: 100%; text-align: left; padding: 9px 10px; border: 0; background: none; border-radius: 8px; cursor: pointer; color: var(--ink); font-size: .92rem; }
.menu button:hover, .menu a:hover { background: #f1f3f9; text-decoration: none; }
.sidebar { padding: 16px 12px; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 4px; overflow: auto; }
.new-wrap { position: relative; margin-bottom: 12px; }
.new-btn { padding: 12px 22px; border-radius: 14px; box-shadow: var(--shadow); }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 999px; color: var(--ink); cursor: pointer; border: 0; background: none; text-align: left; width: 100%; font-size: .95rem; }
.nav-item:hover { background: #f1f3f9; text-decoration: none; }
.nav-item.active { background: var(--soft); color: var(--brand); font-weight: 600; }
.count { margin-left: auto; background: var(--bad); color: #fff; border-radius: 999px; font-size: .72rem; padding: 1px 7px; }
.storage { margin-top: auto; padding: 14px; border-top: 1px solid var(--line); }
.meter { height: 6px; background: #e8ebf3; border-radius: 999px; overflow: hidden; margin: 8px 0; }
.meter > div { height: 100%; background: var(--brand); border-radius: 999px; width: 0; transition: width .3s; }
.meter.warn > div { background: var(--warn); } .meter.full > div { background: var(--bad); }
.main { overflow: auto; padding: 20px 28px 60px; position: relative; }
.main-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.crumbs { display: flex; align-items: center; gap: 4px; font-size: 1.35rem; font-weight: 600; flex-wrap: wrap; }
.crumbs button { border: 0; background: none; font: inherit; cursor: pointer; padding: 4px 10px; border-radius: 8px; color: var(--ink); }
.crumbs button:hover { background: #eef0f6; }
.crumbs span { color: var(--muted); }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; }
.bulkbar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--soft); border-radius: 12px; margin-bottom: 12px; }
table.list { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
table.list th { text-align: left; font-size: .8rem; color: var(--muted); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #fafbfe; }
table.list td { padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: .92rem; }
table.list tr:last-child td { border-bottom: 0; }
table.list tbody tr:hover { background: #f8f9fd; }
table.list .name { display: flex; align-items: center; gap: 10px; font-weight: 500; cursor: default; word-break: break-all; }
table.list .name.clickable { cursor: pointer; }
table.list .ficon { font-size: 1.2rem; width: 24px; text-align: center; }
.actions { display: flex; gap: 2px; justify-content: flex-end; }
.empty { text-align: center; padding: 72px 20px; color: var(--muted); background: var(--surface); border: 2px dashed var(--line); border-radius: var(--radius); }
.empty .big { font-size: 2.6rem; }
.dropzone { position: absolute; inset: 0; background: rgba(59,91,253,.08); border: 3px dashed var(--brand); border-radius: 16px; display: grid; place-items: center; font-size: 1.3rem; font-weight: 700; color: var(--brand); z-index: 20; pointer-events: none; }
.uploads { position: fixed; right: 20px; bottom: 20px; width: 340px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); z-index: 40; overflow: hidden; }
.uploads header { padding: 12px 16px; background: #1e2433; color: #fff; display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: .92rem; }
.uploads .body { padding: 14px 16px; font-size: .88rem; }
.tag-pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; text-transform: capitalize; }
.tag-pill.pending { background: #fef3c7; color: #92400e; } .tag-pill.approved, .tag-pill.active { background: #dcfce7; color: #166534; }
.tag-pill.modified { background: #e0e7ff; color: #3730a3; } .tag-pill.rejected, .tag-pill.suspended, .tag-pill.cancelled { background: #fee2e2; color: #991b1b; }
.tag-pill.admin { background: #ede9fe; color: #5b21b6; } .tag-pill.super_admin { background: #1e1b4b; color: #fff; } .tag-pill.user { background: #f1f5f9; color: #334155; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.kpi .v { font-size: 1.7rem; font-weight: 800; }
.kpi .l { color: var(--muted); font-size: .85rem; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 12px 16px; cursor: pointer; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.active { color: var(--brand); border-color: var(--brand); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* modal + toast */
.modal-bg { position: fixed; inset: 0; background: rgba(15,23,42,.45); display: grid; place-items: center; z-index: 50; padding: 20px; }
.modal { background: var(--surface); border-radius: 16px; padding: 24px; width: 100%; max-width: 460px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal h3 { margin-bottom: 12px; }
.modal .foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
#toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; z-index: 60; }
.toast { background: #1e2433; color: #fff; padding: 12px 18px; border-radius: 10px; box-shadow: var(--shadow); font-size: .92rem; }
.toast.err { background: var(--bad); }

@media (max-width: 1100px) { .pricing { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 860px) {
  .grid-3, .grid-2, .pricing, .stats-row, .kpis { grid-template-columns: 1fr 1fr; }
  .site-nav nav { display: none; }
  .shell { grid-template-columns: 1fr; grid-template-rows: 64px auto 1fr; }
  .sidebar { border-right: 0; border-bottom: 1px solid var(--line); flex-direction: row; flex-wrap: wrap; }
  .storage { display: none; } .topbar .logo { width: auto; }
  .mock-body { grid-template-columns: 1fr; } .mock-side { display: none; }
  .hide-sm { display: none; }
}
@media (max-width: 560px) { .grid-3, .grid-2, .pricing, .stats-row, .kpis { grid-template-columns: 1fr; } }
.center { text-align: center; } .mt { margin-top: 24px; } .full { width: 100%; }
.plan .tag { white-space: nowrap; }
.plan .price { white-space: nowrap; font-size: 1.75rem; }
body > .topbar { height: 64px; }
