:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --bg-2: #eaf1f8;
  --panel: rgba(255, 255, 255, 0.92);
  --panel-solid: #ffffff;
  --panel-2: #f7fafc;
  --text: #102033;
  --muted: #64748b;
  --line: #dbe5ef;
  --line-strong: #c9d8e7;
  --accent: #0f6bff;
  --accent-2: #14b8a6;
  --accent-soft: #e8f1ff;
  --danger: #dc2626;
  --success: #15803d;
  --shadow: 0 24px 70px rgba(15, 35, 60, 0.12);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(20, 184, 166, 0.18), transparent 34rem),
    radial-gradient(circle at top right, rgba(15, 107, 255, 0.16), transparent 32rem),
    linear-gradient(180deg, var(--bg), var(--bg-2));
  color: var(--text);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(15, 107, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 107, 255, 0.035) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.75), transparent 72%);
}

.login-body { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card, .panel, .topbar {
  position: relative;
  background: var(--panel);
  border: 1px solid rgba(219, 229, 239, 0.9);
  box-shadow: var(--shadow);
  border-radius: 24px;
  backdrop-filter: blur(14px);
}
.login-card { width: min(560px, 100%); padding: 36px; }
.topbar { margin: 20px auto; padding: 22px; width: min(1180px, calc(100% - 32px)); display: flex; justify-content: space-between; gap: 18px; align-items: center; }
.layout { width: min(1180px, calc(100% - 32px)); margin: 0 auto 48px; display: grid; gap: 18px; }
.panel { padding: 22px; }

.login-card::after, .topbar::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  border-top: 3px solid rgba(15, 107, 255, 0.72);
}

h1, h2 { margin: 0 0 12px; line-height: 1.08; letter-spacing: -0.035em; }
h1 { font-size: clamp(1.55rem, 3vw, 2.35rem); }
h2 { font-size: 1.22rem; }
p { margin: 0 0 10px; }
.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: .16em; font-size: .76rem; font-weight: 850; }
.muted { color: var(--muted); }
.notice, .auto {
  color: #315270;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  padding: 12px 14px;
  border-radius: 14px;
}
.alert { background: #fff1f2; color: #991b1b; border: 1px solid #fecdd3; padding: 12px; border-radius: 14px; margin: 18px 0; }
.success { border-color: rgba(21, 128, 61, .24); color: var(--success); background: #f0fdf4; }

.stack, .grid-form { display: grid; gap: 14px; }
.grid-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.full { grid-column: 1 / -1; }
.attendant-row { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: end; }
.inline-form, .mini-form { display: flex; gap: 8px; align-items: end; }

label { display: grid; gap: 7px; color: #40576f; font-size: .94rem; font-weight: 650; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
  border-radius: 14px;
  padding: 12px 13px;
  font: inherit;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
input:focus, select:focus, textarea:focus {
  border-color: rgba(15, 107, 255, .62);
  box-shadow: 0 0 0 4px rgba(15, 107, 255, .12);
  background: #fff;
}
textarea { resize: vertical; }
button {
  border: 0;
  background: linear-gradient(135deg, var(--accent), #0759d9);
  color: #ffffff;
  font-weight: 850;
  padding: 12px 16px;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(15, 107, 255, .22);
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}
button:hover { transform: translateY(-1px); filter: brightness(1.02); box-shadow: 0 14px 28px rgba(15, 107, 255, .26); }
button.secondary { background: #eef5fb; color: #17324d; border: 1px solid var(--line-strong); box-shadow: none; }
button.ghost { background: transparent; color: #17324d; border: 1px solid var(--line-strong); box-shadow: none; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 18px; background: var(--panel-solid); }
table { width: 100%; border-collapse: collapse; min-width: 980px; }
th, td { border-bottom: 1px solid var(--line); padding: 12px 10px; text-align: left; vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { color: #42637f; background: #f8fbfd; font-size: .78rem; text-transform: uppercase; letter-spacing: .07em; }
td { color: #1d3146; }
tbody tr:hover { background: #f8fbff; }
.empty { color: var(--muted); text-align: center; padding: 28px; }

@media (max-width: 820px) {
  .topbar, .attendant-row { grid-template-columns: 1fr; display: grid; }
  .topbar { align-items: stretch; }
  .grid-form { grid-template-columns: 1fr; }
  .inline-form { display: grid; }
  .login-card, .panel, .topbar { border-radius: 20px; }
}
