/* Global Variables & Theming */
:root {
  --primary: #f7b159; /* Taxrica Golden Orange */
  --primary-hover: #e69d3f;
  --dark-accent: #2D2D2D;
  --dark-text: #2D2D2D;
  --bg-light: #F8F6F0;
  --border-light: rgba(255, 255, 255, 0.4);
  --text-main: #424242;
  --text-secondary: #707070;
  --glass: rgba(255, 255, 255, 0.85);
  
  /* Glassmorphism Variables */
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-blur: blur(12px);
  --glass-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  --glass-border: 1px solid rgba(255, 255, 255, 0.7);
  
  --highlight-yellow: #f7b159;
  --highlight-yellow-soft: rgba(247, 177, 89, 0.3);

  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 32px;
  --radius-pill: 9999px;

  --transition-fast: 150ms ease-in-out;
  --spacing-unit: 8px;
}

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

/* Base resets & Fonts */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}


body {
  background-color: var(--bg-light);
  background-image: 
    radial-gradient(circle at top left, #F2EDE4 0%, transparent 45%),
    radial-gradient(circle at bottom right, #F5EFE6 0%, transparent 45%),
    radial-gradient(circle at center 80%, rgba(250,219,95,0.06) 0%, transparent 50%);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  padding: calc(var(--spacing-unit) * 3);
  display: flex;
  flex-direction: column;
  gap: calc(var(--spacing-unit) * 3);
}

/* Utility Classes */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
  border: var(--glass-border);
  border-radius: var(--radius-lg); /* Mega round cards */
}

.tabular-num {
  font-family: 'Inter', sans-serif;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

/* Top Navigation */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 32px;
  border-radius: var(--radius-pill);
  position: relative;
  z-index: 9999;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.logo h1 {
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--dark-accent);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 0;
}

.logo svg {
  color: #f7b159; /* Taxrica Golden Orange */
}

.nav-links {
  display: flex;
  gap: calc(var(--spacing-unit) * 1);
  background: rgba(255,255,255, 0.65);
  backdrop-filter: blur(12px);
  padding: 8px;
  border-radius: var(--radius-pill);
}

.nav-item {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 8px 20px;
  border-radius: var(--radius-pill);
  transition: var(--transition-fast);
}

.nav-item:hover {
  color: var(--dark-accent);
  background: rgba(255,255,255, 0.9);
}

.nav-item.active {
  background: var(--primary) !important; /* Golden Taxrica Orange */
  color: #111827 !important; 
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(247, 177, 89, 0.3);
}

/* Subtle Dropdown Polish */
.dropdown-box {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  background: white;
  min-width: 180px;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.1);
  padding: 8px;
  z-index: 1000;
  animation: slideInNav 0.2s ease-out;
}

.dropdown-box.show {
  display: block;
}

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

/* --- OVERRIDES FOR BRAND PIVOT --- */

.btn, .primary-btn, .outline-btn, .pill-btn, .approve-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px; /* SaaS standard larger touch target */
  border-radius: var(--radius-pill);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  line-height: 1;
}

.primary-btn, .pill-btn, .approve-btn {
  background: var(--primary);
  color: #111111;
  box-shadow: 0 4px 14px rgba(247, 177, 89, 0.25);
}

.primary-btn:hover, .pill-btn:hover, .approve-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(247, 177, 89, 0.4);
  background: var(--primary-hover);
}

/* Dropdown Essentials */
.dropdown-wrapper {
  position: relative;
}

.dropdown-box {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 240px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.12);
  border: 1px solid rgba(0,0,0,0.05);
  padding: 8px 0;
  display: none;
  z-index: 2000;
  animation: slideIn 0.2s ease-out;
}

.dropdown-box.active {
  display: block;
}

.dropdown-item {
  padding: 12px 20px;
  font-size: 0.9rem;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dropdown-item:hover {
  background: rgba(247, 177, 89, 0.08);
  color: var(--primary);
}

.dropdown-divider {
  height: 1px;
  background: rgba(0,0,0,0.05);
  margin: 8px 0;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-5px); }
  to { opacity: 1; transform: translateY(0); }
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-icon-btn, .icon-btn {
  background: transparent !important;
  border: none !important;
  cursor: pointer;
  color: var(--text-secondary);
  border-radius: 50%;
  padding: 8px;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  outline: none;
  position: relative; /* Added to correctly anchor absolute children (notif dot) */
}
.nav-icon-btn:hover, .icon-btn:hover {
  background: rgba(0,0,0,0.04) !important;
  color: var(--text-main);
}
.icon {
  width: 20px;
  height: 20px;
}

.notif-dot-brand {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background-color: #f43f5e; /* Premium Fintech Red */
  border: 1.5px solid white;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(244, 63, 94, 0.1);
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid white;
}

/* Dashboard Layout (Flexible) */
.dashboard-layout {
  flex: 1;
  display: flex;
  gap: calc(var(--spacing-unit) * 3);
  height: calc(100vh - 120px);
  width: 100%;
}

.dashboard-layout.grid-3 {
  display: grid;
  grid-template-columns: 300px 1fr 320px;
}

.panel-main {
  flex: 1;
  min-width: 0; 
  display: flex;
  flex-direction: column;
}

.full-height {
  height: 100%;
  overflow-y: auto;
  padding: calc(var(--spacing-unit) * 3);
}

/* Left Panel */
.panel-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 24px;
}

.search-wrap {
  margin-bottom: 24px;
}

.search-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: var(--radius-pill);
  background: rgba(255,255,255, 0.6);
  font-size: 0.9rem;
  outline: none;
  transition: var(--transition-fast);
}

.search-input:focus {
  background: #fff;
  border-color: var(--highlight-yellow);
  box-shadow: 0 0 0 2px rgba(255, 216, 89, 0.2);
}

.employee-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.list-card {
  display: flex;
  align-items: center;
  padding: 12px;
  gap: 12px;
  cursor: pointer;
  transition: var(--transition-fast);
  border: 1px solid transparent;
}

.list-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.04);
}

.list-card.active-row {
  background: var(--highlight-yellow-soft);
  border: 1px solid rgba(255, 216, 89, 0.6);
}

.employee-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.employee-info {
  display: flex;
  flex-direction: column;
}

.employee-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.employee-role {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* Main Workspace */
.main-content-wrapper {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.main-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.page-title {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 12px;
}
.quick-stats {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.stat-large {
  font-size: 1.5rem;
  font-weight: 500;
}
.stat-divider {
  color: var(--text-secondary);
  font-size: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}
.btn-secondary {
  background: white;
  border: 1px solid var(--border-light);
  color: var(--text-main);
}
.btn-secondary:hover {
  background: #f8f9fa;
}
.chevron {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.stats-bar {
  display: flex;
  gap: 16px;
}
.stat-pill {
  flex: 1;
  padding: 16px 20px;
  border-radius: var(--radius-pill);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.yellow-pill {
  background: var(--highlight-yellow);
  color: #000;
}
.dark-pill {
  background: var(--dark-accent);
  color: white;
}
.gray-pill {
  background: rgba(0,0,0,0.04);
  color: var(--text-main);
  border: 1px solid rgba(0,0,0,0.05);
}
.stat-label {
  font-size: 0.85rem;
  font-weight: 500;
}
.stat-value {
  font-size: 1rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* Clean Data Tables */
.data-table, .clean-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 6px;
  text-align: left;
}

.data-table th, .clean-table th {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.85rem;
  padding: 12px 24px;
  border-bottom: 2px dotted rgba(0,0,0,0.15); /* Crextio style dotted header */
}

.data-table td, .clean-table td {
  padding: 16px 24px; /* 8pt grid */
  height: 56px; /* Uniform SaaS row height */
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  transition: var(--transition-fast);
}

.data-table tbody tr:hover td, .clean-table tbody tr:hover td {
  background: rgba(0,0,0,0.02) !important;
}

/* The Magic Yellow Pill Highlight */
.data-table tbody tr.active-row td,
.clean-table tbody tr.active-row td,
.clean-table tbody tr:has(input[type="checkbox"]:checked) td {
  background: var(--highlight-yellow) !important;
  color: var(--dark-accent);
  font-weight: 500;
}

/* Pure pill rounding on rows */
.data-table tbody tr td:first-child, .clean-table tbody tr td:first-child {
  border-top-left-radius: var(--radius-pill);
  border-bottom-left-radius: var(--radius-pill);
}
.data-table tbody tr td:last-child, .clean-table tbody tr td:last-child {
  border-top-right-radius: var(--radius-pill);
  border-bottom-right-radius: var(--radius-pill);
}

.table-user {
  display: flex;
  align-items: center;
  gap: 12px;
}
.table-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}
.table-bold {
  font-weight: 600;
}

.table-avatar-cell {
  display: flex;
  align-items: center;
  gap: 16px;
}
.avatar-small {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid white;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08); /* Premium hover/feel */
}
.issues-stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.styled-checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--dark-accent);
  cursor: pointer;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 500;
}
.status-badge::before {
  content: "";
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.status-invited {
  background: #Edfced;
  color: #1a7f37;
}
.status-invited::before {
  background: #1a7f37;
}
.status-absent {
  background: #f6f8fb;
  color: var(--text-secondary);
}
.status-absent::before {
  background: var(--text-secondary);
}

/* Right Panel */
.detailed-card {
  height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.profile-header {
  position: relative;
  text-align: center;
  padding-bottom: 24px;
}
.banner-gradient {
  height: 100px;
  background: linear-gradient(135deg, #1E293B, #0F172A);
  position: relative;
  overflow: hidden;
}
.banner-gradient::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(circle at 50% 120%, rgba(255,216,89, 0.4), transparent 70%);
}

.profile-large-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 4px solid #fff;
  margin-top: -40px;
  position: relative;
  z-index: 2;
  object-fit: cover;
  background: #fff;
}
.profile-name {
  font-size: 1.25rem;
  font-weight: 600;
  margin-top: 12px;
}
.profile-role {
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.profile-section {
  padding: 24px;
  border-top: 1px solid rgba(0,0,0,0.05);
}
.profile-section h4 {
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 16px;
  color: var(--text-main);
}

.info-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.info-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}
.info-label {
  color: var(--text-secondary);
}
.info-val {
  font-weight: 500;
}

.doc-cards {
  display: flex;
  gap: 12px;
}
.doc-card {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.8);
  border: 1px solid rgba(0,0,0,0.03);
}
.blue-tint { background: #F0F6FF; color: #0056D2; }
.pink-tint { background: #FFF0F0; color: #D93025; }

.doc-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-weight: bold;
  font-size: 0.8rem;
  color: white;
}
.blue-tint .doc-icon { background: #0056D2; }
.pink-tint .doc-icon { background: #D93025; }

.doc-info {
  display: flex;
  flex-direction: column;
}
.doc-title {
  font-size: 0.85rem;
  font-weight: 600;
}
.doc-size {
  font-size: 0.75rem;
  opacity: 0.8;
}

/* People Layout */
.people-layout {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.people-header {
  margin-bottom: 24px;
}
.large-title {
  font-size: 2.25rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

/* Metrics Toolbar */
.metrics-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}
.metrics-left, .metrics-right {
  display: flex;
  gap: 16px;
  align-items: center;
}
.metrics-right {
  gap: 12px;
}
.metric-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.review-table th {
  text-align: left;
  padding: 16px;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-light);
}

.review-table td {
  padding: 16px;
  border-bottom: 1px solid rgba(0,0,0,0.02);
  vertical-align: middle;
}
.metric-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-weight: 500;
}
.progress-pill {
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  min-width: 80px;
}
.dark-pill-solid {
  background: var(--dark-accent);
  color: white;
}
.yellow-pill-solid {
  background: var(--highlight-yellow);
  color: #000;
}
.slashed-pill {
  background: repeating-linear-gradient(
    -45deg,
    rgba(0,0,0,0.03),
    rgba(0,0,0,0.03) 10px,
    transparent 10px,
    transparent 20px
  );
  border: 1px solid rgba(0,0,0,0.05);
  color: var(--text-secondary);
}
.outline-pill {
  border: 1px solid rgba(0,0,0,0.15);
  color: var(--text-main);
  background: transparent;
}

/* Filter and Actions Buttons */
.chip-btn {
  background: rgba(255,255,255,0.8);
  border: none;
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  font-size: 0.85rem;
  color: var(--text-main);
  box-shadow: 0 2px 10px rgba(0,0,0,0.02);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: var(--transition-fast);
}
.chip-btn:hover {
  background: white;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.action-wrap {
  display: flex;
  gap: 8px;
  background: rgba(255,255,255,0.4);
  padding: 4px;
  border-radius: var(--radius-pill);
  align-items: center;
}
.icon-btn-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  font-weight: 600;
  color: var(--text-main);
  transition: var(--transition-fast);
}
.icon-btn-circle:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.export-btn {
  background: transparent;
  border: none;
  gap: 6px;
  padding: 8px 16px;
}
.export-btn:hover {
  background: white;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

/* People Table Area */
.people-table-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 24px;
}
.filter-top-bar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 24px;
}
.filter-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.search-container {
  display: flex;
  align-items: center;
  background: white;
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.02);
  width: 250px;
}
.search-icon {
  width: 16px; height: 16px;
  color: var(--text-secondary);
  margin-right: 8px;
}
.search-input-pill {
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.85rem;
  width: 100%;
}

.transparent-container {
  background: transparent;
  box-shadow: none;
  padding: 0;
  border-radius: 0;
  overflow: visible;
}
.wide-table th, .wide-table td {
  padding: 16px 8px;
}
.sort-icon {
  width: 14px; height: 14px;
  fill: var(--text-secondary);
  vertical-align: middle;
  margin-left: 4px;
}
.table-role-subtle {
  color: var(--text-secondary);
}

/* Progress Bars */
.emp-progress-bar {
  display: flex;
  height: 6px;
  border-radius: var(--radius-pill);
  background: var(--border-light);
  overflow: hidden;
  margin-top: 8px;
}
.bg-slashed {
  background: repeating-linear-gradient(
    -45deg,
    rgba(0,0,0,0.03),
    rgba(0,0,0,0.03) 4px,
    transparent 4px,
    transparent 8px
  );
}
.bar-fill {
  height: 100%;
}
.yellow-fill { background: var(--highlight-yellow); }
.dark-fill { background: var(--dark-accent); }

/* Left List Adjustments */
.list-card-tall {
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
}
.emp-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.list-gap-lg {
  gap: 16px;
}
.pagination-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
}
.page-numbers {
  display: flex;
  gap: 8px;
}
.page-num {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
}
.page-num.active {
  background: white;
  color: var(--text-main);
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  font-weight: 600;
}
.dotdot { border: none; cursor: default; }

/* Center Toolbar Toolbar */
.center-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.toolbar-icons, .toolbar-actions {
  display: flex;
  gap: 8px;
  background: rgba(255,255,255,0.5);
  padding: 4px;
  border-radius: var(--radius-pill);
}
.active-icon {
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.small-search { width: 300px; margin: 0 16px; }

/* Calendar Grid */
.calendar-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  background: rgba(255,255,255,0.4);
  border-radius: var(--radius-md);
  padding: 16px;
  position: relative;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
}
.header-row {
  margin-bottom: 8px;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
}
.weekend { color: #f87171; }
.cal-cell {
  background: white;
  border-radius: var(--radius-sm);
  padding: 12px;
  height: 80px;
  font-size: 0.9rem;
  color: var(--text-secondary);
  position: relative;
  box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}
.slashed-bg {
  background: repeating-linear-gradient(
    -45deg,
    rgba(0,0,0,0.02),
    rgba(0,0,0,0.02) 8px,
    rgba(255,255,255,0.5) 8px,
    rgba(255,255,255,0.5) 16px
  );
  color: rgba(100,116,139, 0.4);
}
.yellow-bg {
  background: var(--highlight-yellow);
  color: var(--text-main);
  font-weight: 600;
}
.cal-subtext {
  font-size: 0.7rem;
  font-weight: 500;
  margin-top: 4px;
  line-height: 1.2;
}
.cake-icon { margin-left: 4px; vertical-align: middle; }

/* Calendar Event Track Overlay */
.event-track {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  height: 30px;
  margin-top: -30px;
  margin-bottom: 8px;
  position: relative;
  z-index: 2;
  pointer-events: none;
}
.event-pill {
  height: 24px;
  border-radius: var(--radius-pill);
  display: flex;
  align-items: center;
  padding: 0 12px;
  font-size: 0.75rem;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  margin-top: -12px; /* Pull it up into the row before */
}
.event-gray { background: #Edf2f7; color: var(--text-main); }
.event-yellow { background: var(--highlight-yellow); color: var(--text-main); }
.event-dark { background: var(--dark-accent); color: white; }
.event-dot {
  width: 6px; height: 6px; border-radius: 50%; background: #cbd5e1; margin-right: 6px;
}
.yellow-dot { background: white; }
.dark-dot { background: rgba(255,255,255,0.5); }
.event-date { margin-left: auto; opacity: 0.7; font-size: 0.7rem; }

/* Right Panel Overrides */
.banner-abstract {
  background: url('data:image/svg+xml;utf8,<svg width="400" height="150" xmlns="http://www.w3.org/2000/svg"><defs><linearGradient id="g" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:%23D97706" /><stop offset="100%" style="stop-color:%239333EA" /></linearGradient></defs><rect width="400" height="150" fill="url(%23g)" /><path d="M0 150 Q100 50 200 150 T400 150" fill="none" stroke="rgba(255,255,255,0.4)" stroke-width="4"/><path d="M0 100 Q150 0 300 100 T400 50" fill="none" stroke="rgba(255,255,255,0.2)" stroke-width="8"/></svg>') no-repeat center center;
  background-size: cover;
}
.profile-wrapper-scroll {
  overflow-y: auto;
  flex: 1;
}
.stats-progress-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.stat-progress-text {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  margin-bottom: 4px;
}
.stat-days {
  color: var(--text-secondary);
  font-size: 0.8rem;
}

/* Dashboard Main Container */
.dashboard-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Base Widget Card */
.widget-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.widget-title {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 16px;
}

/* Section Grids */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.grid-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr 2fr;
  gap: 24px;
}

/* Specific KPI Styling */
.kpi-value {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
  line-height: 1.1;
  margin-bottom: 8px;
}
.kpi-trend {
  font-size: 0.85rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.trend-up { color: #10b981; /* Success Green */ } /* Subtly green */
.trend-neutral { color: var(--text-secondary); }

/* Status specific */
.status-pill {
  display: inline-block;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  background: white;
  color: var(--text-main);
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  margin-right: 8px;
}
.status-success { color: #10b981; /* Success Green */ }
.status-warning { color: #d97706; }
.status-error { color: #ef4444; /* Error Red */ }

.action-row {
  margin-top: auto;
  padding-top: 24px;
  display: flex;
  gap: 12px;
}
.outline-btn {
  background: transparent;
  color: var(--text-main);
  border: 1px solid rgba(0,0,0,0.1);
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition-fast);
}
.outline-btn:hover {
  background: white;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

/* Alert List */
.alert-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.alert-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  background: rgba(255,255,255,0.4);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
}
.alert-item:hover {
  background: white;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.alert-dot {
  width: 8px; height: 8px; border-radius: 50%; margin-right: 12px;
}
.dot-red { background: #ef4444; }
.dot-yellow { background: #f59e0b; }

/* Timeline */
.timeline {
  position: relative;
  padding-left: 20px;
  margin-top: 8px;
}
.timeline::before {
  content: '';
  position: absolute;
  top: 8px; left: 4px; bottom: 8px;
  width: 2px;
  background: rgba(0,0,0,0.05);
}
.timeline-item {
  position: relative;
  margin-bottom: 24px;
}
.timeline-item:last-child {
  margin-bottom: 0;
}
.timeline-item::after {
  content: '';
  position: absolute;
  top: 4px; left: -20px;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--text-secondary);
  box-sizing: border-box;
}
.timeline-item.active::after {
  border-color: var(--highlight-yellow);
  background: var(--highlight-yellow);
}
.timeline-date { 
  font-size: 0.75rem; 
  color: var(--text-secondary); 
  font-weight: 600; 
  margin-bottom: 4px;
}
.timeline-content { 
  font-size: 0.85rem; 
  font-weight: 500;
}

/* Trend Chart */
.chart-bars {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  height: 150px;
  margin-top: auto;
  gap: 12px;
  padding-top: 24px;
}
.bar-wrap {
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  gap: 8px; 
  flex: 1;
}
.bar {
  width: 100%;
  background: rgba(255,255,255,0.6);
  border-radius: 4px 4px 0 0;
  transition: var(--transition-short);
}
.bar:hover { 
  background: var(--dark-accent); 
}
.bar-lbl { 
  font-size: 0.7rem; 
  color: var(--text-secondary); 
  font-weight: 500;
}

/* People Readiness Health Bars */
.health-metrics-row {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
}
.health-metric-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 16px 24px;
  background: rgba(255,255,255,0.7);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}
.health-metric-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.health-metric-percent {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}
.health-bar-bg {
  width: 100%;
  height: 8px;
  background: var(--border-light);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.health-fill {
  height: 100%;
  border-radius: var(--radius-pill);
}
.fill-green { background: #10b981; }
.fill-yellow { background: #f59e0b; }
.fill-red { background: #ef4444; }

/* Status / Completeness Dots */
.completeness-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
}
.dot-green { background: #10b981; }
.dot-yellow { background: #f59e0b; }
.dot-red { background: #ef4444; }

/* Alert Typography for Missing Fields (Right Panel) */
.alert-text-critical {
  color: #ef4444 !important;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}
.alert-text-warning {
  color: #d97706 !important;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 4px;
}
.missing-field-row {
  background: rgba(239, 68, 68, 0.05);
  border-radius: 4px;
  padding: 2px 8px;
  margin: -2px -8px;
}

.btn-danger-outline {
  background: transparent;
  color: #ef4444; /* Error Red */
  border: 1px solid rgba(239,68,68,0.3);
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  transition: var(--transition-fast);
  text-align: center;
  width: 100%;
}
.btn-danger-outline:hover {
  background: rgba(239,68,68,0.05);
  border-color: #ef4444; /* Error Red */
}

/* Global Toast Notification System */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 9999;
}
.toast {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: var(--radius-md);
  padding: 16px 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  min-width: 300px;
  max-width: 400px;
  transform: translateY(100%);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border-left: 4px solid transparent;
}
.toast-show {
  transform: translateY(0);
  opacity: 1;
}
.toast-hide {
  transform: translateX(100%);
  opacity: 0;
}
.toast-icon { margin-top: 2px; }
.toast-success { border-left-color: #10b981; /* Success Green */ }
.toast-success .toast-icon { color: #10b981; /* Success Green */ }
.toast-warning { border-left-color: #f59e0b; }
.toast-warning .toast-icon { color: #f59e0b; }
.toast-info { border-left-color: var(--dark-accent); }
.toast-info .toast-icon { color: var(--dark-accent); }
.toast-content h4 { font-size: 0.9rem; font-weight: 600; margin-bottom: 4px; color: var(--text-main); }
.toast-content p { font-size: 0.8rem; font-weight: 500; color: var(--text-secondary); line-height: 1.4; margin: 0; }

/* UI Overlays & Components */

/* Modal Backdrop */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Modal Card */
.modal-card {
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 16px;
  width: 90%;
  max-width: 550px;
  padding: 32px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.modal-overlay.active .modal-card {
  transform: scale(1) translateY(0);
}

/* Slide-over Drawer */
.slide-drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.05);
  z-index: 10001;
  transform: translateX(100%);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
}
.slide-drawer.active {
  transform: translateX(0);
}
.drawer-header {
  padding: 24px;
  border-bottom: 1px solid rgba(0,0,0,0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.drawer-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}
.drawer-footer {
  padding: 24px;
  border-top: 1px solid rgba(0,0,0,0.05);
  background: rgba(255,255,255,0.3);
}

/* Contextual Dropdowns */
.dropdown-wrapper { position: relative; }
.dropdown-box {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 200px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  padding: 8px;
  z-index: 10002;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: all 0.2s ease;
}
.dropdown-box.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.dropdown-item {
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: background 0.2s;
}
.dropdown-item:hover {
  background: rgba(255, 216, 89, 0.1);
}
.dropdown-divider {
  height: 1px;
  background: rgba(0,0,0,0.05);
  margin: 8px 0;
}

/* Close Button Universal */
.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}
.close-btn:hover { color: var(--text-main); }

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.1);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0,0,0,0.2);
}

/* --- PAYROLL WORKFLOW STYLES --- */

.payroll-wizard-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.stepper-header {
  padding: 20px 32px;
  background: rgba(255,255,255,0.3);
  border-bottom: 1px solid var(--border-light);
}

.payroll-stepper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.payroll-stepper::before {
  content: "";
  position: absolute;
  top: 12px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--border-light);
  z-index: 1;
}

.step-dot-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  flex: 1;
  position: relative;
  z-index: 2;
}

.step-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-dot-wrap.active .step-dot {
  border-color: var(--dark-accent);
  background: var(--dark-accent);
  color: #fff;
  transform: scale(1.15);
  box-shadow: 0 0 0 5px rgba(0,0,0,0.05);
}

.step-dot-wrap.done .step-dot {
  border-color: var(--highlight-yellow);
  background: var(--highlight-yellow);
  color: var(--text-main);
}

.step-label {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  transition: color 0.3s;
}

.step-dot-wrap.active .step-label {
  color: var(--text-main);
}

/* Step Views Control */
.step-view {
  display: none;
  padding: 32px;
  flex: 1;
  overflow-y: auto;
}

.step-view.active {
  display: flex;
  flex-direction: column;
  animation: stepSlideIn 0.5s ease-out;
}

@keyframes stepSlideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Phase Specifics */
.calculation-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-bottom: 32px;
}

.summary-card {
  padding: 24px;
  text-align: center;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
}

.summary-card h4 {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.summary-card .val {
  font-size: 1.5rem;
  font-weight: 700;
}

.alert-item-review {
  background: rgba(239, 68, 68, 0.05);
  border-left: 4px solid #ef4444 !important;
}

.warning-item-review {
  background: rgba(245, 158, 11, 0.05);
  border-left: 4px solid #f59e0b !important;
}

.centered-workflow-content {
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

.wizard-nav {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  padding: 24px 32px;
  border-top: 1px solid var(--border-light);
  background: rgba(255,255,255,0.2);
}

/* Loading State Animation */
.loader-circle {
  width: 60px;
  height: 60px;
  border: 4px solid var(--border-light);
  border-top: 4px solid var(--highlight-yellow);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 24px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
/* --- HMRC COMPLIANCE DASHBOARD --- */

.hmrc-status-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
}
.hmrc-status-card .status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
}
.status-indicator.success { color: #10b981; /* Success Green */ }
.status-indicator.warning { color: #f59e0b; }
.status-indicator.error { color: #ef4444; /* Error Red */ }

.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 20px 0;
}
.timeline-item {
  display: flex;
  gap: 16px;
  padding: 16px 24px;
  position: relative;
  cursor: pointer;
  transition: var(--transition-fast);
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: 31px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-light);
  z-index: 1;
}
.timeline-item:first-child::before { top: 50%; }
.timeline-item:last-child::before { bottom: 50%; }

.timeline-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--border-light);
  z-index: 2;
  margin-top: 4px;
  flex-shrink: 0;
}
.timeline-item.active .timeline-dot {
  border-color: var(--dark-accent);
  background: var(--dark-accent);
  box-shadow: 0 0 0 4px rgba(0,0,0,0.05);
}
.timeline-item:hover { background: rgba(0,0,0,0.02); }

.timeline-content {
  display: flex;
  flex-direction: column;
}
.timeline-date { font-size: 0.75rem; color: var(--text-secondary); }
.timeline-title { font-weight: 600; font-size: 0.9rem; }

.compliance-table th { text-align: left; padding: 16px; }
.compliance-table td { padding: 16px; border-bottom: 1px solid rgba(0,0,0,0.02); }

.badge-hmrc {
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-accepted { background: rgba(16, 185, 129, 0.1); color: #059669; }
.badge-rejected { background: rgba(239, 68, 68, 0.1); color: #dc2626; }
.badge-pending { background: rgba(0, 0, 0, 0.05); color: var(--text-secondary); }

.detail-section { margin-bottom: 32px; }
.detail-section h4 { 
  font-size: 0.85rem; 
  text-transform: uppercase; 
  color: var(--text-secondary); 
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}

.hmrc-response-box {
  background: rgba(0,0,0,0.03);
  padding: 16px;
  border-radius: var(--radius-sm);
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  line-height: 1.6;
  border-left: 4px solid var(--border-light);
}
.hmrc-response-box.error { border-left-color: #ef4444; /* Error Red */ background: rgba(239,68,68,0.02); }
.hmrc-response-box.success { border-left-color: #10b981; /* Success Green */ }

.explanation-text {
  font-size: 0.9rem;
  color: var(--text-main);
  line-height: 1.5;
}
/* --- REPORTS FINANCIAL ANALYTICS HUB --- */

.reports-header-group {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 2px;
}

.report-tabs {
  display: flex;
  gap: 32px;
}
.report-tab {
  padding: 12px 4px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  position: relative;
  transition: var(--transition-fast);
}
.report-tab:hover { color: var(--text-main); }
.report-tab.active { color: var(--text-main); font-weight: 600; }
.report-tab.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--dark-accent);
}

.metrics-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}
.metric-card-minimal {
  padding: 24px;
}
.metric-card-minimal .label {
  font-size: 0.8rem;
  text-transform: uppercase;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  display: block;
}
.metric-card-minimal .value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.025em;
}

.charts-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}
.chart-container {
  padding: 24px;
  min-height: 300px;
  display: flex;
  flex-direction: column;
}
.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.chart-legend {
  display: flex;
  gap: 16px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}
.legend-item { display: flex; align-items: center; gap: 6px; }
.dot { width: 8px; height: 8px; border-radius: 50%; }

.svg-chart-wrapper {
  flex: 1;
  position: relative;
  width: 100%;
}

.chart-svg {
  width: 100%;
  height: 200px;
  overflow: visible;
}
.chart-line {
  fill: none;
  stroke: var(--dark-accent);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.chart-area {
  fill: rgba(0,0,0,0.03);
}
.grid-line {
  stroke: rgba(0,0,0,0.05);
  stroke-width: 1;
}

.report-section {
  display: none;
}
.report-section.active {
  display: block;
}
/* --- PAYSLIP LEDGER & SECURE PREVIEW --- */

.ledger-table tbody tr {
  cursor: pointer;
  transition: var(--transition-fast);
}
.ledger-table tbody tr:hover { background: rgba(0,0,0,0.015); }
.ledger-table tr.active-row {
  background: rgba(0,0,0,0.035);
  box-shadow: inset 4px 0 0 var(--dark-accent);
}

.payslip-preview-pane {
  background: #f8fafc;
  border-radius: var(--radius-md);
  padding: 40px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 2px 10px rgba(0,0,0,0.05);
}

.payslip-paper {
  background: white;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  box-shadow: 0 10px 25px rgba(0,0,0,0.1);
  padding: 40px;
  position: relative;
  border: 1px solid var(--border-light);
  min-height: 600px;
  display: flex;
  flex-direction: column;
}

.secure-watermark {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-35deg);
  font-size: 3rem;
  font-weight: 900;
  color: rgba(0,0,0,0.03);
  pointer-events: none;
  white-space: nowrap;
  user-select: none;
  z-index: 10;
  letter-spacing: 0.2em;
}

.payslip-header {
  border-bottom: 2px solid #111827;
  padding-bottom: 16px;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.payslip-section {
  margin-bottom: 24px;
}
.payslip-section h5 {
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 4px;
  margin-bottom: 12px;
}

.payslip-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  margin-bottom: 8px;
}
.payslip-row.total {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 2px dashed var(--border-light);
  font-weight: 700;
  font-size: 1.1rem;
}

/* Hierarchical Navigation Dropdown */
.nav-links .dropdown-wrapper {
  position: relative;
  display: inline-block;
}

.nav-links .dropdown-box {
  min-width: 200px;
  top: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
}

.nav-item.has-dropdown {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-item.has-dropdown svg {
  transition: transform 0.2s;
}

.nav-item.has-dropdown:hover svg {
  transform: rotate(180deg);
}
/* --- STANDARD PDF VIEWER UPGRADE --- */

.pdf-layout-container {
  display: grid !important;
  grid-template-columns: 350px 1fr !important;
  gap: 0;
  height: calc(100vh - 80px);
  overflow: hidden;
  background: white;
}

.panel-left.collapsed {
  display: none !important;
}

.pdf-layout-container.full-screen {
  grid-template-columns: 1fr;
}

.pdf-viewer-backdrop {
  background: #f8fafc; /* Professional Light Mode */
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.pdf-viewer-toolbar {
  background: #1e293b;
  height: 48px;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  color: white;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
  z-index: 20;
}

.pdf-toolbar-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.toolbar-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
}
.toolbar-btn:hover { background: rgba(255,255,255,0.1); color: white; }
.toolbar-divider { width: 1px; height: 20px; background: rgba(255,255,255,0.1); margin: 0 4px; }

/* --- RIGOROUS UK STANDARD PAYROLL AESTHETIC --- */
.pdf-view-scroll-area {
  flex: 1;
  overflow: auto;
  padding: 60px 20px;
  display: flex;
  justify-content: center;
  align-items: flex-start; /* Prevents overflow clipping that hides scrollbars */
  background: #f1f5f9; /* Light immersion */
  scroll-behavior: smooth;
}

.payslip-paper.uk-standard {
  width: 210mm; /* True A4 Width */
  min-height: 297mm; /* True A4 Height */
  background: #ffffff;
  padding: 30px 40px;
  color: #1e293b;
  font-family: 'Inter', sans-serif;
  box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  margin-bottom: 80px;
}

.uk-header {
  display: flex;
  justify-content: space-between;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 15px;
  margin-bottom: 20px;
}

.uk-logo-area {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.uk-logo-text { font-size: 1.4rem; font-weight: 800; color: var(--primary); letter-spacing: -0.5px; }

.uk-company-details {
  font-size: 0.75rem;
  color: #475569;
  line-height: 1.5;
}

.uk-meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 20px;
  text-align: right;
}
.uk-meta-item { display: flex; flex-direction: column; }
.uk-meta-label { font-size: 0.6rem; color: #94a3b8; text-transform: uppercase; font-weight: 700; letter-spacing: 0.5px; margin-bottom: 2px; }
.uk-meta-value { font-size: 0.8rem; font-weight: 600; color: #1e293b; }

.uk-employee-block {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 20px;
  margin-bottom: 20px;
}
.uk-emp-address { font-size: 0.85rem; color: #1e293b; font-weight: 600; line-height: 1.4; }
.uk-emp-address small { font-weight: 400; color: #64748b; font-size: 0.75rem; display: block; margin-top: 4px; }

.uk-statutory-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 10px 15px;
}
.uk-stat-item { display: flex; flex-direction: column; gap: 2px; border-right: 1px solid #e2e8f0; padding-right: 10px; }
.uk-stat-item:last-child { border-right: none; padding-right: 0; }
.uk-stat-label { font-size: 0.6rem; color: #64748b; font-weight: 700; text-transform: uppercase; }
.uk-stat-value { font-size: 0.85rem; font-weight: 700; color: #0f172a; }

/* The Standard Table Grid */
.uk-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 25px;
}
.uk-table th {
  background: #f1f5f9;
  padding: 8px 12px;
  text-align: right;
  font-size: 0.65rem;
  color: #475569;
  text-transform: uppercase;
  font-weight: 700;
  border-top: 2px solid #1e293b;
  border-bottom: 1px solid #cbd5e1;
}
.uk-table th:first-child { text-align: left; }
.uk-table td {
  padding: 6px 12px;
  text-align: right;
  font-size: 0.8rem;
  color: #1e293b;
  border-bottom: 1px solid #f1f5f9;
}
.uk-table td:first-child { text-align: left; font-weight: 600; }
.uk-table .deduction-col { color: #ef4444; /* Error Red */ }

.uk-table-summary {
  background: #f8fafc;
  font-weight: 700;
}
.uk-table-summary td { border-top: 1px solid #cbd5e1; border-bottom: 2px solid #cbd5e1; padding: 10px 12px; }

/* Bottom Block */
.uk-footer-block {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-top: 20px;
  gap: 20px;
}

.uk-ytd-table {
  width: 55%;
  border-collapse: collapse;
}
.uk-ytd-table th { text-align: left; font-size: 0.55rem; color: #64748b; text-transform: uppercase; padding: 4px; border-bottom: 1px solid #e2e8f0; }
.uk-ytd-table td { text-align: left; font-size: 0.75rem; font-weight: 600; padding: 4px; color: #334155; }

.uk-net-pay-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 6px solid var(--primary);
  border-radius: 4px;
  padding: 12px 16px;
  text-align: right;
  flex-shrink: 0;
  min-width: 150px;
}
.uk-net-label { font-size: 0.65rem; font-weight: 700; color: #64748b; text-transform: uppercase; margin-bottom: 4px; }
.uk-net-amount { font-size: 1.6rem; font-weight: 800; color: #0f172a; letter-spacing: -1px; }

.uk-legal-footer {
  margin-top: 30px;
  font-size: 0.6rem;
  color: #94a3b8;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-top: 1px dashed #e2e8f0;
  padding-top: 10px;
}

.payslip-paper.viewer-mode {
  transform: scale(1.15);
  transform-origin: top center;
  margin-bottom: 80px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.4);
}

.fullscreen-toggle-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 6px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
}
.fullscreen-toggle-btn:hover { background: rgba(255,255,255,0.1); color: white; }

/* --- QUICKBOOKS-STYLE UK STANDARDS --- */

.payslip-paper.quickbooks-mode {
  width: 800px;
  background: white;
  padding: 50px;
  color: #1e293b;
  font-family: 'Inter', sans-serif;
  box-shadow: 0 4px 50px rgba(0,0,0,0.5);
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  margin-bottom: 80px;
}

.qb-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 30px;
}

.qb-logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.qb-logo-circle {
  width: 52px;
  height: 52px;
  background: #1e293b; /* Industrial Navy */
  color: white;
  border-radius: 8px; /* Modern Rounded Square */
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.6rem;
  letter-spacing: -1.5px;
  box-shadow: 0 4px 12px rgba(30, 41, 59, 0.2);
}

.qb-company-details {
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.5;
}

.qb-employee-card {
  text-align: right;
}

.qb-employee-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.qb-employee-card p {
  font-size: 0.8rem;
  color: #64748b;
}

.qb-tax-ribbon {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #f1f5f9;
  border-top: 2px solid #1e293b;
  padding: 16px 20px;
  margin-bottom: 40px;
}

.ribbon-item {
  display: flex;
  flex-direction: column;
}

.ribbon-label { font-size: 0.65rem; color: #64748b; text-transform: uppercase; letter-spacing: 0.8px; font-weight: 700; margin-bottom: 6px; }
.ribbon-val { font-size: 1rem; font-weight: 700; color: #1e293b; }

.qb-main-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-bottom: 40px;
}

.qb-section-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: #1e293b;
  text-transform: uppercase;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid #f1f5f9;
}

.qb-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
  margin-bottom: 14px;
}

.qb-row.total {
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid #e2e8f0;
  font-weight: 700;
}

.qb-net-summary {
  margin-top: 50px;
  padding: 30px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.net-label { font-size: 1rem; font-weight: 600; color: #64748b; }
.net-amount { font-size: 2.2rem; font-weight: 700; color: #1e293b; }

.qb-ytd-box {
  margin-top: 50px;
  padding: 25px;
  background: #f1f5f9;
  border-radius: 8px;
}

.qb-ytd-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.ytd-item { display: flex; flex-direction: column; gap: 6px; }
.ytd-label { font-size: 0.65rem; color: #64748b; font-weight: 700; text-transform: uppercase; }
.ytd-amount { font-size: 0.95rem; font-weight: 700; color: #1e293b; }

.qb-footer-legal {
  margin-top: 50px;
  text-align: center;
  font-size: 0.75rem;
  color: #94a3b8;
  line-height: 1.6;
  border-top: 1px solid #f1f5f9;
  padding-top: 30px;
}


/* --- PREMIUM FINTECH MICRO-INTERACTIONS --- */
.glass-card {
  transition: all 150ms ease;
}
.glass-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(0,0,0,0.08);
}

/* Base button active state */
.btn:active, .primary-btn:active, .outline-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Skeleton Loaders */
.skeleton-loader {
  animation: pulse-skeleton 1.5s infinite ease-in-out;
  background: linear-gradient(90deg, rgba(0,0,0,0.03) 25%, rgba(0,0,0,0.06) 50%, rgba(0,0,0,0.03) 75%);
  background-size: 200% 100%;
  border-radius: 4px;
}
@keyframes pulse-skeleton {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.skel-text { height: 16px; width: 100%; margin-bottom: 8px; border-radius: 4px; }
.skel-row { display: flex; gap: 16px; margin-bottom: 12px; }
.skel-col { height: 24px; flex: 1; border-radius: 4px; }

/* Empty States */
.empty-state-box {
  padding: 64px 24px;
  text-align: center;
  color: var(--text-secondary);
}
.empty-state-box svg {
  opacity: 0.3;
  margin-bottom: 16px;
}

/* --- COMPLIANCE TRIAGE SYSTEM (Phase 22.5) --- */
.status-pill {
    padding: 6px 12px;
    border-radius: 99px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    display: inline-block;
}

.status-ready { background: #dcfce7 !important; color: #166534 !important; border: 1px solid rgba(22, 101, 52, 0.1); }
.status-review { background: #fef9c3 !important; color: #854d0e !important; border: 1px solid rgba(133, 77, 14, 0.1); }
.status-blocked { background: #fee2e2 !important; color: #991b1b !important; border: 1px solid rgba(153, 27, 27, 0.1); }

.emp-checkbox {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
    border-radius: 4px;
}

#people-bulk-toolbar {
    animation: slideUpAction 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 2000;
}

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

.small-btn {
    padding: 6px 12px !important;
    font-size: 0.8rem !important;
}

/* --- FINANCIAL DOCUMENT PRINT SYSTEM (Phase 23.2) --- */
@media print {
    body { background: white !important; font-size: 11pt !important; }
    header.top-nav, .panel-left, #reports-cycle-banner, .export-controls, .report-tabs { display: none !important; }
    .dashboard-layout { margin: 0 !important; max-width: 100% !important; display: block !important; }
    .report-section { display: none !important; }
    .report-section.active { display: block !important; }
    .glass-card { background: white !important; border: 1px solid #ddd !important; box-shadow: none !important; break-inside: avoid; }
    .clean-table th { background: #f8fafc !important; color: black !important; }
    .clean-table td { border-bottom: 1px solid #eee !important; }
    
    /* Document Header */
    main::before {
        content: "TAXRICA - CERTIFIED PAYROLL RECORD (CONFIDENTIAL)";
        display: block;
        text-align: center;
        font-size: 14pt;
        font-weight: 800;
        margin-bottom: 40px;
        padding-bottom: 10px;
        border-bottom: 2px solid black;
    }
}


.dropdown-box.notif-box {
  transform-origin: top right;
}
.notif-item {
  padding: 16px 20px;
  border-bottom: 1px solid rgba(0,0,0,0.03);
  display: flex;
  gap: 16px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
  text-decoration: none;
}
.notif-item:hover {
  background: rgba(0,0,0,0.02);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.notif-item:active {
  transform: scale(0.98);
  opacity: 0.8;
}
.notif-item.unread {
  background: rgba(247, 177, 89, 0.03);
}
.notif-item.unread::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--primary);
}
.notif-icon {
  width: 36px; height: 36px;
  border-radius: 100px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.notif-icon.system { background: rgba(0,0,0,0.05); color: #333; }
.notif-icon.payroll { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.notif-icon.hmrc { background: rgba(247, 177, 89, 0.1); color: var(--primary); }
.notif-icon.compliance { background: rgba(239, 68, 68, 0.1); color: #ef4444; }

.notif-content { display: flex; flex-direction: column; gap: 4px; border: none; padding: 0;}
.notif-content strong { font-size: 0.9rem; color: var(--dark-accent); }
.notif-content p { font-size: 0.85rem; color: var(--text-secondary); margin: 0; line-height: 1.4; }
.notif-time { font-size: 0.75rem; color: #94a3b8; margin-top: 4px; }


.dropdown-box.profile-box {
  transform-origin: top right;
}
.profile-menu-item {
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--dark-accent);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}
.profile-menu-item:hover {
  background: rgba(0,0,0,0.03);
}
.profile-menu-item svg {
  color: var(--text-secondary);
}
.profile-menu-item:hover svg {
  color: var(--primary);
}
.profile-menu-item.danger-action {
  color: #ef4444;
  border-top: 1px solid rgba(0,0,0,0.05);
}
.profile-menu-item.danger-action svg {
  color: #ef4444;
}

/* ---------------------------------
   REAL-TIME ESCALATION SYSTEM CSS
   --------------------------------- */
.notif-level_1 {
  opacity: 0.6;
}
.notif-level_1:hover {
  opacity: 1;
}

.notif-level_2 {
  /* Default medium styling */
}

.notif-level_3 {
  background: rgba(247, 177, 89, 0.05);
}
.notif-level_3::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: #f59e0b; /* Amber warning */
  z-index: 2;
}

.notif-level_4 {
  background: rgba(239, 68, 68, 0.08) !important;
  border-bottom: 1px solid rgba(239, 68, 68, 0.2) !important;
}
.notif-level_4::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: #ef4444; /* Red critical */
  animation: pulse-border 1.5s infinite;
  z-index: 2;
}
.notif-level_4 .notif-content strong {
  color: #ef4444;
}

@keyframes pulse-border {
  0% { opacity: 1; }
  50% { opacity: 0.4; }
  100% { opacity: 1; }
}

/* --- NOTIFICATION PREMIUM UX --- */
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.pulse-badge {
  animation: badge-pulse-ux 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

@keyframes badge-pulse-ux {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(247, 177, 89, 0.7); }
  50% { transform: scale(1.1); box-shadow: 0 0 0 4px rgba(247, 177, 89, 0); }
  100% { transform: scale(1); }
}

/* --- LOUD ALERT BANNER --- */
.global-loud-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #ef4444;
  color: white;
  z-index: 9999;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  transform: translateY(-100%);
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.loud-banner-content {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.95rem;
}

.loud-banner-btn {
  background: white;
  color: #ef4444;
  padding: 8px 16px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.loud-banner-btn:hover {
  background: #fef2f2;
  transform: scale(1.02);
}

.loud-banner-btn:active {
  transform: scale(0.98);
}
