/* ═══════════════════════════════════════════════════════
   TEMPLATE-AWARE PAGE ALIGNMENT
   Body classes: tpl-dashboard | tpl-magazine | tpl-immersive | tpl-mosaic | tpl-horizon
   Applied globally — ALL pages adapt to the selected template.
   ═══════════════════════════════════════════════════════ */


/* ╔══════════════════════════════════╗
   ║  DASHBOARD (default) — no mods  ║
   ╚══════════════════════════════════╝ */


/* ╔══════════════════════════════════╗
   ║  MAGAZINE — Editorial Style     ║
   ╚══════════════════════════════════╝ */

/* Navigation */
.tpl-magazine .bottom-nav {
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.06);
    border-top: none;
}

/* Page headers */
.tpl-magazine .gradient-header {
    border-radius: 0 0 24px 24px;
}

/* Cards */
.tpl-magazine .app-card,
.tpl-magazine .app-card-group,
.tpl-magazine .curved-card {
    border-radius: 14px;
    border: 1px solid #e5e7eb;
}

/* Content cards */
.tpl-magazine .bg-white.rounded-xl,
.tpl-magazine .bg-white.rounded-2xl,
.tpl-magazine .bg-white.rounded-lg {
    border-radius: 14px;
    border: 1px solid #e5e7eb;
}

/* Section headers */
.tpl-magazine .section-header__title {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.01em;
}

/* Section labels */
.tpl-magazine .section-label {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: none;
    color: var(--text-primary);
}

/* Icon boxes */
.tpl-magazine .icon-box {
    border-radius: 12px;
}

/* Quick actions */
.tpl-magazine .quick-action {
    border-radius: 14px;
}
.tpl-magazine .quick-action__icon {
    border-radius: 12px;
}

/* Spacing */
.tpl-magazine .app-card-group__item {
    padding: 14px 16px;
    gap: 14px;
}

/* Footer */
.tpl-magazine .bg-white.border-t {
    border-radius: 24px 24px 0 0;
    border-top: none;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.04);
}


/* ╔══════════════════════════════════╗
   ║  IMMERSIVE — Cinematic Style    ║
   ╚══════════════════════════════════╝ */

/* Navigation */
.tpl-immersive .bottom-nav {
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 -2px 16px rgba(0,0,0,0.06);
}
.tpl-immersive .bottom-nav .nav-item.active .nav-icon {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.15));
}

/* Page headers */
.tpl-immersive .gradient-header {
    min-height: 160px;
}

/* Cards */
.tpl-immersive .app-card,
.tpl-immersive .app-card-group,
.tpl-immersive .curved-card {
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.04);
}

/* Content cards */
.tpl-immersive .bg-white.rounded-xl,
.tpl-immersive .bg-white.rounded-2xl,
.tpl-immersive .bg-white.rounded-lg {
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    border: 1px solid rgba(0,0,0,0.04);
}

/* Section headers */
.tpl-immersive .section-header__title {
    font-weight: 800;
    letter-spacing: -0.02em;
}

/* Quick actions */
.tpl-immersive .quick-action {
    border-radius: 16px;
}

/* Stat cards */
.tpl-immersive .stat-card {
    border-radius: 14px;
}

/* Spacing */
.tpl-immersive .app-card-group__item {
    padding: 14px 16px;
    gap: 14px;
}

/* Icon boxes */
.tpl-immersive .icon-box {
    border-radius: var(--radius-full);
}


/* ╔══════════════════════════════════╗
   ║  MOSAIC — Bento Grid Style     ║
   ╚══════════════════════════════════╝ */

/* Navigation */
.tpl-mosaic .bottom-nav {
    background: #111827;
    border-top: none;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.15);
}
.tpl-mosaic .bottom-nav .nav-item {
    color: #6b7280;
}
.tpl-mosaic .bottom-nav .nav-item.active {
    color: white;
}
.tpl-mosaic .bottom-nav .nav-item span {
    font-weight: 700;
    letter-spacing: 0.02em;
}

/* Page headers */
.tpl-mosaic .gradient-header {
    background-size: 400% 400%;
    animation: tpl-mosaic-aurora 12s ease-in-out infinite;
}
@keyframes tpl-mosaic-aurora {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Cards */
.tpl-mosaic .app-card,
.tpl-mosaic .app-card-group,
.tpl-mosaic .curved-card {
    border-radius: 18px;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04), 0 0 0 1px rgba(0,0,0,0.02);
}

/* Content cards */
.tpl-mosaic .bg-white.rounded-xl,
.tpl-mosaic .bg-white.rounded-2xl,
.tpl-mosaic .bg-white.rounded-lg {
    border-radius: 18px;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

/* Section headers — uppercase label style */
.tpl-mosaic .section-header__title {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #94a3b8;
}

/* Section labels */
.tpl-mosaic .section-label {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.12em;
    color: #94a3b8;
}

/* Section header line accent */
.tpl-mosaic .section-header {
    position: relative;
}
.tpl-mosaic .section-header::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, #e2e8f0, transparent);
    margin-left: 8px;
}

/* Quick actions */
.tpl-mosaic .quick-action {
    border-radius: 18px;
    border: 1px solid rgba(0,0,0,0.05);
}
.tpl-mosaic .quick-action__icon {
    border-radius: 12px;
}
.tpl-mosaic .quick-action__label {
    font-weight: 700;
    font-size: 12px;
}

/* Icon boxes */
.tpl-mosaic .icon-box {
    border-radius: 12px;
}
.tpl-mosaic .icon-box--round {
    border-radius: 12px;
}

/* Stat/Right now cards */
.tpl-mosaic .stat-card { border-radius: 16px; }
.tpl-mosaic .right-now-card { border-radius: 18px; }
.tpl-mosaic .empty-state { border-radius: 18px; }

/* Spacing */
.tpl-mosaic .app-card-group__item {
    padding: 14px 16px;
    gap: 14px;
}

/* Footer */
.tpl-mosaic .bg-white.border-t {
    border-radius: 0;
    background: #f8fafc;
}


/* ╔══════════════════════════════════╗
   ║  HORIZON — Futuristic Dark Mode ║
   ╚══════════════════════════════════╝ */

/* --- Global dark mode overrides --- */
.tpl-horizon {
    background: #0a0a0f !important;
    color: #e2e8f0;
}
.tpl-horizon .app-container {
    background: #0a0a0f !important;
}

/* Circuit grid on all pages */
.tpl-horizon .app-container::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 0;
}

/* Navigation */
.tpl-horizon .bottom-nav {
    background: rgba(10,10,15,0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-top: 1px solid rgba(255,255,255,0.06);
    border-radius: 0;
}
.tpl-horizon .bottom-nav .nav-item {
    color: rgba(255,255,255,0.3);
}
.tpl-horizon .bottom-nav .nav-item.active {
    color: var(--event-primary);
}
.tpl-horizon .bottom-nav .nav-item.active .nav-icon {
    filter: drop-shadow(0 0 6px var(--event-primary));
}
.tpl-horizon .bottom-nav .nav-item span {
    font-weight: 700;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Page headers — dark gradient */
.tpl-horizon .gradient-header {
    background: linear-gradient(180deg,
        rgba(var(--event-primary-rgb, 73,142,139), 0.15) 0%,
        #0a0a0f 100%) !important;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.tpl-horizon .gradient-header h1,
.tpl-horizon .gradient-header h2,
.tpl-horizon .gradient-header p,
.tpl-horizon .gradient-header span,
.tpl-horizon .gradient-header a {
    color: #e2e8f0 !important;
}

/* Cards → glassmorphism */
.tpl-horizon .app-card,
.tpl-horizon .app-card-group,
.tpl-horizon .curved-card {
    background: rgba(255,255,255,0.04) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.06) !important;
    border-radius: 16px;
    box-shadow: none;
    color: #e2e8f0;
}

/* Content cards */
.tpl-horizon .bg-white,
.tpl-horizon .bg-gray-50 {
    background: rgba(255,255,255,0.03) !important;
    color: #e2e8f0;
}

/* Card group items */
.tpl-horizon .app-card-group__item {
    border-bottom-color: rgba(255,255,255,0.05);
    padding: 16px 18px;
    gap: 14px;
}
.tpl-horizon .app-card-group__item:hover {
    background: rgba(255,255,255,0.04);
}
.tpl-horizon .app-card-group__item:active {
    background: rgba(255,255,255,0.06);
}

/* Text colors */
.tpl-horizon .text-gray-800,
.tpl-horizon .text-gray-900 {
    color: #f1f5f9 !important;
}
.tpl-horizon .text-gray-700,
.tpl-horizon .text-gray-600 {
    color: #cbd5e1 !important;
}
.tpl-horizon .text-gray-500 {
    color: #64748b !important;
}
.tpl-horizon .text-gray-400 {
    color: rgba(255,255,255,0.25) !important;
}
.tpl-horizon p.text-sm.font-semibold {
    color: #f1f5f9;
}

/* Icon boxes — dark neon style */
.tpl-horizon .icon-box {
    border-radius: 12px;
    opacity: 0.85;
}
.tpl-horizon .icon-box--round {
    border-radius: 12px;
}

/* Section labels */
.tpl-horizon .section-label {
    color: rgba(255,255,255,0.25);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.2em;
}

/* Section header */
.tpl-horizon .section-header__title {
    color: rgba(255,255,255,0.5);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}
.tpl-horizon .section-header__action {
    color: var(--event-primary);
}

/* Borders and dividers */
.tpl-horizon .border-gray-100,
.tpl-horizon .border-gray-200,
.tpl-horizon .border-gray-300 {
    border-color: rgba(255,255,255,0.06) !important;
}
.tpl-horizon .border-t {
    border-top-color: rgba(255,255,255,0.06) !important;
}
.tpl-horizon .border-b {
    border-bottom-color: rgba(255,255,255,0.06) !important;
}
.tpl-horizon .divide-gray-100 > * + * {
    border-color: rgba(255,255,255,0.06);
}

/* Search bars */
.tpl-horizon input[type="text"],
.tpl-horizon input[type="search"],
.tpl-horizon input[type="email"],
.tpl-horizon textarea,
.tpl-horizon select {
    background: rgba(255,255,255,0.05) !important;
    border-color: rgba(255,255,255,0.08) !important;
    color: #e2e8f0 !important;
}
.tpl-horizon input::placeholder,
.tpl-horizon textarea::placeholder {
    color: rgba(255,255,255,0.25) !important;
}

/* Buttons */
.tpl-horizon .bg-primary,
.tpl-horizon [class*="bg-primary"] {
    box-shadow: 0 0 12px rgba(var(--event-primary-rgb, 73,142,139), 0.3);
}

/* Chevrons */
.tpl-horizon .text-gray-300 svg,
.tpl-horizon .text-gray-300 i {
    color: rgba(255,255,255,0.12) !important;
}

/* Badges */
.tpl-horizon .app-badge--muted {
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.5);
}

/* Quick actions */
.tpl-horizon .quick-action {
    border-radius: 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
}
.tpl-horizon .quick-action__label {
    color: #e2e8f0;
}

/* Stat cards */
.tpl-horizon .stat-card {
    background: rgba(255,255,255,0.03) !important;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
}

/* Right now card */
.tpl-horizon .right-now-card {
    border-radius: 16px;
    box-shadow: 0 0 20px rgba(var(--event-primary-rgb, 73,142,139), 0.15);
}

/* Empty state */
.tpl-horizon .empty-state {
    color: rgba(255,255,255,0.5);
}
.tpl-horizon .empty-state__icon {
    background: rgba(255,255,255,0.06);
}

/* Footer */
.tpl-horizon .bg-white.border-t,
.tpl-horizon div.bg-white.border-t.border-gray-200 {
    background: rgba(255,255,255,0.02) !important;
    border-top-color: rgba(255,255,255,0.06) !important;
    color: #94a3b8;
}
.tpl-horizon .bg-white.border-t p {
    color: #94a3b8 !important;
}

/* Speaker cards */
.tpl-horizon .bg-white.shadow-sm,
.tpl-horizon .bg-white.shadow {
    background: rgba(255,255,255,0.04) !important;
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: none !important;
}

/* Tab buttons */
.tpl-horizon .bg-white.shadow-sm button,
.tpl-horizon button.bg-white {
    background: rgba(255,255,255,0.06) !important;
    color: #e2e8f0 !important;
    border-color: rgba(255,255,255,0.08) !important;
}

/* Scroll areas */
.tpl-horizon .overflow-x-auto {
    scrollbar-width: none;
}

/* Links in dark mode */
.tpl-horizon a.text-primary,
.tpl-horizon .text-primary {
    color: var(--event-primary) !important;
}

/* Feed items */
.tpl-horizon .feed-item {
    border-bottom-color: rgba(255,255,255,0.05);
}
.tpl-horizon .feed-item:hover {
    background: rgba(255,255,255,0.03);
}

/* Glow line on top of every page */
.tpl-horizon .gradient-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--event-primary), var(--event-secondary), var(--event-primary), transparent);
    z-index: 10;
}
.tpl-horizon .gradient-header::before {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 8px;
    background: linear-gradient(90deg, transparent, var(--event-primary), var(--event-secondary), var(--event-primary), transparent);
    filter: blur(8px);
    opacity: 0.5;
    z-index: 9;
}
