/* ========================================
   IL PRINCIPE BARBERIA — DESIGN SYSTEM v2
   Dark Sidebar · Gold Accent · Premium UI
   ======================================== */

:root {
  /* Brand Colors */
  --gold:        #C5A059;
  --gold-light:  #D9BC82;
  --gold-dark:   #A8883A;
  --gold-bg:     rgba(197,160,89,.12);
  --gold-border: rgba(197,160,89,.25);

  /* Sidebar */
  --sidebar-bg:       #0F0F0F;
  --sidebar-bg2:      #161616;
  --sidebar-border:   rgba(255,255,255,.06);
  --sidebar-text:     rgba(255,255,255,.65);
  --sidebar-text-dim: rgba(255,255,255,.30);
  --sidebar-hover:    rgba(197,160,89,.10);
  --sidebar-active:   rgba(197,160,89,.18);
  --sidebar-width:    265px;

  /* Content */
  --bg-body:    #F5F6FA;
  --bg-card:    #FFFFFF;
  --text-main:  #1A1A2E;
  --text-muted: #6B7280;
  --border:     #E8EBF0;

  /* Status */
  --green:  #10B981;
  --red:    #EF4444;
  --yellow: #F59E0B;
  --blue:   #3B82F6;

  /* Radius / Shadow */
  --radius:    12px;
  --radius-sm: 8px;
  --shadow:    0 1px 4px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.04);
  --shadow-md: 0 4px 24px rgba(0,0,0,.10);
}

/* ══════════════════════════════════════════
   GLOBAL BASE
   ══════════════════════════════════════════ */
body { background: var(--bg-body) !important; font-family: 'Inter', 'Segoe UI', system-ui, sans-serif !important; }

/* ══════════════════════════════════════════
   SIDEBAR — dark premium
   ══════════════════════════════════════════ */
.pc-sidebar {
  background: var(--sidebar-bg) !important;
  border-right: 1px solid var(--sidebar-border) !important;
  width: var(--sidebar-width) !important;
  box-shadow: 4px 0 24px rgba(0,0,0,.25) !important;
}
.pc-sidebar .navbar-wrapper {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
}

/* — Logo header — */
.pc-sidebar .m-header {
  background: var(--sidebar-bg2) !important;
  border-bottom: 1px solid var(--sidebar-border) !important;
  padding: 0 !important;
  min-height: 70px !important;
  display: flex !important;
  align-items: center !important;
}
.pc-sidebar .m-header .b-brand {
  display: flex !important;
  align-items: center !important;
  padding: 0 20px !important;
  width: 100% !important;
  text-decoration: none !important;
}
.prin-logo-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}
.prin-logo-icon { flex-shrink: 0; }
.prin-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.prin-logo-main {
  font-size: 15px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.prin-logo-sub {
  font-size: 10px;
  font-weight: 500;
  color: var(--sidebar-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

/* — Scrollable nav area — */
.pc-sidebar .navbar-content {
  flex: 1 1 auto !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 8px 0 !important;
}
.pc-sidebar .navbar-content::-webkit-scrollbar { width: 4px; }
.pc-sidebar .navbar-content::-webkit-scrollbar-track { background: transparent; }
.pc-sidebar .navbar-content::-webkit-scrollbar-thumb { background: var(--sidebar-border); border-radius: 4px; }

/* — Section captions — */
.pc-sidebar .pc-navbar .pc-item.pc-caption {
  padding: 20px 20px 6px !important;
  pointer-events: none !important;
}
.pc-sidebar .pc-navbar .pc-item.pc-caption > label {
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: 1.5px !important;
  color: var(--sidebar-text-dim) !important;
  text-transform: uppercase !important;
  margin: 0 !important;
}

/* — Nav items — */
.pc-sidebar .pc-navbar { list-style: none; margin: 0; padding: 0 10px; }
.pc-sidebar .pc-navbar .pc-item { margin: 1px 0; }
.pc-sidebar .pc-link {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 10px 12px !important;
  border-radius: 8px !important;
  color: var(--sidebar-text) !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  text-decoration: none !important;
  transition: background .15s, color .15s !important;
  position: relative !important;
}
.pc-sidebar .pc-link:hover {
  background: var(--sidebar-hover) !important;
  color: var(--gold-light) !important;
}
.pc-sidebar .pc-item.active > .pc-link {
  background: var(--sidebar-active) !important;
  color: var(--gold) !important;
  font-weight: 600 !important;
}
.pc-sidebar .pc-item.active > .pc-link::before {
  content: '';
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 3px;
  background: var(--gold);
  border-radius: 0 3px 3px 0;
}
.pc-sidebar .pc-micon {
  width: 20px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}
.pc-sidebar .pc-micon i.material-icons-two-tone {
  font-size: 19px !important;
  color: var(--sidebar-text-dim) !important;
  transition: color .15s !important;
  background: none !important;
  -webkit-background-clip: unset !important;
  background-clip: unset !important;
  -webkit-text-fill-color: unset !important;
}
.pc-sidebar .pc-link:hover .pc-micon i,
.pc-sidebar .pc-item.active > .pc-link .pc-micon i {
  color: var(--gold) !important;
}
.pc-sidebar .pc-mtext { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* — Badge — */
.pc-badge {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}
.pc-badge:not(:empty) { display: flex !important; }

/* — Sidebar footer — */
.prin-nav-footer {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  padding: 14px 16px !important;
  border-top: 1px solid var(--sidebar-border) !important;
  background: var(--sidebar-bg2) !important;
  flex-shrink: 0 !important;
}
.prin-nav-footer-info { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.prin-nav-footer-avatar i {
  font-size: 32px !important;
  color: var(--gold) !important;
  background: none !important;
  -webkit-text-fill-color: unset !important;
}
.prin-nav-footer-detail { display: flex; flex-direction: column; min-width: 0; }
.prin-nav-footer-name {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255,255,255,.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.prin-nav-footer-role { font-size: 11px; color: var(--sidebar-text-dim); }
.prin-nav-footer-logout {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  color: var(--sidebar-text-dim) !important;
  transition: background .15s, color .15s;
  flex-shrink: 0;
}
.prin-nav-footer-logout:hover { background: rgba(239,68,68,.15); color: var(--red) !important; }
.prin-nav-footer-logout i {
  font-size: 18px !important;
  background: none !important;
  -webkit-text-fill-color: unset !important;
}

/* — Hide mobile duplicate logo — */
.pc-mob-header .pcm-logo { display: none !important; }

/* ══════════════════════════════════════════
   TOP HEADER
   ══════════════════════════════════════════ */
.pc-header:not(.pc-mob-header) {
  background: var(--bg-card) !important;
  border-bottom: 1px solid var(--border) !important;
  box-shadow: 0 1px 0 var(--border) !important;
  height: 64px !important;
}
.pc-header .header-wrapper { height: 64px !important; padding: 0 24px !important; }
.user-avtar {
  width: 36px !important; height: 36px !important;
  border-radius: 50% !important;
  border: 2px solid var(--gold-border) !important;
  object-fit: cover !important;
}
.user-name { font-weight: 600 !important; font-size: 14px !important; color: var(--text-main) !important; }
.user-desc { font-size: 11px !important; color: var(--text-muted) !important; }

/* ══════════════════════════════════════════
   PAGE HEADER + BREADCRUMB
   ══════════════════════════════════════════ */
.page-header {
  background: transparent !important;
  padding: 20px 0 12px !important;
  border: none !important;
}
.page-header-title h5 {
  font-size: 22px !important;
  font-weight: 700 !important;
  color: var(--text-main) !important;
  margin: 0 0 4px !important;
}
.breadcrumb { background: transparent !important; padding: 0 !important; margin: 0 !important; }
.breadcrumb-item { font-size: 12.5px !important; color: var(--text-muted) !important; }
.breadcrumb-item a { color: var(--text-muted) !important; text-decoration: none !important; }
.breadcrumb-item a:hover { color: var(--gold) !important; }
.breadcrumb-item.active { color: var(--gold) !important; font-weight: 500 !important; }
.breadcrumb-item + .breadcrumb-item::before { color: var(--border) !important; }

/* ══════════════════════════════════════════
   CARDS
   ══════════════════════════════════════════ */
.card {
  background: var(--bg-card) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow) !important;
  transition: box-shadow .2s, transform .2s !important;
}
.card:hover { box-shadow: var(--shadow-md) !important; }
.card-header {
  background: transparent !important;
  border-bottom: 1px solid var(--border) !important;
  padding: 18px 20px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
}
.card-header h5, .card-header h6 {
  font-size: 15px !important;
  font-weight: 700 !important;
  color: var(--text-main) !important;
  margin: 0 !important;
}
.card-body { padding: 20px !important; }
.card-footer {
  background: transparent !important;
  border-top: 1px solid var(--border) !important;
  padding: 14px 20px !important;
}

/* — KPI cards — */
.kpi-card { position: relative; overflow: hidden; }
.kpi-card .kpi-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.kpi-card .kpi-icon i {
  font-size: 24px !important;
  background: none !important;
  -webkit-text-fill-color: unset !important;
}
.kpi-card .kpi-value { font-size: 26px; font-weight: 800; color: var(--text-main); line-height: 1; }
.kpi-card .kpi-label { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.kpi-card .kpi-delta {
  font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 20px;
}
.kpi-card .kpi-delta.up   { background: rgba(16,185,129,.12); color: var(--green); }
.kpi-card .kpi-delta.down { background: rgba(239,68,68,.12);  color: var(--red); }
.kpi-icon-gold   { background: var(--gold-bg) !important; }
.kpi-icon-gold i { color: var(--gold) !important; }
.kpi-icon-green  { background: rgba(16,185,129,.12) !important; }
.kpi-icon-green i{ color: var(--green) !important; }
.kpi-icon-blue   { background: rgba(59,130,246,.12) !important; }
.kpi-icon-blue i { color: var(--blue) !important; }
.kpi-icon-purple { background: rgba(139,92,246,.12) !important; }
.kpi-icon-purple i { color: #8B5CF6 !important; }

/* ══════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════ */
.btn { border-radius: var(--radius-sm) !important; font-weight: 600 !important; font-size: 13px !important; transition: all .18s !important; }
.btn-primary {
  background: var(--gold) !important;
  border-color: var(--gold) !important;
  color: #fff !important;
  box-shadow: 0 2px 8px var(--gold-border) !important;
}
.btn-primary:hover {
  background: var(--gold-dark) !important;
  border-color: var(--gold-dark) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 14px var(--gold-border) !important;
}
.btn-outline-primary {
  border-color: var(--gold) !important;
  color: var(--gold) !important;
}
.btn-outline-primary:hover { background: var(--gold-bg) !important; }
.btn-success  { background: var(--green) !important; border-color: var(--green) !important; color: #fff !important; }
.btn-danger   { background: var(--red) !important;   border-color: var(--red) !important;   color: #fff !important; }
.btn-light-primary {
  background: var(--gold-bg) !important;
  color: var(--gold-dark) !important;
  border: 1px solid var(--gold-border) !important;
}
.btn-light-primary:hover { background: rgba(197,160,89,.22) !important; }
.btn-light-danger {
  background: rgba(239,68,68,.10) !important;
  color: var(--red) !important;
  border: 1px solid rgba(239,68,68,.25) !important;
}
.btn-light-danger:hover { background: rgba(239,68,68,.18) !important; }
.btn-sm { padding: 6px 14px !important; font-size: 12px !important; }

/* ══════════════════════════════════════════
   FORMS
   ══════════════════════════════════════════ */
.form-control, .form-select {
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm) !important;
  padding: 9px 13px !important;
  font-size: 13.5px !important;
  color: var(--text-main) !important;
  background: #fff !important;
  transition: border-color .15s, box-shadow .15s !important;
}
.form-control:focus, .form-select:focus {
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 3px var(--gold-bg) !important;
  outline: none !important;
}
.form-label {
  font-size: 12.5px !important;
  font-weight: 600 !important;
  color: var(--text-main) !important;
  margin-bottom: 6px !important;
}

/* ══════════════════════════════════════════
   TABLES
   ══════════════════════════════════════════ */
.table { font-size: 13.5px !important; }
.table thead th {
  background: #F9FAFB !important;
  color: var(--text-muted) !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: .8px !important;
  border-bottom: 2px solid var(--border) !important;
  border-top: none !important;
  padding: 12px 16px !important;
  white-space: nowrap !important;
}
.table tbody td {
  padding: 13px 16px !important;
  vertical-align: middle !important;
  border-bottom: 1px solid var(--border) !important;
  color: var(--text-main) !important;
}
.table tbody tr:hover td { background: rgba(197,160,89,.04) !important; }
.table-responsive { border-radius: var(--radius-sm); overflow: hidden; }

/* ══════════════════════════════════════════
   BADGES & STATUS
   ══════════════════════════════════════════ */
.badge {
  padding: 4px 10px !important;
  border-radius: 20px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: .3px !important;
}
.bg-light-success { background: rgba(16,185,129,.12) !important; color: var(--green) !important; }
.bg-light-danger  { background: rgba(239,68,68,.12) !important;  color: var(--red) !important; }
.bg-light-warning { background: rgba(245,158,11,.12) !important; color: var(--yellow) !important; }
.bg-light-primary { background: var(--gold-bg) !important;       color: var(--gold-dark) !important; }
.bg-light-info    { background: rgba(59,130,246,.12) !important;  color: var(--blue) !important; }

/* ══════════════════════════════════════════
   MODALS
   ══════════════════════════════════════════ */
.modal-content {
  border: none !important;
  border-radius: var(--radius) !important;
  box-shadow: 0 20px 60px rgba(0,0,0,.15) !important;
}
.modal-header {
  padding: 20px 24px !important;
  border-bottom: 1px solid var(--border) !important;
  background: transparent !important;
}
.modal-title { font-size: 16px !important; font-weight: 700 !important; color: var(--text-main) !important; }
.modal-body  { padding: 24px !important; }
.modal-footer {
  padding: 16px 24px !important;
  border-top: 1px solid var(--border) !important;
  background: #FAFAFA !important;
}

/* ══════════════════════════════════════════
   TABS
   ══════════════════════════════════════════ */
.nav-tabs { border-bottom: 2px solid var(--border) !important; }
.nav-tabs .nav-link {
  color: var(--text-muted) !important;
  border: none !important;
  padding: 10px 18px !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  border-bottom: 2px solid transparent !important;
  margin-bottom: -2px !important;
  transition: all .15s !important;
}
.nav-tabs .nav-link:hover { color: var(--gold) !important; }
.nav-tabs .nav-link.active {
  color: var(--gold) !important;
  background: transparent !important;
  border-bottom-color: var(--gold) !important;
}

/* ══════════════════════════════════════════
   DROPDOWN MENU
   ══════════════════════════════════════════ */
.dropdown-menu {
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-sm) !important;
  box-shadow: var(--shadow-md) !important;
  padding: 6px !important;
  font-size: 13.5px !important;
}
.dropdown-item {
  border-radius: 6px !important;
  padding: 8px 12px !important;
  color: var(--text-main) !important;
  transition: background .12s !important;
}
.dropdown-item:hover { background: var(--gold-bg) !important; color: var(--gold-dark) !important; }

/* ══════════════════════════════════════════
   ALERTS
   ══════════════════════════════════════════ */
.alert { border-radius: var(--radius-sm) !important; border: none !important; font-size: 13.5px !important; }
.alert-info    { background: rgba(59,130,246,.08) !important;  color: var(--blue) !important; }
.alert-success { background: rgba(16,185,129,.08) !important;  color: var(--green) !important; }
.alert-warning { background: rgba(245,158,11,.08) !important;  color: var(--yellow) !important; }
.alert-danger  { background: rgba(239,68,68,.08) !important;   color: var(--red) !important; }

/* ══════════════════════════════════════════
   LOADER
   ══════════════════════════════════════════ */
.loader-bg   { background: var(--sidebar-bg) !important; }
.loader-fill { background: var(--gold) !important; }

/* ══════════════════════════════════════════
   SCROLLBAR (global)
   ══════════════════════════════════════════ */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #D1D5DB; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #9CA3AF; }

/* ══════════════════════════════════════════
   SWITCH BUTTON
   ══════════════════════════════════════════ */
.bootstrap-switch { border-radius: 20px !important; }
.bootstrap-switch .bootstrap-switch-handle-on.bootstrap-switch-success { background: var(--green) !important; }

/* ══════════════════════════════════════════
   AVTAR ICONS (stat boxes)
   ══════════════════════════════════════════ */
.avtar { border-radius: 10px !important; }
.avtar.bg-light-success { background: rgba(16,185,129,.12) !important; }
.avtar.bg-light-primary { background: var(--gold-bg) !important; }

/* ══════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════ */
@media (max-width: 992px) {
  .page-header-title h5 { font-size: 18px !important; }
}
@media (max-width: 768px) {
  .card-body { padding: 16px !important; }
  .card-header { padding: 14px 16px !important; }
  .kpi-card .kpi-value { font-size: 22px; }
}
