:root {
  /* Theme matches the CineTicket intro art: dark cinema, neon cyan + ticket gold */
  --bg-primary: #060912;
  --bg-secondary: #0c1220;
  --bg-tertiary: #141c30;
  --card-bg: rgba(12, 18, 34, 0.88);
  --card-border: rgba(56, 189, 248, 0.14);
  --text-main: #eef4ff;
  --text-muted: #8fa0bd;
  --accent-primary: #22c3ee; /* Neon cyan */
  --accent-hover: #5ad8f5;
  --accent-glow: rgba(34, 195, 238, 0.28);
  --gold: #f6b91f; /* Ticket gold */
  --gold-dark: #d99a06;
  --gold-glow: rgba(246, 185, 31, 0.3);
  --ok: #10b981;
  --ok-glow: rgba(16, 185, 129, 0.2);
  --warn: #f59e0b;
  --bad: #ef4444;
  --turbo: #8b5cf6;
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-family);
  min-height: 100vh;
  line-height: 1.5;
  overflow-x: hidden;
}

/* Background subtle glow */
body::before {
  content: '';
  position: fixed;
  top: -150px;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 400px;
  background: radial-gradient(circle, rgba(34, 195, 238, 0.14) 0%, rgba(246, 185, 31, 0.05) 45%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.app-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px 80px;
  position: relative;
  z-index: 1;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--card-border);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  font-size: 28px;
  background: linear-gradient(135deg, #0c1a33, #10284a);
  border: 1px solid rgba(34, 195, 238, 0.5);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  box-shadow: 0 4px 16px var(--accent-glow);
}

.brand-info h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #e9fbff;
  text-shadow: 0 0 6px rgba(34, 195, 238, 0.9), 0 0 18px rgba(34, 195, 238, 0.45);
  display: flex;
  align-items: center;
  gap: 8px;
}

.brand-info .tagline {
  color: var(--gold);
  font-weight: 600;
  letter-spacing: 0.4px;
  font-size: 13px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.status-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  padding: 6px 12px;
  border-radius: 99px;
  font-size: 13px;
  color: var(--text-muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 8px var(--ok);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #ffd25a, var(--gold) 45%, var(--gold-dark));
  color: #1a1203;
  box-shadow: 0 4px 14px var(--gold-glow);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #ffe08a, #ffc53d 45%, var(--gold));
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-tertiary);
  color: var(--text-main);
  border: 1px solid var(--card-border);
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
}
.btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
}

.btn-success {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

/* Nav Tabs */
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  background: var(--bg-secondary);
  padding: 6px;
  border-radius: var(--radius-md);
  border: 1px solid var(--card-border);
  overflow-x: auto;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  border: none;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.15s;
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-main);
}

.tab-btn.active {
  background: var(--bg-tertiary);
  color: var(--accent-hover);
  font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--accent-primary), 0 2px 8px rgba(0,0,0,0.2);
}

/* Tiles summary */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}

.tile {
  background: var(--card-bg);
  backdrop-filter: blur(8px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
}

.tile-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tile-value {
  font-size: 32px;
  font-weight: 700;
  line-height: 1.1;
}

.tile-value.ok { color: var(--ok); }
.tile-value.turbo { color: var(--turbo); }
.tile-value.bad { color: var(--bad); }

/* Task Cards */
.tasks-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.tasks-header h2 {
  font-size: 18px;
  font-weight: 600;
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.task-card {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: border-color 0.2s, transform 0.2s;
  position: relative;
  overflow: hidden;
}

.task-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}

.task-card.triggered {
  border-color: rgba(246, 185, 31, 0.55);
  box-shadow: 0 0 22px var(--gold-glow);
}

.task-card.blocked {
  border-color: rgba(239, 68, 68, 0.4);
}

.task-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.task-title-area {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.task-movie-title {
  font-size: 20px;
  font-weight: 700;
  text-transform: capitalize;
  display: flex;
  align-items: center;
  gap: 10px;
}

.task-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--text-muted);
  font-size: 13px;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badges {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.badge {
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2px;
  text-transform: uppercase;
}

.badge-active { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-turbo { background: rgba(139, 92, 246, 0.15); color: #a78bfa; border: 1px solid rgba(139, 92, 246, 0.3); }
.badge-eco { background: rgba(107, 114, 128, 0.2); color: #d1d5db; border: 1px solid rgba(156, 163, 175, 0.3); }
.badge-triggered { background: rgba(246, 185, 31, 0.18); color: var(--gold); border: 1px solid var(--gold); }
.badge-blocked { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.badge-paused { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }

.task-details {
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin: 12px 0;
  font-size: 13px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px 16px;
}

.detail-row {
  display: flex;
  gap: 8px;
}

.detail-label {
  color: var(--text-muted);
  min-width: 90px;
}

.detail-value {
  color: var(--text-main);
  font-weight: 500;
}

.task-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 1px solid var(--card-border);
}

.action-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* Forms */
.form-card {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 24px;
}

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

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.form-input, .form-select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-input:focus, .form-select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.form-help {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Search Results Grid */
.search-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.search-item {
  background: var(--bg-secondary);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.search-item:hover {
  border-color: var(--accent-primary);
  background: var(--bg-tertiary);
  transform: translateY(-2px);
}

.search-item-title {
  font-weight: 600;
  font-size: 15px;
  margin-bottom: 4px;
}

.search-item-id {
  font-size: 12px;
  color: var(--text-muted);
}

/* Mobile Guide / QR Card */
.mobile-setup-card {
  background: linear-gradient(135deg, rgba(24, 27, 36, 0.95), rgba(34, 38, 52, 0.85));
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: grid;
  grid-template-columns: 1fr 220px;
  gap: 28px;
  align-items: center;
}

@media (max-width: 768px) {
  .mobile-setup-card {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .qr-box {
    margin: 0 auto;
  }
}

.qr-box {
  background: white;
  padding: 12px;
  border-radius: 12px;
  width: 190px;
  height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qr-box img {
  width: 100%;
  height: 100%;
}

/* Logs Box */
.logs-console {
  background: #08090d;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 14px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12.5px;
  height: 450px;
  overflow-y: auto;
  display: flex;
  flex-direction: column-reverse;
  gap: 4px;
}

.log-line {
  line-height: 1.4;
  word-break: break-all;
}

.log-info { color: #38bdf8; }
.log-success { color: #4ade80; }
.log-warn { color: #facc15; }
.log-error { color: #f87171; }
.log-time { color: #64748b; margin-right: 8px; }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}
.empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

/* Toast popup */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--bg-secondary);
  color: white;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideIn 0.3s ease;
  max-width: 360px;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast-urgent {
  border-color: var(--gold);
  background: linear-gradient(135deg, #1e1706, #271c05);
  box-shadow: 0 8px 30px var(--gold-glow);
}

/* Disable hover lift on touch screens (it sticks after a tap) */
@media (hover: none) {
  .task-card:hover, .search-item:hover, .btn-primary:hover { transform: none; }
}

/* ─── Phone layout ─────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .app-container { padding: 14px 12px 72px; }
  header { gap: 10px; margin-bottom: 14px; padding-bottom: 14px; }
  .brand-icon { width: 40px; height: 40px; font-size: 22px; }
  .brand-info h1 { font-size: 18px; }
  .brand-info .tagline { font-size: 11px; }
  .header-actions { width: 100%; gap: 8px; }
  .header-actions .status-chip { margin-right: auto; }
  .tabs { margin-bottom: 16px; padding: 4px; gap: 4px; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab-btn { padding: 9px 12px; font-size: 13px; }
  .tiles { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 18px; }
  .tile { padding: 12px 14px; }
  .tile-label { font-size: 11.5px; }
  .tile-value { font-size: 26px; }
  .tasks-header h2 { font-size: 16px; }
  .task-card { padding: 14px; border-radius: 12px; }
  .task-movie-title { font-size: 17px; }
  .task-details { grid-template-columns: 1fr; gap: 6px; padding: 10px 12px; }
  .task-actions .btn { flex: 1 1 auto; justify-content: center; }
  .action-buttons { width: 100%; }
  .task-actions > a.btn { width: 100%; }
  .form-card { padding: 16px; }
  .form-actions .btn { flex: 1; justify-content: center; }
  .form-input, .form-select { font-size: 16px; } /* stops zoom-on-focus */
  .logs-console { height: 60vh; font-size: 11.5px; }
  .toast-container { left: 12px; right: 12px; bottom: 16px; }
  .toast { max-width: none; }
}

/* ─── Inside the Android app: the app has its own top bar & settings ─── */
body.in-app header { display: none !important; }
/* In the app the APK download card is not needed, but People (sharing) is */
body.in-app #tab-mobile .mobile-setup-card { display: none; }
body.in-app .app-container { padding-top: 12px; }
body.in-app::before { display: none; }

/* ─── Access key dialog ─────────────────────────────────────────────── */
.auth-modal {
  position: fixed; inset: 0; z-index: 10000;
  background: rgba(3, 6, 12, 0.85); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.auth-card {
  width: 100%; max-width: 380px;
  background: var(--bg-secondary); border: 1px solid var(--card-border);
  border-radius: var(--radius-lg); padding: 24px;
  box-shadow: 0 0 40px var(--accent-glow);
}
.auth-card h2 { font-size: 18px; margin-bottom: 6px; }
.auth-card p { color: var(--text-muted); font-size: 13px; margin-bottom: 16px; }
.auth-card .btn { width: 100%; justify-content: center; margin-top: 12px; }
.auth-error { color: var(--bad); font-size: 13px; margin-top: 8px; }

.tab-count {
  min-width: 20px; padding: 0 6px; border-radius: 99px;
  background: rgba(34, 195, 238, 0.15); color: var(--accent-hover);
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center;
}

/* ─── Add Movie form (single step-by-step form) ─────────────────────── */
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; margin-right: 6px; border-radius: 50%;
  background: rgba(34, 195, 238, 0.15); color: var(--accent-hover);
  font-size: 11px; font-weight: 700;
}
.segmented {
  display: flex; gap: 4px; padding: 4px; margin-bottom: 10px;
  background: var(--bg-secondary); border: 1px solid var(--card-border); border-radius: var(--radius-md);
}
.seg-btn {
  flex: 1; padding: 8px 10px; border: none; border-radius: var(--radius-sm);
  background: transparent; color: var(--text-muted);
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.seg-btn.active { background: var(--bg-tertiary); color: var(--accent-hover); box-shadow: inset 0 -2px 0 var(--accent-primary); }
.search-row { display: flex; gap: 8px; }
.search-row .form-input { flex: 1; min-width: 0; }
.search-empty { color: var(--text-muted); font-size: 13px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 4px 2px; }
.selected-movie {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: var(--radius-md);
  background: rgba(246, 185, 31, 0.08); border: 1px solid rgba(246, 185, 31, 0.45);
}
.selected-title { font-weight: 700; text-transform: capitalize; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selected-sub { font-size: 12px; color: var(--text-muted); }
.manual-details, .more-options { margin-top: 10px; }
.manual-details summary, .more-options summary {
  cursor: pointer; color: var(--accent-hover); font-size: 13px; font-weight: 600; padding: 4px 0;
}
.more-options { margin: 6px 0 4px; padding-top: 12px; border-top: 1px solid var(--card-border); }
.form-error {
  margin: 4px 0 12px; padding: 10px 12px; border-radius: var(--radius-sm);
  background: rgba(239, 68, 68, 0.12); border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5; font-size: 13px;
}
.form-actions { margin-top: 20px; display: flex; gap: 12px; }
.form-actions .btn { white-space: nowrap; }
input[type="date"].form-input { color-scheme: dark; min-height: 42px; }

/* ─── Movie list: filters, cards, quick actions ─────────────────────── */
.filter-bar { display: flex; gap: 8px; overflow-x: auto; margin-bottom: 12px; scrollbar-width: none; }
.filter-bar::-webkit-scrollbar { display: none; }
.chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 99px; cursor: pointer;
  background: var(--bg-secondary); border: 1px solid var(--card-border);
  color: var(--text-muted); font: inherit; font-size: 13px; font-weight: 600;
}
.chip span { font-size: 11px; opacity: 0.8; }
.chip.active { color: var(--accent-hover); border-color: var(--accent-primary); background: rgba(34, 195, 238, 0.1); }
.chip-triggered:not(.active) { color: var(--gold); border-color: rgba(246, 185, 31, 0.4); }
.chip-clear { color: #fca5a5; border-color: rgba(239, 68, 68, 0.35); }
.tile.clickable { cursor: pointer; transition: border-color 0.2s; }
.tile.clickable:hover { border-color: rgba(34, 195, 238, 0.4); }
.task-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; cursor: pointer; flex-wrap: wrap; }
.task-summary { color: var(--text-muted); font-size: 13px; margin: 8px 0 2px; }
.task-card.triggered .task-summary { color: var(--gold); }
.task-card.expired { opacity: 0.6; }
.task-meta b { color: var(--text-main); font-weight: 600; }
.task-meta b.soon { color: var(--gold); }
.task-actions { margin-top: 12px; }
.link-btn { background: none; border: none; color: var(--accent-hover); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; padding: 6px 2px; }
.btn-book { width: 100%; justify-content: center; font-size: 16px; padding: 12px; margin-bottom: 4px; }
.badge-expired { background: rgba(107, 114, 128, 0.2); color: #9ca3af; border: 1px solid rgba(156, 163, 175, 0.3); }
.empty-state.small { padding: 24px 12px; }
.empty-state a { color: var(--accent-hover); }
input[type="search"].form-input { -webkit-appearance: none; }

/* ─── Phone & in-app: bottom tab bar like a native app ──────────────── */
@media (max-width: 640px) {
  .tabs {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 100;
    margin: 0; border-radius: 0; border-width: 1px 0 0;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    background: rgba(8, 12, 24, 0.97); backdrop-filter: blur(10px);
    justify-content: space-around; overflow: visible; gap: 0;
  }
  .tab-btn {
    flex: 1; flex-direction: column; gap: 2px; padding: 6px 2px;
    font-size: 11px; position: relative; background: transparent !important; box-shadow: none !important;
  }
  .tab-btn .tab-icon { font-size: 20px; line-height: 1.1; }
  .tab-btn.active { color: var(--accent-hover); }
  .tab-btn.active .tab-icon { filter: drop-shadow(0 0 6px rgba(34, 195, 238, 0.8)); }
  .tab-btn .tab-count {
    position: absolute; top: 0; left: 50%; margin-left: 6px;
    min-width: 16px; padding: 0 4px; line-height: 16px; font-size: 10px;
    background: var(--gold); color: #1a1203;
  }
  .app-container { padding-bottom: 96px; }
  .toast-container { bottom: 84px; }
  .task-actions { flex-direction: row; }
  .task-actions .btn-sm { padding: 8px 12px; font-size: 13px; }
}

/* ─── Self-test status, hot badge, showtimes in alerts ─────────────── */
.selftest-bar {
  display: flex; align-items: center; gap: 12px; margin-bottom: 16px;
  padding: 12px 14px; border-radius: var(--radius-md);
  background: var(--card-bg); border: 1px solid var(--card-border);
}
.selftest-bar.ok { border-color: rgba(16, 185, 129, 0.35); }
.selftest-bar.fail { border-color: rgba(239, 68, 68, 0.6); background: rgba(60, 12, 16, 0.6); box-shadow: 0 0 18px rgba(239, 68, 68, 0.2); }
.selftest-icon { font-size: 22px; }
.selftest-text { flex: 1; min-width: 0; }
.selftest-title { font-weight: 700; font-size: 14px; }
.selftest-bar.fail .selftest-title { color: #fca5a5; }
.selftest-sub { color: var(--text-muted); font-size: 12px; }
.badge-hot { background: rgba(246, 185, 31, 0.15); color: var(--gold); border: 1px solid rgba(246, 185, 31, 0.5); }
.alert-shows { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.alert-show {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px; text-decoration: none; color: var(--text-main);
  padding: 8px 10px; border-radius: var(--radius-sm); background: rgba(246, 185, 31, 0.06); border: 1px solid rgba(246, 185, 31, 0.25);
}
.alert-show b { font-size: 13px; margin-right: 4px; }
.time-chip {
  font-size: 12px; font-weight: 700; color: var(--gold);
  padding: 1px 8px; border-radius: 99px; border: 1px solid rgba(246, 185, 31, 0.6);
}
.search-hint { color: var(--text-muted); font-size: 13px; margin-bottom: 8px; }

/* ─── Movies in the chosen city ─────────────────────────────────────── */
.city-movies { margin-top: 14px; }
.city-movies-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; margin-bottom: 10px; }
.city-movies-title { font-weight: 700; font-size: 15px; }
.city-movies-sub { color: var(--text-muted); font-size: 12px; }
.city-movies-actions { display: flex; gap: 6px; flex: none; }
.city-movies-actions .chip { padding: 5px 10px; font-size: 12px; }
.movie-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.movie-tile {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  min-height: 96px; padding: 12px; text-align: left; cursor: pointer; overflow: hidden;
  border-radius: var(--radius-md); border: 1px solid var(--card-border);
  background: linear-gradient(160deg, #10203a 0%, var(--bg-secondary) 70%);
  color: var(--text-main); font: inherit;
  transition: border-color 0.15s, transform 0.15s;
}
.movie-tile:hover { border-color: var(--accent-primary); }
.movie-tile:active { transform: scale(0.98); }
.movie-tile.is-new { border-color: rgba(246, 185, 31, 0.55); background: linear-gradient(160deg, #2a2108 0%, var(--bg-secondary) 75%); }
.movie-tile.is-gone { opacity: 0.55; }
.movie-initial {
  position: absolute; right: -6px; bottom: -18px; font-size: 76px; font-weight: 800; line-height: 1;
  color: rgba(34, 195, 238, 0.08); pointer-events: none;
}
.movie-tile.is-new .movie-initial { color: rgba(246, 185, 31, 0.1); }
.movie-name { position: relative; font-weight: 700; font-size: 14px; line-height: 1.25; }
.movie-meta { position: relative; font-size: 11.5px; color: var(--text-muted); margin-top: auto; }
.new-badge { color: var(--gold); font-weight: 700; }
.movie-skeleton {
  height: 96px; border-radius: var(--radius-md); background: var(--bg-secondary);
  border: 1px solid var(--card-border); animation: pulse 1.4s infinite;
}
@media (max-width: 640px) {
  .movie-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ─── Friends (guests) do not get owner tools ───────────────────────── */
body.guest .admin-only, body.guest #btnSelfTest { display: none !important; }
.limit-full { color: #fca5a5; font-weight: 600; }

/* ─── People panel ──────────────────────────────────────────────────── */
.person-form { display: flex; gap: 8px; flex-wrap: wrap; }
.person-form .form-input { flex: 1 1 160px; }
.person-form .form-select { flex: 0 0 auto; width: auto; }
.people-list { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.person {
  display: flex; align-items: center; gap: 12px; padding: 12px;
  border-radius: var(--radius-md); background: var(--bg-secondary); border: 1px solid var(--card-border);
}
.person-avatar {
  flex: none; width: 38px; height: 38px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #12305a, #0c1a33); border: 1px solid rgba(34, 195, 238, 0.5);
  color: var(--accent-hover); font-weight: 800;
}
.person-info { flex: 1; min-width: 0; }
.person-name { font-weight: 700; }
.person-meta { color: var(--text-muted); font-size: 12px; overflow-wrap: anywhere; }
.person-key { color: var(--gold); background: rgba(246, 185, 31, 0.08); padding: 1px 6px; border-radius: 4px; }
.person-actions { display: flex; gap: 6px; flex: none; }

/* ═══ Cinematic visuals ═════════════════════════════════════════════════ */

/* ─── Movie tiles with real banners ─────────────────────────────────── */
.movie-tile.has-art {
  min-height: 132px;
  justify-content: flex-end;
  background: #0b111e;
  border-color: rgba(255, 255, 255, 0.08);
}
.movie-tile.has-art::before {
  content: ''; position: absolute; inset: 0;
  background-image: var(--art); background-size: cover; background-position: center;
  transition: transform 0.6s ease;
}
.movie-tile.has-art::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(6, 9, 18, 0.05) 0%, rgba(6, 9, 18, 0.55) 45%, rgba(6, 9, 18, 0.96) 100%);
}
.movie-tile.has-art:hover::before { transform: scale(1.06); }
.movie-tile > *:not(.movie-initial):not(.tile-tag) { position: relative; z-index: 1; }
.movie-tile.has-art .movie-name { text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8); }
.movie-tile.is-upcoming { border-color: rgba(34, 195, 238, 0.55); box-shadow: 0 0 16px rgba(34, 195, 238, 0.15); }
.tile-tag {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.3px;
  padding: 3px 8px; border-radius: 99px; backdrop-filter: blur(6px);
}
.tile-tag.new { background: rgba(246, 185, 31, 0.9); color: #1a1203; }
.tile-tag.soon { background: rgba(34, 195, 238, 0.9); color: #04121a; }
.tile-tag.gone { background: rgba(60, 70, 90, 0.85); color: #d1d5db; }
.movie-tile .tile-tag + .movie-name { margin-top: 18px; }
.genre-row { display: flex; gap: 4px; flex-wrap: wrap; }
.genre {
  font-size: 10px; font-weight: 700; color: #e9fbff;
  padding: 1px 7px; border-radius: 99px; background: rgba(255, 255, 255, 0.12);
}
.movie-tile.has-art .movie-meta { color: #b9c6dc; margin-top: 2px; }

/* Tiles drift in one after another */
.movie-tile { animation: riseIn 0.45s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 35ms); }

/* ─── Featured carousel ─────────────────────────────────────────────── */
.featured { margin-bottom: 18px; }
.featured-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  border-radius: var(--radius-lg); box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(34, 195, 238, 0.12);
}
.featured-track::-webkit-scrollbar { display: none; }
.featured-slide {
  position: relative; flex: 0 0 100%; scroll-snap-align: start;
  aspect-ratio: 16 / 9; min-height: 200px; max-height: 360px;
  background-image: var(--art); background-size: cover; background-position: center;
  overflow: hidden;
}
.featured-slide::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(6, 9, 18, 0) 25%, rgba(6, 9, 18, 0.75) 62%, rgba(6, 9, 18, 0.98) 100%),
              linear-gradient(90deg, rgba(6, 9, 18, 0.55) 0%, transparent 55%);
}
.featured-body { position: absolute; left: 16px; right: 16px; bottom: 14px; }
.featured-kicker {
  display: inline-block; font-size: 11px; font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase;
  padding: 3px 10px; border-radius: 99px; background: rgba(246, 185, 31, 0.92); color: #1a1203;
}
.featured-kicker.soon { background: rgba(34, 195, 238, 0.92); color: #04121a; }
.featured-title {
  margin: 8px 0 4px; font-size: 24px; font-weight: 800; line-height: 1.15; color: #fff;
  text-shadow: 0 0 18px rgba(34, 195, 238, 0.55), 0 2px 10px rgba(0, 0, 0, 0.9);
}
.featured-meta { font-size: 12.5px; color: #c9d6ea; margin-bottom: 10px; }
.featured-cta { box-shadow: 0 0 22px rgba(246, 185, 31, 0.5); }
.featured-dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
.featured-dots span { width: 6px; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, 0.25); transition: all 0.3s; }
.featured-dots span.on { width: 20px; background: var(--accent-primary); box-shadow: 0 0 8px var(--accent-glow); }

/* ─── Monitor & alert cards with the movie's art behind them ────────── */
.task-card.has-art { isolation: isolate; }
.task-card.has-art::before {
  content: ''; position: absolute; inset: 0; z-index: -2;
  background-image: var(--art); background-size: cover; background-position: center 30%;
  filter: blur(1px) saturate(1.15); transform: scale(1.05); opacity: 0.8;
}
.task-card.has-art::after {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, rgba(8, 12, 22, 0.95) 0%, rgba(8, 12, 22, 0.72) 48%, rgba(8, 12, 22, 0.25) 100%);
}
.task-card.has-art .task-details { background: rgba(6, 9, 18, 0.7); }

/* Watching: a soft cyan breathing glow. Tickets open: a strong gold pulse. */
.badge-active { animation: breathe 2.4s ease-in-out infinite; }
.task-card.triggered { animation: goldPulse 1.6s ease-in-out infinite; }
.btn-book { animation: bookGlow 1.2s ease-in-out infinite; }

/* Cards rise in one after another when a list first appears */
.task-list.enter .task-card { animation: riseIn 0.5s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i, 0) * 60ms); }

/* ─── Tab transitions ───────────────────────────────────────────────── */
.tab-content.tab-enter { animation: tabIn 0.38s cubic-bezier(.2, .8, .2, 1); }

/* ─── Shimmer skeletons ─────────────────────────────────────────────── */
.movie-skeleton {
  animation: none;
  background: linear-gradient(100deg, var(--bg-secondary) 30%, #1a2540 50%, var(--bg-secondary) 70%);
  background-size: 300% 100%;
  animation: shimmer 1.3s linear infinite;
}

/* ─── Pull to refresh ───────────────────────────────────────────────── */
.ptr {
  position: fixed; top: 0; left: 50%; z-index: 200; opacity: 0;
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 22px;
  background: var(--bg-tertiary); border: 1px solid rgba(34, 195, 238, 0.5);
  box-shadow: 0 0 18px rgba(34, 195, 238, 0.35);
  transition: opacity 0.2s, transform 0.25s ease-out; pointer-events: none;
}
.ptr.ready { border-color: var(--gold); box-shadow: 0 0 22px rgba(246, 185, 31, 0.55); }
.ptr.spinning { opacity: 1 !important; transform: translate(-50%, 18px) !important; }
.ptr.spinning .ptr-ticket { animation: spin 0.8s linear infinite; display: inline-block; }

/* ─── Confetti layer ────────────────────────────────────────────────── */
.confetti-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 10001; }

/* ─── Brand glow on the header logo ─────────────────────────────────── */
.brand-icon { animation: logoGlow 3.2s ease-in-out infinite; }

@keyframes riseIn { from { opacity: 0; transform: translateY(14px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes tabIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes breathe { 0%, 100% { box-shadow: 0 0 0 rgba(52, 211, 153, 0); } 50% { box-shadow: 0 0 12px rgba(52, 211, 153, 0.45); } }
@keyframes goldPulse {
  0%, 100% { box-shadow: 0 0 14px rgba(246, 185, 31, 0.25); border-color: rgba(246, 185, 31, 0.5); }
  50% { box-shadow: 0 0 34px rgba(246, 185, 31, 0.6); border-color: rgba(246, 185, 31, 0.95); }
}
@keyframes bookGlow { 0%, 100% { box-shadow: 0 4px 14px rgba(246, 185, 31, 0.35); } 50% { box-shadow: 0 4px 30px rgba(246, 185, 31, 0.8); } }
@keyframes logoGlow { 0%, 100% { box-shadow: 0 0 10px rgba(34, 195, 238, 0.25); } 50% { box-shadow: 0 0 22px rgba(34, 195, 238, 0.6); } }

/* Respect the phone's "reduce motion" accessibility setting */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ─── Any date switch, format chips, cinema picker ─────────────────── */
.switch-row { display: flex; align-items: center; gap: 12px; margin-top: 10px; cursor: pointer; font-size: 14px; }
.switch-row input { display: none; }
.switch {
  position: relative; flex: none; width: 44px; height: 26px; border-radius: 99px;
  background: var(--bg-tertiary); border: 1px solid var(--card-border); transition: background 0.2s, border-color 0.2s;
}
.switch::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: #8fa0bd; transition: transform 0.2s, background 0.2s;
}
.switch-row input:checked + .switch { background: rgba(34, 195, 238, 0.25); border-color: var(--accent-primary); }
.switch-row input:checked + .switch::after { transform: translateX(18px); background: var(--accent-hover); box-shadow: 0 0 10px var(--accent-glow); }
.form-input.is-disabled { opacity: 0.4; }
.format-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.format-chip { font-size: 14px; padding: 8px 16px; letter-spacing: 0.5px; }
.format-chip.active {
  color: #1a1203; background: linear-gradient(135deg, #ffd25a, var(--gold)); border-color: var(--gold);
  box-shadow: 0 0 14px var(--gold-glow);
}
.cinema-picker { margin-top: 14px; padding: 12px; border-radius: var(--radius-md); background: var(--bg-secondary); border: 1px solid var(--card-border); }
.cinema-picker-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; font-weight: 700; font-size: 14px; }
.cinema-list { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow-y: auto; margin-top: 8px; }
.cinema-option {
  display: flex; align-items: center; gap: 10px; text-align: left; width: 100%;
  padding: 9px 10px; border-radius: var(--radius-sm); cursor: pointer;
  background: transparent; border: 1px solid transparent; color: var(--text-main); font: inherit; font-size: 13.5px;
}
.cinema-option:hover { background: rgba(255, 255, 255, 0.04); }
.cinema-option.active { background: rgba(246, 185, 31, 0.1); border-color: rgba(246, 185, 31, 0.45); }
.cinema-check {
  flex: none; width: 20px; height: 20px; border-radius: 6px; display: flex; align-items: center; justify-content: center;
  border: 1.5px solid var(--card-border); color: #1a1203; font-weight: 900; font-size: 13px;
}
.cinema-option.active .cinema-check { background: var(--gold); border-color: var(--gold); }
