/* AuditMatic AI — Brand Override */

/* Raleway font from landing page */
@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@300;400;500;600;700&display=swap');

/* ===== LIGHT MODE (default) ===== */
:root {
  /* Primary accent: AuditMatic Orange */
  --brand-purple: #E68C10;

  /* Green scale → Orange scale (buttons, toggles, success states) */
  --green-50: #FFF7ED;
  --green-100: #FFEDD5;
  --green-200: #FED7AA;
  --green-300: #FDBA74;
  --green-400: #FB923C;
  --green-500: #E68C10;
  --green-600: #D97706;
  --green-700: #B45309;
  --green-800: #92400E;
  --green-900: #78350F;
}

html:not(.dark) {
  /* Gray scale → Warm cream/pale orange tones */
  --white: #FFFCF7;
  --gray-50: #FFF9F0;
  --gray-100: #FFF3E0;
  --gray-200: #FFE8C8;
  --gray-300: #FFD9A8;

  /* Surface overrides */
  --surface-primary: var(--white);
  --surface-primary-alt: var(--gray-50);
  --surface-primary-contrast: var(--gray-100);
  --surface-secondary: var(--gray-50);
  --surface-secondary-alt: var(--gray-200);
  --surface-tertiary: var(--gray-100);
  --surface-tertiary-alt: var(--white);
  --surface-dialog: var(--white);
  --surface-chat: var(--white);
  --surface-submit: var(--green-700);
  --surface-submit-hover: var(--green-800);
}

/* Font override — Raleway from AuditMatic landing page */
html, body, #root,
input, textarea, select, button {
  font-family: 'Raleway', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* ===== LIGHT MODE BACKGROUNDS ===== */
html:not(.dark) body,
html:not(.dark) #root {
  background-color: #FFFCF7 !important;
}

html:not(.dark) .bg-white,
html:not(.dark) [class*="bg-surface-primary"] {
  background-color: #FFFCF7 !important;
}

html:not(.dark) .bg-gray-50,
html:not(.dark) [class*="bg-surface-secondary"] {
  background-color: #FFF9F0 !important;
}

html:not(.dark) nav.bg-surface-primary-alt,
html:not(.dark) nav[class*="bg-surface-primary-alt"] {
  background-color: #FDEBD0 !important;
}

html:not(.dark) nav a:hover,
html:not(.dark) nav button:hover {
  background-color: #FAD7A0 !important;
}

html:not(.dark) .bg-gray-100,
html:not(.dark) [class*="bg-surface-tertiary"],
html:not(.dark) [class*="bg-surface-primary-contrast"] {
  background-color: #FFF3E0 !important;
}

html:not(.dark) [class*="bg-login"] {
  background-color: #FFF9F0 !important;
}

html:not(.dark) input,
html:not(.dark) textarea,
html:not(.dark) select {
  background-color: #FFFDF9 !important;
}

html:not(.dark) .hover\:bg-gray-100:hover,
html:not(.dark) .hover\:bg-surface-hover:hover {
  background-color: #FFF3E0 !important;
}

html:not(.dark) [class*="bg-surface-chat"] {
  background-color: #FFFCF7 !important;
}

html:not(.dark) ::-webkit-scrollbar-track {
  background: #FFF9F0;
}
html:not(.dark) ::-webkit-scrollbar-thumb {
  background: #FFD9A8;
  border-radius: 4px;
}
html:not(.dark) ::-webkit-scrollbar-thumb:hover {
  background: #E68C10;
}

/* ===== DARK MODE ===== */
html.dark {
  --surface-submit: #B45309;
  --surface-submit-hover: #92400E;
}

/* ===== SHARED (both themes) — Brand accent colors ===== */

/* Login page "Continue" button */
.bg-green-600,
button[type="submit"][class*="bg-green"] {
  background-color: #E68C10 !important;
}
.bg-green-600:hover,
button[type="submit"][class*="bg-green"]:hover {
  background-color: #D97706 !important;
}

/* Toggle switches and active states */
.bg-green-500 {
  background-color: #E68C10 !important;
}
.bg-green-400 {
  background-color: #FB923C !important;
}

/* Text accents */
.text-green-500,
.text-green-600,
.text-green-700 {
  color: #E68C10 !important;
}

/* Brand purple overrides */
.bg-brand-purple {
  background-color: #E68C10 !important;
}
.text-brand-purple {
  color: #E68C10 !important;
}

/* Ring/focus states */
.ring-green-500,
.focus\:ring-green-500:focus {
  --tw-ring-color: #E68C10 !important;
}
.border-green-500 {
  border-color: #E68C10 !important;
}

/* Send button */
button[data-testid="send-button"] {
  background-color: #E68C10 !important;
}

/* Selected/active sidebar items */
.bg-surface-active-alt {
  border-left-color: #E68C10 !important;
}

/* ===== Role-based: hide right side panel for non-admin users ===== */
body[data-user-role="USER"] #controls-nav,
body[data-user-role="USER"] #controls-nav + button,
body[data-user-role="USER"] .sidenav,
body[data-user-role="USER"] .sidenav-mask {
  display: none !important;
}
body[data-user-role="USER"] #controls-nav ~ div {
  display: none !important;
}

/* Dark mode: swap to white logo everywhere (Chrome, Safari, Edge) */
html.dark img[src*="logo.svg"]:not([src*="white"]) {
  content: url('/assets/logo-white.svg') !important;
}
