/* Clean Modern Construction Theme & Kantumruy Pro Typography */
@import url('https://fonts.googleapis.com/css2?family=Kantumruy+Pro:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400;1,600&family=Kantumruy:wght@300;400;700&display=swap');

:root {
  --font-main: 'Kantumruy Pro', 'Kantumruy', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --bg-body: #0b0f19;
  --bg-card: #111827;
  --bg-card-hover: #172033;
  --bg-input: #0b1120;

  --primary: #f59e0b;
  --primary-hover: #fbbf24;
  --primary-light: rgba(245, 158, 11, 0.08);

  --accent-cyan: #06b6d4;
  --accent-blue: #3b82f6;
  --accent-green: #10b981;
  --accent-red: #ef4444;

  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --border-color: rgba(255, 255, 255, 0.1);
  --border-card: #1e293b;
  --border-active: #f59e0b;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body,
button,
input,
select,
textarea,
optgroup,
table,
th,
td,
.swal2-popup,
.swal2-title,
.swal2-html-container,
.swal2-actions,
.swal2-confirm,
.swal2-cancel,
.swal2-deny {
  font-family: var(--font-main);
}

/* Ensure Font Awesome 6 Icons ALWAYS retain their correct Font Family & Weight */
.fa-solid,
.fas,
i.fa-solid,
i.fas {
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 900 !important;
  font-style: normal !important;
}

.fa-regular,
.far,
i.fa-regular,
i.far {
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 400 !important;
  font-style: normal !important;
}

.fa-brands,
.fab,
i.fa-brands,
i.fab {
  font-family: "Font Awesome 6 Brands" !important;
  font-weight: 400 !important;
  font-style: normal !important;
}

.fa,
i.fa {
  font-family: "Font Awesome 6 Free" !important;
  font-weight: 900 !important;
  font-style: normal !important;
}

i[class*=" fa-"],
i[class^="fa-"],
span[class*=" fa-"],
span[class^="fa-"] {
  font-style: normal !important;
  display: inline-block;
  vertical-align: -0.125em;
}

body {
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* Crisp Clean Panel */
.glass-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  transition: border-color 0.2s ease;
}

.glass-panel:hover {
  border-color: rgba(255, 255, 255, 0.16);
}

/* Clean Navbar */
.navbar-custom {
  background: #0f172a;
  border-bottom: 1px solid var(--border-card);
  padding: 0.5rem 1rem;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.brand-badge {
  color: #fff;
  padding: 4px 10px 4px 6px;
  border: 1.5px solid rgba(245, 158, 11, 0.3);
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  height: 44px;
  max-height: 44px;
  flex-shrink: 0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4), 0 0 15px rgba(245, 158, 11, 0.15);
}

.brand-badge::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.12), transparent);
  transition: 0.6s;
  pointer-events: none;
}

.brand-badge:hover {
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.7);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.35);
}

.brand-badge:hover::before {
  left: 100%;
}

.brand-logo-wrap {
  width: 36px !important;
  height: 36px !important;
  min-width: 36px !important;
  min-height: 36px !important;
  max-width: 36px !important;
  max-height: 36px !important;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(245, 158, 11, 0.08);
  border: 1.5px solid rgba(245, 158, 11, 0.35);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
  padding: 2px;
  transition: all 0.3s ease;
  flex-shrink: 0;
  overflow: hidden;
}

.brand-badge:hover .brand-logo-wrap {
  border-color: rgba(245, 158, 11, 0.85);
  background: rgba(245, 158, 11, 0.18);
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.5);
  transform: scale(1.08) rotate(3deg);
}

.brand-logo-img {
  width: 32px !important;
  height: 32px !important;
  max-width: 32px !important;
  max-height: 32px !important;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
  transition: transform 0.3s ease;
}

.brand-text-wrap {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name-text {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.brand-name-text .brand-accent {
  color: #fbbf24;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.4);
}

.brand-name-text .brand-main {
  color: #f8fafc;
  letter-spacing: 0.5px;
}

.brand-tagline {
  font-size: 0.65rem;
  color: #38bdf8;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}

/* ========================================================================= */
/* MODERN TOP NAVBAR PILLS & GLOWING ICON TYPOGRAPHY                         */
/* ========================================================================= */
.nav-link-custom {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 50px;
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1;
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  white-space: nowrap;
  position: relative;
  user-select: none;
}

.nav-link-custom i {
  transition: transform 0.25s ease, filter 0.25s ease;
}

.nav-link-custom:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

.nav-link-custom:hover i {
  transform: scale(1.15);
}

.nav-link-custom.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(15, 23, 42, 0.95)) !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
  font-weight: 800;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.4), inset 0 0 10px rgba(56, 189, 248, 0.15) !important;
}

.nav-link-custom.active i {
  filter: drop-shadow(0 0 8px #38bdf8);
}

/* Palette Specific Active States */
.nav-link-custom.nav-palette-emerald.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(15, 23, 42, 0.95)) !important;
  border-color: #10b981 !important;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.4), inset 0 0 10px rgba(16, 185, 129, 0.15) !important;
}

.nav-link-custom.nav-palette-emerald.active i {
  filter: drop-shadow(0 0 8px #10b981);
}

.nav-link-custom.nav-palette-cyan.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(15, 23, 42, 0.95)) !important;
  border-color: #38bdf8 !important;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.4), inset 0 0 10px rgba(56, 189, 248, 0.15) !important;
}

.nav-link-custom.nav-palette-cyan.active i {
  filter: drop-shadow(0 0 8px #38bdf8);
}

.nav-link-custom.nav-palette-amber.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(15, 23, 42, 0.95)) !important;
  border-color: #f59e0b !important;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.4), inset 0 0 10px rgba(245, 158, 11, 0.15) !important;
}

.nav-link-custom.nav-palette-amber.active i {
  filter: drop-shadow(0 0 8px #f59e0b);
}

.nav-link-custom.nav-palette-purple.active {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.22), rgba(15, 23, 42, 0.95)) !important;
  border-color: #a855f7 !important;
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.4), inset 0 0 10px rgba(168, 85, 247, 0.15) !important;
}

.nav-link-custom.nav-palette-purple.active i {
  filter: drop-shadow(0 0 8px #a855f7);
}

.nav-link-custom.nav-palette-rose.active {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.22), rgba(15, 23, 42, 0.95)) !important;
  border-color: #f43f5e !important;
  box-shadow: 0 0 16px rgba(244, 63, 94, 0.4), inset 0 0 10px rgba(244, 63, 94, 0.15) !important;
}

.nav-link-custom.nav-palette-rose.active i {
  filter: drop-shadow(0 0 8px #f43f5e);
}

.nav-lock-indicator {
  display: inline-flex;
  align-items: center;
  padding: 1px 4px;
  border-radius: 4px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  margin-left: 2px;
  transition: transform 0.2s ease;
}

.nav-link-custom:hover .nav-lock-indicator {
  transform: scale(1.15);
}

/* Locked Top Navbar Pill (Light Slate Grey like bottom cards) */
.nav-link-custom.is-locked-nav {
  background: rgba(148, 163, 184, 0.08) !important;
  border-color: rgba(148, 163, 184, 0.25) !important;
  color: #94a3b8 !important;
  box-shadow: none !important;
}

.nav-link-custom.is-locked-nav i {
  color: #94a3b8 !important;
  filter: none !important;
}

.nav-link-custom.is-locked-nav .nav-lock-indicator {
  background: rgba(148, 163, 184, 0.12) !important;
  border-color: rgba(148, 163, 184, 0.3) !important;
}

.nav-link-custom.is-locked-nav .nav-lock-indicator i {
  color: #f87171 !important;
}

.nav-link-custom.is-locked-nav:hover {
  background: rgba(148, 163, 184, 0.16) !important;
  border-color: rgba(148, 163, 184, 0.45) !important;
  color: #e2e8f0 !important;
}

.nav-link-custom.is-locked-nav:hover i {
  color: #cbd5e1 !important;
}

/* ========================================================================= */
/* BASE PORTAL HERO & CARDS STYLING (PERFECT FIT SCREEN DESKTOP DASHBOARD)   */
/* ========================================================================= */
.portal-main-wrapper {
  max-width: 1520px;
  margin: 0 auto;
  padding: 0.5rem 1.25rem 0.5rem 1.25rem;
  box-sizing: border-box;
}

@media (min-width: 1024px) {
  html, body {
    overflow-y: auto;
  }

  .portal-main-wrapper {
    height: calc(100vh - 68px);
    min-height: calc(100vh - 68px);
    max-height: calc(100vh - 68px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 0.5rem 1.25rem 0.6rem 1.25rem;
    box-sizing: border-box;
  }

  /* 50% Top Half: Grand Hero Banner with Photo Collage */
  .portal-hero-banner {
    flex: 1 1 47%;
    min-height: 0;
    margin-bottom: 0;
    padding: 1rem 1.5rem;
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    box-sizing: border-box;
    border-radius: 16px;
  }

  /* 50% Bottom Half: 4 Grand Feature Cards Grid */
  .portal-cards-grid {
    flex: 1 1 53%;
    min-height: 0;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.85rem;
    margin-bottom: 0;
    box-sizing: border-box;
  }

  .portal-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0.8rem 0.95rem 0.75rem 0.95rem;
    box-sizing: border-box;
    min-height: 0;
  }

  .portal-card-body-wrap {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 0;
  }

  .portal-feature-box {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-bottom: 0.4rem;
  }
}

.portal-hero-banner {
  padding: 1rem 1.5rem;
  margin-bottom: 0;
  text-align: left;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: radial-gradient(circle at 20% 50%, rgba(56, 189, 248, 0.16), rgba(15, 23, 42, 0.98));
  border: 1.5px solid rgba(56, 189, 248, 0.38);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

/* Floating & Glowing Animated Brand Logo Framed in Cyan Box (ដូចរូបទី១) */
.portal-hero-logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: pointer;
  margin: 0;
  flex-shrink: 0;
  padding: 10px 12px;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.95), rgba(10, 15, 30, 0.98));
  border: 2.5px solid #38bdf8;
  border-radius: 22px;
  box-shadow: 0 0 24px rgba(56, 189, 248, 0.45), inset 0 0 16px rgba(56, 189, 248, 0.15), 0 8px 24px rgba(0, 0, 0, 0.6);
  animation: heroLogoContainerFloat 4s ease-in-out infinite, heroLogoContainerGlow 3.5s ease-in-out infinite alternate;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.35s ease, border-color 0.35s ease;
}

.portal-hero-logo-container:hover {
  transform: scale(1.06) translateY(-5px);
  border-color: #7dd3fc;
  box-shadow: 0 0 38px rgba(56, 189, 248, 0.75), inset 0 0 24px rgba(56, 189, 248, 0.3), 0 14px 32px rgba(0, 0, 0, 0.8);
}

.portal-hero-logo-img {
  width: 105px;
  max-width: 115px;
  height: auto;
  object-fit: contain;
  animation: heroLogoFloating 3.6s ease-in-out infinite;
  transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275), filter 0.35s ease;
  will-change: transform, filter;
  display: block;
}

.portal-hero-logo-container:hover .portal-hero-logo-img {
  transform: scale(1.06);
  filter: drop-shadow(0 0 22px rgba(251, 191, 36, 0.8)) drop-shadow(0 0 16px rgba(56, 189, 248, 0.6));
}

@keyframes heroLogoContainerFloat {
  0% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-6px);
  }
  100% {
    transform: translateY(0px);
  }
}

@keyframes heroLogoContainerGlow {
  0% {
    box-shadow: 0 0 18px rgba(56, 189, 248, 0.35), inset 0 0 12px rgba(56, 189, 248, 0.12), 0 6px 20px rgba(0, 0, 0, 0.55);
    border-color: #38bdf8;
  }
  50% {
    box-shadow: 0 0 30px rgba(56, 189, 248, 0.6), inset 0 0 20px rgba(56, 189, 248, 0.25), 0 10px 28px rgba(0, 0, 0, 0.65);
    border-color: #0ea5e9;
  }
  100% {
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.4), inset 0 0 14px rgba(56, 189, 248, 0.15), 0 7px 22px rgba(0, 0, 0, 0.58);
    border-color: #38bdf8;
  }
}

@keyframes heroLogoFloating {
  0% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-3px) rotate(0.4deg);
  }
  100% {
    transform: translateY(0px) rotate(0deg);
  }
}

.portal-hero-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.portal-hero-title-group {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 3px;
}

.portal-hero-title {
  font-size: clamp(1.5rem, 2.3vw, 1.95rem);
  font-weight: 900;
  margin: 0;
  letter-spacing: 1.2px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1.15;
}

.portal-hero-title .portal-hero-kp {
  color: #fbbf24;
  text-shadow: 0 0 20px rgba(251, 191, 36, 0.55);
}

.portal-hero-title .portal-hero-builder {
  color: #ffffff;
  text-shadow: 0 0 20px rgba(255, 255, 255, 0.45);
}

/* Enlarge Khmer title to match KP Builder */
.portal-hero-sub {
  font-size: clamp(1.3rem, 2vw, 1.7rem);
  color: #38bdf8;
  font-weight: 800;
  margin: 0;
  letter-spacing: 0.6px;
  line-height: 1.15;
  text-shadow: 0 0 20px rgba(56, 189, 248, 0.55), 0 2px 8px rgba(0, 0, 0, 0.45);
}

.portal-hero-desc {
  max-width: 900px;
  margin: 0;
  color: #94a3b8;
  font-size: 0.84rem;
  line-height: 1.4;
}

.portal-hero-tag {
  color: #34d399;
  font-weight: 600;
  font-size: 0.82rem;
  display: inline-block;
  margin-top: 3px;
}

/* Modern Construction Activity Showcase in Hero - 50% Half-Height Bento Photo Collage Mosaic */
.portal-hero-activities-wrapper {
  flex: 1 1 54%;
  max-width: 760px;
  min-width: 320px;
  height: 100%;
  background: rgba(15, 23, 42, 0.78);
  border: 1.5px solid rgba(56, 189, 248, 0.38);
  border-radius: 14px;
  padding: 8px 12px;
  box-shadow: inset 0 0 22px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
}

.portal-activities-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  flex-shrink: 0;
}

.portal-activities-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: #f8fafc;
  display: flex;
  align-items: center;
  gap: 7px;
}

.portal-activities-badge {
  font-size: 0.68rem;
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.45);
  padding: 1px 7px;
  border-radius: 10px;
  font-weight: bold;
}

.btn-insert-activity {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  border: 1px solid #38bdf8;
  color: #ffffff;
  padding: 3px 10px;
  font-size: 0.76rem;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.35);
  font-family: inherit;
}

.btn-insert-activity:hover {
  background: linear-gradient(135deg, #0ea5e9, #0284c7);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.55);
  color: #ffffff;
}

/* Modern Bento Photo Collage Mosaic (ផ្គុំរូបបែបទំនើប - Clean No Text, 50% Height Responsive) */
.portal-activities-mosaic {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1.15fr;
  grid-template-rows: 1fr 1fr;
  gap: 6px;
  flex: 1 1 0;
  min-height: 0;
}

.portal-mosaic-card {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  cursor: pointer;
  background: #0f172a;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.portal-mosaic-card:hover {
  transform: scale(1.03) translateY(-2px);
  border-color: #38bdf8;
  box-shadow: 0 8px 22px rgba(56, 189, 248, 0.5);
  z-index: 2;
}

.portal-mosaic-card-tall-left {
  grid-column: 1;
  grid-row: 1 / span 2;
}

.portal-mosaic-card-mid-top {
  grid-column: 2;
  grid-row: 1;
}

.portal-mosaic-card-mid-bot {
  grid-column: 2;
  grid-row: 2;
}

.portal-mosaic-card-tall-right {
  grid-column: 3;
  grid-row: 1 / span 2;
}

.portal-mosaic-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.portal-mosaic-card:hover .portal-mosaic-img {
  transform: scale(1.1);
}

.portal-mosaic-zoom-hint {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #38bdf8;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.portal-mosaic-card:hover .portal-mosaic-zoom-hint {
  opacity: 1;
  transform: scale(1.1);
}

/* 4 Grand Cards Layout Grid (Fit Screen on Desktop) */
.portal-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  margin-bottom: 0.4rem;
}

@media (max-width: 1200px) {
  .portal-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .portal-hero-banner {
    flex-direction: column;
    text-align: center;
    padding: 1.15rem 1rem;
    gap: 0.75rem;
  }
  .portal-hero-title-group {
    justify-content: center;
  }
  .portal-hero-activities-wrapper {
    width: 100%;
    max-width: 100%;
  }
  .portal-cards-grid {
    grid-template-columns: 1fr;
  }
}

/* Base Portal Card - Compact & Clean for Fit Screen */
.portal-card {
  border-radius: 14px;
  padding: 0.85rem 0.95rem 0.75rem 0.95rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.portal-card .portal-icon-box {
  width: 38px !important;
  height: 38px !important;
  border-radius: 10px !important;
  font-size: 1.15rem !important;
}

.portal-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.portal-card-title {
  font-size: 1.05rem;
  color: #ffffff;
  margin-bottom: 3px;
  font-weight: 800;
  transition: color 0.3s ease;
  line-height: 1.2;
}

.portal-card-desc {
  color: #94a3b8;
  font-size: 0.76rem;
  line-height: 1.35;
  margin-bottom: 0.5rem;
  transition: color 0.3s ease;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.portal-feature-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  padding: 6px;
  margin-bottom: 0.55rem;
  transition: all 0.3s ease;
}

/* Interactive Clickable Items in Cards - Uniform Modern Text Color (#f1f5f9) with Unique Colorful Icons */
.portal-feature-item {
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 0.77rem;
  color: #f1f5f9;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portal-feature-item span {
  color: #f1f5f9;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.portal-clickable-item:hover,
.portal-feature-item:hover {
  transform: translateY(-2px) !important;
  border-color: rgba(56, 189, 248, 0.5) !important;
  background: rgba(30, 41, 59, 0.95) !important;
  box-shadow: 0 4px 10px rgba(56, 189, 248, 0.25) !important;
}

.portal-clickable-item:hover span,
.portal-feature-item:hover span {
  color: #ffffff !important;
}

/* Light Slate Grey Palette for Locked Cards (ពណ៌ប្រផេះស្រាល) */
.portal-card.is-locked-state {
  background: linear-gradient(145deg, rgba(148, 163, 184, 0.07), rgba(15, 23, 42, 0.95)) !important;
  border: 1.5px solid rgba(148, 163, 184, 0.25) !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35) !important;
}

.portal-card.is-locked-state:hover {
  border-color: rgba(148, 163, 184, 0.45) !important;
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5) !important;
}

.portal-card.is-locked-state .portal-icon-box {
  background: rgba(148, 163, 184, 0.1) !important;
  border-color: rgba(148, 163, 184, 0.3) !important;
  color: #94a3b8 !important;
  box-shadow: none !important;
}

.portal-card.is-locked-state .portal-card-title {
  color: #94a3b8 !important;
  /* Soft light grey title */
}

.portal-card.is-locked-state .portal-card-desc {
  color: #64748b !important;
  /* Soft muted grey description */
}

.portal-card.is-locked-state .portal-feature-box,
.portal-card.is-locked-state .portal-feature-box div {
  background: rgba(15, 23, 42, 0.55) !important;
  border-color: rgba(148, 163, 184, 0.15) !important;
  color: #94a3b8 !important;
}

.portal-card.is-locked-state .portal-feature-box i {
  color: #94a3b8 !important;
  filter: none !important;
}

.portal-card.is-locked-state .portal-card-action-btn {
  background: rgba(148, 163, 184, 0.1) !important;
  border: 1px solid rgba(148, 163, 184, 0.25) !important;
  color: #94a3b8 !important;
  box-shadow: none !important;
}

.portal-card.is-locked-state .portal-card-action-btn:hover {
  background: rgba(148, 163, 184, 0.2) !important;
  border-color: rgba(148, 163, 184, 0.45) !important;
  color: #ffffff !important;
}

/* Unlocked State (Returns to full vibrant original colors) */
.portal-card.is-unlocked-state.card-cyan {
  background: linear-gradient(145deg, rgba(56, 189, 248, 0.12), rgba(15, 23, 42, 0.92)) !important;
  border: 1.5px solid rgba(56, 189, 248, 0.4) !important;
}

.portal-card.is-unlocked-state.card-cyan .portal-icon-box {
  background: rgba(56, 189, 248, 0.15) !important;
  border-color: #38bdf8 !important;
  color: #38bdf8 !important;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.35) !important;
}

.portal-card.is-unlocked-state.card-amber {
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.12), rgba(15, 23, 42, 0.92)) !important;
  border: 1.5px solid rgba(245, 158, 11, 0.4) !important;
}

.portal-card.is-unlocked-state.card-amber .portal-icon-box {
  background: rgba(245, 158, 11, 0.15) !important;
  border-color: #f59e0b !important;
  color: #fbbf24 !important;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.35) !important;
}

.portal-card.is-unlocked-state.card-purple {
  background: linear-gradient(145deg, rgba(168, 85, 247, 0.12), rgba(15, 23, 42, 0.92)) !important;
  border: 1.5px solid rgba(168, 85, 247, 0.4) !important;
}

.portal-card.is-unlocked-state.card-purple .portal-icon-box {
  background: rgba(168, 85, 247, 0.15) !important;
  border-color: #a855f7 !important;
  color: #c084fc !important;
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.35) !important;
}

/* Sidebar Grand Module Cards Dynamic Grey when locked */
.grand-module-sidebar-card.is-locked-state {
  background: linear-gradient(145deg, rgba(148, 163, 184, 0.07), rgba(15, 23, 42, 0.95)) !important;
  border: 1.5px solid rgba(148, 163, 184, 0.22) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
}

.grand-module-sidebar-card.is-locked-state:hover {
  border-color: rgba(148, 163, 184, 0.45) !important;
  transform: translateX(4px);
}

.grand-module-sidebar-card.is-locked-state .grand-card-icon-box {
  background: rgba(148, 163, 184, 0.1) !important;
  border-color: rgba(148, 163, 184, 0.3) !important;
  color: #94a3b8 !important;
  box-shadow: none !important;
}

.grand-module-sidebar-card.is-locked-state .grand-card-title {
  color: #94a3b8 !important;
  /* Soft light grey */
}

.grand-module-sidebar-card.is-locked-state .grand-card-subtitle {
  color: #64748b !important;
  /* Soft muted grey */
}

.grand-module-sidebar-card.is-locked-state .grand-card-badge {
  background: rgba(148, 163, 184, 0.1) !important;
  border-color: rgba(148, 163, 184, 0.25) !important;
  color: #f87171 !important;
}

.grand-module-sidebar-card.is-locked-state .grand-card-action,
.grand-module-sidebar-card.is-locked-state .grand-card-action * {
  color: #94a3b8 !important;
  /* Soft light grey arrow and text */
}

/* Sidebar Grand Module Cards Unlocked Vibrant state */
.grand-module-sidebar-card.is-unlocked-state.grand-card-cyan {
  background: linear-gradient(145deg, rgba(56, 189, 248, 0.1), rgba(15, 23, 42, 0.9)) !important;
  border-color: rgba(56, 189, 248, 0.4) !important;
}

.grand-module-sidebar-card.is-unlocked-state.grand-card-cyan .grand-card-icon-box {
  background: rgba(56, 189, 248, 0.15) !important;
  border-color: #38bdf8 !important;
  color: #38bdf8 !important;
}

.grand-module-sidebar-card.is-unlocked-state.grand-card-cyan .grand-card-title {
  color: #ffffff !important;
}

.grand-module-sidebar-card.is-unlocked-state.grand-card-cyan .grand-card-action,
.grand-module-sidebar-card.is-unlocked-state.grand-card-cyan .grand-card-action * {
  color: #38bdf8 !important;
}

.grand-module-sidebar-card.is-unlocked-state.grand-card-amber {
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.1), rgba(15, 23, 42, 0.9)) !important;
  border-color: rgba(245, 158, 11, 0.4) !important;
}

.grand-module-sidebar-card.is-unlocked-state.grand-card-amber .grand-card-icon-box {
  background: rgba(245, 158, 11, 0.15) !important;
  border-color: #f59e0b !important;
  color: #fbbf24 !important;
}

.grand-module-sidebar-card.is-unlocked-state.grand-card-amber .grand-card-title {
  color: #ffffff !important;
}

.grand-module-sidebar-card.is-unlocked-state.grand-card-amber .grand-card-action,
.grand-module-sidebar-card.is-unlocked-state.grand-card-amber .grand-card-action * {
  color: #fbbf24 !important;
}

.grand-module-sidebar-card.is-unlocked-state.grand-card-purple {
  background: linear-gradient(145deg, rgba(168, 85, 247, 0.1), rgba(15, 23, 42, 0.9)) !important;
  border-color: rgba(168, 85, 247, 0.4) !important;
}

.grand-module-sidebar-card.is-unlocked-state.grand-card-purple .grand-card-icon-box {
  background: rgba(168, 85, 247, 0.15) !important;
  border-color: #a855f7 !important;
  color: #c084fc !important;
}

.grand-module-sidebar-card.is-unlocked-state.grand-card-purple .grand-card-title {
  color: #ffffff !important;
}

.grand-module-sidebar-card.is-unlocked-state.grand-card-purple .grand-card-action,
.grand-module-sidebar-card.is-unlocked-state.grand-card-purple .grand-card-action * {
  color: #c084fc !important;
}

/* Floating 20x Logo Zoom Modal Animations */
@keyframes floatLogoPulse {
  0% {
    transform: translateY(0px) scale(1);
    filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 15px rgba(245, 158, 11, 0.2));
  }

  100% {
    transform: translateY(-8px) scale(1.03);
    filter: drop-shadow(0 18px 35px rgba(0, 0, 0, 0.7)) drop-shadow(0 0 25px rgba(245, 158, 11, 0.45));
  }
}

.logo-zoom-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 13, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.28s ease;
}

.logo-zoom-overlay.active {
  display: flex;
  opacity: 1;
}

.logo-zoom-card {
  background: linear-gradient(145deg, rgba(17, 24, 39, 0.95), rgba(11, 15, 25, 0.98));
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 24px;
  padding: 2.25rem 2rem;
  max-width: 500px;
  width: 100%;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.85), 0 0 35px rgba(245, 158, 11, 0.2);
  position: relative;
  transform: scale(0.7) translateY(20px);
  transition: transform 0.32s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.logo-zoom-overlay.active .logo-zoom-card {
  transform: scale(1) translateY(0);
}

.nav-link-custom {
  color: var(--text-muted);
  font-weight: 400;
  padding: 6px 12px;
  border: 1px solid rgba(245, 158, 11, 0.32);
  background: rgba(245, 158, 11, 0.04);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2), inset 0 0 0 1px rgba(245, 158, 11, 0.05);
}

.nav-link-custom:hover {
  color: #ffffff;
  border-color: rgba(245, 158, 11, 0.7);
  background: rgba(245, 158, 11, 0.12);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.25);
  transform: translateY(-1px);
}

.nav-link-custom.active {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.16);
  border-color: #f59e0b;
  font-weight: 600;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.35);
  transform: translateY(0);
}

/* 4 Distinct Matching Palette Themes for Top Navbar Portal Tools */
.nav-link-custom.nav-palette-emerald {
  color: #34d399;
  border-color: rgba(16, 185, 129, 0.45);
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.14), rgba(15, 23, 42, 0.75));
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25), inset 0 0 0 1px rgba(16, 185, 129, 0.1);
}

.nav-link-custom.nav-palette-emerald:hover {
  color: #ffffff;
  border-color: #10b981;
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.28), rgba(15, 23, 42, 0.85));
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.45);
  transform: translateY(-1.5px);
}

.nav-link-custom.nav-palette-emerald.active {
  color: #ffffff;
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.32), rgba(15, 23, 42, 0.9));
  border-color: #34d399;
  box-shadow: 0 0 18px rgba(16, 185, 129, 0.6);
}

.nav-link-custom.nav-palette-cyan {
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.45);
  background: linear-gradient(145deg, rgba(56, 189, 248, 0.14), rgba(15, 23, 42, 0.75));
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25), inset 0 0 0 1px rgba(56, 189, 248, 0.1);
}

.nav-link-custom.nav-palette-cyan:hover {
  color: #ffffff;
  border-color: #38bdf8;
  background: linear-gradient(145deg, rgba(56, 189, 248, 0.28), rgba(15, 23, 42, 0.85));
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.45);
  transform: translateY(-1.5px);
}

.nav-link-custom.nav-palette-cyan.active {
  color: #ffffff;
  background: linear-gradient(145deg, rgba(56, 189, 248, 0.32), rgba(15, 23, 42, 0.9));
  border-color: #38bdf8;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.6);
}

.nav-link-custom.nav-palette-amber {
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.45);
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.14), rgba(15, 23, 42, 0.75));
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25), inset 0 0 0 1px rgba(245, 158, 11, 0.1);
}

.nav-link-custom.nav-palette-amber:hover {
  color: #ffffff;
  border-color: #f59e0b;
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.28), rgba(15, 23, 42, 0.85));
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.45);
  transform: translateY(-1.5px);
}

.nav-link-custom.nav-palette-amber.active {
  color: #ffffff;
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.32), rgba(15, 23, 42, 0.9));
  border-color: #fbbf24;
  box-shadow: 0 0 18px rgba(245, 158, 11, 0.6);
}

.nav-link-custom.nav-palette-purple {
  color: #c084fc;
  border-color: rgba(168, 85, 247, 0.45);
  background: linear-gradient(145deg, rgba(168, 85, 247, 0.14), rgba(15, 23, 42, 0.75));
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25), inset 0 0 0 1px rgba(168, 85, 247, 0.1);
}

.nav-link-custom.nav-palette-purple:hover {
  color: #ffffff;
  border-color: #a855f7;
  background: linear-gradient(145deg, rgba(168, 85, 247, 0.28), rgba(15, 23, 42, 0.85));
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.45);
  transform: translateY(-1.5px);
}

.nav-link-custom.nav-palette-purple.active {
  color: #ffffff;
  background: linear-gradient(145deg, rgba(168, 85, 247, 0.32), rgba(15, 23, 42, 0.9));
  border-color: #c084fc;
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.6);
}

.nav-link-custom.nav-palette-rose {
  color: #fb7185;
  border-color: rgba(244, 63, 94, 0.45);
  background: linear-gradient(145deg, rgba(244, 63, 94, 0.14), rgba(15, 23, 42, 0.75));
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25), inset 0 0 0 1px rgba(244, 63, 94, 0.1);
}

.nav-link-custom.nav-palette-rose:hover {
  color: #ffffff;
  border-color: #f43f5e;
  background: linear-gradient(145deg, rgba(244, 63, 94, 0.28), rgba(15, 23, 42, 0.85));
  box-shadow: 0 0 16px rgba(244, 63, 94, 0.45);
  transform: translateY(-1.5px);
}

.nav-link-custom.nav-palette-rose.active {
  color: #ffffff;
  background: linear-gradient(145deg, rgba(244, 63, 94, 0.32), rgba(15, 23, 42, 0.9));
  border-color: #fb7185;
  box-shadow: 0 0 18px rgba(244, 63, 94, 0.6);
}

/* Light Theme Overrides for Palettes */
body.light-theme .nav-link-custom.nav-palette-emerald {
  color: #059669;
  border-color: rgba(16, 185, 129, 0.5);
  background: rgba(16, 185, 129, 0.12);
}

body.light-theme .nav-link-custom.nav-palette-cyan {
  color: #0284c7;
  border-color: rgba(56, 189, 248, 0.5);
  background: rgba(56, 189, 248, 0.12);
}

body.light-theme .nav-link-custom.nav-palette-amber {
  color: #d97706;
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(245, 158, 11, 0.12);
}

body.light-theme .nav-link-custom.nav-palette-purple {
  color: #9333ea;
  border-color: rgba(168, 85, 247, 0.5);
  background: rgba(168, 85, 247, 0.12);
}

body.light-theme .nav-link-custom.nav-palette-rose {
  color: #e11d48;
  border-color: rgba(244, 63, 94, 0.5);
  background: rgba(244, 63, 94, 0.12);
}

/* Modern Outline-Focused Buttons (No heavy solid fills) */
.btn-gold {
  background: transparent;
  color: #fbbf24;
  font-weight: 600;
  border: 1px solid #f59e0b;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  font-size: 0.9rem;
  text-decoration: none;
}

.btn-gold:hover:not(:disabled) {
  background: rgba(245, 158, 11, 0.12);
  border-color: #fbbf24;
  color: #fef08a;
}

.btn-gold:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  border-color: var(--border-color);
  color: var(--text-dim);
}

.btn-cyan {
  background: transparent;
  color: #38bdf8;
  font-weight: 600;
  border: 1px solid #0284c7;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  font-size: 0.9rem;
  text-decoration: none;
}

.btn-cyan:hover:not(:disabled) {
  background: rgba(6, 182, 212, 0.12);
  border-color: #38bdf8;
  color: #e0f2fe;
}

.btn-outline-dark {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border-color);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  font-size: 0.88rem;
  text-decoration: none;
}

.btn-outline-dark:hover {
  color: var(--text-main);
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.04);
}

.btn-danger-custom {
  background: transparent;
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.85rem;
}

.btn-danger-custom:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: #ef4444;
  color: #fca5a5;
}

/* Modern Clean Form Controls */
.form-label-custom {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 5px;
  display: block;
}

.form-control-custom {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  color: var(--text-main);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control-custom:focus {
  outline: none;
  border-color: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.25);
}

/* Modern High-Visibility Date Pickers */
input[type="date"],
input[type="time"],
.flatpickr-input,
.modern-date-input {
  color-scheme: dark;
  position: relative;
  cursor: pointer;
  font-family: 'Kantumruy Pro', 'Kantumruy', sans-serif !important;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  filter: invert(0.85) sepia(100%) saturate(700%) hue-rotate(5deg) brightness(1.25);
  opacity: 0.95;
  transition: transform 0.2s ease, filter 0.2s ease;
  font-size: 1.25rem;
  padding: 3px;
  border-radius: 4px;
}

input[type="date"]::-webkit-calendar-picker-indicator:hover {
  transform: scale(1.25);
  filter: invert(0.9) sepia(100%) saturate(1200%) hue-rotate(5deg) brightness(1.4) drop-shadow(0 0 8px rgba(245, 158, 11, 0.8));
  opacity: 1;
}

/* Modern Gray Clock Indicator for Time Pickers */
input[type="time"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  filter: invert(0.65) brightness(1.1);
  opacity: 0.85;
  transition: transform 0.2s ease, filter 0.2s ease, opacity 0.2s ease;
  font-size: 1.15rem;
  padding: 3px;
  border-radius: 4px;
}

input[type="time"]::-webkit-calendar-picker-indicator:hover {
  transform: scale(1.18);
  filter: invert(0.85) brightness(1.3);
  opacity: 1;
}

.modern-date-input {
  border: 1.5px solid rgba(245, 158, 11, 0.45) !important;
  background: rgba(15, 23, 42, 0.85) !important;
  font-weight: 600 !important;
  color: #f8fafc !important;
  transition: all 0.25s ease !important;
}

.modern-date-input:focus,
.modern-date-input:hover {
  border-color: #f59e0b !important;
  box-shadow: 0 0 15px rgba(245, 158, 11, 0.25) !important;
}

/* Modern Khmer Date Input styling (e.g. ០១-សីហា-២០២៦) */
.khmer-date-input {
  min-width: 155px !important;
  cursor: pointer !important;
  font-weight: 700 !important;
  color: #38bdf8 !important;
  letter-spacing: 0.3px !important;
  text-align: center !important;
  background: rgba(15, 23, 42, 0.85) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%23fbbf24" viewBox="0 0 16 16"><path d="M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5zM1 4v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4H1z"/></svg>') no-repeat calc(100% - 10px) center !important;
  background-size: 14px 14px !important;
  padding-right: 30px !important;
  border: 1.5px solid rgba(56, 189, 248, 0.35) !important;
  border-radius: 8px !important;
  transition: all 0.25s ease !important;
}

[data-theme="light"] .khmer-date-input {
  background-color: #ffffff !important;
  color: #0369a1 !important;
  border-color: rgba(3, 105, 161, 0.4) !important;
}

.khmer-date-input:focus,
.khmer-date-input:hover {
  border-color: #38bdf8 !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.3) !important;
}

/* Site Attendance Notification Pill Badges */
.site-notif-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(15, 23, 42, 0.8);
  border: 1.5px solid rgba(56, 189, 248, 0.35);
  padding: 5px 12px;
  border-radius: 30px;
  font-size: 0.84rem;
  color: #f8fafc;
  cursor: pointer;
  transition: all 0.22s ease-in-out;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  user-select: none;
  position: relative;
}

.site-notif-pill:hover {
  transform: translateY(-2px);
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.18);
  box-shadow: 0 4px 16px rgba(56, 189, 248, 0.35);
}

.site-notif-pill.active-filter {
  background: rgba(245, 158, 11, 0.22) !important;
  border-color: #f59e0b !important;
  color: #fbbf24 !important;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.4) !important;
}

.site-notif-pill .site-notif-name {
  font-weight: 700;
  white-space: nowrap;
}

.site-notif-pill .site-notif-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #ffffff;
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  font-size: 0.72rem;
  font-weight: 900;
  box-shadow: 0 2px 6px rgba(239, 68, 68, 0.6);
  letter-spacing: 0.2px;
}

[data-theme="light"] .site-notif-pill {
  background: #ffffff;
  color: #0f172a;
  border-color: rgba(3, 105, 161, 0.3);
}

[data-theme="light"] .site-notif-pill:hover {
  background: #f0f9ff;
  border-color: #0284c7;
}

/* Modern PIN Bullet Input Styling */
.modern-pin-input,
input.modern-pin-input,
.swal2-input.modern-pin-input {
  text-align: center !important;
  font-size: 2.6rem !important;
  line-height: 1.1 !important;
  letter-spacing: 14px !important;
  font-weight: 900 !important;
  color: #fbbf24 !important;
  background: rgba(15, 23, 42, 0.92) !important;
  border: 2px solid rgba(245, 158, 11, 0.6) !important;
  border-radius: 12px !important;
  padding: 10px 16px !important;
  height: 64px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(245, 158, 11, 0.2) !important;
  -webkit-text-security: disc !important;
  caret-color: #38bdf8 !important;
  transition: all 0.25s ease !important;
}

.modern-pin-input:focus,
input.modern-pin-input:focus,
.swal2-input.modern-pin-input:focus {
  border-color: #fbbf24 !important;
  box-shadow: 0 0 25px rgba(251, 191, 36, 0.4), inset 0 0 10px rgba(251, 191, 36, 0.15) !important;
  outline: none !important;
}

.modern-pin-input::placeholder,
input.modern-pin-input::placeholder,
.swal2-input.modern-pin-input::placeholder {
  font-size: 0.95rem !important;
  letter-spacing: normal !important;
  font-weight: normal !important;
  color: #64748b !important;
  -webkit-text-security: none !important;
}

/* Site Pill Cards */
.site-pill-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 8px;
}

.site-pill-card {
  background: var(--bg-input);
  border: 1px solid var(--border-card);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  user-select: none;
}

.site-pill-card:hover {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.03);
}

.site-pill-card.selected {
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.08);
}

.site-pill-card input[type="checkbox"] {
  accent-color: #f59e0b;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

/* Work Day Weight Pills */
.work-day-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.work-day-btn {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 400;
  border: 1px solid var(--border-card);
  background: var(--bg-input);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.work-day-btn:hover {
  border-color: var(--border-color);
  color: var(--text-main);
}

.work-day-btn.active-full {
  background: rgba(16, 185, 129, 0.22);
  border-color: #10b981;
  color: #34d399;
  font-weight: 700;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.4);
}

.work-day-btn.active-half {
  background: rgba(16, 185, 129, 0.22);
  border-color: #10b981;
  color: #34d399;
  font-weight: 700;
  box-shadow: 0 0 14px rgba(16, 185, 129, 0.4);
}

.work-day-btn.active-ot {
  background: rgba(59, 130, 246, 0.1);
  border-color: #3b82f6;
  color: #60a5fa;
  font-weight: 600;
}

.work-day-btn.active-leave {
  background: rgba(239, 68, 68, 0.1);
  border-color: #ef4444;
  color: #f87171;
  font-weight: 600;
}

/* Camera & Scanner Viewport */
.camera-container {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  max-height: 420px;
  background: #000;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-card);
  display: flex;
  align-items: center;
  justify-content: center;
}

.camera-container.unlocked {
  border-color: #10b981;
}

.camera-container.locked {
  border-color: rgba(239, 68, 68, 0.35);
}

.camera-lock-overlay {
  position: absolute;
  inset: 0;
  background: rgba(11, 15, 25, 0.94);
  backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  z-index: 20;
  text-align: center;
  padding: 20px;
}

.camera-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.camera-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.scanner-laser {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #06b6d4, #f59e0b, transparent);
  box-shadow: 0 0 10px #06b6d4;
  animation: laserScan 2.5s ease-in-out infinite alternate;
  z-index: 10;
  pointer-events: none;
}

@keyframes laserScan {
  0% {
    top: 5%;
    opacity: 0.2;
  }

  50% {
    opacity: 0.9;
  }

  100% {
    top: 92%;
    opacity: 0.2;
  }
}

/* Badges for Roles - Ultra Modern Glass Styling */
.badge-role {
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid;
  letter-spacing: 0.3px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.badge-role:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

.badge-role-boss {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(245, 158, 11, 0.15));
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.5);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
}

.badge-role-mgr {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(99, 102, 241, 0.15));
  color: #c084fc;
  border-color: rgba(192, 132, 252, 0.45);
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.2);
}

.badge-role-eng {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.2), rgba(56, 189, 248, 0.15));
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

.badge-role-arch {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.2), rgba(99, 102, 241, 0.15));
  color: #38bdf8;
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.2);
}

.badge-role-finance {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(52, 211, 153, 0.15));
  color: #34d399;
  border-color: rgba(52, 211, 153, 0.45);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.2);
}

.badge-role-admin {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(129, 140, 248, 0.15));
  color: #818cf8;
  border-color: rgba(129, 140, 248, 0.45);
  box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}

.badge-role-marketing {
  background: linear-gradient(135deg, rgba(244, 63, 94, 0.2), rgba(236, 72, 153, 0.15));
  color: #f472b6;
  border-color: rgba(244, 114, 182, 0.45);
  box-shadow: 0 0 10px rgba(244, 63, 94, 0.2);
}

.badge-role-security {
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.2), rgba(45, 212, 191, 0.15));
  color: #2dd4bf;
  border-color: rgba(45, 212, 191, 0.45);
  box-shadow: 0 0 10px rgba(20, 184, 166, 0.2);
}

.badge-role-tech {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(251, 191, 36, 0.15));
  color: #fbbf24;
  border-color: rgba(251, 191, 36, 0.45);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
}

.badge-role-wrk {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.15), rgba(15, 23, 42, 0.8));
  color: #67e8f9;
  border-color: rgba(103, 232, 249, 0.35);
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.15);
}

/* Clean Tables */
.table-custom {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  color: var(--text-main);
}

.table-custom th {
  background: #0f172a;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border-card);
}

.table-custom td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border-card);
  font-size: 0.88rem;
  vertical-align: middle;
}

.table-custom tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* Worker Avatar & Modern Interactive Hover */
.avatar-worker {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(245, 158, 11, 0.35);
  background: #1e293b;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}

.avatar-worker:hover {
  transform: scale(1.22);
  border-color: #f59e0b;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.65), 0 4px 12px rgba(0, 0, 0, 0.6);
  z-index: 10;
  position: relative;
}

@keyframes photoRingPulse {
  0% {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7), 0 0 20px rgba(245, 158, 11, 0.4);
  }

  100% {
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.9), 0 0 35px rgba(56, 189, 248, 0.6);
  }
}

/* Recognition Alert Toast */
.recognition-alert-banner {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #fca5a5;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: slideDown 0.3s ease;
}

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

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

/* Responsive Utilities */
@media (max-width: 768px) {
  .site-pill-grid {
    grid-template-columns: 1fr;
  }

  .navbar-custom {
    padding: 0.5rem 0.75rem;
  }

  .camera-container {
    max-height: 280px;
  }
}

/* Modern Icon Aesthetics */
.fa-solid,
.fa-regular,
.fa-brands {
  transition: transform 0.15s ease, color 0.15s ease;
}

.btn-gold:hover .fa-solid,
.btn-gold:hover .fa-regular,
.btn-cyan:hover .fa-solid,
.btn-cyan:hover .fa-regular,
.btn-outline-dark:hover .fa-solid,
.btn-outline-dark:hover .fa-regular {
  transform: scale(1.1);
}

.brand-badge i {
  color: #f59e0b;
  filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.4));
}

.nav-link-custom.active i {
  filter: drop-shadow(0 0 6px rgba(245, 158, 11, 0.5));
}

/* Highlight Animation for Attendance Table */
.glass-panel-highlight {
  animation: tableGlow 2s ease-in-out;
}

@keyframes tableGlow {
  0% {
    box-shadow: 0 0 0 rgba(245, 158, 11, 0);
    border-color: var(--border-card);
  }

  30% {
    box-shadow: 0 0 25px rgba(245, 158, 11, 0.4);
    border-color: #f59e0b;
  }

  70% {
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.4);
    border-color: #10b981;
  }

  100% {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    border-color: var(--border-card);
  }
}

/* ==========================================================================
   THEME SYSTEM: DARK VIEW & LIGHT VIEW
   ========================================================================== */

/* Theme Toggle Button */
.theme-toggle-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: #fbbf24;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.theme-toggle-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.5);
}

.theme-icon-light {
  display: none;
}

.theme-icon-dark {
  display: inline-block;
}

/* --------------------------------------------------------------------------
   LIGHT VIEW (DAY MODE) STYLES
   -------------------------------------------------------------------------- */
[data-theme="light"] {
  --bg-body: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-input: #ffffff;

  --primary: #d97706;
  --primary-hover: #b45309;
  --primary-light: rgba(217, 119, 6, 0.08);

  --accent-cyan: #0284c7;
  --accent-blue: #2563eb;
  --accent-green: #059669;
  --accent-red: #dc2626;

  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;

  --border-color: rgba(15, 23, 42, 0.12);
  --border-card: #e2e8f0;
  --border-active: #d97706;
}

/* Light Mode: Navbar & Brand */
[data-theme="light"] .navbar-custom {
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .brand-badge {
  background: #ffffff;
  border-color: rgba(217, 119, 6, 0.35);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06), 0 0 12px rgba(217, 119, 6, 0.15);
}

[data-theme="light"] .brand-name-text .brand-main {
  color: #0f172a;
}

[data-theme="light"] .brand-name-text .brand-accent {
  color: #d97706;
  text-shadow: none;
}

[data-theme="light"] .brand-tagline {
  color: #64748b;
}

[data-theme="light"] .nav-link-custom {
  color: #475569;
  border: 1px solid rgba(217, 119, 6, 0.35);
  background: rgba(245, 158, 11, 0.04);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .nav-link-custom:hover {
  color: #b45309;
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(217, 119, 6, 0.75);
  box-shadow: 0 0 8px rgba(217, 119, 6, 0.15);
}

[data-theme="light"] .nav-link-custom.active {
  color: #b45309;
  background: rgba(245, 158, 11, 0.18);
  border-color: #d97706;
  font-weight: 700;
  box-shadow: 0 0 12px rgba(217, 119, 6, 0.25);
}

/* Light Mode: Theme Toggle Button */
[data-theme="light"] .theme-toggle-btn {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.4);
  color: #b45309;
}

[data-theme="light"] .theme-icon-dark {
  display: none;
}

[data-theme="light"] .theme-icon-light {
  display: inline-block;
  color: #d97706;
}

/* Light Mode: Panels & Cards */
[data-theme="light"] .glass-panel {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .glass-panel:hover {
  border-color: #cbd5e1 !important;
}

/* Light Mode: Portal Hero Banner */
[data-theme="light"] .portal-hero-banner {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%) !important;
  border: 1.5px solid #e2e8f0 !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] .portal-hero-logo-img {
  animation: heroLogoFloating 3.6s ease-in-out infinite, heroLogoLightGlow 4s ease-in-out infinite alternate;
}

@keyframes heroLogoLightGlow {
  0% {
    filter: drop-shadow(0 0 16px rgba(217, 119, 6, 0.25)) drop-shadow(0 6px 16px rgba(0, 0, 0, 0.12));
  }
  50% {
    filter: drop-shadow(0 0 26px rgba(217, 119, 6, 0.45)) drop-shadow(0 0 18px rgba(2, 132, 199, 0.3)) drop-shadow(0 10px 20px rgba(0, 0, 0, 0.16));
  }
  100% {
    filter: drop-shadow(0 0 18px rgba(217, 119, 6, 0.3)) drop-shadow(0 8px 18px rgba(0, 0, 0, 0.14));
  }
}

[data-theme="light"] .portal-hero-logo-container:hover .portal-hero-logo-img {
  transform: scale(1.08) translateY(-4px);
  filter: drop-shadow(0 0 28px rgba(217, 119, 6, 0.55)) drop-shadow(0 0 20px rgba(2, 132, 199, 0.4)) drop-shadow(0 12px 24px rgba(0, 0, 0, 0.2));
}

[data-theme="light"] .portal-hero-title .portal-hero-kp {
  color: #d97706 !important;
  text-shadow: none !important;
}

[data-theme="light"] .portal-hero-title .portal-hero-builder {
  color: #0f172a !important;
  text-shadow: none !important;
}

[data-theme="light"] .portal-hero-sub {
  font-size: clamp(1.35rem, 2.3vw, 1.85rem) !important;
  color: #0284c7 !important;
  font-weight: 800 !important;
  text-shadow: 0 2px 6px rgba(2, 132, 199, 0.18) !important;
}

[data-theme="light"] .portal-hero-desc {
  color: #475569 !important;
}

[data-theme="light"] .portal-hero-tag {
  color: #059669 !important;
}

/* Light Mode: Portal Cards (Clean, Modern, Razor Sharp) */
[data-theme="light"] .portal-card {
  background: #ffffff !important;
  border: 1.5px solid #e2e8f0 !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05) !important;
}

[data-theme="light"] .portal-card:hover {
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.09) !important;
  transform: translateY(-3px);
}

[data-theme="light"] .portal-card.card-emerald {
  border-color: rgba(16, 185, 129, 0.4) !important;
}

[data-theme="light"] .portal-card.card-cyan.is-unlocked-state {
  border-color: rgba(2, 132, 199, 0.4) !important;
}

[data-theme="light"] .portal-card.card-amber.is-unlocked-state {
  border-color: rgba(217, 119, 6, 0.4) !important;
}

[data-theme="light"] .portal-card.card-purple.is-unlocked-state {
  border-color: rgba(147, 51, 234, 0.4) !important;
}

[data-theme="light"] .portal-card-title {
  color: #0f172a !important;
  font-weight: 800 !important;
}

[data-theme="light"] .portal-card-desc {
  color: #475569 !important;
}

[data-theme="light"] .portal-feature-box {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  color: #334155 !important;
}

[data-theme="light"] .portal-feature-item {
  background: #ffffff !important;
  border: 1px solid #e2e8f0 !important;
  color: #1e293b !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03) !important;
}

[data-theme="light"] .portal-quick-link {
  color: #0284c7 !important;
}

[data-theme="light"] .portal-quick-link:hover {
  color: #0369a1 !important;
}

/* Light Mode: Locked Card State */
[data-theme="light"] .portal-card.is-locked-state {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03) !important;
}

[data-theme="light"] .portal-card.is-locked-state .portal-icon-box {
  background: #e2e8f0 !important;
  border-color: #cbd5e1 !important;
  color: #64748b !important;
  box-shadow: none !important;
}

[data-theme="light"] .portal-card.is-locked-state .portal-card-title {
  color: #475569 !important;
}

[data-theme="light"] .portal-card.is-locked-state .portal-card-desc {
  color: #64748b !important;
}

[data-theme="light"] .portal-card.is-locked-state .portal-feature-box {
  background: #f1f5f9 !important;
  border-color: #e2e8f0 !important;
  color: #64748b !important;
}

[data-theme="light"] .portal-card.is-locked-state .portal-feature-box i {
  color: #64748b !important;
}

[data-theme="light"] .portal-card.is-locked-state .portal-card-action-btn {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #475569 !important;
  box-shadow: none !important;
}

[data-theme="light"] .portal-card.is-locked-state .portal-card-action-btn:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

/* Light Mode: Locked Navbar Pill */
[data-theme="light"] .nav-link-custom.is-locked-nav {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #64748b !important;
  box-shadow: none !important;
}

[data-theme="light"] .nav-link-custom.is-locked-nav:hover {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #334155 !important;
}

[data-theme="light"] .nav-link-custom.is-locked-nav .nav-lock-indicator {
  background: #e2e8f0 !important;
  border-color: #cbd5e1 !important;
}

/* Light Mode: Left Sidebar & Sidebar Grand Module Cards */
[data-theme="light"] .app-sidebar {
  background: #ffffff !important;
  border-right: 1px solid #e2e8f0 !important;
  box-shadow: 2px 0 15px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .app-sidebar-header {
  border-bottom: 1px solid #e2e8f0 !important;
}

[data-theme="light"] .app-sidebar-title {
  color: #64748b !important;
}

[data-theme="light"] .grand-module-sidebar-card {
  background: #ffffff !important;
  border: 1.5px solid #e2e8f0 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

[data-theme="light"] .grand-module-sidebar-card .grand-card-title {
  color: #0f172a !important;
}

[data-theme="light"] .grand-module-sidebar-card .grand-card-subtitle {
  color: #64748b !important;
}

[data-theme="light"] .grand-module-sidebar-card.is-locked-state {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  box-shadow: none !important;
}

[data-theme="light"] .grand-module-sidebar-card.is-locked-state .grand-card-icon-box {
  background: #e2e8f0 !important;
  border-color: #cbd5e1 !important;
  color: #64748b !important;
}

[data-theme="light"] .grand-module-sidebar-card.is-locked-state .grand-card-title {
  color: #475569 !important;
}

[data-theme="light"] .grand-module-sidebar-card.is-locked-state .grand-card-subtitle {
  color: #94a3b8 !important;
}

[data-theme="light"] .grand-module-sidebar-card.is-locked-state .grand-card-badge {
  background: #fee2e2 !important;
  border-color: #fca5a5 !important;
  color: #ef4444 !important;
}

[data-theme="light"] .grand-module-sidebar-card.is-locked-state .grand-card-action,
[data-theme="light"] .grand-module-sidebar-card.is-locked-state .grand-card-action * {
  color: #64748b !important;
}

[data-theme="light"] .grand-module-sidebar-card.is-unlocked-state.grand-card-cyan {
  background: #f0f9ff !important;
  border-color: #0284c7 !important;
}

[data-theme="light"] .grand-module-sidebar-card.is-unlocked-state.grand-card-cyan .grand-card-title {
  color: #0369a1 !important;
}

[data-theme="light"] .grand-module-sidebar-card.is-unlocked-state.grand-card-cyan .grand-card-action {
  color: #0284c7 !important;
}

[data-theme="light"] .grand-module-sidebar-card.is-unlocked-state.grand-card-amber {
  background: #fffbeb !important;
  border-color: #d97706 !important;
}

[data-theme="light"] .grand-module-sidebar-card.is-unlocked-state.grand-card-amber .grand-card-title {
  color: #b45309 !important;
}

[data-theme="light"] .grand-module-sidebar-card.is-unlocked-state.grand-card-amber .grand-card-action {
  color: #d97706 !important;
}

[data-theme="light"] .grand-module-sidebar-card.is-unlocked-state.grand-card-purple {
  background: #faf5ff !important;
  border-color: #9333ea !important;
}

[data-theme="light"] .grand-module-sidebar-card.is-unlocked-state.grand-card-purple .grand-card-title {
  color: #7e22ce !important;
}

[data-theme="light"] .grand-module-sidebar-card.is-unlocked-state.grand-card-purple .grand-card-action {
  color: #9333ea !important;
}

/* Light Mode: Tables */
[data-theme="light"] .table-custom th {
  background: #f8fafc;
  color: #334155;
  border-bottom: 1px solid #e2e8f0;
}

[data-theme="light"] .table-custom td {
  border-bottom: 1px solid #e2e8f0;
  color: #0f172a;
}

[data-theme="light"] .table-custom tr:hover td {
  background: #f8fafc;
}

/* Light Mode: Form Controls & Inputs */
[data-theme="light"] .form-control-custom {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  color: #0f172a;
}

[data-theme="light"] .form-control-custom:focus {
  border-color: #d97706;
  box-shadow: 0 0 0 2px rgba(217, 119, 6, 0.2);
}

[data-theme="light"] input[type="date"] {
  color-scheme: light;
}

[data-theme="light"] .modern-date-input {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1.5px solid #cbd5e1 !important;
}

[data-theme="light"] input[type="date"]::-webkit-calendar-picker-indicator,
[data-theme="light"] input[type="time"]::-webkit-calendar-picker-indicator {
  filter: none;
}

/* Light Mode: Buttons */
[data-theme="light"] .btn-outline-dark {
  color: #334155;
  border-color: #cbd5e1;
}

[data-theme="light"] .btn-outline-dark:hover {
  color: #0f172a;
  border-color: #94a3b8;
  background: #f1f5f9;
}

[data-theme="light"] .btn-gold {
  color: #b45309;
  border-color: #f59e0b;
  background: rgba(245, 158, 11, 0.08);
}

[data-theme="light"] .btn-gold:hover:not(:disabled) {
  background: rgba(245, 158, 11, 0.18);
  color: #78350f;
  border-color: #d97706;
}

[data-theme="light"] .btn-cyan {
  color: #0369a1;
  border-color: #0284c7;
  background: rgba(6, 182, 212, 0.08);
}

[data-theme="light"] .btn-cyan:hover:not(:disabled) {
  background: rgba(6, 182, 212, 0.16);
  color: #075985;
}

/* Light Mode: Pills & Selectors */
[data-theme="light"] .site-pill-card {
  background: #f8fafc;
  border-color: #e2e8f0;
}

[data-theme="light"] .site-pill-card:hover {
  border-color: #cbd5e1;
  background: #f1f5f9;
}

[data-theme="light"] .site-pill-card.selected {
  border-color: #d97706;
  background: rgba(245, 158, 11, 0.1);
}

[data-theme="light"] .work-day-btn {
  background: #f8fafc;
  border-color: #e2e8f0;
  color: #475569;
}

[data-theme="light"] .work-day-btn:hover {
  border-color: #cbd5e1;
  color: #0f172a;
}

/* Light Mode: Header & Clock */
[data-theme="light"] #liveClock {
  background: #f8fafc !important;
  color: #b45309 !important;
  border-color: #e2e8f0 !important;
}

[data-theme="light"] #btnNotifBell {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #b45309 !important;
}

[data-theme="light"] #notifDropdown {
  background: #ffffff !important;
  border-color: #e2e8f0 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12) !important;
}

[data-theme="light"] #notifDropdown div:first-child {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
}

/* Light Mode: Table Row Site Dropdown & Expense Inputs */
[data-theme="light"] .site-row-select {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

[data-theme="light"] .inline-expense-input {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #b45309 !important;
}

/* Light Mode: SweetAlert2 */
[data-theme="light"] .swal2-popup {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #e2e8f0 !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12) !important;
}

[data-theme="light"] .swal2-title {
  color: #0f172a !important;
}

[data-theme="light"] .swal2-html-container {
  color: #475569 !important;
}

/* Light Mode: Logo Zoom Modal */
[data-theme="light"] .logo-zoom-card {
  background: #ffffff;
  border-color: rgba(217, 119, 6, 0.35);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.15), 0 0 35px rgba(217, 119, 6, 0.15);
}

[data-theme="light"] .logo-zoom-card h2 {
  color: #0f172a !important;
}

[data-theme="light"] #btnCloseLogoZoom {
  background: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  color: #334155 !important;
}

/* Custom Multi-Select Dropdown Component */
.multi-select-wrap {
  position: relative;
  width: 100%;
}

.multi-select-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: rgba(15, 23, 42, 0.7);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--text-color);
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.2s ease;
  min-height: 40px;
  text-align: left;
}

.multi-select-trigger:hover,
.multi-select-trigger:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.multi-select-trigger .trigger-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 6px;
}

.multi-select-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 100%;
  min-width: 260px;
  max-width: 380px;
  background: #111827;
  border: 1.5px solid rgba(56, 189, 248, 0.4);
  border-radius: 10px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
  z-index: 1050;
  padding: 8px;
  backdrop-filter: blur(12px);
}

.multi-select-dropdown.open {
  display: block;
  animation: dropdownFade 0.15s ease-out;
}

@keyframes dropdownFade {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }

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

.multi-select-search-box {
  position: relative;
  margin-bottom: 6px;
}

.multi-select-search-input {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 6px 10px 6px 28px;
  font-size: 0.82rem;
  color: #fff;
  outline: none;
}

.multi-select-search-input:focus {
  border-color: #38bdf8;
}

.multi-select-search-icon {
  position: absolute;
  left: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 0.78rem;
}

.multi-select-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 2px 6px 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 4px;
}

.multi-select-action-btn {
  background: transparent;
  border: none;
  color: #38bdf8;
  font-size: 0.76rem;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: normal;
  transition: background 0.15s;
}

.multi-select-action-btn:hover {
  background: rgba(56, 189, 248, 0.12);
}

.multi-select-items-list {
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.multi-select-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s;
  user-select: none;
}

.multi-select-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.multi-select-item.selected {
  background: rgba(56, 189, 248, 0.1);
}

.multi-select-item input[type="checkbox"] {
  accent-color: #38bdf8;
  width: 15px;
  height: 15px;
  cursor: pointer;
}

/* Light theme overrides for Multi-Select */
[data-theme="light"] .multi-select-trigger {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

[data-theme="light"] .multi-select-dropdown {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15) !important;
}

[data-theme="light"] .multi-select-search-input {
  background: #f8fafc !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

[data-theme="light"] .multi-select-actions {
  border-color: #e2e8f0 !important;
}

[data-theme="light"] .multi-select-item:hover {
  background: #f1f5f9 !important;
}

[data-theme="light"] .multi-select-item.selected {
  background: #e0f2fe !important;
}

/* =========================================================
   Modern Custom Flatpickr Calendar Styling
   ========================================================= */
.flatpickr-calendar {
  background: #0f172a !important;
  background-color: #0f172a !important;
  border: 1.5px solid rgba(245, 158, 11, 0.45) !important;
  border-radius: 16px !important;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.8), 0 0 25px rgba(245, 158, 11, 0.2) !important;
  font-family: 'Kantumruy Pro', sans-serif !important;
  padding: 12px !important;
  width: 350px !important;
  max-width: 95vw !important;
  box-sizing: border-box !important;
  z-index: 99999 !important;
  opacity: 1 !important;
}

.flatpickr-calendar.arrowTop:before,
.flatpickr-calendar.arrowTop:after {
  border-bottom-color: #0f172a !important;
}

.flatpickr-calendar.arrowBottom:before,
.flatpickr-calendar.arrowBottom:after {
  border-top-color: #0f172a !important;
}

.flatpickr-months {
  background: transparent !important;
  padding: 4px 0 10px 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  display: flex !important;
  align-items: center !important;
  position: relative !important;
}

.flatpickr-current-month {
  font-size: 1rem !important;
  font-weight: normal !important;
  color: #fbbf24 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  width: 100% !important;
  left: 0 !important;
  position: static !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
  background: #1e293b !important;
  color: #fbbf24 !important;
  font-weight: normal !important;
  border-radius: 8px !important;
  padding: 4px 8px !important;
  font-size: 0.95rem !important;
}

.flatpickr-current-month input.cur-year {
  color: #fbbf24 !important;
  font-weight: normal !important;
  font-size: 1rem !important;
}

.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
  color: #38bdf8 !important;
  fill: #38bdf8 !important;
  padding: 8px !important;
  border-radius: 8px !important;
  top: 6px !important;
  transition: all 0.15s ease !important;
}

.flatpickr-months .flatpickr-prev-month:hover,
.flatpickr-months .flatpickr-next-month:hover {
  background: rgba(56, 189, 248, 0.15) !important;
  color: #fff !important;
  fill: #fff !important;
}

.flatpickr-innerContainer,
.flatpickr-rContainer,
.flatpickr-days {
  width: 100% !important;
  max-width: 100% !important;
}

.flatpickr-weekdays {
  width: 100% !important;
  max-width: 100% !important;
  padding: 6px 0 !important;
  box-sizing: border-box !important;
  display: flex !important;
}

.flatpickr-weekdaycontainer {
  width: 100% !important;
  display: flex !important;
  justify-content: space-around !important;
}

span.flatpickr-weekday {
  color: #38bdf8 !important;
  font-family: 'Kantumruy Pro', sans-serif !important;
  font-weight: normal !important;
  font-size: 0.88rem !important;
  flex: 1 0 14.28% !important;
  max-width: 14.28% !important;
  text-align: center !important;
}

.dayContainer {
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  padding: 4px 0 !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: space-around !important;
}

.khmer-day-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Kantumruy Pro', sans-serif !important;
  font-size: 0.98rem !important;
  font-weight: normal !important;
  line-height: 1 !important;
}

.flatpickr-day {
  color: #f1f5f9 !important;
  border-radius: 8px !important;
  font-weight: normal !important;
  flex: 0 0 13.5% !important;
  max-width: 13.5% !important;
  height: 38px !important;
  line-height: 38px !important;
  margin: 2px 0 !important;
  transition: all 0.15s ease !important;
  border: 1px solid transparent !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
}

.flatpickr-day:hover {
  background: rgba(245, 158, 11, 0.2) !important;
  border-color: rgba(245, 158, 11, 0.5) !important;
  color: #fbbf24 !important;
}

.flatpickr-day.today {
  border-color: #38bdf8 !important;
  color: #38bdf8 !important;
  font-weight: normal !important;
  background: rgba(56, 189, 248, 0.1) !important;
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  border-color: #fbbf24 !important;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.6) !important;
}

.flatpickr-day.selected .khmer-day-num {
  color: #000000 !important;
  font-weight: normal !important;
}

.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
  color: #475569 !important;
  opacity: 0.5 !important;
}

/* Light Theme Flatpickr */
[data-theme="light"] .flatpickr-calendar {
  background: #ffffff !important;
  background-color: #ffffff !important;
  border-color: #cbd5e1 !important;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.15), 0 0 25px rgba(217, 119, 6, 0.15) !important;
}

[data-theme="light"] .flatpickr-calendar.arrowTop:before,
[data-theme="light"] .flatpickr-calendar.arrowTop:after {
  border-bottom-color: #ffffff !important;
}

[data-theme="light"] .flatpickr-months {
  border-bottom-color: #e2e8f0 !important;
}

[data-theme="light"] .flatpickr-current-month {
  color: #b45309 !important;
}

[data-theme="light"] .flatpickr-current-month .flatpickr-monthDropdown-months {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}

[data-theme="light"] .flatpickr-current-month input.cur-year {
  color: #0f172a !important;
}

[data-theme="light"] .flatpickr-day {
  color: #0f172a !important;
}

[data-theme="light"] .flatpickr-day:hover {
  background: #fef3c7 !important;
  color: #b45309 !important;
}

[data-theme="light"] .flatpickr-day.selected {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
}

[data-theme="light"] .flatpickr-day.selected .khmer-day-num {
  color: #ffffff !important;
  font-weight: 900 !important;
}

[data-theme="light"] .flatpickr-day.prevMonthDay,
[data-theme="light"] .flatpickr-day.nextMonthDay {
  color: #94a3b8 !important;
  opacity: 0.5 !important;
}

/* ==========================================================================
   SWEETALERT2 MODAL THEME INTEGRATION (DARK & LIGHT VIEW)
   ========================================================================== */

/* Dark Mode SweetAlert2 (Default) */
.swal2-popup {
  background: #161d29 !important;
  border: 1.5px solid rgba(245, 158, 11, 0.4) !important;
  border-radius: 16px !important;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(245, 158, 11, 0.15) !important;
  color: #f8fafc !important;
  font-family: var(--font-main) !important;
  padding: 1.75rem !important;
}

.swal2-title {
  color: #f8fafc !important;
  font-size: 1.35rem !important;
  font-weight: 700 !important;
  margin-bottom: 0.5rem !important;
}

.swal2-html-container {
  color: #cbd5e1 !important;
  font-size: 0.95rem !important;
  line-height: 1.6 !important;
  margin: 0.75rem 0 1.25rem 0 !important;
}

.swal2-icon.swal2-question {
  border-color: #f59e0b !important;
  color: #fbbf24 !important;
}

.swal2-icon.swal2-warning {
  border-color: #f59e0b !important;
  color: #fbbf24 !important;
}

.swal2-icon.swal2-success {
  border-color: #10b981 !important;
  color: #34d399 !important;
}

.swal2-icon.swal2-error {
  border-color: #ef4444 !important;
  color: #f87171 !important;
}

.swal2-styled.swal2-confirm {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 0.92rem !important;
  padding: 8px 22px !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 15px rgba(245, 158, 11, 0.35) !important;
  border: none !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.swal2-styled.swal2-confirm:hover {
  background: linear-gradient(135deg, #fbbf24, #f59e0b) !important;
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.5) !important;
}

.swal2-styled.swal2-cancel {
  background: #334155 !important;
  color: #f1f5f9 !important;
  font-weight: 600 !important;
  font-size: 0.92rem !important;
  padding: 8px 20px !important;
  border-radius: 8px !important;
  border: 1px solid #475569 !important;
}

.swal2-styled.swal2-cancel:hover {
  background: #475569 !important;
  color: #ffffff !important;
}

/* Loan & Action Confirmation Box inside SweetAlert */
.loan-confirm-modal-box {
  text-align: left;
  background: rgba(15, 23, 42, 0.95);
  padding: 14px 18px;
  border-radius: 12px;
  border: 1.5px solid rgba(245, 158, 11, 0.4);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  font-size: 0.92rem;
  line-height: 1.7;
}

.loan-confirm-modal-box .confirm-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.loan-confirm-modal-box .confirm-label {
  color: #94a3b8;
  font-weight: 600;
  min-width: 100px;
}

.loan-confirm-modal-box .confirm-site-val {
  color: #38bdf8;
  font-weight: 700;
}

.loan-confirm-modal-box .confirm-worker-val {
  color: #f8fafc;
  font-weight: 700;
}

.loan-confirm-modal-box .confirm-amount-val {
  color: #fbbf24;
  font-size: 1.25rem;
  font-weight: 800;
  text-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
}

.loan-confirm-modal-box .confirm-note {
  margin-top: 10px;
  font-size: 0.78rem;
  color: #94a3b8;
  border-top: 1px dashed rgba(255, 255, 255, 0.15);
  padding-top: 8px;
  line-height: 1.45;
}

/* Light Mode SweetAlert2 */
[data-theme="light"] .swal2-popup {
  background: #ffffff !important;
  border: 1.5px solid rgba(217, 119, 6, 0.45) !important;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.15), 0 0 25px rgba(217, 119, 6, 0.12) !important;
  color: #0f172a !important;
}

[data-theme="light"] .swal2-title {
  color: #0f172a !important;
}

[data-theme="light"] .swal2-html-container {
  color: #334155 !important;
}

[data-theme="light"] .swal2-styled.swal2-cancel {
  background: #64748b !important;
  color: #ffffff !important;
  border: 1px solid #64748b !important;
}

[data-theme="light"] .swal2-styled.swal2-cancel:hover {
  background: #475569 !important;
}

[data-theme="light"] .loan-confirm-modal-box {
  background: #f8fafc;
  border: 1.5px solid #cbd5e1;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .loan-confirm-modal-box .confirm-label {
  color: #475569;
}

[data-theme="light"] .loan-confirm-modal-box .confirm-site-val {
  color: #0284c7;
}

[data-theme="light"] .loan-confirm-modal-box .confirm-worker-val {
  color: #0f172a;
}

[data-theme="light"] .loan-confirm-modal-box .confirm-amount-val {
  color: #d97706;
  text-shadow: none;
}

[data-theme="light"] .loan-confirm-modal-box .confirm-note {
  color: #64748b;
  border-top-color: #e2e8f0;
}

/* ==========================================================================
   UNIVERSAL WORKER AVATAR & LIGHTBOX HOVER EFFECT
   ========================================================================== */
.avatar-worker,
.worker-avatar,
img[data-worker-photo] {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid rgba(245, 158, 11, 0.45);
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  vertical-align: middle;
}

.avatar-worker:hover,
.worker-avatar:hover,
img[data-worker-photo]:hover {
  transform: scale(1.22);
  border-color: #fbbf24;
  box-shadow: 0 0 14px rgba(245, 158, 11, 0.65), 0 4px 10px rgba(0, 0, 0, 0.5);
  z-index: 10;
  position: relative;
}

[data-theme="light"] .avatar-worker,
[data-theme="light"] .worker-avatar,
[data-theme="light"] img[data-worker-photo] {
  border-color: rgba(217, 119, 6, 0.4);
}

[data-theme="light"] .avatar-worker:hover,
[data-theme="light"] .worker-avatar:hover,
[data-theme="light"] img[data-worker-photo]:hover {
  border-color: #d97706;
  box-shadow: 0 0 14px rgba(217, 119, 6, 0.5), 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Worker Avatar inside Loan Confirmation Modal */
.loan-confirm-worker-avatar,
.swal2-image.loan-confirm-worker-avatar {
  width: 92px !important;
  height: 92px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  border: 3.5px solid #f59e0b !important;
  box-shadow: 0 0 24px rgba(245, 158, 11, 0.55), 0 10px 30px rgba(0, 0, 0, 0.6) !important;
  margin: 0.25rem auto 1rem auto !important;
  background: #0f172a !important;
  padding: 2px !important;
  cursor: pointer !important;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.loan-confirm-worker-avatar:hover,
.swal2-image.loan-confirm-worker-avatar:hover {
  transform: scale(1.08) rotate(2deg) !important;
}

[data-theme="light"] .loan-confirm-worker-avatar,
[data-theme="light"] .swal2-image.loan-confirm-worker-avatar {
  border-color: #d97706 !important;
  box-shadow: 0 0 20px rgba(217, 119, 6, 0.35), 0 8px 22px rgba(0, 0, 0, 0.12) !important;
  background: #f8fafc !important;
}

/* ==========================================================================
   ORGANIZATION STRUCTURE (ORG CHART) ADVANCED STYLES & MODERN CONNECTORS
   ========================================================================== */
.org-chart-wrapper {
  overflow-x: auto;
  padding: 1.5rem 1rem 2rem 1rem;
}

.org-chart-tree {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  min-width: 1040px;
}

/* Tree Level Row */
.org-level {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 1.5rem;
  width: 100%;
  position: relative;
  z-index: 2;
}

/* Clean Tree System: Perfectly Centered Stems & Dynamically Spanning Crossbars */
.org-stem-parent {
  width: 1.5px;
  height: 24px;
  margin: 0 auto;
  position: relative;
  z-index: 4;
  box-shadow: none !important;
}

.org-stem-parent.gold-stem {
  background: #f59e0b;
  box-shadow: none !important;
}

.org-stem-parent.cyan-stem {
  background: #0284c7;
  box-shadow: none !important;
}

.org-stem-parent.emerald-stem {
  background: #10b981;
  box-shadow: none !important;
}

.org-junction-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #0284c7;
  box-shadow: none !important;
  position: absolute;
  bottom: -3px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
}

.gold-dot {
  background: #f59e0b;
  box-shadow: none !important;
}

.org-tree-level {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  position: relative;
  padding-top: 20px;
  margin-top: 0;
  z-index: 2;
}

/* Individual node wrapper */
.org-node-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  flex: 0 1 auto;
  width: fit-content;
  max-width: 100%;
}

/* Vertical drop stem into each card's center */
.org-tree-level>.org-node-col::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 1.5px;
  height: 20px;
  transform: translateX(-50%);
  z-index: 3;
  box-shadow: none !important;
}

/* Horizontal crossbar spanning cleanly from first child center to last child center */
.org-tree-level>.org-node-col::before {
  content: '';
  position: absolute;
  top: 0;
  height: 1.5px;
  left: calc(-1 * var(--tree-gap, 3.5rem) / 2);
  right: calc(-1 * var(--tree-gap, 3.5rem) / 2);
  z-index: 2;
  box-shadow: none !important;
}

.org-tree-level>.org-node-col:first-child::before {
  left: 50% !important;
}

.org-tree-level>.org-node-col:last-child::before {
  right: 50% !important;
}

.org-tree-level>.org-node-col:only-child::before {
  display: none !important;
}

/* Gold Branch Theme (Level 1 -> 2) */
.gold-tree>.org-node-col::before {
  background: #f59e0b;
  box-shadow: none !important;
}

.gold-tree>.org-node-col::after {
  background: #f59e0b;
  box-shadow: none !important;
}

/* Cyan Branch Theme (Level 2 -> 3) */
.cyan-tree>.org-node-col::before {
  background: #0284c7;
  box-shadow: none !important;
}

.cyan-tree>.org-node-col::after {
  background: #0284c7;
  box-shadow: none !important;
}

/* Emerald Branch Theme (Level 3 -> 4) */
.emerald-tree>.org-node-col::before {
  background: #10b981;
  box-shadow: none !important;
}

.emerald-tree>.org-node-col::after {
  background: #10b981;
  box-shadow: none !important;
}

/* Foremen Branch Theme (Level 4 -> 5) */
.foremen-tree>.org-node-col::before {
  background: #f59e0b;
  box-shadow: none !important;
}

.foremen-tree>.org-node-col::after {
  background: #f59e0b;
  box-shadow: none !important;
}

/* Cards (Auto-fit to content) */
.org-node-card {
  display: inline-flex;
  align-items: center;
  position: relative;
  width: fit-content;
  max-width: 100%;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 6px 0;
  cursor: pointer;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.org-node-card:hover {
  transform: translateY(-4px) scale(1.015);
}

.org-node-avatar {
  width: 125px;
  height: 125px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #38bdf8;
  cursor: pointer;
  flex-shrink: 0;
  z-index: 3;
  box-shadow: none !important;
  transition: transform 0.25s ease;
  background: #0f172a;
}

.gold-node .org-node-avatar {
  width: 135px;
  height: 135px;
  border-color: #f59e0b;
  box-shadow: none !important;
}

.emerald-node .org-node-avatar {
  border-color: #10b981;
  box-shadow: none !important;
}

.indigo-node .org-node-avatar {
  border-color: #6366f1;
  box-shadow: none !important;
}

.pink-node .org-node-avatar {
  border-color: #ec4899;
  box-shadow: none !important;
}

.org-node-avatar:hover {
  transform: scale(1.06);
}

/* Info Box (Auto-fits actual text content) */
.org-node-info {
  flex: 0 0 auto;
  width: fit-content;
  max-width: 340px;
  margin-left: -26px;
  padding: 12px 22px 12px 38px;
  min-height: 95px;
  justify-content: center;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.95));
  border: 2px solid rgba(56, 189, 248, 0.65);
  border-radius: 16px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4), 0 0 14px rgba(56, 189, 248, 0.18);
  backdrop-filter: blur(10px);
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
  transition: all 0.3s ease;
}

.org-node-card:hover .org-node-info {
  border-color: #38bdf8;
  box-shadow: 0 12px 32px rgba(56, 189, 248, 0.35), 0 0 20px rgba(56, 189, 248, 0.25);
}

.gold-node .org-node-info {
  border-color: rgba(245, 158, 11, 0.7);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4), 0 0 16px rgba(245, 158, 11, 0.2);
}

.gold-node:hover .org-node-info {
  border-color: #fbbf24;
  box-shadow: 0 14px 35px rgba(245, 158, 11, 0.45), 0 0 24px rgba(245, 158, 11, 0.3);
}

.emerald-node .org-node-info {
  border-color: rgba(52, 211, 153, 0.7);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4), 0 0 16px rgba(16, 185, 129, 0.2);
}

.emerald-node:hover .org-node-info {
  border-color: #34d399;
  box-shadow: 0 14px 35px rgba(52, 211, 153, 0.45), 0 0 24px rgba(16, 185, 129, 0.3);
}

.indigo-node .org-node-info {
  border-color: rgba(129, 140, 248, 0.7);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4), 0 0 16px rgba(99, 102, 241, 0.2);
}

.indigo-node:hover .org-node-info {
  border-color: #818cf8;
  box-shadow: 0 14px 35px rgba(129, 140, 248, 0.45), 0 0 24px rgba(99, 102, 241, 0.3);
}

.pink-node .org-node-info {
  border-color: rgba(244, 114, 182, 0.7);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4), 0 0 16px rgba(236, 72, 153, 0.2);
}

.pink-node:hover .org-node-info {
  border-color: #f472b6;
  box-shadow: 0 14px 35px rgba(244, 114, 182, 0.45), 0 0 24px rgba(236, 72, 153, 0.3);
}

.org-node-card.vacant-node .org-node-info {
  border-style: dashed;
  background: rgba(15, 23, 42, 0.6);
}

/* Name & Role Text (Fully visible on one line) */
.org-node-name {
  font-size: 1.05rem;
  font-weight: 800;
  color: #ffffff;
  white-space: nowrap;
  line-height: 1.35;
  letter-spacing: 0.1px;
}

.org-node-role {
  font-size: 0.8rem;
  font-weight: 700;
  color: #38bdf8;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.35);
  width: fit-content;
  max-width: 100%;
  white-space: nowrap;
  line-height: 1.35;
}

.gold-node .org-node-role {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.45);
}

.emerald-node .org-node-role {
  color: #34d399;
  background: rgba(16, 185, 129, 0.16);
  border-color: rgba(16, 185, 129, 0.45);
}

.indigo-node .org-node-role {
  color: #818cf8;
  background: rgba(99, 102, 241, 0.16);
  border-color: rgba(99, 102, 241, 0.45);
}

.pink-node .org-node-role {
  color: #f472b6;
  background: rgba(236, 72, 153, 0.16);
  border-color: rgba(236, 72, 153, 0.45);
}

.org-node-code {
  display: none;
}

/* Light Theme for Org Chart */
[data-theme="light"] .org-node-card {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .org-node-card:hover {
  border-color: #0284c7;
  box-shadow: 0 8px 25px rgba(2, 132, 199, 0.15);
}

[data-theme="light"] .org-node-card.gold-node {
  background: linear-gradient(135deg, #ffffff, #fffbeb);
  border-color: rgba(217, 119, 6, 0.4);
}

[data-theme="light"] .org-node-card.gold-node:hover {
  border-color: #d97706;
  box-shadow: 0 8px 25px rgba(217, 119, 6, 0.2);
}

[data-theme="light"] .org-node-card.vacant-node {
  background: #f8fafc;
  border-color: #cbd5e1;
}

[data-theme="light"] .org-node-name {
  color: #0f172a;
}

[data-theme="light"] .org-node-role {
  color: #0284c7;
  background: rgba(2, 132, 199, 0.1);
  border-color: rgba(2, 132, 199, 0.25);
}

[data-theme="light"] .gold-node .org-node-role {
  color: #d97706;
  background: rgba(217, 119, 6, 0.1);
  border-color: rgba(217, 119, 6, 0.25);
}

[data-theme="light"] .emerald-node .org-node-role {
  color: #059669;
  background: rgba(5, 150, 105, 0.1);
  border-color: rgba(5, 150, 105, 0.25);
}

[data-theme="light"] .indigo-node .org-node-role {
  color: #4f46e5;
  background: rgba(79, 70, 229, 0.1);
  border-color: rgba(79, 70, 229, 0.25);
}

[data-theme="light"] .pink-node .org-node-role {
  color: #db2777;
  background: rgba(219, 39, 119, 0.1);
  border-color: rgba(219, 39, 119, 0.25);
}

[data-theme="light"] .org-stem-top,
[data-theme="light"] .org-stem-down-child,
[data-theme="light"] .org-crossbar-line {
  box-shadow: 0 0 6px rgba(2, 132, 199, 0.4);
}

/* Sub-Tabs System in company_projects.php */
.subtab-nav-wrapper {
  display: flex;
  gap: 8px;
  background: rgba(15, 23, 42, 0.75);
  padding: 6px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 1.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.subtab-nav-wrapper::-webkit-scrollbar {
  display: none;
}

.subtab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
}

.subtab-btn:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.subtab-btn.active {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.3);
}

.subtab-btn.active-gold {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.3);
}

.subtab-btn.active-emerald {
  color: #34d399;
  background: rgba(16, 185, 129, 0.15);
  border-color: rgba(16, 185, 129, 0.45);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.3);
}

.subtab-btn.active-cyan {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.3);
}

.subtab-btn.active-amber {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.15);
  border-color: rgba(245, 158, 11, 0.45);
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.3);
}

.subtab-btn.active-purple {
  color: #c084fc;
  background: rgba(168, 85, 247, 0.15);
  border-color: rgba(168, 85, 247, 0.45);
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.3);
}

.year-filter-pill {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.84rem;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.year-filter-pill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.year-filter-pill.active {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.35);
}

/* Document & Contract Item Cards */
.doc-card-item {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.25s ease;
}

.doc-card-item:hover {
  border-color: rgba(56, 189, 248, 0.4);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4), 0 0 15px rgba(56, 189, 248, 0.15);
  transform: translateY(-2px);
}

[data-theme="light"] .subtab-nav-wrapper {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

[data-theme="light"] .subtab-btn {
  color: #64748b;
}

[data-theme="light"] .subtab-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

[data-theme="light"] .subtab-btn.active {
  background: #e0f2fe;
  color: #0284c7;
  border-color: #38bdf8;
}

[data-theme="light"] .year-filter-pill {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #475569;
}

[data-theme="light"] .year-filter-pill.active {
  background: #e0f2fe;
  border-color: #0284c7;
  color: #0284c7;
}

[data-theme="light"] .doc-card-item {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* ========================================================================= */
/* 3 OTHER GRAND MODULES SIDEBAR CARDS & SUB-PAGE RESPONSIVE LAYOUT         */
/* ========================================================================= */
.app-subpage-layout {
  display: flex;
  min-height: calc(100vh - 58px);
  width: 100%;
  position: relative;
  transition: all 0.3s ease;
}

/* Left Sidebar Navigation for 3 Other Grand Modules */
.app-sidebar {
  width: 260px;
  min-width: 260px;
  max-width: 260px;
  background: #0b1120;
  border-right: 1px solid var(--border-card);
  padding: 1.1rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  position: sticky;
  top: 58px;
  height: calc(100vh - 58px);
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 995;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  flex-shrink: 0;
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.35);
}

.app-sidebar::-webkit-scrollbar {
  width: 4px;
}

.app-sidebar::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 4px;
}

.sidebar-nav-header {
  font-size: 0.76rem;
  font-weight: 800;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 0 4px 8px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Grand Module Sidebar Card (3 Boxes on Left) */
.grand-module-sidebar-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1rem 0.95rem;
  border-radius: 14px;
  border: 1.5px solid rgba(255, 255, 255, 0.1);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  min-height: 125px;
}

.grand-module-sidebar-card:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5);
}

/* Palette Specific Styles for the 3 Cards */
.grand-card-emerald {
  border-color: rgba(16, 185, 129, 0.35);
  background: linear-gradient(145deg, rgba(16, 185, 129, 0.12), rgba(15, 23, 42, 0.95));
}

.grand-card-emerald:hover {
  border-color: #10b981;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5), 0 0 16px rgba(16, 185, 129, 0.3);
}

.grand-card-cyan {
  border-color: rgba(56, 189, 248, 0.35);
  background: linear-gradient(145deg, rgba(56, 189, 248, 0.12), rgba(15, 23, 42, 0.95));
}

.grand-card-cyan:hover {
  border-color: #38bdf8;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5), 0 0 16px rgba(56, 189, 248, 0.3);
}

.grand-card-amber {
  border-color: rgba(245, 158, 11, 0.35);
  background: linear-gradient(145deg, rgba(245, 158, 11, 0.12), rgba(15, 23, 42, 0.95));
}

.grand-card-amber:hover {
  border-color: #f59e0b;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5), 0 0 16px rgba(245, 158, 11, 0.3);
}

.grand-card-purple {
  border-color: rgba(168, 85, 247, 0.35);
  background: linear-gradient(145deg, rgba(168, 85, 247, 0.12), rgba(15, 23, 42, 0.95));
}

.grand-card-purple:hover {
  border-color: #a855f7;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.5), 0 0 16px rgba(168, 85, 247, 0.3);
}

.grand-card-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.grand-card-icon-box {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.25s ease;
}

.grand-module-sidebar-card:hover .grand-card-icon-box {
  transform: scale(1.1);
}

.grand-card-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.grand-card-title {
  font-size: 0.94rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 3px;
  letter-spacing: 0.2px;
  line-height: 1.35;
}

.grand-card-subtitle {
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.35;
  margin-bottom: 6px;
}

.grand-card-action {
  font-size: 0.74rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
  padding-top: 5px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* Home Button in Sidebar */
.sidebar-home-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
  margin-top: auto;
}

.sidebar-home-btn:hover {
  background: rgba(56, 189, 248, 0.12);
  border-color: #38bdf8;
  color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

/* Palette Specific Sidebar Links */
.sidebar-link-home .sidebar-icon-box {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.sidebar-link-home.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.16), rgba(15, 23, 42, 0.95));
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.3), inset 0 0 0 1px rgba(56, 189, 248, 0.2);
}

.sidebar-link-attendance .sidebar-icon-box {
  background: rgba(16, 185, 129, 0.14);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.sidebar-link-attendance.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(15, 23, 42, 0.95));
  border-color: #34d399;
  color: #ffffff;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.35), inset 0 0 0 1px rgba(16, 185, 129, 0.2);
}

.sidebar-link-monthly .sidebar-icon-box {
  background: rgba(56, 189, 248, 0.14);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.sidebar-link-monthly.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.18), rgba(15, 23, 42, 0.95));
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.35), inset 0 0 0 1px rgba(56, 189, 248, 0.2);
}

.sidebar-link-payroll .sidebar-icon-box {
  background: rgba(16, 185, 129, 0.14);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.35);
}

.sidebar-link-payroll.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18), rgba(15, 23, 42, 0.95));
  border-color: #10b981;
  color: #ffffff;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.35), inset 0 0 0 1px rgba(16, 185, 129, 0.2);
}

.sidebar-link-master .sidebar-icon-box {
  background: rgba(6, 182, 212, 0.14);
  color: #06b6d4;
  border: 1px solid rgba(6, 182, 212, 0.35);
}

.sidebar-link-master.active {
  background: linear-gradient(135deg, rgba(6, 182, 212, 0.18), rgba(15, 23, 42, 0.95));
  border-color: #06b6d4;
  color: #ffffff;
  box-shadow: 0 0 16px rgba(6, 182, 212, 0.35), inset 0 0 0 1px rgba(6, 182, 212, 0.2);
}

.sidebar-link-projects .sidebar-icon-box {
  background: rgba(56, 189, 248, 0.14);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.sidebar-link-projects.active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.18), rgba(15, 23, 42, 0.95));
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.35), inset 0 0 0 1px rgba(56, 189, 248, 0.2);
}

/* --------------------------------------------------------------------------
   ATTENDANCE MOBILE VIEW / PC VIEW RESPONSIVE ENGINE
   -------------------------------------------------------------------------- */

/* View Mode Toggle Pill Bar */
.view-mode-toggle-wrap {
  display: inline-flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.75);
  border: 1.5px solid rgba(56, 189, 248, 0.35);
  border-radius: 24px;
  padding: 3px;
  gap: 4px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.view-mode-pill-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  width: 34px;
  height: 32px;
  padding: 0;
  border-radius: 18px;
  font-size: 0.95rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  user-select: none;
}

.view-mode-pill-btn:hover {
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.08);
}

.view-mode-pill-btn.active {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
}

[data-theme="light"] .view-mode-toggle-wrap {
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .view-mode-pill-btn {
  color: #64748b;
}

[data-theme="light"] .view-mode-pill-btn:hover {
  color: #0f172a;
  background: #f1f5f9;
}

[data-theme="light"] .view-mode-pill-btn.active {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.3);
}

/* ==========================================================================
   MOBILE PREVIEW MODE: FULL ISOLATION (HIDES NAVBAR & SIDEBAR)
   ========================================================================== */
body.mobile-preview-mode .navbar-custom,
body.mobile-preview-mode .app-sidebar,
body.mobile-preview-mode .sidebar-backdrop {
  display: none !important;
}

body.mobile-preview-mode .app-subpage-layout {
  display: flex !important;
  justify-content: center !important;
  align-items: flex-start !important;
  padding: 0.75rem 0.5rem !important;
  margin: 0 auto !important;
  width: 100% !important;
  min-height: 100vh !important;
  background: radial-gradient(circle at 50% 15%, rgba(15, 23, 42, 0.98), #030712) !important;
}

@media (max-width: 768px) {
  body.mobile-preview-mode .app-subpage-layout {
    padding: 0.35rem 0.25rem !important;
  }
}

[data-theme="light"] body.mobile-preview-mode .app-subpage-layout {
  background: radial-gradient(circle at 50% 15%, #f8fafc, #e2e8f0) !important;
}

body.mobile-preview-mode .app-subpage-main {
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  display: flex !important;
  justify-content: center !important;
}

/* ==========================================================================
   MOBILE VIEW MODE CONTAINER (Clean Full Edge-to-Edge Layout, No Phone Bezel)
   ========================================================================== */
.att-mode-mobile {
  max-width: 600px !important;
  width: 100% !important;
  margin: 0.25rem auto 2rem auto !important;
  padding: 0 !important;
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  position: relative !important;
  transition: max-width 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

[data-theme="light"] .att-mode-mobile {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* Remove Simulated Smartphone Dynamic Island / Speaker Pill & Home Bar completely */
.att-mode-mobile::before,
.att-mode-mobile::after {
  display: none !important;
}

/* ==========================================================================
   MODAL DEVICE FRAME — Simulated Smartphone / PC View for Modals
   (Equipment Log & Daily Expense modals use this frame)
   ========================================================================== */

/* === The outer modal container === */
.modal-device-frame {
  position: relative;
  width: 100%;
  transition: max-width 0.35s cubic-bezier(0.4, 0, 0.2, 1), border-radius 0.3s ease, border-width 0.3s ease, box-shadow 0.35s ease;
  overflow: hidden;
  background: #0f172a;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.modal-device-frame::-webkit-scrollbar,
.modal-device-frame.mode-mobile::-webkit-scrollbar,
.modal-device-frame.mode-pc::-webkit-scrollbar,
.modal-device-frame form::-webkit-scrollbar,
.modal-device-frame .modal-device-body::-webkit-scrollbar,
#modalMobileExpense::-webkit-scrollbar,
#modalMobileEquipment::-webkit-scrollbar,
#frameModalMobileExpense::-webkit-scrollbar,
#frameModalMobileEquipment::-webkit-scrollbar,
#formMobileExpense::-webkit-scrollbar,
#formMobileEquipment::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}

/* Mobile view modal frame (Full edge-to-edge modal with hidden scrollbar) */
.modal-device-frame.mode-mobile {
  width: 100%;
  max-width: 520px;
  background: #0f172a;
  border: 1.5px solid rgba(56, 189, 248, 0.3);
  border-radius: 14px;
  box-shadow:
    0 25px 50px -12px rgba(0, 0, 0, 0.8),
    0 0 25px rgba(56, 189, 248, 0.15);
  padding: 0;
  max-height: 96vh;
  overflow-y: auto;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

/* PC wide frame */
.modal-device-frame.mode-pc {
  max-width: 860px;
  background: #0f172a;
  border: 2px solid rgba(56, 189, 248, 0.3);
  border-radius: 16px;
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.7),
    0 0 25px rgba(56, 189, 248, 0.15);
  padding: 0;
  max-height: 94vh;
  overflow-y: auto;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

/* === Dynamic Island / Notch & Home bar hidden === */
.device-notch-pill,
.device-home-bar,
.modal-device-frame.mode-pc .device-notch-pill,
.modal-device-frame.mode-pc .device-home-bar {
  display: none !important;
}

/* === Header bar inside frame (title + toggle buttons) === */
.modal-screen-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 0;
  background: rgba(15, 23, 42, 0.8);
}

/* In PC mode, give header bar a slightly different look */
.modal-device-frame.mode-pc .modal-screen-header-bar {
  padding: 12px 18px;
  background: rgba(15, 23, 42, 0.9);
  border-bottom: 1px solid rgba(56, 189, 248, 0.2);
}

/* === Content scroll area inside device frame (edge-to-edge optimized) === */
.modal-device-frame form,
.modal-device-frame .modal-device-body {
  padding: 8px 6px;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.modal-device-frame.mode-pc form,
.modal-device-frame.mode-pc .modal-device-body {
  padding: 14px 18px;
}



/* Number Label Badge (១., ២., ៣., ៤., ៥.) */
.label-num-badge {
  color: #fbbf24;
  font-weight: 800;
  font-size: 0.95rem;
  margin-right: 2px;
  display: inline-block;
  text-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
}

/* Advanced Options Toggle & Content for PC vs Mobile View */
.att-advanced-content {
  display: block;
  margin-top: 8px;
  border-top: none;
  padding-top: 0;
}

.att-advanced-toggle-btn {
  display: flex !important;
  width: 100%;
  background: transparent;
  border: none;
  padding: 0 0 6px 0;
  color: #f8fafc;
  align-items: center;
  justify-content: space-between;
  user-select: none;
  pointer-events: none;
}

.att-advanced-toggle-btn .toggle-icon,
.att-advanced-toggle-btn #manualAddToggleText,
.att-advanced-toggle-btn #loanToggleText {
  display: none !important;
}

/* Mobile View (att-mode-mobile): Collapsible Accordion Buttons */
.att-mode-mobile .att-advanced-toggle-btn,
.mobile-preview-mode .att-advanced-toggle-btn {
  background: rgba(15, 23, 42, 0.7) !important;
  border: 1.5px solid rgba(245, 158, 11, 0.35) !important;
  border-radius: 12px !important;
  padding: 10px 14px !important;
  cursor: pointer !important;
  pointer-events: auto !important;
  transition: all 0.25s ease;
}

.att-mode-mobile .att-advanced-toggle-btn.btn-cyan-toggle,
.mobile-preview-mode .att-advanced-toggle-btn.btn-cyan-toggle {
  border-color: rgba(56, 189, 248, 0.35) !important;
}

.att-mode-mobile .att-advanced-toggle-btn.btn-cyan-toggle:hover,
.mobile-preview-mode .att-advanced-toggle-btn.btn-cyan-toggle:hover {
  background: rgba(56, 189, 248, 0.15) !important;
  border-color: #38bdf8 !important;
}

.att-mode-mobile .att-advanced-toggle-btn:hover,
.mobile-preview-mode .att-advanced-toggle-btn:hover {
  background: rgba(245, 158, 11, 0.15) !important;
  border-color: #fbbf24 !important;
}

.att-mode-mobile .att-advanced-toggle-btn .toggle-icon,
.att-mode-mobile .att-advanced-toggle-btn #manualAddToggleText,
.att-mode-mobile .att-advanced-toggle-btn #loanToggleText,
.mobile-preview-mode .att-advanced-toggle-btn .toggle-icon,
.mobile-preview-mode .att-advanced-toggle-btn #manualAddToggleText,
.mobile-preview-mode .att-advanced-toggle-btn #loanToggleText {
  display: inline-flex !important;
}

[data-theme="light"] .att-mode-mobile .att-advanced-toggle-btn,
[data-theme="light"] .mobile-preview-mode .att-advanced-toggle-btn {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

[data-theme="light"] .att-mode-mobile .att-advanced-toggle-btn.btn-cyan-toggle,
[data-theme="light"] .mobile-preview-mode .att-advanced-toggle-btn.btn-cyan-toggle {
  border-color: rgba(2, 132, 199, 0.35) !important;
}

.att-mode-mobile .att-advanced-content,
.mobile-preview-mode .att-advanced-content {
  display: none !important;
  margin-top: 12px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  padding-top: 10px;
}

.att-mode-mobile .att-advanced-content.is-expanded,
.mobile-preview-mode .att-advanced-content.is-expanded {
  display: block !important;
  animation: dropdownFade 0.25s ease-out;
}

/* Light Cyan / Sky Blue Palette Save Button (ប៊ូតុងរក្សាទុកពណ៌ខៀវស្រាល) */
.btn-save-cyan {
  background: linear-gradient(135deg, #0284c7, #06b6d4) !important;
  border: 1.5px solid #38bdf8 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.4), 0 0 10px rgba(56, 189, 248, 0.3) !important;
  font-weight: 800 !important;
  cursor: pointer;
  transition: all 0.25s ease !important;
}

.btn-save-cyan:hover {
  background: linear-gradient(135deg, #0369a1, #0891b2) !important;
  border-color: #7dd3fc !important;
  box-shadow: 0 6px 22px rgba(6, 182, 212, 0.6), 0 0 16px rgba(56, 189, 248, 0.5) !important;
  transform: translateY(-1px) scale(1.02);
}

[data-theme="light"] .btn-save-cyan {
  background: linear-gradient(135deg, #0284c7, #0ea5e9) !important;
  color: #ffffff !important;
  border-color: #0284c7 !important;
}

/* Modern Aesthetic Quick Date Pills (ថ្ងៃនេះ & ម្សិលមិញ) */
.att-quick-date-pills {
  display: flex;
  gap: 6px;
  align-items: center;
}

.att-date-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  font-size: 0.76rem;
  font-weight: 700;
  border-radius: 20px;
  background: rgba(15, 23, 42, 0.75);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  user-select: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.att-date-pill-btn i {
  font-size: 0.74rem;
  transition: transform 0.25s ease;
}

.att-date-pill-btn:hover {
  border-color: rgba(56, 189, 248, 0.5);
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(56, 189, 248, 0.25);
}

.att-date-pill-btn:hover i {
  transform: scale(1.15);
}

.att-date-pill-btn.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.22), rgba(56, 189, 248, 0.25)) !important;
  border-color: #38bdf8 !important;
  color: #ffffff !important;
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.4), inset 0 0 8px rgba(56, 189, 248, 0.2) !important;
  font-weight: 800 !important;
}

.att-date-pill-btn.active i.text-amber {
  color: #fbbf24 !important;
  filter: drop-shadow(0 0 6px rgba(251, 191, 36, 0.8));
}

.att-date-pill-btn.active i.text-cyan {
  color: #38bdf8 !important;
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.8));
}

[data-theme="light"] .att-date-pill-btn {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #475569;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .att-date-pill-btn:hover {
  background: #f1f5f9;
  border-color: #0284c7;
  color: #0f172a;
}

[data-theme="light"] .att-date-pill-btn.active {
  background: linear-gradient(135deg, #e0f2fe, #fef3c7) !important;
  border-color: #0284c7 !important;
  color: #0369a1 !important;
  box-shadow: 0 2px 10px rgba(2, 132, 199, 0.3) !important;
}

.main-input-grid.loan-mode-grid {
  grid-template-columns: 1fr !important;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

/* Child layout transforms for Mobile Mode */
.att-mode-mobile .main-input-grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 1rem !important;
}

.att-mode-mobile .att-left-col {
  display: contents !important;
}

.att-mode-mobile .att-config-panel {
  order: 1 !important;
}

.att-mode-mobile .att-camera-panel {
  order: 2 !important;
}

.att-mode-mobile .att-advanced-panel {
  order: 3 !important;
}

.att-mode-mobile .att-step1-header {
  display: none !important;
}

.att-mode-mobile .att-step2-header {
  border-bottom: none !important;
  margin-bottom: 6px !important;
  padding-bottom: 0 !important;
}

.att-mode-mobile .att-step2-header-title {
  display: none !important;
}

.att-mode-mobile .camera-controls-bar {
  width: 100% !important;
  justify-content: space-between !important;
}

.att-mode-mobile #comboBadgeText {
  display: none !important;
}

.att-mode-mobile .att-advanced-toggle-btn {
  display: flex !important;
}

.att-mode-mobile .att-advanced-content {
  display: none;
  margin-top: 12px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  padding-top: 10px;
}

.att-mode-mobile .att-advanced-content.is-expanded {
  display: block !important;
  animation: dropdownFade 0.25s ease-out;
}

.att-mode-mobile .desktop-table-wrap {
  display: none !important;
}

.att-mode-mobile .mobile-attendance-cards-list {
  display: flex !important;
}

.att-mode-mobile .att-sticky-mobile-bar {
  display: flex !important;
}

.att-mode-mobile .mobile-site-select-wrap {
  display: block !important;
}

.att-mode-mobile #siteSelectionContainer {
  display: none !important;
}

.att-mode-mobile .guide-subtext,
.att-mode-mobile .site-help-text,
.att-mode-mobile #siteHelpText {
  display: none !important;
}

.att-mode-mobile .work-day-selector {
  grid-template-columns: repeat(2, 1fr) !important;
}

.att-mode-mobile .glass-panel {
  padding: 1rem !important;
  border-radius: 18px !important;
}

.att-mode-mobile .camera-container {
  height: 250px !important;
  min-height: 250px !important;
}

/* Real mobile devices on small screens (removes artificial phone bezel on physical phones) */
@media (max-width: 768px) {
  .att-mode-mobile {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0.25rem auto 1.5rem auto !important;
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  #attendancePageWrap {
    padding-left: 0.35rem !important;
    padding-right: 0.35rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .mobile-quick-hub {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 14px 12px 16px !important;
    border-radius: 16px !important;
  }

  .att-mode-mobile::before,
  .att-mode-mobile::after {
    display: none !important;
  }

  .main-input-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.9rem !important;
  }

  .att-left-col {
    display: contents !important;
  }

  .att-config-panel {
    order: 1 !important;
  }

  .att-camera-panel {
    order: 2 !important;
  }

  .att-advanced-panel {
    order: 3 !important;
  }

  .att-step1-header {
    display: none !important;
  }

  .att-step2-header {
    border-bottom: none !important;
    margin-bottom: 6px !important;
    padding-bottom: 0 !important;
  }

  .att-step2-header-title {
    display: none !important;
  }

  .camera-controls-bar {
    width: 100% !important;
    justify-content: space-between !important;
  }

  #comboBadgeText {
    display: none !important;
  }

  .att-advanced-toggle-btn {
    display: flex !important;
  }

  .att-advanced-content {
    display: none;
    margin-top: 12px;
    border-top: 1px dashed rgba(255, 255, 255, 0.1);
    padding-top: 10px;
  }

  .att-advanced-content.is-expanded {
    display: block !important;
    animation: dropdownFade 0.25s ease-out;
  }
}

/* Mobile Attendance Touch Cards */
.mobile-attendance-cards-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 1.5rem;
}

.mobile-att-card {
  background: rgba(15, 23, 42, 0.8);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

[data-theme="light"] .mobile-att-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.mobile-att-card:hover {
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateY(-2px);
}

.mobile-att-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding-bottom: 8px;
  margin-bottom: 10px;
}

[data-theme="light"] .mobile-att-card-header {
  border-bottom-color: #f1f5f9;
}

.mobile-att-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.mobile-att-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
  flex-shrink: 0;
}

.mobile-att-name {
  font-weight: 800;
  font-size: 0.95rem;
  color: #f8fafc;
  line-height: 1.3;
}

[data-theme="light"] .mobile-att-name {
  color: #0f172a;
}

.mobile-att-code {
  color: #38bdf8;
  font-size: 0.8rem;
  font-weight: 700;
  margin-left: 4px;
}

.mobile-att-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  flex-wrap: wrap;
}

.mobile-att-site {
  font-size: 0.74rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.mobile-att-delete-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  padding: 0;
  flex-shrink: 0;
}

.mobile-att-card-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mobile-att-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.mobile-att-field label {
  font-size: 0.76rem;
  color: var(--text-muted);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
}

.mobile-att-time-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Sticky Bottom Action Bar for Mobile (Constrained to 440px phone on PC preview & full width on real mobile) */
.att-sticky-mobile-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 440px;
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(56, 189, 248, 0.35);
  border-bottom: none;
  border-radius: 20px 20px 0 0;
  padding: 10px 16px;
  z-index: 1040;
  box-shadow: 0 -8px 25px rgba(0, 0, 0, 0.7);
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

[data-theme="light"] .att-sticky-mobile-bar {
  background: rgba(255, 255, 255, 0.97);
  border-color: #cbd5e1;
  box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
  .att-sticky-mobile-bar {
    left: 0 !important;
    right: 0 !important;
    transform: none !important;
    max-width: 100% !important;
    border-radius: 16px 16px 0 0 !important;
    border-left: none !important;
    border-right: none !important;
    padding-bottom: max(12px, env(safe-area-inset-bottom)) !important;
  }

  /* Prevent iOS automatic zoom on input focus */
  input[type="text"],
  input[type="date"],
  input[type="time"],
  input[type="number"],
  input[type="password"],
  select,
  textarea {
    font-size: 16px !important;
  }

  /* Eliminate 300ms tap delay and touch highlight */
  button,
  label,
  a,
  .btn,
  .work-day-btn,
  .mobile-site-select {
    touch-action: manipulation !important;
    -webkit-tap-highlight-color: transparent !important;
  }

  /* Smooth momentum scrolling on mobile */
  body,
  .mobile-attendance-cards-list,
  .multi-select-dropdown,
  #multiPhotoGalleryList {
    -webkit-overflow-scrolling: touch !important;
  }
}

.att-sticky-mobile-bar .sticky-summary {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.att-sticky-mobile-bar .sticky-summary .summary-title {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

.att-sticky-mobile-bar .sticky-summary .summary-val {
  font-size: 0.95rem;
  font-weight: 800;
  color: #fbbf24;
}

[data-theme="light"] .att-sticky-mobile-bar .sticky-summary .summary-val {
  color: #d97706;
}

/* Locked Nav Tabs Collapse / Expand (+ / -) for Mobile/Compact View */
.btn-toggle-locked-tabs {
  display: none;
  align-items: center;
  gap: 4px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px dashed rgba(245, 158, 11, 0.45);
  color: #fbbf24;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

[data-theme="light"] .btn-toggle-locked-tabs {
  background: #fffbeb;
  border-color: #d97706;
  color: #b45309;
}

.btn-toggle-locked-tabs:hover {
  background: rgba(245, 158, 11, 0.22);
  border-color: #f59e0b;
}

.nav-locked-tabs-list {
  display: flex;
  align-items: center;
  gap: 6px;
}

@media (max-width: 1024px) {
  .btn-toggle-locked-tabs {
    display: inline-flex !important;
  }

  .nav-locked-tabs-list {
    display: none !important;
    gap: 5px;
  }

  .nav-locked-tabs-list.expanded {
    display: flex !important;
    flex-wrap: wrap;
  }
}

/* Mobile Site Select Dropdown Box */
.mobile-site-select-wrap {
  display: none;
  margin-bottom: 8px;
}

.mobile-site-select {
  width: 100%;
  padding: 10px 14px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #fbbf24;
  background: rgba(15, 23, 42, 0.9);
  border: 1.5px solid #d97706;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s ease;
}

[data-theme="light"] .mobile-site-select {
  background: #ffffff;
  color: #b45309;
  border-color: #d97706;
}

/* Automatic or Explicit Mobile Mode Rules */
.att-mode-mobile .main-input-grid {
  grid-template-columns: 1fr !important;
  gap: 0.9rem !important;
}

.att-mode-mobile .desktop-table-wrap {
  display: none !important;
}

.att-mode-mobile .mobile-attendance-cards-list {
  display: flex !important;
}

.att-mode-mobile .att-sticky-mobile-bar {
  display: flex !important;
}

/* Show select box and hide bulky pill grid in mobile mode */
.att-mode-mobile .mobile-site-select-wrap {
  display: block !important;
}

.att-mode-mobile #siteSelectionContainer {
  display: none !important;
}

/* Hide wordy instruction/guide text on mobile for clean neat layout */
.att-mode-mobile .guide-subtext,
.att-mode-mobile .site-help-text,
.att-mode-mobile #siteHelpText {
  display: none !important;
}

/* Fluid responsive typography and compact padding on mobile */
.att-mode-mobile {
  font-size: clamp(0.82rem, 2.8vw, 0.92rem) !important;
}

.att-mode-mobile h1 {
  font-size: 1.15rem !important;
}

.att-mode-mobile h3 {
  font-size: 0.96rem !important;
}

.att-mode-mobile .glass-panel {
  padding: 1rem !important;
  gap: 0.85rem !important;
  border-radius: 14px !important;
}

.att-mode-pc .main-input-grid {
  grid-template-columns: 1fr 1.2fr !important;
  gap: 1.5rem !important;
}

.att-mode-pc .desktop-table-wrap {
  display: block !important;
}

.att-mode-pc .mobile-attendance-cards-list {
  display: none !important;
}

.att-mode-pc .att-sticky-mobile-bar {
  display: none !important;
}

.att-mode-pc .mobile-site-select-wrap {
  display: none !important;
}

.att-mode-pc #siteSelectionContainer {
  display: grid !important;
}

/* Responsive auto defaults */
@media (max-width: 768px) {
  .att-mode-auto .main-input-grid {
    grid-template-columns: 1fr !important;
    gap: 0.9rem !important;
  }

  .att-mode-auto .desktop-table-wrap {
    display: none !important;
  }

  .att-mode-auto .mobile-attendance-cards-list {
    display: flex !important;
  }

  .att-mode-auto .att-sticky-mobile-bar {
    display: flex !important;
  }

  .att-mode-auto .mobile-site-select-wrap {
    display: block !important;
  }

  .att-mode-auto #siteSelectionContainer {
    display: none !important;
  }

  .att-mode-auto .guide-subtext,
  .att-mode-auto .site-help-text,
  .att-mode-auto #siteHelpText {
    display: none !important;
  }

  .view-mode-toggle-wrap {
    display: none !important;
    /* Mobile view only on small screens */
  }

  .work-day-selector {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

.sidebar-link-services.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(15, 23, 42, 0.95));
  border-color: #fbbf24;
  color: #ffffff;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.35), inset 0 0 0 1px rgba(245, 158, 11, 0.2);
}

.sidebar-link-estimates .sidebar-icon-box {
  background: rgba(168, 85, 247, 0.14);
  color: #c084fc;
  border: 1px solid rgba(168, 85, 247, 0.35);
}

.sidebar-link-estimates.active {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.18), rgba(15, 23, 42, 0.95));
  border-color: #c084fc;
  color: #ffffff;
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.35), inset 0 0 0 1px rgba(168, 85, 247, 0.2);
}

.sidebar-link-settings .sidebar-icon-box {
  background: rgba(245, 158, 11, 0.14);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

.sidebar-link-settings.active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.18), rgba(15, 23, 42, 0.95));
  border-color: #fbbf24;
  color: #ffffff;
  box-shadow: 0 0 16px rgba(245, 158, 11, 0.35), inset 0 0 0 1px rgba(245, 158, 11, 0.2);
}

/* Main Content Area next to Sidebar */
.app-subpage-main {
  flex: 1;
  min-width: 0;
  padding: 0 0.5rem;
  transition: all 0.3s ease;
}

/* Sidebar Toggle Button in Top Navbar */
.btn-sidebar-toggle {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color);
  color: #cbd5e1;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: all 0.2s ease;
}

.btn-sidebar-toggle:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: #38bdf8;
  color: #38bdf8;
  transform: scale(1.05);
}

/* Collapsed Sidebar on Desktop */
.app-sidebar.collapsed {
  width: 68px;
  min-width: 68px;
  max-width: 68px;
  padding: 1.1rem 0.4rem;
}

.app-sidebar.collapsed .sidebar-label-text,
.app-sidebar.collapsed .sidebar-lock-indicator,
.app-sidebar.collapsed .sidebar-nav-header span,
.app-sidebar.collapsed .sidebar-badge {
  display: none !important;
}

.app-sidebar.collapsed .sidebar-nav-link {
  justify-content: center;
  padding: 8px;
}

.app-sidebar.collapsed .sidebar-icon-box {
  margin: 0 auto;
}

/* Mobile Sidebar Off-canvas Drawer */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 994;
  opacity: 0;
  transition: opacity 0.3s ease;
}

@media (max-width: 1024px) {
  .app-sidebar {
    position: fixed;
    top: 58px;
    left: -270px;
    height: calc(100vh - 58px);
    z-index: 999;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.7);
  }

  .app-sidebar.mobile-open {
    left: 0;
  }

  .sidebar-backdrop.active {
    display: block;
    opacity: 1;
  }
}

/* ========================================================================= */
/* ULTRA-MODERN ACTION ICONS & TYPOGRAPHY UTILITIES                          */
/* ========================================================================= */
.btn-action-camera {
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(6, 182, 212, 0.12);
  border: 1px solid rgba(6, 182, 212, 0.35);
  color: #06b6d4;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-action-camera:hover {
  background: #06b6d4;
  color: #0b1120;
  border-color: #06b6d4;
  box-shadow: 0 0 12px rgba(6, 182, 212, 0.5);
  transform: translateY(-1.5px);
}

.btn-action-edit {
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-action-edit:hover {
  background: #f59e0b;
  color: #0b1120;
  border-color: #f59e0b;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.5);
  transform: translateY(-1.5px);
}

.btn-action-delete {
  padding: 4px 8px;
  border-radius: 6px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-action-delete:hover {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.5);
  transform: translateY(-1.5px);
}

/* Modern Currency / Rate Displays */
.rate-code-text {
  font-weight: normal;
  color: #38bdf8;
  font-family: inherit;
  letter-spacing: 0.3px;
}

.rate-nocode-text {
  font-weight: normal;
  color: #fbbf24;
  font-family: inherit;
  letter-spacing: 0.3px;
}

.rate-muted-text {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: normal;
}

/* Modern AI Face Status Pills */
.ai-face-badge-yes {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(16, 185, 129, 0.14);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.35);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.76rem;
  font-weight: normal;
  box-shadow: 0 0 8px rgba(16, 185, 129, 0.2);
}

.ai-face-badge-no {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(239, 68, 68, 0.1);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.76rem;
  font-weight: normal;
}

/* Light theme overrides for Left Sidebar */
[data-theme="light"] .app-sidebar {
  background: #f8fafc;
  border-color: #e2e8f0;
  box-shadow: 4px 0 15px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .sidebar-nav-header {
  color: #94a3b8;
  border-color: #e2e8f0;
}

[data-theme="light"] .sidebar-nav-link {
  color: #334155;
}

[data-theme="light"] .sidebar-nav-link:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
}

[data-theme="light"] .btn-sidebar-toggle {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #475569;
}

/* ==========================================================================
   SWEETALERT2 & MODALS: MOBILE FIT & PROPORTIONAL STYLING
   ========================================================================== */
.swal2-container {
  z-index: 999999 !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
}

.swal2-popup {
  background: #0f172a !important;
  border: 1.5px solid rgba(56, 189, 248, 0.4) !important;
  border-radius: 24px !important;
  color: #f8fafc !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8), 0 0 30px rgba(56, 189, 248, 0.25) !important;
  padding: 1.5rem 1.25rem !important;
}

[data-theme="light"] .swal2-popup {
  background: #ffffff !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15) !important;
}

.swal2-title {
  color: #f8fafc !important;
  font-size: 1.15rem !important;
  font-weight: 800 !important;
  line-height: 1.4 !important;
}

[data-theme="light"] .swal2-title {
  color: #0f172a !important;
}

.swal2-html-container {
  color: #94a3b8 !important;
  font-size: 0.86rem !important;
  line-height: 1.5 !important;
  margin: 0.75rem 0.25rem !important;
}

[data-theme="light"] .swal2-html-container {
  color: #475569 !important;
}

.swal2-icon {
  transform: scale(0.85);
  margin: 0.6rem auto 0.4rem auto !important;
}

.swal2-actions {
  margin-top: 1rem !important;
  gap: 10px !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100% !important;
}

/* Strictly hide any buttons that SweetAlert flagged as display: none or unconfigured Deny */
.swal2-actions button[style*="display: none"],
.swal2-actions .swal2-styled[style*="display: none"],
.swal2-deny[style*="display: none"],
.swal2-deny:not([style*="display: inline"]):not([style*="display: block"]),
.swal2-cancel[style*="display: none"],
.swal2-confirm[style*="display: none"] {
  display: none !important;
}

.swal2-actions button.swal2-styled:not([style*="display: none"]) {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  font-weight: 700 !important;
  font-size: 0.86rem !important;
  padding: 8px 18px !important;
  border-radius: 10px !important;
  letter-spacing: 0.5px !important;
  flex: 1 1 0 !important;
  max-width: 135px !important;
}

/* Specific SweetAlert fit when in Mobile Preview Mode */
body.mobile-preview-mode .swal2-popup {
  width: 350px !important;
  max-width: 88vw !important;
  padding: 1.25rem 1rem !important;
  border-radius: 20px !important;
  font-size: 0.85rem !important;
}

body.mobile-preview-mode .swal2-title {
  font-size: 1.08rem !important;
  text-align: center !important;
}

body.mobile-preview-mode .swal2-html-container {
  font-size: 0.82rem !important;
  margin: 0.5rem 0.2rem !important;
  text-align: center !important;
}

body.mobile-preview-mode .swal2-icon {
  transform: scale(0.75);
  margin: 0.4rem auto 0.2rem auto !important;
}

body.mobile-preview-mode .swal2-actions {
  width: 100% !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 10px !important;
}

body.mobile-preview-mode .swal2-actions button.swal2-styled:not([style*="display: none"]) {
  display: inline-flex !important;
  justify-content: center !important;
  align-items: center !important;
  text-align: center !important;
  flex: 1 1 0 !important;
  max-width: 135px !important;
  min-width: 90px !important;
  padding: 8px 14px !important;
  font-size: 0.84rem !important;
}

body.mobile-preview-mode .swal2-input {
  font-size: 1.1rem !important;
  height: 2.5rem !important;
  max-width: 88% !important;
  margin: 0.5rem auto !important;
  text-align: center !important;
}

/* Real mobile devices screen size constraints */
@media (max-width: 768px) {
  .swal2-popup {
    width: 350px !important;
    max-width: 88vw !important;
    padding: 1.25rem 1rem !important;
    border-radius: 20px !important;
    font-size: 0.85rem !important;
  }

  .swal2-title {
    font-size: 1.08rem !important;
    text-align: center !important;
  }

  .swal2-html-container {
    font-size: 0.82rem !important;
    margin: 0.5rem 0.2rem !important;
    text-align: center !important;
  }

  .swal2-icon {
    transform: scale(0.75);
    margin: 0.4rem auto 0.2rem auto !important;
  }

  .swal2-actions {
    width: 100% !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 10px !important;
  }

  .swal2-actions button.swal2-styled:not([style*="display: none"]) {
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    flex: 1 1 0 !important;
    max-width: 135px !important;
    min-width: 90px !important;
    padding: 8px 14px !important;
    font-size: 0.84rem !important;
  }

  .swal2-input {
    font-size: 1.1rem !important;
    height: 2.5rem !important;
    max-width: 88% !important;
    margin: 0.5rem auto !important;
    text-align: center !important;
  }
}

/* Strictly hide any unused SweetAlert2 input elements */
.swal2-popup .swal2-file,
.swal2-popup .swal2-select,
.swal2-popup .swal2-radio,
.swal2-popup .swal2-checkbox,
.swal2-popup .swal2-textarea,
.swal2-popup .swal2-range,
.swal2-popup .swal2-input[style*="display: none"],
.swal2-popup input[style*="display: none"],
.swal2-popup select[style*="display: none"],
.swal2-popup textarea[style*="display: none"] {
  display: none !important;
}

/* Security PIN Input (Centered, Larger Dots & Balanced Padding) */
.modern-pin-input:not([style*="display: none"]),
#securityPinInputClean:not([style*="display: none"]),
#telegramPinInputNoCache:not([style*="display: none"]) {
  height: 52px !important;
  line-height: 52px !important;
  font-size: 2.2rem !important;
  letter-spacing: 12px !important;
  font-weight: 900 !important;
  text-align: center !important;
  -webkit-text-security: disc !important;
  color: #fbbf24 !important;
  background: rgba(15, 23, 42, 0.75) !important;
  border: 1.5px solid rgba(245, 158, 11, 0.6) !important;
  border-radius: 14px !important;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5), 0 0 15px rgba(245, 158, 11, 0.2) !important;
  padding: 0 10px !important;
  display: block !important;
  margin: 12px auto !important;
  max-width: 240px !important;
  box-sizing: border-box !important;
}

.modern-pin-input::placeholder,
#securityPinInputClean::placeholder,
#telegramPinInputNoCache::placeholder {
  color: rgba(245, 158, 11, 0.45) !important;
  font-size: 2.4rem !important;
  letter-spacing: 12px !important;
  font-weight: 900 !important;
  text-align: center !important;
  line-height: 48px !important;
  vertical-align: middle !important;
}

/* ==========================================================================
   STEP-BY-STEP GUIDED GLOW ANIMATIONS (ដំណាក់កាលជំហាន ១, ២, ៣, ៤)
   ========================================================================== */
@keyframes stepGuideEmeraldGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.75), 0 0 10px rgba(16, 185, 129, 0.5);
    border-color: #34d399 !important;
  }

  50% {
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0), 0 0 22px rgba(16, 185, 129, 0.9);
    border-color: #10b981 !important;
    transform: scale(1.02);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0), 0 0 10px rgba(16, 185, 129, 0.5);
    border-color: #34d399 !important;
  }
}

@keyframes stepGuideAmberGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.75), 0 0 10px rgba(245, 158, 11, 0.5);
    border-color: #fbbf24 !important;
  }

  50% {
    box-shadow: 0 0 0 8px rgba(245, 158, 11, 0), 0 0 22px rgba(245, 158, 11, 0.9);
    border-color: #f59e0b !important;
    transform: scale(1.02);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0), 0 0 10px rgba(245, 158, 11, 0.5);
    border-color: #fbbf24 !important;
  }
}

@keyframes stepGuideCyanGlow {
  0% {
    box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.75), 0 0 12px rgba(56, 189, 248, 0.6);
    border-color: #38bdf8 !important;
  }

  50% {
    box-shadow: 0 0 0 8px rgba(56, 189, 248, 0), 0 0 24px rgba(56, 189, 248, 1);
    border-color: #7dd3fc !important;
    transform: scale(1.03);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(56, 189, 248, 0), 0 0 12px rgba(56, 189, 248, 0.6);
    border-color: #38bdf8 !important;
  }
}

.step-guide-active {
  animation: stepGuideEmeraldGlow 1.8s infinite ease-in-out !important;
  position: relative !important;
  z-index: 5 !important;
  border-color: #34d399 !important;
}

.step-guide-cyan-active,
.btn-save-cyan.step-guide-active,
#lblUploadPhoto.step-guide-active,
#lblDirectCamera.step-guide-active {
  animation: stepGuideCyanGlow 1.8s infinite ease-in-out !important;
  position: relative !important;
  z-index: 5 !important;
  border-color: #38bdf8 !important;
}

/* Soft Red Palette for Clear Table Button */
.btn-clear-soft-red {
  background: rgba(239, 68, 68, 0.12) !important;
  color: #f87171 !important;
  border: 1.5px solid rgba(239, 68, 68, 0.35) !important;
  padding: 8px 16px !important;
  border-radius: 10px !important;
  font-weight: 600 !important;
  font-size: 0.88rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  text-decoration: none !important;
}

.btn-clear-soft-red i {
  color: #ef4444 !important;
  font-size: 0.9rem !important;
  transition: color 0.2s ease !important;
}

.btn-clear-soft-red:hover {
  background: rgba(239, 68, 68, 0.25) !important;
  border-color: rgba(239, 68, 68, 0.65) !important;
  color: #ffffff !important;
  box-shadow: 0 0 14px rgba(239, 68, 68, 0.35) !important;
  transform: translateY(-1px) !important;
}

.btn-clear-soft-red:hover i {
  color: #ffffff !important;
}

/* ========================================================================= */
/* ORG CHART INTERACTION & PRINT STYLES */
/* ========================================================================= */
.org-node-card {
  cursor: pointer;
}

.org-node-action-btns {
  display: flex;
  align-items: center;
  gap: 5px;
}

.org-node-edit-btn,
.org-node-delete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  transition: all 0.2s ease;
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.05);
}

.org-node-edit-btn {
  color: #94a3b8;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.org-node-edit-btn:hover {
  color: #38bdf8 !important;
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
  transform: scale(1.1);
}

.org-node-delete-btn {
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.org-node-delete-btn:hover {
  color: #ffffff !important;
  background: #ef4444 !important;
  border-color: #ef4444 !important;
  transform: scale(1.1);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

.org-tier-add-btn {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 14px;
  padding: 2px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
  margin-left: 8px;
}

.org-tier-add-btn:hover {
  background: #38bdf8;
  color: #0f172a;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
  transform: translateY(-1px);
}

.org-node-card.vacant-node {
  cursor: pointer;
  transition: all 0.25s ease;
}

.org-node-card.vacant-node:hover {
  border-color: #38bdf8 !important;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 25px rgba(56, 189, 248, 0.3) !important;
  opacity: 1 !important;
}

@media print {
  @page {
    size: A4 portrait;
    margin: 5mm;
  }

  body,
  html {
    background: #ffffff !important;
    color: #0f172a !important;
    font-size: 8pt !important;
    padding: 0 !important;
    margin: 0 !important;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }

  /* Hide UI elements not meant for print */
  .navbar-custom,
  .btn-sidebar-toggle,
  .sidebar-app,
  .top-nav-attendance-tabs,
  #pinLockScreen,
  #projectsContent>.glass-panel:first-child,
  #subtab-completed,
  #subtab-ongoing,
  #subtab-stats,
  .company-projects-tabs-nav,
  #btnToggleOrgChart,
  #btnEditOrgChart,
  #btnPrintOrgChart,
  .org-print-hide,
  .org-tier-header,
  .org-tier-badge-wrap,
  .org-node-edit-btn,
  .footer-custom {
    display: none !important;
  }

  #projectsContent,
  #subtab-orgchart {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
  }

  .org-print-header {
    display: block !important;
    margin-bottom: 6px !important;
  }

  .org-print-header>div {
    padding-bottom: 4px !important;
    margin-bottom: 6px !important;
  }

  .glass-panel {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .org-chart-wrapper {
    overflow: visible !important;
    padding: 0 !important;
    background: transparent !important;
  }

  .org-chart-tree {
    zoom: 0.84;
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }

  .org-tree-level {
    padding-top: 14px !important;
    margin-top: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    justify-content: center !important;
  }

  .org-tree-level.gold-tree,
  .org-tree-level.cyan-tree,
  .org-tree-level.emerald-tree,
  .org-tree-level.foremen-tree {
    --tree-gap: 8.5rem !important;
    gap: 8.5rem !important;
  }

  .org-tree-level>.org-node-col::after {
    height: 14px !important;
  }

  .org-stem-parent {
    height: 14px !important;
    margin-top: 6px !important;
  }

  .org-node-card {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .org-node-info {
    background: #ffffff !important;
    border: 1.5px solid #0284c7 !important;
    color: #0f172a !important;
    box-shadow: none !important;
    margin-left: -18px !important;
    padding: 6px 14px 6px 24px !important;
    min-height: 58px !important;
    justify-content: center !important;
  }

  .gold-node .org-node-info {
    border-color: #d97706 !important;
    background: #fffbeb !important;
  }

  .emerald-node .org-node-info {
    border-color: #059669 !important;
    background: #f0fdf4 !important;
  }

  .indigo-node .org-node-info {
    border-color: #4f46e5 !important;
    background: #eef2ff !important;
  }

  .pink-node .org-node-info {
    border-color: #db2777 !important;
    background: #fdf2f8 !important;
  }

  .org-node-card.vacant-node .org-node-info {
    border: 1.5px dashed #94a3b8 !important;
    background: #f8fafc !important;
  }

  .org-node-name {
    color: #0f172a !important;
    font-weight: 800 !important;
    font-size: 0.95rem !important;
    white-space: nowrap !important;
  }

  .org-node-role {
    color: #0284c7 !important;
    font-weight: 600 !important;
    font-size: 0.75rem !important;
    white-space: nowrap !important;
  }

  .gold-node .org-node-role {
    color: #b45309 !important;
  }

  .emerald-node .org-node-role {
    color: #047857 !important;
  }

  .indigo-node .org-node-role {
    color: #4338ca !important;
  }

  .pink-node .org-node-role {
    color: #be185d !important;
  }

  .org-node-avatar {
    width: 72px !important;
    height: 72px !important;
    border-width: 2.5px !important;
    box-shadow: none !important;
  }

  .gold-node .org-node-avatar {
    width: 78px !important;
    height: 78px !important;
  }

  .org-tree-level>.org-node-col::before,
  .org-tree-level>.org-node-col::after,
  .org-stem-parent,
  .org-junction-dot {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .gold-tree>.org-node-col::before,
  .gold-tree>.org-node-col::after,
  .foremen-tree>.org-node-col::before,
  .foremen-tree>.org-node-col::after,
  .org-stem-parent.gold-stem,
  .gold-dot {
    background: #d97706 !important;
  }

  .cyan-tree>.org-node-col::before,
  .cyan-tree>.org-node-col::after,
  .org-stem-parent.cyan-stem {
    background: #0284c7 !important;
  }

  .emerald-tree>.org-node-col::before,
  .emerald-tree>.org-node-col::after,
  .org-stem-parent.emerald-stem {
    background: #059669 !important;
  }
}

/* ============================================================
   MOBILE QUICK HUB — Mobile-Only Quick Action Dashboard
   (Visible on mobile screens <= 768px OR in mobile preview mode)
   ============================================================ */

/* Default: hidden on desktop */
.mobile-quick-hub {
  display: none;
}

/* Show on mobile screens OR in mobile preview mode */
@media (max-width: 768px) {
  .mobile-quick-hub {
    display: block !important;
  }
}

body.mobile-preview-mode .mobile-quick-hub,
.att-mode-mobile .mobile-quick-hub {
  display: block !important;
}

@media (max-width: 768px),
(min-width: 0px) {

  body.mobile-preview-mode .mobile-quick-hub,
  .att-mode-mobile .mobile-quick-hub,
  .mobile-quick-hub.force-show {
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 0 1.25rem 0;
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(15, 25, 45, 0.97), rgba(10, 18, 38, 0.98));
    border: 1.5px solid rgba(56, 189, 248, 0.25);
    box-shadow:
      0 8px 32px rgba(0, 0, 0, 0.45),
      0 0 0 1px rgba(255, 255, 255, 0.04) inset;
    overflow: hidden;
    padding: 16px 14px 18px;
    position: relative;
  }
}

.mobile-quick-hub::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #f59e0b, #38bdf8, #10b981, #a855f7);
  border-radius: 20px 20px 0 0;
}

/* ---- Brand Row ---- */
.mqh-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  position: relative;
}

.mqh-logo-wrap {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b, #38bdf8);
  padding: 2.5px;
  box-shadow: 0 0 18px rgba(56, 189, 248, 0.35);
  flex-shrink: 0;
}

.mqh-logo-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: contain;
  background: #0b1120;
  padding: 3px;
}

.mqh-brand-info {
  flex: 1;
  min-width: 0;
}

.mqh-brand-name {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.mqh-kp {
  color: #f59e0b;
}

.mqh-builder {
  color: #e2e8f0;
}

.mqh-tagline {
  font-size: 0.72rem;
  color: #64748b;
  letter-spacing: 0.04em;
  margin-top: 2px;
  font-weight: 500;
}

/* Pulse "Online" dot */
.mqh-pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: mqhPulse 2s infinite;
  flex-shrink: 0;
}

@keyframes mqhPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }

  70% {
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

/* ---- Section Label (Unbold) ---- */
.mqh-section-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: normal !important;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
}

.mqh-section-label i {
  color: #f59e0b;
  font-size: 0.75rem;
  animation: mqhFlash 1.5s ease-in-out infinite alternate;
}

@keyframes mqhFlash {
  from {
    opacity: 0.5;
  }

  to {
    opacity: 1;
  }
}

/* ---- 2x2 Action Grid ---- */
.mqh-action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ---- Action Card Base (Soft, No Glow, Unbold Text) ---- */
.mqh-action-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  padding: 13px 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(15, 23, 42, 0.55);
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.mqh-action-card:active {
  transform: scale(0.97);
}

/* No Glow */
.mqh-card-glow {
  display: none !important;
}

/* Icon (Soft, No Heavy Shadows) */
.mqh-card-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  box-shadow: none !important;
  transition: transform 0.2s ease;
}

.mqh-action-card:active .mqh-card-icon {
  transform: scale(0.94);
}

/* Text (Unbold / Normal Font Weight) */
.mqh-card-content {
  position: relative;
  z-index: 1;
}

.mqh-card-title {
  font-size: 0.84rem;
  font-weight: normal !important;
  line-height: 1.35;
  color: #e2e8f0;
}

.mqh-card-sub {
  font-size: 0.68rem;
  font-weight: normal !important;
  color: #94a3b8;
  margin-top: 2px;
  line-height: 1.3;
}

/* Arrow */
.mqh-card-arrow {
  position: absolute;
  bottom: 10px;
  right: 10px;
  font-size: 0.7rem;
  opacity: 0.4;
  z-index: 1;
  transition: opacity 0.2s, transform 0.2s;
}

.mqh-action-card:active .mqh-card-arrow {
  opacity: 0.75;
  transform: translateX(2px);
}

/* ---- Color Variants (Enhanced Rich & Deep Palette +20%) ---- */

/* Emerald - Attendance (១. កត់ត្រាវត្តមាន) */
.mqh-emerald {
  background: rgba(16, 185, 129, 0.14);
  border: 1.5px solid rgba(16, 185, 129, 0.45);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.16);
}

.mqh-emerald:hover,
.mqh-emerald:active {
  background: rgba(16, 185, 129, 0.22);
  border-color: rgba(16, 185, 129, 0.75);
  box-shadow: 0 6px 18px rgba(16, 185, 129, 0.28);
}

.mqh-emerald .mqh-card-icon {
  background: rgba(16, 185, 129, 0.24);
  color: #34d399;
  border: 1.5px solid rgba(16, 185, 129, 0.48);
}

.mqh-emerald .mqh-card-title {
  color: #6ee7b7;
  font-weight: 600 !important;
}

.mqh-emerald .mqh-card-sub {
  color: #a7f3d0;
}

.mqh-emerald .mqh-card-arrow {
  color: #34d399;
  opacity: 0.8;
}

/* Amber - Equipment (២. កត់ត្រាឧបករណ៍) */
.mqh-amber {
  background: rgba(245, 158, 11, 0.14);
  border: 1.5px solid rgba(245, 158, 11, 0.45);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.16);
}

.mqh-amber:hover,
.mqh-amber:active {
  background: rgba(245, 158, 11, 0.22);
  border-color: rgba(245, 158, 11, 0.75);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.28);
}

.mqh-amber .mqh-card-icon {
  background: rgba(245, 158, 11, 0.24);
  color: #fbbf24;
  border: 1.5px solid rgba(245, 158, 11, 0.48);
}

.mqh-amber .mqh-card-title {
  color: #fde047;
  font-weight: 600 !important;
}

.mqh-amber .mqh-card-sub {
  color: #fde68a;
}

.mqh-amber .mqh-card-arrow {
  color: #fbbf24;
  opacity: 0.8;
}

/* Rose - Expenses (៣. កត់ត្រាចំណាយ) */
.mqh-rose {
  background: rgba(244, 63, 94, 0.14);
  border: 1.5px solid rgba(244, 63, 94, 0.45);
  box-shadow: 0 4px 14px rgba(244, 63, 94, 0.16);
  cursor: pointer;
}

.mqh-rose:hover,
.mqh-rose:active {
  background: rgba(244, 63, 94, 0.22);
  border-color: rgba(244, 63, 94, 0.75);
  box-shadow: 0 6px 18px rgba(244, 63, 94, 0.28);
}

.mqh-rose .mqh-card-icon {
  background: rgba(244, 63, 94, 0.24);
  color: #fb7185;
  border: 1.5px solid rgba(244, 63, 94, 0.48);
}

.mqh-rose .mqh-card-title {
  color: #fda4af;
  font-weight: 600 !important;
}

.mqh-rose .mqh-card-sub {
  color: #fecdd3;
}

.mqh-rose .mqh-card-arrow {
  color: #fb7185;
  opacity: 0.8;
}

.mqh-coming-soon {
  opacity: 0.78;
}

/* SOON badge (Unbold) */
.mqh-soon-badge {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(239, 68, 68, 0.18);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  font-size: 0.58rem;
  font-weight: normal !important;
  padding: 1px 6px;
  border-radius: 12px;
  letter-spacing: 0.05em;
  z-index: 1;
}

/* Cyan - Company Info */
.mqh-cyan {
  background: rgba(56, 189, 248, 0.07);
  border-color: rgba(56, 189, 248, 0.24);
}

.mqh-cyan:hover,
.mqh-cyan:active {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.45);
}

.mqh-cyan .mqh-card-icon {
  background: rgba(56, 189, 248, 0.12);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.mqh-cyan .mqh-card-title {
  color: #bae6fd;
}

.mqh-cyan .mqh-card-arrow {
  color: #38bdf8;
}

/* ============================================================
   SCREEN SEPARATION & NAVIGATION (Screen 1 Hub <-> Screen 2 Module)
   ============================================================ */

.mqh-screen-hidden {
  display: none !important;
}

.animate-fade-in {
  animation: mqhFadeInScreen 0.28s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

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

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

/* In Mobile View: Hide Attendance Content & Sticky Bar unless .active-subscreen is present */
@media (max-width: 768px) {

  #attendancePageWrap:not(.att-mode-pc) #attendanceMainContent:not(.active-subscreen),
  #attendancePageWrap:not(.att-mode-pc) #mobileFloatingActionBar:not(.active-subscreen-bar) {
    display: none !important;
  }

  #attendancePageWrap:not(.att-mode-pc) #mobileQuickHubAtt.mqh-screen-hidden,
  #attendancePageWrap:not(.att-mode-pc) .mobile-quick-hub.mqh-screen-hidden {
    display: none !important;
  }
}

body.mobile-preview-mode #attendanceMainContent:not(.active-subscreen),
body.mobile-preview-mode #mobileFloatingActionBar:not(.active-subscreen-bar),
.att-mode-mobile #attendanceMainContent:not(.active-subscreen),
.att-mode-mobile #mobileFloatingActionBar:not(.active-subscreen-bar) {
  display: none !important;
}

/* When mqh-screen-hidden is applied, HIDE Hub Menu completely in all modes */
.mqh-screen-hidden,
.mobile-quick-hub.mqh-screen-hidden,
body.mobile-preview-mode #mobileQuickHubAtt.mqh-screen-hidden,
body.mobile-preview-mode .mobile-quick-hub.mqh-screen-hidden,
.att-mode-mobile #mobileQuickHubAtt.mqh-screen-hidden,
.att-mode-mobile .mobile-quick-hub.mqh-screen-hidden {
  display: none !important;
}

/* When in PC Mode, always show attendanceMainContent and hide mobileQuickHubAtt */
.att-mode-pc #attendanceMainContent {
  display: block !important;
}

.att-mode-pc #mobileQuickHubAtt {
  display: none !important;
}

/* Back to Hub Button on Screen 2 Header (Pill Button inside Toggle Group) */
.btn-back-to-hub {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #38bdf8;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-back-to-hub:hover,
.btn-back-to-hub:active {
  background: rgba(56, 189, 248, 0.25);
  color: #ffffff;
  transform: scale(0.94);
}

/* Hide Sticky Bottom Action Bar completely */
.att-sticky-mobile-bar,
#mobileFloatingActionBar {
  display: none !important;
}

/* ============================================================
   MOBILE QUICK HUB — HORIZONTAL COMPANY SERVICES LIST
   ============================================================ */

.mqh-services-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

/* Single Unified Border & Styling for all Service Rows */
.mqh-service-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-decoration: none;
  color: #f1f5f9;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  position: relative;
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
}

.mqh-service-row:hover,
.mqh-service-row:active {
  transform: translateX(3px) scale(0.99);
  background: rgba(15, 23, 42, 0.85);
  border-color: rgba(56, 189, 248, 0.35);
}

.mqh-srv-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.mqh-service-row:active .mqh-srv-icon {
  transform: scale(0.92);
}

.mqh-srv-info {
  flex: 1;
  min-width: 0;
}

.mqh-srv-title {
  font-size: 0.85rem;
  font-weight: normal !important;
  color: #f8fafc;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mqh-srv-desc {
  font-size: 0.7rem;
  font-weight: normal !important;
  color: #94a3b8;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Badges Removed */
.mqh-srv-badge {
  display: none !important;
}

.mqh-srv-arrow {
  font-size: 0.72rem;
  opacity: 0.4;
  color: #94a3b8;
  flex-shrink: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.mqh-service-row:active .mqh-srv-arrow {
  opacity: 0.85;
  transform: translateX(2px);
}

/* Distinct Icon Colors & Icon Background Palettes Retained */
.mqh-srv-amber .mqh-srv-icon {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.mqh-srv-cyan .mqh-srv-icon {
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.3);
}

.mqh-srv-emerald .mqh-srv-icon {
  background: rgba(52, 211, 153, 0.15);
  color: #34d399;
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.mqh-srv-purple .mqh-srv-icon {
  background: rgba(192, 132, 252, 0.15);
  color: #c084fc;
  border: 1px solid rgba(192, 132, 252, 0.3);
}

.mqh-srv-yellow .mqh-srv-icon {
  background: rgba(250, 204, 21, 0.15);
  color: #facc15;
  border: 1px solid rgba(250, 204, 21, 0.3);
}

.mqh-srv-orange .mqh-srv-icon {
  background: rgba(251, 146, 60, 0.15);
  color: #fb923c;
  border: 1px solid rgba(251, 146, 60, 0.3);
}

.mqh-srv-rose .mqh-srv-icon {
  background: rgba(244, 63, 94, 0.15);
  color: #f43f5e;
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.mqh-srv-teal .mqh-srv-icon {
  background: rgba(45, 212, 191, 0.15);
  color: #2dd4bf;
  border: 1px solid rgba(45, 212, 191, 0.3);
}

/* ==========================================================================
   GLOBAL SOFT ORANGE PALETTE FOR PDF EXPORT & PRINT BUTTONS
   ========================================================================== */
.btn-pdf-orange,
.btn-print-orange {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.18), rgba(251, 146, 60, 0.28)) !important;
  border: 1.5px solid #fb923c !important;
  color: #ffedd5 !important;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 10px rgba(251, 146, 60, 0.22) !important;
  transition: all 0.2s ease !important;
  font-family: inherit;
  text-decoration: none;
}

.btn-pdf-orange:hover,
.btn-print-orange:hover {
  background: linear-gradient(135deg, rgba(249, 115, 22, 0.35), rgba(251, 146, 60, 0.48)) !important;
  border-color: #f97316 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 14px rgba(249, 115, 22, 0.35) !important;
  transform: translateY(-1px);
}

.btn-pdf-orange:active,
.btn-print-orange:active {
  transform: translateY(0);
}

.btn-pdf-orange i,
.btn-print-orange i {
  color: #fb923c !important;
}

.btn-pdf-orange:hover i,
.btn-print-orange:hover i {
  color: #ffedd5 !important;
}

[data-theme="light"] .btn-pdf-orange,
[data-theme="light"] .btn-print-orange {
  background: linear-gradient(135deg, #fff7ed, #ffedd5) !important;
  border-color: #fb923c !important;
  color: #c2410c !important;
  box-shadow: 0 2px 8px rgba(249, 115, 22, 0.15) !important;
}

[data-theme="light"] .btn-pdf-orange:hover,
[data-theme="light"] .btn-print-orange:hover {
  background: linear-gradient(135deg, #ffedd5, #fed7aa) !important;
  border-color: #ea580c !important;
  color: #9a3412 !important;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.25) !important;
}