:root {
  /* Professional Enterprise Palette - Slate & Blue */
  --primary-color: #0f172a;
  /* Slate 900 - Deep, authoritative dark blue/gray */
  --primary-hover: #1e293b;
  /* Slate 800 */

  --accent-color: #2563eb;
  /* Blue 600 - Trustworthy, accessible blue */
  --accent-hover: #1d4ed8;
  /* Blue 700 */
  --accent-light: #eff6ff;
  /* Blue 50 */

  --bg-body: #f8fafc;
  /* Slate 50 */
  --bg-card: #ffffff;
  --bg-surface: #f1f5f9;
  /* Slate 100 */

  --text-main: #0f172a;
  /* Slate 900 */
  --text-body: #334155;
  /* Slate 700 */
  --text-muted: #64748b;
  /* Slate 500 */

  --border-color: #e2e8f0;
  /* Slate 200 */
  --border-focus: #94a3b8;
  /* Slate 400 */

  /* Semantic Colors */
  --success-bg: #f0fdf4;
  --success-text: #15803d;
  --warning-bg: #fefce8;
  --warning-text: #a16207;
  --danger-bg: #fef2f2;
  --danger-text: #b91c1c;
  --info-bg: #eff6ff;
  --info-text: #1d4ed8;

  /* Shadows - Subtle & Professional */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.05);

  /* Border Radius - Clean & Modern */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
}

html {
  font-size: 16px;
  height: 100%;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Typography Overrides */
h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
  color: var(--text-main);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 0.75em;
}

h1 {
  font-size: 2.5rem;
  line-height: 1.2;
}

h2 {
  font-size: 2rem;
  line-height: 1.25;
}

h3 {
  font-size: 1.75rem;
  line-height: 1.3;
}

h4 {
  font-size: 1.5rem;
  line-height: 1.35;
}

h5 {
  font-size: 1.25rem;
  line-height: 1.4;
}

h6 {
  font-size: 0.875rem;
  line-height: 1.5;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 600;
}

p {
  margin-bottom: 1.25rem;
}

a {
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent-hover);
}

.lead {
  font-size: 1.125rem;
  color: var(--text-body);
  font-weight: 400;
  opacity: 0.9;
  line-height: 1.6;
}

/* Layout & Structure */
.page-wrapper {
  flex: 1 0 auto;
  padding-top: 2rem;
  padding-bottom: 4rem;
}

.main-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
  width: 100%;
}

/* Modern Navbar - Glassmorphism */
.navbar-modern {
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.75rem 0;
  position: sticky;
  top: 0;
  z-index: 1030;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  color: var(--text-main) !important;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.brand-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background-color: var(--primary-color);
  color: white;
  border-radius: var(--radius-md);
  font-size: 1rem;
}

.nav-link {
  font-weight: 500;
  color: var(--text-body) !important;
  padding: 0.5rem 1rem !important;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.nav-link:hover {
  color: var(--text-main) !important;
  background-color: var(--bg-surface);
}

.nav-link.active {
  color: var(--accent-color) !important;
  background-color: var(--accent-light);
  font-weight: 600;
}

/* Buttons */
.btn {
  font-weight: 500;
  border-radius: var(--radius-md);
  padding: 0.625rem 1.25rem;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;
  box-shadow: var(--shadow-xs);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.btn:active {
  transform: translateY(1px);
  box-shadow: none;
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  box-shadow: var(--shadow-md);
}

.btn-accent {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
  color: white;
}

.btn-accent:hover {
  background-color: var(--accent-hover);
  border-color: var(--accent-hover);
  box-shadow: var(--shadow-md);
}

.btn-secondary,
.btn-ghost {
  background-color: white;
  border-color: var(--border-color);
  color: var(--text-main);
}

.btn-secondary:hover,
.btn-ghost:hover {
  background-color: var(--bg-surface);
  border-color: var(--border-color);
  color: var(--text-main);
}

.btn-outline {
  background-color: transparent;
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: white;
}

.btn-outline:hover {
  background-color: white;
  border-color: white;
  color: var(--primary-color);
}

.btn-lg {
  padding: 0.875rem 1.75rem;
  font-size: 1rem;
  border-radius: var(--radius-md);
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.75rem;
  border-radius: var(--radius-sm);
}

/* Cards & Containers */
.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1.5rem;
  transition: box-shadow 0.2s ease;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-header {
  background-color: transparent;
  border-bottom: 1px solid var(--border-color);
  padding: 1.25rem 1.5rem;
  font-weight: 600;
  color: var(--text-main);
}

.card-body {
  padding: 1.5rem;
}

.shadow-card {
  box-shadow: var(--shadow-lg);
  border: none;
}

/* Forms */
.form-label {
  font-weight: 500;
  color: var(--text-main);
  margin-bottom: 0.5rem;
  font-size: 0.875rem;
}

.form-control,
.form-select {
  display: block;
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--text-main);
  background-color: var(--bg-card);
  background-clip: padding-box;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--accent-color);
  outline: 0;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.input-group-text {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

/* Tables */
.table {
  width: 100%;
  margin-bottom: 1rem;
  color: var(--text-body);
  vertical-align: top;
  border-color: var(--border-color);
}

.table> :not(caption)>*>* {
  padding: 1rem 1.5rem;
  border-bottom-width: 1px;
}

.table-modern thead th {
  background-color: var(--bg-surface);
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border-color);
}

.table-hover tbody tr:hover {
  background-color: var(--bg-surface);
}

/* Alerts & Badges */
.alert {
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  font-size: 0.875rem;
}

.alert-success {
  background-color: var(--success-bg);
  color: var(--success-text);
  border-color: rgba(21, 128, 61, 0.1);
}

.alert-danger {
  background-color: var(--danger-bg);
  color: var(--danger-text);
  border-color: rgba(185, 28, 28, 0.1);
}

.alert-warning {
  background-color: var(--warning-bg);
  color: var(--warning-text);
  border-color: rgba(161, 98, 7, 0.1);
}

.alert-info {
  background-color: var(--info-bg);
  color: var(--info-text);
  border-color: rgba(29, 78, 216, 0.1);
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25em 0.6em;
  font-size: 0.75em;
  font-weight: 600;
  line-height: 1;
  border-radius: 9999px;
  letter-spacing: 0.025em;
}

.badge-success {
  background-color: var(--success-bg);
  color: var(--success-text);
}

.badge-warning {
  background-color: var(--warning-bg);
  color: var(--warning-text);
}

.badge-danger {
  background-color: var(--danger-bg);
  color: var(--danger-text);
}

.badge-primary {
  background-color: var(--info-bg);
  color: var(--info-text);
}

/* Footer */
.footer-modern {
  background-color: white;
  border-top: 1px solid var(--border-color);
  padding: 3rem 0;
  color: var(--text-muted);
  margin-top: auto;
}

.footer-links a {
  color: var(--text-body);
  margin: 0 1rem;
  font-size: 0.875rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--accent-color);
}

/* Utilities */
.text-primary {
  color: var(--accent-color) !important;
}

.text-dark {
  color: var(--text-main) !important;
}

.text-muted {
  color: var(--text-muted) !important;
}

.bg-light {
  background-color: var(--bg-surface) !important;
}

.fw-bold {
  font-weight: 700 !important;
}

.fw-semibold {
  font-weight: 600 !important;
}

.rounded-3 {
  border-radius: var(--radius-lg) !important;
}

.rounded-pill {
  border-radius: 9999px !important;
}

/* User Dropdown */
.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--bg-surface);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  border: 1px solid var(--border-color);
}

.dropdown-menu {
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-md);
  padding: 0.5rem;
}

.dropdown-item {
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  color: var(--text-body);
}

.dropdown-item:hover {
  background-color: var(--bg-surface);
  color: var(--text-main);
}

/* Dashboard Specific */
.stats-card {
  padding: 1.5rem;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.stats-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background-color: var(--bg-surface);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.stats-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}

.stats-label {
  color: var(--text-muted);
  font-size: 0.875rem;
  font-weight: 500;
}

/* Hero Section Special Overrides (Scoped) */
.hero-wrapper {
  background-color: var(--primary-color);
  color: white;
  padding: 5rem 0;
}

.hero-wrapper h1,
.hero-wrapper h2,
.hero-wrapper p {
  color: white;
}

/* Responsive */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  .navbar-brand {
    font-size: 1.125rem;
  }

  .main-content {
    padding: 0 1rem;
  }
}