/* -------------------------------------------------------------
   GLOBAL & MATERIAL CORE THEME
   ------------------------------------------------------------- */
:root {
  --app-blue: #1a73e8;
  --app-blue-hover: #1557b0;
  --app-blue-light: #e8f0fe;
  
  --app-red: #ea4335;
  --app-red-hover: #c5221f;
  --app-red-light: #fce8e6;
  
  --app-green: #34a853;
  --app-green-hover: #137333;
  --app-green-light: #e6f4ea;
  
  --app-yellow: #fbbc05;
  --app-yellow-hover: #f29900;
  --app-yellow-light: #fef7e0;
  
  --bg-primary: #f8f9fa;
  --bg-white: #ffffff;
  --text-primary: #202124;
  --text-secondary: #5f6368;
  --border-light: #dadce0;
  --border-focus: #1a73e8;
  --shadow-card: 0 1px 2px 0 rgba(60,64,67,0.3), 0 1px 3px 1px rgba(60,64,67,0.15);
  --shadow-hover: 0 1px 3px 0 rgba(60,64,67,0.3), 0 4px 8px 3px rgba(60,64,67,0.15);
  
  --font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-title: 'Product Sans', 'Roboto', sans-serif;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

/* Utility classes */
.hidden {
  display: none !important;
}

/* -------------------------------------------------------------
   TOAST NOTIFICATION BANNER SYSTEM
   ------------------------------------------------------------- */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 2000;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  min-width: 320px;
  background-color: #323232;
  color: #ffffff;
  padding: 14px 20px;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: slideInRight 0.3s cubic-bezier(0, 0, 0.2, 1);
  transition: all 0.3s ease;
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.toast.toast-success {
  border-left: 4px solid var(--app-green);
}

.toast.toast-error {
  border-left: 4px solid var(--app-red);
}

.toast-icon {
  font-size: 20px;
}

.toast-icon.success { color: var(--app-green); }
.toast-icon.error { color: var(--app-red); }

/* -------------------------------------------------------------
   CUSTOM MODERN MODAL SYSTEM
   ------------------------------------------------------------- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(32, 33, 36, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1500;
  backdrop-filter: blur(2px);
  animation: fadeInModal 0.2s ease-out;
}

@keyframes fadeInModal {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-card {
  width: calc(100% - 32px);
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  margin: 16px;
  background-color: var(--bg-white);
  border-radius: 12px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-hover);
  padding: 24px;
  animation: scaleUpModal 0.2s cubic-bezier(0, 0, 0.2, 1);
}

@keyframes scaleUpModal {
  from { transform: scale(0.92); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.modal-header-icon {
  font-size: 28px;
  color: var(--app-yellow-hover);
}

.modal-title {
  font-size: 18px;
  font-weight: 500;
  color: var(--text-primary);
}

.modal-body {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 24px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* -------------------------------------------------------------
   ONBOARDING GUIDED TOUR BANNERS
   ------------------------------------------------------------- */
.onboarding-guide-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--app-blue-light);
  border: 1px solid #d2e3fc;
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 24px;
  gap: 16px;
  box-shadow: 0 1px 2px 0 rgba(60,64,67,0.05);
}

.bg-blue-tint {
  background-color: #f1f3f4;
  border-color: var(--border-light);
}

.guide-banner-left {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.guide-icon {
  font-size: 24px;
  color: var(--app-blue);
  flex-shrink: 0;
  margin-top: 2px;
}

.guide-icon.text-blue {
  color: var(--text-secondary);
}

.guide-text-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.guide-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
}

.guide-desc {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.guide-dismiss-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.guide-dismiss-btn:hover {
  background-color: rgba(32, 33, 36, 0.08);
  color: var(--text-primary);
}

/* -------------------------------------------------------------
   UNSAVED CHANGES DYNAMIC BADGES
   ------------------------------------------------------------- */
.align-center {
  display: flex;
  align-items: center;
  gap: 16px;
}

.dirty-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--app-yellow-hover);
  background-color: var(--app-yellow-light);
  padding: 4px 10px;
  border-radius: 12px;
  border: 1px solid #fde293;
}

.dirty-dot {
  width: 8px;
  height: 8px;
  background-color: var(--app-yellow-hover);
  border-radius: 50%;
  animation: pulseDirty 1.5s infinite;
}

@keyframes pulseDirty {
  0% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.6; }
}

/* -------------------------------------------------------------
   LOGIN PAGE SYSTEM
   ------------------------------------------------------------- */
.login-screen-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  overflow: auto;
  padding: 20px;
}

.login-card {
  width: 100%;
  max-width: 440px;
  background-color: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 40px;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.3s ease;
}

.login-card:hover {
  box-shadow: var(--shadow-hover);
}

.login-header {
  text-align: center;
  margin-bottom: 24px;
}

.login-logo-icon {
  font-size: 48px;
  color: var(--app-blue);
  margin-bottom: 12px;
}

.login-title {
  font-family: var(--font-title);
  font-size: 24px;
  font-weight: 400;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.login-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.login-error-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  background-color: var(--app-red-light);
  color: var(--app-red-hover);
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid #fad2cf;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 24px;
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.form-note {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 4px;
  font-style: italic;
}

.login-footer {
  text-align: center;
  margin-top: 32px;
  border-top: 1px solid var(--border-light);
  padding-top: 20px;
}

.login-footer p {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* -------------------------------------------------------------
   APP HEADER STYLE
   ------------------------------------------------------------- */
.app-header {
  height: 64px;
  background-color: var(--bg-white);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.logo-container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo-icon {
  color: var(--app-blue);
  font-size: 28px;
}

.logo-text {
  font-family: var(--font-title);
  font-size: 22px;
  font-weight: 400;
  color: var(--text-primary);
}

.logo-subtext {
  color: var(--app-blue);
  font-weight: 500;
}

.fy-badge {
  background-color: var(--app-blue-light);
  color: var(--app-blue);
  font-weight: 700;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 12px;
  letter-spacing: 0.5px;
}

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

.control-panel {
  display: flex;
  align-items: center;
  gap: 10px;
}

.control-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.select-wrapper {
  position: relative;
}

.app-select {
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 500;
  color: var(--app-blue);
  background-color: var(--app-blue-light);
  border: 1px solid transparent;
  padding: 6px 16px;
  border-radius: 18px;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
  appearance: none;
  padding-right: 32px;
  max-width: 220px;
  text-overflow: ellipsis;
}

.app-select:hover {
  background-color: #d2e3fc;
}

.select-wrapper::after {
  content: 'arrow_drop_down';
  font-family: 'Material Icons Outlined';
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--app-blue);
  pointer-events: none;
  font-size: 18px;
}

.months-remaining-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  background-color: #f1f3f4;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  padding: 6px 16px;
  border-radius: 18px;
  border: 1px solid var(--border-light);
}

.months-remaining-badge span {
  font-size: 16px;
}

/* -------------------------------------------------------------
   MAIN CONTAINER & SIDEBAR LAYOUT
   ------------------------------------------------------------- */
.main-layout {
  display: flex;
  flex: 1;
  height: calc(100vh - 64px);
}

.sidebar {
  width: 256px;
  background-color: var(--bg-white);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px 0;
  flex-shrink: 0;
}

.nav-list {
  list-style: none;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 12px 24px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 0 24px 24px 0;
  margin-right: 12px;
  font-size: 14px;
  font-weight: 500;
}

.nav-item:hover {
  background-color: var(--bg-primary);
}

.nav-item.active {
  background-color: var(--app-blue-light);
  color: var(--app-blue);
}

.nav-item span.material-icons-outlined {
  font-size: 22px;
}

.sidebar-footer {
  padding: 0 24px;
}

.user-info-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  background-color: var(--bg-primary);
  border: 1px solid var(--border-light);
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 12px;
}

.user-info-badge span {
  font-size: 16px;
  color: var(--app-blue);
}

.user-email-text {
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  font-weight: 500;
}

.regime-note {
  font-size: 11px;
  font-weight: 700;
  color: var(--app-green);
  background-color: var(--app-green-light);
  padding: 4px 8px;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 12px;
}

.copyright {
  font-size: 11px;
  color: var(--text-secondary);
}

.content-area {
  flex: 1;
  padding: 32px;
  overflow-y: auto;
  position: relative;
}

/* -------------------------------------------------------------
   TAB CONTENT SYSTEM
   ------------------------------------------------------------- */
.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

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

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

.section-title-row {
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.section-title {
  font-size: 24px;
  font-weight: 400;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.section-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
}

/* -------------------------------------------------------------
   METRICS GRID CARDS
   ------------------------------------------------------------- */
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.metric-card {
  background-color: var(--bg-white);
  border-radius: 12px;
  padding: 24px;
  border: 1px solid var(--border-light);
  box-shadow: 0 1px 2px 0 rgba(60,64,67,0.1);
  transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.metric-card:hover {
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}

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

.metric-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.metric-icon {
  font-size: 24px;
  color: var(--text-secondary);
}

.metric-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.metric-footer {
  font-size: 11px;
  color: var(--text-secondary);
}

/* Accent Card Colors */
.card-blue { border-left: 4px solid var(--app-blue); }
.card-blue .metric-icon { color: var(--app-blue); }
.card-red { border-left: 4px solid var(--app-red); }
.card-red .metric-icon { color: var(--app-red); }
.card-green { border-left: 4px solid var(--app-green); }
.card-green .metric-icon { color: var(--app-green); }
.card-yellow { border-left: 4px solid var(--app-yellow); }
.card-yellow .metric-icon { color: var(--app-yellow); }

.font-link {
  color: var(--app-green) !important;
}

/* -------------------------------------------------------------
   ANALYTICS & CHART SYSTEM
   ------------------------------------------------------------- */
.analytics-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

.chart-card {
  background-color: var(--bg-white);
  border-radius: 12px;
  border: 1px solid var(--border-light);
  padding: 24px;
  box-shadow: 0 1px 2px 0 rgba(60,64,67,0.1);
}

.chart-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 12px;
}

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

/* -------------------------------------------------------------
   PREMIUM DYNAMIC TABLES
   ------------------------------------------------------------- */
.table-card {
  background-color: var(--bg-white);
  border-radius: 12px;
  border: 1px solid var(--border-light);
  box-shadow: 0 1px 2px 0 rgba(60,64,67,0.1);
  overflow: hidden;
  margin-bottom: 32px;
}

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

.app-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

.app-table th,
.app-table td {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}

.app-table th {
  background-color: #f1f3f4;
  font-weight: 500;
  color: var(--text-primary);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  height: 48px;
}

.app-table tbody tr:hover {
  background-color: #f8f9fa;
}

.text-right { text-align: right; }
.text-center { text-align: center; }

/* Sticky first column for scrolling */
.app-table td:first-child,
.app-table th:first-child {
  position: sticky;
  left: 0;
  background-color: var(--bg-white);
  z-index: 10;
  border-right: 2px solid var(--border-light);
  box-shadow: 4px 0 8px -4px rgba(0, 0, 0, 0.15); /* Right boundary shadow for visual scrolling guide */
  font-weight: 500;
  text-align: left;
}

.app-table th:first-child {
  background-color: #e8eaed;
  z-index: 11;
}

.app-table tbody tr:hover td:first-child {
  background-color: #f1f3f4;
}

/* Cell Types Styling */
.table-input-cell {
  background-color: var(--app-yellow-light) !important;
  color: #0000FF !important;
  padding: 4px 8px !important;
  border-radius: 4px;
  border: 1px solid var(--app-yellow);
  font-family: var(--font-family);
  font-size: 13px;
  font-weight: 500;
  width: 100%;
  text-align: right;
  outline: none;
  transition: all 0.2s ease;
}

.table-input-cell:focus {
  border-color: var(--border-focus);
  background-color: var(--bg-white) !important;
  box-shadow: 0 0 0 2px var(--app-blue-light);
}

.text-center .table-input-cell {
  text-align: center;
}

/* Double border for Total row */
.table-row-total td {
  font-weight: 700 !important;
  background-color: #f8f9fa;
  border-top: 1px solid #000000;
  border-bottom: 3px double #000000;
}

/* Section dividers inside table */
.table-row-section-header td {
  background-color: #e8f0fe !important;
  color: var(--app-blue) !important;
  font-weight: 700 !important;
  text-align: center !important;
  font-size: 14px;
}

.table-row-section-header td:first-child {
  background-color: #e8f0fe !important;
}

/* Dynamic computed indicators */
.font-bold {
  font-weight: 700;
  color: #000000;
}

.font-link-text {
  color: var(--app-green-hover) !important;
  font-weight: 500;
}

.tds-highlight-cell {
  background-color: var(--app-green-light) !important;
  color: var(--app-green-hover) !important;
  font-weight: 700 !important;
  font-size: 14px;
}

.tds-highlight-cell:first-child {
  background-color: var(--app-green-light) !important;
}

/* -------------------------------------------------------------
   SLAB REFERENCE & EXPLANATORY DECKS
   ------------------------------------------------------------- */
.slab-reference-deck {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 16px;
}

.reference-card {
  background-color: var(--bg-white);
  border-radius: 12px;
  border: 1px solid var(--border-light);
  padding: 24px;
  box-shadow: 0 1px 2px 0 rgba(60,64,67,0.1);
}

.border-blue { border-top: 4px solid var(--app-blue); }
.border-green { border-top: 4px solid var(--app-green); }
.border-red { border-top: 4px solid var(--app-red); }

.ref-title {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 16px;
}

.text-blue { color: var(--app-blue); }
.text-green { color: var(--app-green-hover); }
.text-red { color: var(--app-red-hover); }

.ref-slab-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.ref-slab-table th,
.ref-slab-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-light);
}

.ref-slab-table th {
  text-align: left;
  color: var(--text-secondary);
  font-weight: 500;
}

.ref-slab-table td.bold {
  font-weight: 700;
}

.plan-rules {
  list-style: none;
}

.plan-rules li {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 12px;
  position: relative;
  padding-left: 20px;
}

.plan-rules li::before {
  content: 'check_circle';
  font-family: 'Material Icons Outlined';
  position: absolute;
  left: 0;
  top: 1px;
  color: var(--app-green);
  font-size: 14px;
}

/* -------------------------------------------------------------
   BUTTON SYSTEMS
   ------------------------------------------------------------- */
.app-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 24px;
  border-radius: 20px;
  border: 1px solid var(--border-light);
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
  height: 38px;
}

.app-button:disabled,
.btn-disabled {
  background-color: transparent !important;
  color: #c4c6cc !important;
  border-color: #e1e3e8 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
}

.btn-primary {
  background-color: var(--app-blue);
  color: var(--bg-white);
  border-color: transparent;
  box-shadow: 0 1px 2px 0 rgba(66,133,244,0.3), 0 1px 3px 1px rgba(66,133,244,0.15);
}

.btn-primary:hover {
  background-color: var(--app-blue-hover);
  box-shadow: 0 1px 3px 0 rgba(66,133,244,0.4), 0 4px 8px 3px rgba(66,133,244,0.15);
}

.btn-primary:active {
  background-color: #0d47a1;
}

.btn-inactive {
  background-color: #f1f3f4 !important;
  color: var(--text-secondary) !important;
  border-color: var(--border-light) !important;
  box-shadow: none !important;
}

.btn-flat {
  background-color: transparent;
  border-color: transparent;
  color: var(--text-secondary);
}

.btn-flat:hover {
  background-color: #f1f3f4;
  color: var(--text-primary);
}

.btn-flat span {
  color: var(--app-red);
}

.full-width {
  width: 100%;
  justify-content: center;
}

/* -------------------------------------------------------------
   SETTINGS & FORMS
   ------------------------------------------------------------- */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.settings-card {
  background-color: var(--bg-white);
  border-radius: 12px;
  border: 1px solid var(--border-light);
  padding: 24px;
  box-shadow: 0 1px 2px 0 rgba(60,64,67,0.1);
  display: flex;
  flex-direction: column;
}

.app-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.form-group label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.app-input {
  font-family: var(--font-family);
  font-size: 14px;
  padding: 10px 14px;
  border-radius: 4px;
  border: 1px solid var(--border-light);
  outline: none;
  transition: all 0.2s ease;
}

.app-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 2px var(--app-blue-light);
}

.employee-list-container {
  max-height: 400px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 8px;
}

.employee-item-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  background-color: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  transition: all 0.2s ease;
}

.employee-item-card:hover {
  border-color: #b5b8bd;
  background-color: #f1f3f4;
}

.emp-card-details h4 {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.emp-card-details p {
  font-size: 11px;
  color: var(--text-secondary);
}

.btn-delete {
  background-color: transparent;
  border: 1px solid transparent;
  color: var(--app-red);
  padding: 6px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-delete:hover {
  background-color: var(--app-red-light);
  border-color: var(--app-red);
}

/* -------------------------------------------------------------
   LOADING OVERLAYS & SPINNERS
   ------------------------------------------------------------- */
.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 999;
  transition: opacity 0.3s ease;
}

.loading-overlay p {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
}

.app-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--app-blue-light);
  border-top: 4px solid var(--app-blue);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* -------------------------------------------------------------
   TABLE HELP ICONS SYSTEM
   ------------------------------------------------------------- */
.table-help-icon {
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  margin-left: 6px;
  vertical-align: middle;
  transition: color 0.2s ease, transform 0.2s ease;
  display: inline-block;
}

.table-help-icon:hover {
  color: var(--app-blue);
  transform: scale(1.15);
}

/* -------------------------------------------------------------
   CHALLAN MAPPING DRAG & DROP VIEW
   ------------------------------------------------------------- */
.challan-info-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.badge-pending {
  background-color: var(--app-yellow-light);
  color: var(--app-yellow-hover);
  border: 1px solid #fde293;
}

.badge-deposited {
  background-color: var(--app-green-light);
  color: var(--app-green-hover);
  border: 1px solid #a8dab5;
}

.drag-zone {
  min-height: 380px !important;
  max-height: 480px;
  overflow-y: auto;
  border: 2px dashed #dadce0;
  border-radius: 8px;
  transition: all 0.2s ease;
  padding: 12px !important;
}

.drag-zone:hover {
  border-color: var(--app-blue);
  background-color: #f1f3f4;
}

.drag-column.border-green .drag-zone:hover {
  border-color: var(--app-green);
  background-color: var(--app-green-light);
}

.drag-emp-card {
  user-select: none;
}

.drag-emp-card:active {
  cursor: grabbing !important;
  opacity: 0.65;
  transform: scale(0.98);
}

.drag-arrow-spacer span {
  animation: floatArrow 2s infinite ease-in-out;
}

@keyframes floatArrow {
  0% { transform: translateX(-3px); }
  50% { transform: translateX(3px); }
  100% { transform: translateX(-3px); }
}

@media (max-width: 768px) {
  .drag-drop-layout {
    grid-template-columns: 1fr !important;
  }
  .drag-arrow-spacer {
    transform: rotate(90deg);
    margin: 8px 0;
  }
}

/* -------------------------------------------------------------
   RESPONSIVE QUERIES
   ------------------------------------------------------------- */
@media (max-width: 1024px) {
  .analytics-row {
    grid-template-columns: 1fr;
  }
  .settings-grid,
  .slab-reference-deck {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .main-layout {
    flex-direction: column;
    height: auto;
    overflow: visible;
  }
  .sidebar {
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid var(--border-light);
    flex-direction: row;
    padding: 8px 16px;
    justify-content: center;
    align-items: center;
    position: sticky;
    top: 64px;
    z-index: 90;
    background-color: var(--bg-white);
  }
  .nav-list {
    display: flex;
    flex-direction: row;
    width: 100%;
    justify-content: space-around;
    overflow-x: auto;
    gap: 8px;
    padding-bottom: 4px;
  }
  .nav-item {
    border-radius: 20px;
    margin-right: 0;
    padding: 8px 16px;
    gap: 8px;
    flex-shrink: 0;
  }
  .sidebar-footer {
    display: none !important; /* Hide footer of sidebar in mobile view to save vertical space */
  }
  .content-area {
    padding: 16px;
    height: auto;
    overflow-y: visible;
  }
  .app-header {
    flex-direction: column;
    height: auto;
    padding: 16px;
    gap: 12px;
    align-items: stretch;
  }
  .header-right {
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
  }
  .control-panel {
    flex: 1 1 calc(50% - 12px);
    justify-content: space-between;
  }
  .app-select {
    max-width: 100%;
    width: 100%;
  }
  .months-remaining-badge {
    flex: 1 1 auto;
    justify-content: center;
  }
  #sign-out-btn {
    flex: 0 0 auto;
  }
}

/* -------------------------------------------------------------
   ENHANCED MULTI-CHALLAN & QUARTERLY RETURNS STYLING
   ------------------------------------------------------------- */
.challan-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  align-items: flex-end;
  background-color: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: 0 1px 2px 0 rgba(60,64,67,0.1);
}

.challan-form-title {
  grid-column: 1 / -1;
  font-family: var(--font-title);
  font-size: 15px;
  font-weight: 500;
  color: var(--app-blue);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.challan-pool-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 320px;
}

.challan-pool-card {
  background-color: var(--bg-white);
  border: 1px solid var(--border-light);
  border-left: 4px solid var(--app-green);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 2px 0 rgba(60,64,67,0.1);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.challan-pool-card.over-limit {
  border-left-color: var(--app-red);
}

.challan-pool-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  border-bottom: 1px dashed var(--border-light);
  padding-bottom: 10px;
}

.challan-pool-title {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.challan-pool-meta {
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.challan-pool-amount {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--app-green-hover);
  text-align: right;
}

.challan-pool-amount.text-red {
  color: var(--app-red-hover);
}

.challan-drop-zone {
  background-color: var(--bg-primary);
  border: 1px dashed var(--border-light);
  border-radius: 8px;
  padding: 12px;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.challan-drop-zone.dragover {
  background-color: var(--app-green-light);
  border-color: var(--app-green);
}

.mapped-emp-card {
  background-color: var(--bg-white);
  border: 1px solid var(--border-light);
  border-left: 3px solid var(--app-green);
  border-radius: 6px;
  padding: 8px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  box-shadow: 0 1px 1px rgba(0,0,0,0.03);
}

.mapped-emp-name {
  font-weight: 500;
  color: var(--text-primary);
}

.mapped-emp-pan {
  font-size: 10px;
  color: var(--text-secondary);
}

.btn-unmap {
  background: none;
  border: none;
  color: var(--app-red);
  cursor: pointer;
  padding: 2px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

.btn-unmap:hover {
  background-color: var(--app-red-light);
}

.emp-card-actions-row {
  display: flex;
  gap: 8px;
}

.btn-edit-emp {
  background-color: var(--app-blue-light);
  color: var(--app-blue);
  border: none;
  padding: 6px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

.btn-edit-emp:hover {
  background-color: #d2e3fc;
}

.quarter-summary-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.quarter-card {
  background-color: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.quarter-card-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

.quarter-card-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.quarter-card-desc {
  font-size: 11px;
  color: var(--text-secondary);
  border-top: 1px solid var(--bg-primary);
  padding-top: 6px;
  margin-top: 4px;
}

/* -------------------------------------------------------------
   MOBILE HAMBURGER & RESPONSIVE DRAWER SIDEBAR
   ------------------------------------------------------------- */
.hamburger-menu-btn {
  display: none !important;
}

.sidebar-mobile-header {
  display: none;
}

@media (max-width: 768px) {
  .hamburger-menu-btn {
    display: inline-flex !important;
  }
  
  .sidebar-mobile-header {
    display: flex !important;
  }
  
  .sidebar {
    position: fixed !important;
    top: 0 !important;
    left: -280px !important;
    width: 280px !important;
    height: 100vh !important;
    background-color: var(--bg-white) !important;
    box-shadow: 2px 0 12px rgba(0,0,0,0.15) !important;
    z-index: 1200 !important;
    display: flex !important;
    flex-direction: column !important;
    padding: 24px 16px !important;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    overflow-y: auto !important;
    border-right: 1px solid var(--border-light) !important;
    border-bottom: none !important;
  }
  
  .sidebar.active {
    left: 0 !important;
  }
  
  .nav-list {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    gap: 8px !important;
    justify-content: flex-start !important;
    overflow-x: visible !important;
  }
  
  .nav-item {
    width: 100% !important;
    border-radius: 8px !important;
    padding: 12px 16px !important;
    margin-right: 0 !important;
    justify-content: flex-start !important;
  }
  
  .sidebar-footer {
    display: flex !important;
    flex-direction: column !important;
    margin-top: auto !important;
    padding-top: 20px !important;
    border-top: 1px solid var(--border-light) !important;
  }
}


