/**
 * SANSA AI — Premium Light Theme
 * Clean, readable, Apple-level polish.
 * RULE: Only SANSA/SANSA AI/SANSA Studio get gradient colors.
 *       Everything else: black/dark text on white backgrounds.
 */

/* ── Light theme overrides ───────────────────────────── */
:root {
  --sansa-bg: #FFFFFF;
  --sansa-bg-secondary: #F8FAFC;
  --sansa-bg-card: #FFFFFF;
  --sansa-bg-sidebar: #FAFBFC;
  --sansa-bg-navbar: rgba(255, 255, 255, 0.92);
  --sansa-glass: rgba(0, 0, 0, 0.02);
  --sansa-glass-strong: rgba(248, 250, 252, 0.92);

  --sansa-text: #0F172A;
  --sansa-text-secondary: #334155;
  --sansa-text-muted: #64748B;

  --sansa-border: #E2E8F0;
  --sansa-border-hover: #CBD5E1;
  --sansa-border-accent: rgba(37, 99, 235, 0.4);

  --sansa-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --sansa-shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --sansa-shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.1);
  --sansa-shadow-accent: 0 4px 16px rgba(37, 99, 235, 0.15);
  --sansa-glow-accent: 0 0 0 3px rgba(37, 99, 235, 0.12);

  --sansa-promo-bg: linear-gradient(90deg, #FF6B00 0%, #FF3D00 25%, #7C3AED 60%, #2563EB 100%);

  --ink: #0F172A;
  --muted: #64748B;
  --line: #E2E8F0;
  --panel: #FFFFFF;
  --soft: #F8FAFC;
  --dark: #FFFFFF;
  --dark-2: #F8FAFC;
}

/* ── Brand gradient — ONLY for SANSA AI brand name ─── */
.sansa-brand-name,
.sansa-logo-text,
.sansa-logo-text .ai {
  background: linear-gradient(90deg, #FF6B00, #FF3D00, #7C3AED, #2563EB) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  color: transparent !important;
}

body.sansa-os .brand,
body.sansa-os .brand.sansa-logo,
.os-sidebar-brand .sansa-logo {
  color: inherit !important;
}

/* ── Body ──────────────────────────────────────────── */
body, body.sansa-os {
  background: #FFFFFF !important;
  color: #0F172A !important;
}

/* ── All headings: BLACK ───────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  color: #0F172A !important;
}

/* ── All body text: dark gray ──────────────────────── */
p, li, td, th, label, span, div {
  color: inherit;
}

p {
  color: #0F172A;
}

/* ── Sidebar ───────────────────────────────────────── */
.os-sidebar {
  background: #FAFBFC !important;
  border-right: 1px solid #E2E8F0 !important;
}

.os-sidebar-brand {
  color: #0F172A !important;
}

.os-nav-label {
  color: #0F172A !important;
  opacity: 0.55;
}

.os-nav-item {
  color: #0F172A !important;
  background: transparent !important;
  border: 1px solid transparent !important;
}

.os-nav-item:hover {
  background: #F1F5F9 !important;
  color: #0F172A !important;
}

.os-nav-item.active {
  background: #EFF6FF !important;
  color: #2563EB !important;
  border-color: #BFDBFE !important;
}

.os-nav-icon {
  color: #64748B !important;
  background: #F1F5F9 !important;
  border: 1px solid #E2E8F0 !important;
}

.os-nav-item.active .os-nav-icon {
  color: #2563EB !important;
  background: #DBEAFE !important;
  border-color: #93C5FD !important;
}

/* ── Header / Navbar ───────────────────────────────── */
.site-header {
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(20px) saturate(150%) !important;
  border-bottom: 1px solid #E2E8F0 !important;
}

.nav-link, .top-nav button, .top-nav a.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1.2;
  color: #0F172A !important;
}

.nav-link:hover, .top-nav button:hover, .top-nav a.nav-link:hover {
  color: #0F172A !important;
}

/* ── Buttons ───────────────────────────────────────── */
.primary-button {
  background: #2563EB !important;
  border-color: #2563EB !important;
  color: #FFFFFF !important;
}

.primary-button:hover {
  background: #1D4ED8 !important;
}

.ghost-button {
  background: #F1F5F9 !important;
  border-color: #E2E8F0 !important;
  color: #334155 !important;
}

.ghost-button:hover {
  background: #E2E8F0 !important;
  color: #0F172A !important;
}

.outline-dark {
  border-color: #CBD5E1 !important;
  color: #0F172A !important;
  background: transparent !important;
}

.outline-dark:hover {
  background: #F8FAFC !important;
}

.outline-light {
  border-color: #CBD5E1 !important;
  color: #0F172A !important;
  background: transparent !important;
}

.promo-button {
  color: #FFFFFF !important;
}

/* ── Hero Section ──────────────────────────────────── */
body.sansa-os .hero-section,
.hero-section {
  background: transparent !important;
}

body.sansa-os .hero-copy h1,
.hero-copy h1 {
  color: #0F172A !important;
  font-weight: 800;
}

body.sansa-os .hero-copy p,
.hero-copy p {
  color: #0F172A !important;
}

body.sansa-os .hero-copy .eyebrow,
.eyebrow {
  background: #F1F5F9 !important;
  border: 1px solid #E2E8F0 !important;
  color: #0F172A !important;
}

/* ── Cards ─────────────────────────────────────────── */
.studio-card,
.app-card,
.plan-card,
.feature-card,
.story-card,
.workspace-cards > div,
.ai-tools-grid > div,
.glass-card {
  background: #FFFFFF !important;
  border: 1px solid #E2E8F0 !important;
  border-radius: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04) !important;
  color: #0F172A !important;
  transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.studio-card:hover,
.app-card:hover,
.feature-card:hover,
.story-card:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08) !important;
  transform: translateY(-2px);
}

.studio-card h2,
.app-card h3,
.feature-card h3 {
  color: #0F172A !important;
}

.studio-card p,
.app-card p,
.feature-card p {
  color: #0F172A !important;
}

.studio-card .badge {
  background: linear-gradient(135deg, #FF6B00, #7C3AED) !important;
  color: #FFFFFF !important;
}

.tool-grid span {
  background: #F8FAFC !important;
  border: 1px solid #E2E8F0 !important;
  color: #334155 !important;
  border-radius: 8px;
}

/* ── Shape panels (hero art) ──────────────────────── */
body.sansa-os .shape-panel {
  border: 1px solid #E2E8F0 !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06) !important;
}

/* ── Section headings ──────────────────────────────── */
.section-heading h2 {
  color: #0F172A !important;
}

.section-heading p {
  color: #0F172A !important;
}

.home-feature-chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 20px;
}

.home-feature-chip {
  padding: 6px 14px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: #0F172A;
}

/* ── Category tabs ─────────────────────────────────── */
.category-tabs button,
.pricing-tabs button {
  color: #64748B !important;
  background: transparent !important;
  border: 1px solid transparent !important;
}

.category-tabs button.active,
.pricing-tabs button.active {
  color: #2563EB !important;
  background: #EFF6FF !important;
  border-color: #BFDBFE !important;
}

.category-tabs button:hover,
.pricing-tabs button:hover {
  color: #0F172A !important;
  background: #F1F5F9 !important;
}

/* ── Pricing cards ─────────────────────────────────── */
.plan-card {
  border-radius: 24px;
}

.plan-card .plan-price {
  color: #0F172A !important;
}

.plan-card .plan-name {
  color: #0F172A !important;
}

.plan-card .plan-badge {
  background: linear-gradient(135deg, #FF6B00, #7C3AED) !important;
  color: #FFFFFF !important;
}

/* ── App icon grid ─────────────────────────────────── */
.app-icon-grid .app-icon {
  background: #0F172A !important;
  color: #FFFFFF !important;
  border-radius: 16px;
  font-weight: 700;
}

/* ── Footer ────────────────────────────────────────── */
.footer {
  background: #0F172A !important;
  color: #CBD5E1 !important;
  border-top: 1px solid #1E293B !important;
}

.footer strong {
  color: #FFFFFF !important;
}

.footer a {
  color: #94A3B8 !important;
}

.footer a:hover {
  color: #FFFFFF !important;
}

/* ── Auth modal ────────────────────────────────────── */
.modal {
  background: rgba(0, 0, 0, 0.4) !important;
}

.auth-card {
  background: #FFFFFF !important;
  border: 1px solid #E2E8F0 !important;
  color: #0F172A !important;
}

.auth-card h2 {
  color: #0F172A !important;
}

.auth-card label {
  color: #334155 !important;
}

.auth-card input,
.auth-card select,
.auth-card textarea {
  background: #FFFFFF !important;
  border: 1px solid #E2E8F0 !important;
  color: #0F172A !important;
}

.auth-card input:focus {
  border-color: #2563EB !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
}

.auth-visual {
  background: linear-gradient(135deg, #1E293B, #0F172A) !important;
  color: #FFFFFF !important;
}

.auth-tabs button {
  color: #64748B !important;
}

.auth-tabs button.active {
  color: #2563EB !important;
  border-bottom-color: #2563EB !important;
}

.social-list button {
  background: #F8FAFC !important;
  border: 1px solid #E2E8F0 !important;
  color: #334155 !important;
}

/* ── Workspace / Dashboard ─────────────────────────── */
.workspace {
  background: #F8FAFC !important;
}

.workspace-sidebar {
  background: #FFFFFF !important;
  border-right: 1px solid #E2E8F0 !important;
}

.workspace-sidebar .side-item {
  color: #334155 !important;
}

.workspace-sidebar .side-item.active {
  color: #2563EB !important;
  background: #EFF6FF !important;
}

.workspace-main {
  color: #0F172A !important;
}

.workspace-hero h2 {
  color: #0F172A !important;
}

.prompt-box {
  background: #FFFFFF !important;
  border: 1px solid #E2E8F0 !important;
}

.prompt-box textarea {
  background: #FFFFFF !important;
  color: #0F172A !important;
  border: none !important;
}

/* ── Credits badge ─────────────────────────────────── */
.os-credits {
  background: #F1F5F9 !important;
  border: 1px solid #E2E8F0 !important;
  color: #0F172A !important;
}

/* ── App switcher ──────────────────────────────────── */
.app-switcher {
  background: #FFFFFF !important;
  border: 1px solid #E2E8F0 !important;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12) !important;
}

.app-switcher h3 {
  color: #0F172A !important;
}

.app-switcher .switcher-app,
.app-switcher .switcher-app-label {
  color: #334155 !important;
}

.app-switcher .app-icon-item {
  color: #334155 !important;
}

.app-switcher .app-icon-item span {
  background: #0F172A !important;
  color: #FFFFFF !important;
}

/* ── Promo bar ─────────────────────────────────────── */
.promo-bar {
  color: #FFFFFF !important;
}

/* ── Story grid cards ──────────────────────────────── */
.story-card {
  border-radius: 24px;
}

.story-card h3 {
  color: #0F172A !important;
}

.story-card p {
  color: #0F172A !important;
}

body.sansa-os .story-card,
body.sansa-os .story-card.yellow,
body.sansa-os .story-card.blue,
body.sansa-os .story-card.dark {
  color: #0F172A !important;
}

body.sansa-os .story-card h3,
body.sansa-os .story-card p,
body.sansa-os .story-card.yellow h3,
body.sansa-os .story-card.yellow p,
body.sansa-os .story-card.blue h3,
body.sansa-os .story-card.blue p,
body.sansa-os .story-card.dark h3,
body.sansa-os .story-card.dark p {
  color: #0F172A !important;
}

/* ── Loading / Splash ──────────────────────────────── */
.sansa-splash {
  background: #FFFFFF !important;
}

.sansa-splash-text {
  color: #64748B !important;
}

/* ── Profile menu ──────────────────────────────────── */
.profile-menu {
  background: #FFFFFF !important;
  border: 1px solid #E2E8F0 !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12) !important;
  color: #0F172A !important;
}

/* ── Mega menu ─────────────────────────────────────── */
.mega-menu {
  background: #FFFFFF !important;
  border-bottom: 1px solid #E2E8F0 !important;
  color: #0F172A !important;
}

/* ── Icon grid button ──────────────────────────────── */
.icon-grid span {
  background: #334155 !important;
}

/* ── Search ────────────────────────────────────────── */
.os-search-btn {
  color: #64748B !important;
}

.os-search-modal {
  background: rgba(15, 23, 42, 0.35) !important;
}

.os-search-panel {
  background: #FFFFFF !important;
  border-color: #E2E8F0 !important;
}

.os-search-head input {
  color: #0F172A !important;
}

.os-search-item {
  color: #0F172A !important;
}

.os-search-empty {
  color: #64748B !important;
}

/* ── Admin panel ───────────────────────────────────── */
.admin-card {
  background: #FFFFFF !important;
  color: #0F172A !important;
  border: 1px solid #E2E8F0 !important;
}

/* ── Avatar ────────────────────────────────────────── */
.avatar-button {
  background: linear-gradient(135deg, #FF6B00, #7C3AED) !important;
  color: #FFFFFF !important;
}

/* ── Scrollbar ─────────────────────────────────────── */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

/* ── Responsive ────────────────────────────────────── */
@media (max-width: 900px) {
  .os-sidebar {
    background: #FFFFFF !important;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1) !important;
  }
}

/* ── Classic light shell ───────────────────────────── */
.os-app,
.os-main,
#app {
  background: #FFFFFF !important;
}

.home-section-head {
  text-align: center;
  margin-bottom: 24px;
}

.home-section-head p,
#workingToolsView p,
#pdfToolsView p {
  color: #0F172A !important;
}

.home-badge {
  display: inline-block;
  padding: 5px 14px;
  background: #F1F5F9;
  color: #0F172A;
  border: 1px solid #E2E8F0;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}

.home-badge-accent {
  background: #FFF7ED;
  border-color: #FDBA74;
  color: #0F172A;
}

.wt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 12px;
}

.wt-card {
  appearance: none;
  text-align: left;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 14px;
  padding: 16px;
  cursor: pointer;
  color: #0F172A;
  font: inherit;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.wt-card:hover {
  transform: translateY(-2px);
  border-color: #CBD5E1;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.wt-card-accent {
  border-color: #FDBA74;
  background: #FFFBEB;
}

.wt-icon {
  font-size: 26px;
  display: block;
  margin-bottom: 8px;
}

.wt-title {
  display: block;
  font-size: 14px;
  margin-bottom: 4px;
  color: #0F172A;
}

.wt-sub {
  font-size: 11px;
  color: #0F172A;
  opacity: 0.72;
}

/* ── PDF tools (light) ─────────────────────────────── */
.pdf-tab-bar {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.pdf-tab {
  appearance: none;
  border: 1px solid #E2E8F0;
  background: #F8FAFC;
  color: #0F172A;
  padding: 10px 18px;
  border-radius: 12px;
  cursor: pointer;
  font: 600 13px/1 inherit;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.pdf-tab:hover {
  background: #F1F5F9;
}

.pdf-tab.active {
  border-color: #2563EB;
  background: #EFF6FF;
  color: #0F172A;
}

.pdf-panel {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 18px;
  padding: 28px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.pdf-dropzone {
  border: 2px dashed #CBD5E1;
  border-radius: 14px;
  padding: 44px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
  background: #F8FAFC;
}

.pdf-dropzone:hover,
.pdf-dropzone.drag {
  border-color: #2563EB;
  background: #EFF6FF;
}

.pdf-drop-title {
  margin: 0 0 6px;
  font-weight: 700;
  font-size: 16px;
  color: #0F172A;
}

.pdf-drop-hint {
  margin: 0;
  color: #0F172A;
  opacity: 0.72;
  font-size: 13px;
}

.pdf-text-input {
  width: 100%;
  height: 180px;
  margin-top: 14px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  color: #0F172A;
  font: inherit;
  font-size: 14px;
  padding: 14px;
  border-radius: 10px;
  resize: vertical;
  outline: none;
  line-height: 1.6;
}

.pdf-file-row {
  margin-top: 14px;
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 12px 16px;
  display: none;
  align-items: center;
  gap: 12px;
}

.pdf-file-name {
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #0F172A;
}

.pdf-file-size {
  font-size: 12px;
  color: #0F172A;
  opacity: 0.72;
  margin-top: 2px;
}

.pdf-clear-file {
  appearance: none;
  border: 0;
  background: transparent;
  color: #0F172A;
  opacity: 0.55;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
}

.pdf-options-row {
  display: none;
  margin-top: 14px;
  gap: 12px;
  flex-wrap: wrap;
}

.pdf-options-row label {
  font-size: 12px;
  color: #0F172A;
  font-weight: 600;
}

.pdf-options-row select {
  display: block;
  margin-top: 4px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  color: #0F172A;
  font: inherit;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 6px;
}

.pdf-action-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
  flex-wrap: wrap;
  gap: 12px;
}

.pdf-free-badge {
  font-size: 12px;
  color: #0F172A;
  font-weight: 600;
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  padding: 5px 12px;
  border-radius: 999px;
}

.pdf-run-btn {
  appearance: none;
  border: 0;
  background: #2563EB;
  color: #FFFFFF;
  padding: 12px 28px;
  border-radius: 10px;
  cursor: pointer;
  font: 700 15px/1 inherit;
  opacity: 0.5;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.2);
}

.pdf-run-btn:not(:disabled) {
  opacity: 1;
}

.pdf-progress-track {
  height: 6px;
  background: #E2E8F0;
  border-radius: 999px;
  overflow: hidden;
}

.pdf-progress-bar {
  height: 100%;
  background: #2563EB;
  width: 0%;
  transition: width 0.4s ease;
}

.pdf-progress-label {
  margin: 6px 0 0;
  font-size: 12px;
  color: #0F172A;
  opacity: 0.72;
  text-align: center;
}

.pdf-result-box {
  display: none;
  margin-top: 18px;
  background: #ECFDF5;
  border: 1px solid #A7F3D0;
  border-radius: 14px;
  padding: 18px;
}

.pdf-result-title {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 700;
  color: #0F172A;
}

.pdf-result-stats {
  font-size: 13px;
  color: #0F172A;
  opacity: 0.72;
  margin-bottom: 12px;
}

.pdf-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  color: #0F172A;
  padding: 11px 22px;
  border-radius: 10px;
  cursor: pointer;
  font: 700 14px/1 inherit;
  text-decoration: none;
}

.hero-open-pdf {
  width: 100%;
  background: #2563EB;
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 12px;
  font: 700 14px/1 inherit;
  cursor: pointer;
  margin-top: 4px;
}

.hero-open-pdf:hover {
  background: #1D4ED8;
}

body.sansa-os .hero-section {
  background: #FFFFFF !important;
}

body.sansa-os .shape-board {
  opacity: 0.35;
}

body.sansa-os .footer {
  background: #F8FAFC !important;
  color: #0F172A !important;
}

.footer-links a {
  color: #0F172A !important;
}

.category-tabs button,
.pricing-tabs button {
  color: #0F172A !important;
  background: #F8FAFC !important;
  border: 1px solid #E2E8F0 !important;
}

.app-card p,
.plan-card p,
.features li {
  color: #0F172A !important;
}
