/* Custom Modern Theme Overrides for SB Admin 2 */

:root {
  /* Modernised Palette with Signature Orange */
  --primary: #f97316;       /* Vibrant Modern Orange */
  --primary-hover: #ea580c; /* Deeper Orange for Hover States */
  --success: #10b981;       /* Clean Emerald Green */
  --danger: #ef4444;        /* Striking Modern Red */
  --warning: #f59e0b;       /* Warm Amber */
  --info: #06b6d4;          /* Soft Cyan */
  --dark: #0f172a;          /* Slate Dark Gray */
  --light-bg: #f8fafc;      /* Crisp Modern Light Gray */
  --radius-main: 12px;      /* Softer components and wrappers */
  --radius-sm: 8px;
  --shadow-modern: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
}

/* 1. Global Component Polishing */
body {
  background-color: var(--light-bg) !important;
  color: #334155;
  letter-spacing: -0.01em;
}

#wrapper #content-wrapper {
  background-color: var(--light-bg) !important;
}

/* 2. Sleek Modern Card Styles */
.card {
  border: 1px solid rgba(226, 232, 240, 0.8) !important;
  border-radius: var(--radius-main) !important;
  box-shadow: var(--shadow-modern) !important;
  background: #ffffff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card-header {
  background-color: #ffffff !important;
  border-bottom: 1px solid #f1f5f9 !important;
  padding: 1.25rem 1.5rem !important;
  border-top-left-radius: var(--radius-main) !important;
  border-top-right-radius: var(--radius-main) !important;
}

.card-header h6 {
  color: var(--dark) !important;
  font-weight: 600 !important;
  font-size: 0.95rem;
}

/* 3. Refined Form Inputs (With Orange Focus Rings) */
.form-control {
  height: calc(2em + 0.75rem + 2px) !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: var(--radius-sm) !important;
  padding: 0.5rem 1rem !important;
  color: #1e293b !important;
  font-size: 0.9rem !important;
  transition: all 0.2s ease-in-out !important;
}

.form-control:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.15) !important; /* Soft orange glow */
}

.input-group-text {
  background-color: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm) !important;
  color: #64748b !important;
}

.input-group .form-control {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0 !important;
}

/* 4. Polished Buttons (Signature Orange) */
.btn {
  border-radius: var(--radius-sm) !important;
  padding: 0.5rem 1.25rem !important;
  font-weight: 550 !important;
  font-size: 0.875rem !important;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
  transition: all 0.2s ease !important;
}

.btn-primary {
  background-color: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #ffffff !important;
}

.btn-primary:hover {
  background-color: var(--primary-hover) !important;
  border-color: var(--primary-hover) !important;
}

/* 5. Minimalist Elegant Tables */
.table {
  color: #334155 !important;
}

.table th {
  text-transform: uppercase;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.05em;
  color: #64748b !important;
  background-color: #f8fafc !important;
  border-bottom: 2px solid #e2e8f0 !important;
  border-top: none !important;
  padding: 1rem !important;
}

.table td {
  padding: 1.25rem 1rem !important;
  border-top: 1px solid #f1f5f9 !important;
  vertical-align: middle !important;
  font-size: 0.875rem;
}

.table-hover tbody tr:hover {
  background-color: #f8fafc !important;
}

/* 6. Clean Badges */
.badge {
  padding: 0.35em 0.65em !important;
  font-weight: 600 !important;
  font-size: 0.75rem !important;
  border-radius: 6px !important;
}

.badge-secondary {
  background-color: #f1f5f9 !important;
  color: #475569 !important;
}

/* 7. Premium App Modals */
.modal-content {
  border: none !important;
  border-radius: var(--radius-main) !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
}

.modal-header {
  border-bottom: 1px solid #f1f5f9 !important;
  padding: 1.5rem !important;
}

/* Make sure modal header backgrounds matching primary use the orange */
.modal-header.bg-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%) !important;
}

.modal-footer {
  border-top: 1px solid #f1f5f9 !important;
  background-color: #f8fafc !important;
  border-bottom-right-radius: var(--radius-main) !important;
  border-bottom-left-radius: var(--radius-main) !important;
  padding: 1rem 1.5rem !important;
}

/* 8. Topbar and Navigation Refresh */
.topbar {
  background-color: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

.sidebar {
  /* Use the signature orange gradient instead of black */
  background: linear-gradient(180deg, var(--danger) 10%, var(--primary-hover) 100%) !important; 
}

/* Because the background is orange, keep the icons white/transparent-white */
.sidebar .nav-item .nav-link i {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* Make active/hover text and icons pure white so they stand out against the orange */
.sidebar .nav-item.active .nav-link,
.sidebar .nav-item.active .nav-link i,
.sidebar .nav-item .nav-link:hover,
.sidebar .nav-item .nav-link:hover i {
  color: #ffffff !important;
  font-weight: bold !important;
}