/* ================================================================
   WHEATSTONE MAKERSPACE DASHBOARD
   Design System: Industrial / Professional / Minimal
   ================================================================ */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap");

:root {
  /* Solid Color Palette (No translucency where possible) */
  --bg-primary: #000000;
  --bg-secondary: #0a0a0a;
  --bg-tertiary: #141414;
  --bg-card: #0c0c0c;
  --bg-panel: #050505;

  --border-primary: #1a1a1a;
  --border-secondary: #222222;

  --text-primary: #ffffff;
  --text-secondary: #c0c0c0;
  --text-muted: #a0a0a0;

  --accent-red: #e4002b;
  --accent-amber: #cc7a00;
  --accent-blue: #0056b3;

  --font-body:
    -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial,
    sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  --header-height: 72px;
  --ticker-height: 52px;
  --side-panel-width: 350px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  overflow: hidden;
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

/* Dashboard Layout */
.dashboard {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* Header (Solid, Industrial) */
.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
  padding: 0 40px 0 0;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-primary);
  z-index: 100;
  flex-shrink: 0;
}

.header-brand {
  height: 100%;
  padding: 0 24px 0 0;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
  border-right: 1px solid var(--border-primary);
}

.header-info {
  display: flex;
  align-items: center;
  gap: 24px;
}

.kcl-logo {
  height: 100%;
  width: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.logo-container {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.logo-container:hover {
  background: var(--bg-tertiary);
}

.logo-container svg {
  width: 100%;
  height: 100%;
}

.clock-container {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  padding-left: 24px;
  border-left: 1px solid var(--border-primary);
}

.clock-time {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -1px;
}

.clock-date {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-top: 2px;
}

.tfl-container {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  border-right: 1px solid var(--border-primary);
}



.tfl-carousel {
  display: flex;
  align-items: center;
  gap: 12px;
  transition: opacity 0.4s ease;
  flex: 1;
}

.tfl-carousel.fade-out {
  opacity: 0;
}

.tfl-badge {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
}

.tfl-badge.bakerloo {
  background: #B26300;
}

.tfl-badge.central {
  background: #DC241F;
}

.tfl-badge.circle {
  background: #FFD329;
  color: #113B92;
}

.tfl-badge.district {
  background: #007229;
}

.tfl-badge.elizabeth {
  background: #60399E;
}

.tfl-badge.hammersmith-city {
  background: #F4A9BE;
  color: #113B92;
}

.tfl-badge.jubilee {
  background: #A1A5A7;
  color: #113B92;
}

.tfl-badge.metropolitan {
  background: #9B0058;
}

.tfl-badge.northern {
  background: #000000;
  border: 1px solid #ffffff;
}

.tfl-badge.piccadilly {
  background: #0019A8;
}

.tfl-badge.victoria {
  background: #0098D4;
}

.tfl-badge.waterloo-city {
  background: #93CEBA;
  color: #113B92;
}

.tfl-main-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tfl-line-header {
  display: flex;
  align-items: center;
  gap: 6px;
}

.tfl-line-name {
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
}

.tfl-status-text {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.tfl-status-text.good {
  color: #4CAF50;
}

.tfl-status-text.minor {
  color: var(--accent-amber);
}

.tfl-status-text.severe {
  color: var(--accent-red);
}

.tfl-reason {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-muted);
  max-width: 250px;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  padding-left: 12px;
  border-left: 1px solid var(--border-secondary);
}

.weather-container {
  display: flex;
  align-items: center;
  gap: 16px;
}

.weather-current {
  display: flex;
  align-items: center;
  gap: 8px;
}

.weather-icon {
  font-size: 1.4rem;
}

.weather-temp {
  font-size: 1.2rem;
  font-weight: 700;
}

.weather-desc {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  font-weight: 600;
}

.weather-forecast {
  display: flex;
  gap: 12px;
}

.forecast-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 0.65rem;
  color: var(--text-muted);
  font-weight: 700;
  text-transform: uppercase;
}

.forecast-icon {
  font-size: 1rem;
  margin: 2px 0;
}

.forecast-temp {
  color: var(--text-secondary);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lab-info {
  text-align: left;
}

.lab-name {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.lab-location {
  font-size: 0.65rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* Main Content Area */
.main-content {
  display: flex;
  flex: 1;
  overflow: hidden;
  background: var(--bg-primary);
}

/* Side Panel (Left) */
.side-panel {
  width: var(--side-panel-width);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--border-primary);
  background: var(--bg-panel);
}

.panel-header {
  padding: 16px 20px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-icon {
  font-size: 0.9rem;
}

.panel-title {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-secondary);
}

/* Status Panel */
.status-panel {
  flex-shrink: 0;
  border-bottom: 1px solid var(--border-primary);
}

.status-content {
  padding: 24px;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-primary);
}

.status-message {
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.6;
  text-align: center;
  color: var(--text-primary);
  transition: opacity 0.5s ease;
}

.status-message.fade-out {
  opacity: 0;
}

.status-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding-bottom: 12px;
  background: var(--bg-primary);
}

.status-dot {
  width: 5px;
  height: 5px;
  background: #222;
  transition: all 0.3s;
}

.status-dot.active {
  background: var(--accent-amber);
  width: 24px;
}

/* Events Panel */
.events-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.events-list {
  flex: 1;
  overflow-y: hidden;
  display: flex;
  flex-direction: column;
}

.event-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.2rem;
}

.event-item {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid var(--border-primary);
  background: var(--bg-card);
  transition: background 0.2s;
  height: 76px;
  overflow: hidden;
}

.event-item:hover {
  background: var(--bg-tertiary);
}

.event-date-badge {
  width: 64px;
  background: var(--bg-tertiary);
  border-right: 1px solid var(--border-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.event-month {
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-muted);
}

.event-day {
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--accent-red);
  line-height: 1.1;
}

.event-details {
  padding: 8px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
}

.event-name {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 4px;
}

.event-caption {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
}

.event-badge-time {
  font-size: 0.55rem;
  font-weight: 700;
  color: var(--text-secondary);
  margin-top: 4px;
  text-align: center;
  line-height: 1.1;
}

.event-qr {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  padding: 12px;
  border-left: 1px solid var(--border-primary);
  background: white;
  flex-shrink: 0;
}

.event-qr img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Carousel (Right) */
.carousel-container {
  flex: 1;
  position: relative;
  background: #050505;
  overflow: hidden;
}

.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 1.5s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-slide.active {
  opacity: 1;
  visibility: visible;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transition: transform 7s linear;
}

.carousel-slide.active img {
  transform: scale(1.08);
}

.carousel-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: auto;
  max-width: 70%;
  padding: 12px 28px;
  background: rgba(0, 0, 0, 0.85);
  border: 1px solid var(--border-secondary);
  border-left: none;
  border-bottom: none;
  font-size: 1.2rem;
  font-weight: 600;
  color: white;
}

.carousel-indicators {
  position: absolute;
  bottom: 32px;
  right: 40px;
  display: flex;
  gap: 12px;
}

.carousel-dot {
  width: 6px;
  height: 6px;
  background: rgba(255, 255, 255, 0.2);
  transition: all 0.4s;
  cursor: pointer;
}

.carousel-dot.active {
  background: var(--accent-red);
  width: 40px;
}

/* Ticker (Solid, Professional) */
.ticker-container {
  height: var(--ticker-height);
  background: var(--bg-card);
  border-top: 1px solid var(--border-primary);
  display: flex;
  align-items: center;
  overflow: hidden;
  z-index: 100;
}

.ticker-label {
  height: 100%;
  padding: 0 24px;
  background: var(--accent-red);
  color: white;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  z-index: 10;
  white-space: nowrap;
}

.ticker-pipe {
  width: 2px;
  height: 16px;
  background: white;
}

.ticker-track {
  display: flex;
  animation: ticker-scroll var(--ticker-duration, 120s) linear infinite;
}

.ticker-item {
  white-space: nowrap;
  padding: 0 40px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 12px;
}

.ticker-item::before {
  content: "";
  width: 4px;
  height: 4px;
  background: var(--accent-amber);
}

@keyframes ticker-scroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* ================================================================
   ADMIN INTERFACE (Minimalist)
   ================================================================ */
.admin-page {
  background: var(--bg-primary);
  overflow-y: auto;
}

.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  padding: 40px;
}

.login-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.login-logo svg {
  width: 56px;
  height: 56px;
}

.login-logo h1 {
  font-size: 1.4rem;
  font-weight: 900;
  text-align: center;
}

.login-error {
  color: var(--accent-red);
  font-size: 0.85rem;
  margin-bottom: 16px;
  display: none;
}

.login-error.show {
  display: block;
}

.form-group {
  margin-bottom: 24px;
}

.form-group label {
  display: block;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-group input {
  width: 100%;
  padding: 12px;
  background: #000;
  border: 1px solid var(--border-primary);
  color: white;
  outline: none;
  font-family: var(--font-mono);
}

.form-group input:focus {
  border-color: var(--accent-red);
}

.form-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  margin-bottom: 24px;
}

.form-row:last-child {
  margin-bottom: 0;
}

.form-row .form-group {
  flex: 1;
  margin-bottom: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-weight: 800;
  border: none;
  cursor: pointer;
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 1px;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--accent-red);
  color: white;
  width: 100%;
}

.btn-primary:hover {
  background: #c80025;
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
}

.btn-danger {
  background: rgba(228, 0, 43, 0.15);
  border: 1px solid rgba(228, 0, 43, 0.3);
  color: var(--accent-red);
}

.btn-danger:hover {
  background: rgba(228, 0, 43, 0.25);
}

.btn-sm {
  padding: 8px 16px;
  font-size: 0.75rem;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  font-size: 1rem;
}

.admin-dashboard {
  display: none;
}

.admin-dashboard.active {
  display: block;
}

.admin-header {
  padding: 20px 40px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-primary);
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 50;
}

.admin-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.admin-header-left svg {
  width: 36px;
  height: 36px;
}

.admin-header-left h1 {
  font-size: 1.2rem;
  font-weight: 800;
}

.admin-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-nav {
  display: flex;
  gap: 8px;
}

.admin-nav-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-weight: 800;
  padding: 10px 20px;
  cursor: pointer;
  text-transform: uppercase;
  font-size: 0.75rem;
}

.admin-nav-btn.active {
  color: var(--accent-red);
  border-bottom: 2px solid var(--accent-red);
}

.admin-content {
  padding: 40px 32px;
  max-width: 1200px;
  margin: 0 auto;
}

.admin-section {
  display: none;
}

.admin-section.active {
  display: block;
}

.section-title {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 32px;
}

.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border-primary);
  margin-bottom: 32px;
}

.card-header {
  padding: 16px 24px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-primary);
  font-weight: 800;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.card-body {
  padding: 24px;
}

.slide-item,
.headline-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-primary);
}

.slide-preview {
  width: 120px;
  height: 68px;
  object-fit: cover;
  background: var(--bg-tertiary);
}

.slide-info,
.headline-text {
  flex: 1;
  min-width: 0;
}

.slide-url {
  font-size: 0.8rem;
  font-family: var(--font-mono);
  color: var(--accent-blue);
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slide-caption-text {
  font-size: 0.85rem;
  color: var(--text-primary);
}

.slide-actions,
.headline-actions {
  display: flex;
  gap: 8px;
}

.add-form {
  padding: 24px;
  background: var(--bg-tertiary);
  border-top: 1px dashed var(--border-secondary);
  margin-top: 16px;
}

.dropzone-area {
  border: 2px dashed var(--border-primary);
  padding: 32px 20px;
  text-align: center;
  color: var(--text-secondary);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--bg-primary);
}

.dropzone-area:hover,
.dropzone-area.dragover {
  border-color: var(--accent-red);
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

.image-preview {
  width: 100%;
  max-width: 300px;
  height: 120px;
  object-fit: cover;
  margin-top: 8px;
  display: none;
  background: var(--bg-primary);
  border: 1px solid var(--border-primary);
}

.image-preview.show {
  display: block;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px;
}

.toggle-label {
  font-size: 0.95rem;
  font-weight: 700;
}

.toggle-desc {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.toggle-switch {
  position: relative;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-primary);
  transition: all 0.2s;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  left: 2px;
  bottom: 2px;
  background: var(--text-secondary);
  transition: all 0.2s;
}

.toggle-switch input:checked+.toggle-slider {
  background: var(--accent-red);
  border-color: var(--accent-red);
}

.toggle-switch input:checked+.toggle-slider::before {
  transform: translateX(22px);
  background: white;
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 24px;
  background: var(--bg-tertiary);
  border-left: 4px solid var(--accent-red);
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  z-index: 1000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.success {
  border-color: var(--accent-green);
}

.toast.error {
  border-color: var(--accent-red);
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}

.empty-state .empty-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.empty-state p {
  font-size: 0.9rem;
  font-weight: 500;
}

::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-thumb {
  background: #333;
}