/* Mix-matched palette — dark mode is "C · Skill Pick" (navy/blue), light mode
   is "B · Pulse" (warm paper white, violet→coral). The app root div (app.js)
   overrides the bg/text/accent/semantic tokens inline per the theme toggle;
   this fallback just keeps html/body and pre-mount paint from resolving to
   nothing. Card/border/field tokens and the overlay scale live here since
   app.js doesn't set those inline. */
:root {
  --bg0: #020617;
  --bg1: #0F172A;
  --text: #F8FAFC;
  --text-dim: #94A3B8;
  --text-faint: #475569;
  --accent: #2563EB;
  --accent2: #3B82F6;
  --success: #22C55E;
  --danger: #EF4444;
  --warning: #F59E0B;
  --card-bg: #0F172A;
  --card-border: rgba(148,163,184,0.14);
  --field-bg: #1E293B;
  /* Neutral overlay scale used for card/border/divider tints throughout the
     app. Dark mode tints off Skill Pick's slate line color so hover/scroll
     surfaces read as part of the same navy system instead of generic white. */
  --w015: rgba(148,163,184,0.02);
  --w02: rgba(148,163,184,0.035);
  --w025: rgba(148,163,184,0.05);
  --w03: rgba(148,163,184,0.07);
  --w04: rgba(148,163,184,0.09);
  --w05: rgba(148,163,184,0.11);
  --w06: rgba(148,163,184,0.14);
  --w07: rgba(148,163,184,0.17);
  --w08: rgba(148,163,184,0.2);
  --w1: rgba(148,163,184,0.26);
  --w12: rgba(148,163,184,0.32);
}
:root[data-theme="light"] {
  --bg0: #FDF8F4;
  --bg1: #FFFFFF;
  --text: #1A1025;
  --text-dim: #7A6F8C;
  --text-faint: #B3A9C4;
  --accent: #8B3DFF;
  --accent2: #FF5C8A;
  --success: #16A34A;
  --danger: #E11D48;
  --warning: #D97706;
  --card-bg: #FFFFFF;
  --card-border: rgba(26,16,37,0.08);
  --field-bg: #FBF6F2;
  --w015: rgba(26,16,37,0.02);
  --w02: rgba(26,16,37,0.03);
  --w025: rgba(26,16,37,0.035);
  --w03: rgba(26,16,37,0.045);
  --w04: rgba(26,16,37,0.06);
  --w05: rgba(26,16,37,0.07);
  --w06: rgba(26,16,37,0.08);
  --w07: rgba(26,16,37,0.09);
  --w08: rgba(26,16,37,0.11);
  --w1: rgba(26,16,37,0.13);
  --w12: rgba(26,16,37,0.16);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg0);
  color: var(--text);
  font-family: 'IBM Plex Sans', 'Segoe UI', sans-serif;
}

body {
  background: var(--bg0);
}

#root {
  min-height: 100vh;
}

input,
select,
textarea,
button {
  font-family: inherit;
}

input,
select,
textarea {
  font-size: 16px !important;
}

button {
  cursor: pointer;
}

button:focus,
input:focus,
select:focus,
textarea:focus {
  outline: none;
}

.tab-pill {
  border-radius: 999px;
  transition: background 0.15s, color 0.15s;
}

.tab-pill:hover {
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.bottom-tab .nav-label {
  display: inline-block !important;
}

.bottom-tab .nav-icon {
  font-size: 16px;
}

@media screen and (max-width: 640px) {
  .tab-pill {
    font-size: 12px;
    padding: 8px 10px !important;
  }
  .bottom-tab {
    min-width: 74px !important;
    padding: 8px 10px !important;
  }
  .bottom-tab .nav-icon {
    font-size: 16px !important;
  }
}

/* Sectioned-page layout (Profile) — a horizontal scrollable pill row on
   mobile, re-flowing into a left sidebar on wider viewports. Same buttons
   and state throughout; only the container CSS changes at the breakpoint. */
.profile-layout {
  display: block;
}

.section-nav {
  display: flex;
  flex-direction: row;
  overflow-x: auto;
  gap: 8px;
  padding-bottom: 10px;
  -webkit-overflow-scrolling: touch;
}

.section-nav-btn {
  flex-shrink: 0;
  white-space: nowrap;
}

@media (min-width: 900px) {
  .profile-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 24px;
    align-items: start;
  }
  .section-nav {
    flex-direction: column;
    overflow-x: visible;
    padding-bottom: 0;
  }
  .section-nav-btn {
    width: 100%;
    text-align: left;
  }
}

.row-hover:hover {
  background: var(--w03) !important;
  cursor: pointer;
}

.del-btn {
  opacity: 0;
  transition: opacity 0.15s;
}

.row-hover:hover .del-btn {
  opacity: 1;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: none;
  color: #fff;
  border-radius: 10px;
  padding: 9px 20px;
  font-size: 13px;
  font-weight: 600;
  transition: opacity 0.2s;
}

.btn-primary:hover {
  opacity: 0.85;
}

.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-ghost {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-dim);
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 12px;
  transition: background 0.15s;
}

.btn-ghost:hover {
  background: var(--card-border);
  color: var(--text);
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 18px;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

::-webkit-scrollbar {
  width: 3px;
}

::-webkit-scrollbar-thumb {
  background: var(--w1);
  border-radius: 2px;
}

input, select, textarea {
  background: var(--field-bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  color: var(--text);
  padding: 9px 12px;
  font-size: 13px;
}

select {
  appearance: none;
}
