@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700&display=swap');

/* Global Typography & Colors */
:root {
  --primary: #4F46E5;
  --primary-hover: #4338ca;
  --secondary: #10B981;
  --dark-slate: #0F172A;
  --dark-slate-hover: #1E293B;
  --light-bg: #F3F4F6;
  --white: #FFFFFF;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --font-body: 'Inter', sans-serif;
  --font-heading: 'Outfit', sans-serif;
}

body {
  font-family: var(--font-body) !important;
  background-color: var(--light-bg) !important;
  color: #374151;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: var(--font-heading) !important;
  font-weight: 600 !important;
}

/* Sidebar & Brand */
.main-sidebar, .left-side, .skin-blue .wrapper, .skin-blue .main-sidebar, .skin-blue .left-side, .skin-black-light .main-sidebar {
  background-color: var(--dark-slate) !important;
}

.main-header .logo {
  background-color: var(--dark-slate) !important;
  color: var(--white) !important;
  font-family: var(--font-heading) !important;
  font-weight: 700;
  letter-spacing: 0.5px;
  border-bottom: 1px solid rgba(255,255,255,0.05) !important;
}

.main-header .logo:hover {
  background-color: var(--dark-slate-hover) !important;
}

.sidebar-menu > li {
  margin: 4px 12px;
}

.sidebar-menu > li > a {
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  color: #cbd5e1 !important;
  transition: all 0.3s ease;
}

.sidebar-menu > li:hover > a, .sidebar-menu > li.active > a, .sidebar-menu > li.menu-open > a {
  background: var(--dark-slate-hover) !important;
  color: var(--white) !important;
  transform: translateX(4px);
}

.sidebar-menu > li > .treeview-menu {
  background: transparent !important;
  padding-left: 10px;
}

/* Header Glassmorphism */
.main-header .navbar {
  background: rgba(255, 255, 255, 0.8) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.main-header .navbar .sidebar-toggle, .main-header .navbar .nav > li > a {
  color: #475569 !important;
  transition: color 0.3s ease, background 0.3s ease;
}

.main-header .navbar .sidebar-toggle:hover, .main-header .navbar .nav > li > a:hover {
  background: rgba(0,0,0,0.03) !important;
  color: var(--primary) !important;
}

/* Cards & Boxes */
.box {
  background: var(--white);
  border-radius: var(--radius-md) !important;
  border: none !important;
  border-top: none !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03) !important;
  transition: all 0.3s ease;
  margin-bottom: 24px !important;
}

.box:hover {
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025) !important;
}

.box-header {
  border-bottom: 1px solid #f1f5f9;
  padding: 16px 20px !important;
  color: #0f172a !important;
}

.box-header .box-title {
  font-family: var(--font-heading) !important;
  font-weight: 600;
  color: #1e293b;
}

.box-body {
  padding: 20px !important;
}

/* Buttons */
.btn {
  border-radius: var(--radius-sm) !important;
  font-family: var(--font-body);
  font-weight: 500;
  transition: all 0.25s ease !important;
  border: none !important;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), #6366f1) !important;
  color: white !important;
}

.btn-success {
  background: linear-gradient(135deg, var(--secondary), #059669) !important;
}

.btn-info {
  background: linear-gradient(135deg, #0ea5e9, #0284c7) !important;
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #dc2626) !important;
}

.btn-app {
  border-radius: var(--radius-md) !important;
  background: var(--white) !important;
  color: #475569 !important;
  border: 1px solid #e2e8f0 !important;
  transition: all 0.3s ease;
}

.btn-app:hover {
  background: var(--primary) !important;
  color: white !important;
  border-color: var(--primary) !important;
  transform: translateY(-3px);
}

/* Tables */
.table {
  border-collapse: separate !important;
  border-spacing: 0;
}

.table > thead > tr > th, .table > thead > tr > td, table.dataTable thead th, table.dataTable thead td {
  border-bottom: 2px solid #f1f5f9 !important;
  border-top: none !important;
  color: #64748b;
  font-weight: 600 !important;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
  padding: 12px 16px;
  background: #f8fafc;
}

.table > tbody > tr > td {
  border-top: 1px solid #f1f5f9 !important;
  padding: 12px 16px;
  vertical-align: middle;
  transition: background 0.2s ease;
}

.table-striped > tbody > tr:nth-of-type(odd) {
  background-color: #fafaf9 !important;
}

.table > tbody > tr:hover > td {
  background-color: #f1f5f9 !important;
}

/* Form Controls */
.form-control {
  border-radius: var(--radius-sm) !important;
  border: 1px solid #cbd5e1 !important;
  padding: 10px 14px;
  height: auto;
  box-shadow: none !important;
  transition: all 0.2s ease;
}

.form-control:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2) !important;
}

/* Info Boxes */
.info-box {
  border-radius: var(--radius-md) !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05) !important;
  border: none;
  overflow: hidden;
  transition: all 0.3s ease;
}

.info-box:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
}

.info-box-icon {
  border-radius: var(--radius-sm) !important;
  margin: 10px;
  height: 70px;
  width: 70px;
  line-height: 70px;
}

/* Dropdowns */
.dropdown-menu {
  border-radius: var(--radius-sm) !important;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
  border: 1px solid #f1f5f9;
  padding: 8px 0;
}

.dropdown-menu > li > a {
  padding: 8px 20px;
  color: #475569;
  transition: all 0.2s;
}

.dropdown-menu > li > a:hover {
  background-color: #f1f5f9 !important;
  color: var(--primary) !important;
}

/* Modals */
.modal-content {
  border-radius: var(--radius-lg) !important;
  border: none;
  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;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.modal-footer {
  border-top: 1px solid #f1f5f9;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* Badges */
.label, .badge {
  border-radius: 12px !important;
  padding: 4px 8px;
  font-weight: 500;
  font-family: var(--font-body);
}

/* DataTables pagination */
.pagination > li > a, .pagination > li > span {
  border-radius: var(--radius-sm) !important;
  margin: 0 2px;
  border: none;
  color: #475569;
  font-weight: 500;
  background: #f8fafc;
}

.pagination > li.active > a {
  background: var(--primary) !important;
  box-shadow: 0 2px 4px rgba(79, 70, 229, 0.3);
}

/* Select2 overrides */
.select2-container--default .select2-selection--single {
  border-radius: var(--radius-sm) !important;
  border: 1px solid #cbd5e1 !important;
  height: 40px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 40px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 38px;
}
