/* LUXURY HIGH-CONTRAST DATA ACQUISITION STYLESHEET BLUEPRINT */
:root {
    --bg-main: #030508;             /* Deep Premium Onyx Pitch Void */
    --bg-card: #0a0f18;             /* Elevated Structural Dashboard Surface */
    --bg-field: #111827;            /* Internal Control Input Layout Field */
    --accent-gold: #dfb76c;         /* Polished Anodized Gold Alignment Marker */
    --accent-gold-dim: rgba(223, 183, 108, 0.12);
    --text-high-contrast: #ffffff;  /* Luminescent White Core Targets */
    --text-normal: #f3f4f6;         /* High-visibility Slate Tint for clean readings */
    --text-muted: #94a3b8;          /* Clear Subtitle System Coordinate Strings */
    --border-subtle: #1e293b;       /* Precision Module Boundary Line */
    --sys-green: #10b981;           /* Synced Payload Core Status Ring */
    --sys-red: #f43f5e;             /* Exception Vector Warning Code */
    --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-main);
    color: var(--text-normal);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    line-height: 1.5;
    padding-bottom: 100px;
}

.app-container {
    max-width: 1050px;
    margin: 0 auto;
    padding: 50px 20px;
}

/* ── Branding Platform Components ───────────────────────────────── */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 24px;
    margin-bottom: 35px;
}

.brand-matrix h1 {
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 2.5px;
    color: var(--text-high-contrast);
}

.brand-matrix h1 span {
    color: var(--accent-gold);
    font-weight: 300;
}

.brand-matrix p {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

.system-status-pill {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: bold;
    letter-spacing: 1px;
    padding: 6px 14px;
    background-color: var(--bg-card);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    border-radius: 4px;
    text-transform: uppercase;
}

.system-status-pill.running { color: var(--accent-gold); border-color: var(--accent-gold); background-color: var(--accent-gold-dim); }
.system-status-pill.synchronized { color: var(--sys-green); border-color: var(--sys-green); background-color: rgba(16, 185, 129, 0.08); }
.system-status-pill.error { color: var(--sys-red); border-color: var(--sys-red); background-color: rgba(244, 63, 94, 0.08); }

/* ── Radio Switch Mode Component Bar ────────────────────────────── */
.mode-selection-bar {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.radio-container {
    cursor: pointer;
    flex: 1;
}

.radio-container input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-tile {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: var(--bg-field);
    border: 1px solid var(--border-subtle);
    padding: 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.radio-container input:checked + .radio-tile {
    border-color: var(--accent-gold);
    color: var(--text-high-contrast);
    background-color: rgba(223, 183, 108, 0.04);
    box-shadow: inset 0 0 8px rgba(223, 183, 108, 0.05);
}

/* ── Control Query Input Dashboard ──────────────────────────────── */
.control-panel {
    background-color: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 40px;
}

.control-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(30, 41, 59, 0.5);
    padding-bottom: 8px;
}

.filter-grid {
    display: grid;
    grid-template-columns: 1fr;
}

.input-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-wrapper label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.input-field-container {
    position: relative;
}

.field-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.85rem;
}

.input-field-container input {
    width: 100%;
    background-color: var(--bg-field);
    border: 1px solid var(--border-subtle);
    color: var(--text-high-contrast);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 14px 14px 14px 40px;
    border-radius: 6px;
    transition: all 0.2s ease;
    font-family: var(--font-mono);
}

.input-field-container input:focus {
    outline: none;
    border-color: var(--accent-gold);
    background-color: #161f30;
}

/* Floating Parameter Context Balloon Help Tooltip */
.custom-tooltip {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    background-color: #121926;
    color: var(--text-normal);
    border: 1px solid var(--accent-gold);
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    line-height: 1.45;
    z-index: 100;
    box-shadow: 0 8px 24px rgba(0,0,0,0.6);
}

.input-wrapper:hover .custom-tooltip {
    display: block;
}

.action-bar {
    margin-top: 24px;
    display: flex;
    justify-content: flex-end;
}

.prime-action-btn {
    background-color: var(--accent-gold);
    color: #000000;
    border: none;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 1px;
    padding: 14px 32px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    transition: all 0.2s ease;
}

.prime-action-btn:hover:not(:disabled) {
    background-color: #f2ce8a;
    box-shadow: 0 4px 15px rgba(223, 183, 108, 0.2);
}

.prime-action-btn:disabled {
    background-color: var(--border-subtle);
    color: var(--text-muted);
    cursor: not-allowed;
}

/* ── Workspace Frame Components ───────────────────────────────── */
.workspace-section {
    margin-bottom: 45px;
}

.workspace-header {
    font-size: 1rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-high-contrast);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.text-gold { color: var(--accent-gold) !important; }

.cards-stack-layout {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ── Premium High-Visibility Horizontal Row Card Layout ───────── */
.logo-row-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    padding: 20px 24px;
    display: flex;
    gap: 24px;
    align-items: center;
    justify-content: space-between;
    transition: border-color 0.2s ease;
}

.logo-row-card:hover {
    border-color: #2e3d59;
}

.logo-preview-pane {
    flex: 0 0 100px;
    width: 100px;
    height: 100px;
    background-color: #ffffff; /* Explicit structural layout isolation white canvas for brand identification rendering vectors */
    border-radius: 6px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.rendered-brand-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.null-img-fallback {
    color: #475569;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: bold;
}

.logo-telemetry-pane {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0; /* Assures horizontal text truncation works correctly across nested layout lines */
}

.meta-header-block {
    display: flex;
    align-items: center;
    gap: 12px;
}

.corporate-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-high-contrast);
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ticker-badge {
    background-color: var(--bg-field);
    border: 1px solid var(--border-subtle);
    color: var(--accent-gold);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 4px;
}

.s3-link-container {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(17, 24, 39, 0.4);
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid rgba(30, 41, 59, 0.2);
    min-width: 0;
}

.link-node-icon {
    color: var(--text-muted);
    font-size: 0.75rem;
    flex-shrink: 0;
}

.s3-url-text {
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.logo-action-pane {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.bookmark-toggle-btn {
    background-color: var(--bg-field);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    width: 38px;
    height: 38px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.bookmark-toggle-btn:hover {
    border-color: var(--accent-gold);
    color: var(--text-high-contrast);
}

.bookmark-toggle-btn.active {
    background-color: var(--accent-gold-dim);
    border-color: var(--accent-gold);
    color: var(--accent-gold);
}

.download-action-btn {
    background-color: transparent;
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.5px;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.2s ease;
}

.download-action-btn:hover {
    background-color: var(--accent-gold);
    color: #000000;
}

/* ── Interactive Inline Hover Balloons Subsystem ────────────────── */
.item-with-balloon {
    position: relative;
    cursor: help;
}

.item-with-balloon::after {
    content: attr(data-balloon);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    width: 240px;
    background-color: #121926;
    color: var(--text-normal);
    border: 1px solid var(--accent-gold);
    padding: 8px 12px;
    font-size: 0.8rem;
    font-weight: normal;
    line-height: 1.4;
    border-radius: 6px;
    text-transform: none;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    letter-spacing: normal;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 200;
    transition: opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.15s cubic-bezier(0.4, 0, 0.2, 1), 
                visibility 0.15s;
}

.item-with-balloon::before {
    content: "";
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    border-width: 6px;
    border-style: solid;
    border-color: var(--accent-gold) transparent transparent transparent;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 201;
    transition: opacity 0.15s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.15s;
}

.item-with-balloon:hover::after,
.item-with-balloon:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) scale(1);
}

/* ── Telemetry Logging Console ──────────────────────────────────── */
.status-console-block {
    display: flex;
    align-items: center;
    gap: 16px;
    background-color: #060a12;
    border-left: 3px solid var(--accent-gold);
    padding: 16px 24px;
    border-radius: 4px;
    margin-bottom: 25px;
}

#statusMsg {
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

.loading-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(223, 183, 108, 0.1);
    border-radius: 50%;
    border-top-color: var(--accent-gold);
    animation: pipelineSpin 0.8s linear infinite;
}

@keyframes pipelineSpin { to { transform: rotate(360deg); } }

/* ── Responsive Viewport Architecture ──────────────────────────── */
@media (max-width: 768px) {
    .logo-row-card { flex-direction: column; align-items: stretch; gap: 16px; }
    .logo-preview-pane { align-self: center; }
    .logo-action-pane { justify-content: flex-end; }
}