:root {
  --bg-0: #0c1218;
  --bg-1: #142332;
  --bg-2: #22364a;
  --text: #edf3f8;
  --muted: #93a9bc;
  --brand: #ff6f3d;
  --brand-strong: #ff4d12;
  --card: rgba(12, 20, 28, 0.78);
  --line: rgba(255, 255, 255, 0.14);
  --ok: #27c47a;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 800px at 20% -5%, var(--bg-2), transparent 60%),
    linear-gradient(150deg, var(--bg-0), var(--bg-1) 46%, #0a1016);
  overflow-x: hidden;
}

.background-glow {
  position: fixed;
  filter: blur(60px);
  opacity: 0.3;
  pointer-events: none;
}

.background-glow-a {
  width: 460px;
  height: 460px;
  top: 65%;
  left: -110px;
  background: #ff7b47;
  animation: drift 14s ease-in-out infinite;
}

.background-glow-b {
  width: 500px;
  height: 500px;
  top: -80px;
  right: -140px;
  background: #2bbcff;
  animation: drift 16s ease-in-out infinite reverse;
}

.layout {
  width: min(1100px, 92vw);
  margin: 50px auto;
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 24px;
}

.hero {
  padding: 30px 8px 0 8px;
}

.eyebrow {
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brand);
  margin: 0 0 12px;
  font-size: 0.82rem;
}

h1 {
  margin: 0;
  font-family: "Bebas Neue", sans-serif;
  font-size: clamp(2.2rem, 7vw, 4.6rem);
  line-height: 0.94;
  letter-spacing: 0.04em;
}

.subtitle {
  color: var(--muted);
  margin-top: 18px;
  max-width: 40ch;
  line-height: 1.58;
}

.utility-link {
  display: inline-block;
  margin-top: 14px;
  color: #9ed9ff;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px solid rgba(158, 217, 255, 0.5);
}

.utility-link:hover {
  color: #c8ecff;
}

.control-card {
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: 24px;
  backdrop-filter: blur(18px);
  padding: 22px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.3);
}

.data-card {
  grid-column: 1 / -1;
  border: 1px solid var(--line);
  background: rgba(9, 15, 22, 0.7);
  border-radius: 24px;
  padding: 20px;
}

.data-card h2 {
  margin: 0 0 6px 0;
  font-size: 1.2rem;
}

.data-layout {
  grid-template-columns: 1fr;
}

.calendar-card {
  margin-top: 0;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.cal-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.cal-date-picker {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  padding: 6px 10px;
  font-size: 0.9rem;
  font-family: inherit;
  cursor: pointer;
}
.cal-date-picker:focus {
  outline: none;
  border-color: var(--brand);
}

.cal-day-label {
  flex: 1;
  text-align: center;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
}

.calendar-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.calendar-col {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 10px;
}

.calendar-col h3 {
  margin: 0 0 8px 0;
  font-size: 0.98rem;
}

.calendar-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.calendar-item {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 8px 10px;
  color: #d4e4f1;
  font-size: 0.9rem;
}

.calendar-empty {
  color: var(--muted);
  font-size: 0.9rem;
}

.customer-list-wrap {
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.customer-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.customer-table th {
  text-align: left;
  padding: 8px 12px;
  color: var(--muted);
  font-weight: 600;
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  background: rgba(12, 20, 28, 0.95);
}

.customer-table td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.customer-table tr:last-child td {
  border-bottom: none;
}

.customer-table tr:hover td {
  background: rgba(255,255,255,0.04);
}

.plate-badge {
  background: rgba(255, 111, 61, 0.15);
  border: 1px solid rgba(255, 111, 61, 0.35);
  color: var(--brand);
  border-radius: 6px;
  padding: 2px 8px;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

.data-subtitle {
  margin: 0 0 14px 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.data-tools {
  display: grid;
  grid-template-columns: 1.4fr auto auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.data-tools input {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 11px;
  font-family: inherit;
}

.data-tools span {
  color: #b9ccdb;
  font-size: 0.9rem;
}

.data-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.data-form input {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 11px;
  font-family: inherit;
}

.data-form button {
  grid-column: span 3;
}

.field-labeled {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.field-labeled label {
  font-size: 0.78rem;
  color: var(--muted);
  padding-left: 2px;
}

.field-labeled input {
  width: 100%;
}

.data-result {
  margin-top: 12px;
  font-size: 0.9rem;
  color: #c5d7e6;
}

.status-row {
  display: flex;
  gap: 10px;
  align-items: center;
  color: var(--muted);
  margin-bottom: 16px;
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #677785;
  box-shadow: 0 0 0 0 rgba(39, 196, 122, 0.5);
}

.dot.live {
  background: var(--ok);
  animation: pulse 1.4s infinite;
}

.button-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}

.mode-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.mode-row label {
  font-size: 0.9rem;
  color: var(--muted);
}

.mode-row select {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-radius: 10px;
  padding: 9px 10px;
  font-family: inherit;
}

#pttBtn.active {
  filter: brightness(1.1);
  box-shadow: 0 0 0 3px rgba(43, 188, 255, 0.25);
}

.btn {
  border: 0;
  border-radius: 12px;
  padding: 11px 16px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.18s ease, filter 0.2s ease, opacity 0.2s ease;
}

.btn:active {
  transform: translateY(1px) scale(0.98);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(120deg, var(--brand), var(--brand-strong));
  color: #fff;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #e8edf3;
}

.btn-accent {
  background: #2bbcff;
  color: #071018;
}

.consent {
  font-size: 0.84rem;
  color: #a9bacc;
  margin-bottom: 12px;
}

.chat-panel {
  height: 355px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(4, 9, 14, 0.5);
  padding: 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.msg {
  max-width: 90%;
  padding: 10px 12px;
  border-radius: 12px;
  line-height: 1.35;
  font-size: 0.95rem;
}

.msg-agent {
  align-self: flex-start;
  background: rgba(43, 188, 255, 0.12);
  border: 1px solid rgba(43, 188, 255, 0.25);
}

.msg-user {
  align-self: flex-end;
  background: rgba(255, 111, 61, 0.12);
  border: 1px solid rgba(255, 111, 61, 0.3);
}

.msg-live {
  opacity: 0.9;
  border-style: dashed;
}

.text-form {
  margin-top: 12px;
  display: flex;
  gap: 8px;
}

.text-form input {
  flex: 1;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 11px;
  padding: 10px 12px;
  font-family: inherit;
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
    margin-top: 26px;
  }

  .hero {
    padding-top: 4px;
  }

  .data-form {
    grid-template-columns: 1fr;
  }

  .data-tools {
    grid-template-columns: 1fr;
  }

  .mode-row {
    grid-template-columns: 1fr;
  }

  .data-form button {
    grid-column: auto;
  }

  .calendar-grid {
    grid-template-columns: 1fr;
  }

  .calendar-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

.powered-by {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(12px);
  border-radius: 18px;
  padding: 18px 24px;
}

.powered-by-label {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.powered-by-logos {
  display: flex;
  align-items: center;
  gap: 24px;
}

.powered-by-logo {
  height: 100px;
  width: auto;
  opacity: 0.75;
  filter: brightness(1.1);
  transition: opacity 0.2s ease;
}

.powered-by-logo:hover {
  opacity: 1;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(39, 196, 122, 0.65);
  }
  80% {
    box-shadow: 0 0 0 12px rgba(39, 196, 122, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(39, 196, 122, 0);
  }
}

@keyframes drift {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(18px, -22px);
  }
}
