/* Концепция прежней платформы (шапка #162256, карточки, Material, Roboto) с обновлёнными элементами. */
:root {
  --navy: #162256; --blue: #18478d; --accent: #86d0f3; --accent-d: #5bbbe8; --sky: #009fe3;
  --red: #f44336; --red-d: #c3272a; --ink: #1d1d1d; --label: #162256; --muted: #666; --line: #dfe3ec; --gray: #e5e5e5; --page: #f4f6fb; --medium: #22528b;
  --sans: Roboto, 'Helvetica Neue', Arial, sans-serif;
  --shadow: 0 2px 1px -1px rgba(0,0,0,.2), 0 1px 1px 0 rgba(0,0,0,.14), 0 1px 3px 0 rgba(0,0,0,.12);
  --shadow-2: 0 3px 1px -2px rgba(0,0,0,.2), 0 2px 2px 0 rgba(0,0,0,.14), 0 1px 5px 0 rgba(0,0,0,.12);
  --focus: 0 0 0 3px rgba(134,208,243,.7);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 16px/1.5 var(--sans); color: var(--ink); background: var(--page); min-height: 100vh; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
main { padding-bottom: 56px; outline: none; }
h1, h2, h3 { font-family: var(--sans); color: var(--navy); font-weight: 400; line-height: 1.3; margin: 0 0 .6em; }
h1 { font-size: 28px; font-weight: 500; } h2 { font-size: 20px; } h3 { font-size: 18px; font-weight: 500; }
a { color: var(--navy); } a:hover { color: var(--blue); }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 2px; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 8px; top: 8px; background: #fff; padding: 8px 12px; z-index: 99; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 40px; }
.wrap.narrow { max-width: 620px; }
.muted { color: var(--muted); } .small { font-size: 14px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; } .push { margin-left: auto; }
.material-icons { font-family: 'Material Icons'; font-weight: 400; font-style: normal; font-size: 24px; line-height: 1; display: inline-block; letter-spacing: normal; text-transform: none; white-space: nowrap; direction: ltr; -webkit-font-smoothing: antialiased; font-feature-settings: 'liga'; }

/* шапка: две строки, как в прежней версии */
.top { background: var(--navy); color: #fff; position: sticky; top: 0; z-index: 30; }
.top .bar { display: flex; align-items: center; min-height: 64px; padding: 0 16px; }
.brand { display: flex; align-items: center; gap: 14px; color: #fff; text-decoration: none; }
.brand img { height: 38px; width: auto; display: block; }
.brand .wm { display: grid; line-height: 1.1; letter-spacing: .34em; font-weight: 500; font-size: 14px; } .brand .wm small { font-size: 11px; font-weight: 400; letter-spacing: .5em; }
.acct { margin-left: auto; display: flex; align-items: center; gap: 28px; font-size: 15px; }
.acct a, .acct button { color: #fff; text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; padding: 6px 0; } .acct a:hover, .acct button:hover { color: var(--accent); }
.nav { display: flex; gap: 6px; padding: 0 12px 4px; flex-wrap: wrap; }
.nav a { color: #fff; text-decoration: none; padding: 6px 12px; font-size: 15px; font-weight: 500; border-bottom: 2px solid transparent; opacity: .92; }
.nav a:hover { opacity: 1; color: #fff; border-color: rgba(134,208,243,.6); } .nav a.on { opacity: 1; border-color: var(--accent); }

/* заголовок страницы и панель действий */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 32px 0 16px; }
.page-head h1 { margin: 0; color: var(--navy); }
.title-line { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; } .count { color: var(--muted); font-size: 15px; }
.segs { display: flex; background: #fff; border-radius: 4px; box-shadow: var(--shadow); overflow: hidden; }
.seg { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; color: var(--navy); font: 400 15px var(--sans); padding: 0 14px; min-height: 40px; cursor: pointer; }
.seg .material-icons { font-size: 20px; } .seg:hover { background: #eef1f8; } .seg.on { background: var(--navy); color: #fff; }

/* кнопки */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 0 16px; border-radius: 4px; border: 0; background: var(--navy); color: #fff; font: 500 14px var(--sans); text-decoration: none; cursor: pointer; box-shadow: var(--shadow-2); transition: box-shadow .15s, background .15s; }
.btn:hover { background: #1f2f78; color: #fff; box-shadow: 0 2px 4px -1px rgba(0,0,0,.2), 0 4px 5px 0 rgba(0,0,0,.14), 0 1px 10px 0 rgba(0,0,0,.12); }
.btn.accent { background: var(--accent); color: #000; } .btn.accent:hover { background: var(--accent-d); color: #000; }
.btn.ghost, .btn.light { background: #fff; color: #000; } .btn.ghost:hover, .btn.light:hover { background: #f1f1f1; color: #000; }
.btn.danger { background: var(--red); color: #fff; } .btn.danger:hover { background: #e53a2e; }
.btn.danger.ghost, .btn.text-danger { background: #fff; color: var(--red-d); } .btn.danger.ghost:hover, .btn.text-danger:hover { background: #fdecea; color: var(--red-d); }
.btn.wide { width: 100%; min-height: 44px; font-size: 15px; }
.btn.sm { min-height: 32px; padding: 0 12px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
.link { background: none; border: 0; padding: 0; color: var(--navy); font: inherit; text-decoration: underline; cursor: pointer; }

/* поля Material: подпись над линией */
input, select, textarea { font: 400 16px var(--sans); color: #000; background: transparent; border: 0; border-bottom: 1px solid #757575; border-radius: 0; padding: 6px 0 6px; min-height: 34px; width: 100%; }
textarea { border: 1px solid #757575; border-radius: 4px; padding: 8px 10px; }
select { padding-right: 18px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--navy); box-shadow: 0 1px 0 0 var(--navy); } textarea:focus { box-shadow: 0 0 0 1px var(--navy); }
input::placeholder, textarea::placeholder { color: #8a8a8a; }
.field { display: grid; gap: 0; align-content: start; }
.field label { font-size: 12px; color: #666; padding-bottom: 2px; } .field:focus-within label { color: var(--navy); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--red-d); box-shadow: 0 1px 0 0 var(--red-d); } .field.has-error label { color: var(--red-d); }
.field-msg { margin: 4px 0 0; font-size: 12px; color: var(--muted); } .field-msg.err { color: var(--red-d); }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px 32px; } .grid2 .wide { grid-column: 1 / -1; } .grid2.tight { gap: 22px 16px; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 15px; } .check input { width: 18px; min-height: 18px; margin-top: 2px; accent-color: var(--navy); flex: none; }

/* фильтры афиши */
.campus-bar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.camp { border: 1px solid #c3c9d9; background: #fff; color: var(--navy); border-radius: 18px; min-height: 36px; padding: 0 16px; font: 400 15px var(--sans); cursor: pointer; }
.camp:hover { border-color: var(--navy); } .camp.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.filters { display: flex; gap: 12px 24px; flex-wrap: wrap; align-items: flex-end; margin: 0 0 28px; }
.filters .field { min-width: 160px; flex: 0 1 180px; } .filters .field.grow { flex: 1 1 260px; } .filters > select { flex: 0 1 240px; width: auto; }
.field select, .filters select { appearance: none; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='5'%3E%3Cpath d='M0 0l5 5 5-5z' fill='%23666'/%3E%3C/svg%3E") no-repeat right 4px center; }

/* карточки */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 28px; padding: 0 0 8px; }
.card { background: #fff; border-radius: 8px; box-shadow: var(--shadow); display: flex; flex-direction: column; color: inherit; position: relative; overflow: hidden; transition: box-shadow .15s; }
.card:hover { box-shadow: 0 2px 4px -1px rgba(0,0,0,.2), 0 4px 5px 0 rgba(0,0,0,.14), 0 1px 10px 0 rgba(0,0,0,.12); }
.card:hover h3 { color: var(--blue); }
.card-link { position: absolute; inset: 0; z-index: 1; } .card-link:focus-visible { box-shadow: inset 0 0 0 3px var(--accent-d); border-radius: 8px; }

/* афиша: везде один формат 1980×1200. Узор по категории рисуется в CSS, колоннада повторяет фасад МГИМО */
.cover { --c: rgba(255,255,255,.13); background-color: var(--navy); color: #fff; }
.c-lecture { background-image: repeating-linear-gradient(90deg, var(--c) 0 7px, transparent 7px 26px); }
.c-seminar { background-color: var(--blue); background-image: radial-gradient(var(--c) 3.5px, transparent 4px); background-size: 20px 20px; }
.c-conf { background-color: var(--medium); background-image: repeating-radial-gradient(circle at 100% 100%, transparent 0 16px, var(--c) 16px 19px); }
.c-master { background-color: #1a3573; background-image: repeating-linear-gradient(135deg, var(--c) 0 3px, transparent 3px 16px); }
.c-career { background-color: #0a5d8c; background-image: linear-gradient(90deg, var(--c) 1.5px, transparent 1.5px), linear-gradient(var(--c) 1.5px, transparent 1.5px); background-size: 28px 28px; }
.c-alumni { background-color: #12305f; background-image: radial-gradient(circle at 0 50%, transparent 21px, var(--c) 22px, var(--c) 24px, transparent 25px); background-size: 34px 34px; }

.poster { position: relative; z-index: 0; aspect-ratio: 1980 / 1200; width: 100%; overflow: hidden; container-type: inline-size; }
.poster.has-img { background: #e9edf6; }
.poster.has-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.poster.gen { color: #fff; }
.poster.gen::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(22,34,86,0) 30%, rgba(22,34,86,.82) 100%); pointer-events: none; }
.poster-in { position: absolute; inset: 0; z-index: 1; display: flex; flex-direction: column; justify-content: space-between; padding: 5cqw 5.5cqw 5cqw; }
.poster-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.poster-top img { height: 8cqw; width: auto; }
.poster-top span { background: #fff; color: var(--navy); border-radius: 3px; padding: .2em .7em; font-size: max(11px, 2.6cqw); font-weight: 500; }
.poster-main { display: flex; align-items: flex-end; gap: 3.5cqw; }
.poster-main p { margin: 0; }
.poster-day { font-size: 19cqw; font-weight: 300; line-height: .85; letter-spacing: -.02em; }
.poster-when { padding-bottom: .8cqw; display: grid; gap: .6cqw; }
.poster-month { font-size: 6cqw; font-weight: 300; line-height: 1.05; }
.poster-time { font-size: max(12px, 3.4cqw); font-weight: 500; }
.poster-cat { font-size: max(11px, 2.7cqw); opacity: .9; }
.card .poster { border-radius: 0; }

.card-body { padding: 16px 18px 18px; display: flex; flex-direction: column; flex: 1; }
.card .cat { margin: 0 0 2px; color: var(--muted); font-size: 14px; }
.card h3 { margin: 0 0 6px; font-size: 19px; line-height: 1.3; color: var(--navy); }
.card .desc { font-size: 15px; margin: 0 0 10px; color: #333; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card .ic { display: flex; gap: 8px; align-items: flex-start; margin: 4px 0 0; font-size: 14px; line-height: 20px; }
.card .ic .material-icons { font-size: 18px; line-height: 20px; color: var(--navy); flex: none; }
.card .limit { color: #7a5200; } .card .limit .material-icons { color: #7a5200; }
.card .foot { margin-top: auto; padding-top: 14px; display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.card .foot .btn { position: relative; z-index: 2; }
.seats { font-size: 14px; color: #333; flex: 1 1 120px; margin: 0; } .seats p { margin: 0 0 5px; } .seats .none { color: var(--red-d); font-weight: 500; }
.going { display: inline-flex; align-items: center; gap: 4px; color: #1b6b3a; font-size: 14px; font-weight: 500; } .going .material-icons { font-size: 18px; }
.tag { display: inline-block; padding: 0 8px; border-radius: 3px; background: #eceff6; color: var(--navy); font-size: 12px; font-weight: 500; line-height: 20px; margin-right: 6px; }
.tag.ok { background: #e1f3e7; color: #1b6b3a; } .tag.warn { background: #fff1d6; color: #7a5200; } .tag.bad { background: #fde3e1; color: var(--red-d); } .tag.sky { background: #e3f4fc; color: #0a6a99; }
.empty-state { text-align: center; padding: 56px 20px; margin: 24px 0; color: var(--muted); } .empty-state h3 { color: var(--navy); }
.block { margin: 36px 0; }

/* календарь месяца на афише */
.mcal { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-bottom: 8px; background: #fff; }
.mcal-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: #f5f6fa; } .mcal-head b { font-size: 18px; color: var(--navy); font-weight: 500; text-transform: capitalize; }
.icon-btn { background: none; border: 0; border-radius: 50%; width: 40px; height: 40px; cursor: pointer; color: var(--navy); display: grid; place-items: center; } .icon-btn:hover { background: rgba(22,34,86,.08); }
.mcal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.mcal-grid > div { min-height: 104px; border-top: 1px solid var(--line); border-left: 1px solid var(--line); padding: 4px 6px; font-size: 13px; } .mcal-grid > div:nth-child(7n+1) { border-left: 0; }
.mcal-grid .dow { min-height: 0; padding: 6px; text-align: center; color: var(--muted); font-size: 12px; background: #fafbfd; border-top: 0; }
.mcal-grid .out { background: #fafafa; color: #aaa; } .mcal-grid .today b { background: var(--navy); color: #fff; border-radius: 50%; padding: 1px 6px; }
.mcal-ev { display: block; background: var(--accent); color: #000; border-radius: 3px; padding: 1px 6px; margin-top: 3px; text-decoration: none; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .mcal-ev:hover { background: var(--accent-d); color: #000; }

/* страница мероприятия */
.hero { padding: 20px 0 32px; }
.hero h1 { color: #fff; font-size: 34px; font-weight: 400; max-width: 22em; margin: 0 0 8px; }
.hero-back { display: inline-flex; align-items: center; gap: 6px; color: #fff; text-decoration: none; font-size: 15px; } .hero-back:hover { color: var(--accent); } .hero-back .material-icons { font-size: 18px; }
.hero-cat { margin: 20px 0 4px; color: #dbe4f7; font-size: 15px; } .hero-org { margin: 0; color: #dbe4f7; }
.back { margin: 24px 0 8px; }
.status-line { margin: 20px 0 0; } .owner-actions { margin-top: 20px; } .wrap > .notice { margin-top: 16px; }
.lead { font-size: 18px; color: #333; max-width: 46em; margin-top: 0; }
.ev-cols { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 48px; align-items: start; margin-top: 28px; }
.side-panel { background: #fff; box-shadow: var(--shadow); border-radius: 8px; padding: 20px; position: sticky; top: 112px; display: grid; gap: 16px; }
.facts { margin: 0; display: grid; grid-template-columns: 24px 1fr; gap: 12px 12px; } .facts dt { color: var(--navy); } .facts dd { margin: 0; font-size: 15px; } .facts dd b { font-weight: 500; }
.side-panel .btn.text-danger { justify-self: start; }
.notice { padding: 10px 14px; background: #eaf6fd; border-left: 4px solid var(--accent-d); margin: 0; border-radius: 0 4px 4px 0; font-size: 15px; }
.notice.ok { background: #e6f5ea; border-color: #43a763; } .notice.bad { background: #fdeceb; border-color: var(--red); }
.prose { max-width: 44em; font-size: 17px; } .prose h3 { margin-top: 1.4em; } .prose ul { padding-left: 1.2em; }

/* диалог */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: grid; place-items: center; z-index: 60; padding: 16px; overflow-y: auto; }
.dialog { background: #fff; border-radius: 8px; width: min(560px, 100%); padding: 24px; box-shadow: 0 11px 15px -7px rgba(0,0,0,.2), 0 24px 38px 3px rgba(0,0,0,.14), 0 9px 46px 8px rgba(0,0,0,.12); max-height: calc(100vh - 32px); overflow-y: auto; }
.dialog > div { display: grid; gap: 16px; }
.dialog h2 { font-size: 14px; color: var(--muted); margin: 0 0 -12px; }
.dlg-title { font-size: 20px; color: var(--navy); margin: 0 0 -8px; line-height: 1.3; }
.dialog .meta { margin: 0; font-size: 15px; color: #333; }
.dialog .actions { display: flex; justify-content: flex-end; gap: 12px; margin-top: 4px; }
.roles { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.roles label { display: flex; gap: 8px; align-items: center; cursor: pointer; padding: 2px 0; } .roles input { width: 18px; min-height: 18px; accent-color: var(--navy); }
.as { background: #f4f6fb; border-radius: 4px; padding: 10px 14px; display: grid; gap: 2px; justify-items: start; } .as b { font-weight: 500; } .as span { color: var(--muted); font-size: 14px; }
.opt-group { display: grid; gap: 8px; } .opt-title { margin: 0; font-size: 14px; font-weight: 500; color: var(--navy); }
.opts { display: flex; flex-wrap: wrap; gap: 6px 24px; }
.check.plain { padding: 0; color: var(--ink); font-size: 15px; }
.field label.check { font-size: 15px; color: var(--ink); }

/* вход и регистрация */
.auth-logo { text-align: center; margin: 40px 0 16px; color: var(--navy); } .auth-logo img { height: 60px; width: auto; } .auth-logo .wm { letter-spacing: .6em; font-size: 30px; font-weight: 300; margin-top: 8px; padding-left: .6em; }
.tabs { display: flex; border-bottom: 1px solid var(--line); margin-bottom: 24px; }
.tabs a { flex: 1; text-align: center; padding: 14px 8px; text-decoration: none; color: #444; font-size: 16px; border-bottom: 2px solid transparent; margin-bottom: -1px; } .tabs a:hover { background: #f5f6fa; } .tabs a.on { color: var(--navy); border-color: var(--navy); }
.tabs.admin { justify-content: flex-start; margin: 4px 0 28px; } .tabs.admin a { flex: none; padding: 12px 24px; }
.form { display: grid; gap: 22px; } .form h2 { margin: 8px 0 0; font-size: 18px; } .form .submit { justify-self: center; min-width: 190px; min-height: 40px; }
.demo { background: #f5f6fa; border-radius: 4px; padding: 10px 14px; font-size: 14px; margin: 0; text-align: center; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; } legend { padding: 0; }
.types { display: grid; grid-template-columns: 1fr; gap: 2px; } .types legend { font-size: 12px; color: #666; margin-bottom: 4px; }
.type-option { display: flex; gap: 12px; align-items: center; padding: 8px 4px; cursor: pointer; border-radius: 4px; } .type-option:hover { background: #f5f6fa; }
.type-option input { width: 18px; min-height: 18px; accent-color: var(--navy); flex: none; }
.type-option.on { color: var(--navy); font-weight: 500; } .type-option:has(:focus-visible) { box-shadow: var(--focus); }
.applicant { display: grid; gap: 22px; }
.wide-form { gap: 32px; } .block-f { background: #fff; box-shadow: var(--shadow); border-radius: 8px; padding: 24px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
.block-f > *, .grid2 > *, .picker, .picker-block { min-width: 0; }
.block-f legend { float: left; width: 100%; font: 400 20px var(--sans); color: var(--navy); margin: 0; }
.sticky-actions { position: sticky; bottom: 0; background: var(--page); border-top: 1px solid var(--line); padding: 12px 0; z-index: 10; }

/* свои вопросы организатора */
.q-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.q-edit { display: grid; gap: 10px; padding: 12px 14px; background: #f4f6fb; border-radius: 4px; } .q-edit.has-error { box-shadow: inset 3px 0 0 var(--red-d); }
.q-line { display: flex; gap: 8px 12px; align-items: center; flex-wrap: wrap; } .q-line input { flex: 1 1 240px; width: auto; } .q-line select { flex: 0 0 170px; width: 170px; }
.q-edit textarea { background: #fff; }
.add-q { justify-self: start; } .add-q .material-icons { font-size: 18px; }
.icon-btn:disabled { color: #bbb; cursor: default; background: none; }

/* календарь аудиторий */
.picker-block h3 { margin-bottom: 4px; }
.picker { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; min-width: 0; }
.daylabel { margin: 8px 0 0; font-size: 18px; color: var(--navy); font-weight: 500; }
.daylabel::first-letter { text-transform: uppercase; }
.daybar { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.daychip { flex: none; width: 52px; padding: 6px 0 5px; border: 1px solid #c8cbd6; border-radius: 4px; background: #fff; cursor: pointer; display: grid; justify-items: center; font: inherit; color: #000; }
.daychip b { font-size: 18px; font-weight: 500; line-height: 1.2; } .daychip span { font-size: 12px; color: var(--muted); }
.daychip:hover { background: #f1f4fa; } .daychip.on { background: var(--navy); border-color: var(--navy); color: #fff; } .daychip.on span { color: #c9d4ef; }
.daychip:disabled { opacity: .4; cursor: default; background: #fff; }
.jump { display: grid; font-size: 12px; color: #666; margin-left: 12px; } .jump input { width: 150px; font-size: 15px; }
.picker-tools { display: flex; gap: 8px 24px; flex-wrap: wrap; align-items: flex-end; margin: 4px 0; }
.picker-tools input[type=search] { width: 180px; }
.legend { display: flex; gap: 6px 16px; flex-wrap: wrap; list-style: none; padding: 0; margin: 0 0 0 auto; font-size: 13px; color: var(--muted); }
.legend li { display: flex; align-items: center; gap: 6px; } .legend .cell { width: 18px; height: 18px; display: inline-block; border: 1px solid #c8cbd6; box-shadow: none; }
.matrix-wrap { max-height: 440px; overflow: auto; border: 1px solid var(--line); border-radius: 4px; background: #fff; } .matrix-wrap.tall { max-height: 620px; }
.matrix { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 640px; }
.matrix th, .matrix td { padding: 0; border-bottom: 1px solid #eef0f5; }
.matrix thead th { position: sticky; top: 0; background: var(--navy); color: #fff; z-index: 2; padding: 8px 4px; font-weight: 400; font-size: 12px; line-height: 1.3; }
.matrix thead th b { display: block; font-size: 14px; font-weight: 500; } .matrix thead th span { color: #c9d4ef; }
.room-h, .room-n { position: sticky; left: 0; z-index: 1; text-align: left; width: 150px; }
.matrix thead .room-h { z-index: 3; padding-left: 12px; }
.room-n { background: #fff; font-weight: 500; font-size: 14px; border-right: 1px solid var(--line); }
.room-open { display: flex; align-items: center; justify-content: space-between; gap: 6px; width: 100%; min-height: 36px; padding: 0 8px 0 12px; background: none; border: 0; font: 500 14px var(--sans); color: var(--navy); cursor: pointer; text-align: left; }
.room-open span:first-child { max-width: 112px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-open .material-icons { font-size: 16px; color: #8a93ab; } .room-open:hover { background: #eef1f8; } .room-open:hover .material-icons { color: var(--navy); }
.cell { display: grid; place-items: center; width: 100%; height: 36px; border: 0; border-left: 1px solid #fff; padding: 0; font: 700 16px var(--sans); color: #fff; }
.cell .material-icons { font-size: 18px; }
.cell.free { background: #dff2fc; cursor: pointer; box-shadow: inset 0 -1px 0 #fff; } .cell.free:hover { background: var(--accent); }
.cell.lesson { background: repeating-linear-gradient(135deg, #ececec 0 6px, #dcdcdc 6px 8px); cursor: not-allowed; }
.cell.booked { background: var(--blue); cursor: not-allowed; }
.cell.pending { background: repeating-linear-gradient(135deg, #c5d3ee 0 6px, #96abd6 6px 8px); cursor: not-allowed; }
.cell.sel, .cell.sel:hover, .cell.sel:disabled { background: var(--navy); outline: 3px solid var(--accent); outline-offset: -3px; cursor: pointer; }
.cell:focus-visible, .slot:focus-visible, .room-open:focus-visible { box-shadow: inset 0 0 0 3px var(--accent-d); border-radius: 0; }

/* неделя одной аудитории */
.week-head { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; margin-top: 8px; }
.week-head h4 { margin: 0; font: 500 18px var(--sans); color: var(--navy); } .week-head .btn .material-icons { font-size: 16px; }
.week-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; color: var(--navy); } .week-nav b { font-weight: 500; }
.matrix.week { min-width: 880px; table-layout: fixed; } .matrix.week .room-h, .matrix.week .room-n { width: 92px; }
.matrix.week thead .cur { background: var(--blue); }
.pair-n { padding: 8px 10px !important; vertical-align: top; } .pair-n b { display: block; font-size: 15px; } .pair-n span { display: block; font-weight: 400; font-size: 12px; color: var(--muted); line-height: 1.25; }
.wk { border-left: 1px solid #eef0f5; height: 76px; vertical-align: top; }
.wk.lesson { background: #f0f1f4; } .wk.booked { background: #dfe6f4; } .wk.pending { background: repeating-linear-gradient(135deg, #e5ebf6 0 6px, #d4deef 6px 8px); } .wk.past { background: #fafafa; }
.les { padding: 6px 8px; font-size: 12px; line-height: 1.3; display: grid; gap: 2px; } .les + .les { border-top: 1px solid #dcdfe7; }
.les b { font-weight: 500; color: #222; overflow-wrap: anywhere; } .les span { color: #555; overflow-wrap: anywhere; }
.slot { width: 100%; height: 100%; min-height: 76px; display: flex; align-items: center; justify-content: center; gap: 4px; background: #eff9fe; border: 0; color: #0a6a99; font: 400 13px var(--sans); cursor: pointer; }
.slot:hover { background: var(--accent); color: #000; } .slot .material-icons { font-size: 16px; }
.slot.sel, .slot.sel:hover { background: var(--navy); color: #fff; font-weight: 500; }

.picked { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 6px; padding: 12px 16px; background: #eaf6fd; border-left: 4px solid var(--accent-d); border-radius: 0 4px 4px 0; } .picked b { font-weight: 500; }
.picked.none { color: var(--muted); background: #f4f6fb; border-color: #c8cbd6; }
.empty { padding: 24px; text-align: center; color: var(--muted); }

/* таблицы, админка */
.table-wrap { overflow-x: auto; background: #fff; box-shadow: var(--shadow); border-radius: 8px; }
.table { border-collapse: collapse; width: 100%; min-width: 720px; } .table th, .table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-size: 13px; color: var(--navy); font-weight: 500; } .table tr:last-child td { border-bottom: 0; }
.q-item { display: flex; gap: 24px; justify-content: space-between; flex-wrap: wrap; background: #fff; box-shadow: var(--shadow); border-radius: 8px; padding: 18px 20px; margin-bottom: 16px; }
.q-item p { margin: 2px 0; } .q-actions { display: flex; flex-direction: column; gap: 10px; align-items: stretch; } .reject { flex-basis: 100%; display: grid; gap: 10px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.bars { background: #fff; box-shadow: var(--shadow); border-radius: 8px; padding: 18px 20px; } .bars ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.bars li { display: grid; grid-template-columns: 1fr 40px; gap: 2px 12px; } .bars li span { grid-column: 1 / -1; font-size: 14px; } .bars li b { text-align: right; font-weight: 500; }
.meter { height: 6px; background: #e4e8f1; border-radius: 99px; align-self: center; } .meter i { display: block; height: 100%; min-width: 2px; background: var(--navy); border-radius: 99px; }
.camp-list { list-style: none; padding: 0; margin: 0 0 20px; background: #fff; box-shadow: var(--shadow); border-radius: 8px; }
.camp-list li { display: flex; gap: 12px; align-items: center; padding: 12px 20px; border-top: 1px solid var(--line); } .camp-list li:first-child { border: 0; }
.add-camp { align-items: flex-end; } .add-camp input { flex: 1 1 260px; width: auto; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: #323232; color: #fff; padding: 12px 24px; border-radius: 4px; z-index: 99; box-shadow: var(--shadow-2); animation: tin .2s ease-out; }
.toast.bad { background: var(--red-d); } .toast.out { opacity: 0; transition: opacity .4s; }
@keyframes tin { from { opacity: 0; transform: translate(-50%, 8px); } }

@media (max-width: 860px) {
  .wrap { padding: 0 16px; } .ev-cols { grid-template-columns: 1fr; gap: 24px; } .side-panel { position: static; }
  .grid2 { grid-template-columns: 1fr; } .legend { margin-left: 0; } .hero h1 { font-size: 26px; }
  .acct { gap: 16px; font-size: 14px; } .brand .wm { display: none; } .block-f { padding: 16px; } .filters .field { flex: 1 1 140px; min-width: 140px; } .filters .field.grow { flex-basis: 100%; }
  .mcal-grid > div { min-height: 64px; padding: 2px 3px; } .mcal-ev { font-size: 0; height: 6px; padding: 0; }
  .segs { width: 100%; } .seg { flex: 1; justify-content: center; } .jump { margin-left: 0; flex-basis: 100%; } .week-nav { margin-left: 0; } .q-line select { flex: 1 1 100%; width: 100%; }
  .daychip { width: 44px; } .dialog { padding: 18px; } .sticky-actions { position: static; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* загрузка афиши в форме */
.poster-field { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 20px; align-items: start; }
.poster-preview { aspect-ratio: 1980 / 1200; background: #f4f6fb; border: 1px dashed #b9c0d4; border-radius: 4px; display: grid; place-items: center; text-align: center; padding: 10px; color: var(--muted); font-size: 13px; overflow: hidden; }
.poster-preview.has { border-style: solid; padding: 0; } .poster-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.poster-actions { display: grid; gap: 8px; align-content: start; } .poster-actions p { margin: 0; }
label.btn:focus-visible { box-shadow: var(--focus); }
@media (max-width: 640px) { .poster-field { grid-template-columns: 1fr; } }

/* обязательные поля, как в старой системе */
.req { color: var(--red-d); font-weight: 500; }
.req-note { margin: 0; font-size: 14px; color: var(--muted); }
.notice.warn { background: #fff6e0; border-color: #e8b34a; } .notice.small { font-size: 13px; padding: 6px 10px; }
.ev-main { min-width: 0; } .ev-main .poster { border-radius: 8px; margin-bottom: 20px; box-shadow: var(--shadow); }

/* выбор адреса и карта */
.addr { display: grid; gap: 10px; }
.combo { position: relative; }
.sugg { position: absolute; z-index: 1000; left: 0; right: 0; top: 100%; margin: 4px 0 0; padding: 4px 0; list-style: none; background: #fff; border-radius: 4px; box-shadow: 0 5px 5px -3px rgba(0,0,0,.2), 0 8px 10px 1px rgba(0,0,0,.14), 0 3px 14px 2px rgba(0,0,0,.12); max-height: 320px; overflow-y: auto; }
.sugg li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 14px; cursor: pointer; }
.sugg li .material-icons { color: var(--navy); font-size: 20px; margin-top: 1px; flex: none; }
.sugg li span { display: grid; min-width: 0; } .sugg li b { font-weight: 500; font-size: 15px; } .sugg li small { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sugg li:hover, .sugg li[aria-selected=true] { background: #eaf6fd; }
.addr-tools { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: space-between; } .chips { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.chip-btn { border: 1px solid #c3c9d9; background: #fff; color: var(--navy); border-radius: 16px; min-height: 32px; padding: 0 14px; font: 400 14px var(--sans); cursor: pointer; } .chip-btn:hover { border-color: var(--navy); }
.map { height: 360px; border-radius: 8px; overflow: hidden; background: #e9edf6; border: 1px solid var(--line); position: relative; z-index: 0; }
.map.view { height: 320px; }
.map-wait { margin: 0; padding: 24px; text-align: center; color: var(--muted); }
.map-pin { background: none; border: 0; } .map-pin svg { filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); }
.place { margin-top: 32px; display: grid; gap: 10px; } .place h2 { margin: 0; } .place p { margin: 0; }
@media (max-width: 860px) { .map { height: 300px; } }

/* сведения о мероприятии: отдельные пункты, как в прежней системе */
.details { background: #fff; box-shadow: var(--shadow); border-radius: 8px; padding: 20px 24px; margin-top: 4px; }
.details dl { margin: 0; display: grid; gap: 10px; }
.details .drow { display: block; }
.details dt { color: var(--navy); font-size: 16px; }
.details dd { margin: 2px 0 0; font-size: 16px; line-height: 1.55; overflow-wrap: anywhere; }
.details .drow.inline dt, .details .drow.inline dd { display: inline; margin: 0; }
.details .drow.inline dt { margin-right: .3em; }
.details .prose { font-size: 16px; } .details .prose p:first-child { margin-top: 0; } .details .prose p:last-child { margin-bottom: 0; }
.ymaps-2-1-79-map, [class*="ymaps-2"][class$="-map"] { border-radius: 8px; }

/* вход */
.center { text-align: center; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 14px; } .or::before, .or::after { content: ''; flex: 1; border-top: 1px solid var(--line); }
a.btn.submit { justify-self: center; min-width: 260px; }

/* шапка: колокольчик с числом уведомлений */
.bell { position: relative; } .bell .dot { position: absolute; top: -2px; right: -8px; background: var(--red); color: #fff; font: 500 11px/16px var(--sans); min-width: 16px; padding: 0 4px; border-radius: 8px; text-align: center; font-style: normal; }

/* управление пользователями */
.table.users td { vertical-align: middle; } .table.users tr.off td { color: var(--muted); }
.actions-cell { display: flex; gap: 6px; flex-wrap: wrap; }
.th-sort { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 2px; } .th-sort .material-icons { font-size: 14px; }
.pager { margin-top: 14px; }
.pick-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 280px; overflow-y: auto; }
.pick-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 10px; background: #f4f6fb; border-radius: 4px; }
.pick-list li > span { min-width: 0; overflow-wrap: anywhere; }
.dialog .grid2 { gap: 16px 20px; }
.btn.sm .material-icons { font-size: 18px; }
