:root {
  --navy: #023370;
  --navy-2: #023370;
  --navy-soft: #e6eef7;
  --gold: #e0a84a;
  --accent: #e0a84a;
  --accent-ink: #1c1408;
  --gold-soft: #f8efd9;
  --ink: #1c1d1f;
  --muted: #6d6e71;
  --line: #e3e6eb;
  --paper: #f4f6f9;
  --white: #fff;
  --ok: #1f7a4d;
  --warn: #b45309;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(2, 51, 112, 0.08);
  --font: "Manrope", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.45 var(--font); }
a { color: var(--navy-2); text-decoration: none; }
button, .btn { font: inherit; cursor: pointer; }

.preview-bar {
  position: sticky; top: 0; z-index: 40;
  background: #fff; border-bottom: 1px solid var(--line);
  padding: 10px 20px 12px;
}
.preview-bar h1 { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: .02em; text-transform: uppercase; }
.accents { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; font-size: 13px; color: var(--muted); }
.accents .lab { margin-right: 4px; }
.accents button {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 5px 11px 5px 8px; font-size: 12px; color: var(--ink);
  display: inline-flex; align-items: center; gap: 6px;
}
.accents button i {
  width: 12px; height: 12px; border-radius: 50%; display: block; background: currentColor;
}
.accents button.on { border-color: var(--navy); box-shadow: 0 0 0 2px rgba(2, 51, 112, .18); font-weight: 700; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tabs button {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 6px 12px; font-size: 13px; color: var(--ink);
}
.tabs button.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.tabs .sep { width: 1px; background: var(--line); margin: 4px 6px; align-self: stretch; }

.screen { display: none; min-height: calc(100vh - 88px); }
.screen.on { display: block; }

.top {
  background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 28px; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .01em; color: #fff; cursor: pointer; }
.brand img, .cat { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: #fff; }
.userbar { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.points {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.12); border: 0; color: #fff;
  border-radius: 999px; padding: 6px 12px 6px 6px; font-weight: 700;
}
.coin {
  width: 28px; height: 28px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #f6d98a, #e0a84a 55%, #b8862e);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.35);
  position: relative;
}
.coin::after {
  content: "";
  position: absolute; inset: 7px;
  border-radius: 50%;
  border: 1.5px solid rgba(28, 20, 8, .28);
}
.pts-num { font-size: 16px; line-height: 1; }
.pts-lab { font-size: 12px; font-weight: 600; opacity: .85; }
.who {
  background: transparent; border: 0; color: #fff; font-weight: 700;
  padding: 8px 4px; font-size: 14px;
}
.who:hover { text-decoration: underline; }
.nav { display: flex; gap: 18px; font-size: 14px; }
.nav a { color: #d7e3f4; }
.nav a.active { color: #fff; font-weight: 600; }
.top .ghost { color: #fff; border: 1px solid rgba(255,255,255,.35); background: transparent; border-radius: 999px; padding: 8px 14px; }
.top .solid { background: var(--navy); color: #fff; border: 0; border-radius: 999px; padding: 8px 16px; font-weight: 700; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 28px 20px 64px; }
.hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: 28px; align-items: center; margin-bottom: 36px; }
.hero h2 { font-size: 42px; line-height: 1.12; margin: 0 0 12px; }
.hero h2 em { color: var(--navy-2); font-style: normal; }
.hero p { color: var(--muted); margin: 0 0 18px; max-width: 46ch; }
.hero-more {
  display: inline-flex; align-items: center;
  font-weight: 800; color: var(--navy); font-size: 16px;
}
.hero-more:hover { color: #034a9a; }
.search { display: flex; background: #fff; border-radius: 999px; box-shadow: var(--shadow); overflow: hidden; }
.search input { flex: 1; border: 0; padding: 14px 18px; outline: none; }
.search button { background: var(--accent); color: var(--accent-ink); border: 0; padding: 0 22px; font-weight: 700; }
.hero-card {
  background: linear-gradient(160deg, var(--navy) 0%, #034a9a 70%);
  color: #fff; border-radius: 22px; padding: 22px; box-shadow: var(--shadow); min-height: 220px;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.hero-card .chip { align-self: flex-start; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 800; letter-spacing: .04em; padding: 4px 10px; border-radius: 999px; margin-bottom: 12px; }
.hero-card h3 { margin: 0 0 8px; font-size: 26px; }
.meta { font-size: 13px; opacity: .9; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 8px 0 32px; }
.stat { background: #fff; border-radius: 14px; padding: 14px 16px; }
.stat b { display: block; font-size: 22px; color: var(--navy); }
.stat span { color: var(--muted); font-size: 13px; }

.hrow { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 8px 0 16px; }
.catalog-next { margin-top: 32px; }
#p-catalog .hrow + .hrow h3,
#p-catalog .catalog-next h3 { font-size: 18px; }
.hrow h3 { margin: 0; font-size: 22px; }
.pills { display: flex; gap: 8px; flex-wrap: wrap; }
.pill { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font-size: 13px; }
.pill.on { background: var(--navy); color: #fff; border-color: var(--navy); }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.cover { height: 128px; position: relative; }
.c1 { background: linear-gradient(135deg, #023370, #3a7bd5); }
.c2 { background: linear-gradient(135deg, #023370, var(--accent)); }
.c3 { background: linear-gradient(135deg, #1b3a6b, #6d6e71); }
.date-badge { position: absolute; top: 12px; right: 12px; background: #fff; border-radius: 12px; padding: 6px 8px; text-align: center; min-width: 46px; }
.date-badge b { display: block; font-size: 18px; color: var(--navy); line-height: 1; }
.date-badge span { font-size: 10px; color: var(--muted); letter-spacing: .06em; }
.card-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body h4 { margin: 0; font-size: 17px; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; }
.b { font-size: 12px; border-radius: 999px; padding: 3px 8px; font-weight: 700; }
.b-blue { background: var(--navy-soft); color: var(--navy); }
.b-gold { background: color-mix(in srgb, var(--accent) 18%, white); color: color-mix(in srgb, var(--accent) 45%, #1c1408); }
.b-ok { background: #e6f6ec; color: var(--ok); }
.b-wait { background: #fff4e5; color: var(--warn); }
.card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; font-size: 13px; color: var(--muted); }
.btn { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; padding: 10px 16px; border: 0; font-weight: 700; }
.btn-pri, .btn-gold { background: var(--navy); color: #fff; }
#p-catalog .top .solid,
#p-catalog .search button,
#p-catalog .hero-card .chip,
#p-catalog .btn-pri,
#p-catalog .btn-gold {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-line { background: #fff; border: 1px solid var(--line); color: var(--ink); }
.btn-danger { background: #fff; border: 1px solid #d9b; color: #8a2040; }

.event-hero { border-radius: 22px; overflow: hidden; min-height: 220px; background: linear-gradient(120deg, #023370, #034a9a 55%, var(--accent)); color: #fff; padding: 28px; display: flex; flex-direction: column; justify-content: flex-end; margin-bottom: 20px; }
.event-hero h2 { margin: 8px 0 6px; font-size: 32px; }
.cols { display: grid; grid-template-columns: 1.4fr .8fr; gap: 20px; }
.panel { background: #fff; border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); margin-bottom: 16px; }
.panel h3 { margin: 0 0 10px; font-size: 16px; }
.alert { background: color-mix(in srgb, var(--accent) 16%, white); border-left: 4px solid var(--accent); padding: 12px 14px; border-radius: 10px; font-size: 14px; }
.benefit { display: flex; gap: 12px; padding: 12px; border-radius: 12px; background: var(--navy-soft); margin-top: 10px; }
.benefit.gold { background: color-mix(in srgb, var(--accent) 16%, white); }
.benefit strong { display: block; }
.sticky { position: sticky; top: 100px; }
.ticket {
  background: #fff; border-radius: 22px; overflow: hidden;
  box-shadow: 0 16px 40px rgba(2, 51, 112, .12);
}
.ticket-top {
  display: flex; gap: 14px; align-items: center;
  background: linear-gradient(135deg, #023370, #0b4fa3);
  color: #fff; padding: 18px 18px 16px;
}
.ticket-top h3 { margin: 0; font-size: 18px; line-height: 1.25; }
.ticket-kicker { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .8; margin-bottom: 4px; }
.cal {
  flex-shrink: 0; width: 56px; background: #fff; color: var(--navy);
  border-radius: 12px; text-align: center; padding: 8px 0 6px;
}
.cal b { display: block; font-size: 22px; line-height: 1; }
.cal span { font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.ticket-meta { list-style: none; margin: 0; padding: 14px 18px 8px; }
.ticket-meta li {
  position: relative; padding: 7px 0 7px 22px; font-size: 14px; color: var(--ink);
}
.ticket-meta li::before {
  content: ""; position: absolute; left: 0; top: 12px;
  width: 8px; height: 8px; border-radius: 50%; background: var(--navy);
}
.ticket-perk {
  display: flex; gap: 10px; align-items: center;
  margin: 6px 18px 14px; padding: 12px;
  background: #f8efd9; border-radius: 14px;
}
.ticket-perk strong { display: block; color: #7a5a28; }
.ticket-perk span:last-child { font-size: 13px; color: #7a5a28; }
.seat-bar { padding: 0 18px 16px; }
.seat-lab { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; color: var(--muted); }
.seat-lab b { color: var(--navy); }
.seat-bar .track { height: 8px; background: var(--navy-soft); border-radius: 99px; overflow: hidden; }
.seat-bar .track i { display: block; height: 100%; background: linear-gradient(90deg, #023370, #e0a84a); }
.ticket .btn { margin: 8px 18px 18px; width: calc(100% - 36px); }
.ticket .hint { padding: 0 18px 16px; }
.sec-names { list-style: none; margin: 0; padding: 0; }
.sec-names li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.sec-names li:last-child { border-bottom: 0; }
.tour { padding: 12px 0; border-bottom: 1px solid var(--line); }
.tour:last-child { border-bottom: 0; }
.tour strong { display: block; margin-bottom: 4px; }
.tour p { margin: 0 0 6px; }
.year-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.shot {
  min-height: 132px; border-radius: 14px; padding: 14px;
  display: flex; align-items: flex-end; color: #fff; font-size: 13px; font-weight: 700;
}
.shot.s1 { background: linear-gradient(145deg, #023370, #5b8fd4); }
.shot.s2 { background: linear-gradient(145deg, #0b4fa3, #e0a84a); }
.shot.s3 { background: linear-gradient(145deg, #1b3a6b, #6d6e71); }
.shot.s4 { background: linear-gradient(145deg, #034a9a, #7eb8d4); }
.map-frame { width: 100%; height: 260px; border: 0; border-radius: 14px; }
.place { font-size: 14px; color: var(--muted); }
.slot { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }

.form label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 6px; }
.form input, .form select, .form textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font: inherit; background: #fff;
}
.form input[type="checkbox"] { width: auto; margin-top: 3px; }
.form .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-grid .span2 { grid-column: 1 / -1; }
.form-grid .field { margin-top: 12px; }
.form-grid .field label { margin: 0 0 6px; }
.opt { font-weight: 500; color: var(--muted); font-size: 12px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; margin: 14px 0; font-weight: 500; }
.form label.check { font-weight: 500; margin: 12px 0 4px; }
.companion { display: flex; gap: 8px; margin-bottom: 8px; }
.banner-drop {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-height: 120px; border: 1.5px dashed var(--line); border-radius: 14px;
  background: var(--paper); color: var(--muted); font-weight: 600; cursor: pointer;
}
.banner-drop input { display: none; }
.cond-box { background: var(--navy-soft); border-radius: 12px; padding: 4px 14px 12px; margin-top: 8px; }
.q-block { margin-top: 22px; padding-top: 8px; border-top: 1px solid var(--line); }
.q-card { background: var(--paper); border-radius: 14px; padding: 12px 14px; margin: 10px 0; }
.q-head { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-bottom: 8px; }
.q-head strong { font-size: 13px; }
.opt-row { display: flex; gap: 8px; margin: 6px 0; align-items: center; }
.opt-row input { flex: 1; }
.opt-row .btn { padding: 8px 12px; flex-shrink: 0; }

.cab-grid { display: grid; grid-template-columns: 280px 1fr; gap: 20px; }
#p-cabinet .wrap,
.screen.admin[data-role="admin"] .wrap {
  max-width: none;
  margin-left: max(10px, calc((100% - 1120px) / 4));
  margin-right: max(10px, calc((100% - 1120px) / 4));
  padding-left: 10px;
  padding-right: 10px;
}
.cab-shell { display: grid; grid-template-columns: 240px 1fr; gap: 40px; align-items: start; }
.cab-nav {
  background: #fff; border-radius: var(--radius); padding: 8px;
  box-shadow: var(--shadow); position: sticky; top: 88px;
}
.cab-nav button {
  display: block; width: 100%; text-align: left; border: 0; background: transparent;
  padding: 11px 14px; border-radius: 12px; font-weight: 600; color: var(--ink);
}
.cab-nav button.on { background: var(--navy); color: #fff; }
.cab-pane { display: none; }
.cab-pane.on { display: block; }
.profile-card {
  background: #fff; border-radius: 22px; padding: 22px;
  box-shadow: var(--shadow); display: grid; grid-template-columns: 120px 1fr;
  gap: 20px; align-items: center; margin-bottom: 16px;
}
.profile-card img { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; background: var(--navy-soft); }
.profile-card h2 { margin: 0 0 6px; font-size: 26px; }
.file-now { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.linkish { border: 0; background: none; color: var(--navy); font: inherit; font-weight: 700; padding: 0; }
.side { background: #fff; border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); text-align: center; }
.side img { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; }
.side h3 { margin: 8px 0 2px; }
.kpi { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.kpi-2 { grid-template-columns: repeat(2, 1fr); max-width: 520px; }
.kpi-5 { grid-template-columns: repeat(5, 1fr); }
.kpi .panel { margin: 0; text-align: center; }
.kpi b { font-size: 26px; color: var(--navy); display: block; }
.list-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: center; }
.row-actions { display: flex; gap: 8px; flex-shrink: 0; margin-left: auto; }

.auth { max-width: 440px; margin: 48px auto; background: #fff; border-radius: 22px; padding: 28px; box-shadow: var(--shadow); }
.auth.wide { max-width: 640px; }
.auth .cat { width: 64px; height: 64px; margin: 0 auto 8px; display: block; }
.auth h2 { text-align: center; margin: 0 0 6px; }
.auth .lead { text-align: center; color: var(--muted); margin-bottom: 18px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.say {
  display: flex; align-items: center; gap: 20px;
  margin-top: 28px; padding: 16px 22px;
  background: linear-gradient(100deg, var(--navy) 0%, #034a9a 100%);
  color: #fff; border-radius: 22px; box-shadow: var(--shadow);
}
.say img {
  width: 88px; height: 88px; border-radius: 50%; object-fit: cover;
  border: 3px solid var(--accent); flex-shrink: 0; background: #fff;
}
.bubble {
  position: relative;
  background: #fff; color: var(--navy);
  font-weight: 800; font-size: 22px;
  padding: 14px 22px; border-radius: 18px;
}
.bubble::before {
  content: "";
  position: absolute; left: -10px; top: 50%; margin-top: -8px;
  border: 8px solid transparent; border-right-color: #fff;
}

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
th { font-size: 12px; color: var(--muted); font-weight: 600; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; align-items: center; }
.row-link tbody tr, tr.clickable { cursor: pointer; }
.row-link tbody tr:hover, tr.clickable:hover { background: var(--navy-soft); }
.spark { display: flex; align-items: flex-end; gap: 3px; height: 28px; width: 72px; }
.spark i { flex: 1; background: var(--navy); border-radius: 2px 2px 0 0; min-height: 2px; }
.chart { display: flex; align-items: flex-end; gap: 8px; height: 140px; }
.chart span {
  flex: 1; background: linear-gradient(180deg, #3a7bd5, var(--navy));
  border-radius: 8px 8px 0 0; min-height: 8px;
}
.chart-lab { display: flex; justify-content: space-between; margin-top: 8px; font-size: 11px; color: var(--muted); }
.event-pick { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.event-pick select { font: inherit; font-weight: 600; color: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: #fff; }
.event-pick.full { width: 100%; margin: 8px 0 16px; }
.event-pick.full select { width: 100%; }
.check-row {
  display: flex; gap: 10px; align-items: center; justify-content: space-between;
  font-size: 14px; padding: 10px 0; border-bottom: 1px solid var(--line); font-weight: 500;
}
.check-row input { width: auto; margin: 0; }
.toolbar.split { justify-content: space-between; }
.toolbar-right { display: flex; gap: 8px; margin-left: auto; flex-shrink: 0; }
.search-wide { flex: 1; min-width: 0; width: 100%; border: 1px solid var(--line); border-radius: 999px; padding: 10px 16px; font: inherit; background: #fff; }
.delta { color: var(--ok); font-weight: 700; white-space: nowrap; }
.hbar { display: grid; grid-template-columns: 150px 1fr auto; gap: 10px; align-items: center; margin: 12px 0; font-size: 13px; }
.hbar-lab { color: var(--ink); }
.hbar .track { height: 10px; background: var(--navy-soft); border-radius: 99px; overflow: hidden; }
.hbar .track i { display: block; height: 100%; background: var(--navy); }
.hbar b { font-size: 13px; color: var(--navy); white-space: nowrap; }
.hbar .track i.ok { background: #1f7a4d; }
.hbar .track i.warn { background: #d97706; }
.hbar .track i.bad { background: #b42318; }
.hbar-note { margin: -4px 0 14px; font-size: 12px; font-weight: 600; }
.hbar-note.ok { color: #1f7a4d; }
.hbar-note.warn { color: #b45309; }
.hbar-note.bad { color: #b42318; }

.dash-hero {
  display: grid; grid-template-columns: 1fr 132px; gap: 18px; align-items: center;
  background: linear-gradient(115deg, #023370 0%, #0b4fa3 52%, #c9a14a 140%);
  color: #fff; border-radius: 22px; padding: 22px 24px; margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.dash-hero h2 { margin: 6px 0 8px; font-size: 26px; line-height: 1.2; }
.dash-hero p { margin: 0; opacity: .92; max-width: 62ch; }
.dash-kicker { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; opacity: .8; }
.dash-hero img {
  width: 120px; height: 120px; border-radius: 50%; object-fit: cover;
  border: 3px solid #fff; background: #fff; justify-self: end;
}
/* alert-row defined with alert-card below */
.chip-ok, .chip-warn, .chip-bad {
  border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 700;
}
.chip-ok { background: #e6f6ec; color: #1f7a4d; }
.chip-warn { background: #fff4e5; color: #b45309; }
.chip-bad { background: #fde8e6; color: #b42318; }
.dash-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.m-card {
  text-align: left; border: 0; border-radius: 16px; padding: 16px;
  box-shadow: var(--shadow); cursor: pointer; background: #fff;
  border-top: 5px solid var(--navy);
}
.m-card b { display: block; font-size: 32px; line-height: 1.1; margin: 8px 0 6px; color: var(--navy); }
.m-card.ok { border-top-color: #1f7a4d; background: linear-gradient(#fff, #f3faf6); }
.m-card.warn { border-top-color: #d97706; background: linear-gradient(#fff, #fff8f0); }
.m-card.bad { border-top-color: #b42318; background: linear-gradient(#fff, #fff6f5); }
.trend-up { color: #1f7a4d; font-size: 13px; font-weight: 700; }
.trend-down { color: #b42318; font-size: 13px; font-weight: 700; }
.trend-warn { color: #b45309; font-size: 13px; font-weight: 700; }
.todo-row {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 0;
  border-bottom: 1px solid var(--line); cursor: pointer;
}
.todo-row:hover strong { color: var(--navy); }
.dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }
.dot.ok { background: #1f7a4d; }
.dot.warn { background: #d97706; }
.dot.bad { background: #b42318; }
.filter-btn::before {
  content: "";
  display: inline-block; width: 12px; height: 12px; margin-right: 6px; vertical-align: -1px;
  background: currentColor;
  clip-path: polygon(0 0, 100% 0, 62% 48%, 62% 100%, 38% 88%, 38% 48%);
}
.filter-sheet {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px;
  background: #fff; border-radius: var(--radius); padding: 16px 18px;
  box-shadow: var(--shadow); margin: 0 0 14px;
}
.filter-sheet .field label { display: block; font-size: 13px; font-weight: 600; margin: 0 0 6px; }
.filter-sheet select { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font: inherit; background: #fff; }
.filter-sheet[hidden] { display: none; }
input.mini { width: 72px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font: inherit; }
.search-mini { border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; font: inherit; min-width: 220px; background: #fff; }
.toolbar select { border: 1px solid var(--line); border-radius: 999px; padding: 8px 12px; font: inherit; background: #fff; }

.mascot-row { display: flex; gap: 16px; align-items: center; background: #fff; border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); margin: 20px 0 0; }
.mascot-row img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.mascot-wide { width: 100%; border-radius: var(--radius); margin-top: 16px; display: block; }
.note { font-size: 12px; color: var(--muted); margin-top: 24px; }

.stats-filters {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px 16px;
  background: #fff;
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
  margin: 0 0 16px;
  align-items: end;
}
.stats-filters .field label { display: block; font-size: 13px; font-weight: 600; margin: 0 0 6px; }
.stats-filters select,
.stats-filters input[type="date"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  font: inherit;
  background: #fff;
}
.stats-filter-actions {
  grid-column: 1 / -1;
  display: flex;
  gap: 12px;
  align-items: center;
  padding-top: 4px;
}
.stats-kpis { grid-template-columns: repeat(3, 1fr); }
.stats-kpis .m-card { cursor: default; }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stats-grid .panel { margin: 0; }
.stats-grid .span2 { grid-column: 1 / -1; }
.stats-grid .place { margin: 0 0 12px; }
.line-chart { width: 100%; height: auto; display: block; }
.chart-color span.c1 { background: linear-gradient(180deg, #5b8ec9, #023370); }
.chart-color span.c2 { background: linear-gradient(180deg, #3a7bd5, #0b4fa3); }
.chart-color span.c3 { background: linear-gradient(180deg, #6bb7b5, #0b8f8c); }
.chart-color span.c4 { background: linear-gradient(180deg, #f0c36a, #d97706); }
.chart-color span.c5 { background: linear-gradient(180deg, #e0a84a, #b8862e); }
.chart-color span.c6 { background: linear-gradient(180deg, #4caf7a, #1f7a4d); }
.donut-wrap { display: flex; gap: 20px; align-items: center; }
.donut, .pie {
  width: 132px; height: 132px; border-radius: 50%; flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(2,51,112,.08);
}
.donut {
  background-color: var(--navy-soft);
  mask: radial-gradient(farthest-side, transparent calc(100% - 28px), #000 calc(100% - 27px));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 28px), #000 calc(100% - 27px));
}
.legend { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.legend li { display: flex; align-items: center; gap: 8px; margin: 6px 0; }
.legend.inline { display: flex; gap: 16px; margin-top: 12px; }
.legend i { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.lg-navy { background: #023370; }
.lg-blue { background: #3a7bd5; }
.lg-gold { background: #e0a84a; }
.lg-ok { background: #1f7a4d; }
.lg-teal { background: #0b8f8c; }
.lg-warn { background: #d97706; }
.lg-miss { background: #f3c4bf; }
.stack-chart { display: flex; align-items: flex-end; gap: 14px; height: 180px; padding-top: 8px; }
.stack-col { flex: 1; text-align: center; font-size: 11px; color: var(--muted); }
.stack-bars {
  height: 150px; display: flex; flex-direction: column-reverse; justify-content: flex-start;
  background: transparent; border-radius: 8px 8px 0 0; overflow: hidden; margin-bottom: 8px;
}
.stats-grid .hbar { grid-template-columns: minmax(160px, 0.55fr) 1fr; }
.stats-grid .hbar b { display: none; }
.stats-grid .hbar-lab { font-size: 12px; line-height: 1.3; }
.stack-bars i { display: block; width: 100%; }
.stack-bars i.came { background: #1f7a4d; }
.stack-bars i.miss { background: #f3c4bf; }
.funnel { display: flex; flex-direction: column; gap: 8px; align-items: center; }
.fn {
  color: #fff; font-weight: 600; font-size: 13px;
  padding: 10px 14px; text-align: center; border-radius: 10px;
  display: flex; justify-content: space-between; gap: 12px;
}
.fn b { font-size: 16px; }
.fn1 { width: 100%; background: #023370; }
.fn2 { width: 86%; background: #0b4fa3; }
.fn3 { width: 70%; background: #0b8f8c; }
.fn4 { width: 56%; background: #1f7a4d; }
.stats-export {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  background: #fff; border-radius: var(--radius); padding: 18px 20px;
  box-shadow: var(--shadow); margin: 16px 0 8px;
}
.stats-export p { margin: 4px 0 0; max-width: 62ch; }

.hero-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.all-events-foot { display: flex; justify-content: center; margin: 28px 0 8px; }
.note-panel { background: #f4f7fb; border: 1px solid #d5e0ee; }
.grade-row { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; }
.file-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.file-card h3 { margin-top: 0; }
.file-card .btn { margin-top: 10px; width: 100%; }
.chg-row { display: grid; grid-template-columns: 180px 1fr 44px; gap: 8px; margin-bottom: 10px; align-items: center; }
.addr-mini { grid-template-columns: repeat(3, 1fr); }
.filter-bar {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  background: #fff; padding: 14px 16px; border-radius: 18px;
  box-shadow: var(--shadow); margin: 8px 0 22px;
}
.filter-bar label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink); }
.filter-bar select {
  font: inherit; font-weight: 400; color: var(--ink); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; background: #fff;
}
.admin-filters { grid-template-columns: 1.4fr .8fr; align-items: end; }
.attend-filters { grid-template-columns: 1.6fr .7fr; align-items: end; margin-bottom: 12px; }
.diploma-filters { grid-template-columns: 1fr; align-items: end; }
.drop-box {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  min-height: 168px; padding: 22px; border-radius: 18px; cursor: pointer;
  background: #eef1f5; border: 1px dashed #b7c2d0; color: var(--navy);
}
.drop-box input { display: none; }
.drop-box strong { font-size: 16px; margin-bottom: 6px; }
.drop-box span { color: var(--muted); font-size: 13px; }
.drop-box em { margin-top: 10px; font-style: normal; font-size: 12px; color: #6b7789; }
.check.sq input { appearance: auto; width: 16px; height: 16px; border-radius: 3px; }
.sec-pick { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 16px; }
.sec-chip {
  border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 8px 14px; font: inherit; font-weight: 700; color: var(--navy); cursor: pointer;
}
.sec-chip.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.deg-grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin-bottom: 16px; }
.deg-grid .hrow { margin-bottom: 8px; }
.deg-grid .check-row { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.deg-grid .check-row small { display: block; }
.pick-list { margin: 0; }
#p-a-coins .pick-list { margin-bottom: 32px; }
.pick-list .check-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 8px 0; border-bottom: 1px solid var(--line);
}
.pick-list .check-row small { display: block; }
.alert-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 16px; }
.alert-card { border-radius: 16px; padding: 14px 16px; font-size: 14px; line-height: 1.4; }
.alert-card.warn { background: #fff6e8; color: #7a4a10; }
.alert-card.bad { background: #fdecea; color: #8a1f1f; }

.site-foot {
  background: var(--navy); color: #d5e2f2; margin-top: 32px; padding: 0;
}
.site-foot .wrap,
.site-foot .foot-inner {
  padding-top: 28px;
  padding-bottom: 28px;
}
.foot-grid { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 8px 32px; align-items: start; }
.foot-grid > div > :last-child { margin-bottom: 0 !important; }
.site-foot h4 {
  margin: 0 0 8px; color: #fff; font-size: 12px; font-weight: 800;
  letter-spacing: .06em; text-transform: uppercase;
}
.site-foot a, .site-foot p { display: block; color: #d5e2f2; margin: 0 0 4px; font-size: 13px; line-height: 1.35; }
.site-foot a:hover { color: var(--accent); }
.foot-vk {
  display: flex !important;
  align-items: center;
  gap: 8px;
}
.vk-ico { flex-shrink: 0; width: 16px; height: 10px; object-fit: contain; display: block; }
.foot-cta {
  display: inline-flex !important; margin-top: 6px !important; padding: 5px 12px;
  border-radius: 999px; background: var(--accent); color: var(--accent-ink) !important; font-weight: 800;
}
.foot-cta:hover { filter: brightness(1.05); color: var(--accent-ink) !important; }

.contacts-hero {
  display: grid; grid-template-columns: 1fr 180px; gap: 28px; align-items: center;
  background: linear-gradient(135deg, #023370, #0b4fa3);
  color: #fff; border-radius: 22px; padding: 28px 32px; margin-bottom: 18px;
}
.contacts-hero h2 { margin: 10px 0 10px; font-size: 32px; line-height: 1.15; }
.contacts-hero p { margin: 0 0 16px; max-width: 62ch; color: #d5e2f2; }
.contacts-hero img { width: 180px; height: 180px; border-radius: 50%; object-fit: cover; background: #fff; }
.contacts-chip {
  display: inline-block; background: rgba(255,255,255,.14); color: #fff;
  font-size: 12px; font-weight: 800; letter-spacing: .04em; padding: 4px 10px; border-radius: 999px;
}
.soc-row { display: flex; flex-wrap: wrap; gap: 8px; }
.soc-link {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px;
  border: 1.5px solid rgba(255,255,255,.55); background: transparent;
  color: #fff; font-size: 13px; font-weight: 700;
}
.soc-link:hover { background: rgba(255,255,255,.12); border-color: #fff; color: #fff; }
.soc-svg { flex-shrink: 0; display: block; }
.contact-tiles {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px;
}
.contact-tile {
  display: block; background: #fff; border-radius: 16px; padding: 16px 18px;
  box-shadow: var(--shadow); color: inherit;
}
.contact-tile span { display: block; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; margin-bottom: 6px; }
.contact-tile b { display: block; color: var(--navy); font-size: 16px; line-height: 1.3; }
.contact-tile small { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; }
.contacts-h { margin: 8px 0 12px; font-size: 22px; }
.staff-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 22px; }
.staff-lead { grid-template-columns: 1fr 1fr; }
.staff-card {
  display: flex; gap: 14px; align-items: center;
  background: #fff; border-radius: 16px; padding: 16px; box-shadow: var(--shadow);
}
.staff-card strong { display: block; margin-bottom: 4px; }
.staff-card span, .staff-card a { display: block; color: var(--muted); font-size: 13px; line-height: 1.4; }
.staff-card a { color: var(--navy); font-weight: 700; }
.staff-ava {
  flex-shrink: 0; width: 48px; height: 48px; border-radius: 50%;
  background: var(--navy-soft); color: var(--navy); font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.contacts-cat-card img {
  width: 100%; border-radius: 14px; margin-bottom: 12px; display: block;
}

/* Responsive breakpoints live at end of file */

/* —— Django bridges / aliases —— */
a.btn, button.btn { text-decoration: none !important; }
.btn-primary, .btn-pri { background: var(--navy); color: #fff !important; }
.btn-accent, .btn-gold { background: var(--accent); color: var(--accent-ink) !important; }
.btn-ghost, .btn-line { background: #fff; border: 1px solid var(--line); color: var(--ink) !important; }
.top .btn-ghost { color: #fff !important; border-color: rgba(255,255,255,.35); background: transparent; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-danger { background: #fff; border: 1px solid #d9b; color: #8a2040 !important; }
.card:not(:has(.cover)):not(:has(.card-body)) { padding: 18px 20px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid { display: grid; gap: 16px; }
.badge { display: inline-flex; align-items: center; border-radius: 999px; padding: 3px 8px; font-size: 12px; font-weight: 700; }
.b-warn, .b-wait { background: #fff4e5; color: var(--warn); }
.b-bad { background: #fde8e6; color: #b42318; }
.muted { color: var(--muted); font-size: 13px; }
.messages { list-style: none; padding: 0; margin: 0 0 16px; }
.messages li { padding: 12px 14px; border-radius: 12px; margin-bottom: 8px; background: var(--navy-soft); color: var(--navy); }
.messages li.error { background: #fde8e6; color: #b42318; }
.messages li.success { background: #e6f6ec; color: var(--ok); }
.messages li.warning { background: #fff4e5; color: var(--warn); }
.form .errorlist { color: #b42318; font-size: 13px; margin: 4px 0 0; padding-left: 16px; }
.form .field { margin-bottom: 4px; }
.form .help { color: var(--muted); font-size: 12px; margin-top: 4px; }
.table { width: 100%; border-collapse: collapse; background: #fff; }
.admin-shell .wrap {
  max-width: none;
  margin-left: max(10px, calc((100% - 1120px) / 4));
  margin-right: max(10px, calc((100% - 1120px) / 4));
  padding-left: 10px;
  padding-right: 10px;
}
.cab-nav a {
  display: block; width: 100%; text-align: left; border: 0; background: transparent;
  padding: 11px 14px; border-radius: 12px; font-weight: 600; color: var(--ink);
  text-decoration: none; font-size: 14px;
}
.cab-nav a:hover { background: var(--navy-soft); }
.cab-nav a.active, .cab-nav a.on { background: var(--navy); color: #fff; }
.cab-main { min-width: 0; }
.stat-num { font-size: 28px; color: var(--navy); display: block; line-height: 1.1; }
.todo-list { margin: 0; padding-left: 18px; }
.todo-list li { margin-bottom: 6px; }
.event-card-link { color: inherit; text-decoration: none; display: block; height: 100%; }
.event-card-link:hover { text-decoration: none; }
.top .brand { color: #fff !important; text-decoration: none !important; }
.guest-actions { display: flex; gap: 8px; align-items: center; }

a.points, a.who { text-decoration: none; color: #fff; }
a.points:hover { color: #fff; text-decoration: none; }
a.who:hover { color: #fff; text-decoration: underline; }
a.m-card { text-decoration: none; color: inherit; display: block; }
a.pill { text-decoration: none; color: inherit; }
a.pill:hover { text-decoration: none; }
.top .ghost {
  color: #fff; border: 1px solid rgba(255,255,255,.35); background: transparent;
  border-radius: 999px; padding: 8px 14px; text-decoration: none; font: inherit; cursor: pointer;
}
.top form { display: inline; margin: 0; }

/* Admin filter / search polish */
.event-pick select,
.filter-bar select,
.filter-bar input,
.attend-filters select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  background: #fff;
}
.filter-bar {
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  align-items: end;
}
a.pill { text-decoration: none; color: inherit; display: inline-flex; align-items: center; }
a.pill.on { color: #fff; }
.panel.form select,
.panel.form input:not([type=checkbox]):not([type=file]):not([type=hidden]),
.panel.form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  background: #fff;
  margin-bottom: 4px;
}
.banner-drop input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.banner-drop { position: relative; }
tr.clickable { cursor: pointer; }

/* Cabinet layout (mockup #p-cabinet .wrap) */
.cabinet-wrap {
  max-width: none;
  margin-left: max(10px, calc((100% - 1120px) / 4));
  margin-right: max(10px, calc((100% - 1120px) / 4));
  padding-left: 10px;
  padding-right: 10px;
}
.panel.form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 6px;
}
.panel.form .field { margin-top: 12px; }
.profile-card input:disabled,
.panel.form input:disabled,
.panel.form select:disabled {
  background: var(--paper); color: var(--ink); opacity: 1;
}
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 8px 0; }
.check input { width: auto; margin: 0; }

img, video, iframe, svg { max-width: 100%; height: auto; }
.map-frame { max-width: 100%; }
.table-scroll, .panel:has(> table), .panel:has(> .table) {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* —— Tablet landscape (compact desktop) —— */
@media (max-width: 1100px) {
  .top { padding: 12px 18px; }
  .wrap { padding: 24px 16px 48px; }
  .cab-shell { grid-template-columns: 200px 1fr; gap: 24px; }
  .cabinet-wrap,
  .admin-shell .wrap,
  #p-cabinet .wrap,
  .screen.admin[data-role="admin"] .wrap {
    margin-left: 12px;
    margin-right: 12px;
    padding-left: 8px;
    padding-right: 8px;
  }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .contact-tiles { grid-template-columns: repeat(2, 1fr); }
  .hero h2 { font-size: 36px; }
  .event-hero h2 { font-size: 28px; }
  .contacts-hero { grid-template-columns: 1fr 140px; padding: 22px; }
  .contacts-hero img { width: 140px; height: 140px; }
  .stats-kpis, .dash-kpis, .kpi-5 { grid-template-columns: repeat(3, 1fr); }
}

/* —— Tablet portrait & large phones —— */
@media (max-width: 900px) {
  .top {
    flex-wrap: wrap;
    padding: 10px 14px;
    gap: 10px;
  }
  .brand {
    font-size: 14px;
    line-height: 1.25;
    max-width: min(100%, 52vw);
  }
  .userbar {
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .who {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .wrap { padding: 20px 14px 40px; }
  .cabinet-wrap,
  .admin-shell .wrap,
  #p-cabinet .wrap,
  .screen.admin[data-role="admin"] .wrap {
    margin-left: 0;
    margin-right: 0;
    padding-left: 14px;
    padding-right: 14px;
  }

  .hero,
  .cols,
  .cab-grid,
  .cab-shell,
  .form-grid,
  .profile-card,
  .filter-sheet,
  .hbar,
  .dash-hero,
  .year-grid,
  .stats-filters,
  .stats-grid,
  .file-grid,
  .chg-row,
  .addr-mini,
  .filter-bar,
  .admin-filters,
  .attend-filters,
  .deg-grid,
  .alert-row,
  .foot-grid,
  .contacts-hero,
  .staff-grid,
  .staff-lead,
  .grid-3,
  .grid-2,
  .split { grid-template-columns: 1fr; }

  .grid { grid-template-columns: repeat(2, 1fr); }
  .contact-tiles { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .kpi, .dash-kpis, .stats-kpis, .kpi-5 { grid-template-columns: repeat(2, 1fr); }

  .cab-shell { gap: 16px; }
  .cab-nav {
    position: static;
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding: 8px;
  }
  .cab-nav a,
  .cab-nav button {
    flex: 0 0 auto;
    width: auto;
    white-space: nowrap;
    padding: 10px 14px;
  }

  .profile-card {
    grid-template-columns: 96px 1fr;
    gap: 16px;
    padding: 16px;
  }
  .profile-card img { width: 96px; height: 96px; }
  .profile-card h2 { font-size: 22px; }

  .hero { gap: 18px; margin-bottom: 24px; }
  .hero h2 { font-size: 30px; }
  .hero-card { min-height: 180px; }
  .hero-card h3 { font-size: 22px; }
  .event-hero { min-height: 180px; padding: 20px; }
  .event-hero h2 { font-size: 24px; }
  .sticky { position: static; }

  .hrow {
    flex-direction: column;
    align-items: flex-start;
  }
  .pills { width: 100%; }
  .list-row {
    flex-wrap: wrap;
    align-items: flex-start;
  }
  .row-actions {
    width: 100%;
    margin-left: 0;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .contacts-hero {
    grid-template-columns: 1fr;
    text-align: left;
    justify-items: start;
  }
  .contacts-hero img {
    width: 120px;
    height: 120px;
    order: -1;
  }
  .contacts-hero h2 { font-size: 26px; }

  .auth { margin: 28px 14px; padding: 22px 18px; }
  .auth.wide { max-width: none; }

  .companion { flex-direction: column; }
  .opt-row { flex-wrap: wrap; }
  .ticket .btn { width: calc(100% - 36px); }

  .bubble { font-size: 18px; }
  .say { flex-direction: column; align-items: flex-start; gap: 12px; }
  .bubble::before { display: none; }
  .donut-wrap { flex-direction: column; align-items: flex-start; }
  .stats-export { flex-direction: column; align-items: stretch; }
  .stats-grid .span2 { grid-column: auto; }
  .guest-actions { width: auto; }

  .slot {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .q-head { flex-wrap: wrap; }
  .stack-chart { overflow-x: auto; }
  .fn2, .fn3, .fn4 { width: 100%; }
}

/* —— Phone portrait —— */
@media (max-width: 600px) {
  .top { padding: 10px 12px; gap: 8px; }
  .brand {
    font-size: 13px;
    max-width: 100%;
    flex: 1 1 100%;
  }
  .admin-shell .brand {
    font-size: 12px;
    line-height: 1.3;
  }
  .admin-shell .userbar {
    width: 100%;
    justify-content: flex-start;
    gap: 6px;
  }
  .admin-shell .who {
    max-width: 36vw;
  }
  .userbar {
    width: 100%;
    justify-content: space-between;
  }
  .points { padding: 5px 10px 5px 5px; }
  .pts-lab { display: none; }
  .who {
    max-width: 42vw;
    font-size: 13px;
    padding: 6px 2px;
  }
  .top .ghost { padding: 7px 12px; font-size: 13px; }

  .wrap { padding: 16px 12px 36px; }
  .cabinet-wrap,
  .admin-shell .wrap {
    padding-left: 12px;
    padding-right: 12px;
  }

  .grid,
  .contact-tiles,
  .stats,
  .kpi,
  .dash-kpis,
  .stats-kpis,
  .kpi-2,
  .kpi-5,
  .grid-3,
  .grid-2 { grid-template-columns: 1fr; }

  .hero h2 { font-size: 26px; }
  .hero-card h3 { font-size: 20px; }
  .event-hero h2 { font-size: 22px; }
  .contacts-hero h2 { font-size: 22px; }
  .hrow h3, .contacts-h { font-size: 18px; }

  .profile-card {
    grid-template-columns: 1fr;
    justify-items: start;
    text-align: left;
  }
  .profile-card img { width: 88px; height: 88px; }

  .panel { padding: 14px 14px; }
  .kpi .panel { padding: 12px; }
  .kpi b { font-size: 22px; }
  .stat b { font-size: 20px; }

  .form-grid { grid-template-columns: 1fr; }
  .btn, .btn-pri, .btn-gold, .btn-line, .btn-danger {
    width: 100%;
    justify-content: center;
  }
  .row .btn,
  .row-actions .btn,
  .hero-cta .btn,
  .soc-row .soc-link,
  .pills .pill,
  .guest-actions .btn,
  .guest-actions .ghost,
  .ticket .btn { width: auto; }
  .row-actions .btn { flex: 1 1 auto; min-width: 0; }

  .list-row {
    flex-direction: column;
    align-items: stretch;
  }
  .card-foot {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .filter-bar,
  .admin-filters,
  .attend-filters { grid-template-columns: 1fr; }
  .chg-row { grid-template-columns: 1fr; }
  .staff-card { align-items: flex-start; }

  table { font-size: 13px; }
  th, td { padding: 8px 6px; }

  .site-foot .wrap,
  .site-foot .foot-inner { padding-top: 22px; padding-bottom: 22px; }
  .auth { margin: 20px 12px; }
  .map-frame { height: 200px; }
  .cover { height: 112px; }
}

/* —— Phone / small tablet landscape —— */
@media (max-height: 500px) and (orientation: landscape) {
  .top { padding: 8px 14px; }
  .wrap { padding-top: 14px; padding-bottom: 28px; }
  .hero { margin-bottom: 18px; gap: 14px; }
  .hero h2 { font-size: 24px; }
  .hero-card { min-height: 140px; padding: 16px; }
  .event-hero { min-height: 140px; padding: 16px; }
  .auth { margin: 16px auto; padding: 18px; }
  .cab-nav { top: 64px; }
  .profile-card { padding: 14px; margin-bottom: 12px; }
  .kpi { margin-bottom: 12px; }
}

/* —— Tablet portrait preference: keep 2-col cards —— */
@media (min-width: 601px) and (max-width: 900px) and (orientation: portrait) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .contact-tiles { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .kpi { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .cab-shell { grid-template-columns: 1fr; }
}

/* —— Tablet landscape: sidebar + content when width allows —— */
@media (min-width: 901px) and (max-width: 1100px) and (orientation: landscape) {
  .cab-shell { grid-template-columns: 180px 1fr; gap: 20px; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .foot-grid { grid-template-columns: repeat(3, 1fr); }
}

/* —— Narrow landscape phones: horizontal nav, compact type —— */
@media (max-width: 900px) and (orientation: landscape) {
  .brand { max-width: 40vw; font-size: 13px; }
  .who { max-width: 28vw; }
  .pts-lab { display: none; }
  .hero,
  .cols { grid-template-columns: 1fr 1fr; }
  .contacts-hero { grid-template-columns: 1fr 100px; }
  .contacts-hero img { width: 100px; height: 100px; order: 0; }
  .grid { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .profile-card { grid-template-columns: 72px 1fr; }
  .profile-card img { width: 72px; height: 72px; }
  .btn, .btn-pri, .btn-gold, .btn-line, .btn-danger { width: auto; }
}

@media (max-width: 600px) and (orientation: landscape) {
  .hero,
  .cols,
  .contacts-hero { grid-template-columns: 1fr; }
  .grid,
  .stats,
  .kpi { grid-template-columns: repeat(2, 1fr); }
  .brand { flex: 1 1 auto; max-width: 36vw; }
  .userbar { width: auto; }
}
