/* ============================================================
   EMPIRE INC — Business Tycoon Simulator
   Corporate Dashboard Theme
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Poppins:wght@300;400;500;600;700;800;900&display=swap');

/* --- Design Tokens --- */
:root {
  /* Core backgrounds */
  --bg-dark: #0f1117;
  --bg-card: #1a1d27;
  --bg-card-hover: #222633;
  --bg-sidebar: #141720;
  --bg-surface: #252937;
  --bg-elevated: #2d3245;
  --bg-input: #12141c;

  /* Accent palette */
  --accent: #10b981;
  --accent-hover: #0ea672;
  --accent-dim: #065f46;
  --accent-glow: rgba(16, 185, 129, 0.25);
  --danger: #ef4444;
  --danger-dim: #7f1d1d;
  --danger-glow: rgba(239, 68, 68, 0.25);
  --accent2: #3b82f6;
  --accent2-dim: #1e3a5f;
  --accent2-glow: rgba(59, 130, 246, 0.25);
  --gold: #f59e0b;
  --gold-dim: #78350f;
  --gold-glow: rgba(245, 158, 11, 0.25);
  --purple: #a855f7;
  --pink: #ec4899;
  --cyan: #06b6d4;

  /* Text */
  --text: #f1f5f9;
  --text-bright: #ffffff;
  --text-dim: #94a3b8;
  --text-muted: #64748b;
  --text-faint: #475569;

  /* Borders */
  --border: #2d3245;
  --border-light: #3d4460;

  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.6);
}


/* ============================================================
   RESET & BASE
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  overflow: hidden;
  height: 100vh;
  width: 100vw;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Poppins', sans-serif;
  color: var(--text-bright);
  line-height: 1.2;
}

a { color: var(--accent2); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent); }

ul, ol { list-style: none; }

input, button, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: none;
  outline: none;
  background: none;
}

button { cursor: pointer; }
img { max-width: 100%; display: block; }


/* ============================================================
   UTILITY CLASSES
   ============================================================ */

.green, .positive { color: var(--accent); }
.red, .negative   { color: var(--danger); }
.blue             { color: var(--accent2); }
.gold             { color: var(--gold); }
.text-dim         { color: var(--text-dim); }
.text-muted       { color: var(--text-muted); }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); border: 0;
}


/* ============================================================
   ANIMATIONS
   ============================================================ */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(50px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(50px); }
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}

@keyframes modalSlideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.7; }
}

@keyframes victoryPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.04); }
}

@keyframes tickerScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@keyframes skeletonShimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes confettiFall {
  0%   { transform: translateY(-10vh) rotate(0deg); opacity: 1; }
  100% { transform: translateY(110vh) rotate(720deg); opacity: 0; }
}

.pulse { animation: pulse 1s ease-in-out infinite; }


/* ============================================================
   LOGIN SCREEN
   ============================================================ */

#login-screen {
  position: fixed; inset: 0;
  background: linear-gradient(135deg, #0f1117 0%, #151830 50%, #0f1117 100%);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  overflow: hidden;
}

#login-screen::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(16, 185, 129, 0.07) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(59, 130, 246, 0.06) 0%, transparent 50%);
}

.login-container {
  text-align: center;
  z-index: 1;
  animation: fadeUp 0.8s ease;
}

.login-logo {
  font-family: 'Poppins', sans-serif;
  font-size: 3rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--accent) 0%, #34d399 40%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -1px;
  margin-bottom: 0.25rem;
}

.login-sub {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-bottom: 2rem;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.login-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  width: 400px;
  max-width: 92vw;
  box-shadow: var(--shadow-lg);
}

.login-box h2 {
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
}

.login-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 0.95rem;
  font-family: 'Inter', sans-serif;
  margin-bottom: 1rem;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.login-input::placeholder { color: var(--text-muted); }

.login-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.login-btn {
  width: 100%;
  padding: 12px;
  background: linear-gradient(135deg, var(--accent), #059669);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-size: 1rem;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: all 0.25s;
  margin-top: 0.5rem;
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--accent-glow);
}

.login-btn:active {
  transform: translateY(0);
}

.login-footer {
  margin-top: 2rem;
  color: var(--text-dim);
  font-size: 0.75rem;
}

.login-footer span {
  color: var(--accent);
  font-weight: 600;
}


/* ============================================================
   SETUP SCREEN
   ============================================================ */

#setup-screen {
  position: fixed; inset: 0;
  background: linear-gradient(135deg, #0f1117 0%, #111a2e 50%, #0f1117 100%);
  display: none; align-items: center; justify-content: center;
  z-index: 9998;
  overflow-y: auto;
  padding: 2rem;
}

#setup-screen::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(16, 185, 129, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 70% 80%, rgba(59, 130, 246, 0.04) 0%, transparent 50%);
  pointer-events: none;
}

.setup-container {
  text-align: center;
  max-width: 640px;
  width: 100%;
  animation: fadeUp 0.6s ease;
  position: relative;
  z-index: 1;
}

.setup-container h1 {
  font-size: 2.25rem;
  font-weight: 900;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--accent) 0%, #34d399 50%, var(--gold) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.setup-container p {
  color: var(--text-dim);
  margin-bottom: 2rem;
  font-size: 0.95rem;
}

.setup-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  text-align: left;
  box-shadow: var(--shadow-md);
}

.setup-field {
  margin-bottom: 1.5rem;
}

.setup-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-family: 'Poppins', sans-serif;
}

.setup-field input,
.setup-field select {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-input);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 1.1rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.setup-field input::placeholder { color: var(--text-muted); font-weight: 400; }

.setup-field input:focus,
.setup-field select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.setup-field select option {
  background: var(--bg-dark);
}

/* Industry Grid — 6 cards, 3 columns */
.industry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.industry-btn {
  padding: 16px 10px;
  background: var(--bg-input);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text);
  cursor: pointer;
  transition: all 0.25s;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  text-align: center;
}

.industry-btn:hover {
  border-color: var(--accent);
  background: rgba(16, 185, 129, 0.05);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.industry-btn.selected {
  border-color: var(--accent);
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent);
  font-weight: 700;
  box-shadow: 0 0 16px var(--accent-glow);
}

.industry-btn .icon {
  font-size: 1.75rem;
  display: block;
  margin-bottom: 6px;
}

/* City Grid — 5 cards */
.city-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.city-btn {
  padding: 12px 6px;
  background: var(--bg-input);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  cursor: pointer;
  transition: all 0.25s;
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  text-align: center;
}

.city-btn:hover {
  border-color: var(--accent2);
  transform: translateY(-2px);
}

.city-btn.selected {
  border-color: var(--accent2);
  background: rgba(59, 130, 246, 0.1);
  color: var(--accent2);
  font-weight: 700;
  box-shadow: 0 0 16px var(--accent2-glow);
}

/* Start Empire Button */
.start-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, var(--accent), #059669);
  border: none;
  border-radius: var(--radius-lg);
  color: white;
  font-size: 1.15rem;
  font-weight: 800;
  font-family: 'Poppins', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.25s;
  margin-top: 1rem;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.start-btn:hover {
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 8px 35px var(--accent-glow);
}

.start-btn:active {
  transform: translateY(0) scale(0.99);
}


/* ============================================================
   MAIN GAME LAYOUT
   ============================================================ */

#game-screen {
  display: none;
  height: 100vh;
  width: 100vw;
}

.game-layout {
  display: flex;
  height: calc(100vh - 56px);
}


/* ============================================================
   TOP BAR
   ============================================================ */

.top-bar {
  height: 56px;
  background: var(--bg-sidebar);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 24px;
  z-index: 100;
}

.top-company {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--text-bright);
  min-width: 140px;
  letter-spacing: 0.02em;
}

.top-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 100px;
}

.top-stat .label {
  font-size: 0.6rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 600;
}

.top-stat .value {
  font-size: 0.95rem;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
}

.top-stat .value.green { color: var(--accent); }
.top-stat .value.blue  { color: var(--accent2); }
.top-stat .value.gold  { color: var(--gold); }
.top-stat .value.red   { color: var(--danger); }

.top-spacer { flex: 1; }

.top-date {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-dim);
}

/* Speed Controls */
.speed-controls {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-surface);
  border-radius: var(--radius-full);
  padding: 3px;
}

.speed-btn {
  padding: 5px 11px;
  background: transparent;
  border: none;
  border-radius: var(--radius-full);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
}

.speed-btn:hover {
  color: var(--text);
  background: var(--bg-elevated);
}

.speed-btn.active {
  background: var(--accent);
  color: white;
}

.next-month-btn {
  padding: 6px 16px;
  background: linear-gradient(135deg, var(--accent2), #2563eb);
  border: none;
  border-radius: var(--radius-md);
  color: white;
  font-size: 0.8rem;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all 0.2s;
}

.next-month-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px var(--accent2-glow);
}

.auto-toggle {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.75rem; color: var(--text-dim);
}

.toggle-switch {
  width: 36px; height: 20px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  position: relative;
  transition: all 0.3s;
}

.toggle-switch::after {
  content: '';
  position: absolute;
  width: 16px; height: 16px;
  background: var(--text-muted);
  border-radius: 50%;
  top: 1px; left: 1px;
  transition: all 0.3s;
}

.toggle-switch.on {
  background: var(--accent);
  border-color: var(--accent);
}

.toggle-switch.on::after {
  left: 17px;
  background: white;
}


/* ============================================================
   SIDEBAR NAVIGATION
   ============================================================ */

.sidebar {
  width: 64px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 12px;
  gap: 4px;
  overflow-y: auto;
}

.nav-btn {
  width: 48px; height: 48px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
  font-size: 0.6rem;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  gap: 2px;
  position: relative;
}

.nav-btn svg, .nav-btn .nav-icon {
  font-size: 1.2rem;
  width: 20px; height: 20px;
}

.nav-btn:hover {
  background: var(--bg-card);
  color: var(--text);
}

.nav-btn.active {
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent);
}

.nav-btn.active::before {
  content: '';
  position: absolute;
  left: -8px;
  width: 3px;
  height: 24px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}


/* ============================================================
   MAIN CONTENT AREA
   ============================================================ */

.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Tab content */
.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.25s ease; }


/* ============================================================
   NOTIFICATION TOASTS
   ============================================================ */

.notification-area {
  position: fixed;
  top: 64px;
  right: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 360px;
}

.notification {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 0.85rem;
  animation: slideIn 0.4s ease;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
}

.notification.good { border-left: 3px solid var(--accent); }
.notification.bad  { border-left: 3px solid var(--danger); }
.notification.info { border-left: 3px solid var(--accent2); }
.notification.gold { border-left: 3px solid var(--gold); }


/* ============================================================
   CARDS & PANELS
   ============================================================ */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.card:hover {
  border-color: var(--border-light);
}

.card-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--text-bright);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-header h2 {
  font-size: 1.2rem;
  font-weight: 700;
}


/* ============================================================
   OVERVIEW — METRIC CARDS
   ============================================================ */

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.metric-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  transition: all 0.25s;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.metric-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-light);
  box-shadow: var(--shadow-sm);
}

.metric-card .icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.metric-card .icon.green-bg { background: var(--accent-dim); color: var(--accent); }
.metric-card .icon.red-bg   { background: var(--danger-dim); color: var(--danger); }
.metric-card .icon.blue-bg  { background: var(--accent2-dim); color: var(--accent2); }
.metric-card .icon.gold-bg  { background: var(--gold-dim); color: var(--gold); }

.metric-card .label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 600;
  margin-bottom: 4px;
}

.metric-card .value {
  font-family: 'Poppins', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.1;
}

.metric-card .change {
  font-size: 0.78rem;
  font-weight: 600;
  margin-top: 2px;
}

.metric-card .change.up   { color: var(--accent); }
.metric-card .change.down { color: var(--danger); }


/* --- Charts Area --- */
.charts-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 16px;
}

.chart-container {
  position: relative;
  width: 100%;
  height: 200px;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.chart-bar {
  flex: 1;
  background: linear-gradient(to top, var(--accent-dim), var(--accent));
  border-radius: 4px 4px 0 0;
  min-height: 4px;
  transition: height 0.5s ease;
  position: relative;
  max-width: 42px;
}

.chart-bar:hover { opacity: 0.85; }

.chart-bar.negative-bar {
  background: linear-gradient(to top, var(--danger-dim), var(--danger));
}

.chart-bar.blue-bar {
  background: linear-gradient(to top, var(--accent2-dim), var(--accent2));
}

.chart-bar.gold-bar {
  background: linear-gradient(to top, var(--gold-dim), var(--gold));
}

.chart-bar .bar-label {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.6rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Canvas charts */
.chart-canvas {
  width: 100%;
  height: 100%;
  display: block;
}


/* ============================================================
   NEWS TICKER
   ============================================================ */

.news-ticker {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 10px 16px;
  overflow: hidden;
}

.news-ticker .ticker-label {
  font-family: 'Poppins', sans-serif;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--gold);
  background: var(--gold-dim);
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  margin-right: 14px;
  flex-shrink: 0;
}

.news-ticker .ticker-track {
  flex: 1;
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 5%, black 95%, transparent 100%);
}

.news-ticker .ticker-content {
  display: flex;
  gap: 3rem;
  animation: tickerScroll 30s linear infinite;
  white-space: nowrap;
}

.news-ticker .ticker-item {
  font-size: 0.8rem;
  color: var(--text-dim);
  flex-shrink: 0;
}

.news-ticker .ticker-item strong {
  color: var(--text);
}


/* ============================================================
   NEWS FEED
   ============================================================ */

.news-feed {
  max-height: 300px;
  overflow-y: auto;
}

.news-item {
  padding: 10px 14px;
  border-left: 3px solid var(--border);
  margin-bottom: 8px;
  font-size: 0.85rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  transition: background 0.2s;
}

.news-item:hover { background: rgba(0, 0, 0, 0.3); }
.news-item.good { border-left-color: var(--accent); }
.news-item.bad  { border-left-color: var(--danger); }
.news-item.info { border-left-color: var(--accent2); }

.news-item .news-date {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-bottom: 2px;
}


/* ============================================================
   GRID UTILITIES
   ============================================================ */

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }


/* ============================================================
   PRODUCTS TAB
   ============================================================ */

.product-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  transition: all 0.25s;
}

.product-card:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow-sm);
}

.product-card .product-name {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 10px;
  color: var(--text-bright);
}

.product-card .product-info {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 4px;
  display: flex;
  justify-content: space-between;
}

.product-card .product-info .val {
  font-weight: 600;
  color: var(--text);
}

/* Progress Bars */
.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--bg-input);
  border-radius: var(--radius-full);
  margin: 10px 0;
  overflow: hidden;
}

.progress-bar .fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.5s ease;
}

.progress-bar .fill.green { background: linear-gradient(90deg, var(--accent-dim), var(--accent)); }
.progress-bar .fill.red   { background: linear-gradient(90deg, var(--danger-dim), var(--danger)); }
.progress-bar .fill.blue  { background: linear-gradient(90deg, var(--accent2-dim), var(--accent2)); }
.progress-bar .fill.gold  { background: linear-gradient(90deg, var(--gold-dim), var(--gold)); }
.progress-bar .fill.cyan  { background: linear-gradient(90deg, #065f6d, var(--cyan)); }

.progress-bar.lg { height: 10px; }
.progress-bar.xl { height: 16px; }

.progress-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dim);
}

/* Price Slider */
.price-slider-container {
  margin-top: 12px;
}

.price-slider-container label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dim);
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.price-slider {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 5px;
  background: var(--bg-surface);
  border-radius: var(--radius-full);
  outline: none;
  cursor: pointer;
}

.price-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px; height: 18px;
  background: var(--accent);
  border: 2px solid var(--bg-card);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 8px var(--accent-glow);
  transition: transform 0.15s;
}

.price-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

.price-slider::-moz-range-thumb {
  width: 18px; height: 18px;
  background: var(--accent);
  border: 2px solid var(--bg-card);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 0 8px var(--accent-glow);
}


/* ============================================================
   STAFF TAB
   ============================================================ */

.staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.staff-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  transition: border-color 0.25s;
}

.staff-card:hover { border-color: var(--border-light); }

.staff-card .role-name {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 6px;
}

.staff-card .role-info {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 10px;
}

.staff-card .hire-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.staff-card .count {
  font-size: 1.3rem;
  font-weight: 800;
  font-family: 'Poppins', sans-serif;
  min-width: 35px;
  text-align: center;
}

/* Payroll Summary */
.payroll-summary {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.payroll-summary .payroll-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dim);
}

.payroll-summary .payroll-amount {
  font-family: 'Poppins', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--danger);
}

/* Satisfaction Bar */
.satisfaction-bar {
  width: 100%;
  height: 8px;
  background: var(--bg-input);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 6px;
}

.satisfaction-bar .fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 0.5s, background 0.5s;
}


/* ============================================================
   MARKETING TAB
   ============================================================ */

.campaign-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.25s;
}

.campaign-card:hover { border-color: var(--border-light); }

.campaign-card .campaign-name {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1rem;
}

.campaign-card .campaign-info {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.campaign-card .campaign-cost {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--danger);
}

.campaign-card .campaign-reach {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.campaign-card .campaign-status {
  display: inline-block;
  margin-top: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  width: fit-content;
}

.campaign-card .campaign-status.active  { color: var(--accent); background: var(--accent-dim); }
.campaign-card .campaign-status.available { color: var(--accent2); background: var(--accent2-dim); }

.campaign-card.active-campaign {
  border-color: var(--accent);
  background: rgba(16, 185, 129, 0.05);
  box-shadow: 0 0 12px var(--accent-glow);
}

.active-campaigns-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.marketing-budget {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.marketing-budget .budget-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dim);
}

.marketing-budget .budget-amount {
  font-family: 'Poppins', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--accent2);
}


/* ============================================================
   EXPANSION TAB
   ============================================================ */

.city-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  text-align: center;
  transition: all 0.25s;
  position: relative;
  overflow: hidden;
}

.city-card:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow-md);
}

.city-card .city-name {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.city-card .city-info {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 4px;
}

.city-card .city-status {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 8px;
}

.city-card .city-status.hq     { color: var(--gold); }
.city-card .city-status.open   { color: var(--accent); }
.city-card .city-status.locked { color: var(--text-muted); }

.city-card .city-cost {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold);
}

.city-card .city-market {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.city-card.unlocked {
  border-color: var(--accent);
}

.city-card.locked {
  opacity: 0.55;
}

.city-card.locked::after {
  content: '\1F512';
  position: absolute;
  top: 10px; right: 10px;
  font-size: 0.9rem;
}

.city-card.hq {
  border-color: var(--gold);
  box-shadow: 0 0 16px var(--gold-glow);
}

/* City Selector Tabs */
.city-selector {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.city-tab {
  padding: 6px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-dim);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
}

.city-tab:hover { border-color: var(--accent2); color: var(--text); }
.city-tab.active { background: var(--accent2); color: white; border-color: var(--accent2); }

/* Building Cards */
.building-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  transition: all 0.25s;
}

.building-card:hover { border-color: var(--border-light); }

.building-card .building-name {
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  margin-bottom: 4px;
}

.building-card .building-info {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.building-card .building-cost {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--gold);
}


/* ============================================================
   FINANCE TAB
   ============================================================ */

.finance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 16px;
}

.finance-table {
  width: 100%;
  border-collapse: collapse;
}

.finance-table th {
  font-family: 'Poppins', sans-serif;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  text-align: left;
  padding: 10px 16px;
  border-bottom: 2px solid var(--border);
}

.finance-table td {
  padding: 10px 16px;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-dim);
}

.finance-table td:last-child {
  text-align: right;
  font-weight: 700;
  font-family: 'Inter', monospace;
  color: var(--text);
}

.finance-table tr:last-child td { border-bottom: none; }

.finance-table .positive { color: var(--accent); }
.finance-table .negative { color: var(--danger); }

.finance-table .row-total td {
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text-bright);
  border-top: 2px solid var(--border-light);
  padding-top: 12px;
}

/* Stock Display */
.stock-display {
  text-align: center;
  padding: 20px;
}

.stock-price {
  font-family: 'Poppins', sans-serif;
  font-size: 3rem;
  font-weight: 800;
}

.stock-change {
  font-size: 1rem;
  font-weight: 600;
  margin-top: 4px;
}

.stock-change.up   { color: var(--accent); }
.stock-change.down { color: var(--danger); }

/* Loan & Investor Options */
.loan-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
}

.loan-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s;
}

.loan-card:hover {
  border-color: var(--accent2);
  box-shadow: 0 0 12px var(--accent2-glow);
}

.loan-card .loan-icon {
  font-size: 2rem;
  margin-bottom: 6px;
}

.loan-card .loan-amount {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--gold);
  margin-bottom: 6px;
}

.loan-card .loan-info {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 10px;
}


/* ============================================================
   LEADERBOARD / RIVALS
   ============================================================ */

.leaderboard-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 8px;
  transition: background 0.2s;
}

.leaderboard-row:hover { background: var(--bg-card-hover); }

.leaderboard-row.player {
  border-color: var(--accent);
  background: rgba(16, 185, 129, 0.05);
}

.leaderboard-rank {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  min-width: 30px;
  color: var(--text-muted);
}

.leaderboard-rank.gold   { color: var(--gold); }
.leaderboard-rank.silver { color: #94a3b8; }
.leaderboard-rank.bronze { color: #b45309; }

.leaderboard-name { flex: 1; font-weight: 600; }
.leaderboard-stat {
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  min-width: 120px;
  text-align: right;
}


/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius-md);
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #059669);
  color: white;
  box-shadow: 0 2px 8px var(--accent-glow);
}

.btn-primary:hover { box-shadow: 0 4px 16px var(--accent-glow); }

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover { border-color: var(--accent); }

.btn-danger {
  background: linear-gradient(135deg, var(--danger), #dc2626);
  color: white;
  box-shadow: 0 2px 8px var(--danger-glow);
}

.btn-danger:hover { box-shadow: 0 4px 15px var(--danger-glow); }

.btn-blue {
  background: linear-gradient(135deg, var(--accent2), #2563eb);
  color: white;
  box-shadow: 0 2px 8px var(--accent2-glow);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold), #d97706);
  color: #1a1a1a;
  font-weight: 700;
  box-shadow: 0 2px 8px var(--gold-glow);
}

.btn-outline {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border);
}

.btn-outline:hover { color: var(--text); border-color: var(--text-dim); }

.btn-sm { padding: 5px 12px; font-size: 0.75rem; }
.btn-lg { padding: 12px 28px; font-size: 0.95rem; font-weight: 700; border-radius: var(--radius-lg); }

.btn-icon {
  width: 36px; height: 36px;
  padding: 0;
  border-radius: var(--radius-md);
}

.btn-icon.btn-sm { width: 30px; height: 30px; }


/* ============================================================
   EVENT POPUP / MODAL
   ============================================================ */

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 5000;
  padding: 2rem;
  animation: fadeIn 0.25s ease;
}

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  max-width: 560px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalSlideUp 0.35s ease;
}

.modal.wide { max-width: 780px; }
.modal.narrow { max-width: 400px; }

.modal-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.modal-icon {
  font-size: 2.5rem;
  line-height: 1;
}

.modal-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
}

.modal-desc {
  font-size: 0.95rem;
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: 16px;
}

.modal-impact {
  background: var(--bg-surface);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 20px;
}

.modal-impact .impact-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.modal-impact .impact-row {
  display: flex;
  justify-content: space-between;
  padding: 4px 0;
  font-size: 0.9rem;
}

.modal-impact .impact-row .positive { font-weight: 700; }
.modal-impact .impact-row .negative { font-weight: 700; }

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}


/* ============================================================
   QUARTERLY REPORT
   ============================================================ */

.report-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 20px;
}

.report-stat {
  text-align: center;
  padding: 14px;
  background: var(--bg-surface);
  border-radius: var(--radius-md);
}

.report-stat .value {
  font-family: 'Poppins', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
}

.report-stat .label {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin-top: 2px;
}

.rival-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem;
}

.rival-row:last-child { border-bottom: none; }
.rival-row .rival-name { font-weight: 600; }
.rival-row .rival-share { font-weight: 700; color: var(--text-dim); }
.rival-row.player .rival-name  { color: var(--accent); }
.rival-row.player .rival-share { color: var(--accent); }


/* ============================================================
   VICTORY SCREEN
   ============================================================ */

#victory-screen {
  position: fixed; inset: 0;
  display: none; align-items: center; justify-content: center;
  z-index: 10000;
  text-align: center;
  padding: 2rem;
  background:
    radial-gradient(ellipse at center, rgba(245, 158, 11, 0.12) 0%, transparent 60%),
    rgba(15, 17, 23, 0.92);
  backdrop-filter: blur(8px);
}

.victory-content {
  animation: fadeUp 0.8s ease;
}

.victory-content .trophy {
  font-size: 5rem;
  margin-bottom: 1rem;
}

.victory-content h1 {
  font-size: 3.5rem;
  font-weight: 900;
  background: linear-gradient(135deg, var(--gold), #fbbf24, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 0.5rem;
  animation: victoryPulse 2s ease-in-out infinite;
}

.victory-content p {
  color: var(--text-dim);
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.victory-stats {
  display: flex;
  gap: 30px;
  justify-content: center;
  margin-bottom: 2rem;
}

.victory-stat {
  text-align: center;
  padding: 14px 20px;
  background: var(--bg-card);
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius-lg);
}

.victory-stat .label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.victory-stat .val {
  font-family: 'Poppins', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gold);
}

/* Confetti */
.confetti {
  position: fixed;
  width: 10px; height: 10px;
  border-radius: 2px;
  animation: confettiFall linear forwards;
  z-index: 10001;
  pointer-events: none;
}


/* ============================================================
   ADMIN
   ============================================================ */

.admin-badge {
  background: linear-gradient(135deg, var(--danger), var(--pink));
  color: white;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.admin-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(6px);
  z-index: 8000;
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  animation: fadeIn 0.25s ease;
}

.admin-panel {
  width: 100%;
  max-width: 640px;
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  padding: 2rem;
  overflow-y: auto;
  animation: slideInRight 0.35s ease;
}

.admin-panel .admin-title {
  font-family: 'Poppins', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--danger);
  margin-bottom: 2rem;
}

.admin-section {
  margin-bottom: 2rem;
}

.admin-section .section-label {
  font-family: 'Poppins', sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.admin-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
}

.admin-row .admin-label { font-size: 0.9rem; color: var(--text-dim); }
.admin-row .admin-value { font-weight: 700; color: var(--text); }


/* ============================================================
   DATA TABLES
   ============================================================ */

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table thead th {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  text-align: left;
  padding: 10px;
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg-card);
}

.data-table tbody td {
  padding: 10px;
  font-size: 0.9rem;
  color: var(--text-dim);
  border-bottom: 1px solid var(--border);
}

.data-table tbody tr:hover { background: var(--bg-surface); }
.data-table tbody tr:last-child td { border-bottom: none; }


/* ============================================================
   BADGES & TAGS
   ============================================================ */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  border-radius: var(--radius-full);
}

.badge-green { color: var(--accent);  background: var(--accent-dim); }
.badge-red   { color: var(--danger);  background: var(--danger-dim); }
.badge-blue  { color: var(--accent2); background: var(--accent2-dim); }
.badge-gold  { color: var(--gold);    background: var(--gold-dim); }
.badge-muted { color: var(--text-muted); background: var(--bg-surface); }


/* ============================================================
   TOOLTIPS
   ============================================================ */

[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 10px;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 500;
}

[data-tooltip]:hover::after { opacity: 1; }


/* ============================================================
   SKELETON LOADING
   ============================================================ */

.skeleton {
  background: linear-gradient(90deg, var(--bg-surface) 25%, var(--bg-elevated) 50%, var(--bg-surface) 75%);
  background-size: 200% 100%;
  animation: skeletonShimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-md);
}

.skeleton-text  { height: 1rem;   width: 60%;  margin-bottom: 8px; }
.skeleton-title { height: 1.5rem; width: 40%;  margin-bottom: 12px; }
.skeleton-card  { height: 120px;  width: 100%; }


/* ============================================================
   SCROLLBARS
   ============================================================ */

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-light); }

.main-content::-webkit-scrollbar { width: 6px; }
.main-content::-webkit-scrollbar-track { background: transparent; }
.main-content::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }


/* ============================================================
   JH GAMES BADGE
   ============================================================ */

.jh-badge {
  position: fixed;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.7rem;
  color: var(--text-muted);
  opacity: 0.5;
  z-index: 10;
  font-family: 'Poppins', sans-serif;
}


/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1024px) {
  .charts-row { grid-template-columns: 1fr; }
  .finance-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .industry-grid { grid-template-columns: repeat(2, 1fr); }
  .city-grid { grid-template-columns: repeat(3, 1fr); }
  .report-grid { grid-template-columns: 1fr; }
  .victory-stats { flex-wrap: wrap; gap: 16px; }
}

@media (max-width: 768px) {
  .sidebar {
    width: 50px;
  }

  .nav-btn {
    width: 40px; height: 40px;
    font-size: 0.55rem;
  }

  .main-content { padding: 14px; }
  .metrics-grid { grid-template-columns: 1fr 1fr; }
  .top-bar { padding: 0 10px; gap: 12px; overflow-x: auto; }
  .top-company { font-size: 0.95rem; min-width: 100px; }

  .modal { padding: 1.5rem; border-radius: var(--radius-lg); }
  .admin-panel { max-width: 100%; }
}

@media (max-width: 600px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .metrics-grid { grid-template-columns: 1fr 1fr; }
  .industry-grid { grid-template-columns: repeat(2, 1fr); }
  .city-grid { grid-template-columns: repeat(2, 1fr); }

  .setup-container h1 { font-size: 1.75rem; }
  .login-logo { font-size: 2.25rem; }

  .victory-content h1 { font-size: 2.5rem; }
  .victory-stats { flex-direction: column; align-items: center; }

  .sidebar { width: 50px; }
  .top-bar { padding: 0 10px; gap: 12px; overflow-x: auto; }
}

@media (max-width: 400px) {
  .metrics-grid { grid-template-columns: 1fr; }
  .industry-grid { grid-template-columns: 1fr; }
  .city-grid { grid-template-columns: 1fr 1fr; }
  .loan-grid { grid-template-columns: 1fr; }
}
