/* ============================================
   PrecioClaro — Carbon Design System Tokens
   Themes: light (white) / dark (gray-100)
   ============================================ */

:root,
[data-theme="light"] {
    /* Carbon White Theme */
    --bg:               #ffffff;
    --bg-secondary:     #f4f4f4;
    --bg-tertiary:      #e0e0e0;
    --bg-hover:         rgba(141,141,141,0.12);
    --bg-active:        rgba(141,141,141,0.5);
    --bg-brand:         #0f62fe;
    --bg-brand-hover:   #0353e9;
    --bg-danger:        #da1e28;
    --bg-success:       #198038;
    --bg-warning:       #f1c21b;
    --bg-info:          #0043ce;

    --text-primary:     #161616;
    --text-secondary:   #525252;
    --text-placeholder: #a8a8a8;
    --text-on-color:    #ffffff;
    --text-helper:      #6f6f6f;
    --text-inverse:     #ffffff;

    --border-subtle:    #e0e0e0;
    --border-strong:    #8d8d8d;
    --border-interactive: #0f62fe;

    --link:             #0f62fe;
    --link-hover:       #0043ce;

    --field-bg:         #f4f4f4;
    --field-border:     #8d8d8d;
    --field-focus:      #0f62fe;

    --shadow-sm:        0 1px 2px rgba(0,0,0,0.1);
    --shadow-md:        0 4px 8px rgba(0,0,0,0.1);
    --shadow-lg:        0 8px 24px rgba(0,0,0,0.12);

    --header-bg:        #161616;
    --header-text:      #ffffff;

    --notification-info-bg:    #edf5ff;
    --notification-info-border:#0043ce;
    --notification-success-bg: #defbe6;
    --notification-success-border:#198038;
    --notification-error-bg:   #fff1f1;
    --notification-error-border:#da1e28;
    --notification-warning-bg: #fdf6dd;
    --notification-warning-border:#f1c21b;
}

[data-theme="dark"] {
    /* Carbon Gray 100 Theme */
    --bg:               #161616;
    --bg-secondary:     #262626;
    --bg-tertiary:      #393939;
    --bg-hover:         rgba(141,141,141,0.16);
    --bg-active:        rgba(141,141,141,0.4);
    --bg-brand:         #0f62fe;
    --bg-brand-hover:   #0353e9;
    --bg-danger:        #da1e28;
    --bg-success:       #24a148;
    --bg-warning:       #f1c21b;
    --bg-info:          #4589ff;

    --text-primary:     #f4f4f4;
    --text-secondary:   #c6c6c6;
    --text-placeholder: #6f6f6f;
    --text-on-color:    #ffffff;
    --text-helper:      #a8a8a8;
    --text-inverse:     #161616;

    --border-subtle:    #393939;
    --border-strong:    #6f6f6f;
    --border-interactive: #4589ff;

    --link:             #78a9ff;
    --link-hover:       #a6c8ff;

    --field-bg:         #262626;
    --field-border:     #6f6f6f;
    --field-focus:      #4589ff;

    --shadow-sm:        0 1px 2px rgba(0,0,0,0.3);
    --shadow-md:        0 4px 8px rgba(0,0,0,0.3);
    --shadow-lg:        0 8px 24px rgba(0,0,0,0.4);

    --header-bg:        #262626;
    --header-text:      #f4f4f4;

    --notification-info-bg:    #002d5c;
    --notification-info-border:#4589ff;
    --notification-success-bg: #044317;
    --notification-success-border:#24a148;
    --notification-error-bg:   #520408;
    --notification-error-border:#fa4d56;
    --notification-warning-bg: #3a3000;
    --notification-warning-border:#f1c21b;
}

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--bg);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background 0.2s ease, color 0.2s ease;
}

a {
    color: var(--link);
    text-decoration: none;
}
a:hover {
    color: var(--link-hover);
    text-decoration: underline;
}

/* ============================================
   Carbon UI Shell — Header
   ============================================ */
.shell-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 48px;
    background: var(--header-bg);
    color: var(--header-text);
    z-index: 9000;
    border-bottom: 1px solid var(--border-subtle);
}

.shell-header__inner {
    display: flex;
    align-items: center;
    height: 100%;
    max-width: 100%;
    padding: 0 1rem;
}

.shell-header__logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--header-text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.1px;
    padding: 0 1rem 0 0;
    height: 100%;
    border-right: 1px solid rgba(255,255,255,0.15);
}
.shell-header__logo:hover {
    color: var(--header-text);
    text-decoration: none;
    background: rgba(255,255,255,0.08);
}

.shell-header__nav {
    display: flex;
    align-items: center;
    height: 100%;
    margin-left: 0;
}

.shell-header__link {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 1rem;
    color: var(--header-text);
    font-size: 0.875rem;
    text-decoration: none;
    border-bottom: 3px solid transparent;
    transition: background 0.15s;
}
.shell-header__link:hover {
    background: rgba(255,255,255,0.08);
    color: var(--header-text);
    text-decoration: none;
}
.shell-header__link.active {
    border-bottom-color: var(--bg-brand);
    color: #ffffff;
}

.shell-header__actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
}

.shell-header__user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.shell-header__user-name {
    font-size: 0.875rem;
    color: var(--header-text);
    opacity: 0.85;
}

/* ============================================
   Theme Toggle
   ============================================ */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: transparent;
    border: none;
    color: var(--header-text);
    cursor: pointer;
    transition: background 0.15s;
}
.theme-toggle:hover {
    background: rgba(255,255,255,0.08);
}

[data-theme="light"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun  { display: block; }
[data-theme="dark"]  .icon-sun  { display: none; }
[data-theme="dark"]  .icon-moon { display: block; }

/* ============================================
   Main Content
   ============================================ */
.main-content {
    flex: 1;
    margin-top: 48px;
}

/* ============================================
   Auth Layout (Login, Register, Forgot)
   ============================================ */
.auth-page {
    display: flex;
    min-height: calc(100vh - 48px - 48px);
}

.auth-hero {
    display: none;
    flex: 1;
    background: linear-gradient(135deg, #0f62fe 0%, #0043ce 50%, #002d9c 100%);
    color: #ffffff;
    padding: 4rem;
    justify-content: center;
    align-items: flex-end;
    position: relative;
    overflow: hidden;
}
.auth-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 80%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(255,255,255,0.06) 0%, transparent 70%);
}
.auth-hero__content {
    position: relative;
    max-width: 480px;
}
.auth-hero__content h1 {
    font-size: 2.625rem;
    font-weight: 300;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}
.auth-hero__content p {
    font-size: 1.125rem;
    line-height: 1.6;
    opacity: 0.85;
}

@media (min-width: 1056px) {
    .auth-hero { display: flex; }
}

.auth-form-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--bg);
    max-width: 100%;
}
@media (min-width: 1056px) {
    .auth-form-section {
        max-width: 480px;
    }
}

.auth-form-container {
    width: 100%;
    max-width: 400px;
}

.auth-form-container h2 {
    font-size: 1.75rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.auth-form-container .subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 0.875rem;
}

/* ============================================
   Form Components (Carbon-style)
   ============================================ */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    letter-spacing: 0.32px;
}

.form-group input {
    width: 100%;
    height: 2.5rem;
    padding: 0 1rem;
    font-size: 0.875rem;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--field-bg);
    border: none;
    border-bottom: 1px solid var(--field-border);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.form-group input::placeholder {
    color: var(--text-placeholder);
}
.form-group input:focus {
    border-bottom-color: var(--field-focus);
    box-shadow: inset 0 -1px 0 var(--field-focus);
}
.form-group input.error {
    border-bottom-color: var(--bg-danger);
    box-shadow: inset 0 -1px 0 var(--bg-danger);
}

.form-group .helper-text {
    font-size: 0.75rem;
    color: var(--text-helper);
    margin-top: 0.25rem;
}
.form-group .error-text {
    font-size: 0.75rem;
    color: var(--bg-danger);
    margin-top: 0.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* ============================================
   Buttons (Carbon-style)
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    height: 3rem;
    padding: 0 4rem 0 1rem;
    font-size: 0.875rem;
    font-family: inherit;
    font-weight: 400;
    letter-spacing: 0.16px;
    border: none;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s;
    position: relative;
    text-decoration: none;
    white-space: nowrap;
}

.btn--primary {
    background: var(--bg-brand);
    color: var(--text-on-color);
}
.btn--primary:hover {
    background: var(--bg-brand-hover);
    color: var(--text-on-color);
    text-decoration: none;
}

.btn--secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}
.btn--secondary:hover {
    background: var(--border-strong);
    text-decoration: none;
}

.btn--ghost {
    background: transparent;
    color: var(--link);
    padding: 0 1rem;
}
.btn--ghost:hover {
    background: var(--bg-hover);
    text-decoration: none;
}

.btn--danger {
    background: var(--bg-danger);
    color: var(--text-on-color);
}

.btn--sm {
    height: 2rem;
    padding: 0 1rem;
    font-size: 0.75rem;
}

.btn--full {
    width: 100%;
    padding: 0 1rem;
}

/* ============================================
   Notifications (Carbon-style inline)
   ============================================ */
.notification {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1rem;
    margin: 1rem 2rem;
    border-left: 3px solid;
    font-size: 0.875rem;
    animation: slideDown 0.3s ease;
}

.notification--info {
    background: var(--notification-info-bg);
    border-left-color: var(--notification-info-border);
    color: var(--text-primary);
}
.notification--success {
    background: var(--notification-success-bg);
    border-left-color: var(--notification-success-border);
    color: var(--text-primary);
}
.notification--error {
    background: var(--notification-error-bg);
    border-left-color: var(--notification-error-border);
    color: var(--text-primary);
}
.notification--warning {
    background: var(--notification-warning-bg);
    border-left-color: var(--notification-warning-border);
    color: var(--text-primary);
}

.notification__close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0 0 0 1rem;
    line-height: 1;
}

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

/* ============================================
   Dashboard
   ============================================ */
.dashboard-grid {
    padding: 2rem;
    max-width: 1584px;
    margin: 0 auto;
}

.dashboard-welcome {
    margin-bottom: 2rem;
}
.dashboard-welcome h1 {
    font-size: 2.625rem;
    font-weight: 300;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}
.dashboard-welcome p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1px;
    background: var(--border-subtle);
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg);
    padding: 1.5rem;
}
.stat-card__label {
    font-size: 0.75rem;
    letter-spacing: 0.32px;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}
.stat-card__value {
    font-size: 2.25rem;
    font-weight: 300;
    color: var(--text-primary);
    line-height: 1.2;
}
.stat-card__helper {
    font-size: 0.75rem;
    color: var(--text-helper);
    margin-top: 0.5rem;
}

.content-section {
    background: var(--bg-secondary);
    padding: 1.5rem;
    margin-bottom: 1px;
}
.content-section h3 {
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

/* Data table placeholder */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.data-table thead {
    background: var(--bg-tertiary);
}
.data-table th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 0.16px;
    text-transform: uppercase;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-subtle);
}
.data-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-secondary);
}
.data-table tbody tr:hover {
    background: var(--bg-hover);
}

/* Sortable headers */
.sort-link {
    color: var(--text-primary);
    text-decoration: none;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}
.sort-link:hover {
    color: var(--bg-brand);
    text-decoration: none;
}
.sort-link.active {
    color: var(--bg-brand);
}

/* ============================================
   Landing Page
   ============================================ */
.landing-hero {
    background: linear-gradient(135deg, #0f62fe 0%, #0043ce 50%, #002d9c 100%);
    color: #ffffff;
    padding: 6rem 2rem 4rem;
    position: relative;
    overflow: hidden;
}
.landing-hero::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -20%;
    width: 70%;
    height: 180%;
    background: radial-gradient(ellipse, rgba(255,255,255,0.05) 0%, transparent 70%);
}
.landing-hero__inner {
    max-width: 1584px;
    margin: 0 auto;
    position: relative;
}
.landing-hero h1 {
    font-size: 3.375rem;
    font-weight: 300;
    line-height: 1.15;
    max-width: 680px;
    margin-bottom: 1.5rem;
}
.landing-hero p {
    font-size: 1.25rem;
    line-height: 1.6;
    max-width: 560px;
    margin-bottom: 2.5rem;
    opacity: 0.85;
}
.landing-hero .btn--primary {
    background: #ffffff;
    color: #0f62fe;
}
.landing-hero .btn--primary:hover {
    background: #e0e0e0;
}
.landing-hero .btn--ghost {
    color: #ffffff;
    border: 1px solid rgba(255,255,255,0.4);
    margin-left: 1rem;
}
.landing-hero .btn--ghost:hover {
    background: rgba(255,255,255,0.1);
}

.landing-features {
    padding: 4rem 2rem;
    max-width: 1584px;
    margin: 0 auto;
}
.landing-features h2 {
    font-size: 1.75rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}
.landing-features .subtitle {
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-size: 1rem;
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1px;
    background: var(--border-subtle);
}
.feature-card {
    background: var(--bg);
    padding: 1.5rem;
}
.feature-card__icon {
    width: 32px;
    height: 32px;
    color: var(--bg-brand);
    margin-bottom: 1rem;
}
.feature-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}
.feature-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.landing-markets {
    padding: 4rem 2rem;
    background: var(--bg-secondary);
}
.landing-markets__inner {
    max-width: 1584px;
    margin: 0 auto;
}
.landing-markets h2 {
    font-size: 1.75rem;
    font-weight: 400;
    margin-bottom: 2rem;
    color: var(--text-primary);
}
.markets-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.tag {
    display: inline-flex;
    align-items: center;
    height: 1.5rem;
    padding: 0 0.5rem;
    font-size: 0.75rem;
    letter-spacing: 0.32px;
    border-radius: 62.5rem;
    background: var(--bg-brand);
    color: var(--text-on-color);
}
.tag--outline {
    background: transparent;
    border: 1px solid var(--border-strong);
    color: var(--text-primary);
}
.tag--green {
    background: var(--bg-success);
}
.tag--teal {
    background: #009d9a;
}

/* ============================================
   Footer
   ============================================ */
.shell-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-subtle);
    padding: 1rem 2rem;
}
.shell-footer__inner {
    max-width: 1584px;
    margin: 0 auto;
    font-size: 0.75rem;
    color: var(--text-helper);
}

/* ============================================
   Modal / Dialog (Carbon-style)
   ============================================ */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(22,22,22,0.7);
    z-index: 9500;
    align-items: center;
    justify-content: center;
}
.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

.modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
}
.modal__header h2 {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text-primary);
}
.modal__close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
}

.modal__body {
    padding: 1.5rem;
}

.modal__footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-subtle);
}

/* ============================================
   Market Tabs
   ============================================ */
.market-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 1.5rem;
}
.market-tab {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
}
.market-tab:hover {
    color: var(--text-primary);
    text-decoration: none;
    background: var(--bg-hover);
}
.market-tab.active {
    color: var(--text-primary);
    border-bottom-color: var(--bg-brand);
    font-weight: 600;
}

/* ============================================
   Filter Bar
   ============================================ */
.filter-bar {
    background: var(--bg-secondary);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-subtle);
}
.filter-bar__form {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-end;
}
.filter-bar__field {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
    min-width: 160px;
}
.filter-bar__field label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    letter-spacing: 0.32px;
}
.filter-bar__field select,
.filter-bar__field input[type="date"] {
    height: 2.5rem;
    padding: 0 0.75rem;
    font-size: 0.875rem;
    font-family: inherit;
    background: var(--field-bg);
    color: var(--text-primary);
    border: none;
    border-bottom: 1px solid var(--field-border);
    outline: none;
    width: 100%;
}
.filter-bar__field select:focus,
.filter-bar__field input[type="date"]:focus {
    border-bottom-color: var(--field-focus);
}

/* ============================================
   Empty State
   ============================================ */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    text-align: center;
}
.empty-state h3 {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--text-primary);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}
.empty-state p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    max-width: 400px;
}

/* ============================================
   Results Header
   ============================================ */
.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}
.results-count {
    font-size: 0.75rem;
    color: var(--text-helper);
    letter-spacing: 0.32px;
}

/* Table container for dashboard */
.table-container {
    border: 1px solid var(--border-subtle);
    overflow-x: auto;
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    font-size: 0.75rem;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-subtle);
}
.pagination__pages {
    display: flex;
    gap: 0.25rem;
}
.pagination__pages a,
.pagination__pages span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.5rem;
    font-size: 0.75rem;
    text-decoration: none;
    color: var(--text-secondary);
    transition: background 0.15s;
}
.pagination__pages a:hover {
    background: var(--bg-hover);
    text-decoration: none;
}
.pagination__pages .active {
    background: var(--bg-brand);
    color: var(--text-on-color);
    font-weight: 600;
}

/* ============================================
   Utilities
   ============================================ */
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

/* ============================================
   Mobile Menu Toggle
   ============================================ */
.mobile-menu-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: transparent;
    border: none;
    color: var(--header-text);
    cursor: pointer;
}
.mobile-menu-toggle svg line {
    stroke: currentColor;
    stroke-width: 2;
    transition: transform 0.2s, opacity 0.2s;
    transform-origin: center;
}
.mobile-menu-toggle.active svg .line1 {
    transform: translateY(6px) rotate(45deg);
}
.mobile-menu-toggle.active svg .line2 {
    opacity: 0;
}
.mobile-menu-toggle.active svg .line3 {
    transform: translateY(-6px) rotate(-45deg);
}

/* Mobile Nav Overlay */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    inset: 48px 0 0 0;
    background: var(--bg);
    z-index: 8999;
    flex-direction: column;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
.mobile-nav-overlay.active {
    display: flex;
}
.mobile-nav-overlay a {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    color: var(--text-primary);
    text-decoration: none;
    border-bottom: 1px solid var(--border-subtle);
}
.mobile-nav-overlay a:hover,
.mobile-nav-overlay a.active {
    background: var(--bg-hover);
}
.mobile-nav-overlay .mobile-nav__user {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-secondary);
}
.mobile-nav-overlay .mobile-nav__user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}
.mobile-nav-overlay .mobile-nav__user-email {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Admin dropdown in mobile nav */
.mobile-nav__parent {
    display: flex;
    align-items: center;
    cursor: pointer;
}
.mobile-nav__parent.open svg {
    transform: rotate(180deg);
}
.mobile-nav__children {
    display: none;
    flex-direction: column;
    background: var(--bg-secondary);
}
.mobile-nav__children.open {
    display: flex;
}
.mobile-nav__children a {
    padding-left: 2.5rem;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-subtle);
}
.mobile-nav__children a:hover {
    color: var(--text-primary);
}

/* ============================================
   Mobile Price Cards (replaces table)
   ============================================ */
.price-cards {
    display: none;
    flex-direction: column;
    gap: 0.5rem;
}
.price-card {
    background: var(--bg);
    border: 1px solid var(--border-subtle);
    padding: 1rem;
}
.price-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}
.price-card__product {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}
.price-card__price {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--bg-brand);
    white-space: nowrap;
    margin-left: 1rem;
}
.price-card__details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.375rem 1rem;
}
.price-card__detail {
    display: flex;
    flex-direction: column;
}
.price-card__detail-label {
    font-size: 0.6875rem;
    color: var(--text-helper);
    letter-spacing: 0.32px;
    text-transform: uppercase;
}
.price-card__detail-value {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    margin-top: 0.125rem;
}

/* ============================================
   Responsive — Tablet (max 1056px)
   ============================================ */
@media (max-width: 1056px) {
    .landing-hero h1 { font-size: 2.625rem; }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   Responsive — Mobile (max 672px)
   ============================================ */
@media (max-width: 672px) {

    /* --- Header --- */
    .mobile-menu-toggle { display: flex; }
    .shell-header__nav { display: none; }
    .shell-header__user { display: none; }
    .theme-toggle { order: -1; }

    /* --- Landing --- */
    .landing-hero { padding: 3rem 1.25rem 2.5rem; }
    .landing-hero h1 { font-size: 1.75rem; }
    .landing-hero p { font-size: 0.9375rem; margin-bottom: 1.5rem; }
    .landing-hero .btn { height: 2.75rem; font-size: 0.8125rem; }
    .landing-hero .btn--ghost { margin-left: 0; margin-top: 0.5rem; }
    .landing-features { padding: 2rem 1.25rem; }
    .landing-features h2 { font-size: 1.25rem; }
    .features-grid { grid-template-columns: 1fr; }
    .landing-markets { padding: 2rem 1.25rem; }
    .landing-markets h2 { font-size: 1.25rem; }

    /* --- Auth --- */
    .auth-form-section { padding: 1.5rem 1.25rem; }
    .auth-form-container h2 { font-size: 1.375rem; }
    .form-row { grid-template-columns: 1fr; }
    .btn { height: 2.75rem; padding: 0 1rem; font-size: 0.8125rem; }

    /* --- Dashboard --- */
    .dashboard-grid { padding: 1.25rem; }
    .dashboard-welcome { margin-bottom: 1.25rem; }
    .dashboard-welcome h1 { font-size: 1.5rem; }
    .dashboard-welcome p { font-size: 0.875rem; }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        margin-bottom: 1.25rem;
    }
    .stat-card { padding: 1rem; }
    .stat-card__value { font-size: 1.5rem; }
    .stat-card__label { font-size: 0.6875rem; }
    .stat-card__helper { font-size: 0.6875rem; }

    /* --- Market Tabs --- */
    .market-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        margin: 0 -1.25rem 1.25rem;
        padding: 0 1.25rem;
    }
    .market-tabs::-webkit-scrollbar { display: none; }
    .market-tab {
        padding: 0.625rem 1rem;
        font-size: 0.8125rem;
        white-space: nowrap;
        flex-shrink: 0;
    }
    .market-tab .badge { font-size: 0.5625rem; height: 1rem; padding: 0 0.375rem; }

    /* --- Filters --- */
    .filter-bar {
        margin: 0 -1.25rem 1.25rem;
        padding: 1rem 1.25rem;
        border-left: none;
        border-right: none;
    }
    .filter-bar__form {
        flex-direction: column;
        gap: 0.75rem;
    }
    .filter-bar__field {
        min-width: 100%;
    }
    .filter-bar__field select,
    .filter-bar__field input[type="date"] {
        height: 2.75rem;
        font-size: 1rem;
    }

    /* --- Modals go full screen on mobile --- */
    .modal {
        max-width: 100%;
        max-height: 100vh;
        height: 100vh;
    }
    .modal__body {
        padding: 1.25rem;
    }

    /* --- Dashboard: Data Tables → Cards on mobile --- */
    .dashboard-grid .data-table { display: none; }
    .price-cards { display: flex; }
    .dashboard-grid .table-container { border: none; overflow: visible; }

    /* --- Results --- */
    .results-header { margin-bottom: 0.75rem; }
    .results-count { font-size: 0.8125rem; }

    /* --- Pagination --- */
    .pagination {
        flex-direction: column;
        gap: 0.75rem;
        align-items: center;
        padding: 1rem 0;
        border-top: none;
    }
    .pagination__pages a,
    .pagination__pages span {
        min-width: 2.5rem;
        height: 2.5rem;
    }

    /* --- Empty State --- */
    .empty-state { padding: 3rem 1.25rem; }
    .empty-state svg { width: 48px; height: 48px; }
    .empty-state h3 { font-size: 1.125rem; }

    /* --- Footer --- */
    .shell-footer { padding: 1rem 1.25rem; }
}
