/*
 * All Access Paris — Custom Theme Override
 * Charte graphique : Vert forêt luxe (#1B4332)
 * Style : Minimaliste, organique, premium parisien
 */

/* ===== CSS CUSTOM PROPERTIES ===== */
:root {
  --aap-primary: #1B4332;
  --aap-primary-light: #2D6A4F;
  --aap-primary-lighter: #40916C;
  --aap-accent: #D8F3DC;
  --aap-bg-main: #F0F1EC;
  --aap-bg-card: #FFFFFF;
  --aap-bg-sidebar: #FAFDF9;
  --aap-text-primary: #2D2D2D;
  --aap-text-secondary: #6B6B6B;
  --aap-text-muted: #9B9B9B;
  --aap-border: #D6D6D6;
  --aap-border-light: #E8E8E4;
}

/* ===== GLOBAL OVERRIDES ===== */

/* Primary brand color overrides */
.bg-sky-500, .bg-sky-600, .bg-sky-700,
.bg-blue-500, .bg-blue-600, .bg-blue-700,
.bg-indigo-500, .bg-indigo-600 {
  background-color: var(--aap-primary) !important;
}

.bg-sky-100, .bg-blue-100, .bg-indigo-100 {
  background-color: var(--aap-accent) !important;
}

.text-sky-500, .text-sky-600, .text-sky-700,
.text-blue-500, .text-blue-600, .text-blue-700,
.text-indigo-500, .text-indigo-600 {
  color: var(--aap-primary) !important;
}

.border-sky-500, .border-sky-600,
.border-blue-500, .border-blue-600,
.border-indigo-500, .border-indigo-600 {
  border-color: var(--aap-primary) !important;
}

.hover\:bg-sky-600:hover, .hover\:bg-blue-600:hover,
.hover\:bg-sky-700:hover, .hover\:bg-blue-700:hover {
  background-color: var(--aap-primary-light) !important;
}

.ring-sky-500, .ring-blue-500, .ring-indigo-500,
.focus\:ring-sky-500:focus, .focus\:ring-blue-500:focus {
  --tw-ring-color: var(--aap-primary) !important;
}

/* ===== SIDEBAR ===== */
/* Override the dark sidebar to light AAP style */
.next-sidebar,
[class*="sidebar"],
nav[class*="next-nav"],
.console-sidebar {
  background-color: var(--aap-bg-sidebar) !important;
  border-right: 1px solid var(--aap-border-light) !important;
}

/* Sidebar text should be dark on light bg */
.next-sidebar a,
.next-sidebar span,
.next-sidebar .nav-label,
[class*="sidebar"] a,
[class*="sidebar"] span {
  color: var(--aap-text-primary) !important;
}

/* Active sidebar item */
.next-sidebar .active,
.next-sidebar a.active,
.next-sidebar [class*="active"],
[class*="sidebar"] .active,
[class*="sidebar"] a.active {
  background-color: var(--aap-accent) !important;
  color: var(--aap-primary) !important;
  border-radius: 8px;
}

.next-sidebar .active span,
.next-sidebar a.active span,
[class*="sidebar"] .active span,
[class*="sidebar"] a.active span {
  color: var(--aap-primary) !important;
}

/* Sidebar hover */
.next-sidebar a:hover,
[class*="sidebar"] a:hover {
  background-color: rgba(27, 67, 50, 0.06) !important;
  border-radius: 8px;
}

/* ===== MAIN CONTENT AREA ===== */
.next-content-wrapper,
.next-content-panel,
[class*="content-wrapper"],
main,
.console-body {
  background-color: var(--aap-bg-main) !important;
}

/* ===== CARDS ===== */
.next-content-panel-body,
[class*="card"],
[class*="panel-body"],
.content-panel {
  background-color: var(--aap-bg-card) !important;
  border-radius: 12px !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04) !important;
}

/* ===== BUTTONS ===== */
/* Primary buttons → deep green pill */
.btn-primary,
button[class*="btn-primary"],
[class*="btn-primary"] {
  background-color: var(--aap-primary) !important;
  border-color: var(--aap-primary) !important;
  color: #FFFFFF !important;
  border-radius: 20px !important;
  font-weight: 500 !important;
}

.btn-primary:hover,
button[class*="btn-primary"]:hover,
[class*="btn-primary"]:hover {
  background-color: var(--aap-primary-light) !important;
  border-color: var(--aap-primary-light) !important;
}

/* Secondary/outline buttons */
.btn-default,
.btn-outline,
button[class*="btn-default"],
button[class*="btn-outline"] {
  border-radius: 20px !important;
  border-color: var(--aap-border) !important;
}

.btn-default:hover,
.btn-outline:hover {
  border-color: var(--aap-primary) !important;
  color: var(--aap-primary) !important;
}

/* ===== INPUTS ===== */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="tel"],
input[type="url"],
textarea,
select,
.form-input,
.form-select {
  border-radius: 8px !important;
  border-color: var(--aap-border) !important;
}

input:focus,
textarea:focus,
select:focus,
.form-input:focus,
.form-select:focus {
  border-color: var(--aap-primary) !important;
  box-shadow: 0 0 0 2px rgba(27, 67, 50, 0.15) !important;
  outline: none !important;
}

/* ===== LINKS & ACCENTS ===== */
a {
  color: var(--aap-primary);
}

a:hover {
  color: var(--aap-primary-light);
}

/* ===== BADGES & TAGS ===== */
.badge-primary,
[class*="badge-primary"] {
  background-color: var(--aap-accent) !important;
  color: var(--aap-primary) !important;
}

/* ===== TABLES ===== */
table th {
  color: var(--aap-text-secondary) !important;
  font-weight: 600 !important;
}

table tr:hover td {
  background-color: rgba(216, 243, 220, 0.3) !important;
}

/* ===== LOADING SCREEN ===== */
#boot-loader {
  background-color: var(--aap-bg-sidebar) !important;
}

#boot-loader .loading-message {
  color: var(--aap-primary) !important;
  font-family: 'Inter', sans-serif !important;
  font-weight: 600 !important;
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--aap-bg-main);
}

::-webkit-scrollbar-thumb {
  background: var(--aap-border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--aap-text-muted);
}

/* ===== HEADER / TOP BAR ===== */
.next-header,
[class*="top-bar"],
header {
  background-color: var(--aap-bg-card) !important;
  border-bottom: 1px solid var(--aap-border-light) !important;
}

/* ===== FLEETBASE SPECIFIC OVERRIDES ===== */
/* Override the blue/purple gradients Fleetbase uses */
.bg-gradient-to-r,
[class*="gradient"] {
  background: linear-gradient(135deg, var(--aap-primary) 0%, var(--aap-primary-lighter) 100%) !important;
}

/* Override selection color */
::selection {
  background-color: var(--aap-accent);
  color: var(--aap-primary);
}

/* ===== DARK MODE OVERRIDES ===== */
body[data-theme='dark'] {
  --aap-primary: #52B788;
  --aap-primary-light: #74C69D;
  --aap-accent: #1B4332;
  --aap-bg-main: #0D2818;
  --aap-bg-card: #143528;
  --aap-bg-sidebar: #0F221A;
  --aap-text-primary: #E8E8E4;
  --aap-text-secondary: #95D5B2;
  --aap-border: #2D6A4F;
  --aap-border-light: #1B4332;
}
