/* =========================================================
   Smart Payroll ERP - 100% Faithful Windows System Design
   Complete 44-Module Architecture
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Noto+Sans+Devanagari:wght@400;600;700;800&family=JetBrains+Mono:wght@500;700&display=swap');

:root {
  --bg-app: #E4F8F6;
  --bg-surface: #ffffff;
  
  --text-main: #0F172A;
  --text-muted: #475569;
  --text-dark: #0F172A;

  --border-card-soft: #B4E0DC;
  --border-cyan: #A5F3FC;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-pill: 9999px;
  --shadow-subtle: 0 4px 14px rgba(0, 0, 0, 0.04);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  width: 100%;
  overflow-x: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg-app);
  color: var(--text-main);
  display: flex;
}

/* APP CONTAINER */
.app-container {
  display: flex;
  width: 100vw;
  height: 100vh;
  padding: 0.5rem 0.75rem;
  gap: 0.85rem;
  overflow: hidden;
}

/* =========================================================
   SIDEBAR
   ========================================================= */
.sidebar {
  width: 250px;
  min-width: 250px;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  overflow-y: auto;
}

.brand-top-widget {
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  color: #ffffff;
  border-radius: 14px;
  padding: 0.65rem 0.5rem;
  text-align: center;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.brand-top-widget h2 {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.brand-top-widget .clock-text {
  font-size: 0.65rem;
  font-weight: 700;
  color: #e0e7ff;
  margin-top: 0.2rem;
}

.sidebar-section-box {
  background: #dcf6f4;
  border: 1px solid #b4e0dc;
  border-radius: 12px;
  padding: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sidebar-cat-title {
  font-size: 0.72rem;
  font-weight: 800;
  text-align: center;
  letter-spacing: 0.05em;
  padding: 0.1rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.btn-sidebar-pill {
  width: 100%;
  padding: 0.46rem 0.85rem;
  border: none;
  outline: none;
  color: #ffffff;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.btn-sidebar-pill:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.btn-sidebar-pill.active {
  box-shadow: 0 0 0 2.5px #ffffff, 0 4px 12px rgba(0, 0, 0, 0.25);
  filter: brightness(1.15);
}

.btn-nav-dashboard { background: #2563eb; }
.btn-nav-employees { background: #3730a3; }
.btn-nav-attendance { background: #7c3aed; }
.btn-nav-leave { background: #0891b2; }
.btn-nav-payroll { background: #059669; }
.btn-nav-reports { background: #0f172a; }

.btn-nav-mobile-portal { background: #6366f1; }
.btn-nav-cloud-sync { background: #8b5cf6; }
.btn-nav-logins { background: #0d9488; }

.btn-nav-backup { background: #059669; }

/* =========================================================
   MAIN CONTENT WRAPPER
   ========================================================= */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  min-width: 0;
}

/* TOP HUB BANNER */
.main-top-banner {
  background: #dcf6f4;
  border: 2px solid #6366f1;
  border-radius: var(--radius-lg);
  padding: 0.65rem 1.5rem;
  text-align: center;
  margin-bottom: 0.75rem;
  box-shadow: var(--shadow-subtle);
}

.banner-greeting {
  font-size: 0.82rem;
  font-weight: 700;
  color: #0d9488;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-bottom: 0.1rem;
}

.banner-main-title {
  font-size: 1.45rem;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.banner-subtitle {
  font-size: 0.8rem;
  font-weight: 600;
  color: #475569;
  margin-top: 0.1rem;
}

.banner-filter-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 0.4rem;
}

.filter-pill-box {
  background: #f0fdfa;
  border: 1.5px solid #b4e0dc;
  border-radius: var(--radius-pill);
  padding: 0.2rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #4338ca;
}

.filter-pill-box select, .filter-pill-box input {
  border: none;
  background: transparent;
  font-size: 0.8rem;
  font-weight: 700;
  color: #4338ca;
  outline: none;
  cursor: pointer;
}

.btn-refresh-pill {
  background: #2563eb;
  color: #ffffff;
  border: none;
  padding: 0.35rem 1rem;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

/* =========================================================
   DASHBOARD 12 KPI CARDS (2 rows x 6 cols)
   ========================================================= */
.kpi-cards-grid-12 {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.kpi-card {
  border-radius: 12px;
  padding: 0.65rem 0.5rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 86px;
  border: 1.5px solid transparent;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
  cursor: pointer;
  transition: transform 0.15s ease;
}

.kpi-card:hover {
  transform: translateY(-2px);
}

.kpi-card-title {
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kpi-card-value {
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.2;
  margin: 0.15rem 0;
}

.kpi-card-note {
  font-size: 0.68rem;
  font-weight: 600;
}

/* 12 KPI Colors */
.kpi-1 { background: #f0fdf4; border-color: #16a34a; color: #14532d; }
.kpi-1 .kpi-card-value { color: #15803d; }
.kpi-1 .kpi-card-note { color: #166534; }

.kpi-2 { background: #fff7ed; border-color: #ea580c; color: #7c2d12; }
.kpi-2 .kpi-card-value { color: #c2410c; }
.kpi-2 .kpi-card-note { color: #9a3412; }

.kpi-3 { background: #eff6ff; border-color: #2563eb; color: #1e3a8a; }
.kpi-3 .kpi-card-value { color: #1d4ed8; }
.kpi-3 .kpi-card-note { color: #1e40af; }

.kpi-4 { background: #fff1f2; border-color: #e11d48; color: #881337; }
.kpi-4 .kpi-card-value { color: #be123c; }
.kpi-4 .kpi-card-note { color: #9f1239; }

.kpi-5 { background: #faf5ff; border-color: #9333ea; color: #581c87; }
.kpi-5 .kpi-card-value { color: #7e22ce; }
.kpi-5 .kpi-card-note { color: #6b21a8; }

.kpi-6 { background: #ecfeff; border-color: #0891b2; color: #164e63; }
.kpi-6 .kpi-card-value { color: #0e7490; }
.kpi-6 .kpi-card-note { color: #155e75; }

.kpi-7 { background: #fef3c7; border-color: #d97706; color: #78350f; }
.kpi-7 .kpi-card-value { color: #b45309; }
.kpi-7 .kpi-card-note { color: #92400e; }

.kpi-8 { background: #f0f9ff; border-color: #0284c7; color: #0c4a6e; }
.kpi-8 .kpi-card-value { color: #0369a1; }
.kpi-8 .kpi-card-note { color: #075985; }

.kpi-9 { background: #ecfdf5; border-color: #10b981; color: #064e3b; }
.kpi-9 .kpi-card-value { color: #047857; }
.kpi-9 .kpi-card-note { color: #065f46; }

.kpi-10 { background: #eef2ff; border-color: #6366f1; color: #312e81; }
.kpi-10 .kpi-card-value { color: #4338ca; }
.kpi-10 .kpi-card-note { color: #3730a3; }

.kpi-11 { background: #f0fdf4; border-color: #16a34a; color: #14532d; }
.kpi-11 .kpi-card-value { color: #15803d; font-size: 1.35rem; }
.kpi-11 .kpi-card-note { color: #166534; }

.kpi-12 { background: #f0fdf4; border-color: #16a34a; color: #14532d; }
.kpi-12 .kpi-card-value { color: #15803d; font-size: 1.35rem; }
.kpi-12 .kpi-card-note { color: #166534; }

/* =========================================================
   DASHBOARD 3 LOWER BOXES
   ========================================================= */
.dashboard-lower-area {
  display: grid;
  grid-template-columns: 34% 33% 33%;
  gap: 0.65rem;
  margin-bottom: 0.65rem;
}

.lower-box-card {
  background: #dcf6f4;
  border: 1px solid #b4e0dc;
  border-radius: 12px;
  padding: 0.65rem 0.85rem;
  display: flex;
  flex-direction: column;
}

.lower-box-header {
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 0.55rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
}

.quick-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
}

.btn-qa-pill {
  border: none;
  outline: none;
  color: #ffffff;
  border-radius: var(--radius-pill);
  padding: 0.38rem 0.6rem;
  font-size: 0.74rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-qa-pill:hover {
  filter: brightness(1.1);
}

.btn-qa-pill .badge-icon {
  background: #ffffff;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

.qa-green { background: #059669; }
.qa-blue { background: #2563eb; }
.qa-purple { background: #7c3aed; }
.qa-pink { background: #db2777; }
.qa-cyan { background: #0891b2; }
.qa-sky { background: #0284c7; }
.qa-teal { background: #0d9488; }
.qa-amber { background: #d97706; }
.qa-violet { background: #6366f1; }
.qa-gold { background: #eab308; }

.sys-info-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.74rem;
}

.sys-info-table td {
  padding: 0.25rem 0.2rem;
  font-weight: 600;
}

.sys-info-table td:first-child {
  color: #1e3a8a;
  font-weight: 700;
  width: 45%;
}

.badge-healthy-text {
  color: #16a34a;
  font-weight: 800;
}

.dashboard-slim-footer {
  background: #dcf6f4;
  border: 1px solid #b4e0dc;
  border-radius: var(--radius-pill);
  padding: 0.35rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 700;
  color: #0f172a;
}

/* =========================================================
   EMPLOYEE MASTER LAYOUT (Left Form 410px + Right Grid)
   ========================================================= */
.employee-master-split-container {
  display: flex;
  gap: 1rem;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

.emp-master-form-card {
  width: 410px;
  min-width: 410px;
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #cbd5e1;
  box-shadow: var(--shadow-subtle);
  padding: 1.1rem 1.25rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.form-group-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-group-row label {
  width: 135px;
  min-width: 135px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #4f46e5;
}

.form-control-pill {
  flex: 1;
  padding: 0.38rem 0.75rem;
  border-radius: var(--radius-pill);
  border: 1px solid #cbd5e1;
  font-size: 0.8rem;
  font-weight: 600;
  outline: none;
  background: #f8fafc;
}

.form-control-pill:focus {
  border-color: #6366f1;
  background: #ffffff;
}

.emp-master-grid-box {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid #cbd5e1;
  box-shadow: var(--shadow-subtle);
  overflow: hidden;
}

.emp-grid-header-stats {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: #475569;
  border-bottom: 1px solid #e2e8f0;
}

/* =========================================================
   HUB CARDS GRID
   ========================================================= */
.hub-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
}

.hub-cards-grid-5 {
  grid-template-columns: repeat(5, 1fr);
}

.hub-card-item {
  border-radius: 12px;
  padding: 1.1rem 0.9rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 165px;
  border: 1.5px solid transparent;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
  text-align: center;
  transition: all 0.2s ease;
}

.hub-card-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.card-title-header {
  font-size: 0.92rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.card-desc-text {
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.45;
  color: #334155;
  margin-bottom: 1.15rem;
}

.card-action-btn {
  width: 100%;
  padding: 0.52rem 1rem;
  border: none;
  outline: none;
  color: #ffffff;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
  transition: all 0.15s ease;
}

.card-action-btn:hover {
  filter: brightness(1.1);
  transform: scale(1.02);
}

/* 8 Card Color Themes */
.card-theme-indigo { background: #EEF2FF; border-color: #C7D2FE; color: #312E81; }
.card-theme-indigo .card-action-btn { background: #4F46E5; }

.card-theme-sky { background: #F0F9FF; border-color: #BAE6FD; color: #0C4A6E; }
.card-theme-sky .card-action-btn { background: #0284C7; }

.card-theme-emerald { background: #ECFDF5; border-color: #A7F3D0; color: #064E3B; }
.card-theme-emerald .card-action-btn { background: #10B981; }

.card-theme-purple { background: #FAF5FF; border-color: #E9D5FF; color: #581C87; }
.card-theme-purple .card-action-btn { background: #9333EA; }

.card-theme-amber { background: #FEF3C7; border-color: #FDE68A; color: #78350F; }
.card-theme-amber .card-action-btn { background: #D97706; }

.card-theme-rose { background: #FFF1F2; border-color: #FECDD3; color: #881337; }
.card-theme-rose .card-action-btn { background: #E11D48; }

.card-theme-teal { background: #F0FDF8; border-color: #99F6E4; color: #134E48; }
.card-theme-teal .card-action-btn { background: #0D9488; }

.card-theme-cyan { background: #ECFEFF; border-color: #A5F3FC; color: #164E63; }
.card-theme-cyan .card-action-btn { background: #0891B2; }

/* =========================================================
   FULL-SCREEN MODULE VIEW (Windows Software View)
   ========================================================= */
.full-module-view {
  display: none;
  flex-direction: column;
  flex: 1;
  background: var(--bg-app);
}

.full-module-view.active-module {
  display: flex;
}

.module-top-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
}

.btn-back-pill {
  background: #4f46e5;
  color: #ffffff;
  border: none;
  padding: 0.45rem 1.25rem;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  box-shadow: 0 2px 6px rgba(79, 70, 229, 0.3);
}

.btn-back-pill:hover {
  background: #4338ca;
}

.module-badge-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 0.82rem;
}

.badge-read-only {
  color: #16a34a;
  font-weight: 700;
  background: #f0fdf4;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  border: 1px solid #bbf7d0;
}

.badge-pink-edit {
  color: #db2777;
  font-weight: 700;
  background: #fdf2f8;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  border: 1px solid #fbcfe8;
}

.breadcrumb-path {
  color: #4338ca;
  font-weight: 700;
}

/* Filter Controls Row */
.module-filter-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.7);
  padding: 0.65rem 1rem;
  border-radius: 12px;
  border: 1px solid #cbebf2;
  margin-bottom: 0.85rem;
  flex-wrap: wrap;
}

.module-title-bold {
  font-size: 1.1rem;
  font-weight: 800;
  color: #1e1b4b;
  margin-right: 0.5rem;
}

.filter-input-search {
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-pill);
  border: 1px solid #cbd5e1;
  font-size: 0.82rem;
  font-weight: 600;
  outline: none;
  min-width: 180px;
  background: #ffffff;
}

.filter-pill-select {
  padding: 0.45rem 0.85rem;
  border-radius: var(--radius-pill);
  border: 1px solid #cbd5e1;
  font-size: 0.82rem;
  font-weight: 700;
  outline: none;
  cursor: pointer;
  background: #ffffff;
}

.btn-ctrl-blue {
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-ctrl-teal {
  background: #059669;
  color: #fff;
  border: none;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.btn-ctrl-green {
  background: #10b981;
  color: #fff;
  border: none;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-pill);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

/* Widescreen 28-Columns Table */
.widescreen-table-box {
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
  box-shadow: var(--shadow-subtle);
  overflow: auto;
  flex: 1;
}

.erp-widescreen-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
  white-space: nowrap;
}

.erp-widescreen-table thead tr {
  background: #1e1b4b;
  color: #ffffff;
  position: sticky;
  top: 0;
  z-index: 10;
}

.erp-widescreen-table th {
  padding: 0.65rem 0.6rem;
  font-weight: 700;
  border-right: 1px solid rgba(255, 255, 255, 0.15);
  text-align: center;
  font-size: 0.75rem;
}

.erp-widescreen-table td {
  padding: 0.55rem 0.6rem;
  border-bottom: 1px solid #e2e8f0;
  border-right: 1px solid #f1f5f9;
  text-align: center;
  font-weight: 600;
  color: #1e293b;
}

.erp-widescreen-table tbody tr:nth-child(even) {
  background: #f8fafc;
}

.erp-widescreen-table tbody tr:hover {
  background: #eef2ff;
  cursor: pointer;
}

/* Gratuity Cards */
.gratuity-card-row {
  background: #ffffff;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  margin-bottom: 0.65rem;
}

.emp-name-bold {
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #0f172a;
}

.emp-code-doj {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 600;
}

.emp-service-badge {
  font-size: 0.78rem;
  font-weight: 700;
  color: #1e40af;
  margin-top: 0.2rem;
}

.emp-status-badge {
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 800;
  border: 1px solid transparent;
  min-width: 105px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.badge-eligible-green {
  background: #f0fdf4;
  color: #16a34a;
  border-color: #86efac;
}

.badge-progress-gray {
  background: #f8fafc;
  color: #64748b;
  border-color: #cbd5e1;
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 2000;
}

.toast {
  background: #1e293b;
  color: #fff;
  padding: 0.75rem 1.15rem;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}
.toast.success { background: #16a34a; }
.toast.info { background: #2563eb; }

/* Modal & Badge Enhancements */
.theme-modal-box {
  background: #FFFFFF !important;
  border: 2px solid #C7D2FE !important;
  border-radius: 26px !important;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.5), 0 0 0 1px rgba(99, 102, 241, 0.15) !important;
  position: relative !important;
  z-index: 60 !important;
}

.live-10color-badge {
  background: linear-gradient(135deg, #4F46E5 0%, #7C3AED 20%, #EC4899 40%, #EF4444 60%, #F59E0B 80%, #10B981 100%) !important;
  background-size: 300% 300% !important;
  animation: badge10ColorFlow 5s ease infinite !important;
  box-shadow: 0 8px 25px rgba(124, 58, 237, 0.45) !important;
}

@keyframes badge10ColorFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}


/* ==========================================================================
   EXACT 1:1 WINDOWS SOFTWEAR UiTheme.cs CLONED STYLES
   ========================================================================== */
:root {
  --win-app-bg: #e4f8f6;
  --win-surface: #dcf6f4;
  --win-accent-purple: #4c1d95;
  --win-primary-indigo: #4f46e5;
  --win-text-primary: #0f172a;
  --win-text-muted: #475569;
  --win-accent-red: #dc2626;
  --win-accent-green: #16a34a;
  --win-accent-amber: #d97706;
  --win-grid-border: #dae2ee;
  --win-row-even: #f6f8ff;
  --win-row-alt: #eef2ff;
}

/* Master ERP Table Header - Exact Windows UiTheme */
.erp-widescreen-table thead tr {
  background: #4c1d95 !important;
  color: #ffffff !important;
  position: sticky;
  top: 0;
  z-index: 20;
}

.erp-widescreen-table th {
  background: #4c1d95 !important;
  color: #ffffff !important;
  font-family: 'Segoe UI', -apple-system, sans-serif !important;
  font-weight: 700 !important;
  font-size: 0.78rem !important;
  padding: 0.65rem 0.5rem !important;
  text-align: center !important;
  border-right: 1px solid rgba(255, 255, 255, 0.22) !important;
  letter-spacing: 0.3px !important;
  white-space: nowrap !important;
}

.erp-widescreen-table th.sunday-header {
  background: #dc2626 !important;
  color: #ffffff !important;
  font-weight: 900 !important;
}

/* Sticky Headers on horizontal scroll */
.erp-widescreen-table th.sticky-col-code {
  position: sticky !important;
  left: 0 !important;
  z-index: 25 !important;
  background: #312e81 !important;
  color: #ffffff !important;
  border-right: 2px solid #6366f1 !important;
}

.erp-widescreen-table th.sticky-col-name {
  position: sticky !important;
  left: 85px !important;
  z-index: 25 !important;
  background: #312e81 !important;
  color: #ffffff !important;
  border-right: 2px solid #6366f1 !important;
}

/* Sticky Body Cells */
.erp-widescreen-table td.sticky-cell-code {
  position: sticky !important;
  left: 0 !important;
  z-index: 10 !important;
  background: #ffffff !important;
  font-weight: 800 !important;
  color: #4f46e5 !important;
  border-right: 2px solid #e2e8f0 !important;
}

.erp-widescreen-table td.sticky-cell-name {
  position: sticky !important;
  left: 85px !important;
  z-index: 10 !important;
  background: #ffffff !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  border-right: 2px solid #e2e8f0 !important;
}

/* Alternating Rows - UiTheme.cs exact colors */
.erp-widescreen-table tbody tr:nth-child(even) td {
  background-color: #f6f8ff;
}

.erp-widescreen-table tbody tr:nth-child(odd) td {
  background-color: #ffffff;
}

.erp-widescreen-table tbody tr:hover td {
  background-color: #e0e7ff !important;
}

/* Rounded Pill Action Buttons */
.btn-ctrl-purple {
  background: linear-gradient(135deg, #4c1d95, #6d28d9);
  color: #ffffff !important;
  font-weight: 700;
  border-radius: 12px;
  padding: 0.45rem 1rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(76, 29, 149, 0.25);
  transition: all 0.2s ease;
}

.btn-ctrl-purple:hover {
  background: linear-gradient(135deg, #5b21b6, #7c3aed);
  transform: translateY(-1px);
}


/* ==========================================
   PORTAL & MOBILE EXTRA THEME STYLES
   ========================================== */

        :root {
            --bg-app: #E4F8F6;
            --bg-wash: linear-gradient(180deg, #EAFDFB 0%, #DCF6F4 100%);
            --surface-card: #FFFFFF;
            --surface-card-soft: #DCF6F4;
            --surface-card-alt: #D6F2EF;
            --border-soft: #B4E0DC;
            --border-card: #C8EEEB;
            --accent-purple: #4C1D95;
            --accent-purple-light: #5B21B6;
            --accent-purple-grad: linear-gradient(135deg, #4C1D95 0%, #5B21B6 50%, #6D28D9 100%);
            --input-bg: #EEF2FF;
            --input-text: #312E81;
            --input-border: #C7D2FE;
            --text-primary: #0F172A;
            --text-muted: #475569;
        }
        * {
            box-sizing: border-box;
            font-weight: 700;
        }
        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
            background: linear-gradient(180deg, #EAFDFB 0%, #DCF6F4 100%) !important;
            min-height: 100vh;
            color: #0F172A;
            border-top: 5px solid #4C1D95;
            -webkit-tap-highlight-color: transparent;
        }
        .theme-header {
            background: linear-gradient(135deg, #4C1D95 0%, #5B21B6 50%, #6D28D9 100%) !important;
            border-bottom: 2px solid #7C3AED;
            box-shadow: 0 4px 14px rgba(76, 29, 149, 0.3);
        }
        .theme-card {
            background: #FFFFFF !important;
            border: 1.5px solid #99D5D0 !important;
            border-radius: 20px !important;
            box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05) !important;
        }
        .theme-card-profile {
            background: #FFFFFF !important;
            border: 1.5px solid #99D5D0 !important;
            border-radius: 20px !important;
            box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05) !important;
        }

        /* RICH COLORFUL THEMED MODAL CONTAINER */
        .theme-modal-box {
            background: linear-gradient(180deg, #EAFDFB 0%, #DCF6F4 100%) !important;
            border: 2.5px solid #99D5D0 !important;
            border-radius: 28px !important;
            box-shadow: 0 20px 45px rgba(15, 23, 42, 0.4), 0 0 0 1px rgba(153, 213, 208, 0.6) !important;
            position: relative !important;
            z-index: 60 !important;
            max-width: 400px !important;
            width: 100% !important;
            margin: auto !important;
            opacity: 1 !important;
        }

        /* --- LIVE 10-COLOR DYNAMIC GRADIENT ANIMATION SYSTEM --- */
        @keyframes live10ColorShift {
            0%   { background: linear-gradient(135deg, #7C3AED 0%, #9333EA 100%); box-shadow: 0 8px 25px rgba(124, 58, 237, 0.7); }
            10%  { background: linear-gradient(135deg, #2563EB 0%, #3B82F6 100%); box-shadow: 0 8px 25px rgba(37, 99, 235, 0.7); }
            20%  { background: linear-gradient(135deg, #0891B2 0%, #06B6D4 100%); box-shadow: 0 8px 25px rgba(8, 145, 178, 0.7); }
            30%  { background: linear-gradient(135deg, #0D9488 0%, #14B8A6 100%); box-shadow: 0 8px 25px rgba(13, 148, 136, 0.7); }
            40%  { background: linear-gradient(135deg, #16A34A 0%, #22C55E 100%); box-shadow: 0 8px 25px rgba(22, 163, 74, 0.7); }
            50%  { background: linear-gradient(135deg, #D97706 0%, #F59E0B 100%); box-shadow: 0 8px 25px rgba(217, 119, 6, 0.7); }
            60%  { background: linear-gradient(135deg, #EA580C 0%, #F97316 100%); box-shadow: 0 8px 25px rgba(234, 88, 12, 0.7); }
            70%  { background: linear-gradient(135deg, #E11D48 0%, #F43F5E 100%); box-shadow: 0 8px 25px rgba(225, 29, 72, 0.7); }
            80%  { background: linear-gradient(135deg, #DB2777 0%, #EC4899 100%); box-shadow: 0 8px 25px rgba(219, 39, 119, 0.7); }
            90%  { background: linear-gradient(135deg, #4C1D95 0%, #6D28D9 100%); box-shadow: 0 8px 25px rgba(76, 29, 149, 0.7); }
            100% { background: linear-gradient(135deg, #7C3AED 0%, #9333EA 100%); box-shadow: 0 8px 25px rgba(124, 58, 237, 0.7); }
        }

        @keyframes liveLogoPulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.06); }
        }

        .live-10color-badge {
            animation: live10ColorShift 10s infinite linear, liveLogoPulse 3s infinite ease-in-out !important;
            border: 3px solid rgba(255, 255, 255, 0.9) !important;
            color: #FFFFFF !important;
            transition: all 0.3s ease;
        }

        /* BUTTONS */
        .btn-purple {
            background: linear-gradient(135deg, #4C1D95 0%, #5B21B6 50%, #6D28D9 100%) !important;
            color: #FFFFFF !important;
            border: 1.5px solid #7C3AED !important;
            border-radius: 14px !important;
            font-weight: 900 !important;
            box-shadow: 0 4px 14px rgba(76, 29, 149, 0.3) !important;
            cursor: pointer;
            transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
        }
        .btn-green {
            background: linear-gradient(135deg, #059669 0%, #10B981 100%) !important;
            color: #FFFFFF !important;
            border: 1.5px solid #34D399 !important;
            border-radius: 14px !important;
            font-weight: 900 !important;
            box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3) !important;
            cursor: pointer;
            transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
        }
        .touch-btn {
            transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
            cursor: pointer;
        }
        .touch-btn:active {
            transform: scale(0.97);
            filter: brightness(0.95);
        }
        .touch-btn:hover {
            filter: brightness(1.06);
        }

        /* COLORFUL INPUTS ENHANCEMENT */
        input[type="text"], input[type="password"], input[type="date"], select {
            background: #EEF2FF !important;
            border: 2px solid #C7D2FE !important;
            border-radius: 14px !important;
            color: #1E1B4B !important;
            font-weight: 900 !important;
            outline: none !important;
            transition: all 0.15s ease !important;
        }
        input[type="text"]:focus, input[type="password"]:focus, input[type="date"]:focus, select:focus {
            background: #FFFFFF !important;
            border-color: #7C3AED !important;
            box-shadow: 0 0 0 3.5px rgba(124, 58, 237, 0.25) !important;
        }

        /* INFO & STAT BOXES */
        .info-box-indigo {
            background: #EEF2FF !important;
            border: 1.5px solid #C7D2FE !important;
            border-radius: 14px !important;
            padding: 8px 10px !important;
        }
        .info-box-green {
            background: #DCFCE7 !important;
            border: 1.5px solid #86EFAC !important;
            border-radius: 14px !important;
            padding: 8px 10px !important;
        }
        .info-box-purple {
            background: #FAF5FF !important;
            border: 1.5px solid #D8B4FE !important;
            border-radius: 14px !important;
            padding: 8px 10px !important;
        }
        .info-box-amber {
            background: #FEF3C7 !important;
            border: 1.5px solid #FCD34D !important;
            border-radius: 14px !important;
            padding: 8px 10px !important;
        }

        .stat-box-green {
            background: #F0FDF4 !important;
            border: 1.5px solid #86EFAC !important;
            border-radius: 16px !important;
        }
        .stat-box-red {
            background: #FEF2F2 !important;
            border: 1.5px solid #FCA5A5 !important;
            border-radius: 16px !important;
        }
        .stat-box-amber {
            background: #FFFBEB !important;
            border: 1.5px solid #FDE68A !important;
            border-radius: 16px !important;
        }
        .stat-box-purple {
            background: #FAF5FF !important;
            border: 1.5px solid #E9D5FF !important;
            border-radius: 16px !important;
        }

        .card-action-duty {
            background: linear-gradient(135deg, #FAF5FF 0%, #F3E8FF 100%) !important;
            border: 1.5px solid #D8B4FE !important;
            border-radius: 20px !important;
            box-shadow: 0 4px 12px rgba(124, 58, 237, 0.1) !important;
        }
        .card-action-salary {
            background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%) !important;
            border: 1.5px solid #A7F3D0 !important;
            border-radius: 20px !important;
            box-shadow: 0 4px 12px rgba(16, 185, 129, 0.1) !important;
        }
        .card-action-leave {
            background: linear-gradient(135deg, #F0FDFA 0%, #CCFBF1 100%) !important;
            border: 1.5px solid #99F6E4 !important;
            border-radius: 20px !important;
            box-shadow: 0 4px 12px rgba(13, 148, 136, 0.1) !important;
        }
        .card-admin-banner {
            background: linear-gradient(135deg, #1E1B4B 0%, #312E81 100%) !important;
            border: 1.5px solid #6366F1 !important;
            border-radius: 18px !important;
        }

        .pill-badge { padding: 4px 10px; border-radius: 9999px; font-weight: 800; font-size: 11px; display: inline-flex; align-items: center; }
        .badge-p { background: #DCFCE7; color: #166534; border: 1.5px solid #86EFAC; }
        .badge-a { background: #FEE2E2; color: #991B1B; border: 1.5px solid #FCA5A5; }
        .badge-ot { background: #FEF3C7; color: #92400E; border: 1.5px solid #FCD34D; }
        .badge-off { background: #FEE2E2; color: #991B1B; border: 1.5px solid #FCA5A5; font-weight: 900; }
        .badge-h { background: #FEF3C7; color: #92400E; border: 1.5px solid #FCD34D; font-weight: 900; }

        /* ACTIVE SELECTED SIDEBAR MENU BUTTON HIGHLIGHT */
        .erp-winforms-btn {
            display: flex !important;
            align-items: center !important;
            justify-content: center !important;
            text-align: center !important;
            padding: 11px 8px !important;
            border-radius: 12px !important;
            font-size: 13px !important;
            line-height: 1 !important;
            cursor: pointer !important;
            border: 2px solid transparent !important;
            width: 100% !important;
            box-shadow: 0 2px 5px rgba(0,0,0,0.15) !important;
            transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
            position: relative !important;
            opacity: 0.92;
        }
        .erp-winforms-btn:hover {
            opacity: 1 !important;
            filter: brightness(1.15) !important;
            transform: translateY(-1.5px) !important;
            box-shadow: 0 4px 10px rgba(0,0,0,0.25) !important;
        }
        .erp-winforms-btn.active {
            opacity: 1 !important;
            border: 2.5px solid #FEF08A !important; /* Bright Gold/Yellow Border */
            box-shadow: 0 0 0 3px rgba(250, 204, 21, 0.6), 0 8px 18px rgba(0,0,0,0.4) !important;
            transform: scale(1.03) !important;
            filter: brightness(1.18) !important;
            z-index: 10 !important;
        }
        .erp-winforms-btn.active span {
            color: #FFFFFF !important;
            font-weight: 900 !important;
            text-shadow: 0 2px 4px rgba(0,0,0,0.6) !important;
        }
    
        /* SIDEBAR FLYOUT DROPDOWN SUBMENU */
        .sidebar-menu-wrapper {
            position: relative;
            width: 100%;
        }
        .sidebar-flyout {
            display: none;
            position: absolute;
            left: 100%;
            top: 0;
            margin-left: 8px;
            width: 250px;
            background: linear-gradient(135deg, #1E1B4B 0%, #0F172A 100%);
            border: 1.5px solid #818CF8;
            border-radius: 14px;
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
            padding: 8px;
            z-index: 9999;
        }
        .sidebar-menu-wrapper:hover .sidebar-flyout {
            display: block;
        }
        .flyout-header {
            font-size: 11px;
            font-weight: 900;
            color: #FACC15;
            padding: 4px 8px 6px;
            border-bottom: 1px solid rgba(255, 255, 255, 0.15);
            margin-bottom: 4px;
        }
        .flyout-item {
            display: flex;
            align-items: center;
            padding: 6px 8px;
            border-radius: 8px;
            color: #FFFFFF;
            font-size: 11.5px;
            font-weight: 800;
            cursor: pointer;
            transition: all 0.15s ease;
        }
        .flyout-item:hover {
            background: rgba(255, 255, 255, 0.15);
            transform: translateX(3px);
            color: #FDE047;
        }
        .flyout-item span.desc {
            font-size: 9.5px;
            color: #CBD5E1;
            margin-left: auto;
        }

    

/* ==========================================
   SINGLE CLEAN SCROLLBAR ENFORCEMENT
   ========================================== */
html, body {
  height: 100% !important;
  width: 100% !important;
  overflow: hidden !important;
}

#adminMain {
  height: 100vh !important;
  max-height: 100vh !important;
  overflow: hidden !important;
}

.app-container {
  height: 100vh !important;
  max-height: 100vh !important;
  overflow: hidden !important;
}

.main-wrapper {
  height: 100% !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

/* Hide scrollbars on any nested sub-containers to prevent double scrollbars */
#control-attendance-duty-card div[style*="overflow-y:auto"] {
  overflow-y: visible !important;
}
