:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #64748b;
  --line: #dfe5ee;
  --soft: #f4f7fb;
  --brand: #e84b14;
  --brand-dark: #b9350d;
  --blue: #028cc8;
  --danger: #b42318;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { min-width: 320px; margin: 0; color: var(--ink); background: radial-gradient(circle at 12% 0, rgba(255, 111, 15, .12), transparent 28rem), var(--soft); }
a { color: #075985; }
button, input, textarea, select { font: inherit; }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 84px; padding: 12px clamp(16px, 4vw, 52px); color: #fff; background: linear-gradient(115deg, #111827, #243653 62%, #5b211a); border-bottom: 4px solid #ff750c; }
.panel-header img { display: block; width: 210px; height: 71px; border: 3px solid transparent; border-radius: 17px; background: linear-gradient(135deg, #ff8a16, #ff5a1f 54%, #039fe3) border-box; object-fit: cover; }
.panel-header nav { display: flex; align-items: center; gap: 12px; }
.panel-header a { color: #fff; text-decoration: none; }
.panel-header form { margin: 0; }
.panel-main { width: min(1180px, calc(100% - 28px)); margin: 28px auto 70px; }
.login-shell { display: grid; place-items: center; min-height: calc(100svh - 112px); }
.card { padding: clamp(20px, 3vw, 32px); background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 18px 55px rgba(15, 23, 42, .09); }
.login-card { width: min(480px, 100%); }
.card h1, .card h2, .card h3 { margin-top: 0; line-height: 1.15; }
.card p { line-height: 1.65; }
.eyebrow { display: inline-block; margin-bottom: 8px; color: var(--brand-dark); font-size: .78rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, .75fr); gap: 22px; align-items: start; }
.stack { display: grid; gap: 22px; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field, .field-wide { display: grid; gap: 7px; }
.field-wide { grid-column: 1 / -1; }
label, legend { font-weight: 750; }
input, textarea, select { width: 100%; min-height: 44px; padding: 10px 12px; color: var(--ink); background: #fff; border: 1px solid #cbd5e1; border-radius: 10px; }
textarea { min-height: 120px; resize: vertical; }
input:focus, textarea:focus, select:focus, button:focus-visible, a:focus-visible { outline: 3px solid rgba(2, 140, 200, .32); outline-offset: 2px; }
.hint { color: var(--muted); font-size: .84rem; line-height: 1.5; }
.button, button { display: inline-flex; align-items: center; justify-content: center; min-height: 43px; padding: 10px 16px; color: #fff; background: var(--brand); border: 0; border-radius: 11px; font-weight: 800; text-decoration: none; cursor: pointer; }
.button:hover, button:hover { background: var(--brand-dark); }
.button-secondary { color: var(--ink); background: #e9eef5; }
.button-secondary:hover { background: #dce4ef; }
.button-danger { background: var(--danger); }
.button-small { min-height: 36px; padding: 7px 10px; font-size: .82rem; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.flash { margin-bottom: 20px; padding: 15px 17px; border: 1px solid #8bd0a5; border-radius: 13px; color: #14532d; background: #effcf3; }
.flash-error { color: #7f1d1d; background: #fff1f2; border-color: #fda4af; }
.flash code { display: block; margin-top: 8px; padding: 9px; overflow-wrap: anywhere; color: var(--ink); background: rgba(255,255,255,.75); border-radius: 8px; user-select: all; }
.profile-summary { display: flex; align-items: center; gap: 14px; }
.profile-summary img, .avatar-placeholder { width: 72px; height: 72px; border-radius: 22px; object-fit: cover; }
.avatar-placeholder { display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #ff6a14, #0797d2); font-size: 1.5rem; font-weight: 900; }
.schedule-table { width: 100%; border-collapse: collapse; }
.schedule-table th { color: var(--muted); font-size: .76rem; letter-spacing: .06em; text-align: left; text-transform: uppercase; }
.schedule-table th, .schedule-table td { padding: 6px; }
.schedule-table input, .schedule-table select { min-width: 90px; }
.admin-list { display: grid; gap: 12px; }
.user-row { padding: 15px; background: #f8fafc; border: 1px solid var(--line); border-radius: 14px; }
.user-row header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.user-row strong, .user-row small { display: block; }
.user-row small { margin-top: 4px; color: var(--muted); overflow-wrap: anywhere; }
.badge { display: inline-flex; padding: 4px 8px; color: #334155; background: #e2e8f0; border-radius: 99px; font-size: .72rem; font-weight: 850; text-transform: uppercase; }
.badge-active { color: #166534; background: #dcfce7; }
.badge-invited { color: #92400e; background: #fef3c7; }
.danger-zone { border-color: #fecaca; }
.danger-zone h2 { color: var(--danger); }
.check { display: flex; align-items: flex-start; gap: 9px; }
.check input { width: 19px; min-height: 19px; margin-top: 2px; }
.check label { font-weight: 600; }
fieldset { margin: 0; padding: 0; border: 0; }
fieldset + fieldset { margin-top: 24px; }
legend { margin-bottom: 12px; font-size: 1.08rem; }
.panel-footer { padding: 30px 16px; color: #cbd5e1; background: #111827; text-align: center; }
.panel-footer a { color: #fff; }
@media (max-width: 820px) {
  .panel-header { align-items: flex-start; flex-direction: column; }
  .panel-header img { width: 184px; height: 62px; }
  .dashboard-grid, .field-grid { grid-template-columns: 1fr; }
  .field-wide { grid-column: auto; }
  .schedule-table, .schedule-table tbody, .schedule-table tr, .schedule-table td { display: block; width: 100%; }
  .schedule-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .schedule-table tr { margin-bottom: 12px; padding: 9px; background: #f8fafc; border-radius: 12px; }
}
