:root {
  --bg-1: #f4efe6;
  --bg-2: #e2edf0;
  --ink: #102a2f;
  --muted: #53656a;
  --accent: #1b6f6a;
  --accent-2: #d27d42;
  --panel: rgba(255, 255, 255, 0.85);
  --panel-border: rgba(16, 42, 47, 0.12);
  --shadow: 0 24px 60px rgba(15, 29, 32, 0.18);
  --radius: 18px;
  --font-head: 'Fraunces', 'Georgia', serif;
  --font-body: 'Work Sans', 'Helvetica', sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: radial-gradient(circle at top left, rgba(210, 125, 66, 0.12), transparent 55%),
    radial-gradient(circle at 20% 70%, rgba(27, 111, 106, 0.12), transparent 60%),
    linear-gradient(135deg, var(--bg-1), var(--bg-2));
  min-height: 100vh;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: linear-gradient(0deg, rgba(16, 42, 47, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 42, 47, 0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

.ct-shell {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 0 auto;
  padding: 48px 24px 80px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.ct-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.ct-brand h1 {
  font-family: var(--font-head);
  font-size: clamp(2.2rem, 3vw, 3.4rem);
  letter-spacing: 0.08em;
  margin: 4px 0 6px;
}

.ct-brand {
  max-width: 520px;
}

.ct-kicker {
  text-transform: uppercase;
  letter-spacing: 0.3em;
  font-size: 0.7rem;
  color: var(--muted);
}

.ct-subtitle {
  margin: 0;
  color: var(--muted);
}

.ct-card {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  animation: rise 0.6s ease;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ct-login h2,
.ct-console h2 {
  font-family: var(--font-head);
  margin-top: 0;
}

.ct-login-form,
.ct-login label {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ct-login-form {
  gap: 18px;
  margin-top: 24px;
}

.ct-login input {
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(16, 42, 47, 0.2);
  font-size: 1rem;
}

.ct-login button,
.ct-logout button,
.ct-refresh {
  padding: 12px 20px;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ct-logout button {
  background: transparent;
  color: var(--ink);
  border: 1px solid rgba(16, 42, 47, 0.2);
}

.ct-login button:hover,
.ct-refresh:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(27, 111, 106, 0.2);
}

.ct-logout button:hover {
  border-color: rgba(16, 42, 47, 0.4);
}

.ct-muted {
  color: var(--muted);
}

.ct-errors {
  background: rgba(210, 125, 66, 0.15);
  border: 1px solid rgba(210, 125, 66, 0.3);
  border-radius: 12px;
  padding: 12px 16px;
  margin-top: 16px;
}

.ct-console-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.ct-console-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ct-enter {
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(16, 42, 47, 0.2);
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ct-enter:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(16, 42, 47, 0.15);
}

.ct-enter.is-sent {
  border-color: rgba(27, 111, 106, 0.6);
  box-shadow: 0 0 0 3px rgba(27, 111, 106, 0.15);
}

.ct-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--muted);
}

.ct-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #94a3a8;
  box-shadow: 0 0 0 6px rgba(148, 163, 168, 0.15);
}

.ct-status.is-recording .ct-dot {
  background: var(--accent-2);
  box-shadow: 0 0 0 6px rgba(210, 125, 66, 0.18);
}

.ct-recorder {
  display: flex;
  align-items: center;
  gap: 24px;
  margin: 28px 0;
  flex-wrap: wrap;
}

.ct-record {
  position: relative;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: none;
  background: radial-gradient(circle at 30% 30%, #fff, #f3f3f0);
  box-shadow: inset 0 0 0 2px rgba(16, 42, 47, 0.15), 0 14px 32px rgba(16, 42, 47, 0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ct-record.is-recording {
  background: radial-gradient(circle at 30% 30%, #fff2e7, #f8e1cf);
  box-shadow: inset 0 0 0 2px rgba(210, 125, 66, 0.3), 0 14px 32px rgba(210, 125, 66, 0.3);
}

.ct-record-ring {
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px solid rgba(27, 111, 106, 0.2);
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.ct-record.is-recording .ct-record-ring {
  opacity: 1;
  transform: scale(1.05);
  animation: pulse 1.6s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(210, 125, 66, 0.35);
  }
  50% {
    box-shadow: 0 0 0 18px rgba(210, 125, 66, 0);
  }
}

.ct-recorder-meta {
  display: grid;
  gap: 6px;
}

.ct-timestamp {
  font-family: var(--font-head);
  font-size: 1.6rem;
}

.ct-transcripts {
  border-top: 1px solid rgba(16, 42, 47, 0.12);
  padding-top: 24px;
}

.ct-transcripts-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.ct-transcript-item {
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(16, 42, 47, 0.12);
  background: rgba(255, 255, 255, 0.7);
  margin-bottom: 12px;
}

.ct-transcript-item h4 {
  margin: 0 0 6px;
  font-size: 0.95rem;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.ct-transcript-item p {
  margin: 0;
  line-height: 1.5;
}

.ct-transcript-status {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

@media (max-width: 720px) {
  .ct-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .ct-recorder {
    flex-direction: column;
    align-items: flex-start;
  }

  .ct-record {
    width: 120px;
    height: 120px;
  }
}
