/* ==========================================================================
   VARINSE DESIGN SYSTEM & AUTHENTICATION SUITE
   Ultra-modern, sleek, professional UI tokens, animations & components
   ========================================================================== */

:root {
    /* Brand & Accent Palette */
    --brand-primary: #4f46e5;
    --brand-primary-hover: #4338ca;
    --brand-primary-light: #eef2ff;
    --brand-primary-glow: rgba(79, 70, 229, 0.25);
    
    --brand-secondary: #06b6d4;
    --brand-secondary-glow: rgba(6, 182, 212, 0.25);
    --brand-accent: #8b5cf6;

    /* Neutrals & Dark Theme */
    --bg-dark: #090d16;
    --bg-dark-surface: #0f172a;
    --bg-dark-card: rgba(15, 23, 42, 0.85);
    --bg-dark-border: rgba(255, 255, 255, 0.1);

    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    --border-color: #e2e8f0;
    --border-focus: #6366f1;

    /* Feedback Colors */
    --success: #10b981;
    --success-bg: #ecfdf5;
    --success-border: #a7f3d0;
    --danger: #ef4444;
    --danger-bg: #fef2f2;
    --danger-border: #fecaca;
    --warning: #f59e0b;
    --warning-bg: #fffbeb;
    --warning-border: #fde68a;

    /* Typography */
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    /* Radii & Shadows */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08), 0 2px 4px rgba(15, 23, 42, 0.04);
    --shadow-lg: 0 20px 35px -10px rgba(15, 23, 42, 0.12), 0 8px 15px -6px rgba(15, 23, 42, 0.06);
    --shadow-glow: 0 0 35px rgba(99, 102, 241, 0.35);

    /* Transitions */
    --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: var(--bg-light);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, .brand {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

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

a:hover {
    color: var(--brand-primary-hover);
    text-decoration: underline;
}

/* ==========================================================================
   BRAND COMPONENT
   ========================================================================== */
.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: var(--text-main);
    text-decoration: none !important;
}

.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
    color: #ffffff;
    font-weight: 900;
    font-size: 1.15rem;
    border-radius: var(--radius-md);
    box-shadow: 0 4px 12px var(--brand-primary-glow);
    transition: var(--transition);
}

.brand:hover .brand-mark {
    transform: scale(1.06) rotate(-3deg);
    box-shadow: 0 6px 20px var(--brand-primary-glow);
}

.brand-light {
    color: #ffffff !important;
}

.brand-light .brand-mark-light {
    background: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
    box-shadow: 0 0 25px rgba(99, 102, 241, 0.5);
}

/* ==========================================================================
   AUTH LAYOUT & SPLIT VIEW
   ========================================================================== */
.auth-body {
    background-color: var(--bg-dark);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
}

.auth-shell {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    min-height: 100vh;
    width: 100vw;
    background-color: var(--bg-dark);
    position: relative;
    overflow: hidden;
}

/* Auth Left Showcase (Visual & Brand Pitch) */
.auth-showcase {
    background: radial-gradient(circle at 10% 20%, #1e1b4b 0%, #0f172a 50%, #090d16 100%);
    padding: 4rem 4.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    border-right: 1px solid var(--bg-dark-border);
    overflow: hidden;
    color: #ffffff;
}

.auth-showcase::before {
    content: '';
    position: absolute;
    top: -15%;
    left: -15%;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.25) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(50px);
    pointer-events: none;
}

.auth-showcase::after {
    content: '';
    position: absolute;
    bottom: -15%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(50px);
    pointer-events: none;
}

.showcase-copy {
    position: relative;
    z-index: 2;
    margin: 3rem 0;
    max-width: 520px;
}

.showcase-copy h2 {
    font-size: 2.85rem;
    line-height: 1.15;
    color: #ffffff;
    margin: 1.25rem 0 1.25rem;
    font-weight: 800;
}

.showcase-copy p {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.65;
    margin: 0;
}

.showcase-features {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    margin-top: 2.5rem;
}

.showcase-feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0.9rem 1.25rem;
    border-radius: var(--radius-md);
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.showcase-feature-item:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateX(4px);
}

.showcase-feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3) 0%, rgba(6, 182, 212, 0.3) 100%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-sm);
    color: #a5b4fc;
    font-size: 1.1rem;
}

.showcase-feature-text {
    font-size: 0.95rem;
    font-weight: 500;
    color: #e2e8f0;
}

/* Decorative Orbit animation */
.showcase-orbit {
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    width: 280px;
    height: 280px;
    pointer-events: none;
    opacity: 0.6;
}

.showcase-orbit span {
    position: absolute;
    border-radius: 50%;
    border: 1px dashed rgba(255, 255, 255, 0.15);
}

.showcase-orbit span:nth-child(1) {
    inset: 0;
    animation: spin 35s linear infinite;
}
.showcase-orbit span:nth-child(2) {
    inset: 30px;
    border-color: rgba(99, 102, 241, 0.25);
    animation: spin-reverse 25s linear infinite;
}
.showcase-orbit span:nth-child(3) {
    inset: 60px;
    border-color: rgba(6, 182, 212, 0.25);
    animation: spin 18s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes spin-reverse {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}

.showcase-footer {
    position: relative;
    z-index: 2;
    color: var(--text-light);
    font-size: 0.85rem;
    margin: 0;
}

/* Auth Right Panel (Forms) */
.auth-panel {
    background-color: var(--bg-white);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3.5rem 2.5rem;
    overflow-y: auto;
    position: relative;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    animation: fadeIn 0.45s ease-out;
}

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

.mobile-brand {
    display: none;
    margin-bottom: 2rem;
}

/* Eyebrows, Headings, Subtitles */
.eyebrow {
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: var(--brand-primary);
    margin-bottom: 0.5rem;
    display: inline-block;
}

.eyebrow-badge {
    background: var(--brand-primary-light);
    color: var(--brand-primary);
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
}

.auth-card h2 {
    font-size: 2rem;
    font-weight: 800;
    margin: 0 0 0.5rem;
    color: var(--text-main);
}

.auth-intro {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 1.75rem;
}

/* ==========================================================================
   FORMS & INPUTS
   ========================================================================== */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.4rem;
}

.form-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.form-label-link {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--brand-primary);
}

.form-control {
    width: 100%;
    height: 48px;
    padding: 0.65rem 1rem;
    font-size: 0.95rem;
    font-family: var(--font-body);
    color: var(--text-main);
    background-color: #f8fafc;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
    outline: none;
}

.form-control:hover {
    border-color: #cbd5e1;
    background-color: #ffffff;
}

.form-control:focus {
    background-color: #ffffff;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 4px var(--brand-primary-glow);
}

.form-control.is-invalid {
    border-color: var(--danger);
    background-color: #fffaf0;
}

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.18);
}

.invalid-feedback, .field-error {
    display: block;
    font-size: 0.8rem;
    color: var(--danger);
    margin-top: 0.35rem;
    font-weight: 500;
}

/* Password Toggle Field */
.password-field {
    position: relative;
    display: flex;
    align-items: center;
}

.password-field .form-control {
    padding-right: 48px;
}

.password-toggle {
    position: absolute;
    right: 8px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.15rem;
    padding: 6px 10px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.password-toggle:hover {
    color: var(--text-main);
    background: #f1f5f9;
}

/* Form Row for Inscription */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Checkbox and Terms */
.form-check {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    margin-top: 0.25rem;
}

.form-check-input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--brand-primary);
    cursor: pointer;
    border-radius: 4px;
}

.form-check-label {
    font-size: 0.875rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1.4;
}

.form-note {
    font-size: 0.8rem;
    color: var(--text-light);
    margin: 0;
}

/* Password Strength Meter */
.password-strength-container {
    margin-top: 0.5rem;
}

.strength-bar-track {
    height: 5px;
    background-color: #e2e8f0;
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: 0.4rem;
}

.strength-bar-fill {
    height: 100%;
    width: 0%;
    transition: width 0.3s ease, background-color 0.3s ease;
    border-radius: var(--radius-full);
}

.strength-bar-fill.is-weak {
    background-color: var(--danger);
}

.strength-bar-fill.is-medium {
    background-color: var(--warning);
}

.strength-bar-fill.is-good {
    background-color: #3b82f6;
}

.strength-bar-fill.is-strong {
    background-color: var(--success);
}

.strength-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* Rule checklist */
.strength-rules {
    list-style: none;
    padding: 0;
    margin: 0.6rem 0 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}

.strength-rules li {
    font-size: 0.75rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.35rem;
    transition: var(--transition);
}

.strength-rules li.valid {
    color: var(--success);
    font-weight: 600;
}

.strength-rules li.valid i {
    color: var(--success);
}

.strength-rules li i {
    font-size: 0.85rem;
}

.password-match-feedback {
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.35rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.75rem 1.4rem;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none !important;
}

.btn-primary {
    background: linear-gradient(135deg, var(--brand-primary) 0%, #4338ca 100%);
    color: #ffffff !important;
    box-shadow: 0 4px 14px var(--brand-primary-glow);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #4338ca 0%, #3730a3 100%);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.4);
    transform: translateY(-1px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-outline-dark {
    background: transparent;
    color: var(--text-main);
    border-color: var(--border-color);
}

.btn-outline-dark:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    color: var(--text-main);
}

.btn-sm {
    padding: 0.45rem 0.9rem;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
}

.auth-submit {
    width: 100%;
    height: 48px;
    margin-top: 0.5rem;
    font-size: 1rem;
}

.auth-switch {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 1.75rem;
    margin-bottom: 0;
}

.auth-switch a {
    font-weight: 700;
}

/* Custom Alerts */
.alert {
    padding: 0.9rem 1.1rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid transparent;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.alert.fade-out {
    opacity: 0;
    transform: translateY(-8px);
}

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

.alert-danger {
    background-color: var(--danger-bg);
    border-color: var(--danger-border);
    color: #991b1b;
}

.alert-demo-link {
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.6);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    word-break: break-all;
}

/* ==========================================================================
   APP HEADER & NAVIGATION
   ========================================================================== */
.app-header {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link-item {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text-muted);
    padding: 0.4rem 0.8rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.nav-link-item:hover, .nav-link-item.active {
    color: var(--brand-primary);
    background-color: var(--brand-primary-light);
    text-decoration: none;
}

.nav-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-accent) 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px var(--brand-primary-glow);
}

.user-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-main);
}

/* ==========================================================================
   HOME & DASHBOARD
   ========================================================================== */
.home-hero {
    background: radial-gradient(circle at 100% 0%, #e0e7ff 0%, #f8fafc 50%, #ffffff 100%);
    padding: 4rem 0 3rem;
    border-bottom: 1px solid var(--border-color);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-copy h2 {
    font-size: 2.75rem;
    line-height: 1.2;
    margin: 0.5rem 0 1rem;
    font-weight: 800;
}

.hero-copy p {
    font-size: 1.1rem;
    color: var(--text-muted);
    max-width: 540px;
    margin-bottom: 2rem;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 600;
}

.status-pill span {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.profile-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2.25rem;
    box-shadow: var(--shadow-lg);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.profile-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--brand-primary) 0%, var(--brand-secondary) 100%);
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-accent) 100%);
    color: #ffffff;
    font-weight: 800;
    font-size: 2rem;
    border-radius: var(--radius-full);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    box-shadow: 0 8px 24px var(--brand-primary-glow);
}

.profile-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--text-light);
    margin: 0;
}

.profile-card h2 {
    font-size: 1.5rem;
    margin: 0.25rem 0 0.25rem;
}

.profile-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0;
}

.profile-divider {
    height: 1px;
    background: var(--border-color);
    margin: 1.5rem 0;
}

.profile-security {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: var(--success);
    font-weight: 600;
}

/* Dashboard Section */
.dashboard-section {
    padding: 4rem 0;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2.5rem;
}

.section-heading h2 {
    font-size: 2rem;
    margin: 0;
}

.section-heading p {
    color: var(--text-muted);
    margin: 0;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
}

.dashboard-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.dashboard-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: #cbd5e1;
}

.featured-card {
    background: linear-gradient(135deg, #1e1b4b 0%, #0f172a 100%);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.1);
}

.featured-card h3 {
    color: #ffffff;
}

.featured-card p {
    color: var(--text-light);
}

.card-number {
    font-size: 2.5rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.2);
    line-height: 1;
    margin-bottom: 1.5rem;
}

.card-icon {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    display: inline-flex;
    color: var(--brand-primary);
}

.dashboard-card h3 {
    font-size: 1.25rem;
    margin: 0 0 0.5rem;
}

.dashboard-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0;
}

/* ==========================================================================
   PROFILE & ACCOUNT SETTINGS PAGE
   ========================================================================== */
.profile-page-section {
    padding: 3.5rem 0 5rem;
}

.profile-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 2.5rem;
    align-items: start;
}

.profile-sidebar-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    text-align: center;
}

.profile-details-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.settings-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2.25rem;
    box-shadow: var(--shadow-md);
}

.settings-card-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1.25rem;
    margin-bottom: 1.75rem;
}

.settings-card-header h3 {
    font-size: 1.35rem;
    margin: 0 0 0.35rem;
}

.settings-card-header p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

/* ==========================================================================
   APP FOOTER
   ========================================================================== */
.app-footer {
    background-color: #ffffff;
    border-top: 1px solid var(--border-color);
    padding: 2rem 0;
    margin-top: auto;
}

.app-footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* ==========================================================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================== */
@media (max-width: 1024px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-showcase {
        display: none;
    }

    .auth-panel {
        min-height: 100vh;
        padding: 3rem 1.5rem;
    }

    .mobile-brand {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.75rem;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .profile-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .app-nav {
        height: auto;
        padding: 1rem 0;
        flex-direction: column;
        gap: 1rem;
    }

    .section-heading {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* ==========================================================================
   AUTH LAYOUT (Main layout embedded)
   ========================================================================== */
.auth-wrapper {
    min-height: calc(100vh - 160px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    background: radial-gradient(circle at top, var(--brand-primary-light) 0%, var(--bg-light) 70%);
}

.centered-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2.5rem 3rem;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    animation: fadeIn 0.45s ease-out;
}

/* ========================================================================== 
   VARINSE BUSINESS HOME & PACKS
   ========================================================================== */
.business-hero {
    position: relative;
    overflow: hidden;
    padding: 5.5rem 0;
    color: #fff;
    background:
        radial-gradient(circle at 80% 20%, rgba(6, 182, 212, 0.18), transparent 28%),
        radial-gradient(circle at 10% 90%, rgba(139, 92, 246, 0.22), transparent 32%),
        linear-gradient(135deg, #090d16 0%, #111c3f 56%, #16275b 100%);
}

.business-hero::after {
    content: '';
    position: absolute;
    width: 560px;
    height: 560px;
    right: -260px;
    bottom: -340px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    box-shadow: 0 0 0 70px rgba(255, 255, 255, 0.025), 0 0 0 140px rgba(255, 255, 255, 0.018);
}

.business-hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
    gap: 3.5rem;
    align-items: center;
}

.business-hero .eyebrow {
    color: #67e8f9;
}

.business-hero-copy h2 {
    max-width: 820px;
    margin: 0.7rem 0 1.25rem;
    color: #fff;
    font-size: clamp(1.65rem, 3vw, 3.65rem);
    line-height: 1.02;
    letter-spacing: -0.055em;
}

.business-hero-copy > p {
    max-width: 710px;
    margin: 0 0 1.75rem;
    color: #cbd5e1;
    font-size: 1.125rem;
    line-height: 1.75;
}

.theme-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-bottom: 2.25rem;
}

.theme-pills span {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.055);
    color: #e2e8f0;
    font-size: 0.88rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.hero-media {
    position: relative;
    aspect-ratio: 4 / 3;
    margin: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-xl);
    background: #173c24;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.3);
}

.hero-media::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.08), transparent 45%, rgba(12, 23, 16, 0.16));
}

.hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.expertise-section { padding: 5.5rem 0; background: #fff; }
.expertise-heading > p { max-width: 490px; }
.expertise-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.expertise-card {
    position: relative;
    min-height: 300px;
    padding: 2rem;
    overflow: hidden;
    color: #d8e2da;
    border: 1px solid rgba(133, 164, 140, 0.18);
    border-radius: 10px;
    background: linear-gradient(145deg, #111914, #18241c);
    box-shadow: 0 16px 34px rgba(12, 23, 16, 0.1);
    transition: var(--transition);
}
.expertise-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 85% 0, rgba(38, 116, 59, 0.34), transparent 42%), linear-gradient(180deg, transparent 55%, rgba(0, 0, 0, 0.18));
    opacity: 0.72;
    transition: opacity 0.3s ease, transform 0.4s ease;
}
.expertise-card::after {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: linear-gradient(180deg, #d6631b, #26743b);
    transform: scaleY(0.36);
    transform-origin: bottom;
    transition: transform 0.3s ease;
}
.expertise-card > * { position: relative; z-index: 1; }
.expertise-card:hover { transform: translateY(-6px); border-color: rgba(213, 138, 82, 0.55); box-shadow: 0 24px 46px rgba(12, 23, 16, 0.2); }
.expertise-card:hover::before { opacity: 1; transform: scale(1.03); }
.expertise-card:hover::after { transform: scaleY(1); }
.expertise-icon { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 3.8rem; color: #f1b184; border: 1px solid rgba(241, 177, 132, 0.28); border-radius: 9px; background: rgba(255, 255, 255, 0.055); box-shadow: inset 0 1px rgba(255, 255, 255, 0.08); font-size: 1.35rem; }
.expertise-card h3 { margin-bottom: .7rem; color: #fff; font-size: 1.35rem; }
.expertise-card p { margin: 0; color: #b7c5ba; font-size: 1rem; line-height: 1.75; }

.packs-section { padding: 5.5rem 0 4.5rem; background: #f1f5f9; }
.packs-heading { max-width: 700px; margin: 0 auto 3.5rem; text-align: center; }
.packs-heading h2 { margin: 0.5rem 0 0.8rem; font-size: clamp(2rem, 4vw, 3rem); }
.packs-heading > p { color: var(--text-muted); }
.packs-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.15rem; align-items: stretch; }

.pack-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 1.75rem;
    border: 1px solid var(--border-color);
    overflow: hidden;
    border-radius: 10px;
    background: #fff;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.pack-card::before { content: ''; position: absolute; inset: 0 0 auto; height: 3px; background: linear-gradient(90deg, #b84d10, #26743b); opacity: .55; transition: opacity .25s ease; }
.pack-card > * { position: relative; z-index: 1; }
.pack-card:hover { transform: translateY(-4px); border-color: #b6c4b9; box-shadow: 0 20px 38px rgba(16, 32, 21, .12); }
.pack-card:hover::before { opacity: 1; }
.pack-card-featured { color: #fff; border-color: #312e81; background: linear-gradient(155deg, #312e81, #111827 72%); box-shadow: 0 22px 45px rgba(49, 46, 129, 0.25); }
.pack-badge { position: absolute; top: 1rem; right: 1rem; padding: 0.35rem 0.65rem; color: #1e1b4b; background: #a5f3fc; border-radius: var(--radius-full); font-size: 0.75rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; }
.pack-level { min-height: 38px; margin: .35rem 0; color: var(--text-muted); font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.055em; }
.pack-card-featured .pack-level, .pack-card-featured .pack-description { color: #a5b4fc; }
.pack-card h3 { margin: 0; font-size: 1.55rem; }
.pack-card-featured h3 { color: #fff; }
.pack-price { display: flex; align-items: center; gap: 0.65rem; margin: 1rem 0; }
.pack-price strong { font-family: var(--font-heading); font-size: 2.5rem; line-height: 1; }
.pack-price > span { display: flex; flex-direction: column; color: var(--text-muted); font-size: 0.78rem; font-weight: 700; }
.pack-price small { font-size: 0.62rem; font-weight: 500; }
.pack-card-featured .pack-price > span { color: #cbd5e1; }
.pack-description { min-height: 70px; color: var(--text-muted); font-size: 0.92rem; line-height: 1.7; }
.pack-features { display: flex; flex-direction: column; gap: 0.7rem; padding: 1.2rem 0; margin: 0 0 1.2rem; border-top: 1px solid var(--border-color); list-style: none; }
.pack-card-featured .pack-features { border-color: rgba(255, 255, 255, 0.12); }
.pack-features li { position: relative; display: block; padding-left: 1rem; font-size: 0.88rem; line-height: 1.55; }
.pack-features li::before { content: ''; position: absolute; top: .62em; left: 0; width: 5px; height: 5px; border-radius: 50%; background: #26743b; }
.pack-card-featured .pack-features li::before { background: #85b88f; }
.pack-action { justify-content: center; width: 100%; margin-top: auto; }
.packs-note { display: flex; justify-content: center; gap: 0.55rem; margin: 2.25rem 0 0; color: var(--text-muted); font-size: 0.88rem; text-align: center; }
.packs-note i { color: var(--success); }

/* Checkout */
.checkout-section { padding: 3.5rem 0 5rem; background: linear-gradient(180deg, #f8fafc, #eef2ff); }
.checkout-back { display: inline-flex; align-items: center; gap: 0.45rem; margin-bottom: 2.25rem; color: var(--text-muted); font-size: 0.88rem; font-weight: 600; }
.checkout-heading { max-width: 720px; margin-bottom: 2.5rem; }
.checkout-heading h2 { margin: 0.4rem 0 0.6rem; font-size: clamp(2.25rem, 5vw, 3.6rem); }
.checkout-heading p { color: var(--text-muted); font-size: 1.02rem; }
.checkout-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.65fr); gap: 2rem; align-items: start; }
.checkout-form { display: flex; flex-direction: column; gap: 1.25rem; }
.checkout-card { padding: 2rem; border: 1px solid var(--border-color); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-sm); }
.checkout-card-heading { display: flex; gap: 1rem; align-items: flex-start; padding-bottom: 1.5rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--border-color); }
.checkout-card-heading > span { display: grid; place-items: center; flex: 0 0 38px; height: 38px; color: #fff; background: var(--brand-primary); border-radius: 11px; font-size: 0.78rem; font-weight: 800; }
.checkout-card-heading h2 { margin: 0; font-size: 1.3rem; }
.checkout-card-heading p { margin: 0.1rem 0 0; color: var(--text-muted); font-size: 0.82rem; }
.payment-methods { display: grid; gap: 0.75rem; }
.payment-method { position: relative; display: grid; grid-template-columns: auto auto 1fr auto; gap: 0.9rem; align-items: center; padding: 1rem; border: 1px solid var(--border-color); border-radius: var(--radius-md); cursor: pointer; transition: var(--transition); }
.payment-method:hover, .payment-method:has(input:checked) { border-color: var(--brand-primary); background: var(--brand-primary-light); }
.payment-method input { width: 17px; height: 17px; accent-color: var(--brand-primary); }
.payment-method-icon { display: grid; place-items: center; width: 42px; height: 42px; color: var(--brand-primary); background: #fff; border: 1px solid var(--border-color); border-radius: 11px; font-size: 1.1rem; }
.payment-method strong, .payment-method small { display: block; }
.payment-method small { margin-top: 0.12rem; color: var(--text-muted); font-size: 0.72rem; }
.payment-check { color: var(--brand-primary); opacity: 0; }
.payment-method:has(input:checked) .payment-check { opacity: 1; }
.checkout-terms { margin-top: 1.25rem; font-size: 0.82rem; }
.checkout-submit { align-self: stretch; min-height: 56px; justify-content: center; }
.payment-disclaimer { display: flex; gap: 0.5rem; justify-content: center; margin: -0.4rem 0 0; color: var(--text-muted); font-size: 0.74rem; text-align: center; }
.order-summary { position: sticky; top: 96px; padding: 2rem; color: #fff; background: linear-gradient(155deg, #1e1b4b, #0f172a); border-radius: var(--radius-xl); box-shadow: var(--shadow-lg); }
.order-summary-label { color: #a5b4fc; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; }
.order-pack-icon { display: grid; place-items: center; width: 56px; height: 56px; margin: 1.3rem 0; color: #67e8f9; background: rgba(255, 255, 255, 0.09); border-radius: 16px; font-size: 1.4rem; }
.order-summary h2 { margin: 0; color: #fff; }
.order-summary > p { color: #a5b4fc; }
.order-divider { height: 1px; margin: 1.5rem 0; background: rgba(255, 255, 255, 0.12); }
.order-summary ul { display: flex; flex-direction: column; gap: 0.65rem; padding: 0; margin: 0; list-style: none; }
.order-summary li { display: flex; gap: 0.55rem; color: #cbd5e1; font-size: 0.8rem; }
.order-summary li i { color: #34d399; }
.order-total { display: flex; justify-content: space-between; align-items: center; }
.order-total strong { font-family: var(--font-heading); font-size: 1.7rem; }
.order-once { margin: 0.4rem 0 0 !important; color: #94a3b8 !important; font-size: 0.69rem; }

/* Confirmation */
.confirmation-section { min-height: 75vh; display: flex; align-items: center; padding: 4.5rem 0; background: linear-gradient(180deg, #f8fafc, #eef2ff); }
.confirmation-container { max-width: 720px; text-align: center; }
.confirmation-icon { display: grid; place-items: center; width: 76px; height: 76px; margin: 0 auto 1.4rem; color: #fff; background: var(--success); border-radius: 50%; box-shadow: 0 12px 30px rgba(16, 185, 129, 0.25); font-size: 2rem; }
.confirmation-container h2 { margin: 0.35rem 0 0.7rem; font-size: 2.8rem; }
.confirmation-lead { max-width: 580px; margin: 0 auto 2rem; color: var(--text-muted); }
.confirmation-card { padding: 0.6rem 1.7rem; border: 1px solid var(--border-color); border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-md); text-align: left; }
.confirmation-card > div { display: flex; justify-content: space-between; gap: 2rem; padding: 1rem 0; border-bottom: 1px solid var(--border-color); }
.confirmation-card > div:last-child { border-bottom: 0; }
.confirmation-card span { color: var(--text-muted); }
.order-status { color: #b45309; }
.confirmation-notice { display: flex; gap: 1rem; align-items: flex-start; margin: 1.25rem 0; padding: 1rem 1.2rem; border: 1px solid #bae6fd; border-radius: var(--radius-md); background: #f0f9ff; color: #075985; text-align: left; }
.confirmation-notice i { font-size: 1.35rem; }
.confirmation-notice p { margin: 0; font-size: 0.82rem; }
.confirmation-actions { display: flex; justify-content: center; gap: 0.75rem; margin-top: 1.5rem; }

@media (max-width: 1200px) {
    .packs-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
    .business-hero-grid, .checkout-grid { grid-template-columns: 1fr; }
    .hero-media { width: 100%; max-width: 720px; }
    .expertise-grid { grid-template-columns: 1fr; }
    .expertise-card { min-height: 230px; }
    .order-summary { position: static; }
}

@media (max-width: 640px) {
    .business-hero { padding: 4rem 0; }
    .business-hero-copy h2 { font-size: 2.5rem; }
    .packs-grid { grid-template-columns: 1fr; }
    .pack-level, .pack-description { min-height: auto; }
    .checkout-card, .order-summary { padding: 1.35rem; }
    .payment-method { grid-template-columns: auto 1fr auto; }
    .payment-method input { position: absolute; opacity: 0; }
    .confirmation-card > div { flex-direction: column; gap: 0.2rem; }
    .confirmation-actions { flex-direction: column; }
    .confirmation-actions .btn { justify-content: center; }
}

/* ========================================================================== 
   APP SHELL — SIDEBAR + PAGE WRAPPER LAYOUT
   Desktop: sidebar fixed left, page-wrapper fills remaining width.
   Mobile (<1024px): sidebar hidden, hamburger toggle opens it as a drawer.
   ========================================================================== */

/* ── Variables ── */
:root {
    --sidebar-width: 280px;
}

/* ── App Shell (grid container) ── */
.app-shell {
    display: flex;
    min-height: 100vh;
}

/* ── Page Wrapper ── */
.page-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0; /* allow flex child to shrink below content width */
}

.main-content {
    flex: 1;
}

/* ── Platform ribbon ── */
.platform-ribbon {
    color: #dbeafe;
    background: #0d1b3d;
    font-size: 0.72rem;
    letter-spacing: 0.02em;
}

.platform-ribbon .container {
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.ribbon-themes { color: #a5b4fc; }
.ribbon-themes b { margin: 0 0.45rem; color: #22d3ee; }

/* ── Header nav ── */
.app-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
    padding: 0 1.5rem;
}

.header-leading, .header-account, .header-auth-actions { display: flex; align-items: center; gap: 0.9rem; }
.header-avatar-link { display: inline-flex; border-radius: 50%; }
.header-avatar-link:hover { text-decoration: none; transform: translateY(-1px); }
.header-greeting { color: var(--text-muted); font-size: 0.86rem; }
.header-greeting strong { color: var(--text-main); }

/* ── Hamburger toggle (mobile-only by default) ── */
.sidebar-toggle,
.sidebar-close {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    color: var(--text-main);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: #fff;
    font-size: 1.45rem;
    cursor: pointer;
    transition: var(--transition);
}

.sidebar-toggle:hover,
.sidebar-close:hover { color: var(--brand-primary); border-color: #a5b4fc; background: var(--brand-primary-light); }

/* ── Mobile overlay ── */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 998;
    visibility: hidden;
    opacity: 0;
    background: rgba(7, 12, 25, 0.55);
    backdrop-filter: blur(3px);
    transition: visibility 0.3s ease, opacity 0.3s ease;
}

/* ── Sidebar panel ── */
.app-sidebar {
    width: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    padding: 1.5rem 1.25rem 1.25rem;
    overflow-y: auto;
    color: var(--text-main);
    background: #fff;
    border-right: 1px solid var(--border-color);
    flex-shrink: 0;
}

/* ── Sidebar inner elements ── */
.sidebar-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.sidebar-close { width: 40px; height: 40px; font-size: 1rem; }
.sidebar-tagline { margin: 0.8rem 0 1.6rem 3.2rem; color: var(--text-muted); font-size: 0.78rem; }
.sidebar-navigation { flex: 1; }
.sidebar-section-label { margin: 0 0 0.65rem 0.75rem; color: var(--text-light); font-size: 0.66rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.sidebar-menu { display: flex; flex-direction: column; gap: 0.28rem; padding: 0; margin: 0; list-style: none; }

.sidebar-link {
    position: relative;
    display: grid;
    grid-template-columns: 32px 1fr auto;
    align-items: center;
    min-height: 48px;
    padding: 0.5rem 0.8rem;
    color: #24324a;
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 600;
    transition: var(--transition);
}

.sidebar-link:hover { color: var(--brand-primary); background: #f8fafc; text-decoration: none; }
.sidebar-link.active { color: #3730a3; background: linear-gradient(90deg, #eef2ff, #f8fafc); }
.sidebar-link.active::before { content: ''; position: absolute; left: 0; width: 3px; height: 24px; border-radius: 0 4px 4px 0; background: linear-gradient(#4f46e5, #06b6d4); }
.sidebar-link > i { color: #64748b; font-size: 1.05rem; }
.sidebar-link.active > i, .sidebar-link:hover > i { color: var(--brand-primary); }
.sidebar-count { display: grid; place-items: center; min-width: 24px; height: 24px; padding: 0 0.35rem; color: #3730a3; background: #e0e7ff; border-radius: 99px; font-size: 0.68rem; font-weight: 800; }
.sidebar-divider { height: 1px; margin: 1.65rem 0; background: var(--border-color); }

.sidebar-footer { padding-top: 1.25rem; margin-top: 1.5rem; border-top: 1px solid var(--border-color); }
.sidebar-user { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.75rem; align-items: center; padding: 0.75rem; color: var(--text-main); border-radius: 12px; background: #f8fafc; }
.sidebar-user:hover { color: var(--text-main); background: #f1f5f9; text-decoration: none; }
.sidebar-user > span:nth-child(2) { min-width: 0; }
.sidebar-user strong, .sidebar-user small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user strong { font-size: 0.84rem; }
.sidebar-user small { color: var(--text-muted); font-size: 0.69rem; }
.sidebar-user > i { color: var(--text-light); font-size: 0.78rem; }
.sidebar-logout { display: flex; align-items: center; justify-content: center; gap: 0.5rem; width: 100%; margin-top: 0.75rem; padding: 0.72rem; color: #b91c1c; border: 0; border-radius: 10px; background: #fef2f2; font-size: 0.82rem; font-weight: 700; cursor: pointer; transition: var(--transition); }
.sidebar-logout:hover { color: #991b1b; background: #fee2e2; }

/* ==========================================================================
   DESKTOP (>= 1024px) — Sidebar always visible, hamburger hidden
   ========================================================================== */
@media (min-width: 1024px) {
    /* Hide hamburger and close button on desktop */
    .sidebar-toggle { display: none !important; }
    .sidebar-close { display: none !important; }
    .sidebar-overlay { display: none !important; }

    /* Sidebar is part of the document flow */
    .app-sidebar {
        position: sticky;
        top: 0;
        height: 100vh;
        z-index: 10;
    }

    /* Hide sidebar brand on desktop (header already has it) */
    .sidebar-header .brand { display: none; }

    /* Header nav padding for desktop */
    .app-nav { padding: 0 2rem; }

    /* Hide the sidebar tagline's left margin push (brand is visible here) */
    .sidebar-tagline { margin-left: 3.2rem; }
}

/* ==========================================================================
   MOBILE (< 1024px) — Sidebar off-canvas drawer, hamburger visible
   ========================================================================== */
@media (max-width: 1023.98px) {
    /* Sidebar becomes a fixed drawer */
    .app-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 999;
        width: min(320px, 88vw);
        box-shadow: 25px 0 70px rgba(15, 23, 42, 0.24);
        transform: translateX(-105%);
        transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
        border-right: none;
    }

    /* Body lock when sidebar is open */
    .sidebar-open { overflow: hidden; }
    .sidebar-open .sidebar-overlay { visibility: visible; opacity: 1; }
    .sidebar-open .app-sidebar { transform: translateX(0); }
}

/* ==========================================================================
   SMALL SCREEN ADJUSTMENTS
   ========================================================================== */
@media (max-width: 760px) {
    .platform-ribbon .container { justify-content: center; }
    .ribbon-themes { display: none; }
    .header-greeting { display: none; }
    .app-nav { height: auto; padding: 0.8rem 1rem; }
    .app-footer .container { flex-direction: column; gap: 0.4rem; text-align: center; }
}

@media (max-width: 480px) {
    .header-leading { gap: 0.6rem; }
    .header-leading .brand { font-size: 1.05rem; }
    .header-leading .brand-mark { width: 34px; height: 34px; }
    .sidebar-toggle { width: 38px; height: 38px; }
}

/* Orders workspace */
.orders-section { min-height: 68vh; padding: 4rem 0 5rem; background: linear-gradient(180deg, #f8fafc, #f1f5f9); }
.orders-heading { display: flex; align-items: end; justify-content: space-between; gap: 1.5rem; margin-bottom: 2.5rem; }
.orders-heading h2 { margin: 0.35rem 0 0; font-size: 2.65rem; }
.orders-list { display: flex; flex-direction: column; gap: 0.85rem; }
.order-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 1.25rem; align-items: center; padding: 1.2rem 1.35rem; border: 1px solid var(--border-color); border-radius: var(--radius-md); background: #fff; box-shadow: var(--shadow-sm); }
.order-row-icon { display: grid; place-items: center; width: 52px; height: 52px; color: var(--brand-primary); background: var(--brand-primary-light); border-radius: 14px; font-size: 1.15rem; }
.order-reference { color: var(--text-light); font-size: 0.67rem; font-weight: 800; letter-spacing: 0.07em; }
.order-row-main h2 { margin: 0.1rem 0 0; font-size: 1.05rem; }
.order-row-main p { margin: 0; color: var(--text-muted); font-size: 0.74rem; }
.status-badge { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.4rem 0.7rem; border-radius: 99px; font-size: 0.71rem; font-weight: 700; }
.status-pending { color: #92400e; background: #fef3c7; }
.order-row-total { min-width: 110px; text-align: right; }
.order-row-total span, .order-row-total strong { display: block; }
.order-row-total span { color: var(--text-muted); font-size: 0.68rem; }
.order-row-total strong { font-family: var(--font-heading); }
.empty-orders { max-width: 650px; margin: 2rem auto; padding: 4rem 2rem; text-align: center; border: 1px dashed #cbd5e1; border-radius: var(--radius-xl); background: rgba(255, 255, 255, 0.75); }
.empty-orders-icon { display: grid; place-items: center; width: 70px; height: 70px; margin: 0 auto 1.25rem; color: var(--brand-primary); background: var(--brand-primary-light); border-radius: 20px; font-size: 1.7rem; }
.empty-orders h2 { font-size: 1.45rem; }
.empty-orders p { max-width: 460px; margin: 0 auto 1.5rem; color: var(--text-muted); }

@media (max-width: 760px) {
    .orders-heading { align-items: flex-start; flex-direction: column; }
    .order-row { grid-template-columns: auto 1fr; }
    .order-row-status, .order-row-total { grid-column: 2; text-align: left; }
}

/* Wallet navigation */
.sidebar-group details > summary { list-style: none; cursor: pointer; }
.sidebar-group details > summary::-webkit-details-marker { display: none; }
.sidebar-chevron { font-size: 0.72rem !important; transition: transform 0.2s ease; }
.sidebar-group details[open] .sidebar-chevron { transform: rotate(180deg); }
.sidebar-submenu { display: grid; gap: 0.15rem; margin: 0.25rem 0 0.45rem 2.6rem; padding: 0 0 0 0.75rem; border-left: 1px solid #dbe3ef; list-style: none; }
.sidebar-sublink { display: block; padding: 0.48rem 0.65rem; color: #64748b; border-radius: 8px; font-size: 0.76rem; font-weight: 650; }
.sidebar-sublink:hover, .sidebar-sublink.active { color: #3730a3; background: #eef2ff; text-decoration: none; }
.sidebar-link-disabled { color: #94a3b8; background: #f8fafc; cursor: not-allowed; opacity: 0.74; }
.sidebar-link-disabled > i { color: #94a3b8; }
.sidebar-link-disabled small { padding: 0.2rem 0.42rem; color: #64748b; background: #e2e8f0; border-radius: 99px; font-size: 0.57rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; }

/* Wallet pages */
.wallet-balance-card { display: flex; align-items: center; justify-content: space-between; gap: 2rem; margin-bottom: 1rem; padding: 2rem 2.2rem; color: #fff; border-radius: 24px; background: #312e81; box-shadow: 0 20px 45px rgba(49, 46, 129, 0.2); }
.wallet-balance-card span, .wallet-balance-card small, .wallet-balance-card strong { display: block; }
.wallet-balance-card span { color: #c7d2fe; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.wallet-balance-card strong { margin: 0.2rem 0; font-family: var(--font-heading); font-size: clamp(2.2rem, 5vw, 3.4rem); line-height: 1; }
.wallet-balance-card small { color: #e0e7ff; }
.wallet-balance-card > i { display: grid; place-items: center; width: 76px; height: 76px; border: 1px solid rgba(255, 255, 255, 0.22); border-radius: 22px; background: rgba(255, 255, 255, 0.1); font-size: 2rem; }
.wallet-actions-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 1.25rem; }
.wallet-action-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.9rem; align-items: center; padding: 1.2rem; color: var(--text-main); border: 1px solid var(--border-color); border-radius: 16px; background: #fff; box-shadow: var(--shadow-sm); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.wallet-action-card:hover { color: var(--text-main); text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-md); }
.wallet-action-card > i:first-child { display: grid; place-items: center; width: 42px; height: 42px; color: #4338ca; border-radius: 12px; background: #eef2ff; }
.wallet-action-card > i:last-child { color: #94a3b8; }
.wallet-action-card strong, .wallet-action-card small { display: block; }
.wallet-action-card small { margin-top: 0.2rem; color: var(--text-muted); font-size: 0.7rem; line-height: 1.45; }

/* Network tree */
.network-page { min-height: 70vh; padding: 3.5rem 0 5rem; background: #f8fafc; }
.network-container { padding-right: clamp(1rem, 3vw, 3rem); padding-left: clamp(1rem, 3vw, 3rem); }
.network-heading { display: flex; align-items: end; justify-content: space-between; gap: 1.5rem; max-width: 1400px; margin: 0 auto 1.5rem; }
.network-heading h2 { margin: 0.3rem 0; font-size: clamp(2.2rem, 5vw, 3.2rem); }
.network-heading p { margin: 0; color: var(--text-muted); }
.network-total { display: flex; align-items: center; gap: 0.65rem; padding: 0.7rem 1rem; color: #3730a3; border: 1px solid #c7d2fe; border-radius: 14px; background: #eef2ff; font-size: 0.8rem; }
.network-total strong { font-size: 1.2rem; }
.network-search { max-width: 820px; margin: 0 auto 1rem; padding: 1rem; border: 1px solid var(--border-color); border-radius: 16px; background: #fff; box-shadow: var(--shadow-sm); }
.network-search label { display: block; margin-bottom: 0.5rem; color: #334155; font-size: 0.78rem; font-weight: 750; }
.network-search > div { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; border: 1px solid #cbd5e1; border-radius: 12px; overflow: hidden; }
.network-search > div > i { padding-left: 0.9rem; color: #94a3b8; }
.network-search input { min-width: 0; padding: 0.78rem; border: 0; outline: 0; }
.network-search .btn { margin: 0.25rem; white-space: nowrap; }
.network-search-results { max-width: 820px; margin: 0 auto 1rem; padding: 1rem; border-radius: 14px; background: #eef2ff; }
.network-search-results p { margin: 0; color: #3730a3; }
.network-search-results > div { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.7rem; }
.network-search-results a { padding: 0.45rem 0.65rem; color: #312e81; border: 1px solid #c7d2fe; border-radius: 9px; background: #fff; font-size: 0.75rem; font-weight: 700; }
.network-search-results a small { color: #64748b; font-weight: 500; }
.network-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; max-width: 1400px; margin: 1.5rem auto 0.8rem; color: #64748b; font-size: 0.7rem; }
.network-legend span { display: inline-flex; align-items: center; gap: 0.35rem; }
.network-dot, .network-pack-status { display: inline-block; width: 9px; height: 9px; border: 2px solid #fff; border-radius: 50%; background: #cbd5e1; box-shadow: 0 0 0 1px #cbd5e1; }
.network-dot.is-active, .network-pack-status.is-active { background: #16a34a; box-shadow: 0 0 0 1px #16a34a; }
.network-tree-scroll { max-width: 100%; padding: 2rem; border: 1px solid var(--border-color); border-radius: 22px; background: #fff; box-shadow: var(--shadow-sm); overflow: auto; }
.network-tree { width: max-content; min-width: 100%; }
.network-tree > .network-tree-item { min-width: 900px; }
.network-tree-item { position: relative; display: flex; flex-direction: column; align-items: center; scroll-margin: 130px; }
.network-member-card { position: relative; z-index: 2; display: grid; grid-template-columns: auto minmax(100px, 1fr) auto; gap: 0.65rem; align-items: center; min-width: 190px; max-width: 230px; padding: 0.75rem; border: 1px solid #dbe3ef; border-radius: 14px; background: #fff; box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08); }
.network-member-card.is-root { color: #fff; border-color: #312e81; background: #312e81; }
.network-avatar { display: grid; place-items: center; width: 36px; height: 36px; color: #3730a3; border-radius: 11px; background: #eef2ff; font-size: 0.8rem; font-weight: 800; }
.network-member-card.is-root .network-avatar { color: #312e81; background: #fff; }
.network-member-copy { min-width: 0; }
.network-member-copy strong, .network-member-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.network-member-copy strong { font-size: 0.78rem; }
.network-member-copy small { color: #64748b; font-size: 0.63rem; }
.network-member-card.is-root small { color: #c7d2fe; }
.network-tree-item.is-match > .network-member-card { border-color: #f59e0b; box-shadow: 0 0 0 4px #fef3c7, 0 8px 22px rgba(15, 23, 42, 0.12); }
.network-branches { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; width: 100%; padding-top: 2.6rem; }
.network-branches::before { content: ''; position: absolute; top: 0; left: 50%; width: 1px; height: 1.45rem; background: #cbd5e1; }
.network-branches::after { content: ''; position: absolute; top: 1.45rem; left: 25%; right: 25%; height: 1px; background: #cbd5e1; }
.network-branch { position: relative; min-width: 270px; padding-top: 1.2rem; }
.network-branch::before { content: ''; position: absolute; top: 0; left: 50%; width: 1px; height: 1.2rem; background: #cbd5e1; }
.network-branch-label { position: absolute; z-index: 2; top: -0.2rem; left: 50%; padding: 0.15rem 0.45rem; color: #64748b; border: 1px solid #e2e8f0; border-radius: 99px; background: #f8fafc; font-size: 0.55rem; font-weight: 800; text-transform: uppercase; transform: translateX(-50%); }
.network-branch-members { display: flex; align-items: flex-start; justify-content: center; gap: 1.5rem; }
.network-empty-slot { display: flex; align-items: center; justify-content: center; gap: 0.4rem; width: 150px; margin: 0 auto; padding: 0.7rem; color: #94a3b8; border: 1px dashed #cbd5e1; border-radius: 12px; background: #f8fafc; font-size: 0.68rem; }
.network-leaf-label { margin-top: 0.4rem; color: #94a3b8; font-size: 0.56rem; }

/* Home news modal */
.news-modal[hidden] { display: none; }
.news-modal { position: fixed; inset: 0; z-index: 2000; display: grid; place-items: center; padding: 1rem; opacity: 0; transition: opacity 0.18s ease; }
.news-modal.is-visible { opacity: 1; }
.news-modal-backdrop { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.72); backdrop-filter: blur(5px); }
.news-modal-open { overflow: hidden; }
.news-card { position: relative; z-index: 1; width: min(610px, 100%); max-height: min(760px, calc(100vh - 2rem)); padding: clamp(1.25rem, 4vw, 2rem); border: 1px solid rgba(255, 255, 255, 0.7); border-radius: 24px; background: #fff; box-shadow: 0 30px 90px rgba(15, 23, 42, 0.35); overflow-y: auto; transform: translateY(16px) scale(0.98); transition: transform 0.2s ease; }
.news-modal.is-visible .news-card { transform: translateY(0) scale(1); }
.news-card-header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 0.9rem; align-items: center; }
.news-card-header h2 { margin: 0.15rem 0 0; font-size: clamp(1.45rem, 4vw, 2rem); }
.news-icon { display: grid; place-items: center; width: 48px; height: 48px; color: #fff; border-radius: 14px; background: #4338ca; font-size: 1.1rem; }
.news-close { display: grid; place-items: center; width: 38px; height: 38px; color: #64748b; border: 0; border-radius: 50%; background: #f1f5f9; cursor: pointer; }
.news-card > p { margin: 1rem 0; color: var(--text-muted); }
.news-list { display: grid; gap: 0.65rem; margin: 0 0 1.2rem; padding: 0; list-style: none; }
.news-list li { border: 1px solid #e2e8f0; border-radius: 14px; background: #f8fafc; overflow: hidden; }
.news-article-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0.8rem; padding: 0.9rem; color: inherit; }
.news-article-card:hover { color: inherit; background: #f1f5f9; text-decoration: none; }
.news-article-card > span { display: grid; place-items: center; width: 36px; height: 36px; color: #4338ca; border-radius: 10px; background: #eef2ff; }
.news-article-card small { display: block; margin-bottom: 0.16rem; color: #64748b; font-size: 0.62rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.news-list strong { display: block; color: #1e293b; font-size: 0.82rem; }
.news-list p { margin: 0.2rem 0 0; color: #64748b; font-size: 0.72rem; line-height: 1.55; }
.news-list em { display: inline-flex; align-items: center; gap: 0.3rem; margin-top: 0.45rem; color: #4338ca; font-size: 0.68rem; font-style: normal; font-weight: 750; }
.news-card-actions { display: flex; justify-content: flex-end; gap: 0.6rem; }
.news-explore { justify-content: center; }

/* Dynamic announcements */
.announcements-page { min-height: 70vh; padding: 4rem 0 5rem; background: #f8fafc; }
.announcement-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.announcement-card { display: flex; flex-direction: column; padding: 1.4rem; border: 1px solid var(--border-color); border-radius: 18px; background: #fff; box-shadow: var(--shadow-sm); }
.announcement-card-meta, .announcement-detail-meta { display: flex; align-items: center; justify-content: space-between; gap: 1rem; color: #64748b; font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.announcement-card-meta span, .announcement-detail-meta span { padding: 0.3rem 0.5rem; color: #3730a3; border-radius: 99px; background: #eef2ff; }
.announcement-card h3 { margin: 1rem 0 0.45rem; font-size: 1.25rem; }
.announcement-card p { flex: 1; color: #64748b; font-size: 0.82rem; line-height: 1.65; }
.announcement-card > a { display: inline-flex; align-items: center; gap: 0.4rem; color: #4338ca; font-size: 0.78rem; font-weight: 750; }
.announcement-detail { min-height: 70vh; padding: 4rem 0 5rem; background: #f8fafc; }
.announcement-detail-container { max-width: 820px; }
.announcement-back { display: inline-flex; gap: 0.4rem; margin-bottom: 2rem; font-size: 0.8rem; font-weight: 700; }
.announcement-detail h1 { margin: 1rem 0; font-size: clamp(2.2rem, 6vw, 4rem); line-height: 1.05; }
.announcement-lead { color: #475569; font-size: 1.12rem; line-height: 1.7; }
.announcement-content { margin-top: 2rem; padding: 2rem; color: #334155; border: 1px solid var(--border-color); border-radius: 18px; background: #fff; font-size: 0.95rem; line-height: 1.9; box-shadow: var(--shadow-sm); }
.admin-announcements-layout { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 1.25rem; align-items: start; }
.admin-announcement-list { display: grid; gap: 0.75rem; }
.admin-announcement-list article { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; padding: 1rem; border: 1px solid var(--border-color); border-radius: 14px; background: #f8fafc; }
.admin-announcement-list small { margin-left: 0.5rem; color: #64748b; font-size: 0.66rem; }
.admin-announcement-list h4 { margin: 0.65rem 0 0.2rem; font-size: 0.95rem; }
.admin-announcement-list p { margin: 0; color: #64748b; font-size: 0.72rem; }
.admin-announcement-actions { display: flex; flex-direction: column; gap: 0.45rem; }
.announcement-active { color: #166534; background: #dcfce7; }
.announcement-inactive { color: #64748b; background: #e2e8f0; }

@media (max-width: 900px) {
    .wallet-actions-grid { grid-template-columns: 1fr; }
    .network-tree-scroll { padding: 1.2rem; }
    .announcement-grid { grid-template-columns: 1fr 1fr; }
    .admin-announcements-layout { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .wallet-balance-card { padding: 1.4rem; }
    .wallet-balance-card > i { width: 56px; height: 56px; font-size: 1.4rem; }
    .network-heading { align-items: flex-start; flex-direction: column; }
    .network-search > div { grid-template-columns: auto minmax(0, 1fr); overflow: visible; }
    .network-search .btn { grid-column: span 2; }
    .network-search .btn-outline-secondary { grid-column: span 2; }
    .network-tree > .network-tree-item { min-width: 720px; }
    .news-card { border-radius: 18px; }
    .news-card-actions { flex-direction: column; }
    .announcement-grid { grid-template-columns: 1fr; }
    .admin-announcement-list article { grid-template-columns: 1fr; }
    .admin-announcement-actions { flex-direction: row; }
}
