/* ============================================
   FORCED INTELLIGENCE — Force Trans, Inc.
   Colors: Carolina Blue, Blue, Grey, Black on White
   Glow effects throughout
   ============================================ */

:root {
    --carolina: #4B9CD3;
    --blue: #1A5DAB;
    --grey: #6B7B8D;
    --black: #1A1A2E;
    --white: #FFFFFF;
    --bg: #FAFBFD;
    --card-bg: #FFFFFF;

    /* Glows */
    --glow-carolina: 0 0 15px rgba(75, 156, 211, 0.3);
    --glow-carolina-strong: 0 0 25px rgba(75, 156, 211, 0.5);
    --glow-blue: 0 0 15px rgba(26, 93, 171, 0.3);
    --glow-blue-strong: 0 0 25px rgba(26, 93, 171, 0.5);
    --glow-grey: 0 0 12px rgba(107, 123, 141, 0.2);

    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --mono: 'JetBrains Mono', 'Fira Code', monospace;
}

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

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--black);
    min-height: 100vh;
}

/* --- LAYOUT --- */
.app-container {
    display: grid;
    grid-template-columns: 260px 1fr;
    grid-template-rows: 64px 1fr;
    min-height: 100vh;
}

/* --- TOP NAV --- */
.topbar {
    grid-column: 1 / -1;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    box-shadow: var(--glow-grey);
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-brand h1 {
    font-size: 20px;
    font-weight: 700;
    color: var(--black);
    letter-spacing: -0.5px;
}

.topbar-brand span {
    font-size: 11px;
    color: var(--grey);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-user {
    font-size: 13px;
    color: var(--grey);
}

/* --- SIDEBAR --- */
.sidebar {
    background: var(--white);
    padding: 24px 0;
    box-shadow: var(--glow-grey);
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: var(--grey);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.sidebar-nav a:hover {
    color: var(--carolina);
    background: rgba(75, 156, 211, 0.05);
}

.sidebar-nav a.active {
    color: var(--carolina);
    background: rgba(75, 156, 211, 0.08);
    box-shadow: inset 3px 0 0 var(--carolina);
}

/* --- MAIN CONTENT --- */
.main {
    padding: 32px;
    overflow-y: auto;
}

/* --- STAT CARDS --- */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.stat-card {
    background: var(--card-bg);
    padding: 24px;
    border-radius: 12px;
    box-shadow: var(--glow-grey);
    transition: box-shadow 0.3s;
}

.stat-card:hover {
    box-shadow: var(--glow-carolina);
}

.stat-card .stat-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--grey);
    margin-bottom: 8px;
}

.stat-card .stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--black);
}

.stat-card .stat-change {
    font-size: 12px;
    color: var(--carolina);
    margin-top: 4px;
}

/* --- COMPANY TABLE --- */
.table-container {
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: var(--glow-grey);
    overflow: hidden;
}

.table-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
}

.table-header h2 {
    font-size: 16px;
    font-weight: 600;
    color: var(--black);
}

.table-filters {
    display: flex;
    gap: 12px;
}

.filter-btn {
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 500;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    background: var(--bg);
    color: var(--grey);
    transition: all 0.2s;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--carolina);
    color: var(--white);
    box-shadow: var(--glow-carolina);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead th {
    text-align: left;
    padding: 12px 24px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--grey);
    background: var(--bg);
    font-weight: 600;
}

tbody tr {
    transition: all 0.2s;
    cursor: pointer;
}

tbody tr:hover {
    background: rgba(75, 156, 211, 0.04);
    box-shadow: var(--glow-carolina);
}

tbody td {
    padding: 16px 24px;
    font-size: 14px;
    color: var(--black);
}

/* --- SCORE BADGE --- */
.score-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 700;
    font-family: var(--mono);
}

.score-hot {
    color: var(--blue);
    background: rgba(26, 93, 171, 0.1);
    box-shadow: var(--glow-blue);
}

.score-warm {
    color: var(--carolina);
    background: rgba(75, 156, 211, 0.1);
    box-shadow: var(--glow-carolina);
}

.score-cool {
    color: var(--grey);
    background: rgba(107, 123, 141, 0.1);
}

/* --- SIGNAL PILLS --- */
.signal-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.signal-pill.job_posting {
    color: var(--carolina);
    background: rgba(75, 156, 211, 0.1);
}

.signal-pill.cargo_theft {
    color: #D32F2F;
    background: rgba(211, 47, 47, 0.08);
}

.signal-pill.leadership_change {
    color: var(--blue);
    background: rgba(26, 93, 171, 0.1);
}

.signal-pill.contract_dispute {
    color: #E65100;
    background: rgba(230, 81, 0, 0.08);
}

.signal-pill.rfp {
    color: #2E7D32;
    background: rgba(46, 125, 50, 0.08);
}

.signal-pill.expansion {
    color: var(--carolina);
    background: rgba(75, 156, 211, 0.1);
}

.signal-pill.disruption {
    color: #6A1B9A;
    background: rgba(106, 27, 154, 0.08);
}

/* --- DETAIL PANEL (slide-in) --- */
.detail-panel {
    position: fixed;
    top: 64px;
    right: -480px;
    width: 480px;
    height: calc(100vh - 64px);
    background: var(--white);
    box-shadow: -4px 0 30px rgba(75, 156, 211, 0.15);
    padding: 32px;
    overflow-y: auto;
    transition: right 0.3s ease;
    z-index: 100;
}

.detail-panel.open {
    right: 0;
}

.detail-panel h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--black);
    margin-bottom: 4px;
}

.detail-panel .detail-meta {
    font-size: 13px;
    color: var(--grey);
    margin-bottom: 24px;
}

.detail-score {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border-radius: 12px;
    background: var(--bg);
    box-shadow: var(--glow-carolina);
    margin-bottom: 24px;
}

.detail-score .big-score {
    font-size: 48px;
    font-weight: 800;
    color: var(--carolina);
    font-family: var(--mono);
    text-shadow: 0 0 20px rgba(75, 156, 211, 0.4);
}

.detail-score .score-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--grey);
}

.signal-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.signal-card {
    padding: 16px;
    border-radius: 10px;
    background: var(--bg);
    transition: box-shadow 0.2s;
}

.signal-card:hover {
    box-shadow: var(--glow-carolina);
}

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

.signal-card .signal-date {
    font-size: 11px;
    color: var(--grey);
}

.signal-card .signal-summary {
    font-size: 13px;
    color: var(--black);
    line-height: 1.5;
}

.signal-card .signal-source {
    font-size: 11px;
    color: var(--carolina);
    margin-top: 8px;
    text-decoration: none;
}

.signal-card .signal-source:hover {
    text-decoration: underline;
}

/* --- BUTTONS --- */
.btn {
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: var(--carolina);
    color: var(--white);
    box-shadow: var(--glow-carolina);
}

.btn-primary:hover {
    background: var(--blue);
    box-shadow: var(--glow-blue-strong);
}

.btn-ghost {
    background: transparent;
    color: var(--grey);
}

.btn-ghost:hover {
    color: var(--carolina);
}

/* --- LOGIN PAGE --- */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg);
}

.login-card {
    background: var(--white);
    padding: 48px;
    border-radius: 16px;
    box-shadow: var(--glow-carolina-strong);
    width: 400px;
    text-align: center;
}

.login-card h1 {
    font-size: 28px;
    font-weight: 800;
    color: var(--black);
    margin-bottom: 4px;
}

.login-card .login-sub {
    font-size: 13px;
    color: var(--grey);
    margin-bottom: 32px;
}

.login-card input {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    border: 1px solid rgba(107, 123, 141, 0.2);
    border-radius: 8px;
    margin-bottom: 16px;
    outline: none;
    transition: box-shadow 0.2s;
}

.login-card input:focus {
    box-shadow: var(--glow-carolina);
    border-color: var(--carolina);
}

.login-card .btn-primary {
    width: 100%;
    padding: 14px;
    font-size: 15px;
    margin-top: 8px;
}

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
    .stats-row { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .app-container { grid-template-columns: 1fr; }
    .sidebar { display: none; }
    .stats-row { grid-template-columns: 1fr; }
}

/* --- LOADING SPINNER --- */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(75, 156, 211, 0.2);
    border-top-color: var(--carolina);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* --- GLOW PULSE for live indicators --- */
.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--carolina);
    box-shadow: var(--glow-carolina-strong);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 8px rgba(75, 156, 211, 0.4); }
    50% { box-shadow: 0 0 20px rgba(75, 156, 211, 0.7); }
}

/* --- VIEW SWITCHING --- */
.view-hidden { display: none !important; }

/* --- BUILD INFO --- */
.build-info {
    position: fixed;
    bottom: 96px;   /* ~1 inch from bottom of viewport */
    left: 48px;     /* ~0.5 inch from left edge */
    font-family: var(--mono);
    font-size: 11px;
    color: var(--grey);
    line-height: 1.6;
    z-index: 100;
    pointer-events: none;
    opacity: 0.85;
}
.build-info-row {
    display: flex;
    gap: 8px;
    align-items: baseline;
}
.build-info-label {
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 700;
    font-size: 9px;
    color: var(--carolina);
    min-width: 70px;
}
.build-info-value {
    font-weight: 500;
}
