:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #eef2f5;
  --line: #d9dfe5;
  --text: #111820;
  --muted: #63707c;
  --accent: #005ca9;
  --accent-soft: rgba(0, 92, 169, .09);
  --green: #168f56;
  --red: #d71920;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); font-size: 15px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 1.5rem; letter-spacing: -.04em; }
h2 { font-size: clamp(1.7rem, 3vw, 2.6rem); letter-spacing: -.045em; }
h3 { font-size: 1rem; }
.eyebrow { margin-bottom: 5px; color: var(--red); font-size: .7rem; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.muted { color: var(--muted); }
.loading { min-height: 100vh; display: grid; place-items: center; color: var(--muted); }

.login-shell { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(340px, .7fr); align-items: center; gap: clamp(40px, 7vw, 110px); padding: clamp(28px, 7vw, 100px); border-top: 6px solid var(--red); background: #fff; }
.login-brand { max-width: 680px; }
.login-brand h1 { font-size: clamp(4rem, 12vw, 9rem); }
.login-brand > p:last-child { max-width: 620px; color: var(--muted); font-size: clamp(1.1rem, 2vw, 1.45rem); line-height: 1.55; }
.login-card { display: grid; gap: 15px; padding: 28px; border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: 6px; background: #fff; box-shadow: 0 14px 38px rgba(17,24,32,.09); }
.login-card h2 { font-size: 2rem; }
label { display: grid; gap: 7px; }
label span { color: #34404b; font-size: .82rem; font-weight: 750; }
input, select, textarea { min-width: 0; padding: 10px 11px; border: 1px solid #cbd3da; border-radius: 4px; background: #fff; color: var(--text); outline: none; }
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,92,169,.12); }
button { padding: 9px 13px; border: 0; border-radius: 4px; background: var(--accent); color: white; font-weight: 800; }
button:hover:not(:disabled) { filter: brightness(1.08); }
button:disabled { cursor: not-allowed; opacity: .45; }
.ghost { border: 1px solid var(--line); background: transparent; color: var(--muted); }
.form-error { min-height: 20px; color: var(--red); font-size: .84rem; }

.topbar { min-height: 70px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 20px; padding: 10px clamp(22px, 4vw, 58px); border-top: 5px solid var(--red); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.97); position: sticky; top: 0; z-index: 10; }
.brand .eyebrow { margin-bottom: 2px; }
.brand h1 { font-size: 1.3rem; }
.topbar nav { display: flex; gap: 2px; padding: 2px; border: 1px solid var(--line); border-radius: 4px; background: #f7f8fa; }
.topbar nav button { padding: 8px 13px; background: transparent; color: var(--muted); font-size: .82rem; }
.topbar nav .nav-active { background: var(--accent); color: white; }
.account { justify-self: end; display: grid; grid-template-columns: auto auto; column-gap: 10px; align-items: center; }
.account span { font-weight: 750; }
.account small { grid-row: 2; color: var(--muted); }
.account button { grid-column: 2; grid-row: 1 / 3; }
.workspace { max-width: 1700px; margin: auto; padding: 32px clamp(22px, 4vw, 58px) 62px; }
.intro { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 18px; }
.intro > p { max-width: 500px; color: var(--muted); text-align: right; line-height: 1.5; }
.layout { display: grid; grid-template-columns: minmax(240px, 300px) minmax(0, 1fr); gap: 14px; }
.event-sidebar, .content, .panel { border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.event-sidebar { min-height: 620px; overflow: hidden; }
.section-head { min-height: 62px; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px; border-bottom: 1px solid var(--line); }
.section-head > div { display: grid; gap: 2px; }
.section-head small { color: var(--muted); }
.small-button { padding: 8px 10px; font-size: .78rem; }
.event-list { display: grid; gap: 6px; padding: 10px; }
.event-item { width: 100%; display: grid; grid-template-columns: 48px 1fr; align-items: center; gap: 12px; padding: 10px; background: transparent; color: var(--text); text-align: left; }
.event-item:hover, .event-item.active { background: var(--accent-soft); }
.event-item.active { box-shadow: inset 3px 0 var(--accent); }
.event-item > span:last-child { min-width: 0; display: grid; gap: 3px; }
.event-item strong, .event-item small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.event-item small { color: var(--muted); font-weight: 500; }
.event-logo-mini { width: 48px; height: 48px; display: grid; place-items: center; overflow: hidden; border-radius: 10px; background: #fff; color: #141822; font-weight: 900; }
.event-logo-mini img { width: 100%; height: 100%; object-fit: contain; }
.content { min-height: 620px; padding: clamp(18px, 2.5vw, 28px); }
.event-detail { display: grid; gap: 16px; }
.event-hero { display: grid; grid-template-columns: 210px 1fr; align-items: center; gap: 24px; padding: 20px; border-left: 5px solid var(--red); border-radius: 3px; background: #f5f8fb; }
.event-hero h2 { margin-bottom: 8px; }
.event-hero > div:last-child > p:not(.eyebrow) { color: var(--muted); }
.event-summary { min-width: 0; }
.event-summary-head { display: flex; justify-content: space-between; align-items: start; gap: 18px; }
.event-summary-head > div { min-width: 0; }
.event-summary-head .small-button { flex: 0 0 auto; }
.logo-stage { width: 210px; height: 140px; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 3px; background: white; color: #5d6472; font-weight: 800; }
.logo-stage img { width: 100%; height: 100%; object-fit: contain; }
.meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.meta span { padding: 5px 8px; border: 1px solid var(--line); border-radius: 3px; color: #44515d; font-size: .78rem; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.panel { padding: 16px; }
.panel-head { margin-bottom: 14px; }
.panel-head p { margin-top: 6px; color: var(--muted); font-size: .86rem; line-height: 1.5; }
#logo-form { display: grid; gap: 14px; }
.upload-field { padding: 14px; border: 1px dashed #9ba8b4; border-radius: 4px; background: #f8fafb; }
.upload-field small { color: var(--muted); }
.upload-preview:empty { display: none; }
.upload-preview { width: 100%; height: 130px; display: grid; place-items: center; border-radius: 10px; background: white; overflow: hidden; }
.upload-preview img { width: 100%; height: 100%; object-fit: contain; }
.import-status { display: grid; gap: 14px; margin-bottom: 16px; }
.import-status > div:first-child { display: grid; gap: 4px; }
.import-status > div:first-child span, .source-url { color: var(--muted); font-size: .8rem; }
.import-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.import-metrics span { display: grid; gap: 2px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); font-size: .72rem; }
.import-metrics strong { color: var(--text); font-size: 1.15rem; }
.source-url { margin-bottom: 14px; overflow-wrap: anywhere; line-height: 1.45; }
#sporttech-import { display: grid; gap: 8px; }
.speaker-workspace { max-width: 1800px; }
.speaker-now { display: grid; grid-template-columns: 1fr 1fr minmax(430px, 1.25fr); gap: 14px; margin-bottom: 16px; }
.speaker-now > article, .speaker-state-form, .speaker-filter { border: 1px solid var(--line); border-radius: 5px; background: #fff; }
.speaker-now > article { display: grid; align-content: center; gap: 5px; min-height: 106px; padding: 16px; }
.speaker-now > article:first-child { border-left: 5px solid var(--red); background: #f7faff; }
.speaker-now > article > span { color: var(--accent); font-size: .7rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.speaker-now > article strong { font-size: 1.2rem; }
.speaker-now > article small { color: var(--muted); }
.speaker-state-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 16px; }
.speaker-state-form button { grid-column: 1 / -1; }
.speaker-filter { display: grid; grid-template-columns: minmax(240px, 1.2fr) minmax(280px, 1fr) auto; align-items: end; gap: 12px; padding: 14px; margin-bottom: 16px; }
.speaker-layout { display: grid; grid-template-columns: minmax(310px, 380px) minmax(0, 1fr); gap: 16px; }
.startlist { min-height: 650px; overflow: hidden; }
.startlist .panel-head { padding: 18px; margin: 0; border-bottom: 1px solid var(--line); }
.start-items { display: grid; gap: 5px; max-height: 760px; padding: 8px; overflow: auto; }
.start-item { display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: 10px; padding: 11px; background: transparent; color: var(--text); text-align: left; }
.start-item:hover, .start-item.active { background: var(--accent-soft); }
.start-item > span:first-child { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 3px; background: var(--accent-soft); color: var(--accent); font-size: .78rem; }
.start-item > span:last-child { min-width: 0; display: grid; gap: 3px; }
.start-item strong, .start-item small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.start-item small { color: var(--muted); font-weight: 500; }
.athlete-panel { min-width: 0; padding: clamp(20px, 3vw, 32px); }
.athlete-head { display: flex; justify-content: space-between; gap: 20px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.athlete-head h2 { margin-bottom: 7px; }
.athlete-head > div > p:last-child { color: var(--muted); }
.athlete-order { width: 60px; height: 60px; flex: 0 0 60px; display: grid; place-items: center; border-radius: 4px; background: var(--accent); color: #fff; font-weight: 900; }
.notes-section { padding-top: 24px; }
.notes-list { display: grid; gap: 12px; }
.note-card { display: grid; gap: 11px; margin-top: 10px; padding: 14px; border: 1px solid var(--line); border-radius: 4px; background: #fafbfc; }
.new-note { margin-top: 20px; border-style: dashed; }
.note-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.note-meta span { color: var(--muted); font-size: .77rem; }
.live-section { margin-bottom: 14px; padding: 16px; border-top: 4px solid var(--accent); }
.live-places { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 14px; }
.live-place-card { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.live-place-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.live-place-head > div { display: grid; gap: 2px; }
.live-place-head > div span, .live-category span { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; }
.live-place-head h4 { margin: 0; font-size: 2rem; }
.place-map-form { display: flex; align-items: end; gap: 8px; }
.place-map-form label { min-width: 220px; }
.place-create-form { display: flex; align-items: end; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.place-create-form label { min-width: 180px; }
.live-category { display: flex; justify-content: space-between; gap: 12px; padding: 14px 0 8px; }
.current-athlete { padding: 13px 0; }
.current-athlete > span { color: var(--red); font-size: .7rem; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.current-athlete h3 { margin: 4px 0; font-size: clamp(1.5rem, 3vw, 2.4rem); }
.current-athlete p { color: var(--muted); }
.score-strip { display: grid; grid-template-columns: repeat(6, 1fr); overflow: hidden; margin: 10px 0 16px; border: 1px solid var(--line); border-radius: 11px; }
.score-strip span { min-width: 0; display: grid; gap: 3px; padding: 10px; border-right: 1px solid var(--line); }
.score-strip span:last-child { border: 0; }
.score-strip small { color: var(--muted); font-size: .68rem; }
.score-strip strong { font-size: .95rem; font-variant-numeric: tabular-nums; }
.score-strip .total { background: var(--accent-soft); }
.live-ranking { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.live-ranking li { display: grid; grid-template-columns: 30px minmax(0,1fr) minmax(0,.7fr) auto; align-items: center; gap: 8px; padding: 8px; border-radius: 3px; background: #f3f5f7; }
.live-ranking li.current { box-shadow: inset 3px 0 var(--red); background: #eef5fb; }
.live-ranking strong, .live-ranking small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-ranking small { color: var(--muted); }
.live-ranking b { font-variant-numeric: tabular-nums; }
.empty-live { padding: 30px 5px; color: var(--muted); text-align: center; }
.live-error { padding: 10px 12px; border-radius: 3px; background: rgba(215,25,32,.08); color: #a51218; }
.regie-grid { display: grid; grid-template-columns: minmax(350px, .8fr) minmax(550px, 1.2fr); gap: 16px; }
.regie-controls, .screens-panel { padding: 20px; }
.quick-actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin: 14px 0 24px; }
.danger { background: var(--red); }
.control-form, .new-screen-form { display: grid; gap: 12px; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.screen-list { display: grid; gap: 8px; }
.screen-row { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 11px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.screen-row > div { min-width: 0; display: grid; gap: 3px; }
.screen-row small { color: var(--muted); }
.screen-row a { width: fit-content; color: var(--accent); font-size: .78rem; }
.stv-settings { margin: -4px 0 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 4px; background: #f8fafb; }
.stv-settings summary { cursor: pointer; color: var(--muted); font-size: .84rem; font-weight: 700; }
.stv-settings-form { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: end; gap: 12px; margin-top: 10px; }
.check-label { display: flex; align-items: center; gap: 8px; font-size: .86rem; }
.check-label input { width: auto; }
.sponsor-list { display: grid; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.sponsor-item { display: grid; grid-template-columns: 96px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.sponsor-item img { width: 96px; height: 48px; object-fit: contain; background: #f8fafb; border-radius: 3px; }
.sponsor-item > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .86rem; }
.sponsor-actions { display: flex; gap: 6px; }
#sponsor-form { display: grid; gap: 10px; }
.online { width: 10px; height: 10px; border-radius: 50%; background: #5d6472; }
.online.yes { background: var(--green); box-shadow: 0 0 0 3px rgba(22,143,86,.12); }
.screen-state { text-align: right; }
.website-list { display: grid; gap: 7px; margin-top: 12px; }
.website-list article { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px; border: 1px solid var(--line); border-radius: 4px; background: #fafbfc; }
.website-list article > div:first-child { min-width: 0; display: grid; gap: 3px; }
.website-list article > div:last-child { display: flex; gap: 6px; }
.website-list small { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }

.link-button { padding: 0; background: transparent; color: var(--accent); font-size: inherit; }
.empty, .empty-state { color: var(--muted); text-align: center; }
.empty { padding: 25px 10px; }
.empty-state { min-height: 540px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 13px; }
.empty-state p { max-width: 520px; line-height: 1.5; }
.empty-mark { width: 72px; height: 72px; display: grid; place-items: center; border-radius: 4px; background: var(--accent); color: #fff; font-size: 2rem; font-weight: 950; }

.modal-overlay { position: fixed; z-index: 30; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(17,24,32,.45); backdrop-filter: blur(3px); }
.modal { width: min(100%, 620px); border: 1px solid var(--line); border-top: 5px solid var(--red); border-radius: 5px; background: var(--surface); box-shadow: 0 24px 70px rgba(17,24,32,.2); }
.modal-head { display: flex; justify-content: space-between; align-items: start; padding: 22px; border-bottom: 1px solid var(--line); }
.icon-button { width: 40px; height: 40px; padding: 0; border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 1.4rem; }
.modal form { display: grid; gap: 15px; padding: 22px; }
.two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; }
#toast-root { position: fixed; z-index: 50; right: 22px; bottom: 22px; display: grid; gap: 8px; }
.toast { max-width: 370px; padding: 12px 14px; border-radius: 4px; background: #10653f; color: #fff; box-shadow: 0 12px 30px rgba(17,24,32,.18); }
.toast.error { background: #a51218; }

@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; gap: 40px; }
  .topbar { grid-template-columns: 1fr auto; }
  .topbar nav { grid-column: 1 / -1; grid-row: 2; justify-self: stretch; }
  .topbar nav button { flex: 1; }
  .layout, .detail-grid { grid-template-columns: 1fr; }
  .event-sidebar { min-height: auto; }
  .event-list { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
  .speaker-now { grid-template-columns: 1fr 1fr; }
  .speaker-state-form { grid-column: 1 / -1; }
  .speaker-layout { grid-template-columns: 1fr; }
  .startlist { min-height: auto; }
  .regie-grid { grid-template-columns: 1fr; }
  .notes-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .login-shell { padding: 24px; }
  .login-card { padding: 24px; }
  .topbar { padding: 14px 18px; }
  .workspace { padding: 34px 18px 60px; }
  .account span, .account small { display: none; }
  .intro { align-items: start; flex-direction: column; }
  .intro > p { text-align: left; }
  .event-hero { grid-template-columns: 1fr; }
  .logo-stage { width: 100%; }
  .two-cols { grid-template-columns: 1fr; }
  .import-metrics { grid-template-columns: 1fr 1fr; }
  .speaker-now, .speaker-state-form, .speaker-filter { grid-template-columns: 1fr; }
  .speaker-state-form { grid-column: auto; }
  .speaker-state-form button { grid-column: auto; }
  .athlete-head, .note-meta { align-items: flex-start; flex-direction: column; }
  .live-places { grid-template-columns: 1fr; }
  .live-place-head, .place-map-form { align-items: stretch; flex-direction: column; }
  .score-strip { grid-template-columns: repeat(3, 1fr); }
  .quick-actions, .screen-row { grid-template-columns: 1fr; }
  .screen-state { text-align: left; }
}

.hover-athlete { cursor: help; text-decoration: underline dotted; text-underline-offset: 3px; }
.place-error { margin-top: 8px; }

.panel-tabs, .sub-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.panel-tabs button, .sub-nav button { background: var(--surface, #fff); color: inherit; border: 1px solid #d6dbe3; }
.panel-tabs button.nav-active, .sub-nav button.nav-active { background: #1f3a5f; color: #fff; border-color: #1f3a5f; }
.start-hover { position: fixed; z-index: 50; width: 320px; max-height: 70vh; overflow: auto; padding: 14px 16px; border-radius: 10px; background: #fff; box-shadow: 0 10px 30px rgba(15, 23, 42, 0.22); pointer-events: none; font-size: 0.9rem; }
.start-hover h4 { margin: 8px 0 4px; }
.start-hover ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.start-hover li span, .start-hover li strong { display: block; }
.start-hover li span { color: #64748b; font-size: 0.8rem; }
.notes-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 16px; align-items: start; }
.note-athlete { margin: 0 0 8px; font-weight: 600; }
.athlete-head-actions { display: flex; align-items: center; gap: 10px; }
.table-wrap { overflow-x: auto; }
.results-table { width: 100%; border-collapse: collapse; }
.results-table th, .results-table td { padding: 8px 10px; border-bottom: 1px solid #e2e8f0; text-align: left; vertical-align: top; }
.results-table small { display: block; color: #64748b; }

/* Admin Workspace */
.admin-workspace .panel { max-width: 1200px; }
.admin-users-table { display: grid; gap: 0; border: 1px solid #e2e8f0; border-radius: 8px; overflow: hidden; }
.table-header, .table-row { display: grid; grid-template-columns: 160px 160px 1fr 100px 100px; gap: 16px; padding: 12px 16px; align-items: center; border-bottom: 1px solid #e2e8f0; }
.table-header { background: #f8fafc; font-weight: 600; font-size: 0.9rem; color: #64748b; }
.table-row:last-child { border-bottom: none; }
.table-row .email { font-family: monospace; font-size: 0.9rem; word-break: break-all; }
.table-row .name { font-weight: 500; }
.table-row .modules { display: flex; flex-wrap: wrap; gap: 8px; }
.table-row .status { font-size: 0.9rem; }
.table-row .actions { display: flex; gap: 8px; }
.toggle-label { display: flex; align-items: center; gap: 6px; cursor: pointer; font-size: 0.9rem; padding: 4px 8px; border-radius: 4px; transition: background 0.2s; }
.toggle-label input[type="checkbox"] { cursor: pointer; }
.toggle-label input[type="checkbox"]:checked + span { font-weight: 600; }
.toggle-label:hover { background: #f1f5f9; }

.admin-form { max-width: 400px; }
.admin-form fieldset { border: 1px solid #e2e8f0; border-radius: 6px; padding: 12px; margin: 16px 0; }
.admin-form legend { font-weight: 600; font-size: 0.95rem; padding: 0 8px; }
.admin-form fieldset label { display: flex; align-items: center; gap: 8px; margin: 8px 0; }
.admin-form fieldset input[type="checkbox"] { cursor: pointer; }

.admin-reset-result { padding: 20px; }
.admin-reset-result .label { margin: 0 0 8px; font-weight: 600; font-size: 0.9rem; color: #64748b; }
.admin-reset-result .code-block { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 6px; padding: 12px; margin: 12px 0; overflow-x: auto; }
.admin-reset-result code { font-family: monospace; font-size: 0.85rem; word-break: break-all; }
.admin-reset-result .small { margin: 12px 0 0; font-size: 0.9rem; color: #64748b; }

/* Modal */
.modal-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(15, 23, 42, 0.5); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal-card { background: white; border-radius: 10px; box-shadow: 0 20px 40px rgba(15, 23, 42, 0.3); max-width: 500px; width: 90%; max-height: 90vh; overflow-y: auto; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 20px; border-bottom: 1px solid #e2e8f0; }
.modal-head h2 { margin: 0; font-size: 1.25rem; }
.modal-head button { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: #64748b; }
.modal-card form { padding: 20px; }

.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
.form-error { color: #dc2626; margin: 8px 0 0; font-size: 0.9rem; }

@media (max-width: 1024px) {
  .admin-users-table, .table-header, .table-row { grid-template-columns: 1fr; }
  .table-header { display: none; }
  .table-row { border: 1px solid #e2e8f0; border-radius: 6px; margin-bottom: 10px; }
  .table-row::before { content: attr(data-label); font-weight: 600; display: block; margin-bottom: 8px; }
}
