@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --accent: #06b6d4;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --bg: #f1f5f9;
  --card: #ffffff;
  --text: #1e293b;
  --muted: #64748b;
  --border: #e2e8f0;
  --shadow: 0 4px 6px -1px rgba(15,23,42,.06), 0 10px 24px -6px rgba(15,23,42,.10);
  --radius: 14px;
}

body, h1, h2, h3, h4, h5, h6, .main-header .logo {
  font-family: 'Inter', 'Segoe UI', Roboto, Arial, sans-serif !important;
}
body { color: var(--text); }
.content-wrapper, .right-side, .skin-blue .wrapper, .skin-blue .main-sidebar + .content-wrapper { background: var(--bg) !important; }
.content-header > h1 { font-weight: 700; color: var(--text); }
.content-header > h1 > small { color: var(--muted); }

/* Header */
.skin-blue .main-header .navbar,
.skin-blue .main-header .logo {
  background: linear-gradient(135deg, var(--primary), var(--accent)) !important;
  border: 0;
}
.skin-blue .main-header .logo:hover { background: var(--primary-dark) !important; }
.main-header { box-shadow: 0 2px 12px rgba(15,23,42,.15); }

/* Sidebar */
.skin-blue .main-sidebar, .skin-blue .left-side { background: #0f172a !important; }
.skin-blue .sidebar a { color: #cbd5e1; }
.skin-blue .sidebar-menu > li > a { border-left: 0; margin: 2px 10px; border-radius: 10px; padding: 11px 14px; transition: all .2s; }
.skin-blue .sidebar-menu > li:hover > a,
.skin-blue .sidebar-menu > li.active > a {
  color: #fff; background: linear-gradient(135deg, var(--primary), var(--accent)) !important; border-left: 0;
}
.skin-blue .sidebar-menu > li.header { background: transparent; color: #64748b; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.skin-blue .sidebar-menu .treeview-menu { background: transparent; }
.skin-blue .sidebar-menu .treeview-menu > li > a { color: #94a3b8; border-radius: 8px; margin: 0 10px; }
.skin-blue .sidebar-menu .treeview-menu > li > a:hover { color: #fff; background: rgba(255,255,255,.06); }

/* Cards */
.box, .info-box, .small-box {
  border: 0 !important;
  border-top: 0 !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow) !important;
  background: var(--card);
  overflow: hidden;
}
.box.box-info    { border-top: 4px solid var(--accent) !important; }
.box.box-success { border-top: 4px solid var(--success) !important; }
.box.box-primary { border-top: 4px solid var(--primary) !important; }
.box.box-warning { border-top: 4px solid var(--warning) !important; }
.box.box-danger  { border-top: 4px solid var(--danger) !important; }
.box-header { padding: 16px 20px; border-bottom: 1px solid var(--border); }
.box-header.with-border { border-bottom: 1px solid var(--border); }
.box-title { font-weight: 600; font-size: 17px; }
.box-body { padding: 20px; }
.box-footer { background: #f8fafc; border-top: 1px solid var(--border); border-radius: 0 0 var(--radius) var(--radius); padding: 14px 20px; }

/* Forms */
.form-control, .select2-container--default .select2-selection--single {
  border: 1px solid var(--border) !important;
  border-radius: 10px !important;
  height: 40px;
  box-shadow: none;
  transition: border-color .2s, box-shadow .2s;
}
textarea.form-control { height: auto; }
.form-control:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(79,70,229,.15) !important;
}
label { font-weight: 600; color: var(--text); font-size: 13px; }

/* Input groups (icono + campo) */
.input-group { display: flex !important; width: 100%; align-items: stretch; }
.input-group .form-control { float: none; flex: 1 1 auto; width: 1% !important; min-width: 0; margin: 0 !important; z-index: 1; }
.input-group-addon {
  display: flex; align-items: center; justify-content: center;
  width: auto; min-width: 42px; height: 40px; padding: 0 12px;
  background: #f1f5f9; color: var(--muted);
  border: 1px solid var(--border) !important;
}
.input-group-addon:first-child { border-radius: 10px 0 0 10px !important; border-right: 0 !important; }
.input-group-addon:last-child { border-radius: 0 10px 10px 0 !important; border-left: 0 !important; }
.input-group > .form-control:not(:first-child) { border-radius: 0 10px 10px 0 !important; }
.input-group > .form-control:not(:last-child) { border-radius: 10px 0 0 10px !important; }
.input-group > .form-control:first-child:last-child { border-radius: 10px !important; }
.input-group .select2-container { flex: 1 1 auto; width: 1% !important; }

/* Buttons */
.btn { border-radius: 10px !important; font-weight: 600; padding: 8px 16px; border: 0; box-shadow: 0 1px 2px rgba(15,23,42,.12); transition: transform .15s, box-shadow .15s, filter .15s; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 14px -4px rgba(15,23,42,.25); filter: brightness(1.06); }
.btn-default { background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn-primary, .btn-info, .bg-blue { background: linear-gradient(135deg, var(--primary), #6366f1) !important; color: #fff !important; }
.btn-success { background: linear-gradient(135deg, #059669, var(--success)); }
.btn-danger  { background: linear-gradient(135deg, #dc2626, var(--danger)); }
.btn-warning { background: linear-gradient(135deg, #d97706, var(--warning)); }

/* Grids / tables */
.table-responsive, .box-body[style*="overflow"] { border-radius: 12px; }
.table, table.table, .box-body table, .grid {
  border-collapse: separate !important;
  border-spacing: 0;
  border: 0 !important;
}
.box-body table th, .table > thead > tr > th {
  background: #f8fafc !important;
  color: var(--muted) !important;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 12px 14px !important;
  border: 0 !important;
  border-bottom: 2px solid var(--border) !important;
  position: sticky; top: 0; z-index: 1;
}
.box-body table th a { color: var(--muted) !important; }
.box-body table td, .table > tbody > tr > td {
  padding: 12px 14px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--border) !important;
  vertical-align: middle !important;
  background: transparent !important;
}
.box-body table tr:nth-child(even) td { background: #fafbfd !important; }
.box-body table tr:hover td { background: #eef2ff !important; }
.box-body table tr:last-child td { border-bottom: 0 !important; }
.box-body table table td, .box-body table table th { position: static; }

/* Pager */
.pagination > li > a, .pagination > li > span { border: 0; border-radius: 8px !important; margin: 0 2px; color: var(--primary); }
.pagination > .active > a, .pagination > .active > span { background: var(--primary) !important; color: #fff; }

/* Dashboard KPI cards */
.dash-row { margin-bottom: 4px; }
.kpi { display: flex; align-items: center; gap: 16px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 20px; transition: transform .2s, box-shadow .2s; }
.kpi:hover { transform: translateY(-3px); }
.kpi-icon { flex: 0 0 56px; height: 56px; border-radius: 16px; display: flex; align-items: center; justify-content: center; font-size: 24px; color: #fff; }
.kpi-body { display: flex; flex-direction: column; min-width: 0; }
.kpi-label { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.kpi-value { font-size: 26px; font-weight: 700; color: var(--text); line-height: 1.2; margin: 2px 0; white-space: nowrap; }
.kpi-sub, .kpi-sub a { color: var(--muted); font-size: 12px; }
.kpi-indigo .kpi-icon { background: linear-gradient(135deg,#4f46e5,#818cf8); }
.kpi-green  .kpi-icon { background: linear-gradient(135deg,#059669,#34d399); }
.kpi-cyan   .kpi-icon { background: linear-gradient(135deg,#0891b2,#22d3ee); }
.kpi-orange .kpi-icon { background: linear-gradient(135deg,#ea580c,#fb923c); }
.kpi-purple .kpi-icon { background: linear-gradient(135deg,#7c3aed,#c084fc); }
.kpi-red    .kpi-icon { background: linear-gradient(135deg,#dc2626,#f87171); }
.kpi-teal   .kpi-icon { background: linear-gradient(135deg,#0d9488,#5eead4); }

/* Misc */
.label, .badge { border-radius: 999px; padding: .35em .8em; font-weight: 600; }
.modal-content { border: 0; border-radius: var(--radius); box-shadow: var(--shadow); }
.alert { border: 0; border-radius: 12px; }
.main-footer { background: transparent; border-top: 1px solid var(--border); color: var(--muted); }
