:root {
  --navy: #10243e;
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --gold: #d6a84b;
  --bg: #f3f6fa;
  --card: #ffffff;
  --text: #172033;
  --muted: #64748b;
  --border: #dbe3ee;
  --green: #15803d;
  --red: #b91c1c;
  --amber: #b45309;
  --shadow: 0 12px 34px rgba(16, 36, 62, .1);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}
a { color: inherit; }
header {
  color: white;
  background: linear-gradient(135deg, var(--navy), #1e4775);
  padding: 20px clamp(18px, 4vw, 64px);
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: 1200px;
  margin: auto;
}
.brand { font-size: 20px; font-weight: 800; letter-spacing: .3px; }
.brand span { color: var(--gold); }
.back { text-decoration: none; opacity: .9; }
.hero {
  max-width: 1200px;
  margin: auto;
  padding: 62px 0 46px;
}
.hero h1 { margin: 0 0 12px; font-size: clamp(34px, 6vw, 64px); line-height: 1.05; }
.hero p { max-width: 720px; margin: 0; color: #dbeafe; font-size: 18px; line-height: 1.6; }
main { max-width: 1200px; margin: 0 auto; padding: 34px clamp(16px, 4vw, 48px) 70px; }
.demo-banner {
  background: #fff7df;
  border: 1px solid #f0d58e;
  color: #6b4c00;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 24px;
}
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 20px; }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--shadow);
}
.app-card { display: flex; flex-direction: column; min-height: 240px; }
.app-card .icon { font-size: 34px; }
.app-card h2 { margin: 14px 0 8px; font-size: 21px; }
.app-card p { color: var(--muted); line-height: 1.55; flex: 1; }
.button, button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 9px;
  padding: 10px 16px;
  background: var(--blue);
  color: white;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
}
.button:hover, button:hover { background: var(--blue-dark); }
.button.secondary, button.secondary { background: #e7edf5; color: var(--navy); }
.button.danger, button.danger { background: var(--red); }
.button.success, button.success { background: var(--green); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
h1, h2, h3 { color: inherit; }
.page-title { margin: 0; }
.subtitle { color: #dbeafe; margin: 6px 0 0; }
.section-title { margin: 30px 0 14px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(155px, 1fr)); gap: 14px; margin: 20px 0; }
.stat { background: white; border: 1px solid var(--border); border-radius: 13px; padding: 18px; }
.stat strong { display: block; font-size: 28px; color: var(--navy); }
.stat span { color: var(--muted); font-size: 13px; }
form { display: grid; gap: 16px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
label { display: grid; gap: 6px; color: #334155; font-weight: 650; }
input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: white;
  color: var(--text);
  font: inherit;
}
textarea { min-height: 90px; resize: vertical; }
table { width: 100%; border-collapse: collapse; background: white; }
th, td { padding: 11px 10px; text-align: left; border-bottom: 1px solid var(--border); }
th { color: #475569; font-size: 13px; background: #f8fafc; }
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; }
.badge { display: inline-block; padding: 4px 9px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.badge.green { background: #dcfce7; color: #166534; }
.badge.red { background: #fee2e2; color: #991b1b; }
.badge.amber { background: #fef3c7; color: #92400e; }
.empty { padding: 26px; color: var(--muted); text-align: center; }
.rating { display: flex; flex-wrap: wrap; gap: 8px; }
.rating input { position: absolute; opacity: 0; pointer-events: none; }
.rating label {
  display: inline-flex;
  width: 45px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
}
.rating input:checked + label { background: var(--blue); color: white; border-color: var(--blue); }
.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  padding: 12px 18px;
  border-radius: 10px;
  color: white;
  background: var(--green);
  box-shadow: var(--shadow);
  z-index: 10;
}
.hidden { display: none !important; }
.toolbar { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.toolbar label { min-width: 160px; }
.criteria { display: grid; gap: 12px; }
.criterion { display: grid; grid-template-columns: 1fr minmax(160px, 250px); align-items: center; gap: 20px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.menu-section { border-left: 4px solid var(--gold); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip { background: #e8eef7; border-radius: 999px; padding: 7px 11px; font-size: 13px; }
.chip button { background: transparent; color: var(--red); padding: 0 0 0 5px; }
footer { text-align: center; color: var(--muted); padding: 28px; }
@media (max-width: 640px) {
  .criterion { grid-template-columns: 1fr; gap: 8px; }
  .hero { padding-top: 38px; }
}
@media print {
  header, .demo-banner, .no-print, footer { display: none !important; }
  body, main { background: white; padding: 0; }
  .card { box-shadow: none; }
}
