:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #152019;
  background: #edf2ee;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at top, #f8fbf8, #e7eee9 70%);
}

button, input, select { font: inherit; }
button { cursor: pointer; }

.page-shell {
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 32px 0;
  display: grid;
  gap: 20px;
}

.card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid #d9e3dc;
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(30, 56, 39, 0.08);
  padding: 24px;
}

.title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 24px; font-size: clamp(1.65rem, 4vw, 2.3rem); }
h2 { margin-bottom: 0; font-size: 1.25rem; }

.eyebrow {
  margin-bottom: 5px;
  color: #53705d;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 700;
}

.action-row {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) auto auto;
  gap: 10px;
}

select, input {
  width: 100%;
  min-height: 48px;
  padding: 10px 13px;
  border: 1px solid #b8c8bd;
  border-radius: 10px;
  background: white;
  color: #152019;
}

select:focus, input:focus, button:focus-visible {
  outline: 3px solid rgba(38, 112, 65, 0.23);
  outline-offset: 2px;
}

button {
  min-height: 48px;
  padding: 10px 20px;
  border: 0;
  border-radius: 10px;
  font-weight: 800;
}

button:disabled { cursor: not-allowed; opacity: 0.55; }
.primary { background: #176b3a; color: white; }
.primary:hover:not(:disabled) { background: #11582f; }
.danger { background: #bb2632; color: white; }
.danger:hover:not(:disabled) { background: #981e28; }
.text-button { min-height: auto; padding: 8px 10px; color: #385445; background: transparent; }
.full-width { width: 100%; margin-top: 8px; }

.status {
  min-height: 27px;
  margin: 18px 0 0;
  font-size: 1.05rem;
  font-weight: 800;
}

.status.ringing { color: #b31f2b; animation: pulse 1.2s ease-in-out infinite; }
.status.confirmed { color: #176b3a; }
.status.cancelled { color: #865810; }
.status.idle, .muted { color: #637269; }

@keyframes pulse { 50% { opacity: 0.45; } }

.error {
  margin: 12px 0 0;
  padding: 11px 13px;
  border-radius: 9px;
  color: #8f1620;
  background: #fff0f1;
  border: 1px solid #f3c4c8;
}

.history .title-row { margin-bottom: 16px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 10px; border-bottom: 1px solid #e5ebe7; text-align: left; white-space: nowrap; }
th { color: #53635a; font-size: 0.76rem; letter-spacing: 0.05em; text-transform: uppercase; }
.empty { text-align: center; color: #637269; padding: 32px; }
.pill { display: inline-block; padding: 4px 8px; border-radius: 999px; font-size: 0.78rem; font-weight: 800; }
.pill.confirmed { color: #126033; background: #def3e6; }
.pill.cancelled { color: #8f1620; background: #ffe5e7; }

.login-page { display: grid; place-items: center; padding: 20px; }
.login-card { width: min(420px, 100%); }
.login-card h1 { margin-bottom: 8px; }
.login-card form { margin-top: 24px; }
.login-card input { margin-bottom: 18px; }
.login-error { margin-bottom: 18px; }

@media (max-width: 640px) {
  .page-shell { width: min(100% - 20px, 1080px); padding: 10px 0; }
  .card { padding: 18px; border-radius: 14px; }
  .action-row { grid-template-columns: 1fr 1fr; }
  .action-row select { grid-column: 1 / -1; }
  th, td { padding: 10px 8px; }
}
