:root {
  --bg: #f5f3f8;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
  --primary: #5b2a86;
  --primary-dark: #3b0f63;
  --gold: #f2b632;
  --soft-purple: #f3e8ff;
  --shadow: 0 14px 28px rgba(31, 41, 55, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

body {
  min-height: 100vh;
}

.page,
.container,
main {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 34px;
}

h1 {
  margin: 0 0 8px;
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1.1;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #111827;
}

h2 {
  margin: 0 0 22px;
  font-size: clamp(24px, 2.5vw, 34px);
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: #111827;
}

h3 {
  margin: 0 0 18px;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 900;
  letter-spacing: 0.05em;
  color: #111827;
}

p {
  margin: 0 0 16px;
  color: #374151;
  font-size: 17px;
}

a {
  color: var(--primary);
  font-weight: 700;
}

nav,
.nav,
.topnav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 26px;
}

nav a,
.nav a,
.topnav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 9px 14px;
  background: #ffffff;
  color: var(--primary-dark);
  text-decoration: none;
  border: 1px solid #d8b4fe;
  border-radius: 999px;
  box-shadow: 0 4px 10px rgba(91, 42, 134, 0.08);
}

nav a:hover,
.nav a:hover,
.topnav a:hover {
  background: var(--soft-purple);
}

.monitor-grid,
.dashboard-grid,
.cards,
.card-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 26px;
  align-items: stretch;
  margin-top: 18px;
}

.card,
.panel,
.monitor-card,
section {
  background: var(--card);
  border: 1px solid var(--border);
  border-top: 8px solid var(--primary);
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.cue-big,
.current-call,
.callsign-big,
.on-cue,
#currentCall,
#current-callsign {
  width: 100%;
  min-height: 112px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: var(--gold);
  border-radius: 12px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(52px, 8vw, 86px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
  margin: 10px 0 22px;
}

.next-box,
.up-next,
.queue-next,
#upNext,
#nextCall {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  padding: 14px 18px;
  background: var(--soft-purple);
  color: var(--primary-dark);
  border-radius: 9px;
  font-family: "Courier New", monospace;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.count,
.confirmed-count,
.stat {
  font-size: 20px;
  font-weight: 900;
  color: #4b5563;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

th {
  background: var(--primary-dark);
  color: #ffffff;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

tr:last-child td {
  border-bottom: 0;
}

form {
  background: #ffffff;
  border: 1px solid var(--border);
  border-top: 8px solid var(--primary);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 28px;
}

label {
  display: block;
  margin: 16px 0 6px;
  font-weight: 800;
  color: #374151;
}

input,
select,
textarea {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid #d1d5db;
  border-radius: 9px;
  font-size: 16px;
  background: #ffffff;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

button,
input[type="submit"],
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 18px;
  padding: 12px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: #ffffff;
  font-size: 15px;
  font-weight: 900;
  cursor: pointer;
}

button:hover,
input[type="submit"]:hover,
.btn:hover {
  background: var(--primary-dark);
}

footer,
.footer {
  margin-top: 38px;
  text-align: center;
  color: #6b7280;
  font-size: 14px;
}

@media (max-width: 900px) {
  .monitor-grid,
  .dashboard-grid,
  .cards,
  .card-grid {
    grid-template-columns: 1fr;
  }

  .page,
  .container,
  main {
    width: min(100% - 24px, 760px);
    padding-top: 18px;
  }

  nav,
  .nav,
  .topnav {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  nav a,
  .nav a,
  .topnav a {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .page,
  .container,
  main {
    width: min(100% - 18px, 480px);
  }

  .card,
  .panel,
  .monitor-card,
  section,
  form {
    padding: 18px;
  }

  nav,
  .nav,
  .topnav {
    grid-template-columns: 1fr;
  }
}
