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

/* ==========================================
   CSS VARIABLES & THEME SYSTEM
   ========================================== */
:root {
  /* Default Navy Theme variables (Ashoka Navy & Saffron) */
  --primary-color: #1e3a8a;
  --primary-light: #eff6ff;
  --primary-dark: #172554;
  --accent-color: #f97316;
  --accent-light: #fff7ed;
  --bg-app: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: #ffd8be;

  /* Typography & Layout Tokens */
  --font-title: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  --transition-speed: 0.3s;
  --transition-bezier: cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: all var(--transition-speed) var(--transition-bezier);

  --border-radius-xs: 6px;
  --border-radius-sm: 10px;
  --border-radius-md: 16px;
  --border-radius-lg: 24px;

  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px 0 rgba(0, 0, 0, 0.03);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.04), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
  --shadow-premium: 0 20px 40px -10px rgba(15, 23, 42, 0.06);
  --sidebar-width: 280px;
}

/* Base Emerald Theme Class */
body.theme-emerald {
  --primary-color: #065f46;
  --primary-light: #ecfdf5;
  --primary-dark: #064e3b;
  --accent-color: #d97706;
  --accent-light: #fef3c7;
  --bg-app: #f0fdf4;
  --bg-card: #ffffff;
  --text-main: #064e3b;
  --text-muted: #4b5563;
  --border-color: #ffd8be;
  --shadow-premium: 0 20px 40px -10px rgba(6, 78, 59, 0.06);
}

/* Base Slate Theme Class */
body.theme-slate {
  --primary-color: #334155;
  --primary-light: #f1f5f9;
  --primary-dark: #0f172a;
  --accent-color: #0ea5e9;
  --accent-light: #e0f2fe;
  --bg-app: #f1f5f9;
  --bg-card: #ffffff;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --border-color: #ffd8be;
  --shadow-premium: 0 20px 40px -10px rgba(51, 65, 85, 0.06);
}

/* Base Dark Theme Class */
body.theme-dark {
  --primary-color: #14b8a6;
  --primary-light: rgba(20, 184, 166, 0.15);
  --primary-dark: #0f766e;
  --accent-color: #38bdf8;
  --accent-light: rgba(56, 189, 248, 0.15);
  --bg-app: #0f172a;
  --bg-card: #1e293b;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: rgba(249, 115, 22, 0.25);
  --shadow-premium: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

/* Apply Navy values to body when body.theme-navy is active */
body.theme-navy {
  --primary-color: #1e3a8a;
  --primary-light: #eff6ff;
  --primary-dark: #172554;
  --accent-color: #f97316;
  --accent-light: #fff7ed;
  --bg-app: #f8fafc;
  --bg-card: #ffffff;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --border-color: #ffd8be;
}

/* ==========================================
   BASIC RESET & BASE STYLE
   ========================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-body);
  color: var(--text-main);
  background-color: var(--bg-app);
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-title);
  color: var(--text-main);
  font-weight: 600;
}

a {
  text-decoration: none;
  color: inherit;
}

button,
input,
select,
textarea {
  font-family: inherit;
  outline: none;
}

/* Scrollbar customization */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: 4px;
  opacity: 0.3;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color);
}

/* ==========================================
   APP STATE SWITCHER (LOGIN vs APP)
   ========================================== */
body.state-logged-out #app-screen {
  display: none !important;
}

body.state-logged-in #login-screen {
  display: none !important;
}

/* ==========================================
   LOGIN SCREEN LAYOUT
   ========================================== */
#login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  background-color: var(--bg-app);
  position: relative;
  overflow: hidden;
  transition: var(--transition-smooth);
}

.login-branding {
  position: relative;
  background-color: #0b1528;
  background-image:
    radial-gradient(circle at 10% 20%, rgba(249, 115, 22, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(16, 185, 129, 0.12) 0%, transparent 45%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='none' stroke='%23ffffff' stroke-opacity='0.04' stroke-width='2' d='M0,160L48,176C96,192,192,224,288,218.7C384,213,480,171,576,165.3C672,160,768,192,864,197.3C960,203,1056,181,1152,154.7C1248,128,1344,96,1392,80L1440,64'/%3E%3Cpath fill='none' stroke='%23ffffff' stroke-opacity='0.02' stroke-width='3' d='M0,96L48,112C96,128,192,160,288,186.7C384,213,480,235,576,218.7C672,203,768,149,864,138.7C960,128,1056,160,1152,181.3C1248,203,1344,213,1392,218.7L1440,224'/%3E%3Cpath fill='none' stroke='%233b82f6' stroke-opacity='0.08' stroke-width='2.5' d='M0,224L60,229.3C120,235,240,245,360,224C480,203,600,149,720,138.7C840,128,960,160,1080,176C1200,192,1320,192,1380,192L1440,192'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3E%3Ccircle cx='2' cy='2' r='1' fill='%23ffffff' fill-opacity='0.04'/%3E%3C/svg%3E"),
    linear-gradient(135deg, #091326 0%, #132a54 60%, #0b3d4f 100%);
  background-size: cover, cover, cover, 30px 30px, 100% 100%;
  background-repeat: no-repeat, no-repeat, no-repeat, repeat, no-repeat;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 60px;
  color: #ffffff;
  overflow: hidden;
}

.login-branding::before {
  content: '';
  position: absolute;
  top: -10%;
  right: -10%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-color) 0%, transparent 70%);
  opacity: 0.15;
  filter: blur(50px);
}

.login-branding::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -10%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--primary-light) 0%, transparent 60%);
  opacity: 0.08;
  filter: blur(80px);
}

.brand-header-top {
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 10;
}

.gov-logo-svg {
  width: 56px;
  height: 56px;
  fill: #ffffff;
}

.brand-title-wrap h2 {
  color: #ffffff;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.brand-title-wrap p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: 2px;
}

.branding-middle {
  z-index: 10;
  /* max-width: 520px; */
  margin: auto 0;
}

.tagline-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  background: rgba(249, 115, 22, 0.12);
  border: 1px solid rgba(249, 115, 22, 0.35);
  border-radius: 100px;
  font-size: 22px;
  color: #ffb347;
  font-weight: 700;
  margin-bottom: 20px;
  backdrop-filter: blur(4px);
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.tagline-badge span {
  width: 8px;
  height: 8px;
  background-color: var(--accent-color);
  border-radius: 50%;
  display: inline-block;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0% {
    transform: scale(0.95);
    opacity: 0.5;
  }

  50% {
    transform: scale(1.2);
    opacity: 1;
  }

  100% {
    transform: scale(0.95);
    opacity: 0.5;
  }
}

.branding-middle h1 {
  color: #ffffff;
  font-size: 44px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 20px;
}

/* ============================================================
   MAIN INSTITUTE HEADING — Large, bold, dominant
   ============================================================ */
.main-institute-heading {
  color: #ffffff !important;
  font-family: var(--font-title) !important;
  font-size: 52px !important;
  font-weight: 900 !important;
  line-height: 1.1 !important;
  margin-bottom: 20px !important;
  letter-spacing: -0.5px;

  /* Gradient multi-tone effect: white + saffron accent */
  background: linear-gradient(135deg, #ffffff 0%, #ffffff 50%, #ffb347 85%, #f97316 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;

  /* Text shadow for depth (only works without gradient fill, so using filter) */
  filter: drop-shadow(0 2px 12px rgba(249, 115, 22, 0.3));
}

/* ============================================================
   INSTITUTE SUBHEADING — Smaller, refined, elegant
   ============================================================ */
.institute-subheading {
  color: rgba(255, 255, 255, 0.78) !important;
  font-family: var(--font-body) !important;
  font-size: 13.5px !important;
  font-weight: 500 !important;
  line-height: 1.65 !important;
  letter-spacing: 0.3px;
  max-width: 430px;
  margin-bottom: 28px !important;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.06);
  border-left: 3px solid var(--accent-color);
  border-radius: 0 6px 6px 0;
  backdrop-filter: blur(4px);
}

/* ============================================================
   DECORATIVE DIVIDER between subheading and features
   ============================================================ */
.heading-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
  max-width: 300px;
}

.divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(249, 115, 22, 0.6), transparent);
}

.divider-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent-color);
  box-shadow: 0 0 8px var(--accent-color);
}

.branding-middle p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 16px;
  line-height: 1.6;
}

.branding-features {
  margin-top: 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.feature-icon-wrapper {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.feature-item h4 {
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.feature-item p {
  color: rgba(255, 255, 255, 0.65);
  font-size: 12px;
  line-height: 1.4;
}

.brand-footer-bottom {
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

.login-form-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 80px;
  background-color: var(--bg-card);
  position: relative;
  transition: var(--transition-smooth);
}

.login-card {
  width: 100%;
  max-width: 420px;
}

.login-card-header {
  margin-bottom: 40px;
}

.login-card-header h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 8px;
}

.login-card-header p {
  color: var(--text-muted);
  font-size: 14px;
}

.login-input-group {
  margin-bottom: 24px;
  position: relative;
}

.login-input-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-main);
  opacity: 0.95;
}

.input-with-icon {
  position: relative;
}

.input-with-icon input {
  width: 100%;
  padding: 14px 16px 14px 44px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: var(--border-radius-sm);
  color: var(--text-main);
  font-size: 14px;
  transition: var(--transition-smooth);
  box-sizing: border-box;
}

.input-with-icon input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
  background: #ffffff;
  outline: none;
}

.input-with-icon svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
  transition: var(--transition-smooth);
}

.input-with-icon input:focus+svg {
  color: var(--primary-color);
}

.login-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  font-size: 13px;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: var(--text-muted);
}

.remember-me input {
  accent-color: var(--primary-color);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.forgot-pass {
  color: var(--primary-color);
  font-weight: 600;
  transition: var(--transition-smooth);
}

.forgot-pass:hover {
  text-decoration: underline;
}

.login-btn {
  width: 100%;
  padding: 14px;
  background-color: var(--primary-color);
  color: #ffffff;
  border: none;
  border-radius: var(--border-radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  transition: var(--transition-smooth);
}

.login-btn:hover {
  background-color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.login-btn svg {
  width: 18px;
  height: 18px;
}

.theme-preview-trigger-container {
  margin-top: 40px;
  text-align: center;
  border-top: 1px dashed var(--border-color);
  padding-top: 30px;
}

.theme-preview-trigger-container p {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.demo-theme-btn {
  padding: 8px 18px;
  background-color: var(--primary-light);
  border: 1px solid var(--primary-color);
  color: var(--primary-color);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition-smooth);
}

.demo-theme-btn:hover {
  background-color: var(--primary-color);
  color: #ffffff;
}

/* ==========================================
   ERP DASHBOARD CONTAINER LAYOUT
   ========================================== */
#app-screen {
  min-height: 100vh;
  display: flex;
  background-color: var(--bg-app);
}

/* ==========================================
   SIDEBAR COMPONENT
   ========================================== */
.sidebar {
  width: var(--sidebar-width);
  background-color: var(--bg-card);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  transition: var(--transition-smooth);
}

/* Sidebar Toggle Buttons & Collapse styles */
.sidebar-toggle-btn {
  position: absolute;
  top: 24px;
  right: -12px;
  width: 24px;
  height: 24px;
  background-color: var(--primary-color);
  color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 110;
  transition: var(--transition-smooth);
  box-shadow: var(--shadow-sm);
}

.sidebar-toggle-btn:hover {
  background-color: var(--accent-color);
  transform: scale(1.1);
}

.sidebar-toggle-btn svg {
  width: 14px;
  height: 14px;
  transition: var(--transition-smooth);
}

body.sidebar-collapsed .sidebar-toggle-btn svg {
  transform: rotate(180deg);
}

.sidebar-close-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 110;
  transition: var(--transition-smooth);
}

.sidebar-close-btn:hover {
  background-color: var(--primary-light);
  color: var(--primary-color);
}

.sidebar-close-btn svg {
  width: 20px;
  height: 20px;
}

/* Collapsed Sidebar states on Desktop */
body.sidebar-collapsed {
  --sidebar-width: 78px;
}

body.sidebar-collapsed .sidebar-brand {
  padding: 0;
  justify-content: center;
}

body.sidebar-collapsed .sidebar-brand-text {
  display: none;
}

body.sidebar-collapsed .sidebar-menu-label {
  display: none;
}

body.sidebar-collapsed .sidebar-menu li {
  justify-content: center;
  padding: 12px 0;
  margin-bottom: 8px;
}

body.sidebar-collapsed .sidebar-menu li span {
  display: none;
}

body.sidebar-collapsed .sidebar-footer {
  flex-direction: column;
  align-items: center;
  padding: 16px 0;
  gap: 12px;
}

body.sidebar-collapsed .sidebar-user-info {
  display: none;
}

/* Sidebar overlay for mobile background */
#sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-smooth);
}

#sidebar-overlay.open {
  opacity: 1;
  visibility: visible;
}

/* Header Title Responsiveness Helper Classes */
.header-title-short {
  display: none;
}

@media (max-width: 900px) {
  .header-title-full {
    display: none;
  }

  .header-title-short {
    display: inline;
  }
}

.sidebar-brand {
  height: 80px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-logo-svg {
  width: 38px;
  height: 38px;
  fill: var(--primary-color);
}

.sidebar-brand h3 {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--primary-color);
}

.sidebar-brand p {
  font-size: 9px;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.sidebar-menu-section {
  flex: 1;
  padding: 24px 16px;
  overflow-y: auto;
}

.sidebar-menu-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: 1px;
  margin-bottom: 12px;
  padding-left: 12px;
}

.sidebar-menu {
  list-style: none;
}

.sidebar-menu>li {
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  gap: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  margin-bottom: 4px;
  position: relative;
  transition: var(--transition-smooth);
  padding: 0;
  flex-direction: column;
}

/* Direct menu items (no submenu) keep flat layout */
.sidebar-menu>li.menu-item-direct {
  flex-direction: row;
  padding: 12px 16px;
  gap: 14px;
  align-items: center;
}

.sidebar-menu>li svg {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
  transition: var(--transition-smooth);
}

.sidebar-menu>li:hover {
  background-color: var(--primary-light);
  color: var(--primary-color);
}

.sidebar-menu>li:hover svg {
  color: var(--primary-color);
}

/* has-submenu li should NOT get full background — submenu-title handles it */
.sidebar-menu>li.has-submenu:hover {
  background-color: transparent;
  color: inherit;
}

.sidebar-menu>li.has-submenu:hover svg {
  color: inherit;
}

.sidebar-menu>li.active {
  background-color: var(--primary-color);
  color: #ffffff;
}

.sidebar-menu>li.active svg {
  color: #ffffff;
}

/* Active state on has-submenu items — use accent border highlight only */
.sidebar-menu>li.has-submenu.open {
  background-color: transparent;
  color: var(--primary-color);
}

.sidebar-menu>li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 25%;
  height: 50%;
  width: 4px;
  background-color: var(--accent-color);
  border-radius: 0 4px 4px 0;
  opacity: 0;
  transition: var(--transition-smooth);
}

.sidebar-menu>li.active::before {
  opacity: 1;
}

.sidebar-footer {
  padding: 20px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--primary-color);
  border: 2px solid var(--border-color);
}

.sidebar-user-info {
  flex: 1;
  overflow: hidden;
}

.sidebar-user-info h4 {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-user-info p {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logout-btn-icon {
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 6px;
  transition: var(--transition-smooth);
}

.logout-btn-icon:hover {
  background-color: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.logout-btn-icon svg {
  width: 18px;
  height: 18px;
}

/* ==========================================
   MAIN DASHBOARD WRAPPER
   ========================================== */
.main-wrapper {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  /* Prevents flex items from breaking layout on smaller widths */
  transition: var(--transition-smooth);
}

/* ==========================================
   HEADER COMPONENT
   ========================================== */
.main-header {
  height: 80px;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 90;
  transition: var(--transition-smooth);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  color: var(--text-main);
  transition: var(--transition-smooth);
}

.menu-toggle:hover {
  background-color: var(--primary-light);
}

.menu-toggle svg {
  width: 24px;
  height: 24px;
}

.header-title h1 {
  font-size: 22px;
  font-weight: 700;
}

.header-title p {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.date-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background-color: var(--bg-app);
  border: 1px solid var(--border-color);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
}

.date-badge svg {
  width: 16px;
  height: 16px;
  color: var(--primary-color);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-icon-circular {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background-color: var(--bg-app);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-main);
  position: relative;
  transition: var(--transition-smooth);
}

.btn-icon-circular:hover {
  background-color: var(--primary-light);
  color: var(--primary-color);
  border-color: var(--primary-color);
  transform: translateY(-1px);
}

.btn-icon-circular:active {
  transform: translateY(0) scale(0.95);
}

.btn-icon-circular svg {
  width: 20px;
  height: 20px;
}

.badge-dot-indicator {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background-color: var(--accent-color);
  border-radius: 50%;
  border: 2px solid var(--bg-card);
}

/* ==========================================
   TAB PANELS LAYOUT & CONTENT
   ========================================== */
.main-content {
  flex: 1;
  padding: 32px;
  overflow-y: auto;
}

.tab-content {
  display: none;
  animation: fadeIn 0.4s ease forwards;
}

.tab-content.active {
  display: block;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================
   CARDS & GRID STYLING
   ========================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.stats-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-smooth);
}

.stats-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-color);
}

.stats-details h3 {
  font-size: 13px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.stats-value {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 8px;
}

.stats-trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 100px;
}

.stats-trend.positive {
  background-color: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.stats-trend.neutral {
  background-color: var(--primary-light);
  color: var(--primary-color);
}

.stats-icon-wrapper {
  width: 52px;
  height: 52px;
  border-radius: var(--border-radius-sm);
  background-color: var(--primary-light);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.stats-card:hover .stats-icon-wrapper {
  background-color: var(--primary-color);
  color: #ffffff;
}

.stats-icon-wrapper svg {
  width: 24px;
  height: 24px;
}

/* ==========================================
   CHARTS GRID LAYOUT
   ========================================== */
.charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

.chart-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.chart-header h3 {
  font-size: 16px;
  font-weight: 700;
}

.chart-canvas-container {
  position: relative;
  height: 300px;
  width: 100%;
}

/* ==========================================
   DATA TABLES STYLING
   ========================================== */
.table-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 32px;
}

.table-header {
  padding: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
}

.table-header h3 {
  font-size: 16px;
  font-weight: 700;
}

.table-search-box {
  position: relative;
}

.table-search-box input {
  padding: 8px 12px 8px 36px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-xs);
  background-color: var(--bg-app);
  color: var(--text-main);
  font-size: 13px;
  transition: var(--transition-smooth);
}

.table-search-box input:focus {
  border-color: var(--primary-color);
  background-color: var(--bg-card);
}

.table-search-box svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

.table-container {
  overflow-x: auto;
}

.erp-data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
}

.erp-data-table th {
  background-color: var(--bg-app);
  padding: 14px 24px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
}

.erp-data-table td {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
}

.erp-data-table tr:last-child td {
  border-bottom: none;
}

.erp-data-table tr {
  transition: var(--transition-smooth);
}

.erp-data-table tr:hover {
  background-color: var(--primary-light);
}

/* Badges styling */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
}

.badge.resolved {
  background-color: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.badge.processing {
  background-color: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.badge.pending {
  background-color: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.badge.escalated {
  background-color: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

/* Actions in tables */
.btn-action-sm {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: var(--border-radius-xs);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: var(--transition-smooth);
}

.btn-action-sm:hover {
  background-color: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
}

/* ==========================================
   GRIEVANCES SPECIFIC VIEW
   ========================================== */
.grievances-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.toolbar-filters {
  display: flex;
  gap: 12px;
}

.filter-select {
  padding: 8px 16px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-xs);
  background-color: var(--bg-card);
  color: var(--text-main);
  font-size: 13px;
  cursor: pointer;
}

.btn-primary {
  padding: 10px 20px;
  background-color: var(--primary-color);
  color: #ffffff;
  border: 1px solid transparent;
  border-radius: var(--border-radius-xs);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-smooth);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
}

.btn-secondary {
  padding: 10px 20px;
  background-color: var(--bg-app);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: var(--border-radius-xs);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: var(--transition-smooth);
}

.btn-secondary:hover {
  background-color: var(--border-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:active {
  transform: translateY(0) scale(0.98);
}

/* ==========================================
   BUDGET SPECIFIC VIEW
   ========================================== */
.budget-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.budget-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.budget-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.budget-card-title h3 {
  font-size: 16px;
}

.budget-icon-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--primary-light);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
}

.budget-icon-circle svg {
  width: 20px;
  height: 20px;
}

.budget-stats-inline {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
}

.budget-stat-col h4 {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.budget-stat-col p {
  font-size: 18px;
  font-weight: 700;
  margin-top: 4px;
}

.budget-progress-container {
  margin-bottom: 12px;
}

.progress-bar-bg {
  width: 100%;
  height: 8px;
  background-color: var(--border-color);
  border-radius: 100px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background-color: var(--primary-color);
  border-radius: 100px;
  transition: width 1s ease-out;
}

.progress-bar-fill.warning {
  background-color: var(--accent-color);
}

.budget-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  padding-top: 14px;
  margin-top: 14px;
}

/* ==========================================
   CONFIG & CODE VIEW (THEME DETAILS)
   ========================================== */
.config-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.config-preview-panel {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.preview-theme-header {
  margin-bottom: 24px;
}

.preview-theme-header h3 {
  font-size: 20px;
  margin-bottom: 8px;
}

.preview-theme-header p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
}

.palette-display {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

.palette-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background-color: var(--bg-app);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
}

.palette-color-preview-info {
  display: flex;
  align-items: center;
  gap: 14px;
}

.color-dot {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.palette-color-name h4 {
  font-size: 13px;
  font-weight: 600;
}

.palette-color-name p {
  font-size: 11px;
  color: var(--text-muted);
}

.color-hex {
  font-family: monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.config-code-panel {
  background-color: #1e293b;
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: #f8fafc;
}

.code-panel-header {
  padding: 16px 24px;
  background-color: #0f172a;
  border-bottom: 1px solid #334155;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.code-panel-header h4 {
  color: #f8fafc;
  font-size: 13px;
  font-family: monospace;
}

.btn-copy-code {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  padding: 6px 12px;
  font-size: 12px;
  border-radius: var(--border-radius-xs);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition-smooth);
}

.btn-copy-code:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.btn-copy-code:active {
  transform: translateY(0) scale(0.98);
}

.code-panel-body {
  padding: 24px;
  flex: 1;
  overflow: auto;
}

.code-panel-body pre {
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 13px;
  line-height: 1.6;
  white-space: pre-wrap;
  color: #38bdf8;
}

/* ==========================================
   THEME DRAWER CUSTOMIZER (SLIDE-IN PANEL)
   ========================================== */
#theme-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(4px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-smooth);
}

#theme-overlay.open {
  opacity: 1;
  visibility: visible;
}

#theme-drawer {
  position: fixed;
  top: 0;
  right: -420px;
  width: 420px;
  height: 100vh;
  background-color: var(--bg-card);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
}

#theme-drawer.open {
  right: 0;
}

.drawer-header {
  padding: 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.drawer-header h3 {
  font-size: 18px;
  font-weight: 700;
}

.btn-close-drawer {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.btn-close-drawer:hover {
  background-color: var(--primary-light);
  color: var(--primary-color);
}

.drawer-body {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
}

.drawer-section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.theme-options-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.theme-opt-card {
  background-color: var(--bg-app);
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 16px;
  cursor: pointer;
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.theme-opt-card:hover {
  border-color: var(--primary-color);
  transform: translateY(-2px);
}

.theme-opt-card.active {
  border-color: var(--accent-color);
  background-color: var(--bg-card);
}

.theme-opt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.theme-opt-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-main);
}

.theme-opt-badge {
  display: none;
  font-size: 10px;
  font-weight: 700;
  background-color: var(--accent-color);
  color: #ffffff;
  padding: 2px 6px;
  border-radius: 100px;
  text-transform: uppercase;
}

.theme-opt-card.active .theme-opt-badge {
  display: inline-block;
}

.theme-opt-card p {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 12px;
}

.theme-palette-preview {
  display: flex;
  gap: 8px;
}

.preview-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.drawer-footer {
  padding: 24px;
  border-top: 1px solid var(--border-color);
}

/* ==========================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================== */
@media (max-width: 1024px) {
  .charts-grid {
    grid-template-columns: 1fr;
  }

  .config-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  #login-screen {
    grid-template-columns: 1fr;
  }

  .login-branding {
    display: none;
    /* Hide branding on mobile login */
  }

  .login-form-container {
    padding: 40px 24px;
  }

  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.mobile-open {
    transform: translateX(0);
  }

  .main-wrapper {
    margin-left: 0;
  }

  .menu-toggle {
    display: block;
  }

  .sidebar-toggle-btn {
    display: none;
    /* Hide collapse btn on mobile/tablet */
  }

  .sidebar-close-btn {
    display: flex;
    /* Show close btn on mobile/tablet */
    align-items: center;
    justify-content: center;
  }

  /* In mobile drawer view, force expanded layout even if saved state was collapsed */
  body.sidebar-collapsed {
    --sidebar-width: 280px;
  }

  body.sidebar-collapsed .sidebar-brand {
    padding: 0 24px;
    justify-content: flex-start;
  }

  body.sidebar-collapsed .sidebar-brand-text {
    display: block;
  }

  body.sidebar-collapsed .sidebar-menu-label {
    display: block;
  }

  body.sidebar-collapsed .sidebar-menu li {
    justify-content: flex-start;
    padding: 12px 16px;
    margin-bottom: 6px;
  }

  body.sidebar-collapsed .sidebar-menu li span {
    display: inline;
  }

  body.sidebar-collapsed .sidebar-footer {
    flex-direction: row;
    align-items: center;
    padding: 20px 24px;
    gap: 12px;
  }

  body.sidebar-collapsed .sidebar-user-info {
    display: block;
  }
}

@media (max-width: 640px) {
  .main-header {
    padding: 0 16px;
    height: 70px;
  }

  .header-title h1 {
    font-size: 18px;
  }

  .header-title p {
    font-size: 11px;
  }

  .main-content {
    padding: 16px;
  }

  .stats-grid {
    gap: 16px;
  }

  .table-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .table-search-box {
    width: 100%;
  }

  .table-search-box input {
    width: 100%;
  }

  .date-badge {
    display: none;
    /* Hide date on small mobile */
  }

  #theme-drawer {
    width: 100%;
    right: -100%;
  }
}

/* ==========================================
   AIGGPA LOGO WRAPPERS & STYLES
   ========================================== */
.gov-logo-svg-wrapper {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #ffffff;
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  z-index: 10;
  transition: transform 0.3s var(--transition-bezier);
}

.gov-logo-svg-wrapper:hover {
  transform: scale(1.05);
}

.sidebar-logo-wrapper {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #ffffff;
  border-radius: 10px;
  padding: 5px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  flex-shrink: 0;
  transition: transform 0.3s var(--transition-bezier);
}

.sidebar:hover .sidebar-logo-wrapper {
  transform: rotate(3deg);
}

.aiggpa-logo-svg,
.aiggpa-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ==========================================
   HRMS DEMO PORTAL ADDITIONS
   ========================================== */

/* Segmented Login Control */
.login-tabs {
  display: flex;
  background-color: var(--bg-app);
  border: 1px solid var(--border-color);
  padding: 4px;
  border-radius: var(--border-radius-sm);
  margin-bottom: 24px;
  gap: 4px;
  width: 100%;
}

.login-tab-btn {
  flex: 1;
  padding: 10px 6px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  border-radius: var(--border-radius-xs);
  transition: var(--transition-smooth);
  white-space: nowrap;
  text-align: center;
}

.login-tab-btn.active {
  background-color: var(--primary-color);
  color: #ffffff;
}

.login-tab-btn:hover:not(.active) {
  background-color: var(--primary-light);
  color: var(--primary-color);
}

/* HRMS Form Styles */
.hrms-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.hrms-form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.hrms-form-group.full-width {
  grid-column: 1 / -1;
}

.hrms-form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.hrms-input,
.hrms-select,
.hrms-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  background-color: var(--bg-app);
  color: var(--text-main);
  transition: var(--transition-smooth);
}

.hrms-input:focus,
.hrms-select:focus,
.hrms-textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px var(--primary-light);
  background-color: var(--bg-card);
}

.hrms-radio-group,
.hrms-checkbox-group {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.hrms-radio-label,
.hrms-checkbox-label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-main);
}

.hrms-radio-label input,
.hrms-checkbox-label input {
  accent-color: var(--primary-color);
  width: 16px;
  height: 16px;
}

/* Kanban Board */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.kanban-column {
  background-color: var(--bg-app);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 16px;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kanban-column-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid var(--border-color);
  padding-bottom: 10px;
  margin-bottom: 8px;
}

.kanban-column-header h4 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-main);
}

.kanban-card-count {
  font-size: 11px;
  background-color: var(--primary-light);
  color: var(--primary-color);
  padding: 2px 8px;
  border-radius: 100px;
  font-weight: 700;
}

.kanban-cards-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
}

.kanban-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  cursor: grab;
  transition: var(--transition-smooth);
  position: relative;
}

.kanban-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-color);
}

.kanban-card-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 8px;
  color: var(--text-main);
  padding-right: 20px;
}

.kanban-card-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 12px;
}

.kanban-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.kanban-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}

.kanban-badge.high {
  background-color: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.kanban-badge.medium {
  background-color: rgba(245, 158, 11, 0.1);
  color: #f59e0b;
}

.kanban-badge.low {
  background-color: rgba(16, 185, 129, 0.1);
  color: #10b981;
}

.kanban-assignee {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

.kanban-card-actions {
  position: absolute;
  top: 10px;
  right: 10px;
  display: flex;
  gap: 4px;
}

.kanban-action-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
  transition: var(--transition-smooth);
}

.kanban-action-btn:hover {
  color: var(--primary-color);
  background-color: var(--primary-light);
}

/* Modal Popups */
.hrms-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-smooth);
}

.hrms-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.hrms-modal {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  width: 90%;
  max-width: 600px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: translateY(-20px);
  transition: var(--transition-smooth);
}

.hrms-modal-overlay.open .hrms-modal {
  transform: translateY(0);
}

.hrms-modal-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.hrms-modal-header h3 {
  font-size: 18px;
  font-weight: 700;
}

.hrms-modal-body {
  padding: 24px;
  max-height: 70vh;
  overflow-y: auto;
}

.hrms-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Pagination Control */
.hrms-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  font-size: 13px;
  color: var(--text-muted);
}

.pagination-buttons {
  display: flex;
  gap: 8px;
}

.pagination-btn {
  padding: 6px 12px;
  background-color: var(--bg-app);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: var(--border-radius-xs);
  cursor: pointer;
  font-weight: 600;
  transition: var(--transition-smooth);
}

.pagination-btn:hover:not(:disabled) {
  background-color: var(--primary-color);
  color: #ffffff;
  border-color: var(--primary-color);
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Toast Notification */
.hrms-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background-color: #10b981;
  color: #ffffff;
  padding: 12px 24px;
  border-radius: var(--border-radius-sm);
  box-shadow: var(--shadow-lg);
  font-weight: 600;
  z-index: 3000;
  transform: translateY(100px);
  opacity: 0;
  transition: var(--transition-smooth);
}

.hrms-toast.show {
  transform: translateY(0);
  opacity: 1;
}

.hrms-toast.error {
  background-color: #ef4444;
}

/* Dashboard Actions & Clock-In Widgets */
.dashboard-actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.clock-widget {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: #ffffff;
  padding: 24px;
  border-radius: var(--border-radius-md);
  text-align: center;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.clock-time {
  font-size: 32px;
  font-weight: 800;
  font-family: monospace;
}

.clock-btn {
  padding: 10px 24px;
  background-color: var(--accent-color);
  border: none;
  color: #ffffff;
  border-radius: var(--border-radius-sm);
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition-smooth);
  width: 100%;
}

.clock-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.clock-btn:active {
  transform: translateY(0) scale(0.98);
}

.clock-btn.clocked-in {
  background-color: #ef4444;
}

/* Nested Submenus Accordion Styling */
.sidebar-menu li.has-submenu {
  flex-direction: column;
  align-items: stretch;
  padding: 0;
}

.submenu-title {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  cursor: pointer;
  box-sizing: border-box;
  border-radius: var(--border-radius-sm);
  transition: background 0.2s ease;
}

.sidebar-menu li.has-submenu:hover>.submenu-title,
.sidebar-menu li.has-submenu.open>.submenu-title {
  background-color: var(--primary-light);
  color: var(--primary-color);
}

.sidebar-menu li.has-submenu:hover>.submenu-title svg,
.sidebar-menu li.has-submenu.open>.submenu-title svg {
  color: var(--primary-color);
}

.submenu-title-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.submenu-arrow-icon {
  width: 16px !important;
  height: 16px !important;
  transition: transform 0.3s var(--transition-bezier);
}

.sidebar-menu li.has-submenu.open .submenu-arrow-icon {
  transform: rotate(90deg);
}

.sidebar-submenu {
  list-style: none;
  padding-left: 36px;
  background-color: rgba(0, 0, 0, 0.02);
  display: none;
  border-top: 1px solid var(--border-color);
}

body.theme-dark .sidebar-submenu {
  background-color: rgba(255, 255, 255, 0.02);
}

.sidebar-menu li.has-submenu.open .sidebar-submenu {
  display: block;
}

.sidebar-submenu li {
  display: block !important;
  text-align: left !important;
  padding: 8px 16px !important;
  font-size: 13px !important;
  color: var(--text-muted) !important;
  border-radius: var(--border-radius-xs) !important;
  margin-bottom: 2px !important;
  margin-top: 2px !important;
  font-weight: 500 !important;
  transition: var(--transition-smooth) !important;
}

.sidebar-submenu li:hover {
  background-color: var(--primary-light) !important;
  color: var(--primary-color) !important;
}

.sidebar-submenu li.active {
  background-color: var(--primary-light) !important;
  color: var(--primary-color) !important;
  font-weight: 600 !important;
}

body.sidebar-collapsed .sidebar-submenu {
  display: none !important;
}

body.sidebar-collapsed .submenu-arrow-icon {
  display: none !important;
}

/* Matrix Table Permission Checkboxes */
.matrix-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--primary-color);
  cursor: pointer;
}

/* File Upload Drag-Drop Area */
.file-upload-wrapper {
  border: 2px dashed var(--border-color);
  border-radius: var(--border-radius-sm);
  padding: 20px;
  text-align: center;
  background-color: var(--bg-app);
  cursor: pointer;
  transition: var(--transition-smooth);
}

.file-upload-wrapper:hover {
  border-color: var(--primary-color);
}

.file-upload-icon {
  font-size: 24px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* Print Slip Styles */
@media print {
  body * {
    visibility: hidden;
  }

  #print-payslip-modal-body,
  #print-payslip-modal-body * {
    visibility: visible;
  }

  #print-payslip-modal-body {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
  }
}



/* ==========================================
   ENTERPRISE DATA GRIDS & FORMS STYLE
   ========================================== */
.datagrid-wrapper {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
}

.datagrid-header {
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border-color);
  background-color: rgba(255, 255, 255, 0.01);
}

.datagrid-actions {
  display: flex;
  gap: 8px;
}

.dg-btn {
  background: var(--bg-app);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: var(--border-radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dg-btn:hover {
  background-color: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.dg-btn:active {
  transform: translateY(0) scale(0.98);
}

.datagrid-search-wrapper {
  position: relative;
  min-width: 240px;
}

.dg-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 14px;
}

.dg-search-input {
  width: 100%;
  padding: 8px 12px 8px 36px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  background-color: var(--bg-app);
  color: var(--text-main);
  font-size: 13px;
  transition: all 0.2s ease;
}

.dg-search-input:focus {
  border-color: var(--primary-color);
  background-color: var(--bg-card);
  outline: none;
}

/* Modern Data Table Styling */
.grid-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  text-align: left;
}

.grid-table th {
  background-color: var(--bg-app);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 14px 20px;
  border-bottom: 2px solid var(--border-color);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 10;
}

.grid-table th.sortable-header {
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s ease;
}

.grid-table th.sortable-header:hover {
  background-color: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
}

.grid-table th.sortable-header::after {
  content: ' ↕';
  opacity: 0.4;
  margin-left: 6px;
}

.grid-table th.sort-asc::after {
  content: ' ⬆';
  opacity: 1;
  color: var(--primary-color);
}

.grid-table th.sort-desc::after {
  content: ' ⬇';
  opacity: 1;
  color: var(--primary-color);
}

.grid-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-main);
  font-size: 13px;
  vertical-align: middle;
}

.grid-table tbody tr {
  transition: background-color 0.15s ease;
}

.grid-table tbody tr:nth-child(even) {
  background-color: rgba(255, 255, 255, 0.01);
}

.grid-table tbody tr:hover {
  background-color: rgba(0, 0, 0, 0.08);
}

/* Action Button styling inside cells */
.dg-actions-cell {
  display: flex;
  gap: 6px;
  align-items: center;
}

.dg-action-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  width: 32px;
  height: 32px;
  border-radius: var(--border-radius-sm);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  font-size: 13px;
}

.dg-action-btn:hover {
  color: #fff;
  transform: translateY(-1px) scale(1.08);
  box-shadow: var(--shadow-sm);
}

.dg-action-btn:active {
  transform: translateY(0) scale(0.95);
}

.dg-action-btn.view:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.dg-action-btn.edit:hover {
  background-color: #3b82f6;
  border-color: #3b82f6;
}

.dg-action-btn.delete:hover {
  background-color: #ef4444;
  border-color: #ef4444;
}

.dg-action-btn.approve:hover {
  background-color: #10b981;
  border-color: #10b981;
}

.dg-action-btn.reject:hover {
  background-color: #f59e0b;
  border-color: #f59e0b;
}

.dg-action-btn.download:hover {
  background-color: #8b5cf6;
  border-color: #8b5cf6;
}

/* Footer layout */
.datagrid-footer {
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  border-top: 1px solid var(--border-color);
  background-color: rgba(255, 255, 255, 0.01);
}

.datagrid-info {
  font-size: 13px;
  color: var(--text-muted);
}

.datagrid-pagesize {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dg-page-size-select {
  padding: 6px 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  background-color: var(--bg-app);
  color: var(--text-main);
  font-size: 13px;
  outline: none;
  cursor: pointer;
}

.datagrid-pagination {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dg-page-btn {
  background: var(--bg-app);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: var(--border-radius-sm);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dg-page-btn:hover:not(:disabled) {
  background-color: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

.dg-page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.dg-page-numbers {
  display: flex;
  gap: 4px;
}

.dg-page-num {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-main);
  min-width: 32px;
  height: 32px;
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-weight: 500;
}

.dg-page-num:hover {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: var(--border-color);
}

.dg-page-num.active {
  background-color: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

.no-records-row {
  text-align: center;
  padding: 32px !important;
  color: var(--text-muted);
  font-size: 14px;
}

/* ==========================================
   ENTERPRISE FORM ENHANCEMENT
   ========================================== */
.card-body form fieldset {
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  padding: 24px;
  margin-bottom: 24px;
  background-color: rgba(255, 255, 255, 0.002);
}

.card-body form legend {
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hrms-form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
  display: block;
}

.required-star {
  color: #ef4444;
  margin-left: 2px;
}

.hrms-input,
.hrms-select,
.hrms-textarea {
  width: 100%;
  height: 42px;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  background-color: var(--bg-app);
  color: var(--text-main);
  font-size: 14px;
  transition: all 0.2s ease;
}

.hrms-textarea {
  height: auto;
  resize: vertical;
}

.hrms-input:focus,
.hrms-select:focus,
.hrms-textarea:focus {
  border-color: var(--primary-color);
  background-color: var(--bg-card);
  outline: none;
}

/* Professional button groupings inside forms */
.form-actions-bar {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.btn-form {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  height: 42px;
  border-radius: var(--border-radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
  border: 1px solid transparent;
}

.btn-form:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-form:active {
  transform: translateY(0) scale(0.98);
}

.btn-form.save {
  background-color: var(--primary-color);
  color: #fff;
}

.btn-form.save:hover {
  background-color: var(--primary-dark);
}

.btn-form.update {
  background-color: #3b82f6;
  color: #fff;
}

.btn-form.update:hover {
  background-color: #2563eb;
}

.btn-form.reset {
  background-color: var(--bg-app);
  border-color: var(--border-color);
  color: var(--text-main);
}

.btn-form.reset:hover {
  background-color: var(--border-color);
}

.btn-form.cancel {
  background-color: transparent;
  color: var(--text-muted);
}

.btn-form.cancel:hover {
  color: var(--text-main);
  background-color: var(--border-color);
}

/* User Profile Header Dropdown Menu Styling */
.header-profile-dropdown .profile-dropdown-menu {
  display: none;
  position: absolute;
  top: 46px;
  right: 0;
  width: 220px;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 1000;
  padding: 8px 0;
  animation: dropdownFadeIn 0.2s ease;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.header-profile-dropdown .dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 13px;
  color: var(--text-main);
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
  cursor: pointer;
}

.header-profile-dropdown .dropdown-item:hover {
  background-color: var(--primary-light);
  color: var(--primary-color);
}

.header-profile-dropdown .dropdown-item svg {
  color: var(--text-muted);
  transition: color 0.15s ease;
}

.header-profile-dropdown .dropdown-item:hover svg {
  color: var(--primary-color);
}

/* ==========================================================================
   20. ADDITIONAL FORM, TABLE, CARD, & GRID DESIGN IMPROVEMENTS
   ========================================================================== */

/* Warm Light Orange Border — Inner App Cards & Components */
.card,
.stats-card,
.chart-card,
.table-card,
.datagrid-wrapper,
.search-panel,
.dashboard-section,
fieldset,
.modal-content,
.add-user-modal-box {
  border: 1px solid var(--border-color) !important;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.03), var(--shadow-sm) !important;
}

/* Login Card — No border, only elegant shadow */
.login-card {
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
}

/* Table Enhancements */
.table-container {
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  border: 1.5px solid var(--border-color) !important;
  margin-bottom: 24px;
}

.erp-data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13.5px;
}

.erp-data-table th {
  background: linear-gradient(180deg, #fffcf9 0%, #ffedd5 100%) !important;
  /* Soft premium saffron gradient */
  padding: 14px 18px;
  font-weight: 700;
  color: var(--primary-color) !important;
  font-family: var(--font-title);
  border-bottom: 2px solid var(--border-color) !important;
  text-transform: uppercase;
  font-size: 11.5px;
  letter-spacing: 0.5px;
}

.erp-data-table td {
  padding: 12px 18px;
  border-bottom: 1px solid #ffedd5 !important;
  color: var(--text-main);
  vertical-align: middle;
}

/* Zebra / Alternate Row Styling */
.erp-data-table tr:nth-child(even) {
  background-color: #fffcf9 !important;
}

.erp-data-table tr:nth-child(odd) {
  background-color: #ffffff !important;
}

/* Hover Effect */
.erp-data-table tr:hover {
  background-color: #fff3e0 !important;
  /* Soft orange/saffron row highlight */
}

/* Form Styling Improvements */
fieldset {
  border: 1.5px solid var(--border-color) !important;
  border-radius: var(--border-radius-md) !important;
  padding: 24px !important;
  margin-bottom: 24px !important;
  background-color: #fffdfb !important;
  /* Creamy background to group inputs */
  margin-top: 12px !important;
}

legend {
  padding: 4px 16px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  color: var(--primary-color) !important;
  background-color: #ffedd5 !important;
  border: 1.5px solid var(--border-color) !important;
  border-radius: 20px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.75px !important;
}

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

.hrms-form-group label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
  display: block;
}

.hrms-input,
.hrms-select,
.hrms-textarea {
  border: 1.5px solid var(--border-color) !important;
  border-radius: var(--border-radius-xs) !important;
  background-color: #ffffff !important;
  padding: 10px 14px !important;
  font-size: 13.5px;
  transition: all 0.2s ease;
}

.hrms-input:focus,
.hrms-select:focus,
.hrms-textarea:focus {
  border-color: var(--primary-color) !important;
  background-color: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1) !important;
}

/* Sync search input with standard theme borders */
.datagrid-search-input {
  border: 1.5px solid var(--border-color) !important;
  border-radius: var(--border-radius-xs) !important;
}

.datagrid-search-input:focus {
  border-color: var(--primary-color) !important;
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1) !important;
}

/* ==========================================================================
   21. ERP-* CLASS ALIASES — Match HTML form classes to styled CSS
   These mirror the hrms-* rules so ERP-* classnames work throughout dashboard.html
   ========================================================================== */

/* Form Grid Layout */
.ERP-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

/* Form Group Container */
.ERP-form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.ERP-form-group.full-width {
  grid-column: 1 / -1;
}

/* Form Labels */
.ERP-form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 2px;
}

/* Text Inputs, Date Inputs, File Inputs */
.ERP-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  background-color: var(--bg-app);
  color: var(--text-main);
  font-size: 14px;
  font-family: var(--font-body);
  transition: var(--transition-smooth);
  box-sizing: border-box;
  outline: none;
}

.ERP-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
  background-color: var(--bg-card);
}

/* Select Dropdowns */
.ERP-select {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  background-color: var(--bg-app);
  color: var(--text-main);
  font-size: 14px;
  font-family: var(--font-body);
  transition: var(--transition-smooth);
  box-sizing: border-box;
  outline: none;
  appearance: auto;
  cursor: pointer;
}

.ERP-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
  background-color: var(--bg-card);
}

/* Textareas */
.ERP-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border-color);
  border-radius: var(--border-radius-sm);
  background-color: var(--bg-app);
  color: var(--text-main);
  font-size: 14px;
  font-family: var(--font-body);
  transition: var(--transition-smooth);
  box-sizing: border-box;
  outline: none;
  resize: vertical;
  min-height: 80px;
}

.ERP-textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
  background-color: var(--bg-card);
}

/* Radio Groups */
.ERP-radio-group {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.ERP-radio-label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-main);
  font-weight: 500;
}

.ERP-radio-label input[type="radio"] {
  accent-color: var(--primary-color);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Checkbox Groups */
.ERP-checkbox-group {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

.ERP-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-main);
  font-weight: 500;
}

.ERP-checkbox-label input[type="checkbox"] {
  accent-color: var(--primary-color);
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* ==========================================================================
   ERP MODAL — Full screen overlays
   ========================================================================== */

.ERP-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-smooth);
}

.ERP-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.ERP-modal {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-md);
  width: 90%;
  max-width: 680px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transform: translateY(-20px);
  transition: var(--transition-smooth);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.ERP-modal-overlay.open .ERP-modal {
  transform: translateY(0);
}

.ERP-modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
}

.ERP-modal-header h3 {
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
}

.ERP-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.ERP-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background-color: var(--bg-app);
}

/* ERP Toast notification */
.ERP-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background-color: var(--primary-color);
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--border-radius-sm);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 9999;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.3s ease;
  max-width: 320px;
}

/* ==========================================================================
   22. PREMIUM CARD STYLING & SPACING SYSTEM
   ========================================================================== */

/* Modern Card Container with shadow glow & top spacing */
.card {
  background-color: var(--bg-card);
  border-radius: var(--border-radius-md) !important;
  /* 16px */
  border: 1px solid var(--border-color) !important;
  box-shadow: 0 10px 30px -10px rgba(249, 115, 22, 0.05), var(--shadow-sm) !important;
  margin-top: 20px !important;
  /* Fixes sticking to sticky header */
  margin-bottom: 28px !important;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
}

/* Hover shadow enhancement */
.card:hover {
  box-shadow: 0 15px 35px -5px rgba(249, 115, 22, 0.08), var(--shadow-md) !important;
  border-color: rgba(249, 115, 22, 0.35) !important;
}

/* Card Header with a soft warm saffron gradient */
.card-header {
  padding: 20px 24px !important;
  border-bottom: 1px solid var(--border-color) !important;
  background: linear-gradient(180deg, #ffffff 0%, #fffcf8 100%) !important;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
}

.card-header h3 {
  font-family: var(--font-title);
  font-size: 17px;
  font-weight: 700;
  color: var(--primary-color);
  margin: 0;
  letter-spacing: 0.2px;
}

/* Card Body spacing reset */
.card-body {
  padding: 24px !important;
  background-color: var(--bg-card) !important;
}

/* Project Tables Name Styling */
#projects-list-tbody tr td:first-child,
#project-milestones-tbody tr td:first-child,
#research-tbody tr td:first-child,
#ctei-monitoring-tbody tr td:first-child,
#center-projects-tbody tr td:first-child {
  font-weight: 700 !important;
  font-size: 14px !important;
  color: var(--primary-color) !important;
  padding: 14px 16px !important;
  line-height: 1.4 !important;
  text-align: left !important;
}

/* Ensure consistent cell heights and left alignments in all standard modules */
.grid-table th,
.grid-table td {
  text-align: left !important;
  vertical-align: middle !important;
}

/* KPI Style Improvements */
.kpi-orange {
  background-color: rgba(249, 115, 22, 0.05) !important;
  border: 1px solid rgba(249, 115, 22, 0.15) !important;
}

.kpi-orange .stats-value {
  color: #ea580c !important;
}

.kpi-orange h3,
.kpi-orange p {
  color: #9a3412 !important;
}

.kpi-blue {
  background-color: rgba(59, 130, 246, 0.05) !important;
  border: 1px solid rgba(59, 130, 246, 0.15) !important;
}

.kpi-blue .stats-value {
  color: #2563eb !important;
}

.kpi-blue h3,
.kpi-blue p {
  color: #1e40af !important;
}

.kpi-green {
  background-color: rgba(185, 168, 16, 0.05) !important;
  border: 1px solid rgba(16, 185, 129, 0.15) !important;
}

.kpi-green .stats-value {
  color: #9a8b08 !important;
}

.kpi-green h3,
.kpi-green p {
  color: #5f5906 !important;
}

.kpi-purple {
  background-color: rgba(139, 92, 246, 0.05) !important;
  border: 1px solid rgba(139, 92, 246, 0.15) !important;
}

.kpi-purple .stats-value {
  color: #7c3aed !important;
}

.kpi-purple h3,
.kpi-purple p {
  color: #5b21b6 !important;
}

/* Print Media Styles for Professional Payslip PDF Printing */
@media print {
  body * {
    visibility: hidden;
  }

  #print-payslip-modal-body,
  #print-payslip-modal-body * {
    visibility: visible;
  }

  #print-payslip-modal-body {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: none !important;
    border: none !important;
  }

  #payslip-viewer-modal {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: auto !important;
    background: none !important;
    display: block !important;
    overflow: visible !important;
    z-index: auto !important;
  }

  .ERP-modal {
    box-shadow: none !important;
    border: none !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
}

/* ERP Toggle Switch */
.erp-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
}

.erp-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.erp-switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: .3s;
  border-radius: 34px;
}

.erp-switch-slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.erp-switch input:checked+.erp-switch-slider {
  background-color: #10b981;
}

.erp-switch input:checked+.erp-switch-slider:before {
  transform: translateX(20px);
}

/* Event Calendar */
.calendar-card {
  width: 100%;
  padding: 16px 24px !important;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: #ffffff;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  margin: 32px 0 0 0;
  box-shadow: var(--shadow-sm);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 6px;
}

.calendar-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.calendar-day-cell {
  height: 48px;
  /* slightly taller to fit text nicely */
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  border-radius: 6px;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
  background-color: var(--bg-app);
  color: var(--text-color);
  padding: 4px 12px !important;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.02);
  gap: 8px;
}

.calendar-day-cell:not(.event):not(.holiday):not(.leave) {
  justify-content: center;
  padding: 2px !important;
}

.calendar-day-cell:hover {
  background-color: var(--border-color);
  transform: translateY(-1px);
}

.day-num {
  font-size: 13px;
  font-weight: 700;
  min-width: 18px;
  text-align: center;
}

.day-event-text {
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  text-align: left;
  padding: 3px 6px;
  border-radius: 4px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.calendar-day-cell.holiday .day-event-text {
  background-color: rgba(249, 115, 22, 0.1) !important;
  color: #ea580c !important;
  border-color: rgba(249, 115, 22, 0.2);
}

.calendar-day-cell.leave .day-event-text {
  background-color: rgba(59, 130, 246, 0.1) !important;
  color: #2563eb !important;
  border-color: rgba(59, 130, 246, 0.2);
}

.calendar-day-cell.event .day-event-text {
  background-color: rgba(16, 185, 129, 0.1) !important;
  color: #059669 !important;
  border-color: rgba(16, 185, 129, 0.2);
}

@media (max-width: 768px) {
  .day-event-text {
    display: none;
  }

  .calendar-day-cell {
    justify-content: center;
    padding: 2px !important;
    height: 38px;
  }
}

.calendar-day-cell.today {
  background-color: var(--primary-color) !important;
  color: #ffffff !important;
  font-weight: 800;
  box-shadow: 0 3px 6px rgba(30, 58, 138, 0.2);
}

.calendar-day-cell.holiday {
  background-color: rgba(249, 115, 22, 0.15) !important;
  color: #ea580c !important;
  border: 1px solid rgba(249, 115, 22, 0.35);
}

.calendar-day-cell.leave {
  background-color: rgba(59, 130, 246, 0.15) !important;
  color: #2563eb !important;
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.calendar-day-cell.event {
  background-color: rgba(16, 185, 129, 0.15) !important;
  color: #059669 !important;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

/* Gradient Dashboard Title */
.dashboard-title-gradient {
  font-family: var(--font-title);
  font-size: 38px;
  font-weight: 800;
  margin-top: 12px;
  margin-bottom: 24px;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: block;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  width: fit-content;
  letter-spacing: -0.5px;
}