/* ==========================================================================
   JF AGÊNCIA - EXECUTIVE BRAND & THEME (v8)
   Obsidiana: #090C12 | Navy: #111B29 | Ouro Champagne: #C7A779 | Alabastro: #F6F4EF
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,500;0,600;0,700;1,400;1,600&family=DM+Sans:ital,opsz,wght@0,9..40,300..700;1,9..40,300..700&family=Manrope:wght@300;400;500;600;700;800&display=swap');

:root, html, html.dark, html.light, body, body.dark, body.light, .dark, .light {
  --jf-obsidiana: #090c12;
  --jf-navy: #111b29;
  --jf-navy-card: #132032;
  --jf-navy-hover: #1c2c44;
  --jf-gold: #c7a779;
  --jf-gold-hover: #d4b483;
  --jf-gold-glow: rgba(199, 167, 121, 0.3);
  --jf-alabastro: #f6f4ef;
  --jf-muted: #94a3b8;
  --jf-border: rgba(199, 167, 121, 0.22);
  --jf-border-subtle: rgba(199, 167, 121, 0.12);

  /* Force Dark Base Palette Across ALL Modes */
  --background-color: 9 12 18 !important;
  --surface-1: 17 27 41 !important;
  --surface-2: 19 32 48 !important;
  --surface-active: 27 44 68 !important;

  --solid-1: 17 27 41 !important;
  --solid-2: 19 32 48 !important;
  --solid-3: 27 44 68 !important;
  --solid-active: 32 52 80 !important;

  /* Button color override (permanently kills white buttons) */
  --button-color: 17 27 41 !important;
  --button-hover-color: 28 44 68 !important;
  --card-color: 17 27 41 !important;

  /* Label background override (permanently kills white pills in integrations) */
  --label-background: 19 32 50 !important;
  --label-border: 199, 167, 121, 0.3 !important;

  --border-weak: 28 40 58 !important;
  --border-strong: 199 167 121 !important;
  --border-container: 199 167 121 !important;

  /* Kill white alpha tokens */
  --alpha-1: 24, 38, 58, 0.9 !important;
  --alpha-2: 20, 32, 50, 0.95 !important;
  --alpha-3: 17, 27, 41, 0.98 !important;
  --white-alpha: 17, 27, 41, 0.95 !important;

  /* Slate Scale */
  --slate-1: 9 12 18 !important;
  --slate-2: 17 27 41 !important;
  --slate-3: 21 34 51 !important;
  --slate-4: 28 42 64 !important;
  --slate-5: 35 50 74 !important;
  --slate-6: 45 62 90 !important;
  --slate-7: 65 85 118 !important;
  --slate-8: 100 120 150 !important;
  --slate-9: 148 163 184 !important;
  --slate-10: 180 192 210 !important;
  --slate-11: 199 167 121 !important;
  --slate-12: 246 244 239 !important;

  /* Brand Blue to Champagne Gold */
  --blue-1: 18 24 20 !important;
  --blue-2: 28 34 26 !important;
  --blue-3: 42 45 32 !important;
  --blue-4: 60 58 38 !important;
  --blue-5: 85 78 48 !important;
  --blue-6: 115 100 58 !important;
  --blue-7: 150 128 72 !important;
  --blue-8: 180 150 85 !important;
  --blue-9: 199 167 121 !important;
  --blue-10: 179 143 92 !important;
  --blue-11: 199 167 121 !important;
  --blue-12: 246 244 239 !important;
}

/* Base resets */
body, #app {
  background-color: #090c12 !important;
  color: #f6f4ef !important;
  font-family: 'DM Sans', 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* ==========================================================================
   INTERACTIVE CURSOR FIX
   ========================================================================== */
button,
a,
summary,
[role="button"],
[role="menuitem"],
[role="tab"],
.cursor-pointer,
[class*="cursor-pointer"],
nav a,
nav button,
aside a,
aside button,
div[class*="DocumentFiltersBar"] button,
button[slate] {
  cursor: pointer !important;
}

button:disabled,
[disabled],
[aria-disabled="true"] {
  cursor: not-allowed !important;
}

/* ==========================================================================
   TOAST NOTIFICATIONS (Success / Alert Toasts)
   Eliminates white box with white text
   ========================================================================== */
.toast-fade > div,
div[class*="SnackbarItem"],
div[class*="drop-shadow-md"][class*="max-w-[40rem]"] {
  background: #111b29 !important;
  background-color: #111b29 !important;
  color: #f6f4ef !important;
  border: 1px solid rgba(199, 167, 121, 0.45) !important;
  border-radius: 12px !important;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.8), 0 0 20px rgba(199, 167, 121, 0.25) !important;
}

.toast-fade > div *,
div[class*="SnackbarItem"] *,
div[class*="drop-shadow-md"][class*="max-w-[40rem]"] * {
  color: #f6f4ef !important;
  font-weight: 600 !important;
}

/* ==========================================================================
   DROPDOWNS, POPOVERS & MENUS (Profile, Caixa de Entrada, Filters)
   Eliminates white rectangles with invisible text
   ========================================================================== */
.n-dropdown-body,
ul.n-dropdown-body,
div[class*="bg-n-alpha-3"],
div[class*="DropdownMenu"],
div[class*="InboxDisplayMenu"],
div[class*="InboxOptionMenu"],
div[class*="SidebarProfileMenu"] {
  background-color: #111b29 !important;
  background: #111b29 !important;
  border: 1px solid rgba(199, 167, 121, 0.25) !important;
  border-radius: 12px !important;
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.75) !important;
  backdrop-filter: blur(25px) !important;
  color: #f6f4ef !important;
}

.n-dropdown-body *,
div[class*="bg-n-alpha-3"] span,
div[class*="bg-n-alpha-3"] button,
div[class*="bg-n-alpha-3"] p,
div[class*="bg-n-alpha-3"] a,
div[class*="DropdownMenu"] *,
div[class*="InboxDisplayMenu"] * {
  color: #f6f4ef !important;
}

.n-dropdown-body button:hover,
.n-dropdown-body a:hover,
div[class*="bg-n-alpha-3"] button:hover,
div[class*="bg-n-alpha-3"] a:hover,
div[class*="DropdownMenu"] button:hover {
  background-color: #1c2c44 !important;
  color: #c7a779 !important;
}

/* ==========================================================================
   BUTTONS (Documentos, Auditoria, Caixa de Entrada Exibir)
   Eliminates white pills
   ========================================================================== */
button.bg-n-button-color,
button[class*="bg-n-button-color"],
button[slate],
div[class*="DocumentFiltersBar"] button,
div[class*="InboxOptionMenu"] button,
button.button--secondary {
  background-color: #111b29 !important;
  color: #f6f4ef !important;
  border: 1px solid rgba(199, 167, 121, 0.25) !important;
  border-radius: 8px !important;
  font-weight: 500 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
}

button.bg-n-button-color:hover,
button[class*="bg-n-button-color"]:hover,
button[slate]:hover,
div[class*="DocumentFiltersBar"] button:hover,
button.button--secondary:hover {
  background-color: #1c2c44 !important;
  border-color: #c7a779 !important;
  color: #c7a779 !important;
  transform: translateY(-1px);
}

button.bg-n-button-color span,
button[class*="bg-n-button-color"] span,
button[slate] span {
  color: #f6f4ef !important;
}

/* ==========================================================================
   INTEGRATION CARDS & STATUS PILLS
   Eliminates white status rectangles
   ========================================================================== */
span.bg-n-label-color,
span[class*="bg-n-label-color"],
div[class*="Integration"] span[class*="rounded"],
div[class*="SingleIntegration"] span[class*="rounded"] {
  background-color: #132032 !important;
  color: #c7a779 !important;
  border: 1px solid rgba(199, 167, 121, 0.3) !important;
  font-weight: 600 !important;
  border-radius: 6px !important;
  padding: 2px 10px !important;
}

div[class*="IntegrationItem"],
div[class*="integration-card"],
section[class*="integrations"] > div {
  background-color: #111b29 !important;
  border: 1px solid rgba(199, 167, 121, 0.2) !important;
  border-radius: 12px !important;
}

/* ==========================================================================
   LOGIN PAGE - EXECUTIVE AGENCY REFORMULATION
   ========================================================================== */
main[class*="min-h-screen"] {
  background: radial-gradient(circle at 50% 20%, #152238 0%, #090c12 70%) !important;
  padding-top: 4rem !important;
}

/* Hide redundant "Login to JF Agência" title */
main[class*="min-h-screen"] h2,
main[class*="min-h-screen"] h2.text-3xl {
  display: none !important;
}

/* Make Login Logo BIGGER, centered and elegant */
main[class*="min-h-screen"] img {
  height: 110px !important;
  max-height: 120px !important;
  width: auto !important;
  filter: drop-shadow(0 8px 24px rgba(199, 167, 121, 0.45)) !important;
  margin-bottom: 2rem !important;
  transition: transform 0.3s ease;
}
main[class*="min-h-screen"] img:hover {
  transform: scale(1.03);
}

/* Executive Frosted Login Card */
main[class*="min-h-screen"] section.bg-white,
main[class*="min-h-screen"] section[class*="dark:bg-n-solid-2"],
main[class*="min-h-screen"] section[class*="sm:max-w-lg"] {
  background: rgba(17, 27, 41, 0.88) !important;
  backdrop-filter: blur(25px) !important;
  border: 1px solid rgba(199, 167, 121, 0.28) !important;
  border-radius: 16px !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.75), 0 0 30px rgba(199, 167, 121, 0.12) !important;
}

/* Primary Action Buttons (Champagne Gold) */
.button--primary,
button.bg-n-brand,
button[class*="bg-blue-600"],
button[type="submit"] {
  background: linear-gradient(135deg, #c7a779 0%, #a88958 100%) !important;
  color: #090c12 !important;
  font-weight: 700 !important;
  border: none !important;
  box-shadow: 0 4px 15px rgba(199, 167, 121, 0.3) !important;
  border-radius: 8px !important;
}

.button--primary:hover,
button.bg-n-brand:hover,
button[class*="bg-blue-600"]:hover,
button[type="submit"]:hover {
  background: linear-gradient(135deg, #d4b483 0%, #b89560 100%) !important;
  box-shadow: 0 6px 20px rgba(199, 167, 121, 0.45) !important;
  transform: translateY(-1px);
}

/* Form Inputs & Fields across settings, edit screens */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
input[type="search"],
textarea,
select,
.ProseMirror {
  background-color: #06090e !important;
  border: 1px solid rgba(199, 167, 121, 0.22) !important;
  color: #f6f4ef !important;
  border-radius: 8px !important;
}

input:focus,
textarea:focus,
select:focus,
.ProseMirror:focus {
  border-color: var(--jf-gold) !important;
  box-shadow: 0 0 0 2px rgba(199, 167, 121, 0.25) !important;
  outline: none !important;
}

/* Edit Screens & General Settings Cards */
div[class*="settings-card"],
div[class*="settings-section"],
section[class*="settings"],
div[class*="bg-n-solid-1"],
div[class*="bg-n-solid-2"] {
  background-color: #111b29 !important;
  border: 1px solid rgba(199, 167, 121, 0.18) !important;
  border-radius: 12px !important;
}

/* Header & Sidebar Polish */
header,
aside,
div[class*="sidebar"] {
  background-color: #090c12 !important;
  border-color: rgba(199, 167, 121, 0.15) !important;
}

aside a.active,
aside a[class*="router-link-active"] {
  background: rgba(199, 167, 121, 0.15) !important;
  color: #c7a779 !important;
  border-left: 3px solid #c7a779 !important;
}

/* Chat Input Send Icon - Transform up-arrow into Send Plane */
button i[class*="i-lucide-arrow-up"],
button span[class*="i-lucide-arrow-up"] {
  background-color: #090c12 !important;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='22' y1='2' x2='11' y2='13'%3E%3C/line%3E%3Cpolygon points='22 2 15 22 11 13 2 9 22 2'%3E%3C/polygon%3E%3C/svg%3E") no-repeat center / contain !important;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='22' y1='2' x2='11' y2='13'%3E%3C/line%3E%3Cpolygon points='22 2 15 22 11 13 2 9 22 2'%3E%3C/polygon%3E%3C/svg%3E") no-repeat center / contain !important;
}
