/* =========================================================
   UAD 3.6 Tool - Auth & Dashboard Styles
   Blue/dark theme with sidebar layout
   ========================================================= */

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

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

:root {
  --sidebar-bg: #141820;
  --sidebar-hover: #1c2230;
  --sidebar-active: #232a3a;
  --sidebar-border: #232a3a;
  --nav-text: #8a92a6;
  --nav-text-active: #e8ecf4;
  --accent: #3b7dd8;
  --accent-light: #5a95e8;
  --accent-dim: rgba(59, 125, 216, 0.12);
  --accent-faint: rgba(59, 125, 216, 0.08);
  --content-bg: #e2e8f0;
  --card-bg: #ffffff;
  --card-border: #cbd5e1;
  --card-hover: #f8fafc;
  --ink: #1a202c;
  --text-primary: #1a202c;
  --text-secondary: #4a5568;
  --text-muted: #718096;
  --border: #cbd5e1;
  --border-light: #e2e8f0;
  --white: #ffffff;
  --red: #e53e3e;
  --red-bg: #fff5f5;
  --green: #38a169;
  --green-bg: #f0fff4;
  --yellow: #d69e2e;
  --yellow-bg: #fffff0;
  --danger: #e05a5a;
  --font-body: 'DM Sans', -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 2px 12px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.08);
  --radius: 10px;
  --radius-lg: 14px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  background: var(--content-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}


/* =========================================================
   SIDEBAR LAYOUT
   ========================================================= */

.dash-wrapper {
  min-height: 100vh;
  display: flex;
}

/* ─── Sidebar ─── */
.sidebar {
  width: 240px;
  min-height: 100vh;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
}

.sidebar-brand {
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--sidebar-border);
  display: flex;
  align-items: center;
  gap: 10px;
}

.sidebar-brand .badge {
  background: var(--accent);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.sidebar-brand .brand-text {
  font-size: 17px;
  font-weight: 700;
  color: #e8ecf4;
  letter-spacing: -0.3px;
}

.sidebar-brand .brand-text span {
  color: #8a92a6;
  font-weight: 400;
}

.sidebar-nav {
  padding: 16px 0;
  flex: 1;
}

.sidebar-nav .nav-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  padding: 8px 20px 8px;
}

.sidebar-nav a {
  display: block;
  padding: 10px 20px;
  color: var(--nav-text);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: all 0.15s ease;
}

.sidebar-nav a:hover {
  background: var(--sidebar-hover);
  color: var(--nav-text-active);
}

.sidebar-nav a.active {
  background: var(--sidebar-active);
  color: var(--nav-text-active);
  border-left-color: var(--accent);
}

.sidebar-user {
  padding: 16px 20px;
  border-top: 1px solid var(--sidebar-border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-user .avatar {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--sidebar-active);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: var(--accent-light);
}

.sidebar-user .user-info {
  flex: 1;
  min-width: 0;
}

.sidebar-user .user-name {
  font-size: 13px;
  font-weight: 600;
  color: #e8ecf4;
}

.sidebar-user .user-tier {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--accent);
}

.sidebar-user .logout-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.15s;
  text-decoration: none;
  display: flex;
  align-items: center;
}

.sidebar-user .logout-btn:hover { color: var(--danger); }

/* ─── Main Content Area ─── */
.dash-main {
  margin-left: 240px;
  flex: 1;
  min-height: 100vh;
  padding: 0;
}

.topbar {
  padding: 20px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--sidebar-border);
  background: var(--sidebar-bg);
}

.topbar h1 {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.3px;
  color: #e8ecf4;
}

.topbar h1 span {
  color: #8a92a6;
  font-weight: 400;
}

.deadline-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #1c2230;
  border: 1px solid var(--sidebar-border);
  border-radius: 8px;
  padding: 8px 16px;
}

.deadline-chip .countdown {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--accent-light);
  line-height: 1;
}

.deadline-chip .countdown-label {
  font-size: 11px;
  color: #5a6276;
  line-height: 1.3;
}

.deadline-chip .countdown-label strong {
  display: block;
  color: #8a92a6;
  font-size: 12px;
  font-weight: 600;
}

.dash-content {
  padding: 32px 40px;
}


/* =========================================================
   ALERTS / FLASH MESSAGES
   ========================================================= */

.alert {
  padding: 14px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  margin-bottom: 24px;
  border: 1px solid;
}

.alert-success {
  background: var(--green-bg);
  color: var(--green);
  border-color: #c6f6d5;
}

.alert-error {
  background: var(--red-bg);
  color: var(--red);
  border-color: #fed7d7;
}

.alert-warning {
  background: var(--yellow-bg);
  color: var(--yellow);
  border-color: #fefcbf;
}


/* =========================================================
   DASHBOARD CARDS
   ========================================================= */

/* ─── Section Headers ─── */
.section-title {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.3px;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.section-subtitle {
  font-size: 14px;
  color: var(--text-muted);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.section-header h2 {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
  color: var(--text-primary);
}

.section-header a {
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.section-header a:hover { text-decoration: underline; }

/* ─── Launch Card ─── */
.launch-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.launch-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-light), transparent);
}

.launch-left h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}

.launch-left p {
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.6;
  max-width: 420px;
}

.launch-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 12px 28px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.launch-btn:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(59, 125, 216, 0.25);
}

.launch-btn svg {
  width: 18px;
  height: 18px;
}

/* ─── Quick Start Panel ─── */
.quick-start {
  background: #f1f5f9;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 24px 28px;
  min-width: 320px;
}

.quick-start h3 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.qs-step {
  display: flex;
  gap: 14px;
  padding: 10px 0;
}

.qs-step + .qs-step {
  border-top: 1px solid #e2e8f0;
}

.qs-num {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-dim);
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.qs-step strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.qs-step span {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ─── Video Cards ─── */
.video-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 40px;
}

.video-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.2s ease;
  cursor: pointer;
  box-shadow: var(--shadow-md);
}

.video-card:hover {
  background: var(--card-hover);
  border-color: #94a3b8;
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.video-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  background: #1a202c;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.play-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.video-card:hover .play-icon {
  background: var(--accent);
  border-color: transparent;
}

.play-icon svg {
  width: 22px;
  height: 22px;
  color: rgba(255, 255, 255, 0.7);
  margin-left: 2px;
}

.video-card:hover .play-icon svg { color: #fff; }

.video-duration {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0,0,0,0.7);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
}

.video-info {
  padding: 16px;
}

.video-info h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.video-info p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ─── Tips Grid ─── */
.tips-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}

.tip-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 20px 24px;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-md);
}

.tip-card:hover {
  background: var(--card-hover);
  border-color: #94a3b8;
}

.tip-card .tip-icon {
  font-size: 20px;
  margin-bottom: 10px;
}

.tip-card h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}

.tip-card p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}


/* =========================================================
   GENERIC CARD GRID (used by other pages)
   ========================================================= */

.card-grid {
  display: grid;
  gap: 20px;
  margin-bottom: 32px;
}

.card-grid-2 { grid-template-columns: repeat(2, 1fr); }
.card-grid-3 { grid-template-columns: repeat(3, 1fr); }

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

.card:hover {
  border-color: #94a3b8;
}


/* =========================================================
   AUTH PAGES (login, register, forgot-password, reset)
   ========================================================= */

.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: var(--content-bg);
}

.auth-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  width: 100%;
  max-width: 440px;
  padding: 40px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

.auth-logo {
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-logo span {
  background: var(--accent);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  padding: 3px 7px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.auth-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}

.auth-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 28px;
}


/* =========================================================
   FORMS (shared between auth and dashboard)
   ========================================================= */

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

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

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-primary);
  background: #fff;
  transition: border-color 0.15s;
  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-faint);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #a0aec0;
}

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


/* =========================================================
   BUTTONS
   ========================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-light);
  box-shadow: 0 4px 16px rgba(59, 125, 216, 0.25);
}

.btn-secondary {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--card-border);
}

.btn-secondary:hover {
  border-color: #94a3b8;
  color: var(--text-primary);
}

.btn-danger {
  background: var(--red);
  color: #fff;
}

.btn-danger:hover {
  background: #c53030;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
}

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


/* =========================================================
   TABLES (admin, data pages)
   ========================================================= */

.table-wrapper {
  overflow-x: auto;
  margin-bottom: 24px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

table th {
  text-align: left;
  padding: 12px 16px;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  border-bottom: 2px solid var(--card-border);
  background: #f8fafc;
}

table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
}

table tr:hover td {
  background: #f8fafc;
}


/* =========================================================
   BADGES & TAGS
   ========================================================= */

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.badge-pro {
  background: var(--accent-dim);
  color: var(--accent);
}

.badge-free {
  background: rgba(113, 128, 150, 0.12);
  color: var(--text-muted);
}

.badge-team {
  background: rgba(214, 158, 46, 0.12);
  color: var(--yellow);
}


/* =========================================================
   ACCOUNT PAGE
   ========================================================= */

.account-section {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-md);
}

.account-section h2 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-light);
}

.account-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.account-row label {
  width: 140px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  padding-top: 8px;
  flex-shrink: 0;
}

.account-row input,
.account-row select {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--text-primary);
  background: #fff;
  outline: none;
}

.account-row input:focus,
.account-row select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-faint);
}


/* =========================================================
   ANIMATIONS
   ========================================================= */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.launch-card { animation: fadeUp 0.4s ease both; }
.video-grid { animation: fadeUp 0.4s ease 0.1s both; }
.tips-grid { animation: fadeUp 0.4s ease 0.2s both; }


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1100px) {
  .launch-card { flex-direction: column; }
  .quick-start { min-width: 100%; }
  .video-grid { grid-template-columns: repeat(2, 1fr); }
  .card-grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .sidebar { display: none; }
  .dash-main { margin-left: 0; }
  .dash-content { padding: 24px 20px; }
  .topbar { padding: 16px 20px; }
  .video-grid { grid-template-columns: 1fr; }
  .tips-grid { grid-template-columns: 1fr; }
  .card-grid-2, .card-grid-3 { grid-template-columns: 1fr; }
  .account-row { flex-direction: column; }
  .account-row label { width: auto; padding-top: 0; }
}
