/* =============================================================================
   theme.css — global UI polish, injected last on every page so it wins.
   Goal: neat, clean, medium-sized, user-friendly. Calmer sidebar, smaller icons
   and headings, tidy cards, soft hovers, Inter font. Font Awesome icons are
   excluded from the font override so glyphs keep rendering.
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --primary-color: #4f46e5;
  --secondary-color: #4338ca;
  --accent-color: #6366f1;
  --bg-color: #f4f5f7;
  --text-color: #2b2f36;
  --light-text: #e8eaf0;
  --sidebar-width: 222px;
  --header-height: 56px;
  --border-radius: 8px;
  --transition-speed: .15s;
  --box-shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 1px 2px rgba(16, 24, 40, .04);
}

/* ---- Inter everywhere EXCEPT Font Awesome / Material icons ---------------- */
*:not([class*="fa-"]):not(.material-icons):not(.material-symbols-outlined) {
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif !important;
}
body { background: var(--bg-color) !important; color: var(--text-color); font-size: 14px; line-height: 1.55; }

/* ---- Sidebar: clean dark slate, medium items, no shift on hover ---------- */
.sidebar {
  width: var(--sidebar-width) !important;
  background: #1e2330 !important;
  padding: 12px 0 !important;
  border-right: 1px solid rgba(0, 0, 0, .05);
  /* hide the scrollbar but keep it scrollable */
  scrollbar-width: none !important;          /* Firefox */
  -ms-overflow-style: none !important;       /* old Edge/IE */
}
.sidebar::-webkit-scrollbar { width: 0 !important; height: 0 !important; display: none !important; } /* Chrome/Safari */

.sidebar-header { padding: 8px 16px 14px !important; margin-bottom: 6px !important; border-bottom: 1px solid rgba(255, 255, 255, .07) !important; }
/* logo: one line, medium size */
.sidebar-header .logo { display: flex !important; align-items: center !important; gap: 9px !important; white-space: nowrap !important; }
.sidebar-header .logo i { font-size: 1.05rem !important; flex: 0 0 auto; }
.sidebar-header .logo span,
.sidebar-header h1, .sidebar-header h2, .sidebar-title, .logo-text {
  font-size: .98rem !important; font-weight: 600 !important; color: #fff !important;
  white-space: nowrap !important; line-height: 1.2 !important;
}
/* remove the dead close (×) button inside the sidebar */
.sidebar .toggle-sidebar, .sidebar #closeSidebar, #closeSidebar, .sidebar .close-sidebar { display: none !important; }
.sidebar-menu { padding: 0 !important; }
/* target every <li> (not just .menu-item) so stray/unclassed items still align
   — e.g. the Settings item whose <li> is missing the menu-item class */
.menu-item, .sidebar-menu > li { margin: 1px 8px !important; list-style: none !important; }
.menu-link {
  display: flex !important; align-items: center; gap: 10px;
  padding: 9px 12px !important; font-size: 13.5px !important; font-weight: 500 !important;
  color: #c3c9d6 !important; border-radius: 7px !important;
  transition: background var(--transition-speed) ease, color var(--transition-speed) ease !important;
}
.menu-link i { font-size: 14px !important; width: 18px; text-align: center; }
.menu-link span { font-size: 13.5px !important; }
.menu-link:hover { background: rgba(255, 255, 255, .06) !important; color: #fff !important; padding-left: 12px !important; transform: none !important; }
.menu-link.active, .menu-link.active:hover {
  background: var(--primary-color) !important; color: #fff !important;
  border-left: none !important; padding-left: 12px !important;
}
/* sidebar section labels (e.g. "EMPLOYEE MANAGEMENT") */
.menu-section, .menu-header, .sidebar-section, .menu-category {
  font-size: 10.5px !important; letter-spacing: .07em;
  color: #7c8499 !important; padding: 14px 18px 5px !important; text-transform: uppercase;
}

/* ---- Top header ---------------------------------------------------------- */
.header, .top-header, .topbar { height: var(--header-height) !important; box-shadow: var(--box-shadow) !important; background: #fff !important; display: flex !important; align-items: center !important; gap: 6px; }
/* current-section title injected by the shim */
.page-title-header { font-size: 1.06rem !important; font-weight: 600 !important; color: #1f2937 !important; margin-left: 12px !important; margin-right: auto !important; white-space: nowrap; }
.user-profile { display: flex !important; align-items: center !important; gap: 10px !important; }
.user-name { font-weight: 600 !important; font-size: 13.5px !important; color: #1f2937 !important; }
.user-role { font-size: 11.5px !important; color: #6b7280 !important; }
.avatar { width: 34px !important; height: 34px !important; font-size: 14px !important; display: flex !important; align-items: center !important; justify-content: center !important; }
/* header logout button injected by the shim */
.__hdr_logout { margin-left: 6px; border: none; background: #f3f4f6; color: #ef4444; width: 32px; height: 32px; border-radius: 8px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; transition: background .15s ease; }
.__hdr_logout:hover { background: #fee2e2; }

/* ---- Cards: medium, soft border, no lift on hover ------------------------ */
.card, .feature-card, .stat-card, .welcome-card, .controls-card, .cart-container,
.payment-section, .dashboard-card, .info-card, .summary-card, .module-card {
  border-radius: var(--border-radius) !important;
  box-shadow: var(--box-shadow) !important;
  border: 1px solid #ebedf1 !important;
  padding: 18px !important;
}
.card:hover, .feature-card:hover, .stat-card:hover, .dashboard-card:hover {
  transform: none !important;
  box-shadow: 0 2px 8px rgba(16, 24, 40, .09) !important;
}

/* ---- Welcome / hero: medium --------------------------------------------- */
.welcome-card { padding: 22px !important; margin-bottom: 18px !important; }
.welcome-logo { max-width: 76px !important; margin: 0 auto 12px !important; }
.welcome-logo i, .welcome-card > i { font-size: 1.9rem !important; }
.welcome-title { font-size: 1.45rem !important; margin-bottom: 8px !important; }
.welcome-subtitle { font-size: .92rem !important; margin-bottom: 8px !important; }
.date-time { font-size: .82rem !important; }

/* ---- Section + card titles ---------------------------------------------- */
.module-title, .section-title, .page-header h1, .page-header h2, .page-title { font-size: 1.12rem !important; font-weight: 600 !important; margin-bottom: 12px !important; }
.card-title, .card-header h2, .card-header h3 { font-size: 1.02rem !important; font-weight: 600 !important; }

/* ---- Feature cards (dashboard tiles): medium icons + text --------------- */
.card-grid { gap: 14px !important; }
.feature-icon { font-size: 1.5rem !important; margin-bottom: 8px !important; }
.feature-icon i { font-size: 1.5rem !important; }
.feature-title { font-size: .98rem !important; margin-bottom: 4px !important; font-weight: 600 !important; }
.feature-description { font-size: .8rem !important; color: #6b7280 !important; }

/* ---- Stats --------------------------------------------------------------- */
.stat-value, .stat-number, .stat-card .value { font-size: 1.3rem !important; font-weight: 700 !important; }
.stat-label, .stat-card .label { font-size: .72rem !important; letter-spacing: .03em; color: #6b7280 !important; text-transform: uppercase; }
.stat-card i, .stat-icon { font-size: 1.4rem !important; }

/* ---- Buttons: medium, subtle hover -------------------------------------- */
.btn, button.btn {
  font-size: 13px !important; padding: 8px 14px !important;
  border-radius: 7px !important; font-weight: 500 !important;
  transition: filter var(--transition-speed) ease, box-shadow var(--transition-speed) ease !important;
}
.btn:hover { transform: none !important; filter: brightness(.96); box-shadow: none !important; }
.btn-primary { background: var(--primary-color) !important; }

/* ---- Inputs / selects ---------------------------------------------------- */
input, select, textarea { font-size: 13.5px !important; border-radius: 7px !important; border: 1px solid #d8dbe2 !important; padding: 8px 11px !important; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary-color) !important; box-shadow: 0 0 0 3px rgba(79, 70, 229, .12) !important; }
label { font-size: 12.5px !important; font-weight: 500 !important; color: #4b5563 !important; }

/* ---- Tables: clean ------------------------------------------------------- */
table { font-size: 13px !important; }
th { font-size: 11px !important; text-transform: uppercase; letter-spacing: .03em; color: #6b7280 !important; font-weight: 600 !important; }
td, th { padding: 10px 12px !important; }
tr { transition: background var(--transition-speed) ease; }

/* ---- Main content spacing ------------------------------------------------ */
.main-content, .content { padding: 18px 22px !important; }

/* =============================================================================
   CONTENT POLISH — calm, consistent headings + unified cards across all pages
   ========================================================================== */

/* In-content page title (redundant with the header now) -> modest, left, dark */
.page-title {
  font-size: 1.15rem !important; font-weight: 600 !important; color: #1f2937 !important;
  text-align: left !important; justify-content: flex-start !important;
  margin: 2px 0 14px !important; display: flex !important; align-items: center; gap: 9px;
}
.page-title i { color: var(--primary-color) !important; font-size: 1rem !important; -webkit-text-fill-color: var(--primary-color) !important; }

/* Card / section headings -> dark, medium, muted accent icon (no loud indigo) */
.card-title, .card-header h2, .card-header h3, .card-header h4 {
  font-size: 1.02rem !important; font-weight: 600 !important; color: #1f2937 !important;
  display: flex !important; align-items: center; gap: 8px; margin: 0 0 2px;
}
.card-header { display: flex !important; align-items: center; gap: 8px; margin-bottom: 14px !important; padding-bottom: 0 !important; border-bottom: none !important; }
.card-header i, .card-title i { color: var(--primary-color) !important; font-size: .95rem !important; }
.section-title { font-size: .92rem !important; font-weight: 600 !important; color: #374151 !important; margin: 14px 0 10px !important; display: flex; align-items: center; gap: 7px; }
.section-title i { color: var(--primary-color) !important; font-size: .85rem !important; }
.module-title { color: #1f2937 !important; border-bottom: 1px solid #e7e9ee !important; padding-bottom: 8px !important; }

/* Unify every card variant; drop loud colored left-borders */
.kpi-card, .controls-card, .summary-card, .metric-card, .module-card, .info-card, .detail-card {
  background: #fff !important;
  border: 1px solid #ebedf1 !important; border-left: 1px solid #ebedf1 !important;
  border-radius: var(--border-radius) !important; box-shadow: var(--box-shadow) !important;
}
.kpi-card { padding: 15px 18px !important; gap: 14px !important; }
.kpi-card:hover { transform: none !important; box-shadow: 0 2px 8px rgba(16,24,40,.09) !important; }
.kpi-card h4, .kpi-info h4 { font-size: .72rem !important; text-transform: uppercase; letter-spacing: .03em; color: #6b7280 !important; font-weight: 600 !important; margin: 0 0 2px; }
.kpi-card p, .kpi-info p { font-size: 1.28rem !important; font-weight: 700 !important; color: #1f2937 !important; margin: 0; }
.kpi-icon { width: 44px !important; height: 44px !important; min-width: 44px; font-size: 1.15rem !important; border-radius: 10px !important; }

/* Category / list rows with colored left bars -> subtle */
.category-item, .list-item, .item-row { border-left-width: 3px !important; }

/* Status badges: compact + soft */
.status-badge, .badge { font-size: 11px !important; padding: 3px 9px !important; border-radius: 999px !important; font-weight: 600 !important; }

/* Inner action buttons (edit/toggle/delete circles) -> consistent medium */
.btn-info, .btn-icon, .action-btn, .icon-btn { font-size: 13px !important; }
