/* ==========================================================================
   HACKER HOUSE GOA (2:47 PM STUDIO) THEME — CLEAN & CRISP EDITION
   Palette:
   - Deep Goa Forest Green: #0b4728, #072f1a, #041d10
   - Sunshine Yellow      : #ffe600, #ffd700
   - Goa Magenta Pink     : #ff007f, #ff1493
   - Sand & White Text    : #ffffff, #f1f5f2, #a5c7b3
   - Slate / Glass Borders: rgba(255, 230, 0, 0.2), rgba(255, 255, 255, 0.1)
   ========================================================================== */

:root {
    --bg-dark: #041d10;
    --bg-green-deep: #072f1a;
    --bg-green-mid: #0b4728;
    --bg-card: rgba(6, 38, 20, 0.88);
    --bg-card-hover: rgba(9, 53, 29, 0.98);
    --bg-inner: #03170c;
    
    --goa-yellow: #ffe600;
    --goa-yellow-glow: rgba(255, 230, 0, 0.25);
    
    --goa-pink: #ff007f;
    --goa-pink-glow: rgba(255, 0, 127, 0.3);
    
    --goa-cyan: #38bdf8;
    --goa-emerald: #10b981;
    --goa-purple: #8b5cf6;
    
    --text-white: #ffffff;
    --text-sand: #eaf2eb;
    --text-muted: #8fbda0;
    
    --border-gold: rgba(255, 230, 0, 0.35);
    --border-subtle: rgba(255, 255, 255, 0.1);
    
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Syne', 'Plus Jakarta Sans', sans-serif;
    --font-serif: 'Playfair Display', serif;
    --font-hindi: 'Rozha One', cursive;
    --font-mono: 'JetBrains Mono', monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body.hhgoa-theme {
    background: radial-gradient(circle at 50% 0%, #0d5430 0%, #08381e 50%, #041d10 100%);
    background-color: var(--bg-green-deep);
    color: var(--text-white);
    font-family: var(--font-sans);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* TOP ACCENT STRIP */
.goa-top-strip {
    height: 4px;
    width: 100%;
    background: linear-gradient(90deg, #ff007f 0%, #ffe600 50%, #10b981 100%);
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.9rem 2rem;
    background: rgba(4, 29, 16, 0.95);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-gold);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.studio-badge {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.studio-time {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--goa-yellow);
    letter-spacing: -0.02em;
}

.studio-pm {
    font-size: 0.85rem;
    margin-left: 2px;
}

.studio-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--goa-yellow);
    letter-spacing: 0.2em;
    margin-top: 2px;
}

.header-v-divider {
    width: 1px;
    height: 32px;
    background: rgba(255, 230, 0, 0.3);
}

.hhgoa-brand .brand-title {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.title-hacker, .title-house {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--goa-yellow);
    letter-spacing: 0.04em;
}

.goa-hindi-tag {
    font-family: var(--font-hindi);
    font-size: 1.25rem;
    color: #ffffff;
    background: var(--goa-pink);
    padding: 0.05rem 0.45rem;
    border-radius: 4px;
    display: inline-block;
    line-height: 1.2;
}

.brand-sub {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-muted);
    letter-spacing: 0.08em;
    font-weight: 600;
    margin-top: 2px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.tg-live-pill {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(7, 47, 26, 0.8);
    border: 1px solid var(--border-gold);
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--goa-yellow);
}

.pulse-dot {
    width: 7px;
    height: 7px;
    background-color: var(--goa-emerald);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--goa-emerald);
}

.tg-nodes {
    color: var(--text-sand);
    background: rgba(255, 255, 255, 0.1);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-size: 0.7rem;
}

.search-bar {
    display: flex;
    align-items: center;
    background: #03170c;
    border: 1px solid var(--border-gold);
    border-radius: 6px;
    padding: 0.2rem 0.3rem;
}

.search-bar input {
    background: transparent;
    border: none;
    outline: none;
    color: #fff;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    padding: 0.35rem 0.6rem;
    width: 220px;
}

.search-bar input::placeholder {
    color: var(--text-muted);
}

.btn-investigate {
    background: var(--goa-yellow);
    color: #041d10;
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 0.8rem;
    border: none;
    padding: 0.4rem 0.85rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-investigate:hover {
    background: var(--goa-pink);
    color: #fff;
}

/* ==========================================================================
   HERO STRIP
   ========================================================================== */
.hero-strip {
    text-align: center;
    padding: 1.25rem 2rem;
    background: linear-gradient(180deg, rgba(7, 47, 26, 0.5) 0%, transparent 100%);
    border-bottom: 1px solid var(--border-subtle);
}

.hero-tag {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--goa-yellow);
    letter-spacing: 0.1em;
    margin-bottom: 0.3rem;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.01em;
    color: #ffffff;
}

.highlight-yellow {
    color: var(--goa-yellow);
}

.hero-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    max-width: 800px;
    margin: 0.3rem auto 0;
}

/* ==========================================================================
   METRICS GRID
   ========================================================================== */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.85rem;
    padding: 1rem 2rem;
    background: #03170c;
    border-bottom: 1px solid var(--border-gold);
}

.metric-box {
    background: rgba(6, 38, 20, 0.9);
    border: 1px solid var(--border-gold);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    transition: transform 0.2s, border-color 0.2s;
}

.metric-box:hover {
    transform: translateY(-2px);
    border-color: var(--goa-yellow);
}

.metric-pink {
    border-color: rgba(255, 0, 127, 0.4);
}

.metric-pink:hover {
    border-color: var(--goa-pink);
}

.metric-top {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.metric-number {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1;
}

.metric-yellow .metric-number { color: var(--goa-yellow); }
.metric-pink .metric-number { color: var(--goa-pink); }
.metric-gold .metric-number { color: #facc15; }

.metric-title {
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-sand);
    letter-spacing: 0.04em;
}

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

/* ==========================================================================
   MAIN DASHBOARD LAYOUT
   ========================================================================== */
.dashboard-layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 1.25rem;
    padding: 1.25rem 2rem;
    max-width: 1700px;
    margin: 0 auto;
}

.panel {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-gold);
    border-radius: 10px;
    padding: 1.15rem;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 290px);
    min-height: 580px;
}

/* LEFT: CASE EXPLORER */
.panel-header {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-gold);
}

.panel-heading {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.panel-heading h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--goa-yellow);
}

.filter-pills {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.35rem;
}

.pill-btn {
    background: #03170c;
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.35rem 0.2rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.pill-btn:hover {
    color: #fff;
    border-color: var(--goa-yellow);
}

.pill-btn.active {
    background: var(--goa-yellow);
    color: #041d10;
    font-weight: 700;
    border-color: var(--goa-yellow);
}

.pill-btn.btn-fraud.active {
    background: var(--goa-pink);
    color: #fff;
    border-color: var(--goa-pink);
}

.pill-btn.btn-sar.active {
    background: var(--goa-purple);
    color: #fff;
    border-color: var(--goa-purple);
}

.case-scroll-list {
    flex: 1;
    overflow-y: auto;
    margin-top: 0.75rem;
    padding-right: 0.3rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.case-scroll-list::-webkit-scrollbar {
    width: 5px;
}

.case-scroll-list::-webkit-scrollbar-thumb {
    background: var(--goa-yellow);
    border-radius: 4px;
}

.case-item {
    background: rgba(7, 47, 26, 0.75);
    border: 1px solid rgba(255, 230, 0, 0.15);
    border-radius: 6px;
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.case-item:hover {
    background: rgba(11, 62, 35, 0.95);
    border-color: var(--goa-yellow);
}

.case-item.active {
    background: #0d5430;
    border: 1.5px solid var(--goa-yellow);
    box-shadow: 0 0 10px var(--goa-yellow-glow);
}

.case-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.case-item-id {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--goa-yellow);
}

.case-item-body {
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: #ffffff;
}

/* RIGHT: DOSSIER VIEW */
.dossier-view {
    overflow-y: auto;
    gap: 1rem;
}

.dossier-view::-webkit-scrollbar {
    width: 5px;
}

.dossier-view::-webkit-scrollbar-thumb {
    background: var(--goa-yellow);
    border-radius: 4px;
}

.dossier-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-gold);
    flex-wrap: wrap;
    gap: 0.75rem;
}

.dossier-id-group {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.dossier-id-group h2 {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--goa-yellow);
}

.badge-tag {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
}

.badge-fraud {
    background: rgba(255, 0, 127, 0.2);
    color: var(--goa-pink);
    border: 1px solid var(--goa-pink);
}

.badge-uncertain {
    background: rgba(255, 230, 0, 0.2);
    color: var(--goa-yellow);
    border: 1px solid var(--goa-yellow);
}

.badge-cleared {
    background: rgba(16, 185, 129, 0.2);
    color: var(--goa-emerald);
    border: 1px solid var(--goa-emerald);
}

.badge-l1 {
    background: rgba(56, 189, 248, 0.2);
    color: var(--goa-cyan);
    border: 1px solid var(--goa-cyan);
}

.badge-l2 {
    background: rgba(139, 92, 246, 0.2);
    color: var(--goa-purple);
    border: 1px solid var(--goa-purple);
}

.dossier-stats-group {
    display: flex;
    gap: 0.5rem;
}

.stat-badge {
    background: #03170c;
    border: 1px solid var(--border-gold);
    padding: 0.3rem 0.65rem;
    border-radius: 4px;
    display: flex;
    gap: 0.35rem;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    align-items: center;
}

.stat-badge .label {
    color: var(--text-muted);
}

.stat-badge .val {
    color: var(--goa-yellow);
    font-weight: 700;
}

/* TOPOLOGY CANVAS */
.canvas-card {
    background: #03170c;
    border: 1px solid var(--border-gold);
    border-radius: 6px;
    padding: 0.75rem;
}

.canvas-meta-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.canvas-label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.canvas-label h4 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--goa-yellow);
}

.canvas-legend {
    display: flex;
    gap: 0.75rem;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--text-muted);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dot-txn { background: var(--goa-yellow); }
.dot-card { background: var(--goa-emerald); }
.dot-cust { background: var(--goa-cyan); }
.dot-dev { background: #f59e0b; }
.dot-shared { background: var(--goa-pink); }

.canvas-box {
    width: 100%;
    border-radius: 4px;
    background: radial-gradient(circle at 50% 50%, #06311b 0%, #021208 100%);
}

#graphCanvas {
    display: block;
    width: 100%;
    height: 300px;
}

/* DOSSIER TABS */
.tabs-header {
    display: flex;
    gap: 0.4rem;
    border-bottom: 1px solid var(--border-gold);
    padding-bottom: 0.35rem;
    overflow-x: auto;
}

.tab-item {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.45rem 0.85rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.tab-item:hover {
    color: var(--goa-yellow);
    background: rgba(255, 230, 0, 0.08);
}

.tab-item.active {
    color: #041d10;
    background: var(--goa-yellow);
}

.tabs-body {
    flex: 1;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.2s ease;
}

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

/* EVIDENCE TAB */
.evidence-container {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.evidence-card {
    background: #03170c;
    border-left: 3px solid var(--goa-yellow);
    border-top: 1px solid var(--border-subtle);
    border-right: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.75rem 0.9rem;
    border-radius: 0 6px 6px 0;
}

.evidence-claim-text {
    font-size: 0.88rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 0.25rem;
}

.evidence-meta-text {
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
}

.evidence-meta-text code {
    color: var(--goa-yellow);
    background: rgba(255, 230, 0, 0.1);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
}

/* TRACE TAB */
.trace-container {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.trace-item {
    display: flex;
    gap: 0.75rem;
    background: #03170c;
    border: 1px solid var(--border-subtle);
    padding: 0.75rem;
    border-radius: 6px;
}

.trace-num {
    background: var(--goa-yellow);
    color: #041d10;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 0.82rem;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.trace-body h5 {
    font-family: var(--font-sans);
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--goa-yellow);
    margin-bottom: 0.2rem;
}

.trace-body p {
    font-size: 0.82rem;
    color: var(--text-sand);
}

/* PLAYBOOK TAB */
.playbook-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.playbook-hero {
    background: #03170c;
    border: 1px solid var(--goa-yellow);
    padding: 0.85rem;
    border-radius: 6px;
}

.playbook-hero h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 800;
    color: var(--goa-yellow);
}

/* SAR TAB */
.sar-card-box {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sar-action-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sar-header-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.sar-header-title h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--goa-yellow);
}

.btn-copy {
    background: var(--goa-pink);
    color: #fff;
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 0.75rem;
    border: none;
    padding: 0.35rem 0.75rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-copy:hover {
    background: var(--goa-yellow);
    color: #041d10;
}

.sar-pre {
    background: #021208;
    border: 1px solid rgba(255, 0, 127, 0.3);
    border-radius: 6px;
    padding: 1rem;
    color: #bbf7d0;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    line-height: 1.5;
    white-space: pre-wrap;
    max-height: 340px;
    overflow-y: auto;
}

/* SIMULATION TAB */
.sim-wrapper {
    background: #03170c;
    border: 1px solid var(--border-gold);
    border-radius: 6px;
    padding: 1rem;
}

.sim-prompt-box h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: var(--goa-yellow);
    margin-bottom: 0.2rem;
}

.sim-prompt-box p {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.sim-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn-sim {
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 0.82rem;
    padding: 0.65rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.sim-clear {
    background: var(--goa-yellow);
    color: #041d10;
}

.sim-clear:hover {
    background: var(--goa-emerald);
    color: #fff;
}

.sim-dispute {
    background: var(--goa-pink);
    color: #fff;
}

.sim-dispute:hover {
    background: #ef4444;
}

.sim-output {
    margin-top: 0.85rem;
    background: #021208;
    border-left: 3px solid var(--goa-yellow);
    padding: 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    display: none;
}

/* FOOTER */
.app-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: #021208;
    border-top: 1px solid var(--border-gold);
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-muted);
}

.loading-state {
    color: var(--text-muted);
    font-style: italic;
    padding: 1rem;
    text-align: center;
}

/* RESPONSIVE */
@media (max-width: 1200px) {
    .metrics-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .dashboard-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .app-header {
        flex-direction: column;
        gap: 0.75rem;
        padding: 0.75rem 1rem;
    }
    .metrics-grid {
        grid-template-columns: 1fr;
        padding: 0.75rem 1rem;
    }
    .dashboard-layout {
        padding: 0.75rem 1rem;
    }
}
