/* ============================================================================
   BlinkR 2.0 - Base CSS & Theme Variables
   ============================================================================
   Copyright (c) 2025 BlinkRQuotes
   All Rights Reserved.

   Licensed under the MIT License (see LICENSE file)
   https://github.com/rubydahlia74-creator/blinkr-team-system2

   FILE: base.css - Core CSS variables and base styles
   VERSION: 2.0.0

   DESCRIPTION:
   Foundation CSS with theme variables driven by: <html data-theme="...">
   Provides base styling for the BlinkR application.

   UNAUTHORIZED COPYING, MODIFICATION, OR DISTRIBUTION IS PROHIBITED
   ============================================================================ */
:root {
    /* Fallback defaults if no data-theme is set */
    --bg-app: #050714;
    --bg-header: #060910;
    --bg-surface: #0b1020;
    --bg-surface-soft: #151827;

    --text-primary: #e5e7eb;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;

    --border-subtle: #1f2933;

    --accent-primary: #6366f1;
    --accent-soft: rgba(99, 102, 241, 0.16);

    --logo-accent-1: #00ffc3;
    --logo-accent-2: #7d5cff;
}

/* Dark (default) - Softer Navy Theme */
:root[data-theme="dark"] {
    --bg-app: #020714;
    --bg-header: #071528;
    --bg-surface: #0d1b30;
    --bg-surface-soft: #132139;

    --text-primary: #f9fafb;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;

    --border-subtle: rgba(148, 163, 184, 0.2);

    --accent-primary: #10b981;
    --accent-soft: rgba(16, 185, 129, 0.15);

    --logo-accent-1: #10b981;
    --logo-accent-2: #34d399;

    --button-text-on-accent: #041014;
}

/* Natural */
:root[data-theme="natural"] {
    /* Coffeehouse / mocha base */
    --bg-app: #181311;          /* page background – deep mocha */
    --bg-header: #261d17;       /* header/nav – slightly darker band */
    --bg-surface: #2e231c;      /* cards/panels – espresso */
    --bg-surface-soft: #3a2b22; /* softer hover/secondary surfaces */

    /* Text */
    --text-primary: #f9f3e7;    /* warm cream text */
    --text-secondary: #e2d5c4;
    --text-muted: #b3a79a;

    /* Borders */
    --border-subtle: rgba(243, 232, 216, 0.26);

    /* Accent (buttons, active tabs) – soft olive/green, not neon */
    --accent-primary: #6ea66f;
    --accent-soft: rgba(110, 166, 111, 0.24);

    /* Fall color variations */
    --accent-secondary: #c8833a;        /* muted burnt orange */
    --accent-secondary-soft: rgba(200, 131, 58, 0.25);
    --chip-bg: #3a2b22;                 /* pill backgrounds */
    --chip-border: rgba(243, 232, 216, 0.3);
    --link-color: #7fc3b8;              /* muted teal */
    --link-hover: #a0d2c9;

    /* Logo / highlight accents */
    --logo-accent-1: #6ea66f;
    --logo-accent-2: #5bc0de;   /* muted cyan highlight (charts, etc.) */

    /* Make sure buttons read well on accent */
    --button-text-on-accent: #0b120c;
}

/* Low Blue Light (warm) */
:root[data-theme="lowbluelight"] {
    --bg-app: #1c150f;
    --bg-header: #241b12;
    --bg-surface: #2b2117;
    --bg-surface-soft: #33261b;

    --text-primary: #fcefdc;
    --text-secondary: #e0c7a5;
    --text-muted: #c8ab88;

    --border-subtle: #3b2a1a;

    --accent-primary: #f59e0b;   /* amber */
    --accent-soft: rgba(245, 158, 11, 0.22);

    --logo-accent-1: #facc15;
    --logo-accent-2: #fb923c;
}

/* Olive 70s */
:root[data-theme="olive70"] {
    /* Retro olive 70s – muted green base, orange accents */
    --bg-app: #14160f;           /* deep muted olive */
    --bg-header: #191b11;        /* slightly darker olive for header */
    --bg-surface: #1c200f;       /* cards: olive but not neon */
    --bg-surface-soft: #232812;  /* softer inner panels */

    --text-primary: #f7f5e7;     /* creamy off-white */
    --text-secondary: #d7df9e;
    --text-muted: #a7b06b;

    --border-subtle: #3a4223;

    /* ACCENTS ARE ORANGE, not green */
    --accent-primary: #f97316;   /* bright orange for buttons/tabs */
    --accent-soft: rgba(249, 115, 22, 0.25);

    /* Logo keeps olive + yellow mix */
    --logo-accent-1: #a3b82a;
    --logo-accent-2: #fbbf24;
}

/* Pastel */
:root[data-theme="pastel"] {
    --bg-app: #10121a;
    --bg-header: #151827;
    --bg-surface: #181b2b;
    --bg-surface-soft: #202538;

    --text-primary: #faf5ff;
    --text-secondary: #e9d5ff;
    --text-muted: #c4b5fd;

    --border-subtle: #30324a;

    --accent-primary: #f472b6;   /* pink */
    --accent-soft: rgba(244, 114, 182, 0.24);

    --logo-accent-1: #a78bfa;
    --logo-accent-2: #f9a8d4;
}

/* Art Deco Dark */
:root[data-theme="artdeco-dark"] {
    --bg-app: #05060a;     /* almost black */
    --bg-header: #070914;
    --bg-surface: #0b0f18;
    --bg-surface-soft: #141925;

    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;

    --border-subtle: #1f2937;

    --accent-primary: #eab308;   /* gold */
    --accent-soft: rgba(234, 179, 8, 0.25);

    --logo-accent-1: #facc15;    /* gold */
    --logo-accent-2: #22d3ee;    /* cyan */
}

/* Art Deco Light (TRUE light mode) */
:root[data-theme="artdeco-light"] {
    --bg-app: #f7f5f0;           /* light cream */
    --bg-header: #efe2cf;        /* warm header */
    --bg-surface: #ffffff;       /* white cards */
    --bg-surface-soft: #f3e7d6;

    --text-primary: #171717;     /* dark text */
    --text-secondary: #4b5563;
    --text-muted: #6b7280;

    --border-subtle: #e0d2bd;

    --accent-primary: #b45309;   /* bronze */
    --accent-soft: rgba(180, 83, 9, 0.18);

    --logo-accent-1: #b45309;
    --logo-accent-2: #f97316;
}

/* === Global Theme Transition Layer & Variables === */
:root {
    --logo-accent-1: #00ffc3;
    --logo-accent-2: #7d5cff;
    transition: all 0.35s ease-in-out !important;

    /* Base color palette */
    --color-background: #1a1a1a;
    --color-surface: #2d2d2d;
    --color-primary: #4a9eff;
    --color-text: #ffffff;
    --color-text-secondary: #b0b0b0;
    --color-border: #444444;
    --color-error: #ff4444;
    --color-success: #44ff88;

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

    /* Typography */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.25rem;
    --font-size-xl: 1.5rem;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
}

/* BLINKR LOGO — gradient ONLY on text */
.blinkr-logo,
.logo-text {
    display: inline-block;
    font-size: 1.8rem;
    font-weight: 600;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    background-image: linear-gradient(90deg, var(--logo-accent-1), var(--logo-accent-2));
    background-size: 100%;
    background-repeat: no-repeat;

    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;

    padding: 0;
    margin: 0;
    line-height: 1.1;
    height: auto;

    transition: background-image 0.4s ease;
}

/* Body and HTML */

html {
    width: 100%;
    height: 100%;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: clamp(14px, 0.95vw + 10px, 16px);
    color: var(--text-primary);
    background-color: var(--bg-app);
    line-height: 1.6;
}

body {
    width: 100%;
    height: 100%;
    color: var(--text-primary);
    background-color: var(--bg-app);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 1rem;
    line-height: 1.4;
    overflow-x: hidden;
}

/* Top Navigation */
#topNav {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

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

.nav-brand {
    font-size: var(--font-size-lg);
    font-weight: 600;
/* --- BlinkR Logo Gradient (isolated, safe) --- */
#navLogo,
.nav-brand {
    background: linear-gradient(90deg, var(--logo-start), var(--logo-end));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;

    font-family: 'Inter', 'Poppins', sans-serif;
    font-weight: 300;
    font-size: 1.8rem;
    letter-spacing: 0.5px;
    display: inline-block;
}
}

.nav-menu {
    display: flex;
    gap: var(--spacing-md);
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: 4px;
    transition: all var(--transition-fast);
}

.nav-link:hover {
    color: var(--text-primary);
    background-color: var(--accent-soft);
}

.nav-link.active {
    color: var(--accent-primary);
    background-color: var(--accent-soft);
}

.nav-user {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
}

/* Main App Container */
#app {
    min-height: calc(100vh - 60px);
    padding: var(--spacing-lg);
    max-width: 1400px;
    margin: 0 auto;
    background: var(--bg-surface);
}

/* Common Elements */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: var(--spacing-md);
    font-weight: 600;
    line-height: 1.3;
}

h1 {
    font-size: var(--font-size-xl);
    font-size: 1.5rem;
}

h2 {
    font-size: var(--font-size-lg);
    font-size: 1.3rem;
}

h3 {
    font-size: 1.1rem;
}

h4 {
    font-size: 1rem;
}

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

/* Buttons */
button {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    padding: var(--spacing-sm) var(--spacing-md);
    border: none;
    border-radius: 4px;
        background-color: var(--accent-primary);
        color: #fff;
    cursor: pointer;
    transition: all var(--transition-fast);
}

button:hover {
    background-color: var(--accent-soft);
    filter: brightness(1.1);
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Error Display */
.module-error {
    padding: var(--spacing-xl);
    background-color: var(--bg-surface-soft);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    text-align: center;
}

.module-error h2 {
    color: var(--accent-primary);
}

.module-error button {
    margin-top: var(--spacing-lg);
}

/* Loading State */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: var(--color-text-secondary);
}

/* Utility Classes */
.text-center {
    text-align: center;
}

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

.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }

.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }

.p-1 { padding: var(--spacing-sm); }
.p-2 { padding: var(--spacing-md); }
.p-3 { padding: var(--spacing-lg); }

/* BlinkR Gradient Logo */
.logo-text {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 1.7rem;
    background-image: linear-gradient(90deg, var(--logo-accent-1), var(--logo-accent-2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    transition: background 0.5s ease;
}

/* ============================================================
   APP SHELL LAYOUT
   ============================================================ */

.app-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-app);
}

/* Preload overlay */
#blinkrPreload {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-app);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.4s ease;
}

#blinkrPreload.fade-out {
    opacity: 0;
}

/* ============================================================
   HEADER
   ============================================================ */

.app-header,
#blinkrHeader {
    padding: 12px 32px;
    background: var(--bg-header);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-subtle);
    position: sticky;
    top: 0;
    z-index: 100;
}

.app-header-left {
    display: flex;
    align-items: center;
    gap: 16px;
    flex: 0 0 auto;
}

.app-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}

/* Logo image */
.logo-preview {
    max-height: 48px;
    max-width: 120px;
    object-fit: contain;
}

/* Company branding */
.company-branding {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.company-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    padding: 0;
    line-height: 1.2;
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.version-label {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--text-secondary);
    opacity: 0.7;
}

.company-tagline {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin: 0;
    padding: 0;
    line-height: 1.2;
}

/* Status pill */
.system-status-pill,
.status-banner {
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--bg-surface-soft);
    border: 1px solid var(--border-subtle);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

#blinkrStatus {
    color: var(--text-secondary);
}

#blinkrStatus[data-status-type="info"] {
    color: var(--accent-primary);
}

#blinkrStatus[data-status-type="warning"] {
    color: #f59e0b;
}

#blinkrStatus[data-status-type="error"] {
    color: #ef4444;
}

#blinkrStatus[data-status-type="success"] {
    color: #10b981;
}

/* Reminder bell button */
.header-reminder-btn {
    position: relative;
    background: transparent;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 8px 10px;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-reminder-btn:hover {
    background: var(--bg-surface-soft);
    border-color: var(--accent-primary);
}

.header-reminder-icon {
    width: 20px;
    height: 20px;
    fill: var(--text-secondary);
}

.header-reminder-count {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--accent-primary);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

.header-reminder-count:empty {
    display: none;
}


/* BLINKR LOGO — gradient ONLY on text */
.blinkr-logo,
.logo-text {
    display: inline-block;
    font-size: 1.8rem;
    font-weight: 600;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    background-image: linear-gradient(90deg, var(--logo-accent-1), var(--logo-accent-2));
    background-size: 100%;
    background-repeat: no-repeat;

    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;

    padding: 0;
    margin: 0;
    line-height: 1.1;
    height: auto;

    transition: background-image 0.4s ease;
}

/* Art Deco Dark floral background */
:root[data-theme="artdeco-dark"] body {
  background-color: var(--bg-app);
  color: var(--text-primary);
  /* Subtle dark floral / geometric pattern */
  background-image:
    radial-gradient(circle at 0 0, rgba(250, 204, 21, 0.08) 0, transparent 55%),
    radial-gradient(circle at 100% 0, rgba(45, 212, 191, 0.06) 0, transparent 55%),
    radial-gradient(circle at 0 100%, rgba(59, 130, 246, 0.04) 0, transparent 55%),
    repeating-linear-gradient(
      135deg,
      rgba(15, 23, 42, 0.0) 0,
      rgba(15, 23, 42, 0.0) 18px,
      rgba(234, 179, 8, 0.05) 18px,
      rgba(234, 179, 8, 0.05) 19px
    );
  background-size: auto, auto, auto, 120px 120px;
  background-attachment: fixed;
}

/* Art Deco Light floral background */
:root[data-theme="artdeco-light"] body {
  background-color: var(--bg-app);
  color: var(--text-primary);
  /* Light floral / deco-inspired pattern */
  background-image:
    radial-gradient(circle at 0 0, rgba(180, 83, 9, 0.10) 0, transparent 55%),
    radial-gradient(circle at 100% 0, rgba(217, 119, 6, 0.06) 0, transparent 55%),
    radial-gradient(circle at 0 100%, rgba(14, 165, 233, 0.05) 0, transparent 55%),
    repeating-linear-gradient(
      135deg,
      rgba(248, 250, 252, 0.0) 0,
      rgba(248, 250, 252, 0.0) 22px,
      rgba(234, 179, 8, 0.08) 22px,
      rgba(234, 179, 8, 0.08) 23px
    );
  background-size: auto, auto, auto, 140px 140px;
  background-attachment: fixed;
}

/* Art Deco Dark SVG background */
:root[data-theme="artdeco-dark"] body {
  background-color: var(--bg-app);
  color: var(--text-primary);
    background-image: url("../img/artdeco-dark-bg.svg");
  background-repeat: repeat;
  background-size: 480px 480px;
  background-attachment: fixed;
}

/* Art Deco Light SVG background */
:root[data-theme="artdeco-light"] body {
  background-color: var(--bg-app);
  color: var(--text-primary);
    background-image: url("../img/artdeco-light-bg.svg");
  background-repeat: repeat;
  background-size: 480px 480px;
  background-attachment: fixed;
}

/* ============================================================
   NAVIGATION
   ============================================================ */

.app-nav {
    padding: 8px 32px;
    background: var(--bg-header);
    border-bottom: 1px solid var(--border-subtle);
}

.nav-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Tab buttons - pill style */
.tab-button,
button[data-route] {
    position: relative;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid transparent;
    background-color: var(--bg-surface-soft);
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Tab icon badge (data-icon) */
.tab-button::before {
    content: attr(data-icon);
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-muted);
    transition: all var(--transition-fast);
    min-width: 22px;
    text-align: center;
}

.tab-button:hover,
button[data-route]:hover {
    background-color: var(--accent-soft);
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.tab-button:hover::before {
    background: rgba(16, 185, 129, 0.3);
    color: var(--accent-primary);
}

.tab-button.active,
button[data-route].active {
    background-color: var(--accent-primary);
    color: var(--button-text-on-accent);
    border-color: var(--accent-primary);
    font-weight: 600;
}

.tab-button.active::before {
    background: rgba(0, 0, 0, 0.25);
    color: var(--button-text-on-accent);
}

/* ============================================================
   MAIN CONTENT AREA
   ============================================================ */

.app-main,
#blinkrMain {
    flex: 1;
    padding: 16px 12px 24px;
    background: var(--bg-app);
}

.app-main-inner {
    max-width: 1320px;
    margin: 0 auto;
}

#app {
    width: 100%;
    min-height: calc(100vh - 260px);
}

/* ============================================================
   CARD STYLES
   ============================================================ */

.module-card,
.rfq-card,
.control-panel,
.estimator-panel,
.quotes-layout,
.panel,
.dashboard-layout,
.projects-layout,
.control-section {
    background-color: var(--bg-surface);
    color: var(--text-primary);
    border-radius: 10px;
    padding: 18px 20px;
    margin-bottom: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-subtle);
}

/* Control panel specific spacing */
.control-panel .form-row,
.form-row {
    margin-bottom: 14px;
}

.control-panel label,
.form-row label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.control-panel input,
.control-panel select,
.control-panel textarea,
.estimator-panel input,
.estimator-panel select,
.estimator-panel textarea {
    width: 100%;
    max-width: 360px;
    padding: 8px 12px;
    background: var(--bg-surface-soft);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.95rem;
    box-sizing: border-box;
}

.control-panel h3 {
    margin-top: 24px;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.control-panel hr {
    margin: 24px 0;
    border: none;
    border-top: 1px solid var(--border-subtle);
}

/* ============================================================
   FOOTER
   ============================================================ */

.app-footer,
.blinkrFooter {
    padding: 8px 32px;
    background: var(--bg-header);
    border-top: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 0.75rem;
    text-align: center;
    opacity: 0.85;
}

.app-footer #buildMeta,
.blinkrFooter #buildMeta {
    color: var(--text-secondary);
    font-weight: 500;
}

/* ============================================================
   SYSTEM LOG (Old Layout Port)
   ============================================================ */

#system-log {
    position: fixed;
    bottom: 20px;
    right: 20px;
    max-width: 400px;
    max-height: 200px;
    overflow-y: auto;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 12px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    z-index: 1000;
    opacity: 0.9;
    transition: opacity var(--transition-fast);
    display: none; /* Hidden by default */
}

#system-log:not(:empty) {
    display: block;
}

#system-log:hover {
    opacity: 1;
}

/* Primary buttons and nav links */
.primary-button, .nav-tab, .nav-button, .nav-link {
  color: var(--button-text-on-accent);
}

.primary-button:hover, .nav-tab:hover, .nav-button:hover, .nav-link:hover {
  color: var(--button-text-on-accent);
  background-color: var(--accent-soft);
}

/* ============================================================
   DATA TOOLS - FILE INGESTION HUB
   ============================================================ */

.data-ingestion-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
    gap: 20px;
    margin-top: 16px;
}

.data-dropzone-panel,
.data-list-panel {
    background: var(--bg-surface-soft);
    border-radius: 8px;
    padding: 16px;
    border: 1px solid var(--border-subtle);
}

.data-dropzone {
    border: 2px dashed var(--border-subtle);
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--bg-surface);
}

.data-dropzone:hover {
    border-color: var(--accent-primary);
    background: var(--accent-soft);
}

.data-dropzone.dragover {
    border-color: var(--accent-primary);
    background: var(--accent-soft);
    transform: scale(1.02);
}

.data-dropzone p {
    margin: 8px 0;
    color: var(--text-secondary);
}

.data-dropzone-hint {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.data-upload-meta {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.data-upload-meta label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.data-upload-meta select,
.data-upload-meta textarea {
    padding: 8px 12px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.data-filter-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.data-filter-bar label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.data-filter-bar select {
    padding: 6px 10px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.data-empty-state {
    text-align: center;
    color: var(--text-muted);
    padding: 40px 20px;
    font-style: italic;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.data-table th {
    text-align: left;
    padding: 10px 12px;
    background: var(--bg-surface);
    color: var(--text-secondary);
    font-weight: 600;
    border-bottom: 2px solid var(--border-subtle);
}

.data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-primary);
}

.data-table tbody tr:hover {
    background: var(--bg-surface);
}

.doc-type-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.doc-type-rfq {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.doc-type-po {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

.doc-type-shipping {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.doc-type-dfm {
    background: rgba(139, 92, 246, 0.2);
    color: #a78bfa;
}

.doc-type-other {
    background: rgba(107, 114, 128, 0.2);
    color: #9ca3af;
}

.btn-delete {
    padding: 4px 10px;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.btn-delete:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: #ef4444;
}

/* ============================================================
   TABLE SCROLLING & RESPONSIVE CONTAINERS
   ============================================================ */

.table-wrapper {
    width: 100%;
    overflow-x: auto;
}

.rfq-card,
.data-list-panel,
.quotes-layout,
.projects-layout,
.dashboard-layout {
    overflow-x: auto;
}

/* ============================================================
   LINKS - GLOBAL & NATURAL THEME TEAL
   ============================================================ */

a {
    color: var(--link-color, var(--accent-primary));
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--link-hover, var(--accent-primary));
    text-decoration: underline;
}

/* ============================================================
   STATUS PILLS & BADGES
   ============================================================ */

:root[data-theme="natural"] .system-status-pill,
:root[data-theme="natural"] .status-banner {
    border-color: var(--accent-secondary-soft);
    background-color: rgba(200, 131, 58, 0.18);
    color: var(--text-primary);
}

.status-badge {
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 0.75rem;
    border: 1px solid var(--border-subtle);
    background-color: var(--bg-surface-soft);
    color: var(--text-secondary);
    display: inline-block;
}

:root[data-theme="natural"] .status-badge--won,
:root[data-theme="natural"] .status-badge--complete {
    border-color: var(--accent-primary);
    background-color: var(--accent-soft);
    color: var(--button-text-on-accent);
}

:root[data-theme="natural"] .status-badge--new,
:root[data-theme="natural"] .status-badge--hot,
:root[data-theme="natural"] .status-badge--urgent {
    border-color: var(--accent-secondary);
    background-color: var(--accent-secondary-soft);
    color: var(--text-primary);
}

/* ============================================================
   NATURAL THEME - NAV TAB HOVER (BURNT ORANGE)
   ============================================================ */

:root[data-theme="natural"] button[data-route]:hover:not(.active),
:root[data-theme="natural"] .tab-button:hover:not(.active) {
    background-color: var(--accent-secondary-soft);
    border-color: var(--accent-secondary);
}

/* ============================================================
   CAD VIEWER STYLES (ESTIMATORS MODULE)
   ============================================================ */

.estimator-cad-panel {
    grid-column: 1 / -1; /* Full width in grid */
}

.cad-viewer-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cad-upload-section {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
}

.cad-file-name {
    flex: 1;
    margin: 0;
    color: var(--text-secondary);
    font-style: italic;
}

.cad-viewer-container {
    min-height: 400px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.cad-empty-state,
.cad-loading-state,
.cad-error-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-style: italic;
}

.cad-loading-state {
    color: var(--accent-primary);
}

.cad-error-state {
    color: var(--accent-secondary);
}

.cad-material-selector {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-subtle);
}

.cad-material-selector label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.cad-material-selector select {
    flex: 1;
    padding: 6px 10px;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.9rem;
}

/* ============================================================
   RESPONSIVE MEDIA QUERIES
   ============================================================ */

@media (max-width: 1200px) {
    .data-ingestion-layout,
    .rfq-main-grid,
    .control-two-column,
    .dashboard-two-column {
        grid-template-columns: minmax(0, 1fr);
    }

    .app-main,
    #blinkrMain {
        padding: 12px 8px 20px;
    }

    .app-header,
    #blinkrHeader {
        padding: 10px 16px;
    }

    .app-nav {
        padding: 6px 16px;
    }

    .app-footer,
    .blinkrFooter {
        padding: 6px 16px;
    }
}

@media (max-width: 768px) {
    .nav-tabs {
        gap: 4px;
    }

    .tab-button,
    button[data-route] {
        font-size: 0.85rem;
        padding: 5px 10px;
    }

    .company-name {
        font-size: 1.3rem;
    }

    .company-tagline {
        font-size: 0.75rem;
    }
}
