/**
 * Crealco Gamified Portal - Main CSS
 * Version: 2.1.0
 */

/* ============================================
   CSS Variables & Design System
   ============================================ */
:root {
    /* Colors - Material Design 3 */
    --primary: #003461;
    --on-primary: #ffffff;
    --primary-container: #004b87;
    --on-primary-container: #8abcff;

    --secondary: #00677e;
    --on-secondary: #ffffff;
    --secondary-container: #00d2fd;
    --on-secondary-container: #005669;

    --tertiary: #003c14;
    --on-tertiary: #ffffff;
    --tertiary-container: #00561f;
    --on-tertiary-container: #26d45e;

    --error: #ba1a1a;
    --on-error: #ffffff;
    --error-container: #ffdad6;

    --surface: #f9f9ff;
    --on-surface: #091c35;
    --surface-variant: #d6e3ff;
    --on-surface-variant: #424750;

    --outline: #727781;
    --outline-variant: #c2c6d1;

    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-full: 9999px;

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 12px 24px rgba(0, 0, 0, 0.15);

    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-normal: 300ms ease-in-out;
    --transition-slow: 500ms ease-in-out;
}

/* ============================================
   Reset & Base Styles
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background-color: var(--surface);
    color: var(--on-surface);
    line-height: 1.6;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary-container);
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: var(--spacing-sm);
    color: var(--on-surface-variant);
}

small {
    font-size: 0.875rem;
    color: var(--on-surface-variant);
}

/* ============================================
   Navigation
   ============================================ */
.navbar {
    background: white;
    border-bottom: 1px solid var(--surface-variant);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-md) var(--spacing-lg);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.logo-icon {
    font-size: 1.5rem;
}

.logo-img {
    display: block;
    height: 40px;
    max-width: 200px;
    width: auto;
    object-fit: contain;
}

.nav-menu {
    display: flex;
    gap: var(--spacing-lg);
    align-items: center;
    flex: 1;
    margin-left: var(--spacing-lg);
}

.nav-link {
    color: var(--on-surface-variant);
    font-weight: 500;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
    background-color: var(--surface);
}

.nav-user {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.user-name {
    font-weight: 500;
    color: var(--on-surface);
}

.logout {
    font-size: 1.25rem;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--on-surface);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

.nav-divider {
    width: 1px;
    height: 24px;
    background-color: var(--outline-variant);
}

.nav-section-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--on-surface-variant);
    padding: 0 var(--spacing-md);
}

/* ============================================
   Login Page
   ============================================ */
.login-page {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-container) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.login-container {
    width: 100%;
    max-width: 450px;
    position: relative;
    z-index: 10;
    padding: var(--spacing-lg);
}

.blur-circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    filter: blur(100px);
    z-index: 1;
}

.blur-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    right: -100px;
}

.blur-2 {
    width: 300px;
    height: 300px;
    bottom: -100px;
    left: -100px;
}

.login-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--spacing-xl);
    position: relative;
    z-index: 10;
}

.logo-section {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.logo-icon {
    width: 64px;
    height: 64px;
    background-color: var(--secondary-container);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto var(--spacing-md);
}

.login-form {
    margin-bottom: var(--spacing-lg);
}

.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    color: var(--on-surface);
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: var(--spacing-md);
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.25rem;
    opacity: 0.5;
}

input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: var(--spacing-md) var(--spacing-md) var(--spacing-md) 40px;
    border: 1px solid var(--surface-variant);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all var(--transition-fast);
}

input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 52, 97, 0.1);
}

/* ============================================
   Buttons
   ============================================ */
.btn {
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all var(--transition-fast);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--on-primary);
}

.btn-primary:hover {
    background-color: var(--primary-container);
}

.btn-secondary {
    background-color: var(--secondary-container);
    color: var(--on-secondary-container);
}

.btn-secondary:hover {
    opacity: 0.9;
}

.btn-outline {
    background-color: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: var(--on-primary);
}

.btn-full {
    width: 100%;
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.1rem;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    background-color: transparent;
    font-size: 1.5rem;
}

/* ============================================
   Alerts
   ============================================ */
.alert {
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    display: flex;
    gap: var(--spacing-md);
    align-items: flex-start;
    margin-bottom: var(--spacing-lg);
}

.alert-error {
    background-color: var(--error-container);
    color: var(--error);
}

.alert-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

/* ============================================
   Cards
   ============================================ */
.card {
    background: white;
    border: 1px solid var(--surface-variant);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
}

.card-dark {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-container) 100%);
    color: var(--on-primary);
    border: none;
}

.card-dark h2,
.card-dark h3,
.card-dark p {
    color: var(--on-primary);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
}

.card-body {
    /* No additional padding needed */
}

/* ============================================
   Grid System
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-lg);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
}

.grid-span-2 {
    grid-column: span 2;
}

/* ============================================
   Hero Section
   ============================================ */
.hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-container) 100%);
    color: var(--on-primary);
    padding: var(--spacing-xl) var(--spacing-lg);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-xl);
}

.hero-content {
    max-width: 600px;
}

.badge {
    display: inline-block;
    background-color: var(--secondary-container);
    color: var(--on-secondary-container);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: var(--spacing-md);
}

.hero-section h1 {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
}

.hero-section p {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-lg);
    color: rgba(255, 255, 255, 0.9);
}

/* ============================================
   Countdown Timer
   ============================================ */
.countdown {
    display: flex;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.countdown-box {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    text-align: center;
}

.countdown-value {
    display: block;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--on-primary);
    margin-bottom: 4px;
}

.countdown-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.8);
}

/* ============================================
   Progress Bar
   ============================================ */
.progress-bar {
    width: 100%;
    height: 8px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: var(--primary);
    border-radius: var(--radius-full);
    transition: width var(--transition-normal);
}

/* ============================================
   Stat Cards
   ============================================ */
.stat-card {
    background: white;
    border: 1px solid var(--surface-variant);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: var(--spacing-sm);
}

.stat-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--on-surface-variant);
    text-transform: uppercase;
}

/* ============================================
   Page Header
   ============================================ */
.page-header {
    margin-bottom: var(--spacing-xl);
}

.page-header h1 {
    margin-bottom: var(--spacing-sm);
}

.page-header p {
    font-size: 1.1rem;
    color: var(--on-surface-variant);
}

/* ============================================
   Levels Grid
   ============================================ */
.levels-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
}

.level-card {
    background: white;
    border: 2px solid var(--surface-variant);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.level-card.level-completed {
    background-color: var(--tertiary-container);
    border-color: var(--tertiary);
    color: var(--on-tertiary);
    box-shadow: var(--shadow-md);
}

.level-card.level-completed h3 {
    color: var(--on-tertiary);
}

.level-card.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 52, 97, 0.2);
    animation: pulse 2s infinite;
}

.level-card.level-locked {
    opacity: 0.6;
    cursor: not-allowed;
}

.status-badge {
    position: absolute;
    top: -8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: white;
    border: 2px solid var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

.level-icon {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
}

.level-seq {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--on-surface-variant);
    margin-bottom: var(--spacing-sm);
}

.level-card h3 {
    color: var(--on-surface);
    margin-bottom: var(--spacing-sm);
}

.level-score,
.level-status {
    font-size: 0.875rem;
    font-weight: 700;
}

.level-score {
    color: var(--tertiary);
}

.level-status {
    color: var(--primary);
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 3px rgba(0, 52, 97, 0.2);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(0, 52, 97, 0.1);
    }
}

/* ============================================
   Tables
   ============================================ */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background-color: var(--surface);
    border-bottom: 2px solid var(--surface-variant);
}

th {
    padding: var(--spacing-md);
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--on-surface-variant);
}

td {
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--surface-variant);
}

tbody tr:hover {
    background-color: var(--surface);
}

.text-right {
    text-align: right;
}

/* ============================================
   User Cell
   ============================================ */
.user-cell {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.user-avatar {
    width: 40px;
    height: 40px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

.user-name {
    font-weight: 600;
    color: var(--on-surface);
}

.user-level {
    font-size: 0.75rem;
    color: var(--on-surface-variant);
}

/* ============================================
   Podium
   ============================================ */
.podium-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-container) 100%);
    color: var(--on-primary);
    padding: var(--spacing-xl) var(--spacing-lg);
    border-radius: var(--radius-lg);
    margin-bottom: var(--spacing-xl);
}

.podium {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: var(--spacing-xl);
    margin-top: var(--spacing-xl);
    min-height: 300px;
}

.podium-position {
    text-align: center;
    flex: 1;
    max-width: 150px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.position-1 {
    transform: scale(1.1);
    order: 2;
}

.position-2 {
    order: 1;
}

.position-3 {
    order: 3;
}

.podium-avatar {
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.2);
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-lg);
}

.podium-avatar-gold {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    border-color: #FFD700;
}

.avatar-circle {
    width: 90px;
    height: 90px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.podium-name {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: var(--spacing-sm);
}

.podium-location {
    font-size: 0.875rem;
    opacity: 0.9;
    margin-bottom: var(--spacing-md);
}

.podium-rank {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    opacity: 0.8;
}

.podium-score {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background-color: var(--primary);
    color: var(--on-primary);
    padding: var(--spacing-xl) var(--spacing-lg);
    margin-top: var(--spacing-xl);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.footer-section h4 {
    margin-bottom: var(--spacing-md);
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    display: block;
    margin-bottom: var(--spacing-sm);
    transition: color var(--transition-fast);
}

.footer-section a:hover {
    color: var(--on-primary);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--spacing-lg);
    text-align: center;
    font-size: 0.875rem;
    opacity: 0.9;
}

.footer-bottom p {
    color: inherit;
    margin-bottom: var(--spacing-sm);
}

/* ============================================
   Modal
   ============================================ */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease-in-out;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease-in-out;
}

.modal-close {
    color: var(--on-surface-variant);
    float: right;
    font-size: 2rem;
    font-weight: 700;
    padding: var(--spacing-lg);
    cursor: pointer;
    transition: color var(--transition-fast);
}

.modal-close:hover {
    color: var(--error);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ============================================
   Utility Classes
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-lg);
}

.section {
    padding: var(--spacing-xl) 0;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-md {
    margin-top: var(--spacing-md);
}

.mb-md {
    margin-bottom: var(--spacing-md);
}

.mb-lg {
    margin-bottom: var(--spacing-lg);
}

.gap-md {
    gap: var(--spacing-md);
}

.opacity-50 {
    opacity: 0.5;
}

.shadow-sm {
    box-shadow: var(--shadow-sm);
}

.shadow-md {
    box-shadow: var(--shadow-md);
}

.rounded-md {
    border-radius: var(--radius-md);
}

.rounded-lg {
    border-radius: var(--radius-lg);
}

/* =====================================================
   Crealco token fallback (safety net) — appended
   Ensures brand colours/gradients resolve on every page
   even if crealco-theme.css fails to load or is cached.
   ===================================================== */
:root {
    --cre-cyan:#44c2de; --cre-coral:#f05161; --cre-indigo:#2e3092;
    --cre-gold:#d9a25e; --cre-lime:#c8db45; --cre-grey:#6d6f71; --cre-grey-dark:#58585a;
    --cre-grad-complete: linear-gradient(90deg,#c8db45 0%,#44c2de 100%);
    --cre-grad-header:   linear-gradient(90deg,#f05161 0%,#d9a25e 55%,#c8db45 100%);
    --cre-grad-locked:   linear-gradient(135deg,#f05161 0%,#d9a25e 55%,#c8db45 100%);
    --cre-grad-rainbow:  linear-gradient(120deg,#44c2de 0%,#c8db45 30%,#d9a25e 60%,#f05161 100%);
}
.cre-grad-word{
    background:linear-gradient(90deg,var(--cre-lime,#c8db45) 0%,var(--cre-cyan,#44c2de) 100%);
    -webkit-background-clip:text;background-clip:text;
    -webkit-text-fill-color:transparent;color:transparent;
}
.cre-card-white{
    background:#fff;
    box-shadow:0 10px 26px rgba(0,0,0,.10),0 2px 6px rgba(0,0,0,.06);
    border:1px solid #eceef0;
}

/* ---- Nav robustness + green wordmark (fallback, appended) ----
   Ensures the top nav wraps instead of cutting off at 100% zoom,
   and the logo reads in Crealco green, even without crealco-theme.css. */
.navbar .nav-container {
    max-width: 1500px;
    flex-wrap: wrap;
    row-gap: 4px;
    column-gap: 8px;
}
.navbar .nav-menu {
    flex-wrap: wrap;
    gap: 2px 4px;
    min-width: 0;
}
.navbar .nav-link {
    padding: 7px 11px;
    font-size: 0.9rem;
    white-space: nowrap;
}
.navbar .nav-user { margin-left: auto; }
.logo, .logo-text { color: #7a9a17; white-space: nowrap; }   /* Crealco green wordmark */

/* ---- Pill nav fallback (dark floating pill, ~85% wide) ----
   Mirrors crealco-theme so the nav design holds even if it doesn't load. */
.navbar {
    width: 85% !important;
    max-width: 1400px;
    margin: 16px auto !important;
    background: #2b2b2d !important;
    border: none !important;
    border-bottom: none !important;
    border-radius: 9999px !important;
    box-shadow: 0 10px 28px rgba(0,0,0,0.20);
    position: sticky;
    top: 16px;
}
.navbar .nav-container { padding: 8px 24px; max-width: none; }
.navbar .nav-link { color: #f2f2f3 !important; border-radius: 9999px; }
.navbar .nav-link:hover { background: rgba(255,255,255,0.08) !important; color: #fff !important; }
.navbar .nav-link.active { background: var(--cre-lime,#c8db45) !important; color: #1a1a1a !important; }
.navbar .user-name { color: #f2f2f3 !important; }
.navbar .logo, .navbar .logo-text { color: var(--cre-lime,#c8db45) !important; }
.navbar .nav-section-title { color: #b9bbbe !important; }
.navbar .nav-divider { width: 1px; height: 20px; background: rgba(255,255,255,0.18); margin: 0 6px; }

.navbar .nav-menu { flex: 0 1 auto !important; }

/* ---- Force single-line nav (fallback, appended) ---- */
.navbar { width: 92% !important; max-width: 1600px; }
.navbar .nav-container { flex-wrap: nowrap !important; overflow-x: auto; column-gap: 6px; padding: 7px 20px; scrollbar-width: none; }
.navbar .nav-container::-webkit-scrollbar { display: none; }
.navbar .nav-menu { flex-wrap: nowrap !important; gap: 3px; }
.navbar .nav-link { padding: 6px 12px !important; font-size: 0.85rem !important; }
.navbar .nav-user { white-space: nowrap; flex: 0 0 auto; margin-left: auto; }
.navbar .nav-brand { flex: 0 0 auto; }

/* ---- One-line nav: pin logo + user, scroll only the tab strip (final) ---- */
.navbar .nav-container { flex-wrap: nowrap !important; overflow-x: visible !important; align-items: center; }
.navbar .nav-menu { flex: 1 1 auto !important; flex-wrap: nowrap !important; overflow-x: auto; min-width: 0; scrollbar-width: none; }
.navbar .nav-menu::-webkit-scrollbar { display: none; }
.navbar .nav-user { margin-left: 12px !important; flex: 0 0 auto; white-space: nowrap; }

/* ---- Footer: dark Crealco grey + brand gradient accent (fallback) ---- */
.footer { position: relative; background: #2b2b2d !important; border-top: none !important; }
.footer::before { content:""; position:absolute; top:0; left:0; right:0; height:4px; background: linear-gradient(90deg,var(--cre-cyan,#44c2de) 0%,var(--cre-lime,#c8db45) 33%,#d9a25e 66%,#f05161 100%); }
.footer-section h4 { color:#fff !important; }
.footer-section p { color: rgba(255,255,255,0.92) !important; }
.footer-section a { color: rgba(255,255,255,0.85) !important; }
.footer-section a:hover { color:var(--cre-lime,#c8db45) !important; }
.footer-bottom { border-top-color: rgba(255,255,255,0.22) !important; }
.footer-bottom p { color: rgba(255,255,255,0.9) !important; }
