@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&display=swap');


/* =========================================
   Unified Layout & Design System
   Shared foundation for all views (landing + dashboard)
   ========================================= */

:root {
    /* =========================================
       Layout Variables (Theme Independent)
       ========================================= */

    /* UI Elements */
    --nav-height: 70px;
    --container-width: 1300px;

    /* Grid */
    --gutter-x: 30px;
    --gutter-y: 0px;

    /* Radius */
    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-pill: 9999px;

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

    /* Font Sizes */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 0.95rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 2rem;
    --text-4xl: 2.5rem;
    --text-5xl: 3rem;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
}

/* =========================================
   CSS Reset & Base Styles
   ========================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img,
video {
    max-width: 100%;
    height: auto;
    display: block;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-sans);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    min-height: 100vh;
    font-size: var(--text-base);

    font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1;
    text-rendering: optimizeLegibility;
}

/* =========================================
   Typography System
   ========================================= */

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.03em;
    line-height: 1.15;
}

h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    background: var(--gradient-text-brand);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: var(--space-5);
    font-weight: 700;
    line-height: 1.1;
}

h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: var(--space-5);
    font-weight: 700;
    line-height: 1.2;
}

h3 {
    font-size: var(--text-2xl);
    margin-bottom: var(--space-4);
    font-weight: 600;
}

h4 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-3);
    font-weight: 600;
}

h5 {
    font-size: var(--text-lg);
    margin-bottom: var(--space-2);
    font-weight: 500;
}

h6 {
    font-size: var(--text-base);
    margin-bottom: var(--space-2);
    font-weight: 500;
}

p {
    color: var(--text-secondary);
    font-size: var(--text-base);
    margin-top: 0;
    margin-bottom: var(--space-6);
    line-height: 1.65;
    font-weight: 400;
}

.lead {
    font-size: var(--text-lg);
    font-weight: 500;
}

span,
td,
th,
li,
a,
label,
input,
button,
textarea,
select {
    font-size: var(--text-base);
}

h1 span,
h2 span,
h3 span,
h4 span,
h5 span,
h6 span {
    font-size: inherit;
    font-weight: inherit;
}

a {
    color: inherit;
    text-decoration: none;
    transition: all 0.2s ease;
}

a:hover {
    text-decoration: none;
}

small,
.small {
    font-size: var(--text-sm);
}

/* =========================================
   Layout System
   ========================================= */

/* Grid System */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-top: calc(-1 * var(--gutter-y));
    margin-right: calc(-0.5 * var(--gutter-x));
    margin-left: calc(-0.5 * var(--gutter-x));
}

[class^="col-"] {
    position: relative;
    width: 100%;
    padding-right: calc(var(--gutter-x) * 0.5);
    padding-left: calc(var(--gutter-x) * 0.5);
    margin-top: var(--gutter-y);
}

/* Mobile First Columns */
.col-12 {
    flex: 0 0 100%;
    max-width: 100%;
}

.col-6 {
    flex: 0 0 50%;
    max-width: 50%;
}

/* Tablet & Desktop */
@media (min-width: 768px) {
    .col-md-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }

    .col-md-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }

    .col-md-5 {
        flex: 0 0 41.666667%;
        max-width: 41.666667%;
    }

    .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .col-md-7 {
        flex: 0 0 58.333333%;
        max-width: 58.333333%;
    }

    .col-md-8 {
        flex: 0 0 66.666667%;
        max-width: 66.666667%;
    }

    .col-md-10 {
        flex: 0 0 83.333333%;
        max-width: 83.333333%;
    }

    .col-md-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

@media (min-width: 992px) {
    .col-lg-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }

    .col-lg-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }

    .col-lg-5 {
        flex: 0 0 41.666667%;
        max-width: 41.666667%;
    }

    .col-lg-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .col-lg-7 {
        flex: 0 0 58.333333%;
        max-width: 58.333333%;
    }

    .col-lg-8 {
        flex: 0 0 66.666667%;
        max-width: 66.666667%;
    }

    .col-lg-10 {
        flex: 0 0 83.333333%;
        max-width: 83.333333%;
    }

    .col-lg-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Container */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin-right: auto;
    margin-left: auto;
    padding-right: 20px;
    padding-left: 20px;
}

.container-fluid {
    width: 100%;
    padding-right: 20px;
    padding-left: 20px;
}

/* =========================================
   Utility Classes
   ========================================= */

/* Spacing */
.mb-3 {
    margin-bottom: 1rem;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.mb-5 {
    margin-bottom: 3rem;
}

.mt-4 {
    margin-top: 1.5rem;
}

.py-5 {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

/* Public Page Wrapper */
.public-page-wrapper {
    padding-top: calc(var(--nav-height) + var(--space-16));
    padding-bottom: var(--space-20);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Flexbox */
.d-flex {
    display: flex;
}

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

.justify-content-between {
    justify-content: space-between;
}

.justify-content-center {
    justify-content: center;
}

.justify-content-end {
    justify-content: flex-end;
}

/* Gutters */
.g-0,
.gx-0 {
    --gutter-x: 0px;
}

.g-0,
.gy-0 {
    --gutter-y: 0px;
}

.g-1,
.gx-1 {
    --gutter-x: var(--space-1);
}

.g-1,
.gy-1 {
    --gutter-y: var(--space-1);
}

.g-2,
.gx-2 {
    --gutter-x: var(--space-2);
}

.g-2,
.gy-2 {
    --gutter-y: var(--space-2);
}

.g-3,
.gx-3 {
    --gutter-x: var(--space-4);
}

.g-3,
.gy-3 {
    --gutter-y: var(--space-4);
}

.g-4,
.gx-4 {
    --gutter-x: var(--space-6);
}

.g-4,
.gy-4 {
    --gutter-y: var(--space-6);
}

.g-5,
.gx-5 {
    --gutter-x: var(--space-12);
}

.g-5,
.gy-5 {
    --gutter-y: var(--space-12);
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 1rem;
}

.gap-4 {
    gap: 1.5rem;
}

.gap-5 {
    gap: 2rem;
}

.gap-6 {
    gap: 3rem;
}

.gap-5 {
    gap: 2rem;
}

.gap-6 {
    gap: 3rem;
}

/* Dimensions */
.w-100 {
    width: 100% !important;
}

.h-100 {
    height: 100% !important;
}

/* Z-index */
.z-1 {
    z-index: 1;
}

.z-2 {
    z-index: 2;
}

.z-5 {
    z-index: 5;
}

.z-10 {
    z-index: 10;
}

/* Sticky Utilities */
.sticky-top {
    position: sticky;
    top: 0;
    z-index: 100;
}

.sticky-bottom {
    position: sticky;
    bottom: 0;
    z-index: 100;
}

.sticky-dashboard-actions {
    position: sticky;
    top: calc(var(--nav-height) + 1rem);
    z-index: 90;
}

/* Misc */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.text-decoration-none {
    text-decoration: none !important;
}

/* Text Colors */
.text-primary {
    color: var(--text-primary) !important;
}

.text-secondary {
    color: var(--text-secondary) !important;
}

.text-tertiary {
    color: var(--text-tertiary) !important;
}

.text-success {
    color: var(--success) !important;
}

.text-warning {
    color: var(--warning) !important;
}

.text-danger {
    color: var(--danger) !important;
}

.text-white {
    color: var(--color-white) !important;
}

/* Surface & Background Utilities */
.bg-soft-primary {
    background-color: var(--bg-soft-primary) !important;
}

.bg-soft-success {
    background-color: var(--bg-soft-success) !important;
}

.bg-soft-warning {
    background-color: var(--bg-soft-warning) !important;
}

.bg-soft-danger {
    background-color: var(--bg-soft-danger) !important;
}

.bg-soft-info {
    background-color: var(--color-info-pastel-bg) !important;
}

.bg-surface-2 {
    background-color: var(--bg-surface-2) !important;
}

.bg-surface-2-hover {
    transition: all 0.2s ease;
}

.bg-surface-2-hover:hover {
    background-color: var(--bg-card-hover) !important;
    transform: translateY(-2px);
}

/* Icon Utilities */
.icon-circle {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-base);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

/* Rounded Utilities */
.rounded-xl {
    border-radius: var(--radius-lg) !important;
}

.rounded-full {
    border-radius: 50% !important;
}

/* Border Utilities */
.border-subtle {
    border-color: var(--border-subtle) !important;
}

/* Transition Utilities */
.transition-all {
    transition: all 0.3s ease !important;
}

/* Spacing Utilities */
.ls-wide {
    letter-spacing: 0.05em;
}

/* =========================================
   Button Components
   ========================================= */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-pill);
    font-weight: 500;
    font-size: var(--text-sm);
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    cursor: pointer;
    letter-spacing: -0.01em;
    min-height: 44px;
}

.btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Summary Step 3 Refinements */
.stat-card.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md) !important;
    border-color: var(--border-medium) !important;
}

.thumb-item {
    border-radius: var(--radius-md) !important;
    overflow: hidden;
}

.thumb-item img {
    border-radius: inherit;
    transition: transform 0.4s ease;
}

.thumb-item:hover img {
    transform: scale(1.1);
}

/* Atlas Lightbox Overlay */
.atlas-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.atlas-lightbox.show {
    opacity: 1;
}

.atlas-lightbox .lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.atlas-lightbox.show .lightbox-content {
    transform: scale(1);
}

.atlas-lightbox .lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.atlas-lightbox .lightbox-close {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    z-index: 10000;
    transition: all 0.2s ease;
}

.atlas-lightbox .lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.hero-image-wrapper img {
    transition: opacity 0.3s ease;
}

/* Step 3 Summary Refinements */
.hero-image-wrapper {
    position: relative;
    background: var(--bg-surface-3);
    min-height: 200px;
}

.thumbnail-strip::-webkit-scrollbar {
    height: 4px;
}

.thumbnail-strip::-webkit-scrollbar-thumb {
    background: var(--border-subtle);
    border-radius: 10px;
}

.thumb-item img {
    opacity: 0.8;
    transition: all 0.2s ease;
}

.thumb-item:hover img {
    opacity: 1;
    transform: scale(1.1);
}

.spec-tile {
    transition: all 0.2s ease;
}

.spec-tile:hover {
    border-color: var(--primary) !important;
    background: rgba(var(--primary-rgb), 0.05) !important;
    transform: translateY(-2px);
}

.badge-primary-subtle {
    background: rgba(var(--primary-rgb), 0.1);
}

.alert-glass {
    background: rgba(var(--bg-surface-2-rgb), 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(var(--primary-rgb), 0.1) !important;
}

.alert-icon-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(var(--success-rgb), 0.2);
}

.line-clamp-4 {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Image Sortable Grid */
.image-sortable-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1.25rem;
    margin-top: 1.5rem;
}

.image-sortable-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 1rem;
    overflow: hidden;
    background: var(--bg-surface-2);
    border: 1px solid var(--border-subtle);
    cursor: grab;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
}

.image-sortable-item:active {
    cursor: grabbing;
}

.image-sortable-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.image-sortable-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.image-sortable-item:hover img {
    transform: scale(1.05);
}

.image-sortable-item.uploading {
    cursor: wait;
    opacity: 0.7;
}

.image-sortable-item.uploading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid rgba(var(--primary-rgb), 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.image-sortable-remove {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(var(--bg-card-base-rgb), 0.8);
    backdrop-filter: blur(8px);
    border: 1px solid var(--border-subtle);
    color: var(--text-on-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    cursor: pointer;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.2s ease;
    z-index: 10;
}

.image-sortable-item:hover .image-sortable-remove {
    opacity: 1;
    transform: scale(1);
}

.image-sortable-remove:hover {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

.sortable-ghost {
    opacity: 0.3;
    background: var(--primary) !important;
}

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

.btn-sm {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-xs);
    min-height: 36px;
}

.btn-md {
    padding: var(--space-3) var(--space-6);
    font-size: var(--text-sm);
    min-height: 44px;
}

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-base);
    min-height: 52px;
}

.btn-primary {
    background: rgba(var(--primary-rgb), 0.15);
    color: var(--primary-btn-text, var(--primary));
    border: 1px solid transparent;
}

.btn-primary:hover {
    filter: brightness(0.92);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-glass {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    border: 1px solid var(--border-medium);
    backdrop-filter: blur(10px);
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-subtle);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-success {
    background: var(--color-success-pastel-bg);
    color: var(--color-success-pastel-text);
    border: 1px solid transparent;
}

.btn-success:hover {
    filter: brightness(0.92);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-warning {
    background: var(--color-warning-pastel-bg);
    color: var(--color-warning-pastel-text);
    border: 1px solid transparent;
}

.btn-warning:hover {
    filter: brightness(0.92);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-danger {
    background: var(--color-danger-pastel-bg);
    color: var(--color-danger-pastel-text);
    border: 1px solid transparent;
}

.btn-danger:hover {
    filter: brightness(0.92);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-with-icon {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
}

.btn-with-icon span {
    font-size: inherit;
}

.btn-with-icon i {
    font-size: 1.1em;
}

/* =========================================
   Form Elements
   ========================================= */

.form-label {
    display: block;
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-3);
    letter-spacing: -0.01em;
    line-height: 1.4;
    font-weight: 500;
}

.form-label.required::after {
    content: '*';
    color: var(--text-tertiary);
    /* Muted required asterisk */
    margin-left: 4px;
}

.input-glass {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    background: var(--bg-surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    /* More rounded */
    color: var(--text-primary);
    font-size: var(--text-base);
    font-weight: 400;
    transition: all 0.2s ease;
    min-height: 48px;
    line-height: 1.5;
}

.summary-description-text {
    line-height: 1.8;
}

.summary-stat-card {
    background: var(--bg-surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    display: flex;
    align-items: center;
    gap: var(--space-4);
    transition: all var(--transition-base);
    height: 100%;
}

.summary-stat-card:hover {
    border-color: var(--border-medium);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.summary-stat-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-subtle);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.summary-stat-info {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.summary-stat-label {
    font-size: 0.7rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.summary-stat-value {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
}

.input-glass:hover {
    border-color: var(--border-medium);
    background: var(--bg-card-hover);
}

.input-glass:focus {
    outline: none;
    border-color: var(--border-subtle);
    background: var(--bg-card-hover);
    box-shadow: 0 0 0 2px var(--focus-ring);
}

.input-glass::placeholder {
    color: var(--text-tertiary);
}

textarea.input-glass {
    min-height: 120px;
    resize: vertical;
}

select.input-glass {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--space-4) center;
    padding-right: var(--space-10);
}

/* =========================================
   Glass Panel Component
   ========================================= */

.glass-panel {
    background: var(--bg-card-base);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    transition: all 0.3s ease;
    box-shadow: var(--glass-shadow);
}

.glass-panel:hover {
    transform: translateY(-4px);
    border-color: var(--glass-border-light);
    box-shadow: var(--glass-shadow-hover);
}


/* =========================================
   Liquid Glass — Apple-inspired Material
   A three-layer optical glass material:
   base + directional highlight + specular sheen
   ========================================= */

/* Base material — apply to any element */
.liqglass {
    position: relative;
    overflow: hidden;
    background: var(--liqglass-bg);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border: 1px solid var(--liqglass-border);
    box-shadow:
        0 8px 32px var(--liqglass-shadow),
        inset 0 1px 0 var(--liqglass-rim);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

/* Layer 1 — directional highlight (upper-left light source) */
.liqglass::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--liqglass-gradient);
    border-radius: inherit;
    pointer-events: none;
    z-index: 0;
}

/* Layer 2 — specular top sheen */
.liqglass::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 45%;
    background: linear-gradient(to bottom, var(--liqglass-sheen), transparent);
    border-radius: inherit;
    pointer-events: none;
    z-index: 0;
}

/* Lift all direct children above pseudo-element layers */
.liqglass>* {
    position: relative;
    z-index: 1;
}

/* ---- Floating Navbar variant ---- */
.liqglass-navbar {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: calc(100% - 48px);
    max-width: 960px;
    display: flex;
    align-items: center;
    gap: var(--space-6);
    padding: 10px 20px;
    border-radius: var(--radius-xl);
}

.liqglass-navbar-brand {
    font-size: var(--text-base);
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.02em;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.liqglass-navbar-links {
    display: flex;
    align-items: center;
    gap: var(--space-1);
    flex: 1;
    list-style: none;
    margin: 0;
    padding: 0;
}

.liqglass-navbar-links a {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: 6px 14px;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    transition: background 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}

.liqglass-navbar-links a:hover {
    background: var(--liqglass-item-hover);
    color: var(--text-primary);
}

.liqglass-navbar-links a.active {
    background: var(--liqglass-item-active);
    color: var(--text-primary);
    font-weight: 600;
}

.liqglass-navbar-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-shrink: 0;
}

/* ---- Pill variant (for smaller floating elements, e.g. tab bars) ---- */
.liqglass-pill {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: 8px 20px;
    border-radius: var(--radius-pill);
}


/* =========================================
   Card Component
   ========================================= */

.card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    transition: all 0.3s ease;
}

.card:hover {
    border-color: var(--border-medium);
    transform: translateY(-4px);
    box-shadow: var(--glass-shadow-hover);
    background: var(--bg-card-hover);
}

.card-title {
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-3);
}

.card-body {
    color: var(--text-secondary);
}

/* =========================================
   Badge Components
   ========================================= */

/* Base Badge */
.badge {
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: var(--text-xs);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    display: inline-block;
    border: none;
    transition: all 0.2s ease;
}

/* Primary Badge (Purple/Violet) */
.badge-primary,
.badge-primary-soft {
    background: var(--color-primary-pastel-bg);
    color: var(--color-primary-pastel-text);
}

.badge-primary:hover,
.badge-primary-soft:hover {
    filter: brightness(0.95);
    transform: translateY(-1px);
}

/* Success Badge (Green) */
.badge-success {
    background: var(--color-success-pastel-bg);
    color: var(--color-success-pastel-text);
}

.badge-success:hover {
    filter: brightness(0.95);
    transform: translateY(-1px);
}

/* Warning Badge (Orange) */
.badge-warning {
    background: var(--color-warning-pastel-bg);
    color: var(--color-warning-pastel-text);
}

.badge-warning:hover {
    filter: brightness(0.95);
    transform: translateY(-1px);
}

/* Danger Badge (Red) */
.badge-danger {
    background: var(--color-danger-pastel-bg);
    color: var(--color-danger-pastel-text);
}

.badge-danger:hover {
    filter: brightness(0.95);
    transform: translateY(-1px);
}

/* Info Badge (Blue) */
.badge-info {
    background: var(--color-info-pastel-bg);
    color: var(--color-info-pastel-text);
}

.badge-info:hover {
    filter: brightness(0.95);
    transform: translateY(-1px);
}

/* Neutral/Secondary Badge (Gray) */
.badge-neutral,
.badge-secondary {
    background: var(--color-neutral-pastel-bg);
    color: var(--color-neutral-pastel-text);
}

.badge-neutral:hover,
.badge-secondary:hover {
    filter: brightness(0.95);
    transform: translateY(-1px);
}

/* Badge Sizes */
.badge-sm {
    padding: var(--space-1) var(--space-3);
    font-size: 0.65rem;
}

.badge-lg {
    padding: var(--space-3) var(--space-5);
    font-size: var(--text-sm);
}

/* Badge with dot indicator */
.badge-dot::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    margin-right: var(--space-2);
    background: currentColor;
}

/* =========================================
   ICON BADGE
   ========================================= */

.icon-badge {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-lg);
    flex-shrink: 0;
}

.icon-badge-sm {
    width: 32px;
    height: 32px;
    font-size: var(--text-sm);
}

.icon-badge-lg {
    width: 56px;
    height: 56px;
    font-size: var(--text-2xl);
}

.icon-badge-primary {
    background: var(--color-primary-pastel-bg);
    color: var(--color-primary-pastel-text);
}

.icon-badge-success {
    background: var(--color-success-pastel-bg);
    color: var(--color-success-pastel-text);
}

.icon-badge-warning {
    background: var(--color-warning-pastel-bg);
    color: var(--color-warning-pastel-text);
}

.icon-badge-danger {
    background: var(--color-danger-pastel-bg);
    color: var(--color-danger-pastel-text);
}

.icon-badge-info {
    background: var(--color-info-pastel-bg);
    color: var(--color-info-pastel-text);
}

.icon-badge-neutral {
    background: var(--bg-surface-2);
    color: var(--text-secondary);
}

/* =========================================
   EXTENDED FORM COMPONENTS
   ========================================= */

/* Checkbox Custom */
.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    cursor: pointer;
}

.checkbox-custom {
    position: relative;
    width: 20px;
    height: 20px;
}

.checkbox-custom input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkbox-custom .checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background: var(--bg-surface-2);
    border: 1.5px solid var(--border-medium);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.checkbox-custom input[type="checkbox"]:checked~.checkmark {
    background: var(--primary);
    border-color: var(--primary);
}

.checkbox-custom .checkmark::after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid var(--btn-text-dark);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-custom input[type="checkbox"]:checked~.checkmark::after {
    display: block;
}

/* Radio Custom */
.radio-wrapper {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    cursor: pointer;
}

.radio-custom {
    position: relative;
    width: 20px;
    height: 20px;
}

.radio-custom input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.radio-custom .radiomark {
    position: absolute;
    top: 0;
    left: 0;
    height: 20px;
    width: 20px;
    background: var(--bg-surface-2);
    border: 1.5px solid var(--border-medium);
    border-radius: 50%;
    transition: all 0.2s ease;
}

.radio-custom input[type="radio"]:checked~.radiomark {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary);
}

.radio-custom .radiomark::after {
    content: "";
    position: absolute;
    display: none;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
}

.radio-custom input[type="radio"]:checked~.radiomark::after {
    display: block;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-secondary-element);
    border: 1.5px solid var(--border-medium);
    transition: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 2.5px;
    background-color: var(--text-secondary);
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked+.toggle-slider {
    background-color: var(--primary);
    border-color: var(--primary);
}

.toggle-switch input:checked+.toggle-slider:before {
    transform: translateX(24px);
    background-color: var(--btn-text-dark);
}

/* Input with Icon */
.input-icon-wrapper {
    position: relative;
    width: 100%;
}

.input-icon-wrapper .input-glass {
    padding-left: var(--space-10);
}

.input-icon-wrapper .input-icon {
    position: absolute;
    left: var(--space-4);
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-tertiary);
    font-size: var(--text-base);
}

.input-icon-wrapper .textarea-icon {
    top: var(--space-4);
    transform: none;
}

.input-icon-wrapper.icon-right .input-glass {
    padding-left: var(--space-4);
    padding-right: var(--space-10);
}

.input-icon-wrapper.icon-right .input-icon {
    left: auto;
    right: var(--space-4);
}

/* =========================================
   CARD COMPONENTS
   ========================================= */

/* Stat Card */
.stat-card {
    background: var(--bg-card-base);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    transition: all 0.2s ease;
}

.stat-card:hover {
    border-color: var(--border-medium);
    transform: translateY(-2px);
}

.stat-card-label {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
    text-transform: capitalize;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.stat-card-value {
    font-size: var(--text-2xl);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.stat-card-change {
    font-size: var(--text-sm);
    font-weight: 500;
}

.stat-card-change.positive {
    color: #6db88a;
}

.stat-card-change.negative {
    color: #c47474;
}

/* Info Card */
.info-card {
    background: var(--bg-card-base);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
}

.info-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--border-subtle);
}

.info-card-title {
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}

.info-card-body {
    color: var(--text-secondary);
    line-height: 1.6;
}

.info-card-footer {
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border-subtle);
}

/* =========================================
   ALERT COMPONENTS
   ========================================= */

.alert {
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-md);
    border: 1.5px solid;
    margin-bottom: var(--space-4);
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
}

.alert-icon {
    flex-shrink: 0;
    font-size: var(--text-lg);
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 600;
    margin-bottom: var(--space-1);
    font-size: var(--text-base);
}

.alert-message {
    font-size: var(--text-sm);
    line-height: 1.5;
}

.alert-info {
    background: var(--color-info-pastel-bg);
    border: none;
    color: var(--color-info-pastel-text);
}

.alert-success {
    background: var(--color-success-pastel-bg);
    border: none;
    color: var(--color-success-pastel-text);
}

.alert-warning {
    background: var(--color-warning-pastel-bg);
    border: none;
    color: var(--color-warning-pastel-text);
}

.alert-danger {
    background: var(--color-danger-pastel-bg);
    border: none;
    color: var(--color-danger-pastel-text);
}

/* Dismissible Alert */
.alert-dismissible {
    position: relative;
    padding-right: var(--space-10);
}

.alert-close {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    background: none;
    border: none;
    color: currentColor;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    font-size: var(--text-lg);
}

.alert-close:hover {
    opacity: 1;
}

/* =========================================
   LIST COMPONENTS
   ========================================= */

.list-group {
    display: flex;
    flex-direction: column;
    gap: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.list-group-item {
    padding: var(--space-4) var(--space-5);
    background: var(--bg-surface-2);
    border-bottom: 1px solid var(--border-subtle);
    transition: all 0.2s ease;
}

.list-group-item:last-child {
    border-bottom: none;
}

.list-group-item:hover {
    background: rgba(255, 255, 255, 0.08);
}

.list-group-item.active {
    background: var(--bg-soft-primary);
    border-color: var(--border-medium);
}

/* List with Icons */
.list-icon-item {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.list-icon-item i {
    color: var(--text-secondary);
    font-size: var(--text-lg);
    width: 24px;
    text-align: center;
}

/* =========================================
   PROGRESS COMPONENTS
   ========================================= */

.progress {
    height: 8px;
    background: var(--bg-surface-2);
    border-radius: var(--radius-pill);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary);
    border-radius: var(--radius-pill);
    transition: width 0.3s ease;
}

.progress-bar.success {
    background: #4ade80;
}

.progress-bar.warning {
    background: #fb923c;
}

.progress-bar.danger {
    background: #f87171;
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner-sm {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

.spinner-lg {
    width: 60px;
    height: 60px;
    border-width: 4px;
}

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

/* Skeleton Loader */
.skeleton {
    background: linear-gradient(90deg, var(--bg-surface) 25%, var(--bg-surface-2) 50%, var(--bg-surface) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: var(--radius-md);
}

.skeleton-text {
    height: 16px;
    margin-bottom: var(--space-2);
}

.skeleton-title {
    height: 24px;
    width: 60%;
    margin-bottom: var(--space-3);
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* =========================================
   UTILITY COMPONENTS
   ========================================= */

/* Divider */
.divider {
    height: 1px;
    background: var(--border-subtle);
    margin: var(--space-6) 0;
}

.divider-vertical {
    width: 1px;
    height: 100%;
    background: var(--border-subtle);
    margin: 0 var(--space-4);
}

/* Dropdown Menu */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: var(--space-2);
    background: var(--bg-floating);
    backdrop-filter: blur(30px);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    min-width: 200px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.dropdown.active .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    padding: var(--space-3) var(--space-4);
    color: var(--text-secondary);
    text-decoration: none;
    display: block;
    transition: all 0.2s ease;
    font-size: var(--text-sm);
}

.dropdown-item:hover {
    background: var(--bg-secondary-hover);
    color: var(--text-primary);
}

.dropdown-divider {
    height: 1px;
    background: var(--border-subtle);
    margin: var(--space-2) 0;
}

/* Avatar */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-soft-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--text-primary);
    font-size: var(--text-sm);
}

.avatar-sm {
    width: 32px;
    height: 32px;
    font-size: var(--text-xs);
    object-fit: cover;
}

.avatar-lg {
    width: 56px;
    height: 56px;
    font-size: var(--text-lg);
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Tooltip */
.tooltip-wrapper {
    position: relative;
    display: inline-block;
}

.tooltip-text {
    visibility: hidden;
    opacity: 0;
    background-color: var(--bg-floating);
    color: var(--text-primary);
    text-align: center;
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
    position: absolute;
    z-index: 1000;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: var(--text-sm);
    border: 1px solid var(--border-medium);
    transition: all 0.2s ease;
}

.tooltip-wrapper:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* =========================================
   DASHBOARD SPECIFIC COMPONENTS
   ========================================= */

/* Contextual Header */
.dashboard-greeting {
    margin-bottom: var(--space-8);
}


.dashboard-greeting h2 {
    font-size: clamp(1.5rem, 3vw, 1.75rem);
    font-weight: 600;
    margin-bottom: var(--space-2);
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.dashboard-greeting p {
    font-size: var(--text-sm);
    color: var(--text-tertiary);
    margin-bottom: 0;
    font-weight: 400;
}

/* Public Page Header Component */
.public-page-header {
    margin-bottom: var(--space-8);
}

.public-page-header .info-title {
    display: inline-block;
    margin-bottom: var(--space-3) !important;
}

/* Page Header Component */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-4);
    margin-bottom: var(--space-8);
}

.page-header .dashboard-greeting {
    margin-bottom: 0;
    min-width: 0;
    flex: 1;
}

.page-header .dashboard-greeting h2 {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.page-header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-shrink: 0;
}

@media (max-width: 575px) {
    .page-header {
        gap: var(--space-3);
    }

    .page-header-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* ============================================
   TOOL NAV
   Barra dinámica de herramientas para acciones,
   filtros, badges y búsqueda en el dashboard.
   ============================================ */

.tool-nav {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-4);
    background: var(--glass-bg);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-6);
    min-height: 48px;
}

.tool-nav-left {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex: 1;
    min-width: 0;
    flex-wrap: wrap;
}

.tool-nav-center {
    flex: 2;
    min-width: 0;
}

.tool-nav-right {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-shrink: 0;
    flex-wrap: wrap;
}

.tool-nav-toggle {
    display: none;
    align-items: center;
    gap: var(--space-1);
    background: none;
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-sm);
    font-weight: 500;
    transition: var(--transition-fast);
    flex-shrink: 0;
}

.tool-nav-toggle:hover {
    background: var(--bg-surface-3);
    color: var(--text-primary);
}

.tool-nav-toggle.open {
    color: var(--primary);
    border-color: rgba(var(--primary-rgb), 0.3);
    background: rgba(var(--primary-rgb), 0.06);
}

@media (max-width: 575px) {
    .tool-nav[data-collapsible] {
        flex-wrap: wrap;
        gap: var(--space-2);
        padding: var(--space-2) var(--space-3);
    }

    .tool-nav[data-collapsible] .tool-nav-left {
        flex: 1;
    }

    .tool-nav[data-collapsible] .tool-nav-toggle {
        display: flex;
    }

    .tool-nav[data-collapsible] .tool-nav-right {
        display: none;
        width: 100%;
        justify-content: flex-end;
        padding-top: var(--space-2);
        border-top: 1px solid var(--border-subtle);
    }

    .tool-nav[data-collapsible] .tool-nav-right.open {
        display: flex;
    }
}

/* Action Cards Grid */
.action-cards-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-4);
    margin-bottom: var(--space-10);
}

@media (min-width: 640px) {
    .action-cards-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-5);
    }
}

@media (min-width: 768px) {
    .action-cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Action Card */
.action-card {
    background: var(--bg-card-base);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-height: 160px;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    position: relative;
    /* For badge positioning */
}

.action-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-medium);
    box-shadow: var(--shadow-md);
    background: var(--bg-card-hover-strong);
}

.action-card:active {
    transform: translateY(0);
}

/* Action Card States - Removed colored variants for visual consistency */

/* Action Card Icon */
.action-card-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--bg-surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-3);
    font-size: 1.25rem;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.action-card:hover .action-card-icon {
    background: var(--bg-secondary-hover);
    transform: scale(1.05);
}

/* Semantic icon colors maintained through icon classes only */

/* Action Card Text */
.action-card-title {
    font-size: var(--text-base);
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
    line-height: 1.3;
    letter-spacing: -0.01em;
}

.action-card-subtitle {
    font-size: var(--text-sm);
    color: var(--text-tertiary);
    margin: 0;
    line-height: 1.4;
    font-weight: 400;
}

.action-card-badge {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    background: var(--color-primary-pastel-bg);
    color: var(--color-primary-pastel-text);
    font-size: var(--text-xs);
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-lg);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}


.section-title,
.priorities-header {
    font-size: var(--text-base);
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-4);
    letter-spacing: -0.01em;
}

.priorities-grid {
    display: flex;
    gap: var(--space-4);
    overflow-x: auto;
    padding-bottom: var(--space-4);
    /* Space for shadow/scroll */
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    /* Hide scrollbar for app-like feel */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.priorities-grid::-webkit-scrollbar {
    display: none;
}

/* Priority Notification Item */
.priority-item {
    background: var(--bg-surface-2);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    display: flex;
    align-items: center;
    gap: var(--space-4);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;

    /* Horizontal Layout Specs */
    min-width: 320px;
    /* Desktop default */
    flex: 0 0 auto;
    /* Prevent shrinking */
    scroll-snap-align: start;
}

@media (min-width: 992px) {
    .priority-item {
        min-width: 0;
        /* Important: Reset min-width constraint */
        width: 100%;
        /* Force fill container */
        flex: 1;
        scroll-snap-align: none;
    }
}

@media (max-width: 768px) {
    .priority-item {
        min-width: 88vw;
        /* peeking effect on mobile */
    }
}

.priority-item:hover {
    /* override background in specific modifiers, but keep base styles */
    border-color: var(--border-medium);
    box-shadow: var(--shadow-md);
}

.priority-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-xl);
    flex-shrink: 0;
}

/* Priority Item Backgrounds & Borders */
.priority-item.priority-danger {
    background: #ffe4e6;
    /* Rose 100 */
    border-color: #ffe4e6;
    /* Rose 200 */
    color: #881337;
    /* Rose 900 */
}

.priority-item.priority-danger:hover {
    background: #fecdd3;
    /* Rose 200 */
    border-color: #fecdd3;
}

.priority-item.priority-warning {
    background: #fef9c3;
    /* Yellow 100 */
    border-color: #fef9c3;
    color: #713f12;
    /* Yellow 900 */
}

.priority-item.priority-warning:hover {
    background: #fde047;
    /* Yellow 200 - adjusted for pastel feel */
    border-color: #fde047;
}

.priority-item.priority-info {
    background: #e0f2fe;
    /* Sky 100 */
    border-color: #e0f2fe;
    color: #0c4a6e;
    /* Sky 900 */
}

.priority-item.priority-info:hover {
    background: #bae6fd;
    /* Sky 200 */
    border-color: #bae6fd;
}

.priority-item.priority-success {
    background: #dcfce7;
    /* Green 100 */
    border-color: #dcfce7;
    color: #14532d;
    /* Green 900 */
}

.priority-item.priority-success:hover {
    background: #bbf7d0;
    /* Green 200 */
    border-color: #bbf7d0;
}

/* Icon Colors */
.priority-danger .priority-icon {
    background: rgba(136, 19, 55, 0.1);
    color: #881337;
}

.priority-warning .priority-icon {
    background: rgba(113, 63, 18, 0.1);
    color: #713f12;
}

.priority-info .priority-icon {
    background: rgba(12, 74, 110, 0.1);
    color: #0c4a6e;
}

.priority-success .priority-icon {
    background: rgba(20, 83, 45, 0.1);
    color: #14532d;
}

.priority-content {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-width: 0;
    /* Important for flex truncation */
}

.priority-text {
    flex: 1;
    min-width: 0;
    margin-right: var(--space-2);
}

.priority-text h4 {
    margin: 0;
    font-size: var(--text-sm);
    font-weight: 600;
    color: currentColor;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.priority-text span {
    font-size: var(--text-xs);
    color: currentColor;
    opacity: 0.85;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.priority-action {
    color: currentColor;
    opacity: 0.7;
    font-size: var(--text-sm);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.priority-item:hover .priority-action {
    color: currentColor;
    opacity: 1;
    transform: translateX(4px);
}

/* AI Input Bar */
.ai-input-container {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1.5px solid var(--border-medium);
    border-radius: var(--radius-pill);
    padding: var(--space-4) var(--space-5);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-10);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.ai-input-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--bg-surface-2), transparent);
    transition: left 0.5s ease;
}

.ai-input-container:hover::before {
    left: 100%;
}

.ai-input-container:focus-within {
    border-color: var(--text-primary);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.05);
}

.ai-input-container i {
    font-size: var(--text-xl);
    color: var(--text-secondary);
    flex-shrink: 0;
}

.ai-input-container .fa-sparkles {
    color: var(--text-primary);
}

.ai-input-container input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: var(--text-base);
    font-weight: 400;
}

.ai-input-container input::placeholder {
    color: var(--text-tertiary);
}

/* Bottom Navigation - Floating Style */
.bottom-nav {
    position: fixed;
    bottom: var(--space-4);
    left: 50%;
    transform: translateX(-50%);
    max-width: 500px;
    width: calc(100% - var(--space-8));
    background: var(--liqglass-bg);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--liqglass-border);
    border-radius: var(--radius-xl);
    padding: var(--space-3) var(--space-4);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    box-shadow:
        0 8px 32px var(--liqglass-shadow),
        inset 0 1px 0 var(--liqglass-rim);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    min-width: 64px;
    cursor: pointer;
}

.bottom-nav-item:hover {
    background: var(--bg-secondary-hover);
    color: var(--text-primary);
}

.bottom-nav-item.active {
    color: var(--text-primary);
    background: var(--bg-secondary-hover);
}

.bottom-nav-item i {
    font-size: var(--text-lg);
}

.bottom-nav-item span {
    font-size: var(--text-xs);
    font-weight: 500;
    letter-spacing: 0.02em;
}

/* Custom Navbar Link (Top Nav) */
/* Select Input */
.input-select {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    background: var(--bg-surface-2);
    border: 1.5px solid var(--border-medium);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: var(--text-base);
    transition: all 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23a1a1aa' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--space-4) center;
    background-size: 12px;
    min-height: 48px;
    line-height: 1.5;
    cursor: pointer;
}

.input-select:focus {
    outline: none;
    border-color: var(--border-subtle);
    background: var(--bg-secondary-element);
    box-shadow: 0 0 0 2px var(--focus-ring);
}

.input-select option {
    background-color: var(--bg-floating);
    color: var(--text-primary);
}

/* =========================================
   MODAL COMPONENT
   ========================================= */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--bg-surface);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-xl);
    width: 90%;
    max-width: 500px;
    box-shadow: var(--shadow-xl);
    transform: scale(0.95);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-header {
    padding: var(--space-5) var(--space-6);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: var(--text-lg) !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    margin: 0 !important;
    letter-spacing: normal !important;
    line-height: 1.3 !important;
    background: none !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    -webkit-text-fill-color: unset !important;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: var(--space-2);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.modal-body {
    padding: var(--space-6);
    color: var(--text-secondary);
    line-height: 1.6;
}

/* =========================================
   Contact Info List (agency modal)
   ========================================= */
.contact-info-list {
    display: flex;
    flex-direction: column;
}

.contact-info-item {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4) var(--space-6);
    text-decoration: none;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-subtle);
    transition: background 0.15s ease;
    cursor: pointer;
}

.contact-info-item:last-child {
    border-bottom: none;
}

.contact-info-item:hover {
    background: var(--bg-surface-2);
    color: var(--text-primary);
    text-decoration: none;
}

.contact-info-item[disabled],
.contact-info-item--static {
    cursor: default;
    pointer-events: none;
}

.contact-info-icon {
    width: 38px;
    height: 38px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-sm);
    flex-shrink: 0;
}

.contact-info-icon--email {
    background: rgba(var(--primary-rgb), 0.12);
    color: var(--primary);
}

.contact-info-icon--phone {
    background: rgba(34, 197, 94, 0.12);
    color: #22c55e;
}

.contact-info-icon--website {
    background: rgba(99, 102, 241, 0.12);
    color: #818cf8;
}

.contact-info-icon--location {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
}

.contact-info-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.contact-info-label {
    font-size: 0.68rem;
    color: var(--text-tertiary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.contact-info-value {
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.contact-info-arrow {
    color: var(--text-tertiary);
    font-size: 0.7rem;
    flex-shrink: 0;
}

.contact-social-row {
    display: flex;
    gap: var(--space-3);
    justify-content: center;
    padding: var(--space-4) var(--space-6);
    border-top: 1px solid var(--border-subtle);
}

.modal-footer {
    padding: var(--space-4) var(--space-6);
    border-top: 1px solid var(--border-subtle);
    display: flex;
    justify-content: flex-end;
    gap: var(--space-3);
    background: rgba(0, 0, 0, 0.2);
}

/* Crop Modal Specific Styles */
.crop-area {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}



.crop-image-container {
    position: relative;
    width: 100%;
    max-height: 450px;
    overflow: hidden;
    background: var(--bg-surface);
}

.crop-modal-image {
    max-width: 100%;
    display: block;
}

/* Cropper.js Handle Customization - Make drag points larger and more visible */
#crop-modal .cropper-point {
    width: 12px !important;
    height: 12px !important;
    background-color: var(--primary) !important;
    border: 2px solid #fff !important;
    border-radius: 50% !important;
    opacity: 1 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

#crop-modal .cropper-point:hover {
    background-color: var(--primary-hover) !important;
    transform: scale(1.2);
}

/* Make the crop box lines more visible */
#crop-modal .cropper-line {
    background-color: var(--primary) !important;
    opacity: 0.6 !important;
}

#crop-modal .cropper-view-box {
    outline: 1px solid rgba(255, 255, 255, 0.5) !important;
}

/* Modal Size Variants */
.modal-sm {
    max-width: 400px;
    background: var(--bg-card-base);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 0;
    box-shadow: var(--glass-shadow);
    overflow: hidden;
}

.modal-lg {
    max-width: 700px;
    width: 95%;
    background: var(--bg-card-base);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 0;
    box-shadow: var(--glass-shadow);
    overflow: hidden;
}



#crop-modal .modal-body {
    padding: var(--space-6);
    background: var(--bg-surface);
}

#crop-modal .modal-footer {
    padding: var(--space-5) var(--space-6);
    gap: var(--space-3);
}

#crop-modal .modal-footer .btn {
    min-width: 120px;
}

/* Responsive adjustments for crop modal */
@media (max-width: 768px) {
    .crop-photo-modal .modal-lg {
        width: 98%;
        max-width: none;
    }

    .crop-image-container {
        max-height: 300px;
    }

    #crop-modal .modal-header,
    #crop-modal .modal-body,
    #crop-modal .modal-footer {
        padding: var(--space-4);
    }
}

/* Product Card */
.product-card {
    background: var(--bg-card-base);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    border-color: var(--border-medium);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.product-card-image {
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--bg-soft-primary);
    position: relative;
    overflow: hidden;
}

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

.product-card:hover .product-card-image img {
    transform: scale(1.05);
}

.product-card-body {
    padding: var(--space-5);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.product-card-title {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.product-card-price {
    font-size: var(--text-base);
    color: var(--text-secondary);
    margin-bottom: var(--space-4);
    font-weight: 500;
}

.product-card-footer {
    display: flex;
    gap: var(--space-3);
    margin-top: auto;
}

/* Responsive Container Override */
.container {
    width: 100%;
    margin-right: auto;
    margin-left: auto;
    padding-right: var(--space-4);
    padding-left: var(--space-4);
}

@media (min-width: 640px) {
    .container {
        max-width: 640px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 768px;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 1024px;
    }
}

@media (min-width: 1280px) {
    .container {
        width: 1300px;
        max-width: 1300px;
    }
}

/* =========================================
   TOAST NOTIFICATIONS
   ========================================= */

.toast-container {
    position: fixed;
    top: var(--space-6);
    right: var(--space-6);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    pointer-events: none;
}

.toast {
    background: var(--bg-surface);
    color: var(--text-primary);
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-width: 300px;
    max-width: 400px;
    pointer-events: auto;
    animation: toast-slide-in 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    backdrop-filter: blur(10px);
}

.toast.toast-success {
    border-color: var(--border-color);
}

.toast.toast-success .toast-icon {
    color: #10b981;
}

.toast.toast-error {
    border-color: var(--border-color);
}

.toast.toast-error .toast-icon {
    color: #ef4444;
    /* Keep red for critical errors even in monochrome, or use white if strict */
}

.toast-icon {
    flex-shrink: 0;
    font-size: var(--text-lg);
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: var(--text-base);
    margin-bottom: 2px;
}

.toast-message {
    font-size: var(--text-base);
    color: var(--text-secondary);
    line-height: 1.4;
}

.toast-close {
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
}

.toast-close:hover {
    color: var(--text-primary);
}

@keyframes toast-slide-in {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes toast-slide-out {
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* =========================================
   LOADING & CONFIRMATION OVERLAYS
   ========================================= */

.app-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.app-overlay.active {
    opacity: 1;
    visibility: visible;
}

.overlay-content {
    background: var(--bg-surface);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: var(--shadow-xl);
    transform: scale(0.95);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.app-overlay.active .overlay-content {
    transform: scale(1);
}

.overlay-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    margin: 0 auto var(--space-6);
    animation: spin 1s linear infinite;
}

.overlay-title {
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.overlay-message {
    color: var(--text-secondary);
    font-size: var(--text-base);
    margin-bottom: var(--space-6);
}

.overlay-actions {
    display: flex;
    gap: var(--space-3);
    justify-content: center;
}

/* Bottom Nav Submenu */
.bottom-nav-submenu {
    position: fixed;
    bottom: calc(var(--space-4) + 80px);
    /* Just above the nav */
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    width: calc(100% - var(--space-8));
    max-width: 320px;
    background: var(--bg-card-base);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-xl);
    padding: var(--space-4);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: var(--shadow-xl);
    pointer-events: none;
}

.bottom-nav-submenu.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

.bottom-nav-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.bottom-nav-backdrop.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.submenu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--border-subtle);
}

.submenu-header h4 {
    margin: 0;
    font-size: var(--text-base);
    color: var(--text-primary);
    font-weight: 600;
}

.submenu-close {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: var(--text-lg);
    padding: var(--space-1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.submenu-close:hover {
    background: var(--bg-secondary-hover);
    color: var(--text-primary);
}

.submenu-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.submenu-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    border-radius: var(--radius-lg);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    background: transparent;
    border: 1px solid transparent;
}

.submenu-item:hover {
    background: var(--bg-secondary-hover);
    color: var(--text-primary);
    border-color: var(--border-subtle);
}

.submenu-item.text-danger {
    color: var(--color-danger-pastel-text);
}

.submenu-item.text-danger:hover {
    background: var(--color-danger-pastel-bg);
    border-color: transparent;
}

.submenu-icon {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary-element);
    border-radius: var(--radius-md);
    font-size: var(--text-base);
    transition: all 0.2s ease;
}

.submenu-item:hover .submenu-icon {
    background: var(--bg-surface);
    color: var(--text-primary);
}

.submenu-item.text-danger .submenu-icon {
    color: var(--color-danger-pastel-text);
    background: var(--color-danger-pastel-bg);
}

.bottom-nav-item#bottomNavMenuTrigger.active {
    color: var(--text-primary);
    background: var(--bg-secondary-hover);
}

/* =========================================
   DATA TABLE COMPONENTS
   ========================================= */

/* Table Wrapper */
.data-table-wrapper {
    background: var(--bg-surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

/* Table Header Actions */
.table-header {
    padding: var(--space-5) var(--space-6);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.table-title {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.table-search {
    flex: 1;
    max-width: 300px;
    min-width: 200px;
}

/* Data Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: var(--bg-surface-2);
    border-bottom: 1px solid var(--border-subtle);
}

.data-table th {
    padding: var(--space-4) var(--space-5);
    text-align: left;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.data-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
}

.data-table th.sortable:hover {
    color: var(--text-primary);
}

.data-table th.sortable::after {
    content: '⇅';
    margin-left: var(--space-2);
    opacity: 0.3;
    font-size: 0.9em;
}

.data-table th.sort-asc::after {
    content: '↑';
    opacity: 1;
}

.data-table th.sort-desc::after {
    content: '↓';
    opacity: 1;
}

.data-table tbody tr {
    border-bottom: 1px solid var(--border-subtle);
    transition: background 0.2s ease;
}

.data-table tbody tr:last-child {
    border-bottom: none;
}

.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.08);
}

.data-table td {
    padding: var(--space-4) var(--space-5);
    font-size: var(--text-base);
    color: var(--text-secondary);
}

.data-table td.cell-primary {
    color: var(--text-primary);
    font-weight: 500;
}

/* Table Actions Column */
.table-actions {
    display: flex;
    gap: var(--space-2);
    align-items: center;
}

.table-action-btn {
    padding: var(--space-2);
    background: transparent;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.table-action-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-medium);
    color: var(--text-primary);
}

/* Pagination */
.pagination {
    padding: var(--space-4) var(--space-6);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border-subtle);
}

.pagination-info {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.pagination-controls {
    display: flex;
    gap: var(--space-2);
}

.pagination-btn {
    padding: var(--space-2) var(--space-3);
    background: transparent;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: var(--text-sm);
    min-width: 36px;
}

.pagination-btn:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--border-medium);
    color: var(--text-primary);
}

.pagination-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--btn-text-dark);
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Table Empty State */
.table-empty {
    padding: var(--space-12) var(--space-6);
    text-align: center;
}

/* Responsive Table */
@media (max-width: 768px) {
    .data-table-wrapper {
        overflow-x: auto;
    }

    .data-table {
        min-width: 600px;
    }
}

/* =========================================
   FILE UPLOAD COMPONENTS
   ========================================= */

.file-upload-zone {
    border: 2px dashed var(--border-medium);
    border-radius: var(--radius-lg);
    padding: var(--space-8);
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    background: var(--bg-surface);
}

.file-upload-zone:hover {
    border-color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}

.file-upload-zone.drag-over {
    border-color: var(--primary);
    background: var(--bg-soft-primary);
}

.file-upload-icon {
    font-size: 3rem;
    color: var(--text-tertiary);
    margin-bottom: var(--space-4);
}

.file-upload-text {
    font-size: var(--text-base);
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
}

.file-upload-hint {
    font-size: var(--text-sm);
    color: var(--text-tertiary);
}

.file-upload-input {
    display: none;
}

/* File Preview List */
.file-preview-list {
    margin-top: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.file-preview-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--bg-surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
}

.file-preview-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface-2);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    flex-shrink: 0;
}

.file-preview-info {
    flex: 1;
}

.file-preview-name {
    font-size: var(--text-sm);
    color: var(--text-primary);
    font-weight: 500;
}

.file-preview-size {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
}

.file-preview-remove {
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: var(--space-2);
    transition: color 0.2s ease;
}

.file-preview-remove:hover {
    color: #f87171;
}

/* =========================================
   INPUT GROUP COMPONENTS
   ========================================= */

.input-group {
    display: flex;
    align-items: stretch;
    width: 100%;
}

.input-group-prepend,
.input-group-append {
    display: flex;
    align-items: center;
    padding: var(--space-3) var(--space-4);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: var(--text-base);
    white-space: nowrap;
}

.input-group-prepend {
    border-right: none;
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.input-group-append {
    border-left: none;
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

.input-group .input-glass {
    border-radius: 0;
}

.input-group .input-glass:first-child {
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.input-group .input-glass:last-child {
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

/* =========================================
   MULTI-SELECT COMPONENT
   ========================================= */

.multi-select {
    position: relative;
    width: 100%;
}

.multi-select-trigger {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    background: var(--bg-surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: var(--text-base);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 48px;
    transition: all 0.2s ease;
}

.multi-select-trigger:hover {
    border-color: var(--border-medium);
    background: rgba(255, 255, 255, 0.08);
}

.multi-select-values {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    flex: 1;
}

.multi-select-placeholder {
    color: var(--text-tertiary);
}

.multi-select-dropdown {
    position: absolute;
    top: calc(100% + var(--space-2));
    left: 0;
    right: 0;
    background: var(--bg-floating);
    backdrop-filter: blur(30px);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.multi-select.active .multi-select-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.multi-select-option {
    padding: var(--space-3) var(--space-4);
    cursor: pointer;
    transition: background 0.2s ease;
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.multi-select-option:hover {
    background: rgba(255, 255, 255, 0.08);
}

.multi-select-option.selected {
    background: var(--bg-soft-primary);
}

.multi-select-tag {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-1) var(--space-3);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-pill);
    font-size: var(--text-sm);
    color: var(--text-primary);
}

.multi-select-tag-remove {
    background: transparent;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    transition: color 0.2s ease;
}

.multi-select-tag-remove:hover {
    color: var(--text-primary);
}

/* =========================================
   VALIDATION STATES
   ========================================= */

.form-group {
    margin-bottom: var(--space-5);
}

.form-group.has-error .input-glass,
.form-group.has-error .input-select {
    border-color: #8b1a1a;
}

.form-group.has-success .input-glass,
.form-group.has-success .input-select {
    border-color: #1a5c3a;
}

.validation-message {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-top: var(--space-2);
    font-size: var(--text-sm);
}

.validation-message.error {
    color: #f87171;
}

.validation-message.success {
    color: #4ade80;
}

.validation-message i {
    font-size: 1em;
}

/* =========================================
   BREADCRUMB COMPONENT
   ========================================= */

.breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) 0;
    flex-wrap: wrap;
}

.breadcrumb-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.breadcrumb-item a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-item a:hover {
    color: var(--text-primary);
}

.breadcrumb-item.active {
    color: var(--text-primary);
    font-weight: 500;
}

.breadcrumb-separator {
    color: var(--text-tertiary);
    font-size: 0.9em;
}

/* =========================================
   TABS COMPONENT
   ========================================= */

.tabs {
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: var(--space-6);
}

.tabs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-1);
}

@media (max-width: 768px) {
    .tabs-nav {
        justify-content: center;
    }

    .tab-item {
        flex: 1 1 auto;
        text-align: center;
        padding: var(--space-3) var(--space-2);
        font-size: var(--text-sm);
    }
}

.tab-item {
    padding: var(--space-3) var(--space-5);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-size: var(--text-base);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    position: relative;
    bottom: -1px;
}

.tab-item:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.08);
}

.tab-item.active {
    color: var(--text-primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: tab-fade-in 0.2s ease;
}

@keyframes tab-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Settings Actions Responsiveness */
.settings-actions-container {
    flex-direction: column;
}

@media (min-width: 768px) {
    .settings-actions-container {
        flex-direction: row !important;
    }
}

/* =========================================
   TIMELINE COMPONENT
   ========================================= */

.timeline {
    position: relative;
    padding-left: var(--space-8);
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-subtle);
}

.timeline-item {
    position: relative;
    padding-bottom: var(--space-8);
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -var(--space-8);
    top: 4px;
    width: 32px;
    height: 32px;
    background: var(--bg-surface-2);
    border: 2px solid var(--border-medium);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: var(--text-sm);
    z-index: 1;
}

.timeline-item.success .timeline-marker {
    border-color: #4ade80;
    color: #4ade80;
}

.timeline-content {
    background: var(--bg-surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    margin-left: var(--space-4);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: var(--space-2);
}

.timeline-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: var(--text-base);
}

.timeline-time {
    font-size: var(--text-sm);
    color: var(--text-tertiary);
}

.timeline-body {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    line-height: 1.6;
}

/* =========================================
   ACTIVITY FEED COMPONENT
   ========================================= */

.activity-feed {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.activity-item {
    display: flex;
    gap: var(--space-3);
    padding: var(--space-4);
    background: var(--bg-surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    transition: all 0.2s ease;
}

.activity-item:hover {
    border-color: var(--border-medium);
    background: rgba(255, 255, 255, 0.08);
}

.activity-avatar {
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: var(--space-2);
}

.activity-user {
    font-weight: 600;
    color: var(--text-primary);
    font-size: var(--text-base);
}

.activity-time {
    font-size: var(--text-sm);
    color: var(--text-tertiary);
}

.activity-text {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    line-height: 1.6;
}

/* =========================================
   ACCORDION COMPONENT
   ========================================= */

.accordion {
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.accordion-item {
    border-bottom: 1px solid var(--border-subtle);
}

.accordion-item:last-child {
    border-bottom: none;
}

.accordion-header {
    width: 100%;
    padding: var(--space-4) var(--space-5);
    background: var(--bg-surface-2);
    border: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.accordion-header:hover {
    background: rgba(255, 255, 255, 0.08);
}

.accordion-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: var(--text-base);
}

.accordion-icon {
    color: var(--text-secondary);
    transition: transform 0.3s ease;
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.accordion-item.active .accordion-body {
    max-height: 1000px;
}

.accordion-content {
    padding: var(--space-5);
    color: var(--text-secondary);
    line-height: 1.6;
}

/* =========================================
   STATE COMPONENTS
   ========================================= */

.empty-state {
    text-align: center;
    padding: var(--space-12) var(--space-6);
}

.empty-state-icon {
    font-size: 4rem;
    color: var(--text-tertiary);
    margin-bottom: var(--space-4);
}

.empty-state-title {
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.empty-state-message {
    font-size: var(--text-base);
    color: var(--text-secondary);
    margin-bottom: var(--space-6);
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.empty-state-action {
    margin-top: var(--space-4);
}

/* Error State */
.error-state {
    text-align: center;
    padding: var(--space-12) var(--space-6);
    background: rgba(139, 26, 26, 0.05);
    border: 1px solid rgba(139, 26, 26, 0.2);
    border-radius: var(--radius-lg);
}

.error-state-icon {
    font-size: 4rem;
    color: #f87171;
    margin-bottom: var(--space-4);
}

.error-state-title {
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.error-state-message {
    font-size: var(--text-base);
    color: var(--text-secondary);
    margin-bottom: var(--space-6);
}

/* Success State */
.success-state {
    text-align: center;
    padding: var(--space-12) var(--space-6);
    background: rgba(26, 92, 58, 0.05);
    border: 1px solid rgba(26, 92, 58, 0.2);
    border-radius: var(--radius-lg);
}

.success-state-icon {
    font-size: 4rem;
    color: #4ade80;
    margin-bottom: var(--space-4);
}

.success-state-title {
    font-size: var(--text-xl);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.success-state-message {
    font-size: var(--text-base);
    color: var(--text-secondary);
    margin-bottom: var(--space-6);
}

/* =========================================
   EXPANDED UTILITY CLASSES
   ========================================= */

/* Margin Utilities */
.m-0 {
    margin: 0;
}

.m-auto {
    margin: auto;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.mt-0 {
    margin-top: 0;
}

.mt-2 {
    margin-top: var(--space-2);
}

.mt-3 {
    margin-top: var(--space-3);
}

.mt-6 {
    margin-top: var(--space-6);
}

.mt-8 {
    margin-top: var(--space-8);
}

.mb-0 {
    margin-bottom: 0;
}

.mb-2 {
    margin-bottom: var(--space-2);
}

.mb-6 {
    margin-bottom: var(--space-6);
}

.mb-8 {
    margin-bottom: var(--space-8);
}

.mb-10 {
    margin-bottom: var(--space-10);
}

.mb-12 {
    margin-bottom: var(--space-12);
}

/* Padding Utilities */
.p-0 {
    padding: 0;
}

.p-4 {
    padding: var(--space-4);
}

.p-6 {
    padding: var(--space-6);
}

.px-4 {
    padding-left: var(--space-4);
    padding-right: var(--space-4);
}

.px-6 {
    padding-left: var(--space-6);
    padding-right: var(--space-6);
}

.py-4 {
    padding-top: var(--space-4);
    padding-bottom: var(--space-4);
}

.py-6 {
    padding-top: var(--space-6);
    padding-bottom: var(--space-6);
}

/* Text Utilities */
.gradient-title {
    background: var(--gradient-text-brand);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

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

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

/* Map embed */
.map-embed {
    height: 380px;
}

/* Display Utilities */
.d-none {
    display: none;
}

@media (max-width: 575px) {
    .hide-sm {
        display: none !important;
    }
}

.d-block {
    display: block;
}

.d-inline {
    display: inline;
}

.d-inline-block {
    display: inline-block;
}

/* Background Utilities */
.bg-surface {
    background: var(--bg-surface);
}

.bg-surface-2 {
    background: var(--bg-surface-2);
}

.bg-transparent {
    background: transparent;
}

/* Flex Utilities */
.flex-1 {
    flex: 1;
}

.flex-wrap {
    flex-wrap: wrap;
}

.flex-column {
    flex-direction: column;
}

.justify-start {
    justify-content: flex-start;
}

.justify-end {
    justify-content: flex-end;
}

.align-start {
    align-items: flex-start;
}

.align-end {
    align-items: flex-end;
}

/* Width Utilities */
.w-50 {
    width: 50%;
}

.w-75 {
    width: 75%;
}

.w-auto {
    width: auto;
}

/* Position Utilities */
.position-relative {
    position: relative;
}

.position-absolute {
    position: absolute;
}

.position-fixed {
    position: fixed;
}

/* Overflow Utilities */
.overflow-hidden {
    overflow: hidden;
}

.overflow-auto {
    overflow: auto;
}

.overflow-x-auto {
    overflow-x: auto;
}

.overflow-y-auto {
    overflow-y: auto;
}

/* =========================================
   ENTITY PROFILE
   ========================================= */

.entity-profile-logo {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-lg);
    object-fit: cover;
    flex-shrink: 0;
}

/* =========================================
   AVATAR UPLOAD COMPONENT
   ========================================= */

.avatar-upload-container {
    position: relative;
    width: 110px;
    height: 110px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-surface-2);
}

.avatar-upload-container .avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-sm);
    display: block;
}

.avatar-upload-container .avatar-placeholder {
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
}

.avatar-upload-container .avatar-placeholder i {
    font-size: 3rem;
    color: var(--text-tertiary);
}

.avatar-upload-container .avatar-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: var(--radius-sm);
    pointer-events: none;
}

.avatar-upload-container:hover .avatar-overlay {
    opacity: 1 !important;
}

/* Helper for rounded corners */
.rounded-4 {
    border-radius: var(--radius-xl) !important;
}

.avatar-upload-container .avatar-overlay i {
    color: white;
    font-size: 2rem;
}

/* Utility Classes */
.d-none {
    display: none !important;
}

/* =========================================
   AI Chat & Coach Components
   Premium Modern Design System
   ========================================= */

.ai-messages-area {
    scroll-behavior: smooth;
    padding: var(--space-6);
}

.ai-message {
    display: flex;
    margin-bottom: var(--space-4);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-message.visible {
    opacity: 1;
    transform: translateY(0);
}

.ai-message-assistant {
    justify-content: flex-start;
}

.ai-message-user {
    justify-content: flex-end;
}

.ai-message-bubble {
    max-width: 80%;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-lg);
    line-height: 1.6;
    position: relative;
    font-size: var(--text-sm);
}

.ai-message-user .ai-message-bubble {
    background: var(--primary);
    color: white;
    border-bottom-right-radius: var(--radius-xs);
    box-shadow: 0 4px 15px rgba(0, 116, 129, 0.2);
}

.ai-message-assistant .ai-message-bubble {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    border-bottom-left-radius: var(--radius-xs);
    box-shadow: var(--glass-shadow);
}

/* Premium Coach Input Area */
.coach-input-area {
    padding: var(--space-5) var(--space-8);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    position: relative;
    z-index: 10;
}

.ai-chat-input-wrapper {
    display: flex;
    align-items: flex-end;
    gap: var(--space-3);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: var(--space-2) var(--space-2) var(--space-2) var(--space-4);
    transition: all 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.ai-chat-input-wrapper:focus-within {
    border-color: rgba(0, 116, 129, 0.4);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 0 4px rgba(0, 116, 129, 0.1), inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.ai-chat-input-wrapper textarea {
    flex: 1;
    background: transparent;
    border: none;
    padding: var(--space-2) 0;
    color: var(--text-primary);
    font-size: var(--text-base);
    resize: none;
    max-height: 200px;
    outline: none;
    line-height: 1.5;
    font-family: inherit;
}

.ai-send-btn {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-md);
    background: var(--primary);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.ai-send-btn:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 116, 129, 0.3);
}

.ai-send-btn:active:not(:disabled) {
    transform: scale(0.95);
}

.ai-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--text-tertiary);
}

/* Typing Indicator */
.ai-typing-indicator {
    display: none;
    padding: var(--space-2) var(--space-4);
    margin: var(--space-3) var(--space-6);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    width: fit-content;
    gap: 4px;
}

.ai-typing-indicator.active {
    display: flex;
}

.ai-typing-indicator span {
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
    opacity: 0.6;
    animation: typingBounce 1.4s infinite ease-in-out;
}

.ai-typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.ai-typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typingBounce {

    0%,
    80%,
    100% {
        transform: scale(0);
    }

    40% {
        transform: scale(1.0);
    }
}

/* =========================================
   Migrated UI Components & Layouts
   ========================================= */
/* =========================================
   Hero Section - Premium Centered Design
   ========================================= */
/* Shared Background */
.animated-grid-background {
    position: relative;
    background: var(--gradient-hero);
    overflow: hidden;
}

.animated-grid-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(var(--bg-surface-2) 1px, transparent 1px),
        linear-gradient(90deg, var(--bg-surface-2) 1px, transparent 1px);
    background-size: 80px 80px;
    opacity: 0.6;
    pointer-events: none;
}

.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: calc(var(--nav-height) + 4rem);
    padding-bottom: 4rem;
}


/* Hero Wrapper - Two Column Layout */
.hero-wrapper {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--nav-height) - 8rem);
}

/* Hero Grid - Two Columns */
.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    width: 100%;
}

/* Hero Content - Left Column */
.hero-content {
    text-align: left;
    position: relative;
    z-index: 10;
}

/* Hero Badge */
.hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1.25rem;
    background: var(--bg-surface-2);
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-pill);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.hero-badge:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

/* Hero Title - Enhanced */
.hero-title {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.05;
    margin-bottom: 2rem;
    background: var(--gradient-text-brand);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: titleFadeIn 1s ease-out;
}

@keyframes titleFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Subtitle - Improved Readability */
.hero-subtitle {
    font-size: clamp(0.9rem, 2vw, 1rem);
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-weight: 400;
    line-height: 1.6;
    max-width: 600px;
    margin-left: 0;
    margin-right: auto;
}

/* Hero Visual - Right Column */
.hero-visual-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1200px;
}

.hero-visual {
    width: 100%;
    max-width: 100%;
    height: auto;
    animation: float 8s ease-in-out infinite;
    filter: none;
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}

.hero-visual:hover {
    transform: scale(1.05);
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px) rotateX(0deg);
    }

    50% {
        transform: translateY(-25px) rotateX(5deg);
    }
}

/* Hero Buttons */
.hero-btns-container {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
}

.hero-btns-container .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-size: var(--text-base);
    font-weight: 500;
    transition: all 0.3s ease;
}

.hero-btns-container .btn i {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.hero-btns-container .btn-primary:hover i {
    transform: translateX(4px);
}

.hero-btns-container .btn-glass:hover i {
    transform: scale(1.1);
}


/* Hero Responsive */
@media (max-width: 991px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

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

    .hero-btns-container {
        justify-content: center;
    }

    .hero-visual-wrapper {
        order: -1;
        max-width: 300px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding-top: calc(var(--nav-height) + 2rem);
        padding-bottom: 2rem;
    }

    .hero-wrapper {
        min-height: auto;
        padding: 2rem 0;
    }

    .hero-badge {
        font-size: var(--text-xs);
        padding: 0.4rem 1rem;
        margin-bottom: 1.5rem;
    }

    .hero-title {
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        font-size: var(--text-base);
        margin-bottom: 2rem;
    }

    .hero-visual-wrapper {
        max-width: 240px;
        margin-bottom: 2rem;
    }

    .hero-visual {
        max-width: 220px;
    }

    .hero-btns-container {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
    }

    .hero-btns-container .btn {
        width: 100%;
        justify-content: center;
        padding: 0.875rem 1.5rem;
    }
}

/* =========================================
   Navigation
   ========================================= */
.nav-glass {
    position: fixed;
    top: 20px;
    left: 0;
    right: 0;
    width: 100%;
    height: var(--nav-height);
    z-index: 1000;
    display: flex;
    justify-content: center;
}

.nav-container {
    width: 90%;
    max-width: 1300px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.nav-section {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--glass-shadow);
    display: flex;
    align-items: center;
    height: 100%;
}

.nav-section-logo {
    padding: 0 1.5rem;
}

.nav-section-links {
    padding: 0 1.5rem;
    flex: 1;
    justify-content: flex-end;
    gap: 1.5rem;
}

.nav-brand {
    font-weight: 700;
    font-size: var(--text-xl);
    color: var(--text-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.nav-brand img {
    height: 100%;
    width: auto;
    display: block;
    transition: transform 0.3s ease;
}


.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-links a:not(.btn) {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: var(--text-base);
    padding: 0.5rem;
    transition: all 0.2s ease;
    position: relative;
}

.nav-links a:not(.btn)::after {
    content: '';
    position: absolute;
    bottom: 5px;
    /* Adjusted for padding */
    left: 0.5rem;
    /* Match padding-left */
    right: 0.5rem;
    /* Match padding-right */
    width: 0;
    height: 1px;
    background: var(--text-primary);
    transition: width 0.2s ease;
}

.input-glass::placeholder {
    color: var(--text-tertiary);
}

.password-toggle-btn {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    z-index: 5;
    transition: color 0.2s ease;
}

.password-toggle-btn:hover {
    color: var(--text-primary);
}

.nav-links a:not(.btn):hover {
    color: var(--text-primary);
}

.nav-links a:not(.btn):hover::after {
    width: calc(100% - 1rem);
    /* Account for padding */
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: var(--text-2xl);
    cursor: pointer;
    padding: 0.5rem;
}

/* Mobile Navigation */
@media (max-width: 768px) {
    .nav-container {
        width: 95%;
    }

    .nav-section-logo {
        padding: 0 1rem;
    }

    .nav-section-links {
        padding: 0 1rem;
        position: relative;
    }

    .nav-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: calc(100% + 12px);
        right: 0;
        min-width: 250px;
        flex-direction: column;
        align-items: center;
        background: var(--bg-floating);
        backdrop-filter: blur(30px);
        -webkit-backdrop-filter: blur(30px);
        padding: 1.5rem;
        gap: 1rem;
        border-radius: 20px;
        border: 1px solid var(--glass-border);
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px) scale(0.98);
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        pointer-events: none;
    }

    .nav-links.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0) scale(1);
        pointer-events: auto;
    }

    .nav-links a:not(.btn) {
        display: block;
        padding: 10px 0;
        font-size: var(--text-lg);
        width: 100%;
        text-align: center;
        border-bottom: 1px solid var(--glass-border-light);
    }

    .nav-links a:not(.btn):last-child {
        border-bottom: none;
    }

    .nav-links .btn {
        width: 100%;
        text-align: center;
        margin-top: 0.5rem;
        padding: 14px;
        border-radius: 16px;
    }
}

/* =========================================
   Footer
   ========================================= */
.footer-glass {
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-surface-2);
    position: relative;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-8);
    margin-bottom: var(--space-8);
}

.footer-brand img {
    height: 80px;
    width: auto;
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

.footer-brand img:hover {
    opacity: 1;
}

.footer-links {
    display: flex;
    gap: var(--space-8);
    flex-wrap: wrap;
    justify-content: center;
}

.footer-link,
.footer-link {
    color: var(--text-secondary) !important;
    text-decoration: none !important;
    font-size: var(--text-sm);
    transition: all 0.3s ease;
    position: relative;
    padding: 4px 0;
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--text-primary);
    transition: width 0.2s ease;
}

.footer-link:hover {
    color: var(--text-primary) !important;
    text-decoration: none !important;
}

.footer-link:hover::after {
    width: 100%;
}

.footer-social {
    display: flex;
    gap: var(--space-4);
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary-element);
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid var(--border-subtle);
}

.social-link:hover {
    background: var(--bg-secondary-hover);
    color: var(--text-primary);
    border-color: var(--border-medium);
    transform: translateY(-2px);
}

.footer-copyright {
    text-align: center;
    padding-top: var(--space-6);
    border-top: 1px solid var(--border-subtle);
    color: var(--text-tertiary);
    font-size: var(--text-sm);
}

/* Footer Responsive */
@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .footer-links {
        gap: var(--space-6);
    }

    .footer-copyright {
        text-align: left;
    }
}

/* =========================================
   Auth Pages
   ========================================= */
.auth-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 4rem;
    padding-bottom: 4rem;
}

.auth-wrapper {
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 10;
}

.auth-card {
    padding: 3rem 2.5rem;
    border: 1px solid var(--glass-border-light);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

/* =========================================
   Emotiva-Liderea — Navbar Override
   Logo + Links unificados en un solo panel
   ========================================= */

/* El nav-container pasa a ser el único contenedor glass */
.nav-container {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--glass-shadow);
    padding: 0 1.5rem;
    gap: 0;
}

/* Las nav-section pierden su fondo individual */
.nav-section {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

/* Logo sin separador */
.nav-section-logo {
    padding: 0 1.5rem 0 0;
    margin-right: 1.5rem;
}

/* Los links toman el espacio restante */
.nav-section-links {
    padding: 0;
}

/* Mobile: el container sigue siendo la píldora unificada */
@media (max-width: 768px) {
    .nav-container {
        width: 92%;
        padding: 0 1rem;
    }

    .nav-section-logo {
        padding: 0 1rem 0 0;
        margin-right: 1rem;
    }

    .nav-section-links {
        padding: 0;
        position: relative;
    }
}

/* =========================================
   Emotiva-Liderea — Hero Premium Enhancements
   ========================================= */

/* Ambient light orbs */
.hero-orb {
    display: none;
}

.hero-orb-primary {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(var(--primary-rgb), 0.3) 0%, transparent 70%);
    top: -300px;
    right: -300px;
    animation-delay: 0s;
}

.hero-orb-accent {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(var(--primary-rgb), 0.3) 0%, transparent 70%);
    bottom: -250px;
    left: -250px;
    animation-delay: -4s;
}

@keyframes orbFloat {

    0%,
    100% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-30px) scale(1.05);
    }
}

/* Badge with pulsing live dot */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
    animation: pulseDot 2s ease-in-out infinite;
    flex-shrink: 0;
}

@keyframes pulseDot {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
    }

    50% {
        box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
    }
}

/* Trust stats cards */
.hero-stats {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-top: 3.5rem;
    flex-wrap: wrap;
    border-top: none;
    /* Remove old border */
    padding-top: 0;
}

.hero-stat-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 150px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.hero-stat-card:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-6px);
    border-color: rgba(var(--accent-rgb), 0.3);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.hero-stat-value {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: var(--gradient-text-brand);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}

.hero-stat-label {
    font-size: 0.68rem;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 600;
    margin-top: 0.25rem;
}

/* Glow behind visual image */
.hero-visual-wrapper {
    position: relative;
}

.hero-visual-glow {
    position: absolute;
    width: 90%;
    height: 90%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--primary-rgb), 0.45) 0%, rgba(var(--accent-rgb), 0.25) 50%, transparent 70%);
    filter: blur(60px);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    animation: glowPulse 6s ease-in-out infinite;
    z-index: 0;
}

.hero-visual {
    position: relative;
    z-index: 1;
}

@keyframes glowPulse {

    0%,
    100% {
        opacity: 0.7;
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1);
    }
}

/* Stats responsive */
@media (max-width: 768px) {
    .hero-stats {
        gap: 0.75rem;
        margin-top: 2.5rem;
        justify-content: center;
    }

    .hero-stat-card {
        padding: 1rem 1.25rem;
        min-width: 130px;
    }

    .hero-stat-value {
        font-size: 1.3rem;
    }
}

/* =========================================
   Emotiva-Liderea — Dashboard Home (Coaching)
   ========================================= */

/* Start Session CTA card */
.coach-start-card {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.15) 0%, rgba(var(--accent-rgb), 0.08) 100%);
    border: 1px solid rgba(var(--primary-rgb), 0.3);
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.coach-start-card:hover {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.22) 0%, rgba(var(--accent-rgb), 0.12) 100%);
    border-color: rgba(var(--primary-rgb), 0.5);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(var(--primary-rgb), 0.18);
}

.coach-start-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.4rem;
    flex-shrink: 0;
}


.coach-start-content {
    flex: 1;
}

.coach-start-content h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.coach-start-content p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
}

.coach-start-arrow {
    color: var(--primary);
    font-size: 1rem;
    transition: transform 0.2s ease;
}

.coach-start-card:hover .coach-start-arrow {
    transform: translateX(4px);
}

/* Daily reflection card */
.coach-reflection-card {
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
}

.coach-reflection-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--brand-accent, var(--brand-accent));
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.75rem;
}

.coach-reflection-question {
    font-size: 1rem;
    color: var(--text-primary);
    font-style: italic;
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* =========================================
   Emotiva-Liderea — Coach Full-Page View
   ========================================= */

.coach-page-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: 280px 1fr;
    overflow: hidden;
    z-index: 1;
}

/* Hide global bottom nav on coach page */
.coach-page-wrapper~.bottom-nav,
.coach-page-wrapper~.bottom-nav-backdrop,
.coach-page-wrapper~.bottom-nav-submenu {
    display: none !important;
}

/* Sidebar */
.coach-sidebar {
    border-right: 1px solid var(--glass-border);
    display: flex;
    flex-direction: column;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    overflow: hidden;
}

.coach-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1rem;
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.coach-sidebar-header h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
}

.coach-sidebar-list {
    overflow-y: auto;
    flex: 1;
    padding: 0.5rem;
}

.coach-session-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: var(--radius);
    text-decoration: none;
    transition: background 0.15s ease;
    cursor: pointer;
}

.coach-session-item:hover,
.coach-session-item.active {
    background: rgba(var(--primary-rgb), 0.1);
}

.coach-session-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    background: rgba(var(--primary-rgb), 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 0.85rem;
    flex-shrink: 0;
}

.coach-session-info {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    overflow: hidden;
}

.coach-session-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.coach-session-date {
    font-size: 0.72rem;
    color: var(--text-tertiary);
}

/* Chat area */
.coach-chat-area {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Chat header */
.coach-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    flex-shrink: 0;
}

.coach-chat-header-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.coach-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary-rgb);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-primary);
    font-size: 1rem;
}

.coach-chat-header-info h5 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.coach-status {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.72rem;
    color: var(--text-tertiary);
}

.coach-status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    animation: pulseDot 2s ease-in-out infinite;
}

/* Messages */
.coach-messages-area {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Input area + quick prompts */
.coach-input-area {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--glass-border);
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    flex-shrink: 0;
}

.coach-quick-prompts {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.coach-prompt-chip {
    padding: 0.35rem 0.85rem;
    border-radius: 99px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    font-size: 0.78rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
}

.coach-prompt-chip:hover {
    background: rgba(var(--primary-rgb), 0.12);
    border-color: rgba(var(--primary-rgb), 0.3);
    color: var(--primary);
}


/* History Page Redesign */
.history-grid-section {
    margin-bottom: var(--space-10);
}

.history-date-header {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-4);
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.history-date-header::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--glass-border);
}

.history-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: var(--space-6);
}

.history-card {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.history-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary-light);
    box-shadow: var(--glass-shadow-hover);
    background: var(--bg-card-hover);
}

.history-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-4);
}

.history-card-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-lg);
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.history-card-time {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    font-weight: 500;
}

.history-card-content {
    flex: 1;
}

.history-card-content h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.history-card-summary {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: var(--space-4);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.history-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: var(--space-4);
    border-top: 1px solid var(--glass-border);
}

.history-card-meta {
    display: flex;
    gap: var(--space-3);
    color: var(--text-tertiary);
    font-size: var(--text-xs);
}

.history-card-meta span {
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.history-card-arrow {
    color: var(--primary);
    font-size: 0.9rem;
    transition: transform 0.2s ease;
}

.history-card:hover .history-card-arrow {
    transform: translateX(4px);
}

@media (max-width: 639px) {
    .history-grid {
        grid-template-columns: 1fr;
    }
}

/* Responsive: hide sidebar on mobile */
@media (max-width: 768px) {
    .coach-page-wrapper {
        grid-template-columns: 1fr;
    }

    .coach-sidebar {
        display: none;
    }

    .coach-quick-prompts {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .coach-quick-prompts::-webkit-scrollbar {
        display: none;
    }
}

/* =========================================
   Informative Section — How It Works
   ========================================= */

.info-section {
    position: relative;
    padding: 7rem 0 6rem;
    overflow: hidden;
}

/* Subtle ambient orb */
.info-orb {
    position: absolute;
    width: 700px;
    height: 700px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--primary-rgb), 0.12) 0%, transparent 70%);
    filter: blur(80px);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 0;
}

/* ---- Header ---- */
.info-header {
    text-align: center;
    max-width: 680px;
    margin: 0 auto 4rem;
    position: relative;
    z-index: 1;
}

.info-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1.1rem;
    background: rgba(var(--primary-rgb), 0.1);
    border: 1px solid rgba(var(--primary-rgb), 0.3);
    border-radius: var(--radius-pill);
    font-size: var(--text-xs, 0.75rem);
    font-weight: 600;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 1.5rem;
}

.info-label i {
    font-size: 0.7rem;
    color: var(--brand-accent, var(--brand-accent));
}

.info-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 1.25rem;
    background: var(--gradient-text-brand);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.info-description {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

/* ---- Cards Grid ---- */
.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}

.feature-card {
    position: relative;
    padding: 2.25rem 2rem;
    border-radius: var(--radius-xl, 20px);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

/* Accent card (center) */
.feature-card--accent {
    background: linear-gradient(145deg, rgba(var(--primary-rgb), 0.12) 0%, rgba(var(--accent-rgb), 0.06) 100%);
    border-color: rgba(var(--primary-rgb), 0.35);
    box-shadow: 0 0 40px rgba(var(--primary-rgb), 0.08);
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: rgba(var(--primary-rgb), 0.4);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.feature-card--accent:hover {
    border-color: rgba(var(--accent-rgb), 0.45);
    box-shadow: 0 20px 50px rgba(var(--primary-rgb), 0.2);
}

/* Card icon */
.feature-card-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-lg, 14px);
    background: rgba(var(--primary-rgb), 0.12);
    border: 1px solid rgba(var(--primary-rgb), 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.feature-card--accent .feature-card-icon {
    background: rgba(var(--primary-rgb), 0.18);
    border-color: rgba(var(--primary-rgb), 0.4);
    color: var(--primary);
}

.feature-card:hover .feature-card-icon {
    background: rgba(var(--primary-rgb), 0.2);
    transform: scale(1.08);
}

/* Step number */
.feature-card-number {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--brand-accent, var(--brand-accent));
    margin-bottom: 0.6rem;
}

/* Card title */
.feature-card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

/* Card body text */
.info-card-text {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0;
}

/* ---- Bottom CTA Strip ---- */
.info-cta-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-top: 4rem;
    padding: 2rem 2.5rem;
    background: var(--bg-surface-2);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl, 20px);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: relative;
    z-index: 1;
}

.info-cta-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.info-cta-strip .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.info-cta-strip .btn i {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
}

.info-cta-strip .btn:hover i {
    transform: translateX(4px);
}

/* ---- Responsive ---- */
@media (max-width: 991px) {
    .info-grid {
        grid-template-columns: 1fr 1fr;
    }

    .feature-card:last-child {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .info-section {
        padding: 5rem 0 4rem;
    }

    .info-header {
        margin-bottom: 2.5rem;
    }

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

    .feature-card:last-child {
        grid-column: span 1;
    }

    .info-cta-strip {
        flex-direction: column;
        text-align: center;
        padding: 1.75rem 1.5rem;
    }

    .info-cta-strip .btn {
        width: 100%;
        justify-content: center;
    }
}

/* =========================================
   Pricing Section
   ========================================= */

.pricing-section {
    position: relative;
    padding: 7rem 0 6rem;
    overflow: hidden;
}

/* Ambient orbs */
.pricing-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    pointer-events: none;
    z-index: 0;
}

.pricing-orb--left {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(var(--primary-rgb), 0.15) 0%, transparent 70%);
    top: 10%;
    left: -200px;
}

.pricing-orb--right {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, rgba(var(--accent-rgb), 0.1) 0%, transparent 70%);
    bottom: 10%;
    right: -180px;
}

/* ---- Cards Grid ---- */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    align-items: stretch;
    position: relative;
    z-index: 1;
}

/* ---- Base Card ---- */
.pricing-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 2.5rem 2rem;
    border-radius: var(--radius-xl, 20px);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        box-shadow 0.35s ease,
        border-color 0.35s ease;
}

.pricing-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    border-color: rgba(var(--primary-rgb), 0.35);
}

/* ---- Featured Card (Pro) ---- */
.pricing-card--featured {
    background: linear-gradient(160deg, rgba(var(--primary-rgb), 0.18) 0%, rgba(var(--accent-rgb), 0.06) 100%);
    border-color: rgba(var(--primary-rgb), 0.5);
    box-shadow: 0 0 60px rgba(var(--primary-rgb), 0.15), 0 0 0 1px rgba(var(--primary-rgb), 0.25);
    transform: translateY(-10px);
}

.pricing-card--featured:hover {
    transform: translateY(-16px);
    box-shadow: 0 30px 60px rgba(var(--primary-rgb), 0.25), 0 0 0 1px rgba(var(--primary-rgb), 0.4);
    border-color: rgba(var(--accent-rgb), 0.4);
}

/* "Más popular" badge */
.pricing-badge {
    display: inline-flex;
    align-self: flex-start;
    padding: 0.3rem 0.9rem;
    background: linear-gradient(90deg, var(--primary), var(--brand-accent));
    border-radius: var(--radius-pill);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--btn-text-dark, #fff);
    margin-bottom: 1.25rem;
}

/* Plan name */
.pricing-plan-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.01em;
    margin-bottom: 1rem;
}

.pricing-card--featured .pricing-plan-name {
    color: var(--text-primary);
}

/* Price */
.pricing-price {
    display: flex;
    align-items: baseline;
    gap: 0.2rem;
    margin-bottom: 0.75rem;
}

.pricing-currency {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-secondary);
    align-self: flex-start;
    margin-top: 0.35rem;
}

.pricing-amount {
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1;
    background: var(--gradient-text-brand);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.pricing-card--featured .pricing-currency {
    color: var(--primary);
}

/* Fix: featured card backdrop-filter breaks background-clip text.
   Override using brand variables so each client gets its own gradient. */
.pricing-card--featured .pricing-amount {
    background: linear-gradient(135deg, var(--primary) 0%, var(--brand-accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.pricing-period {
    font-size: 0.9rem;
    color: var(--text-tertiary);
    font-weight: 500;
    margin-left: 0.15rem;
}

/* Tagline */
.pricing-tagline {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-bottom: 1.75rem;
    line-height: 1.5;
}

/* Features list */
.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    flex: 1;
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.pricing-features li i {
    font-size: 0.75rem;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.pricing-features li:not(.pricing-feature--off) i {
    color: var(--primary);
    background: var(--bg-soft-primary);
}

.pricing-feature--off {
    opacity: 0.4;
}

.pricing-feature--off i {
    color: var(--text-tertiary) !important;
    background: rgba(255, 255, 255, 0.04) !important;
}

/* btn-block utility */
.btn-block {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    text-align: center;
    margin-top: auto;
}

.btn-block i {
    font-size: 0.85rem;
    transition: transform 0.3s ease;
}

.btn-block:hover i {
    transform: translateX(4px);
}

/* Guarantee strip */
.pricing-guarantee {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 3rem;
    font-size: 0.85rem;
    color: var(--text-tertiary);
    position: relative;
    z-index: 1;
}

.pricing-guarantee i {
    color: var(--primary);
    font-size: 0.95rem;
}

/* ---- Responsive ---- */
@media (max-width: 991px) {
    .pricing-grid {
        grid-template-columns: 1fr 1fr;
    }

    .pricing-card--featured {
        grid-column: span 2;
        transform: none;
    }

    .pricing-card--featured:hover {
        transform: translateY(-6px);
    }
}

@media (max-width: 768px) {
    .pricing-section {
        padding: 5rem 0 4rem;
    }

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

    .pricing-card--featured {
        grid-column: span 1;
    }
}

/* AI Agents Module standardized to Core components */

/* =========================================
   Properties Flow Form Customizations
   ========================================= */
.property-step-form .form-label {
    letter-spacing: 0.5px;
    margin-bottom: var(--space-2);
}

.property-step-form .input-glass,
.property-step-form .form-select {
    background: var(--bg-surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

.property-step-form .input-icon-wrapper .input-glass {
    padding-left: var(--space-10);
}

.property-step-form .input-glass:focus,
.property-step-form .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
    outline: none;
}

.property-step-form .input-group-text {
    background: var(--bg-surface-3);
    border: 1px solid var(--border-subtle);
    border-right: none;
    color: var(--text-tertiary);
    border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.property-step-form .input-group .form-control {
    border-left: none;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding-left: 0;
}

.property-step-form .input-group:focus-within .input-group-text,
.property-step-form .input-group:focus-within .form-control {
    border-color: var(--primary);
}

.property-step-form .input-group:focus-within .input-group-text {
    color: var(--primary);
}

/* Selectable Pill Component (Hide default radio, show styled pill) */
.selectable-pill {
    cursor: pointer;
    margin: 0;
}

.selectable-pill .pill-content {
    background: var(--bg-surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-pill);
    color: var(--text-secondary);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.selectable-pill:hover .pill-content {
    background: var(--bg-surface-3);
    border-color: var(--border-medium);
    color: var(--text-primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.selectable-pill input[type="radio"]:checked+.pill-content,
.selectable-pill input[type="checkbox"]:checked+.pill-content {
    background: rgba(var(--primary-rgb), 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

.selectable-pill input[type="radio"]:focus-visible+.pill-content,
.selectable-pill input[type="checkbox"]:focus-visible+.pill-content {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Properties Module Styles */
.info-card-image {
    height: 180px;
    background: var(--bg-surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.property-gallery-full {
    height: 450px;
    background: linear-gradient(135deg, var(--bg-surface-2) 0%, var(--bg-surface-3) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-placeholder-box {
    height: 150px;
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-surface-3);
}

/* Atlas Gallery Component */
.gallery-main-stage {
    position: relative;
    width: 100%;
    background: var(--bg-surface-2);
    border: 1px solid var(--border-subtle);
    overflow: hidden;
    z-index: 1;
}

.gallery-main-stage img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

.thumbnail-strip {
    display: flex;
    gap: var(--space-3);
    overflow-x: auto;
    padding-bottom: var(--space-2);
    scrollbar-width: thin;
    -ms-overflow-style: thin;
}

.thumbnail-strip::-webkit-scrollbar {
    height: 4px;
}

.thumbnail-strip::-webkit-scrollbar-thumb {
    background: var(--border-subtle);
    border-radius: var(--radius-pill);
}

.thumb-item {
    flex-shrink: 0;
    cursor: pointer;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    width: 60px;
    aspect-ratio: 1/1;
    isolation: isolate;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.thumb-item:hover {
    border-color: var(--primary-hover);
}

.thumb-item.active {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
    z-index: 2;
}

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

.thumb-item:hover img {
    transform: scale(1.1);
}

/* =========================================
   Filter Bar Component
   ========================================= */

.filter-bar {
    background: var(--bg-card-base);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    margin-bottom: var(--space-6);
    overflow: hidden;
    transition: border-color 0.2s ease;
}

/* Anchor wrapper for floating filter panel */
.filter-bar-anchor {
    position: relative;
}

/* Floating mode — panel hovers above content, no layout shift */
.filter-bar-floating {
    position: absolute;
    top: calc(100% + var(--space-2));
    right: 0;
    left: auto;
    width: 480px;
    max-width: calc(100vw - var(--space-8));
    z-index: 300;
    margin-bottom: 0;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: visible;
    pointer-events: none;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

@media (max-width: 575px) {
    .filter-bar-floating {
        left: 0;
        right: 0;
        width: auto;
        max-width: none;
    }
}

.filter-bar-floating.open {
    pointer-events: auto;
    opacity: 1;
    transform: translateY(0);
}


.filter-bar-floating .filter-bar-body {
    border-top: none;
    border-radius: var(--radius-xl);
}

.filter-bar-floating .filter-bar-body.collapsed {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.filter-bar-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) var(--space-6);
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: var(--text-base);
    text-align: left;
    transition: background 0.2s ease;
}

.filter-bar-header:hover {
    background: var(--bg-surface-2);
}

.filter-bar-header-left {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.filter-bar-title {
    font-weight: 600;
    color: var(--text-primary);
}

.filter-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--primary);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: var(--radius-pill);
    line-height: 1;
}

.filter-bar-chevron {
    color: var(--text-tertiary);
    font-size: 0.8rem;
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.filter-bar-chevron.open {
    transform: rotate(180deg);
}

.filter-bar-body {
    padding: var(--space-5) var(--space-6) var(--space-6);
    border-top: 1px solid var(--border-subtle);
    max-height: 600px;
    opacity: 1;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.25s ease, padding 0.3s ease, border-color 0.25s ease;
}

.filter-bar-body.collapsed {
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    border-top-color: transparent;
}

.filter-form .form-group {
    margin-bottom: 0;
}

.filter-input-search {
    min-width: 180px;
    width: 100%;
}

/* =========================================
   Location Picker
   ========================================= */

.location-search-wrapper {
    position: relative;
}

.location-suggestions {
    position: absolute;
    top: calc(100% + var(--space-1));
    left: 0;
    right: 0;
    background: var(--bg-card-base);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    z-index: 500;
    max-height: 280px;
    overflow-y: auto;
}

.location-suggestion-item {
    padding: var(--space-3) var(--space-4);
    cursor: pointer;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    transition: background 0.15s;
}

.location-suggestion-item:last-child {
    border-bottom: none;
}

.location-suggestion-item:hover,
.location-suggestion-item:focus {
    background: var(--bg-card-hover);
    outline: none;
}

.location-suggestion-item .suggestion-icon {
    color: var(--primary);
    margin-top: 2px;
    flex-shrink: 0;
    font-size: var(--text-sm);
}

.location-suggestion-item .suggestion-name {
    font-weight: 600;
    font-size: var(--text-sm);
    color: var(--text-primary);
    line-height: 1.4;
}

.location-suggestion-item .suggestion-detail {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-top: 2px;
    line-height: 1.3;
}

.location-suggestion-empty {
    padding: var(--space-4);
    text-align: center;
    font-size: var(--text-sm);
    color: var(--text-muted);
}

.location-confirmed-panel {
    background: color-mix(in srgb, var(--success) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--success) 40%, transparent);
    border-radius: var(--radius-md);
    padding: var(--space-3) var(--space-4);
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.location-confirmed-panel .confirmed-icon {
    color: var(--success);
    font-size: var(--text-lg);
    flex-shrink: 0;
}

.location-confirmed-panel .confirmed-body {
    flex: 1;
    min-width: 0;
}

.location-confirmed-panel .confirmed-address {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.location-confirmed-panel .confirmed-coords {
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin-top: 2px;
    font-variant-numeric: tabular-nums;
}

.location-clear-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    transition: color 0.15s, background 0.15s;
    flex-shrink: 0;
    line-height: 1;
}

.location-clear-btn:hover {
    color: var(--text-primary);
    background: var(--bg-surface-3);
}

#location_map {
    height: 220px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    overflow: hidden;
}

.location-readonly-input {
    background: var(--bg-surface-2) !important;
    cursor: default !important;
    color: var(--text-secondary) !important;
}

.location-readonly-input:focus {
    border-color: var(--border-subtle) !important;
    box-shadow: none !important;
}

.location-search-error {
    font-size: var(--text-xs);
    color: var(--danger, #e05252);
    margin-top: var(--space-2);
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.btn.loading .fa-location-crosshairs {
    animation: spin 1s linear infinite;
}

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