/* Helios Workspace Dashboard Stylesheet - Warm Theme (Unsloped) */
:root {
    --sidebar-width: 280px;
    --sidebar-bg: #0F1B2D; /* Brand Ink */
    --sidebar-active: rgba(201, 151, 50, 0.15);
}

body.dashboard-body {
    display: flex;
    height: 100vh;
    overflow: hidden;
    background-color: var(--color-bg);
}

/* Sidebar (Authority & Depth) */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    padding: 24px 0;
    flex-shrink: 0;
    color: white;
}

.sidebar-logo {
    padding: 0 24px 32px 24px;
}

.sidebar-logo .logo-text {
    color: white;
}

.sidebar-menu {
    flex: 1;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    cursor: pointer;
}

.menu-item:hover {
    color: white;
    background: rgba(255, 255, 255, 0.05);
}

.menu-item.active {
    background-color: var(--sidebar-active);
    color: var(--color-gold);
    border-left-color: var(--color-gold);
}

.menu-icon {
    width: 18px;
    height: 18px;
    font-size: 1rem;
    text-align: center;
}

.sidebar-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.avatar {
    width: 32px;
    height: 32px;
    background-color: var(--color-gold);
    color: var(--sidebar-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.75rem;
}

.user-info h5 {
    font-size: 0.8125rem;
    margin-bottom: 2px;
    color: white;
}

.user-info p {
    font-size: 0.6875rem;
    color: rgba(255, 255, 255, 0.4);
}

/* Main Content Stage */
.main-stage {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background-color: var(--color-bg);
}

.top-bar {
    height: 72px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
}

.top-bar h2 {
    font-size: 1.125rem;
    font-weight: 700;
}

.status-pills {
    display: flex;
    gap: 12px;
}

.pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid var(--color-border);
    font-family: var(--font-mono);
}

.pill-iris {
    background-color: var(--color-surface-2);
    color: var(--color-gold);
}

.pill-credits {
    background-color: white;
    color: var(--color-success);
}

/* Workspace Layout */
.content-wrap {
    padding: 32px;
    max-width: 1200px;
}

.view-section {
    display: none;
}

.view-section.active {
    display: block;
}

/* Card System (Clean & Sharp) */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.card {
    background-color: var(--color-surface-1);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    padding: 24px;
    box-shadow: var(--shadow-sm);
}

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

.card-header h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-text-primary);
}

/* Gauges */
.score-gauge {
    width: 160px;
    height: 160px;
    margin: 0 auto;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.score-circle {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.circle-bg {
    fill: none;
    stroke: var(--color-surface-2);
    stroke-width: 6;
}

.circle-fg {
    fill: none;
    stroke: var(--color-gold);
    stroke-width: 6;
    stroke-linecap: round;
    transition: stroke-dasharray 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.score-value {
    position: absolute;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--color-text-primary);
    font-family: var(--font-mono);
}

/* Chat Interface (AgentScope styled) */
.chat-container {
    height: calc(100vh - 220px);
    display: flex;
    flex-direction: column;
    background-color: var(--color-surface-1);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.chat-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--color-surface-2);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    background: #FCFAFA; /* Very slight tilt for readability */
}

.message {
    max-width: 85%;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.message-user {
    align-self: flex-end;
    background-color: var(--color-text-primary);
    color: white;
    border-bottom-right-radius: 2px;
}

.message-ai {
    align-self: flex-start;
    background-color: white;
    border: 1px solid var(--color-border);
    color: var(--color-text-primary);
    border-bottom-left-radius: 2px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.chat-input-area {
    padding: 16px;
    border-top: 1px solid var(--color-border);
    background-color: white;
    display: flex;
    gap: 12px;
}

.chat-input {
    flex: 1;
    background-color: var(--color-surface-2);
    border: 1px solid var(--color-border-strong);
    color: var(--color-text-primary);
    padding: 12px 16px;
    border-radius: 8px;
    outline: none;
    font-size: 0.9375rem;
}

.chat-input:focus {
    border-color: var(--color-gold);
}

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

.data-table th, .data-table td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.data-table th {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-table td {
    font-size: 0.875rem;
    color: var(--color-text-primary);
}

.brand-badge {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
}

.badge-mentioned {
    background-color: rgba(5, 150, 105, 0.1);
    color: var(--color-success);
}

.badge-not-found {
    background-color: rgba(220, 38, 38, 0.1);
    color: var(--color-error);
}

/* Eco-Banner (Warm Synergy) */
.eco-banner {
    background: linear-gradient(90deg, var(--color-surface-2) 0%, white 100%);
    border: 1px solid var(--color-border);
    padding: 24px 32px;
    border-radius: var(--radius-card);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    box-shadow: var(--shadow-sm);
}

.eco-banner-text h4 {
    font-size: 1.0625rem;
    margin-bottom: 6px;
    color: var(--color-text-primary);
}

.eco-banner-text p {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
}

/* ========================================================
   Gated Details & Login Lock (Blur Overlay & Auth Modal)
   ======================================================== */
.lock-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-card);
}

.locked-blur {
    filter: blur(5px);
    pointer-events: none;
    user-select: none;
    opacity: 0.55;
    transition: filter 0.3s ease, opacity 0.3s ease;
}

.lock-gate-banner {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, rgba(245, 242, 235, 0.92) 0%, rgba(245, 242, 235, 0.75) 100%);
    backdrop-filter: blur(2px);
    z-index: 10;
    padding: 24px;
    text-align: center;
}

.lock-icon-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    color: var(--color-gold);
}

.lock-gate-banner h4 {
    font-size: 1.05rem;
    color: var(--color-text-primary);
    margin-bottom: 6px;
    font-weight: 700;
}

.lock-gate-banner p {
    font-size: 0.85rem;
    color: var(--color-text-secondary);
    max-width: 420px;
    margin-bottom: 16px;
}

/* Chat Input Lock Banner */
.chat-locked-bar {
    position: absolute;
    inset: 0;
    background: rgba(245, 242, 235, 0.95);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 10;
}

/* Auth Modal */
.modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 27, 45, 0.6);
    backdrop-filter: blur(8px);
    z-index: 999;
    align-items: center;
    justify-content: center;
}

.modal-backdrop.show {
    display: flex;
}

.auth-modal {
    background: var(--color-surface-1);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-panel);
    width: 90%;
    max-width: 440px;
    padding: 32px;
    box-shadow: 0 20px 40px rgba(15, 27, 45, 0.2);
    position: relative;
    text-align: center;
}

.modal-close-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--color-text-muted);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.modal-close-btn:hover {
    background: var(--color-surface-2);
    color: var(--color-text-primary);
}

.auth-modal-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--color-surface-2);
    border: 1.5px solid var(--color-gold);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    color: var(--color-gold);
}

.auth-modal h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: var(--color-text-primary);
}

.auth-modal p {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin-bottom: 24px;
    line-height: 1.6;
}

.btn-auth-genex {
    width: 100%;
    padding: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.btn-auth-demo {
    width: 100%;
    padding: 10px;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* Typing cursor animation for real SSE streaming */
.typing-cursor::after {
    content: '▍';
    display: inline-block;
    color: var(--color-gold);
    animation: blink 0.8s infinite;
    margin-left: 2px;
}

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


