/* =========================================================================
   JEIN EARTHDATA STUDIO — RESEARCH, ANALYSIS & DATA EXPORT PLATFORM
   Unified Design System (Glassmorphism, High-Tech Sci-Fi, Dark Void)
   ========================================================================= */

:root {
    --bg-void: #060a12;
    --bg-surface-1: rgba(10, 17, 32, 0.92);
    --bg-surface-2: rgba(15, 23, 42, 0.85);
    --bg-surface-3: rgba(22, 34, 60, 0.75);
    --bg-card: rgba(15, 23, 42, 0.7);
    --bg-card-hover: rgba(22, 36, 68, 0.9);
    --bg-input: rgba(4, 9, 20, 0.88);

    --accent-cyan: #00f2fe;
    --accent-azure: #38bdf8;
    --accent-blue: #2563eb;
    --accent-jaxa-blue: #003399;
    --accent-emerald: #10b981;
    --accent-amber: #f59e0b;
    --accent-rose: #f43f5e;
    --accent-purple: #a855f7;

    --glow-cyan: 0 0 25px rgba(0, 242, 254, 0.4);
    --glow-azure: 0 0 25px rgba(56, 189, 248, 0.4);
    --glow-emerald: 0 0 20px rgba(16, 185, 129, 0.4);
    --glow-purple: 0 0 25px rgba(168, 85, 247, 0.4);

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-cyan: #38bdf8;

    --border-glow: rgba(0, 242, 254, 0.35);
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(0, 242, 254, 0.65);

    --glass-blur: blur(20px) saturate(190%);
    --header-h: 74px;

    --font-display: 'Orbitron', 'Outfit', sans-serif;
    --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', 'Consolas', monospace;
    --font-ar: 'Cairo', 'Outfit', sans-serif;

    /* Bulk Engine Variables */
    --bulk-bg: #0b111e;
    --bulk-surface: rgba(16, 24, 40, 0.85);
    --bulk-surface-hover: rgba(22, 34, 58, 0.95);
    --bulk-border: rgba(56, 189, 248, 0.2);
    --bulk-cyan: #00f2fe;
    --bulk-blue: #38bdf8;
    --bulk-emerald: #10b981;
    --bulk-amber: #f59e0b;
    --bulk-red: #ef4444;
    --bulk-purple: #a855f7;
}

/* Reset and Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    cursor: auto !important;
    overflow-x: hidden;
    overflow-y: auto !important;
    min-height: 100vh;
    background-color: var(--bg-void);
    color: var(--text-primary);
    font-family: var(--font-body);
}

body {
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(0, 51, 153, 0.25), transparent 45%),
        radial-gradient(circle at 85% 75%, rgba(0, 242, 254, 0.14), transparent 45%),
        radial-gradient(circle at 50% 50%, rgba(168, 85, 247, 0.06), transparent 60%);
    background-attachment: fixed;
}

/* Arabic RTL */
body[data-lang="ar"] {
    font-family: var(--font-ar);
    direction: rtl;
}

body[data-lang="ar"] .font-display,
body[data-lang="ar"] .studio-nav-btn {
    font-family: var(--font-ar);
    font-weight: 700;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}
::-webkit-scrollbar-track {
    background: rgba(3, 7, 18, 0.8);
}
::-webkit-scrollbar-thumb {
    background: rgba(0, 242, 254, 0.35);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-cyan);
    box-shadow: var(--glow-cyan);
}

/* Background Canvas */
#downlink-matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    opacity: 0.6;
}

/* =========================================
   TOP STUDIO HEADER
   ========================================= */
.studio-header {
    height: var(--header-h);
    background: var(--bg-surface-1);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.6);
}

.studio-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    text-decoration: none;
}

.studio-logo-wrap {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: radial-gradient(circle, rgba(0, 242, 254, 0.25) 0%, rgba(0, 51, 153, 0.5) 100%);
    border: 1px solid var(--border-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--glow-cyan);
}

.studio-brand:hover .studio-logo-wrap {
    transform: scale(1.05) rotate(2deg);
    border-color: var(--accent-cyan);
}

.studio-logo-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.studio-title-group h1 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.studio-badge-lab {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    background: rgba(0, 242, 254, 0.12);
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    padding: 2px 8px;
    border-radius: 20px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.studio-subtitle {
    font-size: 0.72rem;
    color: var(--text-secondary);
    letter-spacing: 0.03em;
    margin-top: 2px;
}

/* Studio Nav Switcher Bar */
.studio-nav-deck {
    display: flex;
    align-items: center;
    background: rgba(6, 11, 22, 0.75);
    border: 1px solid rgba(0, 242, 254, 0.2);
    border-radius: 12px;
    padding: 3px;
    gap: 3px;
}

.studio-nav-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 14px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 9px;
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-body);
    white-space: nowrap;
}

.studio-nav-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
}

.studio-nav-btn.active {
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.22) 0%, rgba(37, 99, 235, 0.25) 100%);
    border-color: var(--accent-cyan);
    color: #fff;
    box-shadow: 0 0 16px rgba(0, 242, 254, 0.3);
}

.studio-nav-btn.btn-bulk-highlight {
    border-color: rgba(0, 242, 254, 0.4);
    color: #00f2fe;
}

.studio-nav-btn.btn-bulk-highlight.active {
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.3) 0%, rgba(168, 85, 247, 0.25) 100%);
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.45);
}

/* Header Right Actions */
.studio-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.portal-return-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 13px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s ease;
}

.portal-return-btn:hover {
    background: rgba(0, 242, 254, 0.12);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
    box-shadow: var(--glow-cyan);
}

/* =========================================
   PAGE HERO BANNER
   ========================================= */
.studio-hero {
    position: relative;
    z-index: 2;
    padding: 1.5rem 2rem;
    margin: 1.25rem auto 1rem auto;
    max-width: 1440px;
    background: linear-gradient(135deg, rgba(16, 24, 42, 0.88) 0%, rgba(10, 18, 36, 0.82) 100%);
    border: 1px solid var(--border-glow);
    border-radius: 16px;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    backdrop-filter: var(--glass-blur);
}

.studio-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #00f2fe, #38bdf8, #a855f7, #10b981);
}

.hero-content h2 {
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 800;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 0.03em;
}

.hero-content p {
    font-size: 0.86rem;
    color: var(--text-secondary);
    max-width: 780px;
    line-height: 1.55;
    margin-top: 6px;
}

.hero-stats-deck {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    min-width: 440px;
}

.hero-stat-box {
    background: rgba(4, 9, 20, 0.7);
    border: 1px solid rgba(0, 242, 254, 0.18);
    border-radius: 10px;
    padding: 10px 12px;
    text-align: center;
    transition: all 0.25s ease;
}

.hero-stat-box:hover {
    border-color: var(--accent-cyan);
    transform: translateY(-2px);
    box-shadow: var(--glow-cyan);
}

.hero-stat-num {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--accent-cyan);
}

.hero-stat-label {
    font-size: 0.68rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 3px;
}

/* =========================================
   MAIN STUDIO WORKSPACE
   ========================================= */
.studio-main-container {
    max-width: 1440px;
    margin: 0 auto 3rem auto;
    padding: 0 1rem;
    position: relative;
    z-index: 2;
}

/* Studio Section Panels (Switched via Tabs) */
.studio-section-panel {
    display: none;
    animation: fadeInSection 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.studio-section-panel.active {
    display: block;
}

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

/* =========================================
   COMMON CARD STYLES
   ========================================= */
.studio-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    padding: 1.25rem;
    backdrop-filter: var(--glass-blur);
    box-shadow: 0 8px 24px -6px rgba(0, 0, 0, 0.4);
    margin-bottom: 1.25rem;
    position: relative;
    transition: border-color 0.25s ease;
}

.studio-card:hover {
    border-color: rgba(0, 242, 254, 0.25);
}

.studio-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.studio-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.02em;
}

.studio-card-title svg {
    color: var(--accent-cyan);
}

/* =========================================
   MODULE 1: EXPLORE (MAP + SELECTION)
   ========================================= */
.explore-grid-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 1.25rem;
}

/* Map Card */
.studio-map-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    overflow: hidden;
    position: relative;
    height: 580px;
    display: flex;
    flex-direction: column;
}

.map-header-bar {
    padding: 0.75rem 1rem;
    background: rgba(8, 14, 26, 0.85);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.map-badge-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--accent-cyan);
    font-family: var(--font-mono);
}

#studio-gis-map {
    width: 100%;
    flex: 1;
    background: #060b14;
}

/* OpenLayers custom tweaks */
.ol-control button {
    background-color: rgba(10, 17, 32, 0.85) !important;
    color: var(--accent-cyan) !important;
    border: 1px solid rgba(0, 242, 254, 0.3) !important;
    border-radius: 6px !important;
}

/* Preset Buttons Grid */
.presets-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.preset-btn {
    background: rgba(4, 9, 20, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 10px;
    text-align: left;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 6px;
}

.preset-btn:hover {
    background: rgba(0, 242, 254, 0.08);
    border-color: var(--accent-cyan);
    transform: translateY(-2px);
}

.preset-btn-title {
    font-size: 0.78rem;
    font-weight: 600;
    color: #e2e8f0;
    line-height: 1.35;
}

.preset-btn-tag {
    font-size: 0.65rem;
    font-family: var(--font-mono);
    color: var(--accent-cyan);
    background: rgba(0, 242, 254, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    align-self: flex-start;
}

/* Scope Tabs */
.scope-mode-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 12px;
}

.scope-tab-btn {
    background: rgba(4, 9, 20, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 8px;
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.scope-tab-btn.active {
    background: rgba(0, 242, 254, 0.15);
    border-color: var(--accent-cyan);
    color: #fff;
}

/* Quick Bar Buttons */
.gov-quick-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.gov-action-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 0.7rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
}

.gov-action-btn:hover {
    background: rgba(0, 242, 254, 0.1);
    border-color: var(--accent-cyan);
    color: #fff;
}

/* Chips Container */
.gov-chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    max-height: 220px;
    overflow-y: auto;
    padding-right: 4px;
}

.gov-chip {
    background: rgba(4, 9, 20, 0.65);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 4px 9px;
    font-size: 0.72rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
}

.gov-chip:hover {
    border-color: var(--accent-cyan);
    color: #fff;
}

.gov-chip.selected {
    background: rgba(0, 242, 254, 0.18);
    border-color: var(--accent-cyan);
    color: #00f2fe;
    font-weight: 600;
}

/* Sensor Variables List */
.sensor-vars-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sensor-var-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(4, 9, 20, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.sensor-var-item:hover {
    border-color: var(--accent-cyan);
    background: rgba(0, 242, 254, 0.05);
}

.sensor-var-item.selected {
    border-color: var(--accent-cyan);
    background: rgba(0, 242, 254, 0.12);
}

.var-info-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.var-icon-badge {
    font-size: 1.1rem;
}

.var-text-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #fff;
}

.var-text-sub {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.var-res-tag {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    padding: 2px 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--accent-cyan);
}

/* =========================================
   MODULE 2: ANALYZE (TIME-SERIES & STATS)
   ========================================= */
.analyze-top-deck {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 1.25rem;
}

.stats-cards-deck {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 1.25rem;
}

.stat-summary-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 14px;
    backdrop-filter: var(--glass-blur);
}

.stat-summary-title {
    font-size: 0.72rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.stat-summary-val {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    margin: 6px 0 2px 0;
}

.stat-summary-sub {
    font-size: 0.68rem;
    color: var(--text-muted);
}

.studio-chart-wrapper {
    position: relative;
    height: 420px;
    width: 100%;
}

/* Responsive Table */
.studio-table-wrap {
    width: 100%;
    overflow-x: auto;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.studio-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    text-align: left;
}

.studio-table th {
    background: rgba(4, 9, 20, 0.95);
    padding: 10px 14px;
    color: var(--text-cyan);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid rgba(0, 242, 254, 0.2);
}

.studio-table td {
    padding: 8px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: #cbd5e1;
}

.studio-table tr:hover td {
    background: rgba(0, 242, 254, 0.04);
}

/* =========================================
   MODULE 3: GIS (ARCGIS & KML)
   ========================================= */
.gis-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.12) 0%, rgba(0, 242, 254, 0.12) 100%);
    border: 1px solid rgba(168, 85, 247, 0.35);
    border-radius: 12px;
    margin-bottom: 1.25rem;
}

.gis-badge {
    font-size: 0.72rem;
    font-family: var(--font-mono);
    color: #a855f7;
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid #a855f7;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 700;
}

/* =========================================
   MODULE 4: BULK ACQUISITION (REAL JAXA ENGINE)
   ========================================= */
.bulk-grid-layout {
    display: grid;
    grid-template-columns: 380px minmax(0, 1fr);
    gap: 1.25rem;
    width: 100%;
    max-width: 100%;
}

.bulk-grid-layout > aside,
.bulk-grid-layout > main,
.explore-grid-layout > aside,
.explore-grid-layout > main {
    min-width: 0;
    max-width: 100%;
}

.bulk-dates-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 10px;
}

.bulk-form-group {
    margin-bottom: 0.75rem;
}

.bulk-form-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.bulk-input, .bulk-select {
    width: 100%;
    padding: 8px 10px;
    background: var(--bg-input);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: #fff;
    font-size: 0.8rem;
    font-family: var(--font-body);
    transition: all 0.2s ease;
}

.bulk-input:focus, .bulk-select:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: var(--glow-cyan);
}

.bulk-presets-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.bulk-preset-pill {
    background: rgba(4, 9, 20, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 5px 9px;
    font-size: 0.7rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
}

.bulk-preset-pill:hover, .bulk-preset-pill.active {
    background: rgba(0, 242, 254, 0.15);
    border-color: var(--accent-cyan);
    color: #fff;
}

.bulk-preset-pill.pill-fast {
    border-color: rgba(245, 158, 11, 0.4);
    color: #fbbf24;
}

.bulk-gov-mode-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    margin-bottom: 10px;
}

.bulk-mode-btn {
    padding: 6px;
    background: rgba(4, 9, 20, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    font-size: 0.68rem;
    color: var(--text-secondary);
    cursor: pointer;
    text-align: center;
}

.bulk-mode-btn.active {
    background: rgba(0, 242, 254, 0.2);
    border-color: var(--accent-cyan);
    color: #fff;
    font-weight: 700;
}

.bulk-vars-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 340px;
    overflow-y: auto;
    padding-right: 4px;
}

.bulk-var-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 10px;
    background: rgba(4, 9, 20, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
    cursor: pointer;
}

.bulk-var-row.selected {
    background: rgba(0, 242, 254, 0.12);
    border-color: rgba(0, 242, 254, 0.35);
}

.bulk-var-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.bulk-var-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: #fff;
}

.bulk-var-sensor {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-left: 4px;
}

.bulk-var-unit {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--accent-cyan);
}

/* Action Buttons Deck */
.bulk-actions-deck {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 1rem;
}

.bulk-btn-start {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #00f2fe 0%, #2563eb 100%);
    border: none;
    border-radius: 10px;
    color: #030712;
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 20px rgba(0, 242, 254, 0.4);
    transition: all 0.2s;
    font-family: var(--font-body);
}

.bulk-btn-start:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(0, 242, 254, 0.6);
}

.bulk-btn-start:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.bulk-sub-actions-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
}

.bulk-btn-sub {
    padding: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
}

.bulk-btn-sub:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.12);
    border-color: #fff;
}

.bulk-btn-sub.btn-pause {
    border-color: rgba(245, 158, 11, 0.4);
    color: #fbbf24;
}

.bulk-btn-sub.btn-stop {
    border-color: rgba(239, 68, 68, 0.4);
    color: #f87171;
}

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

.bulk-btn-download {
    padding: 10px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.4);
    border-radius: 8px;
    color: #34d399;
    font-weight: 700;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.bulk-btn-download:hover:not(:disabled) {
    background: rgba(16, 185, 129, 0.25);
    border-color: #34d399;
    box-shadow: var(--glow-emerald);
}

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

//* Bulk Telemetry Counters */
.bulk-telemetry-deck {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 1rem;
    width: 100%;
}

@media (max-width: 900px) {
    .bulk-telemetry-deck {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.bulk-stat-mini {
    background: rgba(4, 9, 20, 0.75);
    border: 1px solid rgba(56, 189, 248, 0.18);
    border-radius: 10px;
    padding: 10px 8px;
    text-align: center;
    min-width: 0;
    overflow: hidden;
}

.bulk-stat-val {
    font-family: var(--font-mono);
    font-size: 1.15rem;
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bulk-stat-lbl {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 3px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Progress Bar */
.bulk-progress-wrap {
    background: rgba(4, 9, 20, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 1rem;
    width: 100%;
    box-sizing: border-box;
}

.bulk-progress-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    margin-bottom: 6px;
    gap: 10px;
}

.bulk-progress-meta span:first-child {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bulk-bar-track {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
}

.bulk-bar-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #00f2fe, #38bdf8, #10b981);
    border-radius: 10px;
    transition: width 0.25s ease;
}

/* HUD Downlink Banner */
.bulk-downlink-hud {
    background: rgba(4, 9, 20, 0.85);
    border: 1px solid rgba(0, 242, 254, 0.25);
    border-radius: 12px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 1rem;
    width: 100%;
    box-sizing: border-box;
}

.hud-dish-col {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.hud-dish-radar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 242, 254, 0.2) 0%, rgba(6, 12, 24, 0.9) 70%);
    border: 1.5px solid rgba(0, 242, 254, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 12px rgba(0, 242, 254, 0.25);
}

.hud-space-link-tag {
    font-size: 0.65rem;
    color: #00f2fe;
    border: 1px solid #00f2fe;
    padding: 1px 6px;
    border-radius: 10px;
    font-family: var(--font-mono);
    font-weight: 700;
}

.hud-sat-info {
    min-width: 0;
}

.hud-sat-info h4 {
    font-size: 0.82rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

.hud-sat-info p {
    font-size: 0.66rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0;
}

.hud-telemetry-metrics {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.hud-metric-pill {
    font-size: 0.7rem;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.hud-metric-label {
    color: var(--text-muted);
    font-size: 0.62rem;
    text-transform: uppercase;
}

.hud-metric-val {
    color: #fff;
    font-weight: 700;
    font-family: var(--font-mono);
}

.hud-rx-beacon {
    display: flex;
    align-items: center;
    gap: 6px;
}

.rx-led {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    transition: all 0.2s;
}

.rx-led.pulse {
    background: #00f2fe;
    box-shadow: 0 0 14px #00f2fe;
    transform: scale(1.3);
}

.rx-label {
    font-size: 0.7rem;
    color: #10b981;
    font-weight: 700;
    font-family: var(--font-mono);
}

/* Terminal Console */
.bulk-terminal-wrap {
    background: #03060c;
    border: 1px solid rgba(0, 242, 254, 0.3);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.25rem;
    font-family: var(--font-mono);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.7), 0 0 20px rgba(0, 242, 254, 0.1);
    width: 100%;
    box-sizing: border-box;
}

.bulk-terminal-top {
    padding: 8px 12px;
    background: linear-gradient(90deg, #091022 0%, #0f1936 100%);
    border-bottom: 1px solid rgba(0, 242, 254, 0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: nowrap;
}

.bulk-terminal-dots {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.bulk-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.bulk-dot.red { background: #ef4444; box-shadow: 0 0 6px rgba(239, 68, 68, 0.5); }
.bulk-dot.yellow { background: #f59e0b; box-shadow: 0 0 6px rgba(245, 158, 11, 0.5); }
.bulk-dot.green { background: #10b981; box-shadow: 0 0 6px rgba(16, 185, 129, 0.5); }

.bulk-terminal-title {
    font-size: 0.74rem;
    color: #38bdf8;
    letter-spacing: 0.04em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bulk-terminal-tools {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}

.btn-terminal-tool {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #94a3b8;
    padding: 3px 9px;
    border-radius: 5px;
    font-size: 0.68rem;
    cursor: pointer;
    font-family: var(--font-mono);
    white-space: nowrap;
    transition: all 0.2s;
}

.btn-terminal-tool:hover {
    background: rgba(0, 242, 254, 0.15);
    border-color: #00f2fe;
    color: #fff;
}

.btn-terminal-tool.active {
    background: rgba(16, 185, 129, 0.2);
    border-color: #10b981;
    color: #34d399;
}

.bulk-terminal-body {
    height: 240px;
    overflow-y: auto;
    overflow-x: auto;
    padding: 10px 14px;
    font-size: 0.74rem;
    line-height: 1.7;
    background-image: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%);
    background-size: 100% 4px;
}

.bulk-log-line {
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 2px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    white-space: nowrap;
}

.bulk-badge-time { color: #64748b; font-size: 0.68rem; }
.bulk-badge-ok { background: rgba(16, 185, 129, 0.18); border: 1px solid rgba(16, 185, 129, 0.5); color: #34d399; padding: 1px 6px; border-radius: 4px; font-weight: 700; font-size: 0.68rem; }
.bulk-badge-dataset { background: rgba(0, 242, 254, 0.14); border: 1px solid rgba(0, 242, 254, 0.4); color: #00f2fe; padding: 1px 6px; border-radius: 4px; font-weight: 700; font-size: 0.68rem; }
.bulk-badge-gov { background: rgba(168, 85, 247, 0.15); border: 1px solid rgba(168, 85, 247, 0.4); color: #c084fc; padding: 1px 8px; border-radius: 4px; font-weight: 700; font-size: 0.68rem; }
.bulk-badge-val { color: #34d399; font-weight: 700; }
.bulk-badge-val.highlight { color: #fde047; }
.bulk-badge-latency { background: rgba(245, 158, 11, 0.14); border: 1px solid rgba(245, 158, 11, 0.4); color: #fbbf24; padding: 1px 5px; border-radius: 4px; font-size: 0.65rem; font-weight: 600; }

.bulk-terminal-prompt {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(0, 0, 0, 0.4);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.72rem;
}

.terminal-cursor {
    display: inline-block;
    width: 8px;
    height: 13px;
    background: #00f2fe;
    animation: cursor-blink 1s steps(2, start) infinite;
    vertical-align: middle;
    box-shadow: 0 0 8px #00f2fe;
}
@keyframes cursor-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Live Data Table Preview */
.bulk-preview-wrap {
    margin-top: 1.25rem;
    background: rgba(7, 12, 24, 0.9);
    border: 1px solid rgba(0, 242, 254, 0.25);
    border-radius: 14px;
    padding: 1.15rem;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    width: 100%;
    box-sizing: border-box;
}

.bulk-preview-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    gap: 10px;
    flex-wrap: wrap;
}

.bulk-preview-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bulk-preview-count {
    font-size: 0.75rem;
    color: var(--accent-cyan);
    font-family: var(--font-mono);
    white-space: nowrap;
}

.bulk-preview-table-container {
    width: 100%;
    overflow-x: auto;
    border-radius: 8px;
}

.bulk-preview-table {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
    font-size: 0.75rem;
    text-align: left;
}

.bulk-preview-table th {
    padding: 8px 10px;
    border-bottom: 1px solid rgba(0, 242, 254, 0.2);
    color: #38bdf8;
    font-weight: 700;
    text-transform: uppercase;
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.04em;
    background: rgba(4, 9, 20, 0.8);
    white-space: nowrap;
}

.bulk-preview-table td {
    padding: 7px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: #cbd5e1;
    font-family: var(--font-mono);
    vertical-align: middle;
    white-space: nowrap;
}

.bulk-preview-table tr.packet-new-row {
    animation: packet-arrival-glow 2s ease-out;
}

@keyframes packet-arrival-glow {
    0% { background: rgba(0, 242, 254, 0.35); box-shadow: inset 0 0 15px rgba(0, 242, 254, 0.6); }
    30% { background: rgba(16, 185, 129, 0.2); }
    100% { background: transparent; }
}

.bulk-preview-table tr:hover td {
    background: rgba(0, 242, 254, 0.04);
}

/* Mini Gauges inside Table */
.bulk-mini-gauge {
    width: 48px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 3px;
}
.bulk-mini-gauge-fill { height: 100%; border-radius: 4px; transition: width 0.3s; }
.bulk-mini-gauge-fill.thermal { background: linear-gradient(90deg, #38bdf8, #f59e0b, #ef4444); }
.bulk-mini-gauge-fill.vegetation { background: linear-gradient(90deg, #d97706, #84cc16, #10b981); }
.bulk-mini-gauge-fill.rain { background: linear-gradient(90deg, #38bdf8, #2563eb, #7c3aed); }
.bulk-mini-gauge-fill.soil { background: linear-gradient(90deg, #b45309, #0284c7, #0369a1); }

/* =========================================
   MODULE 5: PYTHON SDK
   ========================================= */
.code-block-box {
    background: #020610;
    border: 1px solid rgba(0, 242, 254, 0.25);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: #e2e8f0;
    position: relative;
    overflow-x: auto;
    white-space: pre;
    line-height: 1.6;
}

.copy-btn-floating {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 242, 254, 0.15);
    border: 1px solid var(--accent-cyan);
    color: var(--accent-cyan);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.72rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.copy-btn-floating:hover {
    background: var(--accent-cyan);
    color: #030712;
}

/* =========================================
   MODULE 6: METHODOLOGY & CITATION
   ========================================= */
.citation-card {
    background: rgba(4, 9, 20, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.citation-text {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 1.6;
    color: #94a3b8;
    white-space: pre-wrap;
    background: #03060c;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    margin-top: 8px;
}

/* =========================================
   FOOTER
   ========================================= */
.studio-footer {
    height: 52px;
    background: var(--bg-surface-1);
    border-top: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    font-size: 0.76rem;
    color: var(--text-secondary);
    position: relative;
    z-index: 10;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
}

.footer-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-subtle);
    border-radius: 6px;
    padding: 5px 10px;
    color: var(--text-primary);
    font-size: 0.72rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    text-decoration: none;
    transition: all 0.2s;
}

.footer-btn:hover {
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

/* Toast */
.studio-toast {
    position: fixed;
    bottom: 65px;
    right: 25px;
    background: rgba(10, 17, 32, 0.95);
    border: 1px solid var(--accent-cyan);
    color: #fff;
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 30px rgba(0, 242, 254, 0.35);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 9999;
}

.studio-toast.show {
    transform: translateY(0);
    opacity: 1;
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
    .explore-grid-layout, .bulk-grid-layout {
        grid-template-columns: 1fr;
    }
    .studio-hero {
        flex-direction: column;
        align-items: flex-start;
    }
    .hero-stats-deck {
        width: 100%;
        min-width: auto;
    }
}

@media (max-width: 768px) {
    .studio-header {
        height: auto;
        padding: 0.75rem 1rem;
        flex-direction: column;
        gap: 10px;
    }
    .studio-nav-deck {
        overflow-x: auto;
        max-width: 100%;
        padding: 4px;
    }
    .hero-stats-deck {
        grid-template-columns: 1fr 1fr;
    }
    .bulk-telemetry-deck {
        grid-template-columns: 1fr 1fr;
    }
    .bulk-map-layout {
        flex-direction: column;
    }
    .bulk-map-canvas-wrap {
        min-height: 220px;
    }
    .bulk-map-info-panel {
        min-width: unset;
        width: 100%;
    }
}

/* =============================================
   INTERACTIVE EGYPT TELEMETRY MAP (Bulk Module)
   ============================================= */
.bulk-egypt-map-card {
    background: rgba(10, 17, 32, 0.88);
    border: 1px solid rgba(0, 242, 254, 0.22);
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 32px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 242, 254, 0.06);
}

.bulk-map-layout {
    display: flex;
    gap: 0;
    min-height: 260px;
}

.bulk-map-canvas-wrap {
    flex: 1;
    position: relative;
    min-height: 260px;
    overflow: hidden;
}

.bulk-map-canvas-wrap canvas {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 260px;
}

/* Animated scan-line overlay */
.map-scan-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 3px,
        rgba(0, 242, 254, 0.015) 3px,
        rgba(0, 242, 254, 0.015) 4px
    );
    pointer-events: none;
    animation: scanPulse 4s ease-in-out infinite;
}

@keyframes scanPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* Info Panel */
.bulk-map-info-panel {
    min-width: 240px;
    max-width: 260px;
    padding: 1.1rem 1.25rem;
    background: rgba(6, 10, 18, 0.92);
    border-left: 1px solid rgba(0, 242, 254, 0.15);
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.map-info-header {
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(0, 242, 254, 0.12);
}

/* Active Gov Block */
.map-active-gov-block {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.65rem 0.85rem;
    background: rgba(0, 242, 254, 0.06);
    border: 1px solid rgba(0, 242, 254, 0.18);
    border-radius: 8px;
}

.map-active-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #64748b;
    flex-shrink: 0;
    transition: background 0.3s;
}

.map-active-dot.active {
    background: #00f2fe;
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.8);
    animation: dotPulse 0.7s ease-in-out infinite alternate;
}

@keyframes dotPulse {
    from { box-shadow: 0 0 6px rgba(0, 242, 254, 0.5); }
    to { box-shadow: 0 0 18px rgba(0, 242, 254, 1); }
}

.map-active-name {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    font-weight: 700;
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.map-active-sub {
    font-size: 0.67rem;
    color: #64748b;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Telemetry Metrics Grid */
.map-telemetry-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.map-tel-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 6px 8px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 6px;
}

.map-tel-label {
    font-size: 0.62rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: var(--font-mono);
}

.map-tel-val {
    font-size: 0.75rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: #e2e8f0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* =========================================================================
   3-STAGE TELEMETRY PIPELINE ARCHITECTURE (Download CSV Module)
   ========================================================================= */

.studio-stage-container {
    background: rgba(10, 17, 32, 0.75);
    border: 1px solid rgba(0, 242, 254, 0.18);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: border-color 0.3s ease;
}

.studio-stage-container:hover {
    border-color: rgba(0, 242, 254, 0.32);
}

.studio-stage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-wrap: wrap;
}

.stage-header-title-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
}

.stage-step-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'Orbitron', monospace;
    font-weight: 800;
    font-size: 0.74rem;
    letter-spacing: 0.14em;
    padding: 6px 14px;
    border-radius: 20px;
    background: rgba(0, 242, 254, 0.12);
    color: var(--accent-cyan);
    border: 1px solid rgba(0, 242, 254, 0.35);
    box-shadow: 0 0 12px rgba(0, 242, 254, 0.22);
    white-space: nowrap;
}

.stage-step-pill.active {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.25) 0%, rgba(0, 242, 254, 0.25) 100%);
    color: #38bdf8;
    border-color: #38bdf8;
    box-shadow: 0 0 16px rgba(56, 189, 248, 0.35);
}

.stage-heading {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    letter-spacing: 0.02em;
}

.stage-subheading {
    font-size: 0.82rem;
    color: #94a3b8;
    margin-top: 3px;
    line-height: 1.4;
}

.stage-header-badge {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 8px;
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.35);
    white-space: nowrap;
}

.stage-header-badge.live {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.35);
}

/* Stage 1: Spatial Grid */
.stage-spatial-grid {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 1.25rem;
}

.stage-spatial-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stage-spatial-map-col {
    display: flex;
    flex-direction: column;
}

.stage-spatial-map-col .studio-map-card {
    height: 100%;
    min-height: 640px;
    display: flex;
    flex-direction: column;
}

.stage-spatial-map-col #studio-gis-map {
    flex: 1;
    width: 100%;
    min-height: 680px;
    background: #060b14;
}

.map-status-footnote {
    padding: 0.6rem 1rem;
    background: rgba(8, 14, 26, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.74rem;
    color: #94a3b8;
    font-family: var(--font-mono);
}

/* Shapefile Dropzone */
.shapefile-upload-dropzone {
    border: 2px dashed rgba(0, 242, 254, 0.3);
    background: rgba(0, 242, 254, 0.03);
    border-radius: 12px;
    padding: 1.25rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
}

.shapefile-upload-dropzone:hover {
    border-color: var(--accent-cyan);
    background: rgba(0, 242, 254, 0.08);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 242, 254, 0.15);
}

.dropzone-icon {
    margin-bottom: 6px;
    display: flex;
    justify-content: center;
}

.dropzone-title {
    font-family: var(--font-display);
    font-size: 0.88rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 4px;
}

.dropzone-sub {
    font-size: 0.72rem;
    color: #94a3b8;
    line-height: 1.4;
}

.uploaded-shape-info {
    margin-top: 8px;
    padding: 6px 10px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 8px;
    text-align: left;
}

/* Stage 2: Parameters Grid */
.stage-params-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

/* Stage 3: Actions Bar */
.stage3-action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1rem 1.25rem;
    background: rgba(11, 18, 32, 0.85);
    border: 1px solid rgba(0, 242, 254, 0.22);
    border-radius: 14px;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.stage3-primary-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.stage-run-btn {
    width: auto !important;
    padding: 10px 24px !important;
    font-size: 0.92rem !important;
    box-shadow: 0 0 20px rgba(0, 242, 254, 0.35) !important;
}

.stage3-export-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Stage 3: Two-Column Live Monitoring — LOCKED COLUMNS */
.stage3-monitoring-grid {
    display: grid;
    /* Use minmax(0, 1fr) so columns never collapse below 0 on reflow */
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.25rem;
    margin-top: 1.25rem;
    /* prevent grid from triggering new BFC during reflow */
    contain: layout style;
}

.stage3-terminal-hud-col {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
    overflow: hidden;
}

.stage3-monitoring-grid .bulk-egypt-map-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    /* Hard lock: map card never collapses below 300px */
    min-width: 300px;
    min-height: 300px;
    /* Prevent canvas 0-width flash during reflow */
    will-change: transform;
}

.stage3-monitoring-grid .bulk-map-layout {
    flex: 1;
    min-height: 260px;
}

/* Ensure canvas stays visible and never collapses */
#egypt-gov-map {
    display: block !important;
    min-width: 100% !important;
    min-height: 220px !important;
    visibility: visible !important;
}

.bulk-map-canvas-wrap {
    flex: 1;
    position: relative;
    min-height: 260px;
    min-width: 200px;
    overflow: hidden;
    /* Compositor layer — prevents reflow blanking the canvas */
    will-change: transform;
    transform: translateZ(0);
}

/* Responsive Overrides */
@media (max-width: 1200px) {
    .stage-spatial-grid {
        grid-template-columns: 1fr;
    }
    .stage-spatial-map-col {
        height: 520px;
    }
    .stage3-monitoring-grid {
        /* Single column on narrow screens, but map always visible */
        grid-template-columns: minmax(300px, 1fr);
    }
}

@media (max-width: 900px) {
    .stage-params-grid {
        grid-template-columns: 1fr;
    }
    .stage3-action-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .stage3-primary-actions, .stage3-export-actions {
        width: 100%;
        justify-content: stretch;
    }
    .stage3-primary-actions button, .stage3-export-actions button {
        flex: 1;
    }
}

/* ==========================================================================
   COLLAPSIBLE TELEMETRY & DOWNLOAD DRAWER + GOOGLE DRIVE DOCKED MANAGER + STAGE 4
   ========================================================================== */

/* Drawer Toggle Button in Stage 3 Action Bar */
.bulk-drawer-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(0, 242, 254, 0.08);
    border: 1px solid rgba(0, 242, 254, 0.35);
    border-radius: 9999px;
    color: #38bdf8;
    font-family: var(--font-sans, inherit);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 10px rgba(0, 242, 254, 0.12);
}

.bulk-drawer-toggle-btn:hover {
    background: rgba(0, 242, 254, 0.18);
    border-color: #00f2fe;
    color: #fff;
    box-shadow: 0 0 16px rgba(0, 242, 254, 0.35);
    transform: translateY(-1px);
}

.bulk-drawer-toggle-btn.active {
    background: rgba(0, 242, 254, 0.22);
    border-color: #00f2fe;
    color: #fff;
}

.pulse-indicator-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    animation: pulseGlow 1.8s infinite ease-in-out;
}

@keyframes pulseGlow {
    0%, 100% { transform: scale(0.9); opacity: 0.7; box-shadow: 0 0 4px #10b981; }
    50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 12px #10b981; }
}

.drawer-arrow-icon {
    font-size: 0.85rem;
    transition: transform 0.25s ease;
}

/* Collapsible Telemetry Drawer */
.bulk-telemetry-drawer {
    margin-top: 1rem;
    margin-bottom: 1.25rem;
    animation: drawerSlideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

.bulk-drawer-card {
    background: linear-gradient(180deg, rgba(8, 15, 30, 0.95) 0%, rgba(4, 9, 20, 0.98) 100%);
    border: 1px solid rgba(0, 242, 254, 0.28);
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);
}

.bulk-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 12px;
    margin-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-wrap: wrap;
    gap: 10px;
}

.bulk-drawer-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.drawer-header-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(0, 242, 254, 0.12);
    border: 1px solid rgba(0, 242, 254, 0.3);
    color: #00f2fe;
    display: flex;
    align-items: center;
    justify-content: center;
}

.drawer-title {
    margin: 0;
    font-size: 0.92rem;
    font-weight: 700;
    color: #f1f5f9;
    letter-spacing: 0.01em;
}

.drawer-sub {
    margin: 2px 0 0 0;
    font-size: 0.72rem;
    color: #94a3b8;
}

.drawer-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.drawer-live-pill {
    font-family: var(--font-mono, monospace);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 3px 8px;
    border-radius: 6px;
    background: rgba(0, 242, 254, 0.15);
    border: 1px solid rgba(0, 242, 254, 0.35);
    color: #38bdf8;
    text-transform: uppercase;
}

.drawer-close-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    color: #cbd5e1;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.drawer-close-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}

/* In-Drawer Export Row */
.drawer-export-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 14px;
    margin-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    flex-wrap: wrap;
    gap: 12px;
}

.drawer-export-desc {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    color: #94a3b8;
    font-weight: 500;
}

.drawer-export-btns {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.drawer-export-btns .bulk-btn-download,
.drawer-export-btns .bulk-btn-sub {
    margin: 0;
}

/* ==========================================================================
   STAGE 4: DATA EXPORT & DISTRIBUTION SECTION
   ========================================================================== */
#studio-stage-4 {
    margin-top: 2rem;
    border-color: rgba(16, 185, 129, 0.28);
    background: linear-gradient(180deg, rgba(8, 16, 28, 0.8) 0%, rgba(4, 9, 20, 0.95) 100%);
}

#studio-stage-4 .stage-step-pill {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.4);
    color: #34d399;
}

.stage4-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: 1rem;
}

@media (max-width: 1000px) {
    .stage4-cards-grid {
        grid-template-columns: 1fr;
    }
}

.stage4-export-card {
    background: rgba(6, 12, 24, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.25s ease;
}

.stage4-export-card:hover {
    border-color: rgba(0, 242, 254, 0.35);
    background: rgba(8, 16, 32, 0.9);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
}

.stage4-card-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.stage4-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stage4-card-icon.long-format {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #34d399;
}

.stage4-card-icon.wide-format {
    background: rgba(56, 189, 248, 0.15);
    border: 1px solid rgba(56, 189, 248, 0.35);
    color: #38bdf8;
}

.stage4-card-icon.copy-format {
    background: rgba(168, 85, 247, 0.15);
    border: 1px solid rgba(168, 85, 247, 0.35);
    color: #c084fc;
}

.stage4-card-title {
    margin: 0 0 4px 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #f8fafc;
}

.stage4-card-tag {
    font-size: 0.68rem;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 4px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
    display: inline-block;
}

.stage4-card-desc {
    font-size: 0.77rem;
    color: #94a3b8;
    line-height: 1.55;
    margin: 0 0 16px 0;
    flex-grow: 1;
}

.stage4-card-desc code {
    background: rgba(255, 255, 255, 0.07);
    padding: 1px 4px;
    border-radius: 4px;
    font-family: var(--font-mono, monospace);
    font-size: 0.72rem;
    color: #38bdf8;
}

.stage4-dl-btn {
    width: 100%;
    box-sizing: border-box;
    padding: 12px;
    font-size: 0.85rem;
}

/* ==========================================================================
   GOOGLE DRIVE STYLE FLOATING BOTTOM DOCKED MANAGER
   ========================================================================== */
.jaxa-docked-manager {
    position: fixed;
    bottom: 24px;
    right: 28px;
    z-index: 99999;
    font-family: var(--font-sans, inherit);
    animation: dockSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

/* Collapsed Pill */
.dock-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    background: rgba(9, 16, 32, 0.92);
    border: 1px solid rgba(0, 242, 254, 0.4);
    border-radius: 9999px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6), 0 0 16px rgba(0, 242, 254, 0.2);
    backdrop-filter: blur(16px);
    color: #e2e8f0;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.dock-pill:hover {
    background: rgba(14, 24, 48, 0.96);
    border-color: #00f2fe;
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.7), 0 0 24px rgba(0, 242, 254, 0.35);
}

.dock-pill-radar {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #00f2fe;
    box-shadow: 0 0 8px #00f2fe;
    animation: pulseGlow 1.5s infinite;
}

.dock-pill-arrow {
    font-size: 0.7rem;
    color: #38bdf8;
}

/* Expanded Card */
.dock-card {
    width: 340px;
    max-width: calc(100vw - 40px);
    background: linear-gradient(180deg, rgba(10, 18, 36, 0.94) 0%, rgba(5, 10, 22, 0.97) 100%);
    border: 1px solid rgba(0, 242, 254, 0.35);
    border-radius: 14px;
    padding: 14px 16px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.7), 0 0 24px rgba(0, 242, 254, 0.15);
    backdrop-filter: blur(16px);
}

.dock-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.dock-card-title-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dock-satellite-pulse {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(0, 242, 254, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}

.dock-sat-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #00f2fe;
    box-shadow: 0 0 8px #00f2fe;
    animation: pulseGlow 1.5s infinite;
}

.dock-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #f1f5f9;
}

.dock-sub {
    font-size: 0.68rem;
    color: #94a3b8;
    max-width: 190px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dock-header-controls {
    display: flex;
    align-items: center;
    gap: 4px;
}

.dock-icon-btn {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
}

.dock-icon-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.dock-progress-box {
    margin-bottom: 12px;
}

.dock-progress-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.72rem;
    color: #cbd5e1;
    font-family: var(--font-mono, monospace);
    margin-bottom: 5px;
}

.dock-track {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 9999px;
    overflow: hidden;
}

.dock-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #00f2fe, #38bdf8, #10b981);
    border-radius: 9999px;
    transition: width 0.25s ease;
}

.dock-actions-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
}

.dock-btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 8px;
    border-radius: 7px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: #cbd5e1;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    text-align: center;
    white-space: nowrap;
}

.dock-btn-action:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.dock-btn-action.success {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.35);
    color: #34d399;
}

.dock-btn-action.success:hover:not(:disabled) {
    background: rgba(16, 185, 129, 0.28);
    color: #fff;
}

.dock-btn-action.cyan {
    background: rgba(56, 189, 248, 0.15);
    border-color: rgba(56, 189, 248, 0.35);
    color: #38bdf8;
}

.dock-btn-action.cyan:hover:not(:disabled) {
    background: rgba(56, 189, 248, 0.28);
    color: #fff;
}

.dock-btn-action:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

@media (max-width: 600px) {
    .jaxa-docked-manager {
        right: 12px;
        left: 12px;
        bottom: 12px;
    }
    .dock-card {
        width: auto;
    }
}

/* ==========================================================================
   ESRI SHAPEFILE & GIS READY PACKAGES (ArcGIS Pro & QGIS)
   ========================================================================== */
.stage4-export-card.gis-card {
    grid-column: span 3;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95), rgba(8, 20, 36, 0.98));
    border: 1px solid rgba(0, 242, 254, 0.28);
    position: relative;
    overflow: hidden;
}

.stage4-export-card.featured-notebook-card {
    grid-column: span 3;
}

@media (max-width: 1100px) {
    .stage4-export-card.gis-card,
    .stage4-export-card.featured-notebook-card {
        grid-column: span 1;
    }
}

.stage4-export-card.gis-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0288d1, #00f2fe, #589632, #10b981);
}

.gis-card-header-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    flex-wrap: wrap;
    gap: 12px;
}

.gis-software-badges {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gis-soft-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    font-family: 'JetBrains Mono', monospace;
}

.gis-soft-badge.arcgis {
    background: rgba(2, 136, 209, 0.16);
    border: 1px solid rgba(2, 136, 209, 0.38);
    color: #38bdf8;
}

.gis-soft-badge.qgis {
    background: rgba(88, 150, 50, 0.18);
    border: 1px solid rgba(88, 150, 50, 0.42);
    color: #4ade80;
}

.gis-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    margin: 12px 0 16px 0;
    padding: 10px 14px;
    background: rgba(0, 0, 0, 0.28);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.gis-feat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.74rem;
    color: #94a3b8;
}

.gis-feat-item svg {
    color: #00f2fe;
    flex-shrink: 0;
}

.gis-buttons-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 10px;
}

@media (max-width: 700px) {
    .gis-buttons-grid {
        grid-template-columns: 1fr;
    }
}

.btn-gis-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 9px;
    font-weight: 700;
    font-size: 0.82rem;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    border: 1px solid transparent;
}

.btn-gis-download.arcgis {
    background: linear-gradient(135deg, rgba(2, 136, 209, 0.35), rgba(3, 105, 161, 0.5));
    border-color: rgba(56, 189, 248, 0.5);
    color: #e0f2fe;
}

.btn-gis-download.arcgis:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(2, 136, 209, 0.6), rgba(3, 105, 161, 0.8));
    border-color: #38bdf8;
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(2, 136, 209, 0.45);
    transform: translateY(-2px);
}

.btn-gis-download.qgis {
    background: linear-gradient(135deg, rgba(88, 150, 50, 0.35), rgba(65, 117, 34, 0.5));
    border-color: rgba(74, 222, 128, 0.45);
    color: #f0fdf4;
}

.btn-gis-download.qgis:hover:not(:disabled) {
    background: linear-gradient(135deg, rgba(88, 150, 50, 0.6), rgba(65, 117, 34, 0.8));
    border-color: #4ade80;
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(88, 150, 50, 0.45);
    transform: translateY(-2px);
}

.btn-gis-download:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.dock-btn-action.gis {
    background: rgba(0, 242, 254, 0.12);
    border-color: rgba(0, 242, 254, 0.32);
    color: #00f2fe;
}

.dock-btn-action.gis:hover:not(:disabled) {
    background: rgba(0, 242, 254, 0.25);
    color: #fff;
}

/* ==========================================================================
   PERSISTENT RESEARCH DOI CARD & CITATION MODAL
   ========================================================================== */
.stage4-export-card.featured-doi-card {
    grid-column: span 3;
    background: linear-gradient(135deg, rgba(26, 20, 8, 0.95), rgba(12, 16, 28, 0.98));
    border: 1px solid rgba(234, 179, 8, 0.35);
    position: relative;
    overflow: hidden;
}

.stage4-export-card.featured-doi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #facc15, #f59e0b, #eab308, #ca8a04);
}

@media (max-width: 1100px) {
    .stage4-export-card.featured-doi-card {
        grid-column: span 1;
    }
}

.doi-card-action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(234, 179, 8, 0.18);
    flex-wrap: wrap;
}

.doi-preview-mini {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.45);
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid rgba(234, 179, 8, 0.2);
    font-family: 'JetBrains Mono', monospace;
}

.doi-mini-label {
    font-size: 0.68rem;
    color: #a1a1aa;
    font-weight: 700;
}

.doi-mini-code {
    font-size: 0.78rem;
    color: #fde047;
    letter-spacing: 0.04em;
}

.btn-generate-doi {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 22px;
    border-radius: 9px;
    font-weight: 700;
    font-size: 0.85rem;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.03em;
    cursor: pointer;
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.35), rgba(202, 138, 4, 0.6));
    border: 1px solid #facc15;
    color: #fef08a;
    box-shadow: 0 4px 16px rgba(234, 179, 8, 0.25);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-generate-doi:hover {
    background: linear-gradient(135deg, rgba(234, 179, 8, 0.6), rgba(202, 138, 4, 0.85));
    color: #ffffff;
    box-shadow: 0 6px 24px rgba(234, 179, 8, 0.45);
    transform: translateY(-2px);
}

/* Modal Dialog */
.doi-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(3, 7, 18, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.doi-modal-card {
    background: #0b1120;
    border: 1px solid rgba(234, 179, 8, 0.35);
    border-radius: 16px;
    width: 100%;
    max-width: 820px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8), 0 0 40px rgba(234, 179, 8, 0.15);
    position: relative;
    display: flex;
    flex-direction: column;
}

.doi-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
}

.doi-modal-icon-seal {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(234, 179, 8, 0.15);
    border: 1px solid rgba(234, 179, 8, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.doi-modal-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: #fde047;
    font-family: 'Orbitron', 'Outfit', sans-serif;
    letter-spacing: 0.04em;
}

.doi-modal-subtitle {
    margin: 3px 0 0 0;
    font-size: 0.75rem;
    color: #94a3b8;
}

.doi-modal-close-btn {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #94a3b8;
    border-radius: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s;
}

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

.doi-modal-body {
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.doi-block {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.doi-block-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #cbd5e1;
    letter-spacing: 0.06em;
    font-family: 'JetBrains Mono', monospace;
}

.doi-input-action-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.doi-val-display {
    flex: 1;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(234, 179, 8, 0.4);
    border-radius: 8px;
    padding: 10px 14px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.88rem;
    color: #fde047;
    font-weight: 700;
    letter-spacing: 0.04em;
    user-select: all;
    overflow-x: auto;
    white-space: nowrap;
}

.doi-text-input {
    flex: 1;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 8px;
    padding: 10px 14px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: #38bdf8;
    user-select: all;
}

.btn-doi-copy {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #f1f5f9;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
}

.btn-doi-copy:hover {
    background: rgba(234, 179, 8, 0.25);
    border-color: #facc15;
    color: #fde047;
}

.btn-doi-copy.primary {
    background: rgba(2, 136, 209, 0.25);
    border-color: #0288d1;
    color: #38bdf8;
}

.btn-doi-copy.primary:hover {
    background: rgba(2, 136, 209, 0.45);
    color: #fff;
}

.btn-doi-mini-copy {
    background: none;
    border: 1px solid rgba(234, 179, 8, 0.3);
    color: #facc15;
    padding: 3px 8px;
    border-radius: 5px;
    font-size: 0.68rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-doi-mini-copy:hover {
    background: rgba(234, 179, 8, 0.2);
}

.doi-hint-text {
    font-size: 0.68rem;
    color: #64748b;
    margin-top: 2px;
}

.doi-textarea {
    width: 100%;
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 10px 12px;
    color: #e2e8f0;
    font-size: 0.78rem;
    line-height: 1.6;
    font-family: 'Outfit', sans-serif;
    resize: vertical;
}

.doi-cite-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
}

.doi-cite-tabs {
    display: flex;
    gap: 6px;
}

.doi-cite-tab-btn {
    padding: 5px 10px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.doi-cite-tab-btn.active {
    background: rgba(0, 242, 254, 0.18);
    border-color: #00f2fe;
    color: #00f2fe;
}

.doi-cite-panels {
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 12px;
    position: relative;
}

.doi-cite-panels pre {
    margin: 0;
    overflow-x: auto;
}

.doi-cite-panels code {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: #a5f3fc;
    line-height: 1.5;
}

.doi-cite-text-box {
    margin: 0;
    font-size: 0.8rem;
    color: #e2e8f0;
    line-height: 1.6;
}

.btn-doi-code-copy {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 9px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #cbd5e1;
    font-size: 0.68rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-doi-code-copy:hover {
    background: #00f2fe;
    color: #04101e;
    border-color: #00f2fe;
}

.doi-metadata-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.doi-meta-pill {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.68rem;
    color: #94a3b8;
    display: inline-flex;
    gap: 4px;
}

.doi-meta-pill strong {
    color: #f1f5f9;
}

/* =========================================================================
   STICKY CYBER STAGE STEPPER NAVIGATION BAR (EARTHDATA STUDIO)
   ========================================================================= */
.studio-stage-stepper-bar {
    position: sticky;
    top: 74px;
    z-index: 90;
    margin: -1rem 0 2rem 0;
    padding: 0.75rem 1.5rem;
    background: rgba(8, 14, 28, 0.92);
    backdrop-filter: blur(20px) saturate(190%);
    -webkit-backdrop-filter: blur(20px) saturate(190%);
    border: 1px solid rgba(0, 242, 254, 0.25);
    border-radius: 14px;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.6), 0 0 20px rgba(0, 242, 254, 0.1);
    transition: all 0.3s ease;
}

.stepper-inner-track {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    overflow-x: auto;
    scrollbar-width: none;
}

.stepper-inner-track::-webkit-scrollbar {
    display: none;
}

.stepper-step-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 8px 16px;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
    text-align: left;
    white-space: nowrap;
    flex: 1;
    min-width: 170px;
}

[dir="rtl"] .stepper-step-btn,
body[data-lang="ar"] .stepper-step-btn {
    text-align: right;
}

.stepper-step-btn:hover {
    background: rgba(22, 36, 68, 0.85);
    border-color: rgba(0, 242, 254, 0.45);
    color: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 4px 14px rgba(0, 242, 254, 0.15);
}

.stepper-step-btn.active {
    background: linear-gradient(135deg, rgba(0, 51, 153, 0.35) 0%, rgba(0, 242, 254, 0.15) 100%);
    border-color: #00f2fe;
    color: #ffffff;
    box-shadow: 0 0 18px rgba(0, 242, 254, 0.3);
}

.stepper-step-btn .step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(0, 242, 254, 0.12);
    border: 1px solid rgba(0, 242, 254, 0.3);
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 700;
    color: #00f2fe;
    flex-shrink: 0;
    transition: all 0.2s;
}

.stepper-step-btn.active .step-num {
    background: #00f2fe;
    color: #030712;
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.8);
}

.stepper-step-btn .step-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stepper-step-btn .step-name {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: inherit;
}

.stepper-step-btn .step-badge {
    font-size: 0.65rem;
    font-family: var(--font-mono);
    color: #64748b;
    background: rgba(0, 0, 0, 0.3);
    padding: 1px 6px;
    border-radius: 4px;
    display: inline-block;
    width: fit-content;
}

.stepper-step-btn.active .step-badge {
    color: #38bdf8;
    background: rgba(0, 242, 254, 0.12);
}

.stepper-step-btn .step-badge.pulse {
    position: relative;
}

.stepper-divider {
    display: flex;
    align-items: center;
    color: rgba(0, 242, 254, 0.4);
    flex-shrink: 0;
}

[dir="rtl"] .stepper-divider svg,
body[data-lang="ar"] .stepper-divider svg {
    transform: rotate(180deg);
}

/* Colab Launch Buttons */
.btn-colab-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.2s ease;
}

.btn-colab-action:hover {
    background: rgba(245, 158, 11, 0.25) !important;
    border-color: #f59e0b !important;
    color: #ffffff !important;
    box-shadow: 0 0 16px rgba(245, 158, 11, 0.4);
    transform: translateY(-1px);
}

/* Table Horizontal Scroll Styling & Cues */
.bulk-preview-table-container,
.studio-table-wrap {
    overflow-x: auto;
    position: relative;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 242, 254, 0.4) rgba(15, 23, 42, 0.6);
}

.bulk-preview-table-container::-webkit-scrollbar,
.studio-table-wrap::-webkit-scrollbar {
    height: 6px;
}

.bulk-preview-table-container::-webkit-scrollbar-thumb,
.studio-table-wrap::-webkit-scrollbar-thumb {
    background: rgba(0, 242, 254, 0.35);
    border-radius: 4px;
}

@media (max-width: 900px) {
    .studio-stage-stepper-bar {
        top: 66px;
        padding: 0.5rem 0.75rem;
        margin-bottom: 1.25rem;
    }
    .stepper-step-btn {
        min-width: 140px;
        padding: 6px 10px;
    }
}



