/* ============================================================
   PASTV — Stylesheet
   Light mode minimal, system Inter font
   ============================================================ */

/* ── Google Fonts ──────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  --bg:            #ffffff;
  --bg-subtle:     #f7f8fa;
  --bg-card:       #ffffff;
  --border:        #e5e7eb;
  --border-light:  #f0f1f3;

  --text:          #111827;
  --text-muted:    #6b7280;
  --text-light:    #9ca3af;

  --primary:       #3b4fe4;
  --primary-dark:  #2c3dc5;
  --primary-light: #eef0fd;
  --primary-glow:  rgba(59, 79, 228, 0.18);

  --success:       #16a34a;
  --success-bg:    #f0fdf4;
  --success-border:#86efac;

  --error:         #dc2626;
  --error-bg:      #fef2f2;
  --error-border:  #fca5a5;

  --warning:       #d97706;
  --warning-bg:    #fffbeb;
  --warning-border:#fcd34d;

  --radius-xs:  4px;
  --radius-sm:  8px;
  --radius-md:  14px;
  --radius-lg:  22px;
  --radius-xl:  32px;
  --radius-full: 999px;

  --shadow-sm:  0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:  0 4px 18px rgba(0,0,0,.09), 0 2px 6px rgba(0,0,0,.04);
  --shadow-primary: 0 6px 24px rgba(59,79,228,.28);

  --font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --container: 1080px;
  --nav-h: 64px;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; }

/* ── Container ─────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: var(--radius-md);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1;
  transition: background 0.15s, box-shadow 0.15s, transform 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
  text-decoration: none;
}

.btn:active { transform: scale(0.97); }

.btn--primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow-primary);
}
.btn--primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 8px 28px rgba(59,79,228,.38);
  transform: translateY(-1px);
}
.btn--primary:disabled,
.btn--primary[disabled] {
  background: #d1d5db;
  color: #9ca3af;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
  pointer-events: none;
}

.btn--ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
}
.btn--ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn--lg {
  padding: 15px 30px;
  font-size: 1rem;
  border-radius: var(--radius-lg);
  gap: 10px;
}

.btn--sm {
  padding: 7px 14px;
  font-size: 0.8125rem;
  border-radius: var(--radius-sm);
}

.btn--full {
  width: 100%;
  justify-content: center;
}

.btn__icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.btn__meta {
  font-size: 0.78rem;
  font-weight: 500;
  opacity: 0.8;
  margin-left: 2px;
}

/* ── Navigation ─────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-light);
}

.nav__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  display: flex;
  align-items: center;
  max-height: 40px;
  overflow: hidden;
}

.nav__logo-img {
  height: 38px;
  max-height: 38px;
  width: auto;
  max-width: 150px;
  object-fit: contain;
  display: block;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav__links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.15s;
}
.nav__links a:hover { color: var(--text); }

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: center;
  padding: 80px 0 60px;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 64px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 22px;
}

.hero__badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.7); }
}

.hero__title {
  font-size: clamp(2.6rem, 5.5vw, 4.2rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.035em;
  margin-bottom: 20px;
  color: var(--text);
}

.hero__title span {
  color: var(--primary);
}

.hero__desc {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 36px;
  max-width: 420px;
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.hero__note {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ── Phone Mockup (CSS only) ──────────────────────────────── */
.hero__visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.hero__visual::before {
  content: '';
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--primary-light) 0%, transparent 70%);
  z-index: 0;
}

.phone {
  position: relative;
  z-index: 1;
  width: 220px;
  height: 440px;
  border-radius: 38px;
  background: #1a1a2e;
  border: 7px solid #252540;
  box-shadow:
    0 30px 80px rgba(0,0,0,.22),
    0 0 0 1px rgba(255,255,255,.04) inset,
    var(--shadow-primary);
  overflow: hidden;
}

.phone::before {
  content: '';
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 52px;
  height: 7px;
  background: #252540;
  border-radius: 4px;
  z-index: 10;
}

.phone__screen {
  width: 100%;
  height: 100%;
  background: linear-gradient(160deg, #3b4fe4 0%, #6366f1 45%, #8b5cf6 100%);
  position: relative;
  overflow: hidden;
}

.phone__screen::before {
  content: '';
  position: absolute;
  top: -30%;
  left: -30%;
  width: 80%;
  height: 80%;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
}

.phone__screen::after {
  content: '';
  position: absolute;
  bottom: 20%;
  right: -10%;
  width: 60%;
  height: 60%;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
}

.phone__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.phone__play::after {
  content: '';
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 10px 0 10px 18px;
  border-color: transparent transparent transparent #ffffff;
  margin-left: 3px;
}

/* ── Section headers ─────────────────────────────────────────── */
.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 10px;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: 14px;
}

.section-sub {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 520px;
  line-height: 1.7;
}

/* ── Features Section ───────────────────────────────────────── */
.features {
  padding: 100px 0;
  background: var(--bg-subtle);
}

.features__header {
  text-align: center;
  margin-bottom: 56px;
}

.features__header .section-sub {
  margin-inline: auto;
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px 24px;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.feature-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
  border-color: var(--primary-light);
}

.feature-card__icon {
  width: 46px;
  height: 46px;
  background: var(--primary-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.feature-card__icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--primary);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-card h3 {
  font-size: 0.9375rem;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.feature-card p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── Install Steps ──────────────────────────────────────────── */
.install {
  padding: 100px 0;
}

.install__header {
  text-align: center;
  margin-bottom: 60px;
}

.install__header .section-sub {
  margin-inline: auto;
}

.install__steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  max-width: 800px;
  margin-inline: auto;
  counter-reset: steps;
}

.step {
  text-align: center;
  counter-increment: steps;
  position: relative;
}

.step::before {
  content: counter(steps);
  display: block;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 52px;
  margin: 0 auto 20px;
}

.step h3 {
  font-size: 0.9375rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.step p {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Connector lines between steps */
.install__steps .step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 26px;
  left: calc(50% + 36px);
  right: calc(-50% + 36px);
  height: 1px;
  background: var(--border);
}

/* ── CTA Section ────────────────────────────────────────────── */
.cta-section {
  padding: 80px 0;
  background: var(--bg-subtle);
  border-top: 1px solid var(--border);
  text-align: center;
}

.cta-section .section-title {
  margin-bottom: 16px;
}

.cta-section .section-sub {
  margin-inline: auto;
  margin-bottom: 36px;
}

/* ── Footer ─────────────────────────────────────────────────── */
.footer {
  padding: 32px 0;
  border-top: 1px solid var(--border);
}

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

.footer__brand {
  display: flex;
  align-items: center;
  max-height: 34px;
  overflow: hidden;
}

.footer__logo-img {
  height: 32px;
  max-height: 32px;
  width: auto;
  max-width: 130px;
  object-fit: contain;
  display: block;
}

.footer__copy {
  font-size: 0.8125rem;
  color: var(--text-light);
}

/* ============================================================
   ADMIN PANEL
   ============================================================ */

/* ── Admin Login Page ─────────────────────────────────────── */
.admin-page {
  min-height: 100vh;
  background: var(--bg-subtle);
}

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

.admin-login__card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 44px 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-md);
}

.admin-login__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
  max-height: 42px;
  overflow: hidden;
}

.admin-login__logo-img {
  width: 40px;
  height: 40px;
  max-width: 40px;
  max-height: 40px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  display: block;
}

.admin-login__name {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.admin-login__title {
  font-size: 1.375rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.admin-login__subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

/* ── Admin Layout ─────────────────────────────────────────── */
.admin-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  height: 60px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.admin-header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 900px;
  margin-inline: auto;
  padding-inline: 24px;
}

.admin-header__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  max-height: 28px;
  overflow: hidden;
}

.admin-header__logo-img {
  width: 26px;
  height: 26px;
  max-width: 26px;
  max-height: 26px;
  object-fit: contain;
  display: block;
}

.admin-header__name {
  font-weight: 700;
  font-size: 0.9375rem;
  color: var(--text);
}

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

.admin-user {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.admin-main {
  max-width: 900px;
  margin: 0 auto;
  padding: 36px 24px 60px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.admin-page-title {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  margin-bottom: 4px;
}

.admin-page-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ── Admin Card ───────────────────────────────────────────── */
.admin-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px 30px;
}

.admin-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border-light);
}

.admin-card__title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ── Empty State ──────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 32px 0;
}

.empty-state__icon {
  width: 52px;
  height: 52px;
  background: var(--bg-subtle);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}

.empty-state__icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--text-light);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.empty-state p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* ── Info Table ────────────────────────────────────────────── */
.info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.info-table tr:not(:last-child) td,
.info-table tr:not(:last-child) th {
  border-bottom: 1px solid var(--border-light);
}

.info-table th {
  width: 130px;
  padding: 11px 0;
  font-weight: 600;
  color: var(--text-muted);
  text-align: left;
  white-space: nowrap;
}

.info-table td {
  padding: 11px 0;
  color: var(--text);
  word-break: break-all;
}

.info-table code {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 2px 7px;
  border-radius: var(--radius-xs);
  font-size: 0.8rem;
  font-family: 'Menlo', 'Consolas', monospace;
  color: var(--primary);
}

/* ── Alerts ────────────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  margin-bottom: 20px;
  line-height: 1.5;
}

.alert--success {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--success-border);
}

.alert--error {
  background: var(--error-bg);
  color: var(--error);
  border: 1px solid var(--error-border);
}

.alert--warn {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid var(--warning-border);
}

/* ── Form Elements ─────────────────────────────────────────── */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 7px;
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--bg);
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
  -webkit-appearance: none;
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59,79,228,.1);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-light);
}

.form-textarea {
  resize: vertical;
  min-height: 90px;
  line-height: 1.6;
}

.form-hint {
  font-size: 0.78rem;
  color: var(--text-light);
  margin-top: 5px;
}

/* ── File Drop Zone ────────────────────────────────────────── */
.file-drop {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 36px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  position: relative;
  background: var(--bg-subtle);
}

.file-drop:hover {
  border-color: var(--primary);
  background: var(--primary-light);
}

.file-drop.drag-over {
  border-color: var(--primary);
  background: var(--primary-light);
}

.file-drop.has-file {
  border-color: var(--success);
  background: var(--success-bg);
}

.file-drop input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.file-drop__icon {
  width: 40px;
  height: 40px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

.file-drop__icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--text-muted);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.file-drop__text {
  font-size: 0.875rem;
  color: var(--text-muted);
  pointer-events: none;
}

.file-drop__text strong {
  color: var(--primary);
}

.file-drop__name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--success);
  pointer-events: none;
  display: none;
}

.file-drop.has-file .file-drop__name { display: block; }
.file-drop.has-file .file-drop__text { display: none; }

/* ── Progress bar (upload) ──────────────────────────────────── */
.upload-progress {
  display: none;
  height: 4px;
  background: var(--border);
  border-radius: var(--radius-full);
  margin-top: 16px;
  overflow: hidden;
}

.upload-progress__bar {
  height: 100%;
  background: var(--primary);
  border-radius: var(--radius-full);
  transition: width 0.3s ease;
  width: 0%;
}

/* ── Divider ────────────────────────────────────────────────── */
.divider {
  height: 1px;
  background: var(--border-light);
  margin: 24px 0;
}

/* ── Status badge ───────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: var(--radius-full);
}

.badge--green {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid var(--success-border);
}

.badge--gray {
  background: var(--bg-subtle);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.badge__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .features__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 60px 0 40px;
    min-height: auto;
  }

  .hero__grid {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .hero__visual {
    display: none;
  }

  .hero__desc {
    margin-inline: auto;
  }

  .hero__actions {
    justify-content: center;
  }

  .hero__note {
    justify-content: center;
  }

  .install__steps {
    grid-template-columns: 1fr;
    gap: 40px;
    max-width: 320px;
  }

  .step::after {
    display: none !important;
  }

  .nav__links {
    display: none;
  }

  .footer__inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 600px) {
  .features__grid {
    grid-template-columns: 1fr;
  }

  .admin-login__card {
    padding: 32px 24px;
  }

  .admin-card {
    padding: 22px 20px;
  }
}
