:root { --brand: #0f766e; --bg: #f5f7fb; --card: #ffffff; --text: #172033; --muted: #667085; --line: #e6eaf0; --danger: #b42318; --ok: #067647; --warn: #b54708; }
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--text); background: radial-gradient(circle at top left, rgba(15,118,110,.11), transparent 36rem), var(--bg); }
a { color: inherit; text-decoration: none; }
code { background: #eef2f6; padding: .1rem .35rem; border-radius: .35rem; }
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem clamp(1rem, 3vw, 2rem); background: rgba(255,255,255,.9); border-bottom: 1px solid var(--line); backdrop-filter: blur(12px); }
.brand { display: flex; align-items: center; gap: .75rem; min-width: 13rem; }
.brand img { width: 42px; height: 42px; object-fit: contain; border-radius: .75rem; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: .75rem; background: var(--brand); color: #fff; font-weight: 800; }
.brand span span, .brand small { display: block; }
.brand small { color: var(--muted); font-size: .76rem; margin-top: .1rem; }
.nav { display: flex; align-items: center; gap: .25rem; flex-wrap: wrap; justify-content: flex-end; }
.nav a { padding: .55rem .75rem; border-radius: .75rem; color: #344054; font-weight: 600; font-size: .94rem; }
.nav a:hover, .nav .admin-link { background: #eef8f6; color: var(--brand); }
.nav b { margin-left: .25rem; display: inline-grid; place-items: center; min-width: 1.35rem; height: 1.35rem; padding: 0 .25rem; border-radius: 99rem; background: var(--brand); color: #fff; font-size: .75rem; }
.menu-btn { display: none; border: 0; background: var(--brand); color: white; border-radius: .75rem; padding: .55rem .7rem; font-size: 1.1rem; }
.container { width: min(1180px, calc(100% - 2rem)); margin: 1.3rem auto 3rem; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin: 1rem 0 1.2rem; }
.eyebrow { display: inline-block; color: var(--brand); font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; margin-bottom: .4rem; }
h1 { margin: 0; font-size: clamp(1.8rem, 4vw, 3rem); line-height: 1.05; }
h2 { margin: 0 0 1rem; font-size: 1.18rem; }
p { color: var(--muted); line-height: 1.55; }
.card, .stat, .category-card { background: rgba(255,255,255,.92); border: 1px solid var(--line); border-radius: 1.2rem; box-shadow: 0 12px 36px rgba(16,24,40,.06); }
.card { padding: 1.1rem; margin-bottom: 1rem; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.stat { padding: 1rem; }
.stat span { display: block; color: var(--muted); font-weight: 650; font-size: .9rem; }
.stat strong { display: block; margin-top: .3rem; font-size: clamp(1.55rem, 4vw, 2.4rem); color: var(--brand); }
.grid.two { display: grid; grid-template-columns: 1.2fr .8fr; gap: 1rem; align-items: start; }
.cards-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.category-card { padding: 1rem; display: flex; flex-direction: column; gap: .35rem; min-height: 8rem; transition: transform .16s, box-shadow .16s; }
.category-card:hover { transform: translateY(-2px); box-shadow: 0 20px 48px rgba(16,24,40,.09); }
.category-card span { font-weight: 800; }
.category-card strong { color: var(--brand); font-size: 2rem; }
.category-card small, small { color: var(--muted); }
.auth-layout { min-height: calc(100vh - 8rem); display: grid; grid-template-columns: 1.1fr .8fr; gap: 1.5rem; align-items: center; }
.hero-card { padding: 2rem; }
.bold-line {font-size: 0.9rem; }
.hero-card h1 { font-size: clamp(2.2rem, 5vw, 4.2rem); }
.demo-box { margin-top: 1.5rem; padding: 1rem; border: 1px dashed var(--brand); border-radius: 1rem; background: rgba(255,255,255,.7); }
.auth-card { padding: 1.5rem; }
label { display: flex; flex-direction: column; gap: .35rem; font-weight: 700; color: #344054; font-size: .9rem; }
input, select { width: 100%; border: 1px solid #d0d5dd; border-radius: .75rem; padding: .72rem .85rem; background: #fff; color: var(--text); font: inherit; }
input:focus, select:focus { outline: 3px solid rgba(15,118,110,.16); border-color: var(--brand); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border: 1px solid #d0d5dd; background: #fff; color: #344054; border-radius: .8rem; padding: .72rem 1rem; font-weight: 800; cursor: pointer; font: inherit; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.ghost { background: #f8fafc; }
.btn.danger, .danger { color: var(--danger); border-color: #fecdca; background: #fff5f5; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.inline-form { display: flex; gap: .6rem; align-items: end; flex-wrap: wrap; }
.filter-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .9rem; align-items: end; }
.form-narrow { max-width: 620px; display: grid; gap: .9rem; }
.check { flex-direction: row; align-items: center; gap: .5rem; }
.check input { width: auto; }
.card-title { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.card-title a, .link { color: var(--brand); font-weight: 800; border: 0; background: none; padding: 0; cursor: pointer; font: inherit; }
.list { display: grid; gap: .5rem; }
.list-row { display: flex; align-items: center; justify-content: space-between; padding: .85rem; border: 1px solid var(--line); border-radius: .9rem; background: #fcfcfd; }
.list-row strong, .list-row small { display: block; }
.chev { font-size: 1.4rem; color: var(--brand); }
.bar-row { display: grid; grid-template-columns: 6rem 1fr 2rem; gap: .7rem; align-items: center; margin: .75rem 0; }
.bar-row div { height: .65rem; background: #edf2f7; border-radius: 99rem; overflow: hidden; }
.bar-row i { display: block; height: 100%; background: var(--brand); border-radius: 99rem; }
.empty { padding: .8rem; border-radius: .9rem; background: #f8fafc; border: 1px dashed #d0d5dd; }
.table-card { padding: 0; overflow: hidden; }
.table-card h2 { padding: 1rem 1rem 0; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 860px; }
th, td { padding: .8rem .9rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: #475467; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; background: #f8fafc; }
tr:hover td { background: #fcfcfd; }
.alert { padding: .85rem 1rem; border-radius: .9rem; margin-bottom: 1rem; font-weight: 700; }
.alert.error { background: #fff1f3; color: var(--danger); border: 1px solid #fecdca; }
.alert.success { background: #ecfdf3; color: var(--ok); border: 1px solid #abefc6; }
.notice, .notification { padding: .85rem; border: 1px solid var(--line); border-radius: .9rem; background: #fcfcfd; }
.notice.unread, .notification.unread { border-color: rgba(15,118,110,.35); background: #f0fdfa; }
.notice small { display: block; margin-top: .35rem; }
.notification { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: .6rem; }
.dot { width: .65rem; height: .65rem; border-radius: 99rem; background: var(--brand); margin-top: .25rem; }
.admin-shell { display: grid; grid-template-columns: 230px 1fr; gap: 1rem; align-items: start; }
.admin-menu { position: sticky; top: 5.4rem; display: grid; gap: .25rem; }
.admin-menu strong { margin-bottom: .5rem; }
.admin-menu a { padding: .7rem .8rem; border-radius: .75rem; color: #344054; font-weight: 700; }
.admin-menu a:hover { background: #eef8f6; color: var(--brand); }
.actions { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.badge { display: inline-block; padding: .25rem .55rem; border-radius: 99rem; font-weight: 800; font-size: .76rem; background: #eef2f6; }
.badge.published { color: var(--ok); background: #ecfdf3; }
.badge.draft { color: var(--warn); background: #fffaeb; }
.badge.error { color: var(--danger); background: #fff1f3; }
.row-error td { background: #fff8f8; color: #7a271a; }
.logo-preview { max-width: 190px; max-height: 100px; object-fit: contain; border: 1px solid var(--line); border-radius: .8rem; padding: .5rem; background: #fff; }
@media (max-width: 960px) {
  .stats-grid, .cards-grid, .filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.two, .auth-layout, .admin-shell { grid-template-columns: 1fr; }
  .admin-menu { position: static; }
  .page-head { flex-direction: column; }
}
@media (max-width: 720px) {
  .container { width: min(100% - 1rem, 1180px); }
  .topbar { align-items: flex-start; }
  .menu-btn { display: block; }
  .nav { display: none; position: absolute; top: 4.4rem; left: .5rem; right: .5rem; padding: .65rem; background: white; border: 1px solid var(--line); border-radius: 1rem; box-shadow: 0 16px 40px rgba(16,24,40,.14); flex-direction: column; align-items: stretch; }
  .nav.open { display: flex; }
  .nav a { width: 100%; }
  .stats-grid, .cards-grid, .filter-grid { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 5rem 1fr 2rem; }
  .brand { min-width: auto; }
  .brand small { display: none; }
}
