@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Outfit:wght@400;600;700;800;900&family=Instrument+Serif:ital@0;1&display=swap');

:root {
  /* Core palette from landing page */
  --yellow:      #fbbf24;
  --yellow-dark: #d97706;
  --yellow-xdark:#92400e;
  --yellow-light:#fef9ea;
  --blue:        #1a56db;
  --blue-dark:   #1040b0;
  --blue-light:  #e8effe;
  --black:       #0d0d0d;
  --white:       #ffffff;

  /* Dashboard Specific Tokens */
  --bg-main:    #FEFEFB;    /* Warm, light yellow-tinted white */
  --sidebar-bg: #FFFFFF;
  --bg-card:    #FFFFFF;
  --border-light:#F3F4F6;
  --border-dark: #E5E7EB;
  --text-main:  #0F172A;
  --text-muted: #475569;
  --text-faint: #94A3B8;

  --value-green: #10B981;
  --value-green-bg: rgba(16, 185, 129, 0.08);
  --value-red: #EF4444;
  --value-red-bg: rgba(239, 68, 68, 0.06);

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.02);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.04), 0 2px 4px -1px rgba(0,0,0,0.02);
  --shadow-lg: 0 10px 25px -5px rgba(0,0,0,0.05), 0 8px 10px -6px rgba(0,0,0,0.05);
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(circle at 100% 0%, var(--yellow-light) 0%, transparent 40%),
    radial-gradient(circle at 0% 100%, var(--blue-light) 0%, transparent 30%);
  color: var(--text-main);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body.dashboard-body {
    overflow: hidden;
}

/* ─── LAYOUT ─── */
.dashboard-container {
    display: flex;
    height: 100vh;
    width: 100vw;
}

/* ─── SIDEBAR ─── */
.sidebar {
    width: 280px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    padding: 2rem 1.5rem;
    z-index: 100;
}

.sidebar-header {
    margin-bottom: 3.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.logo-mark {
  width: 32px;
  height: 32px;
  background: var(--yellow);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 4px 15px rgba(251,191,36,0.4);
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.logo-name {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.logo-tagline {
  font-weight: 700;
  font-size: 0.6rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 2px;
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.nav-section {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.section-title {
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding-left: 0.75rem;
    margin-bottom: 0.5rem;
}

.side-nav-btn {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    background: none;
    border: none;
    border-radius: 14px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    text-align: left;
}

.side-nav-btn:hover {
    background: var(--white);
    color: var(--text-main);
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}

.side-nav-btn.active {
    background: var(--white);
    color: var(--blue);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--blue-light);
}

.sidebar-footer {
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-light);
}

.user-pill {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 18px;
    background: var(--white);
    border: 1px solid var(--border-light);
    cursor: pointer;
    transition: all 0.2s;
}

.user-pill:hover {
    border-color: var(--yellow);
    box-shadow: var(--shadow-md);
}

.user-pill-avatar {
    width: 38px;
    height: 38px;
    background: var(--yellow);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: var(--black);
    font-size: 0.9rem;
}

.user-pill-info {
    display: flex;
    flex-direction: column;
}

.user-pill-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-pill-status {
    font-size: 0.7rem;
    color: var(--text-faint);
    font-weight: 600;
}

/* ─── MAIN CONTENT ─── */
.dashboard-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.main-header {
    height: 80px;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2.5rem;
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 50;
}

.search-container {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: 500px;
    position: relative;
}

.search-icon {
    position: absolute;
    left: 1.25rem;
    color: var(--text-faint);
}

.search-input {
    width: 100%;
    padding: 0.75rem 1.25rem 0.75rem 3.25rem;
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-input:focus {
    outline: none;
    border-color: var(--yellow);
    box-shadow: 0 0 0 4px var(--yellow-light);
}

.dashboard-content {
    padding: 2.5rem;
    max-width: 1300px;
    margin: 0 auto;
    width: 100%;
}

/* Stats Overview */
.stats-overview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--white);
    padding: 1.75rem;
    border-radius: 24px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-md);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-card.primary {
    background: var(--yellow);
    border: none;
    box-shadow: 0 10px 30px rgba(251,191,36,0.25);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.stat-label {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.primary .stat-label { color: var(--yellow-xdark); }

.stat-trend {
    font-size: 0.7rem;
    font-weight: 800;
    padding: 0.25rem 0.6rem;
    border-radius: 8px;
}

.stat-trend.up { background: var(--value-green-bg); color: var(--value-green); }

.stat-value {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.primary .stat-value { color: var(--yellow-xdark); }

.stat-footer {
    font-size: 0.75rem;
    color: var(--text-faint);
    font-weight: 600;
}
.primary .stat-footer { color: rgba(146, 64, 14, 0.6); }

/* Feed Section */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--white);
}

.section-header h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.75rem;
    font-weight: 900;
    letter-spacing: -0.04em;
    color: var(--text-main);
}

/* Market Card - Institutional Modern */
.market-card {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: 24px;
    padding: 0;
    display: flex;
    flex-direction: column;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    margin-bottom: 1.25rem;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.market-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--yellow-dark);
}

.market-card.expanded {
    border-color: var(--blue);
    box-shadow: 0 20px 50px rgba(26, 86, 219, 0.1);
}

.card-main-content {
    padding: 1.75rem 2rem;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    align-items: center;
    gap: 2rem;
}

.market-card.has-edge::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 6px;
    background: var(--yellow);
}

.match-info-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.category-tag {
    font-size: 0.65rem;
    font-weight: 900;
    color: var(--blue);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.market-title {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-main);
}

.market-title em {
    font-family: 'Instrument Serif', serif;
    font-style: italic;
    font-weight: 400;
    color: var(--text-faint);
    margin: 0 0.3rem;
}

.match-meta {
    font-size: 0.8rem;
    color: var(--text-faint);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.match-meta::before {
    content: '';
    width: 6px; height: 6px;
    background: var(--border-dark);
    border-radius: 50%;
}

.prices-group {
    display: flex;
    gap: 0.75rem;
}

.mini-price {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    padding: 0.75rem;
    background: var(--bg-main);
    border-radius: 14px;
    border: 1px solid var(--border-light);
    min-width: 100px;
    transition: all 0.2s;
}

.mini-price.active {
    border-color: var(--blue-light);
    background: var(--blue-light);
}

.mini-price .label {
    font-size: 0.6rem;
    font-weight: 800;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.mini-price .val {
    font-family: 'Outfit', sans-serif;
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--blue-dark);
}

.action-group {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 2rem;
    padding-left: 2rem;
    border-left: 1px solid var(--border-light);
}

.ai-brief {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.ai-brief .label { font-size: 0.65rem; font-weight: 800; color: var(--text-faint); text-transform: uppercase; }
.ai-brief .val { font-family: 'Outfit', sans-serif; font-size: 1.4rem; font-weight: 800; color: var(--value-green); }

.btn-analyze {
    height: 48px;
    padding: 0 1.75rem;
    background: var(--yellow);
    color: var(--black);
    border: none;
    border-radius: 14px;
    font-weight: 800;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    box-shadow: 0 4px 12px rgba(251,191,36,0.3);
}

.btn-analyze:hover {
    background: var(--yellow-dark);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(217, 119, 6, 0.4);
}
/* AI Forecast Badge & States */
.ai-forecast-badge {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.15rem;
}

.ai-prob-val {
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    line-height: 0.9;
    color: var(--text-main);
    margin: 0.2rem 0;
}

.ai-prob-label {
    font-size: 0.55rem;
    font-weight: 900;
    color: var(--text-faint);
    letter-spacing: 0.12em;
    opacity: 0.8;
}

.ai-prob-val.undervalued { color: var(--value-green); }
.ai-prob-val.overvalued { color: var(--value-red); }
.ai-prob-val.neutral { color: var(--text-main); }

.ai-status {
    font-weight: 800;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.65rem;
    text-transform: uppercase;
}
.status-live { background: var(--value-green-bg); color: var(--value-green); }
.status-processing { background: #F1F5F9; color: var(--text-faint); display: flex; align-items: center; gap: 0.4rem; }

.spinner {
    width: 6px;
    height: 6px;
    border: 1.5px solid rgba(0,0,0,0.1);
    border-top-color: var(--blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
/* Expanded Detail View */
.card-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    background: #F9FAFB;
    border-top: 1px solid var(--border-light);
}

.market-card.expanded .card-details {
    max-height: 400px;
}

.details-inner {
    padding: 2rem;
}

.odds-comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.odds-comparison-table th {
    text-align: left;
    padding: 0.75rem;
    color: var(--text-faint);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--border-light);
}

.odds-comparison-table td {
    padding: 1rem 0.75rem;
    border-bottom: 1px solid var(--border-light);
    font-weight: 600;
}

.source-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.3rem 0.75rem;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
}

.price-indicator {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    color: var(--blue);
}

.best-price-badge {
    background: var(--value-green-bg);
    color: var(--value-green);
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-size: 0.65rem;
    margin-left: 0.5rem;
}

.ai-reasoning-box {
    margin-top: 1.5rem;
    padding: 1rem;
    background: var(--blue-light);
    border-radius: 12px;
    border-left: 4px solid var(--blue);
}

.ai-reasoning-box p {
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--blue-dark);
}

.ai-status {
    font-weight: 800;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    font-size: 0.65rem;
}
.status-live { background: var(--value-green-bg); color: var(--value-green); }
.status-processing { background: #F1F5F9; color: var(--text-faint); display: flex; align-items: center; gap: 0.4rem; }

.spinner {
    width: 10px;
    height: 10px;
    border: 2px solid rgba(0,0,0,0.1);
    border-top-color: var(--blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
/* ─── PRO LOCK ─── */
.pro-lock-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 20;
    border-radius: 20px;
}

.lock-icon-container {
    width: 44px; height: 44px;
    background: var(--text-main);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.pro-lock-overlay h3 { font-family: 'Outfit', sans-serif; font-size: 1.1rem; font-weight: 800; }
.pro-lock-overlay p { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1rem; }

.upgrade-btn {
    background: var(--blue);
    color: var(--white);
    border: none;
    padding: 0.6rem 1.25rem;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(26, 86, 219, 0.3);
}

/* ─── MODALS ─── */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(15px);
    inset: 0;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.modal-content {
    background: var(--white);
    padding: 3.5rem;
    border-radius: 32px;
    max-width: 440px;
    width: 100%;
}

.modal-content h2 { font-family: 'Outfit', sans-serif; font-weight: 800; font-size: 2rem; margin-bottom: 0.5rem; }
.modal-content p { color: var(--text-muted); margin-bottom: 2rem; }

/* Simplified Settings View */
.settings-group {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 3.5rem;
    padding: 0;
    background: none;
    border: none;
}

.setting-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid var(--border-light);
    padding-bottom: 1.5rem;
    padding-top: 1.5rem;
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-label {
    font-size: 0.6rem;
    font-weight: 800;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.setting-value {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
}

/* ─── TOGGLE SWITCH ─── */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--border-dark);
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .4s;
}

input:checked + .slider {
  background-color: var(--blue);
}

input:focus + .slider {
  box-shadow: 0 0 1px var(--blue);
}

input:checked + .slider:before {
  transform: translateX(20px);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}


.btn-secondary-minimal {
    background: none;
    border: none;
    color: var(--value-red);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    width: 100%;
    text-align: center;
    padding: 0.5rem;
    transition: opacity 0.2s;
}

.btn-secondary-minimal:hover {
    opacity: 0.7;
    text-decoration: underline;
}

.input-group label { font-size: 0.7rem; font-weight: 800; color: var(--text-faint); text-transform: uppercase; margin-bottom: 0.5rem; display: block; }
.input-group input { width: 100%; padding: 1rem; border: 1.5px solid var(--border-light); border-radius: 16px; font-family: inherit; font-size: 1rem; }
.input-group input:focus { outline: none; border-color: var(--yellow); }

/* Scanner */
.scanner-status {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1.2rem;
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 99px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--value-green);
    box-shadow: var(--shadow-md);
}

.scanner-dot {
    width: 8px; height: 8px;
    background: currentColor;
    border-radius: 50%;
    position: relative;
}

.scanner-dot::after {
    content: ''; position: absolute; inset: -4px;
    border: 2.5px solid currentColor; border-radius: 50%;
    animation: pulse-ring 2.5s infinite;
}

@keyframes pulse-ring {
    0% { transform: scale(0.5); opacity: 1; }
    100% { transform: scale(2.5); opacity: 0; }
}

/* Prediction Section Container */
.prediction-section {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 2rem;
}

.pro-metrics {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    padding-left: 1.5rem;
    border-left: 1px solid var(--border-light);
    min-width: 120px;
}

.pro-metric {
    display: flex;
    flex-direction: column;
}

.metric-label {
    font-size: 0.6rem;
    font-weight: 800;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    line-height: 1;
    margin-bottom: 2px;
}

.metric-val {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.1;
}

.metric-val.highlight {
    color: var(--blue);
}

.settings-select {
    padding: 0.6rem 1rem;
    border-radius: 12px;
    border: 1.5px solid var(--border-light);
    background: var(--bg-main);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s;
}

.settings-select:focus {
    outline: none;
    border-color: var(--yellow);
}

.disabled-setting {
    opacity: 0.5;
    pointer-events: none;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 8rem 2rem;
    background: white;
    border-radius: 32px;
    border: 2px dashed var(--border-light);
}

@media (max-width: 1100px) {
    .stats-overview { grid-template-columns: repeat(2, 1fr); }
    .market-card { grid-template-columns: 1fr auto; gap: 2rem; }
    .action-group { flex-direction: column; align-items: flex-end; }
}

@media (max-width: 768px) {
    .sidebar { width: 80px; padding: 2rem 0.5rem; }
    .logo-text, .section-title, .user-pill-info { display: none; }
    .dashboard-content { padding: 1.5rem; }
    .stats-overview { grid-template-columns: 1fr; }
    .market-card { grid-template-columns: 1fr; text-align: center; }
    .action-group { border-left: none; border-top: 1px solid var(--border-light); padding: 1.5rem 0 0; width: 100%; align-items: center; }
    .ai-brief { text-align: center; margin-bottom: 1rem; }
    .prices-group { justify-content: center; }
}
