:root {
  color-scheme: light;
  --bg: #f3f5f8;
  --surface: #ffffff;
  --surface-soft: #fafbfc;
  --sidebar: #172033;
  --sidebar-hover: #2a3548;
  --text: #172033;
  --muted: #718096;
  --border: #dfe4ea;
  --purple: #6d5ce7;
  --green: #22a06b;
  --amber: #e6a23c;
  --red: #df5454;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font-size: 14px; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 220px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; background: var(--sidebar); color: #fff; padding: 22px 14px; display: flex; flex-direction: column; gap: 24px; }
.brand { padding: 0 8px; display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 760; }
.brand-mark { width: 32px; height: 32px; border-radius: 9px; display: inline-grid; place-items: center; background: var(--purple); color: #fff; font-size: 13px; }
.nav { display: grid; gap: 5px; }
.nav a { padding: 10px 11px; border-radius: 8px; color: #bdc7d6; display: flex; align-items: center; gap: 10px; font-size: 13px; }
.nav a:hover, .nav a.active { background: var(--sidebar-hover); color: #fff; }
.nav a span { width: 18px; text-align: center; }
.sidebar-footer { margin-top: auto; border-top: 1px solid #2f3a4c; padding: 16px 8px 0; color: #9eabba; display: grid; gap: 8px; font-size: 11px; }
.system-ok { display: flex; align-items: center; gap: 6px; }.system-ok i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.main { min-width: 0; }
.topbar { height: 68px; padding: 0 26px; display: flex; align-items: center; justify-content: space-between; background: var(--surface); border-bottom: 1px solid var(--border); }
.topbar h1 { margin: 0; font-size: 19px; letter-spacing: -.025em; }
.profile { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }.profile form { margin: 0; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--purple); color: #fff; display: grid; place-items: center; font-weight: 700; }
.link-button { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 5px; }.link-button:hover { color: var(--text); }
.content { padding: 24px 26px 36px; }
.toolbar { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 18px; }.toolbar.end { justify-content: flex-end; }.toolbar-group { display: flex; flex-wrap: wrap; gap: 8px; }
input, select, textarea { border: 1px solid #d5dbe4; border-radius: 8px; background: #fff; color: var(--text); padding: 9px 10px; min-height: 38px; }
input[type="search"] { min-width: 240px; }
.button { border: 1px solid transparent; border-radius: 8px; min-height: 38px; padding: 8px 14px; display: inline-flex; justify-content: center; align-items: center; cursor: pointer; font-size: 12px; font-weight: 700; }.button.primary { background: var(--purple); border-color: var(--purple); color: #fff; }.button.secondary { background: #fff; border-color: #d5dbe4; color: var(--text); }.button.wide { width: 100%; }
.kpi-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 11px; margin-bottom: 17px; }.kpi-grid.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: 11px; padding: 15px; display: grid; gap: 6px; }.kpi span { font-size: 11px; color: var(--muted); }.kpi strong { font-size: 22px; letter-spacing: -.035em; }.kpi small { color: #8b96a7; font-size: 10px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 11px; overflow: hidden; }.panel-head { min-height: 58px; padding: 13px 16px; border-bottom: 1px solid #e8ebf0; display: flex; align-items: center; justify-content: space-between; gap: 14px; }.panel-head h2 { margin: 0 0 4px; font-size: 14px; }.panel-head p { margin: 0; color: var(--muted); font-size: 11px; }
.table-scroll { overflow-x: auto; }table { width: 100%; border-collapse: collapse; min-width: 840px; }th { padding: 11px 13px; text-align: left; background: var(--surface-soft); color: #788498; text-transform: uppercase; letter-spacing: .04em; font-size: 9px; white-space: nowrap; }td { padding: 12px 13px; border-top: 1px solid #edf0f3; font-size: 11px; white-space: nowrap; }tbody tr:hover { background: #fafbfc; }.muted { color: var(--muted); }.empty { padding: 36px; text-align: center; color: var(--muted); }
.tag { border: 1px solid #d9dfe7; border-radius: 5px; padding: 3px 6px; color: #59667a; font-size: 10px; }.text-link { color: #5e4ed0; font-weight: 700; }.text-link:hover { text-decoration: underline; }
.status { display: inline-flex; align-items: center; gap: 6px; }.status i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }.status.duplicate i, .status.planned i, .status.live i { background: var(--amber); }.status.error i { background: var(--red); }
.split-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }.form-panel { max-width: 720px; }.data-form { padding: 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }.data-form label { display: grid; gap: 6px; color: #596579; font-size: 11px; }.data-form textarea { resize: vertical; }.data-form ul.errorlist { margin: 0; padding-left: 16px; color: var(--red); }.field-error { color: var(--red); }.form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }
.flash { margin-bottom: 16px; border: 1px solid #b8e1cf; background: #edf9f3; color: #176a48; border-radius: 8px; padding: 10px 12px; font-size: 12px; }.form-error { border: 1px solid #f0b8b8; background: #fff2f2; color: #a92828; border-radius: 8px; padding: 10px 12px; font-size: 12px; }
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: #eef1f6; }.login-card { width: min(410px, 100%); background: #fff; border: 1px solid var(--border); border-radius: 15px; box-shadow: 0 20px 60px rgba(25, 35, 55, .12); padding: 30px; display: grid; gap: 23px; }.login-brand { display: flex; align-items: center; gap: 10px; }.login-card h1 { font-size: 23px; margin: 0 0 7px; }.login-card p { margin: 0; color: var(--muted); font-size: 12px; }.form-stack { display: grid; gap: 14px; }.form-stack label { display: grid; gap: 7px; color: #566277; font-size: 11px; }
code { font-size: 10px; color: #4f5c71; }
@media (max-width: 980px) { .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.split-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .app-shell { grid-template-columns: 1fr; }.sidebar { position: static; height: auto; padding: 12px; gap: 12px; }.nav { grid-template-columns: repeat(3, minmax(0, 1fr)); }.nav a { justify-content: center; }.sidebar-footer { display: none; }.topbar { padding: 0 16px; }.content { padding: 16px; }.data-form { grid-template-columns: 1fr; }.form-actions { grid-column: auto; }.profile > span:first-child { display: none; } }
