/* FX TREINOS - Graphite, Cyan & Green Brand Theme */
:root {
  --bg-app: #080c14;
  --bg-surface: rgba(15, 23, 42, 0.7);
  --bg-surface-hover: rgba(30, 41, 59, 0.85);
  --border-app: rgba(16, 185, 129, 0.2);
  --border-glow: rgba(0, 255, 136, 0.5);
  --primary: #10b981;
  --primary-glow: #00ff88;
  --accent-cyan: #06b6d4;
  --accent-gold: #fbbf24;
  --accent-purple: #059669;
  --danger: #ef4444;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --radius-app: 18px;
  --radius-sm: 12px;
  --shadow-neon: 0 0 30px rgba(0, 255, 136, 0.25);
}

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

html, body {
  width: 100%;
  height: 100%;
  font-family: var(--font-body);
  background-color: var(--bg-app);
  color: var(--text-main);
  overflow-x: hidden;
  line-height: 1.5;
}

body {
  display: flex;
  flex-direction: column;
}

/* Auth / Login Overlay Screen */
.auth-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 50% 30%, #064e3b 0%, #030712 70%);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(20px);
}

.auth-screen.hidden {
  display: none;
}

.auth-card {
  background: rgba(8, 20, 27, 0.95);
  border: 1px solid var(--border-glow);
  border-radius: 24px;
  padding: 40px;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 0 50px rgba(0, 255, 136, 0.5);
  text-align: center;
}

.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
}

.auth-brand-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary), var(--accent-cyan));
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: #fff;
  box-shadow: 0 0 20px rgba(59, 130, 246, 0.5);
}

.auth-title {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 900;
  color: #fff;
  margin-bottom: 6px;
}

.auth-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 30px;
}

.auth-field {
  text-align: left;
  margin-bottom: 20px;
}

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

.auth-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-app);
  color: #fff;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  outline: none;
  transition: all 0.2s ease;
}

.auth-input:focus {
  border-color: var(--primary-glow);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.4);
}

.auth-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  margin-bottom: 25px;
}

.auth-link {
  color: var(--primary-glow);
  text-decoration: none;
  font-weight: 600;
}

.auth-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--primary), #059669);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.1rem;
  padding: 15px;
  border-radius: 50px;
  border: none;
  cursor: pointer;
  box-shadow: 0 0 25px rgba(59, 130, 246, 0.5);
  transition: all 0.25s ease;
}

.auth-btn:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, var(--primary-glow), var(--primary));
  box-shadow: 0 0 35px rgba(0, 255, 136, 0.8);
}

/* App Header */
.app-header {
  background: rgba(8, 20, 27, 0.95);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-app);
  padding: 15px 20px;
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

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

.brand-icon {
  width: 42px;
  height: 42px;
  background: linear-gradient(135deg, var(--primary), var(--accent-cyan));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #fff;
  box-shadow: 0 0 15px rgba(0, 255, 136, 0.5);
}

.brand-name {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 900;
  letter-spacing: -0.5px;
}

.brand-name span {
  color: var(--primary-glow);
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid var(--border-app);
  padding: 6px 16px;
  border-radius: 30px;
  font-size: 0.85rem;
  color: var(--primary-glow);
  font-weight: 700;
}

/* App Layout Grid */
.app-body {
  flex: 1;
  display: flex;
  max-width: 1300px;
  width: 100%;
  margin: 0 auto;
  padding-bottom: 80px;
}

/* Sidebar Navigation (Desktop) */
.app-sidebar {
  width: 260px;
  padding: 25px 15px;
  border-right: 1px solid var(--border-app);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: all 0.25s ease;
}

.nav-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}

.nav-btn.active {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.3) 0%, rgba(6, 182, 212, 0.1) 100%);
  color: var(--primary-glow);
  border-left: 3px solid var(--primary-glow);
}

.nav-btn i {
  font-size: 1.2rem;
  width: 24px;
}

/* Main Content Area */
.app-content {
  flex: 1;
  padding: 25px;
  overflow-y: auto;
}

/* Tab Panels */
.tab-panel {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-panel.active {
  display: block;
}

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

/* Dashboard Greeting Banner */
.dash-banner {
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.8) 0%, rgba(8, 20, 27, 0.95) 100%);
  border: 1px solid var(--border-glow);
  border-radius: 24px;
  padding: 35px;
  margin-bottom: 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: var(--shadow-neon);
}

.dash-user-title {
  font-size: 2rem;
  color: #fff;
  margin-bottom: 8px;
}

.dash-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 35px;
}

.dash-stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-app);
  border-radius: var(--radius-app);
  padding: 20px;
  text-align: center;
}

.dash-stat-val {
  font-size: 2rem;
  font-weight: 900;
  color: var(--primary-glow);
}

.dash-stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Section Header Cards */
.panel-header {
  background: linear-gradient(135deg, rgba(8, 20, 27, 0.95), rgba(6, 78, 59, 0.4));
  border: 1px solid var(--border-glow);
  border-radius: var(--radius-app);
  padding: 28px;
  margin-bottom: 25px;
  box-shadow: var(--shadow-neon);
}

.panel-title {
  font-size: 1.8rem;
  color: #fff;
  margin-bottom: 6px;
}

.panel-desc {
  color: var(--text-muted);
  font-size: 0.98rem;
}

/* Search & Filter Bar */
.filter-bar {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

.search-input {
  flex: 1;
  min-width: 250px;
  background: var(--bg-surface);
  border: 1px solid var(--border-app);
  color: #fff;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  outline: none;
}

.search-input:focus {
  border-color: var(--primary-glow);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.filter-tags {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 5px;
}

.tag-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-app);
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.tag-btn:hover, .tag-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary-glow);
}

/* Cards Grid with Visual Cover Thumbnails */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}

.deliverable-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-app);
  border-radius: var(--radius-app);
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-cover-wrapper {
  width: 100%;
  height: 160px;
  position: relative;
  overflow: hidden;
  background: #000;
}

.card-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.deliverable-card:hover .card-cover-img {
  transform: scale(1.06);
}

.card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card-badge {
  display: inline-block;
  background: rgba(0, 217, 255, 0.18);
  color: var(--primary-glow);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.card-title {
  font-size: 1.15rem;
  color: #fff;
  margin-bottom: 8px;
}

.card-info {
  color: var(--text-muted);
  font-size: 0.88rem;
  margin-bottom: 18px;
}

.card-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--primary), #059669);
  color: #fff;
  font-weight: 800;
  font-size: 0.9rem;
  padding: 11px 18px;
  border-radius: var(--radius-sm);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
}

.card-action:hover {
  background: var(--primary-glow);
  box-shadow: 0 0 15px rgba(96, 165, 250, 0.6);
  transform: scale(1.02);
}

/* Recipe Grid Cards */
.recipe-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-app);
  border-radius: var(--radius-app);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.macro-tags {
  display: flex;
  gap: 8px;
  margin: 10px 0;
  font-size: 0.75rem;
  font-weight: 700;
  flex-wrap: wrap;
}

.macro-pill {
  background: rgba(6, 182, 212, 0.15);
  color: var(--accent-cyan);
  padding: 3px 8px;
  border-radius: 6px;
}

/* Bottom Navigation Bar (Mobile) */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(8, 12, 20, 0.95);
  backdrop-filter: blur(20px);
  border-top: 1px solid var(--border-app);
  padding: 8px 10px;
  z-index: 99;
  justify-content: space-around;
}

.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
}

.mobile-nav-item i {
  font-size: 1.25rem;
}

.mobile-nav-item.active {
  color: var(--primary-glow);
}

/* Full-Screen In-App Native Reader Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(16px);
  z-index: 999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 15px;
}

.modal-overlay.active {
  display: flex;
}

.modal-box {
  background: #080c14;
  border: 1px solid var(--border-glow);
  border-radius: 20px;
  max-width: 900px;
  width: 100%;
  height: 90vh;
  padding: 25px;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 0 50px rgba(0, 255, 136, 0.5);
}

.modal-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 15px;
  border-bottom: 1px solid var(--border-app);
  margin-bottom: 15px;
}

.modal-close {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid #ef4444;
  color: #ef4444;
  font-weight: 800;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.2s ease;
}

.modal-close:hover {
  background: #ef4444;
  color: #fff;
}

.in-app-frame-container {
  flex: 1;
  width: 100%;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  position: relative;
}

.in-app-frame {
  width: 100%;
  height: 100%;
  border: none;
  background: #fff;
}

@media (max-width: 850px) {
  .app-sidebar {
    display: none;
  }
  .mobile-nav {
    display: flex;
  }
  .app-content {
    padding: 15px;
  }
  .modal-box {
    height: 95vh;
    padding: 15px;
  }
  .dash-banner {
    flex-direction: column;
    text-align: center;
    gap: 15px;
  }
}

.content-error{display:flex;align-items:center;justify-content:center;min-height:240px;padding:24px;text-align:center;color:#fff;background:rgba(239,68,68,.12);border:1px solid rgba(239,68,68,.5);border-radius:12px;font-weight:700;}

/* Mobile-first optimization: compact header, single-column content and thumb-friendly controls. */
html { -webkit-text-size-adjust: 100%; }
body { min-width: 0; overscroll-behavior-x: none; }
.app-header { min-height: 64px; padding: 10px max(12px, env(safe-area-inset-left)) 10px max(12px, env(safe-area-inset-right)); gap: 10px; }
.app-header > div:last-child { min-width: 0; }
.brand { min-width: 0; gap: 8px; }
.brand-icon { width: 38px; height: 38px; flex: 0 0 38px; }
.brand-name { font-size: 1rem; white-space: nowrap; }
.user-badge { white-space: nowrap; }
.app-body { display: block; width: 100%; max-width: 100%; padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
.app-content { width: 100%; min-width: 0; padding: 14px 12px 24px; overflow: visible; }
.tab-panel { min-width: 0; }
.panel-header { padding: 18px 15px; margin-bottom: 16px; }
.panel-title { font-size: clamp(1.25rem, 5vw, 1.8rem); line-height: 1.18; }
.panel-desc { font-size: .9rem; line-height: 1.45; }
.dash-banner { padding: 18px 15px; }
.dash-grid, .cards-grid { grid-template-columns: minmax(0, 1fr) !important; gap: 14px !important; }
.dash-card, .deliverable-card, .recipe-card { min-width: 0; width: 100%; }
.card-cover-wrapper { height: 140px; }
.card-body, .recipe-card { padding: 16px; }
.card-title { font-size: 1rem; line-height: 1.3; overflow-wrap: anywhere; }
.card-info { font-size: .85rem; line-height: 1.45; }
.card-action, .auth-btn, .nav-btn { min-height: 46px; }
.filter-bar { flex-direction: column; gap: 10px; margin-bottom: 16px; }
.search-input { min-width: 0; width: 100%; font-size: 16px; }
.filter-tags { width: 100%; overflow-x: auto; scrollbar-width: none; }
.filter-tags::-webkit-scrollbar { display: none; }
.tag-btn { flex: 0 0 auto; min-height: 42px; }
.mobile-nav { padding: 8px 6px calc(8px + env(safe-area-inset-bottom)); min-height: 64px; }
.mobile-nav-item { min-width: 52px; min-height: 48px; font-size: .68rem; gap: 3px; }
.mobile-nav-item i { font-size: 1.15rem; }
.modal-overlay { padding: 0; align-items: stretch; }
.modal-box { width: 100%; max-width: none; height: 100dvh; min-height: 100svh; border-radius: 0; border-left: 0; border-right: 0; padding: max(10px, env(safe-area-inset-top)) 10px max(10px, env(safe-area-inset-bottom)); }
.modal-header-bar { gap: 10px; padding-bottom: 10px; margin-bottom: 10px; }
.modal-header-bar h3 { min-width: 0; max-width: calc(100% - 48px); font-size: .95rem !important; line-height: 1.25; overflow-wrap: anywhere; }
.modal-close { flex: 0 0 38px; width: 38px; height: 38px; }
.in-app-frame-container { min-height: 0; height: calc(100dvh - 106px); border-radius: 8px; }
.in-app-frame { min-height: 0; height: 100%; }
.pdf-toolbar { display: flex; gap: 8px; padding: 0 0 9px; }
.pdf-open-external { display: inline-flex; align-items: center; justify-content: center; flex: 1; min-height: 42px; border-radius: 10px; background: linear-gradient(135deg,var(--primary),var(--accent-cyan)); color: #fff; text-decoration: none; font-weight: 800; font-size: .86rem; }
@media (max-width: 520px) {
  .app-header .user-badge { display: none !important; }
  .app-header button { padding: 7px 9px !important; font-size: .72rem !important; }
  .auth-screen { padding: 12px; }
  .auth-card { padding: 24px 16px; border-radius: 18px; }
  .auth-title { font-size: 1.15rem; }
  .auth-input { font-size: 16px; }
  .dash-banner h1 { font-size: 1.35rem !important; }
  .card-cover-wrapper { height: 125px; }
}
@media (min-width: 851px) { .pdf-toolbar { display: none; } }

/* FX TREINOS PRO — dashboard visual system */
.dashboard-hero {
  position: relative;
  min-height: 310px;
  border: 1px solid rgba(0,255,136,.32);
  border-radius: 26px;
  overflow: hidden;
  margin-bottom: 30px;
  isolation: isolate;
  box-shadow: 0 24px 70px rgba(0,0,0,.36), 0 0 38px rgba(0,255,136,.12);
}
.dashboard-hero-media { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:center; z-index:-3; }
.dashboard-hero-overlay { position:absolute; inset:0; z-index:-2; background:linear-gradient(90deg, rgba(4,12,18,.98) 0%, rgba(4,12,18,.86) 35%, rgba(4,12,18,.18) 100%), linear-gradient(0deg, rgba(4,12,18,.76), transparent 60%); }
.dashboard-hero-content { position:relative; z-index:2; max-width:610px; padding:42px 42px 36px; }
.dashboard-eyebrow,.section-kicker { color:var(--primary-glow); font-size:.72rem; letter-spacing:.14em; font-weight:800; }
.dashboard-hero h1 { font-family:var(--font-heading); font-size:clamp(2rem,4vw,3.25rem); line-height:1.04; margin:16px 0 12px; color:#fff; letter-spacing:-.04em; }
.dashboard-hero h1 span { color:var(--primary-glow); }
.dashboard-hero p { color:#c6d3d9; max-width:520px; font-size:1rem; line-height:1.6; }
.dashboard-hero-actions { display:flex; flex-wrap:wrap; gap:10px; margin-top:24px; }
.hero-action-primary,.hero-action-ghost { border:0; border-radius:12px; min-height:44px; padding:11px 16px; font-weight:800; cursor:pointer; transition:.25s ease; }
.hero-action-primary { color:#03110d; background:var(--primary-glow); box-shadow:0 0 22px rgba(0,255,136,.24); }
.hero-action-ghost { color:#fff; background:rgba(255,255,255,.08); border:1px solid rgba(255,255,255,.18); }
.hero-action-primary:hover,.hero-action-ghost:hover { transform:translateY(-2px); }
.dashboard-hero-mark { position:absolute; z-index:2; right:30px; bottom:24px; display:flex; align-items:center; gap:7px; color:rgba(255,255,255,.7); font-size:.72rem; letter-spacing:.1em; font-weight:800; }
.dashboard-hero-mark span { color:var(--primary-glow); font-size:1.15rem; font-style:italic; }
.dashboard-overview-head { display:flex; align-items:end; justify-content:space-between; gap:16px; margin:4px 0 16px; }
.dashboard-overview-head h2 { font-family:var(--font-heading); font-size:1.45rem; margin-top:5px; color:#fff; }
.access-pill { display:inline-flex; align-items:center; gap:7px; color:#c9ffe4; border:1px solid rgba(0,255,136,.25); background:rgba(0,255,136,.08); padding:8px 12px; border-radius:999px; font-size:.78rem; font-weight:800; white-space:nowrap; }
.dashboard-overview-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin-bottom:34px; }
.overview-card { display:flex; gap:12px; align-items:flex-start; min-height:100px; padding:16px; border:1px solid rgba(148,163,184,.16); background:linear-gradient(145deg,rgba(15,23,42,.9),rgba(7,18,25,.72)); border-radius:16px; }
.overview-card strong { display:block; color:#fff; font-family:var(--font-heading); font-size:.95rem; margin-bottom:4px; }
.overview-card span:not(.overview-icon) { display:block; color:var(--text-muted); font-size:.76rem; line-height:1.45; }
.overview-icon { flex:0 0 36px; width:36px; height:36px; display:grid; place-items:center; border-radius:11px; font-size:1rem; }
.overview-icon.green { color:var(--primary-glow); background:rgba(0,255,136,.12); }.overview-icon.cyan { color:#5eeeff; background:rgba(6,182,212,.13); }.overview-icon.gold { color:#ffd76a; background:rgba(251,191,36,.13); }.overview-icon.purple { color:#a7f3d0; background:rgba(5,150,105,.16); }
.video-cover { position:relative; }.video-cover .card-cover-img { position:absolute; inset:0; }.video-play-badge { position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); width:46px; height:46px; border-radius:50%; display:grid; place-items:center; color:#03110d; background:var(--primary-glow); box-shadow:0 0 24px rgba(0,255,136,.55); }.video-format-badge { position:absolute; right:10px; bottom:8px; padding:3px 7px; border-radius:5px; background:rgba(0,0,0,.75); color:#fff; font-size:.7rem; font-weight:800; }
@media (max-width:850px) { .dashboard-hero { min-height:330px; }.dashboard-hero-content { padding:30px 22px; }.dashboard-hero-mark { right:18px; bottom:16px; }.dashboard-overview-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:520px) { .dashboard-hero { min-height:390px; }.dashboard-hero-overlay { background:linear-gradient(90deg,rgba(4,12,18,.98),rgba(4,12,18,.55)),linear-gradient(0deg,rgba(4,12,18,.9),transparent 75%); }.dashboard-hero-content { padding:26px 18px; }.dashboard-hero h1 { font-size:2rem !important; }.dashboard-hero p { font-size:.9rem; }.dashboard-hero-actions { flex-direction:column; align-items:stretch; }.dashboard-overview-head { align-items:flex-start; flex-direction:column; }.dashboard-overview-grid { grid-template-columns:1fr; } }

/* Dashboard alignment override */
#tab-dashboard { margin-top: 0; padding-top: 0; }
.app-content { align-self: flex-start; }

/* Desktop layout correction: sidebar and content remain side by side. */
@media (min-width: 851px) {
  .app-body { display: flex; align-items: flex-start; }
  .app-sidebar { flex: 0 0 260px; }
  .app-content { flex: 1 1 auto; width: auto; min-width: 0; }
}


/* Final media polish: preserve full artwork instead of cropping cover images. */
.card-cover-wrapper {
  height: auto;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #07131a, #0b2221);
}
.card-cover-img {
  object-fit: contain;
  padding: 0;
  transform: none !important;
}
.gif-card-cover {
  aspect-ratio: 1 / 1;
  background: radial-gradient(circle at center, #132a2d 0%, #050b10 72%);
  padding: 10px;
}
.gif-card-cover img {
  object-fit: contain !important;
  border-radius: 10px;
}
.gif-card-cover + div { min-height: 92px; }
@media (max-width: 520px) {
  .card-cover-wrapper { height: auto; aspect-ratio: 4 / 3; }
  .gif-card-cover { aspect-ratio: 1 / 1; padding: 8px; }
  .gif-card-cover + div { min-height: 0; }
}
/* Native GIF viewer: centered, readable and never clipped by the phone viewport. */
#modal-body > div:has(> div > img) { min-height: 0; }
#modal-body > div > div:has(> img) { min-height: 0 !important; flex: 0 1 auto !important; padding: 10px !important; }
#modal-body > div > div > img { display: block; width: min(100%, 520px); max-height: min(62vh, 520px) !important; height: auto; margin: 0 auto; }
@media (max-width: 520px) {
  #modal-body > div > div:has(> img) { padding: 8px !important; }
  #modal-body > div > div > img { width: min(100%, 360px); max-height: 52vh !important; }
}

/* Prevent width:100% from collapsing auto-fill grids into a single desktop column. */
.cards-grid > .deliverable-card,
.cards-grid > .recipe-card,
.cards-grid > .dash-card {
  width: auto;
}
@media (max-width: 850px) {
  .cards-grid > .deliverable-card,
  .cards-grid > .recipe-card,
  .cards-grid > .dash-card { width: 100%; }
}

@media (min-width: 851px) {
  .cards-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important; gap: 22px !important; }
}

/* GIF modal spacing: remove the oversized empty region on short mobile screens. */
#modal-body > div:has(> div > img) {
  justify-content: flex-start !important;
  gap: 14px;
}
#modal-body > div:has(> div > img) > div:first-child { flex: 0 0 auto; }


/* Recipe cards: every interactive recipe now has a consistent branded cover. */
.recipe-card { overflow: hidden; padding: 0; }
.recipe-card > div:not(.recipe-card-cover) { padding: 16px; }
.recipe-card-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(145deg, #07131a, #0b2221);
}
.recipe-card-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.recipe-card > .card-action { margin: 0 16px 16px !important; width: calc(100% - 32px); }

/* Mobile-first cover correction: never crop the supplied artwork inside content cards. */
.card-cover-wrapper > img,
.card-cover-wrapper > .card-cover-img,
.video-cover .card-cover-img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain !important;
  object-position: center center;
  padding: 0;
}
.recipe-card-cover {
  aspect-ratio: 4 / 3;
  background: #07131a;
}
.recipe-card-cover img {
  object-fit: contain;
  background: #07131a;
}
@media (max-width: 520px) {
  .card-cover-wrapper { aspect-ratio: 4 / 3; min-height: 0; }
  .card-cover-wrapper > img { object-fit: contain !important; }
  .recipe-card-cover { aspect-ratio: 4 / 3; }
}
