/* Theme: Navy & Gold - Professional with Depth */

/* Apply theme to body with data-theme attribute */
body[data-theme="navy-gold"] {
  --color-primary: #1e3a5f;
  --color-primary-light: #2d5a8f;
  --color-primary-dark: #152840;
  --color-accent: #d4af37;
  --color-accent-light: #e6c766;
  --color-accent-dark: #b8982f;

  --color-text-primary: #1a1a1a;
  --color-text-secondary: #4a5568;
  --color-text-muted: #718096;
  --color-bg-primary: #ffffff;
  --color-bg-secondary: #f7fafc;
  --color-bg-tertiary: #edf2f7;

  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-error: #ef4444;
  --color-info: #3b82f6;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);

  background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%) !important;
}

/* High specificity overrides for Tailwind classes */
body[data-theme="navy-gold"] html,
body[data-theme="navy-gold"] {
  background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%) !important;
}

body[data-theme="navy-gold"] .sidebar {
  background: linear-gradient(to bottom, #ffffff 0%, #f7fafc 100%) !important;
  border-right: 1px solid rgba(30, 58, 95, 0.1) !important;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05) !important;
}

body[data-theme="navy-gold"] .sidebar-header {
  background: linear-gradient(135deg, #1e3a5f 0%, #2d5a8f 100%) !important;
  color: white !important;
  border-bottom: 1px solid rgba(30, 58, 95, 0.1) !important;
}

body[data-theme="navy-gold"] .sidebar-header h1,
body[data-theme="navy-gold"] .sidebar-header p {
  color: white !important;
}

body[data-theme="navy-gold"] .sidebar-header svg {
  color: #d4af37 !important;
}

body[data-theme="navy-gold"] .sidebar-nav {
  background: linear-gradient(to bottom, #dce7f2 0%, #d5e3f0 100%) !important;
}

/* Sidebar profile/footer section */
body[data-theme="navy-gold"] .sidebar-nav + div,
body[data-theme="navy-gold"] .mt-auto.p-4.border-t {
  background: #d5e3f0 !important;
  border-top-color: rgba(30, 58, 95, 0.2) !important;
}

/* Profile avatar - match navy theme instead of bright blue */
body[data-theme="navy-gold"] .mt-auto.p-4.border-t .bg-blue-600 {
  background: linear-gradient(135deg, #1e3a5f 0%, #2d5a8f 100%) !important;
}

/* Keep avatar letter white on dark background */
body[data-theme="navy-gold"] .mt-auto.p-4.border-t .bg-blue-600 span,
body[data-theme="navy-gold"] .mt-auto.p-4.border-t .bg-blue-600 .text-white {
  color: white !important;
}

/* Three-dot menu button - navy/gold theme */
body[data-theme="navy-gold"] .mt-auto.p-4.border-t button {
  background: linear-gradient(135deg, #1e3a5f 0%, #2d5a8f 100%) !important;
  color: white !important;
  padding: 0.375rem !important;
  border-radius: 0.375rem !important;
}

body[data-theme="navy-gold"] .mt-auto.p-4.border-t button:hover {
  background: linear-gradient(135deg, #2d5a8f 0%, #3d6a9f 100%) !important;
  color: #d4af37 !important;
}

body[data-theme="navy-gold"] .mt-auto.p-4.border-t button svg {
  color: white !important;
}

/* Sidebar profile text - ensure dark text on light blue background */
body[data-theme="navy-gold"] .mt-auto.p-4.border-t .text-gray-900,
body[data-theme="navy-gold"] .mt-auto.p-4.border-t p,
body[data-theme="navy-gold"] .mt-auto.p-4.border-t span {
  color: #1e3a5f !important;
}

body[data-theme="navy-gold"] .mt-auto.p-4.border-t .text-gray-500,
body[data-theme="navy-gold"] .mt-auto.p-4.border-t .text-xs {
  color: #4a5568 !important;
}

/* Override any .text-white in profile section */
body[data-theme="navy-gold"] .mt-auto.p-4.border-t .text-white {
  color: #1e3a5f !important;
}

/* Clinic sidebar user section text - ensure dark text on light blue background */
body[data-theme="navy-gold"] .sidebar-nav .text-gray-900 {
  color: #1e3a5f !important;
}

body[data-theme="navy-gold"] .sidebar-nav .text-gray-500 {
  color: #4a5568 !important;
}

/* Clinic sidebar footer text - ensure dark text on light blue background */
body[data-theme="navy-gold"] .mt-auto.px-3.py-4.border-t .text-gray-600 {
  color: #4a5568 !important;
}

/* Make the header component itself (the white bar) dark navy */
body[data-theme="navy-gold"] .content-header > div {
  background: linear-gradient(135deg, #1e3a5f 0%, #2d5a8f 100%) !important;
  border-color: rgba(212, 175, 55, 0.3) !important;
}

/* Header component text - white on dark background */
body[data-theme="navy-gold"] .content-header > div h1,
body[data-theme="navy-gold"] .content-header > div h2,
body[data-theme="navy-gold"] .content-header > div .text-gray-900 {
  color: white !important;
}

body[data-theme="navy-gold"] .content-header > div .text-gray-600,
body[data-theme="navy-gold"] .content-header > div .text-gray-500 {
  color: rgba(255, 255, 255, 0.85) !important;
}

/* Header buttons - white text on dark background */
body[data-theme="navy-gold"] .content-header > div > button,
body[data-theme="navy-gold"] .content-header > div > a,
body[data-theme="navy-gold"] .content-header > div > div:not(.absolute) button,
body[data-theme="navy-gold"] .content-header > div > div:not(.absolute) a {
  color: white !important;
}

body[data-theme="navy-gold"] .content-header > div > button:hover,
body[data-theme="navy-gold"] .content-header > div > a:hover,
body[data-theme="navy-gold"] .content-header > div > div:not(.absolute) button:hover,
body[data-theme="navy-gold"] .content-header > div > div:not(.absolute) a:hover {
  color: #d4af37 !important;
  background-color: rgba(255, 255, 255, 0.15) !important;
}

/* Header SVG icons - white color */
body[data-theme="navy-gold"] .content-header > div > svg,
body[data-theme="navy-gold"] .content-header > div > button svg,
body[data-theme="navy-gold"] .content-header > div > a svg,
body[data-theme="navy-gold"] .content-header > div > div:not(.absolute) svg {
  color: white !important;
}

/* Dropdown menus - explicit colors with highest specificity */
body[data-theme="navy-gold"] .content-header .absolute.bg-white button,
body[data-theme="navy-gold"] .content-header .absolute.bg-white a {
  color: #374151 !important;
  background-color: transparent !important;
}

body[data-theme="navy-gold"] .content-header .absolute.bg-white button:hover,
body[data-theme="navy-gold"] .content-header .absolute.bg-white a:hover {
  color: #1e3a5f !important;
  background-color: rgba(30, 58, 95, 0.08) !important;
}

body[data-theme="navy-gold"] .content-header .absolute.bg-white svg {
  color: #6b7280 !important;
}

body[data-theme="navy-gold"] .content-header .absolute.bg-white button:hover svg,
body[data-theme="navy-gold"] .content-header .absolute.bg-white a:hover svg {
  color: #374151 !important;
}

/* Search input styling for dark header */
body[data-theme="navy-gold"] .content-header > div input,
body[data-theme="navy-gold"] .content-header > div .bg-gray-100 {
  background-color: rgba(255, 255, 255, 0.15) !important;
  color: white !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

body[data-theme="navy-gold"] .content-header > div input::placeholder {
  color: rgba(255, 255, 255, 0.6) !important;
}

body[data-theme="navy-gold"] .content-header {
  background: transparent !important;
  border-bottom: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}

body[data-theme="navy-gold"] .content-body {
  background: linear-gradient(135deg, #e8f0f7 0%, #dce7f2 100%) !important;
}

body[data-theme="navy-gold"] .main-content {
  background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%) !important;
}

body[data-theme="navy-gold"] .bg-white {
  background-color: #ffffff !important;
}

body[data-theme="navy-gold"] .bg-gray-50 {
  background-color: #f7fafc !important;
}

body[data-theme="navy-gold"] .bg-gray-100 {
  background-color: #edf2f7 !important;
}

body[data-theme="navy-gold"] .text-gray-900,
body[data-theme="navy-gold"] h1:not(.text-white),
body[data-theme="navy-gold"] h2:not(.text-white),
body[data-theme="navy-gold"] h3:not(.text-white) {
  color: #1e3a5f !important;
}

/* Preserve white text on dark backgrounds */
body[data-theme="navy-gold"] h1.text-white,
body[data-theme="navy-gold"] h2.text-white,
body[data-theme="navy-gold"] h3.text-white,
body[data-theme="navy-gold"] .text-white {
  color: white !important;
}

/* Ensure sidebar-header text stays white (override general heading rules above) */
body[data-theme="navy-gold"] .sidebar-header h1,
body[data-theme="navy-gold"] .sidebar-header h2,
body[data-theme="navy-gold"] .sidebar-header h3,
body[data-theme="navy-gold"] .sidebar-header p,
body[data-theme="navy-gold"] .sidebar-header .text-gray-900 {
  color: white !important;
}

body[data-theme="navy-gold"] .text-gray-600,
body[data-theme="navy-gold"] .text-gray-700 {
  color: #4a5568 !important;
}

body[data-theme="navy-gold"] .btn-primary,
body[data-theme="navy-gold"] button:not(.btn-secondary):not(.btn-danger):not(.btn-unstyled) {
  background: linear-gradient(135deg, #1e3a5f 0%, #2d5a8f 100%) !important;
  box-shadow: 0 4px 6px -1px rgba(30, 58, 95, 0.2), 0 2px 4px -1px rgba(30, 58, 95, 0.1) !important;
  color: white !important;
}

body[data-theme="navy-gold"] .btn-primary:hover {
  background: linear-gradient(135deg, #152840 0%, #1e3a5f 100%) !important;
  box-shadow: 0 10px 15px -3px rgba(30, 58, 95, 0.3), 0 4px 6px -2px rgba(30, 58, 95, 0.15) !important;
}

body[data-theme="navy-gold"] .card {
  background-color: white !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  border-radius: 0.75rem !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
}

body[data-theme="navy-gold"] .card:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
  transform: translateY(-2px) !important;
}

body[data-theme="navy-gold"] .card-header {
  background: linear-gradient(to bottom, #ffffff, #f7fafc) !important;
}

body[data-theme="navy-gold"] .nav-link.active {
  background: linear-gradient(to right, rgba(30, 58, 95, 0.1), transparent) !important;
  color: #1e3a5f !important;
}

/* Header Dropdown Styling - CRITICAL: Override header dark background for dropdown menus */
/* Dropdown containers - force white background with high specificity */
body[data-theme="navy-gold"] .content-header div[class*="absolute"][class*="bg-white"],
body[data-theme="navy-gold"] .content-header .absolute.bg-white {
  background-color: #ffffff !important;
  border: 2px solid rgba(212, 175, 55, 0.4) !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.15) !important;
}

/* Dropdown header section - navy background with white text */
body[data-theme="navy-gold"] .content-header .absolute.bg-white > .p-3.border-b,
body[data-theme="navy-gold"] .content-header .absolute.bg-white > div > .border-b {
  background: linear-gradient(135deg, #1e3a5f 0%, #2d5a8f 100%) !important;
  border-color: rgba(212, 175, 55, 0.3) !important;
}

body[data-theme="navy-gold"] .content-header .absolute.bg-white .p-3.border-b h3,
body[data-theme="navy-gold"] .content-header .absolute.bg-white .p-3.border-b p:first-child,
body[data-theme="navy-gold"] .content-header .absolute.bg-white .p-3.border-b .font-medium {
  color: white !important;
}

body[data-theme="navy-gold"] .content-header .absolute.bg-white .p-3.border-b p.text-xs,
body[data-theme="navy-gold"] .content-header .absolute.bg-white .p-3.border-b .text-gray-500 {
  color: rgba(255, 255, 255, 0.8) !important;
}

/* Dropdown menu items - medium-dark text on white background for readability */
body[data-theme="navy-gold"] .content-header .absolute.bg-white .py-1 a,
body[data-theme="navy-gold"] .content-header .absolute.bg-white .py-1 button {
  color: #374151 !important;
  background-color: transparent !important;
}

body[data-theme="navy-gold"] .content-header .absolute.bg-white .py-1 a:hover,
body[data-theme="navy-gold"] .content-header .absolute.bg-white .py-1 button:hover {
  background-color: rgba(30, 58, 95, 0.08) !important;
  color: #1e3a5f !important;
}

/* Dropdown menu item icons - ensure visibility with medium gray */
body[data-theme="navy-gold"] .content-header .absolute.bg-white .py-1 a svg,
body[data-theme="navy-gold"] .content-header .absolute.bg-white .py-1 button svg {
  color: #6b7280 !important;
}

body[data-theme="navy-gold"] .content-header .absolute.bg-white .py-1 a:hover svg,
body[data-theme="navy-gold"] .content-header .absolute.bg-white .py-1 button:hover svg {
  color: #374151 !important;
}

/* Dropdown text colors - ensure readability */
body[data-theme="navy-gold"] .content-header .absolute.bg-white .text-gray-700 {
  color: #1e3a5f !important;
}

body[data-theme="navy-gold"] .content-header .absolute.bg-white .text-gray-900 {
  color: #152840 !important;
}

body[data-theme="navy-gold"] .content-header .absolute.bg-white .text-gray-500,
body[data-theme="navy-gold"] .content-header .absolute.bg-white .text-gray-600 {
  color: #4a5568 !important;
}

/* Theme dropdown selected item */
body[data-theme="navy-gold"] .content-header .absolute.bg-white .bg-blue-50 {
  background-color: rgba(30, 58, 95, 0.12) !important;
}

body[data-theme="navy-gold"] .content-header .absolute.bg-white .bg-blue-50 * {
  color: #1e3a5f !important;
}

/* Dropdown icons - preserve color coding */
body[data-theme="navy-gold"] .content-header .absolute.bg-white .text-blue-600 {
  color: #2d5a8f !important;
}

body[data-theme="navy-gold"] .content-header .absolute.bg-white .text-green-600 {
  color: #10b981 !important;
}

body[data-theme="navy-gold"] .content-header .absolute.bg-white .text-yellow-600 {
  color: #f59e0b !important;
}

/* Dropdown footer */
body[data-theme="navy-gold"] .content-header .absolute.bg-white .bg-gray-50 {
  background-color: #f7fafc !important;
}

body[data-theme="navy-gold"] .content-header .absolute.bg-white .bg-gray-50 a {
  color: #2d5a8f !important;
}

body[data-theme="navy-gold"] .content-header .absolute.bg-white .bg-gray-50 a:hover {
  color: #1e3a5f !important;
  text-decoration: underline !important;
}

/* Sign Out button - dark navy background with white text */
body[data-theme="navy-gold"] .content-header .absolute.bg-white .py-1 .border-t + button,
body[data-theme="navy-gold"] .content-header .absolute.bg-white .py-1 button[onclick*="logout" i] {
  background: linear-gradient(135deg, #1e3a5f 0%, #2d5a8f 100%) !important;
  color: white !important;
  margin: 0 !important;
  border-radius: 0 0 0.5rem 0.5rem !important;
}

body[data-theme="navy-gold"] .content-header .absolute.bg-white .py-1 .border-t + button:hover,
body[data-theme="navy-gold"] .content-header .absolute.bg-white .py-1 button[onclick*="logout" i]:hover {
  background: linear-gradient(135deg, #152840 0%, #1e3a5f 100%) !important;
  color: white !important;
}

body[data-theme="navy-gold"] .content-header .absolute.bg-white .py-1 .border-t + button svg,
body[data-theme="navy-gold"] .content-header .absolute.bg-white .py-1 button[onclick*="logout" i] svg {
  color: white !important;
}

/* User info section - ensure all text is white */
body[data-theme="navy-gold"] .content-header .absolute.bg-white .p-3.border-b p,
body[data-theme="navy-gold"] .content-header .absolute.bg-white .p-3.border-b .text-gray-900 {
  color: white !important;
}

/* User avatar in header - dark navy to match theme */
body[data-theme="navy-gold"] .content-header .bg-blue-600 {
  background: linear-gradient(135deg, #1e3a5f 0%, #2d5a8f 100%) !important;
}

/* Notification badge */
body[data-theme="navy-gold"] .content-header .bg-red-500 {
  background-color: #ef4444 !important;
}
