/* ============================================================
   PERFEX CRM — MODERN UI OVERRIDE
   Design: 2026 — Glassmorphism / Neumorphism Lite / Fluid Motion
   ============================================================ */

/* ── DESIGN TOKENS ───────────────────────────────────────── */
:root {
  --pfx-radius:        10px;
  --pfx-radius-lg:     16px;
  --pfx-radius-xl:     24px;
  --pfx-shadow-sm:     0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --pfx-shadow-md:     0 4px 16px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.05);
  --pfx-shadow-lg:     0 8px 32px rgba(0,0,0,.10), 0 4px 12px rgba(0,0,0,.06);
  --pfx-shadow-btn:    0 2px 8px rgba(37,99,235,.30);
  --pfx-transition:    all .22s cubic-bezier(.4,0,.2,1);
  --pfx-transition-fast: all .14s cubic-bezier(.4,0,.2,1);
  --pfx-primary:       #2563eb;
  --pfx-primary-dark:  #1d4ed8;
  --pfx-primary-light: #3b82f6;
  --pfx-primary-glow:  rgba(37,99,235,.20);
  --pfx-sidebar-bg:    #f8fafc;
  --pfx-sidebar-width: 230px;
  --pfx-header-h:      57px;
}

/* ── GLOBAL BASE ─────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  background: #f1f5f9 !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── SCROLLBAR ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ══════════════════════════════════════════════════════════
   HEADER
   ══════════════════════════════════════════════════════════ */
#header {
  background: rgba(255,255,255,.95) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,.06) !important;
  box-shadow: 0 1px 0 rgba(0,0,0,.05), 0 2px 12px rgba(0,0,0,.04) !important;
  transition: var(--pfx-transition);
  height: var(--pfx-header-h) !important;
}

/* Hamburger button */
.hide-menu {
  transition: var(--pfx-transition) !important;
  border-radius: 8px !important;
}
.hide-menu:hover {
  background: rgba(37,99,235,.08) !important;
  color: var(--pfx-primary) !important;
  transform: scale(1.05);
}

/* Top search */
#top_search .form-control,
#search_input {
  border-radius: 10px !important;
  background: #f1f5f9 !important;
  border: 1.5px solid transparent !important;
  transition: var(--pfx-transition) !important;
  box-shadow: none !important;
}
#search_input:focus {
  background: #fff !important;
  border-color: var(--pfx-primary) !important;
  box-shadow: 0 0 0 3px var(--pfx-primary-glow) !important;
}

/* Nav right icons */
.navbar-nav > li > a {
  transition: var(--pfx-transition) !important;
  border-radius: 8px;
}
.navbar-nav > li > a:hover,
.navbar-nav > li > a:focus {
  color: var(--pfx-primary) !important;
  background: rgba(37,99,235,.06) !important;
}

/* Quick-create + button */
.tw-rounded-full.tw-bg-primary-600 {
  transition: var(--pfx-transition) !important;
  box-shadow: 0 2px 8px rgba(37,99,235,.25) !important;
}
.tw-rounded-full.tw-bg-primary-600:hover,
a:hover .tw-rounded-full.tw-bg-primary-600 {
  transform: scale(1.12) rotate(45deg) !important;
  box-shadow: 0 4px 16px rgba(37,99,235,.40) !important;
}

/* ══════════════════════════════════════════════════════════
   SIDEBAR
   ══════════════════════════════════════════════════════════ */
#menu.sidebar {
  background: #fff !important;
  border-right: 1px solid #e2e8f0 !important;
  box-shadow: 2px 0 16px rgba(0,0,0,.04) !important;
}

/* User profile card */
.sidebar-user-profile > a {
  transition: var(--pfx-transition) !important;
  border-radius: var(--pfx-radius) !important;
}
.sidebar-user-profile > a:hover {
  box-shadow: var(--pfx-shadow-md) !important;
  border-color: rgba(37,99,235,.25) !important;
  transform: translateY(-1px);
}

/* Menu items */
.sidebar ul.nav li a {
  border-radius: var(--pfx-radius) !important;
  transition: var(--pfx-transition) !important;
  padding: 7px 13px !important;
  margin: 1px 0 !important;
  font-weight: 500 !important;
  letter-spacing: -.01em;
  position: relative;
  overflow: hidden;
}

/* Ripple container for sidebar items */
.sidebar ul.nav li a::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(37,99,235,.06), rgba(37,99,235,.02));
  border-radius: var(--pfx-radius);
  opacity: 0;
  transition: opacity .2s ease;
}
.sidebar ul.nav li a:hover::before {
  opacity: 1;
}

/* Active/hover state */
.sidebar > ul.nav > li:hover a:first-child,
.sidebar > ul.nav > li.active a:first-child {
  background: linear-gradient(135deg, #eff6ff, #f0f9ff) !important;
  border: 1px solid rgba(37,99,235,.18) !important;
  box-shadow: 0 1px 4px rgba(37,99,235,.10) !important;
  color: var(--pfx-primary) !important;
}

.sidebar ul.nav li.active > a,
.sidebar ul.nav > li > a:hover,
.sidebar ul.nav > li > a:hover .menu-icon {
  color: var(--pfx-primary) !important;
}

/* Active left border accent */
.sidebar > ul.nav > li.active {
  border-left-color: var(--pfx-primary) !important;
}
[dir="rtl"] .sidebar > ul.nav > li.active {
  border-right-color: var(--pfx-primary) !important;
}

/* Menu icons */
.sidebar ul.nav li a i.menu-icon {
  transition: var(--pfx-transition) !important;
}
.sidebar ul.nav > li:hover a i.menu-icon,
.sidebar ul.nav > li.active a i.menu-icon {
  color: var(--pfx-primary) !important;
  transform: scale(1.1);
}

/* Submenu */
.sidebar ul.nav li .nav-second-level li a {
  border-radius: 8px !important;
  transition: var(--pfx-transition) !important;
  margin: 1px 0 !important;
  padding: 5px 15px 5px 46px !important;
}
.sidebar ul.nav > li .nav-second-level > li:not(.active) > a:hover {
  color: var(--pfx-primary) !important;
  background: rgba(37,99,235,.05) !important;
  padding-left: 50px !important;
}
.sidebar ul.nav li .nav-second-level li.active a {
  color: var(--pfx-primary) !important;
}

/* ══════════════════════════════════════════════════════════
   BUTTONS — Core
   ══════════════════════════════════════════════════════════ */

/* Base button reset */
.btn {
  position: relative;
  overflow: hidden;
  border-radius: var(--pfx-radius) !important;
  font-weight: 500 !important;
  letter-spacing: -.01em;
  transition: var(--pfx-transition) !important;
  -webkit-tap-highlight-color: transparent;
  outline: none !important;
  cursor: pointer;
  display: inline-flex !important;
  align-items: center;
  gap: 5px;
}

/* Ripple effect on all buttons */
.btn::after {
  content: '';
  position: absolute;
  inset: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.35);
  opacity: 0;
  transition: none;
  pointer-events: none;
}
.btn:active::after {
  inset: -50%;
  width: 200%;
  height: 200%;
  opacity: 1;
  transition: width .4s ease, height .4s ease, inset .4s ease, opacity .6s ease;
}

/* Primary button */
.btn-primary {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  border-color: #1d4ed8 !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(37,99,235,.30), 0 1px 2px rgba(37,99,235,.20) !important;
}
.btn-primary:hover,
.btn-primary:focus {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
  border-color: #2563eb !important;
  box-shadow: 0 4px 16px rgba(37,99,235,.40), 0 2px 6px rgba(37,99,235,.25) !important;
  transform: translateY(-1px) !important;
  color: #fff !important;
}
.btn-primary:active {
  transform: translateY(0) scale(.98) !important;
  box-shadow: 0 1px 4px rgba(37,99,235,.25) !important;
}

/* Shimmer sweep on primary */
.btn-primary::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.22), transparent);
  transition: none;
  pointer-events: none;
}
.btn-primary:hover::before {
  left: 150%;
  transition: left .55s ease;
}

/* Default / secondary button */
.btn-default {
  background: #fff !important;
  border: 1.5px solid #e2e8f0 !important;
  color: #374151 !important;
  box-shadow: var(--pfx-shadow-sm) !important;
}
.btn-default:hover,
.btn-default:focus {
  background: #f8fafc !important;
  border-color: #94a3b8 !important;
  color: #111827 !important;
  box-shadow: var(--pfx-shadow-md) !important;
  transform: translateY(-1px) !important;
}
.btn-default:active {
  transform: translateY(0) scale(.98) !important;
  box-shadow: var(--pfx-shadow-sm) !important;
}

/* Success button */
.btn-success {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 100%) !important;
  border-color: #15803d !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(22,163,74,.30) !important;
}
.btn-success:hover,
.btn-success:focus {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important;
  box-shadow: 0 4px 16px rgba(22,163,74,.38) !important;
  transform: translateY(-1px) !important;
  color: #fff !important;
}
.btn-success:active { transform: translateY(0) scale(.98) !important; }

/* Danger button */
.btn-danger {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%) !important;
  border-color: #b91c1c !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(220,38,38,.28) !important;
}
.btn-danger:hover,
.btn-danger:focus {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
  box-shadow: 0 4px 16px rgba(220,38,38,.38) !important;
  transform: translateY(-1px) !important;
  color: #fff !important;
}
.btn-danger:active { transform: translateY(0) scale(.98) !important; }

/* Warning button */
.btn-warning {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%) !important;
  border-color: #b45309 !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(217,119,6,.28) !important;
}
.btn-warning:hover,
.btn-warning:focus {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%) !important;
  box-shadow: 0 4px 16px rgba(217,119,6,.38) !important;
  transform: translateY(-1px) !important;
  color: #fff !important;
}
.btn-warning:active { transform: translateY(0) scale(.98) !important; }

/* Info button */
.btn-info {
  background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%) !important;
  border-color: #0e7490 !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(8,145,178,.28) !important;
}
.btn-info:hover,
.btn-info:focus {
  background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%) !important;
  box-shadow: 0 4px 16px rgba(8,145,178,.38) !important;
  transform: translateY(-1px) !important;
  color: #fff !important;
}
.btn-info:active { transform: translateY(0) scale(.98) !important; }

/* Link button */
.btn-link {
  transition: var(--pfx-transition) !important;
}
.btn-link:hover {
  text-decoration: none !important;
  opacity: .75;
}

/* Block button (login) */
.btn-block {
  display: flex !important;
  width: 100%;
  justify-content: center;
}

/* ── Icon-only / small buttons ───────────────────────────── */
.btn-xs, .btn-sm {
  border-radius: 8px !important;
}
.btn-icon {
  border-radius: 8px !important;
  padding: 5px 9px !important;
  transition: var(--pfx-transition) !important;
}
.btn-icon:hover {
  transform: scale(1.08) !important;
}

/* ── Bootstrap-select / dropdown-toggle ──────────────────── */
.bootstrap-select .btn,
.bootstrap-select .dropdown-toggle {
  border-radius: var(--pfx-radius) !important;
  border: 1.5px solid #e2e8f0 !important;
  background: #fff !important;
  transition: var(--pfx-transition) !important;
  box-shadow: var(--pfx-shadow-sm) !important;
}
.bootstrap-select .btn:hover,
.bootstrap-select .dropdown-toggle:hover {
  border-color: var(--pfx-primary) !important;
  box-shadow: 0 0 0 3px var(--pfx-primary-glow) !important;
}

/* ══════════════════════════════════════════════════════════
   PANELS / CARDS
   ══════════════════════════════════════════════════════════ */
.panel,
.panel_s {
  border-radius: var(--pfx-radius-lg) !important;
  border: 1px solid #e8edf2 !important;
  box-shadow: var(--pfx-shadow-sm) !important;
  transition: box-shadow .25s ease, transform .25s ease !important;
  overflow: hidden;
}
.panel:hover,
.panel_s:hover {
  box-shadow: var(--pfx-shadow-md) !important;
}

.panel-heading {
  border-radius: var(--pfx-radius-lg) var(--pfx-radius-lg) 0 0 !important;
  background: #fff !important;
  border-bottom: 1px solid #f1f5f9 !important;
  padding: 14px 18px !important;
}

.panel-title {
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #0f172a !important;
  letter-spacing: -.02em;
}

.panel-body {
  background: #fff !important;
  border-radius: 0 0 var(--pfx-radius-lg) var(--pfx-radius-lg) !important;
}

/* Top stats cards */
.top_stats_wrapper .panel,
.home-stats .panel {
  border-radius: var(--pfx-radius-lg) !important;
  transition: var(--pfx-transition) !important;
}
.top_stats_wrapper .panel:hover,
.home-stats .panel:hover {
  transform: translateY(-3px) !important;
  box-shadow: var(--pfx-shadow-lg) !important;
}

/* ══════════════════════════════════════════════════════════
   FORMS
   ══════════════════════════════════════════════════════════ */
.form-control {
  border-radius: var(--pfx-radius) !important;
  border: 1.5px solid #e2e8f0 !important;
  background: #fafbfc !important;
  color: #111827 !important;
  transition: var(--pfx-transition) !important;
  padding: 8px 12px !important;
  font-size: 14px !important;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.04) !important;
  height: 38px !important;
}
.form-control:hover {
  border-color: #94a3b8 !important;
  background: #fff !important;
}
.form-control:focus {
  border-color: var(--pfx-primary) !important;
  background: #fff !important;
  box-shadow: 0 0 0 3px var(--pfx-primary-glow), inset 0 1px 2px rgba(0,0,0,.02) !important;
  outline: none !important;
}
textarea.form-control {
  height: auto !important;
  resize: vertical;
  min-height: 80px;
}
select.form-control {
  height: 38px !important;
  cursor: pointer;
}

.control-label {
  font-weight: 500 !important;
  color: #374151 !important;
  font-size: 13px !important;
  letter-spacing: -.01em;
}

.form-group {
  margin-bottom: 16px !important;
}

/* Input groups */
.input-group-addon {
  border-radius: var(--pfx-radius) !important;
  border: 1.5px solid #e2e8f0 !important;
  background: #f8fafc !important;
  color: #6b7280 !important;
  transition: var(--pfx-transition) !important;
}
.input-group .form-control:first-child {
  border-radius: var(--pfx-radius) 0 0 var(--pfx-radius) !important;
}
.input-group .form-control:last-child {
  border-radius: 0 var(--pfx-radius) var(--pfx-radius) 0 !important;
}
.input-group-addon:first-child {
  border-radius: var(--pfx-radius) 0 0 var(--pfx-radius) !important;
}
.input-group-addon:last-child {
  border-radius: 0 var(--pfx-radius) var(--pfx-radius) 0 !important;
}

/* Checkboxes */
.checkbox input[type="checkbox"],
.radio input[type="radio"] {
  accent-color: var(--pfx-primary);
}

/* ══════════════════════════════════════════════════════════
   TABLES
   ══════════════════════════════════════════════════════════ */
.table {
  border-collapse: separate !important;
  border-spacing: 0 !important;
}
.table thead tr th {
  background: #f8fafc !important;
  border-bottom: 2px solid #e2e8f0 !important;
  color: #374151 !important;
  font-weight: 600 !important;
  font-size: 12px !important;
  text-transform: uppercase !important;
  letter-spacing: .04em !important;
  padding: 10px 14px !important;
  white-space: nowrap;
}
.table tbody tr td {
  border-bottom: 1px solid #f1f5f9 !important;
  padding: 10px 14px !important;
  vertical-align: middle !important;
  transition: background .15s ease !important;
  font-size: 13.5px !important;
}
.table tbody tr:hover td {
  background: #f0f7ff !important;
}
.table tbody tr:last-child td {
  border-bottom: none !important;
}

/* Striped */
.table-striped > tbody > tr:nth-of-type(even) > td {
  background-color: #fafbfc !important;
}
.table-striped > tbody > tr:nth-of-type(even):hover > td {
  background-color: #f0f7ff !important;
}

/* DataTables wrapper */
.dataTables_wrapper {
  background: #fff;
  border-radius: var(--pfx-radius-lg);
  overflow: hidden;
  box-shadow: var(--pfx-shadow-sm);
  border: 1px solid #e8edf2;
}
.dataTables_wrapper .dataTables_filter input {
  border-radius: 8px !important;
  border: 1.5px solid #e2e8f0 !important;
  padding: 6px 10px !important;
  transition: var(--pfx-transition) !important;
}
.dataTables_wrapper .dataTables_filter input:focus {
  border-color: var(--pfx-primary) !important;
  box-shadow: 0 0 0 3px var(--pfx-primary-glow) !important;
  outline: none !important;
}

/* ══════════════════════════════════════════════════════════
   DROPDOWNS
   ══════════════════════════════════════════════════════════ */
.dropdown-menu {
  border-radius: var(--pfx-radius-lg) !important;
  border: 1px solid rgba(0,0,0,.08) !important;
  box-shadow: 0 8px 32px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.06) !important;
  padding: 6px !important;
  animation: pfx-dropdown-in .18s cubic-bezier(.4,0,.2,1) !important;
  transform-origin: top center;
  background: #fff !important;
}
@keyframes pfx-dropdown-in {
  from { opacity: 0; transform: scale(.96) translateY(-6px); }
  to   { opacity: 1; transform: scale(1)  translateY(0); }
}

.dropdown-menu > li > a {
  border-radius: 8px !important;
  padding: 7px 12px !important;
  color: #374151 !important;
  font-size: 13.5px !important;
  transition: background .14s ease, color .14s ease !important;
}
.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:focus {
  background: #eff6ff !important;
  color: var(--pfx-primary) !important;
}
.dropdown-menu > li.active > a,
.dropdown-menu > li.active > a:hover {
  background: var(--pfx-primary) !important;
  color: #fff !important;
}

.dropdown-header {
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: .06em !important;
  text-transform: uppercase !important;
  color: #94a3b8 !important;
  padding: 8px 12px 4px !important;
}

/* ══════════════════════════════════════════════════════════
   BADGES & LABELS
   ══════════════════════════════════════════════════════════ */
.badge,
.label {
  border-radius: 99px !important;
  font-weight: 600 !important;
  font-size: 11px !important;
  letter-spacing: .02em;
  padding: 3px 8px !important;
}
.bg-success, .label-success { background: #dcfce7 !important; color: #16a34a !important; }
.bg-danger,  .label-danger  { background: #fee2e2 !important; color: #dc2626 !important; }
.bg-warning, .label-warning { background: #fef3c7 !important; color: #d97706 !important; }
.bg-info,    .label-info    { background: #e0f2fe !important; color: #0891b2 !important; }
.bg-primary, .label-primary { background: #dbeafe !important; color: var(--pfx-primary) !important; }

/* ══════════════════════════════════════════════════════════
   ALERTS
   ══════════════════════════════════════════════════════════ */
.alert {
  border-radius: var(--pfx-radius) !important;
  border-left-width: 4px !important;
  font-weight: 500 !important;
  font-size: 13.5px !important;
  padding: 12px 16px !important;
  animation: pfx-alert-in .25s ease !important;
}
@keyframes pfx-alert-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.alert-success {
  background: #f0fdf4 !important; border-color: #16a34a !important; color: #15803d !important;
}
.alert-danger {
  background: #fff1f2 !important; border-color: #dc2626 !important; color: #b91c1c !important;
}
.alert-warning {
  background: #fffbeb !important; border-color: #d97706 !important; color: #b45309 !important;
}
.alert-info {
  background: #f0f9ff !important; border-color: #0891b2 !important; color: #0e7490 !important;
}

/* ══════════════════════════════════════════════════════════
   MODALS
   ══════════════════════════════════════════════════════════ */
.modal-content {
  border-radius: var(--pfx-radius-xl) !important;
  border: none !important;
  box-shadow: 0 24px 64px rgba(0,0,0,.18), 0 8px 24px rgba(0,0,0,.10) !important;
  overflow: hidden;
}
.modal-header {
  border-bottom: 1px solid #f1f5f9 !important;
  padding: 18px 22px !important;
  background: #fff !important;
}
.modal-title {
  font-weight: 700 !important;
  font-size: 15px !important;
  color: #0f172a !important;
  letter-spacing: -.02em;
}
.modal-footer {
  border-top: 1px solid #f1f5f9 !important;
  padding: 14px 22px !important;
  background: #fafbfc !important;
  border-radius: 0 0 var(--pfx-radius-xl) var(--pfx-radius-xl) !important;
}
.modal-body { padding: 20px 22px !important; }

.modal.fade .modal-dialog {
  transition: transform .25s cubic-bezier(.4,0,.2,1), opacity .25s ease !important;
  transform: scale(.96) translateY(-12px) !important;
}
.modal.in .modal-dialog {
  transform: scale(1) translateY(0) !important;
}

/* ══════════════════════════════════════════════════════════
   PROGRESS BARS
   ══════════════════════════════════════════════════════════ */
.progress {
  border-radius: 99px !important;
  background: #e2e8f0 !important;
  height: 8px !important;
  box-shadow: none !important;
  overflow: hidden;
}
.progress-bar {
  border-radius: 99px !important;
  background: linear-gradient(90deg, var(--pfx-primary-light), var(--pfx-primary)) !important;
  box-shadow: none !important;
  transition: width .6s cubic-bezier(.4,0,.2,1) !important;
  position: relative;
  overflow: hidden;
}
.progress-bar::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.3), transparent);
  animation: pfx-bar-shimmer 2s infinite;
}
@keyframes pfx-bar-shimmer {
  0%   { left: -100%; }
  100% { left: 200%; }
}
.progress-bar-success {
  background: linear-gradient(90deg, #4ade80, #16a34a) !important;
}
.progress-bar-warning {
  background: linear-gradient(90deg, #fbbf24, #d97706) !important;
}
.progress-bar-danger {
  background: linear-gradient(90deg, #f87171, #dc2626) !important;
}

/* ══════════════════════════════════════════════════════════
   TABS
   ══════════════════════════════════════════════════════════ */
.nav-tabs {
  border-bottom: 2px solid #e2e8f0 !important;
  gap: 2px;
}
.nav-tabs > li > a {
  border-radius: 8px 8px 0 0 !important;
  border: none !important;
  color: #6b7280 !important;
  font-weight: 500 !important;
  padding: 9px 16px !important;
  transition: var(--pfx-transition) !important;
  background: transparent !important;
  font-size: 13.5px !important;
}
.nav-tabs > li > a:hover {
  color: var(--pfx-primary) !important;
  background: #f0f7ff !important;
}
.nav-tabs > li.active > a,
.nav-tabs > li.active > a:hover,
.nav-tabs > li.active > a:focus {
  color: var(--pfx-primary) !important;
  font-weight: 600 !important;
  background: #fff !important;
  border-bottom: 2px solid var(--pfx-primary) !important;
  margin-bottom: -2px !important;
}

/* ══════════════════════════════════════════════════════════
   PAGINATION
   ══════════════════════════════════════════════════════════ */
.pagination > li > a,
.pagination > li > span {
  border-radius: 8px !important;
  margin: 0 2px !important;
  border: 1.5px solid #e2e8f0 !important;
  color: #374151 !important;
  font-weight: 500 !important;
  transition: var(--pfx-transition) !important;
  padding: 6px 12px !important;
  min-width: 36px;
  text-align: center;
}
.pagination > li > a:hover {
  background: #eff6ff !important;
  border-color: var(--pfx-primary) !important;
  color: var(--pfx-primary) !important;
  transform: translateY(-1px);
}
.pagination > .active > a,
.pagination > .active > span,
.pagination > .active > a:hover,
.pagination > .active > span:hover {
  background: var(--pfx-primary) !important;
  border-color: var(--pfx-primary) !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(37,99,235,.30) !important;
}

/* ══════════════════════════════════════════════════════════
   TOOLTIPS
   ══════════════════════════════════════════════════════════ */
.tooltip-inner {
  border-radius: 8px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  padding: 5px 10px !important;
  background: #0f172a !important;
}

/* ══════════════════════════════════════════════════════════
   CONTENT WRAPPER
   ══════════════════════════════════════════════════════════ */
.content {
  padding: 24px 28px !important;
}
#page-wrapper,
#wrapper {
  background: #f1f5f9 !important;
}

/* Page heading */
.row-xs-overview h4.tw-font-semibold,
.tw-text-2xl,
h3 + .btn,
h3 { letter-spacing: -.02em; }

/* ══════════════════════════════════════════════════════════
   POPOVER
   ══════════════════════════════════════════════════════════ */
.popover {
  border-radius: var(--pfx-radius-lg) !important;
  border: 1px solid rgba(0,0,0,.08) !important;
  box-shadow: var(--pfx-shadow-lg) !important;
}
.popover-title {
  border-radius: var(--pfx-radius-lg) var(--pfx-radius-lg) 0 0 !important;
  font-weight: 600 !important;
  background: #f8fafc !important;
}

/* ══════════════════════════════════════════════════════════
   KANBAN
   ══════════════════════════════════════════════════════════ */
.kan-ban-col {
  border-radius: var(--pfx-radius-lg) !important;
  border: 1px solid #e2e8f0 !important;
  background: #f8fafc !important;
  box-shadow: var(--pfx-shadow-sm) !important;
}
.kan-ban-col .kan-ban-item {
  border-radius: var(--pfx-radius) !important;
  box-shadow: var(--pfx-shadow-sm) !important;
  transition: var(--pfx-transition) !important;
  border: 1px solid #e8edf2 !important;
}
.kan-ban-col .kan-ban-item:hover {
  transform: translateY(-2px) !important;
  box-shadow: var(--pfx-shadow-md) !important;
}

/* ══════════════════════════════════════════════════════════
   NOTIFICATIONS DROPDOWN
   ══════════════════════════════════════════════════════════ */
.navbar-nav > li > .dropdown-menu.notifications {
  border-radius: var(--pfx-radius-lg) !important;
  box-shadow: var(--pfx-shadow-lg) !important;
}

/* ══════════════════════════════════════════════════════════
   SECTION HEADINGS
   ══════════════════════════════════════════════════════════ */
h3, .h3 {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  letter-spacing: -.02em;
}
h4, .h4 {
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #1e293b !important;
}

/* ══════════════════════════════════════════════════════════
   DARK MODE OVERRIDES
   ══════════════════════════════════════════════════════════ */
html[data-theme="dark"] #header {
  background: rgba(15,23,42,.92) !important;
  border-bottom-color: rgba(255,255,255,.06) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,.04), 0 2px 12px rgba(0,0,0,.30) !important;
}

html[data-theme="dark"] #menu.sidebar {
  background: #1e293b !important;
  border-right-color: rgba(255,255,255,.06) !important;
}

html[data-theme="dark"] .sidebar > ul.nav > li:hover a:first-child,
html[data-theme="dark"] .sidebar > ul.nav > li.active a:first-child {
  background: linear-gradient(135deg, rgba(37,99,235,.20), rgba(37,99,235,.10)) !important;
  border-color: rgba(37,99,235,.35) !important;
  color: #93c5fd !important;
}

html[data-theme="dark"] .panel,
html[data-theme="dark"] .panel_s {
  background: #1e293b !important;
  border-color: rgba(255,255,255,.06) !important;
}

html[data-theme="dark"] .panel-heading,
html[data-theme="dark"] .panel-body {
  background: #1e293b !important;
}

html[data-theme="dark"] .form-control {
  background: #0f172a !important;
  border-color: rgba(255,255,255,.10) !important;
  color: #e2e8f0 !important;
}
html[data-theme="dark"] .form-control:focus {
  background: #0f172a !important;
  border-color: var(--pfx-primary) !important;
}

html[data-theme="dark"] .btn-default {
  background: #1e293b !important;
  border-color: rgba(255,255,255,.12) !important;
  color: #e2e8f0 !important;
}
html[data-theme="dark"] .btn-default:hover {
  background: #334155 !important;
  border-color: rgba(255,255,255,.20) !important;
}

html[data-theme="dark"] .dropdown-menu {
  background: #1e293b !important;
  border-color: rgba(255,255,255,.08) !important;
}
html[data-theme="dark"] .dropdown-menu > li > a {
  color: #cbd5e1 !important;
}
html[data-theme="dark"] .dropdown-menu > li > a:hover {
  background: rgba(37,99,235,.15) !important;
  color: #93c5fd !important;
}

html[data-theme="dark"] .table thead tr th {
  background: #0f172a !important;
  border-bottom-color: rgba(255,255,255,.08) !important;
  color: #94a3b8 !important;
}
html[data-theme="dark"] .table tbody tr td {
  border-bottom-color: rgba(255,255,255,.05) !important;
  color: #cbd5e1 !important;
}
html[data-theme="dark"] .table tbody tr:hover td {
  background: rgba(37,99,235,.08) !important;
}

html[data-theme="dark"] #search_input {
  background: #0f172a !important;
  color: #e2e8f0 !important;
}

html[data-theme="dark"] .dataTables_wrapper {
  background: #1e293b !important;
  border-color: rgba(255,255,255,.06) !important;
}

html[data-theme="dark"] .modal-content {
  background: #1e293b !important;
}
html[data-theme="dark"] .modal-header,
html[data-theme="dark"] .modal-footer {
  background: #0f172a !important;
  border-color: rgba(255,255,255,.06) !important;
}

html[data-theme="dark"] .nav-tabs {
  border-bottom-color: rgba(255,255,255,.08) !important;
}
html[data-theme="dark"] .nav-tabs > li > a {
  color: #94a3b8 !important;
}
html[data-theme="dark"] .nav-tabs > li.active > a {
  background: #1e293b !important;
  color: #93c5fd !important;
  border-bottom-color: #3b82f6 !important;
}

/* ══════════════════════════════════════════════════════════
   LOGIN PAGE MODERNIZATION
   ══════════════════════════════════════════════════════════ */
body.login_admin {
  background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 40%, #f5f3ff 100%) !important;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.login_admin::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 30%, rgba(37,99,235,.12) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 70%, rgba(139,92,246,.10) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.authentication-form-wrapper {
  animation: pfx-login-appear .45s cubic-bezier(.4,0,.2,1) !important;
}
@keyframes pfx-login-appear {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.authentication-form-wrapper .tw-bg-white {
  border-radius: var(--pfx-radius-xl) !important;
  box-shadow: 0 20px 60px rgba(0,0,0,.10), 0 4px 16px rgba(0,0,0,.06) !important;
  border: 1px solid rgba(255,255,255,.8) !important;
  backdrop-filter: blur(8px) !important;
}

.authentication-form-wrapper .company-logo {
  margin-bottom: 20px;
  animation: pfx-logo-drop .5s cubic-bezier(.34,1.56,.64,1) !important;
}
@keyframes pfx-logo-drop {
  from { opacity: 0; transform: scale(.8) translateY(-10px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* ══════════════════════════════════════════════════════════
   MISC MICRO-INTERACTIONS
   ══════════════════════════════════════════════════════════ */

/* Sortable table headers */
table.dataTable thead th {
  cursor: pointer;
  transition: background .15s ease !important;
}
table.dataTable thead th:hover {
  background: #f0f7ff !important;
}

/* Action links in table rows */
table tbody .row-options a {
  padding: 2px 6px;
  border-radius: 5px;
  transition: background .14s, color .14s !important;
}
table tbody .row-options a:hover {
  background: #eff6ff;
  color: var(--pfx-primary) !important;
}

/* Close button modernize */
.close {
  opacity: .5 !important;
  transition: opacity .15s, transform .15s !important;
}
.close:hover {
  opacity: 1 !important;
  transform: rotate(90deg) scale(1.1) !important;
}

/* Smooth links globally */
a {
  transition: color .15s ease !important;
}

/* Breadcrumb */
.breadcrumb {
  border-radius: var(--pfx-radius) !important;
  background: transparent !important;
  padding: 4px 0 !important;
  font-size: 13px !important;
}

/* Well component */
.well {
  border-radius: var(--pfx-radius-lg) !important;
  border-color: #e2e8f0 !important;
  box-shadow: var(--pfx-shadow-sm) !important;
  background: #fafbfc !important;
}

/* List groups */
.list-group-item {
  border-color: #f1f5f9 !important;
  transition: background .15s, transform .15s !important;
}
.list-group-item:first-child { border-radius: var(--pfx-radius) var(--pfx-radius) 0 0 !important; }
.list-group-item:last-child  { border-radius: 0 0 var(--pfx-radius) var(--pfx-radius) !important; }
.list-group-item:hover {
  background: #f8fafc !important;
}

/* ══════════════════════════════════════════════════════════
   BOTTOM TOOLBAR BUTTONS
   ══════════════════════════════════════════════════════════ */
.btn-bottom-toolbar {
  border-radius: 0 0 var(--pfx-radius-lg) var(--pfx-radius-lg) !important;
  background: #fafbfc !important;
  border-top: 1px solid #f1f5f9 !important;
}

/* ══════════════════════════════════════════════════════════
   DRAG & DROP / DROPZONE
   ══════════════════════════════════════════════════════════ */
.dropzone {
  border-radius: var(--pfx-radius-lg) !important;
  border: 2px dashed #cbd5e1 !important;
  background: #fafbfc !important;
  transition: border-color .2s, background .2s !important;
}
.dropzone:hover,
.dropzone.dz-drag-hover {
  border-color: var(--pfx-primary) !important;
  background: #eff6ff !important;
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE ADJUSTMENTS
   ══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .content { padding: 16px !important; }
  .panel, .panel_s {
    border-radius: 12px !important;
  }
  .modal-content {
    border-radius: 16px !important;
  }
  body.login_admin .authentication-form-wrapper {
    padding-top: 40px !important;
  }
}
