:root {
  --bg: #f5f7fb;
  --surface: rgba(255,255,255,0.9);
  --surface-strong: #ffffff;
  --text: #172033;
  --muted: #667085;
  --line: #dfe5f1;
  --primary: #4f46e5;
  --primary-2: #7c3aed;
  --accent: #0ea5e9;
  --success: #0f9d58;
  --warning: #b7791f;
  --danger: #c53030;
  --shadow: 0 20px 45px rgba(35, 52, 102, 0.12);
  --radius: 22px;
}
* { 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(79,70,229,0.12), transparent 28%),
    radial-gradient(circle at top right, rgba(14,165,233,0.12), transparent 24%),
    var(--bg);
}
a { color: inherit; text-decoration: none; }
.container { width: min(1180px, calc(100% - 32px)); margin: 0 auto; }
.site-header { position: sticky; top: 0; z-index: 10; backdrop-filter: blur(18px); background: rgba(245,247,251,0.85); border-bottom: 1px solid rgba(223,229,241,0.9); }
.header-inner, .footer-inner { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; gap: 20px; }
.brand { font-weight: 800; font-size: 1.1rem; }
.nav { display: flex; flex-wrap: wrap; gap: 14px; font-weight: 600; }
.nav a { padding: 10px 14px; border-radius: 999px; }
.nav a:hover { background: rgba(79,70,229,0.08); color: var(--primary); }
.page-shell { padding: 34px 0 54px; }
.site-footer { border-top: 1px solid var(--line); margin-top: 48px; color: var(--muted); }
.card {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.75);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px;
}
.gradient-card {
  background: linear-gradient(135deg, rgba(79,70,229,0.94), rgba(14,165,233,0.86));
  color: white;
}
.gradient-card p, .gradient-card .eyebrow { color: rgba(255,255,255,0.88); }
.eyebrow { text-transform: uppercase; font-size: .75rem; font-weight: 800; letter-spacing: .08em; color: var(--primary); }
h1, h2, h3 { margin: 0 0 12px; line-height: 1.1; }
h1 { font-size: clamp(2rem, 4vw, 3.1rem); }
h2 { font-size: 1.25rem; }
p { line-height: 1.65; }
.muted { color: var(--muted); }
.hero-actions, .split-head, .section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 18px; border-radius: 14px; border: none; cursor: pointer; font-weight: 700; font-size: 0.96rem;
}
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-2)); color: white; }
.btn-secondary { background: #eef2ff; color: var(--primary); }
.btn:hover { transform: translateY(-1px); }
.stats-grid, .grid-2, .mini-grid { display: grid; gap: 18px; }
.stats-grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); margin-top: 22px; }
.grid-2 { grid-template-columns: 1.25fr .95fr; margin-bottom: 24px; }
.align-start { align-items: start; }
.stack { display: grid; gap: 18px; }
.stat-card { display: grid; gap: 8px; }
.stat-value { font-size: 2rem; font-weight: 800; }
.stat-label { color: var(--muted); }
.mini-grid { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.mini-stat { padding: 14px; background: #f8faff; border-radius: 16px; border: 1px solid var(--line); display: grid; gap: 6px; }
.chip-list, .checkbox-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.chip, .link-chip { padding: 10px 14px; border-radius: 999px; background: #f8faff; border: 1px solid var(--line); font-weight: 600; }
.link-chip:hover { border-color: var(--primary); color: var(--primary); }
.form-card { display: grid; gap: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
label, fieldset { display: grid; gap: 8px; font-weight: 600; }
input, select, textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 14px; padding: 13px 15px;
  font: inherit; color: var(--text); background: var(--surface-strong);
}
textarea { resize: vertical; }
fieldset { border: 1px solid var(--line); padding: 16px; border-radius: 18px; }
.checkbox-inline { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.checkbox-inline input { width: auto; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 14px 12px; text-align: left; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: .9rem; }
.status-badge {
  display: inline-flex; padding: 7px 12px; border-radius: 999px; background: #eef2ff; color: var(--primary); font-weight: 700; font-size: .9rem;
}
.status-badge.big { font-size: 1rem; padding: 10px 14px; }
.status-new { background: #dbeafe; color: #1d4ed8; }
.status-progress { background: #fde68a; color: #92400e; }
.status-waiting { background: #e9d5ff; color: #7e22ce; }
.status-refused { background: #fecdd3; color: #be123c; }
.status-resolved { background: #bbf7d0; color: #166534; }
.status-closed { background: #e5e7eb; color: #374151; }
.flash-stack { display: grid; gap: 12px; margin-bottom: 16px; }
.flash { padding: 14px 16px; border-radius: 16px; font-weight: 600; }
.flash-success { background: #e8fff1; color: #12663f; }
.flash-danger { background: #fff0f0; color: #9f1d1d; }
.flash-warning { background: #fff9e8; color: #8a5b0e; }
.flash-info { background: #eef6ff; color: #185899; }
.auth-wrap { min-height: 62vh; display: grid; place-items: center; }
.auth-card { width: min(460px, 100%); }
.wide-form { max-width: 980px; }
.meta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin: 18px 0; }
.content-box, .note-box {
  background: #f8faff; border: 1px solid var(--line); border-radius: 18px; padding: 18px; margin-top: 16px; line-height: 1.65;
}
.note-box { background: #fff8e8; }
.timeline { display: grid; gap: 12px; }
.timeline-item { padding: 16px; border-radius: 16px; background: #f8faff; border: 1px solid var(--line); }
.timeline-item.internal { border-left: 5px solid var(--warning); }
.timeline-meta { font-weight: 700; margin-bottom: 10px; color: var(--muted); }
.filter-bar { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.filter-bar select { min-width: 220px; }
.compact-card h2 { font-size: 1.05rem; }
@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .header-inner, .footer-inner { flex-direction: column; align-items: flex-start; }
}
