/* Bechdolt Portal — matches GETITAPPS theme */

:root {
  --bg: #02070F;
  --bg-2: #0a1220;
  --card: rgba(2, 7, 15, 0.55);
  --line: rgba(255, 255, 255, 0.12);
  --text: #F7F9FC;
  --muted: #B8C1CC;
  --accent: #118DE8;
  --accent-red: #EE2117;
  --danger: #ff6b6b;
  --radius: 14px;
  --font: Inter, system-ui, sans-serif;
  --display: "Plus Jakarta Sans", Inter, sans-serif;
  --hero: "Oswald", "Plus Jakarta Sans", Inter, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--text);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 70% 50% at 85% 10%, rgba(17, 141, 232, 0.14), transparent 55%),
    radial-gradient(ellipse 50% 40% at 10% 90%, rgba(238, 33, 23, 0.07), transparent 50%),
    linear-gradient(180deg, #02070F 0%, #0a1220 100%);
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }
.eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}
h1, h2, h3 { font-family: var(--display); margin: 0; color: var(--text); }
.muted { color: var(--muted); margin: 0.35rem 0 0; }
.error { color: var(--danger); margin: 0.5rem 0 0; font-size: 0.9rem; }
.status { color: #7dffa5; margin-top: 0.75rem; }

/* ── Login ── */

.auth-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  position: relative;
  overflow: hidden;
}

.auth-view::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url('/static/getitapps-hero-developer.jpg');
  background-size: cover;
  background-position: center right;
  opacity: 0.35;
  pointer-events: none;
}

.auth-view::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      rgba(2, 7, 15, 0.97) 0%,
      rgba(2, 7, 15, 0.88) 45%,
      rgba(2, 7, 15, 0.7) 100%
    ),
    linear-gradient(
      180deg,
      rgba(2, 7, 15, 0.35) 0%,
      rgba(2, 7, 15, 0.85) 100%
    );
  pointer-events: none;
}

.auth-card {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  background: rgba(2, 7, 15, 0.55);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 2.25rem 2rem;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  animation: auth-rise 0.8s var(--ease-out) both;
}

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

.auth-logo {
  display: block;
  height: 56px;
  width: auto;
  margin: 0 auto 1.25rem;
  object-fit: contain;
}

.auth-card h1 {
  font-family: var(--hero);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1;
}

.auth-accent-line {
  width: 56px;
  height: 3px;
  margin: 0.85rem auto 1rem;
  background: var(--accent-red);
  border-radius: 2px;
  box-shadow: 0 0 12px rgba(238, 33, 23, 0.55);
}

.auth-card .eyebrow,
.auth-card .muted {
  text-align: center;
}

.auth-card form { display: grid; gap: 0.9rem; margin-top: 1.5rem; }
label { display: grid; gap: 0.4rem; font-size: 0.85rem; color: var(--muted); }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  font: inherit;
  min-height: 44px;
  transition: border-color 0.25s, box-shadow 0.25s;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: rgba(17, 141, 232, 0.55);
  box-shadow: 0 0 0 3px rgba(17, 141, 232, 0.18);
}
textarea { min-height: 110px; resize: vertical; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1.5rem;
  width: 100%;
  justify-content: center;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9375rem;
  transition: gap 0.25s, color 0.25s;
}
.back-link:hover { color: var(--text); gap: 0.55rem; }

/* ── Buttons ── */

.btn {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 10px;
  padding: 0.6rem 1.1rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  min-height: 44px;
  transition: background 0.25s, border-color 0.25s, transform 0.25s var(--ease-out), box-shadow 0.25s;
}
.btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
  transform: translateY(-1px);
}
.btn.primary {
  background: var(--accent-red);
  border-color: transparent;
  box-shadow: 0 4px 18px rgba(238, 33, 23, 0.35);
}
.btn.primary:hover {
  background: #ff2a1f;
  box-shadow: 0 8px 28px rgba(238, 33, 23, 0.5);
}
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); border-color: rgba(255, 107, 107, 0.35); }

.btn:focus-visible,
.tab:focus-visible,
.back-link:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.btn.primary:focus-visible {
  outline-color: var(--accent-red);
}

/* ── Dashboard ── */

.dashboard {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem 1.25rem 3rem;
  position: relative;
  z-index: 1;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1.25rem;
  padding: 1.15rem 1.25rem;
  background: rgba(2, 7, 15, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.topbar h1 {
  font-family: var(--hero);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
}
.topbar-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.tabs {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--line);
  padding: 0.35rem 0 0.75rem;
}
.tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  padding: 0.55rem 0.95rem;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.25s, color 0.25s;
}
.tab:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.tab.active {
  color: var(--text);
  background: rgba(17, 141, 232, 0.16);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.panel { display: none; }
.panel.active { display: block; }
.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.panel-head h2 {
  font-family: var(--hero);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 1.2rem;
}
.row-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.row-actions.end { justify-content: flex-end; margin-top: 0.5rem; }

.stack { display: grid; gap: 0.75rem; }
.card {
  background: rgba(2, 7, 15, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  transition: border-color 0.25s, background 0.25s;
}
.card:hover {
  border-color: rgba(17, 141, 232, 0.28);
  background: rgba(17, 141, 232, 0.06);
}
.card-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
}
.card h3 { font-size: 1.05rem; }
.meta { color: var(--muted); font-size: 0.88rem; margin-top: 0.35rem; }
.badge {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
}
.badge.on { background: rgba(125, 255, 165, 0.15); color: #7dffa5; }
.badge.off { background: rgba(238, 33, 23, 0.12); color: #ff9b9b; }

.shows-layout {
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: 1rem;
}
@media (max-width: 800px) {
  .shows-layout { grid-template-columns: 1fr; }
  .topbar { flex-direction: column; }
}
.calendar-card {
  background: rgba(2, 7, 15, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
}
.cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.cal-nav h3 {
  font-family: var(--hero);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.95rem;
}
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.25rem;
}
.cal-dow, .cal-day {
  text-align: center;
  font-size: 0.78rem;
  padding: 0.45rem 0;
  border-radius: 8px;
}
.cal-dow { color: var(--muted); font-weight: 600; }
.cal-day {
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  font: inherit;
  font-weight: 500;
  cursor: default;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  min-height: 2.1rem;
  transition: background 0.2s, border-color 0.2s;
}
.cal-day-num { line-height: 1; }
.cal-day-count {
  font-size: 0.58rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.cal-day.muted {
  color: rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.12);
  border-color: transparent;
}
.cal-day.has-event {
  color: #9fd4ff;
  border-color: rgba(17, 141, 232, 0.55);
  background: rgba(17, 141, 232, 0.18);
  cursor: pointer;
}
.cal-day.has-event:hover {
  background: rgba(17, 141, 232, 0.28);
}
.cal-day.selected {
  color: #fff;
  background: rgba(17, 141, 232, 0.35);
  border-color: rgba(17, 141, 232, 0.65);
}
.cal-day.selected.has-event {
  color: #fff;
  background: rgba(17, 141, 232, 0.45);
  border-color: rgba(17, 141, 232, 0.75);
}
.cal-day.has-multi {
  border-color: rgba(17, 141, 232, 0.85);
}
.list-title {
  margin: 0 0 0.75rem;
  font-size: 0.85rem;
  font-family: var(--hero);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

dialog {
  border: 0;
  padding: 0;
  background: transparent;
  max-width: min(520px, calc(100vw - 2rem));
}
dialog::backdrop { background: rgba(2, 7, 15, 0.78); backdrop-filter: blur(4px); }
.modal-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1.35rem;
  color: var(--text);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
}
.modal-card h3 {
  margin-bottom: 0.85rem;
  font-family: var(--hero);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.check-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}
.check-row input { width: auto; min-height: auto; }

@media (prefers-reduced-motion: reduce) {
  .auth-card { animation: none; }
  .btn:hover, .back-link:hover { transform: none; }
}
