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

/* CSS Variables for Premium Innov8 Brand Theme (Deep Teal & Seafoam Green) */
:root {
  --font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  
  /* Innov8 Brand Color Palette */
  --bg-main: hsl(172, 24%, 8%);            /* Deep dark forest teal */
  --bg-card: hsla(172, 22%, 12%, 0.82);     /* Transparent card glass */
  --bg-sidebar: hsla(172, 26%, 10%, 0.92);  /* Sidebar panel background */
  --bg-input: hsla(172, 18%, 6%, 0.65);     /* High contrast input backgrounds */
  --border-glass: hsla(172, 15%, 28%, 0.38);/* Glow accents */
  --border-focus: hsl(172, 55%, 45%);       /* Vibrant seafoam green focus outline */
  
  /* Accent Colors */
  --accent-primary: hsl(172, 48%, 42%);     /* Seafoam green from hero highlight */
  --accent-primary-rgb: 56, 158, 146;
  --accent-teal: hsl(172, 55%, 45%);
  --accent-dark-teal: hsl(172, 38%, 18%);   /* Dark button teal */
  --accent-success: hsl(145, 55%, 44%);
  --accent-danger: hsl(352, 70%, 50%);
  --accent-warning: hsl(42, 80%, 48%);
  
  /* Text styling */
  --text-main: hsl(172, 8%, 95%);
  --text-muted: hsl(172, 10%, 72%);
  --text-dark: hsl(172, 35%, 12%);
  
  /* Shadows and Effects */
  --glass-shadow: 0 8px 36px 0 rgba(0, 0, 0, 0.5);
  --blur-amount: 16px;
  --transition-fast: 0.2s ease;
  --transition-medium: 0.3s ease;
  --border-radius-s: 8px;
  --border-radius-m: 14px;
  --border-radius-l: 22px;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-main);
  background-image: 
    radial-gradient(at 5% 5%, hsla(172, 55%, 15%, 0.25) 0px, transparent 55%),
    radial-gradient(at 95% 95%, hsla(172, 40%, 12%, 0.2) 0px, transparent 50%);
  background-attachment: fixed;
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Scrollbar Customization */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: var(--border-glass);
  border-radius: var(--border-radius-s);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

/* Typography & Visual Accents */
h1, h2, h3, h4 {
  font-weight: 600;
  letter-spacing: -0.02em;
}

p {
  color: var(--text-muted);
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: opacity var(--transition-fast);
}
a:hover {
  opacity: 0.8;
}

/* Custom Glassmorphism Box */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(var(--blur-amount));
  -webkit-backdrop-filter: blur(var(--blur-amount));
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius-m);
  box-shadow: var(--glass-shadow);
  padding: 1.5rem;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

/* ================= LOGIN PORTAL ================= */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 1rem;
}

.login-card {
  width: 100%;
  max-width: 440px;
  padding: 2.5rem;
  text-align: center;
  position: relative;
}

.login-logo {
  font-size: 2.6rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, var(--text-main) 30%, var(--accent-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.login-subtitle {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
  text-align: left;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.input-container {
  position: relative;
}

.form-group input, 
.form-group select, 
.form-group textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  background-color: var(--bg-input);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius-s);
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 1rem;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(56, 158, 146, 0.2);
}

.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
}
.password-toggle:hover {
  color: var(--text-main);
}

.btn-primary {
  width: 100%;
  padding: 0.9rem;
  background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-dark-teal) 100%);
  border: none;
  border-radius: var(--border-radius-s);
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(56, 158, 146, 0.25);
  transition: transform var(--transition-fast), filter var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
}
.btn-primary:active {
  transform: translateY(1px);
}

.btn-secondary {
  padding: 0.6rem 1.2rem;
  background: var(--bg-input);
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius-s);
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}
.btn-secondary:hover {
  background: var(--border-glass);
  border-color: var(--text-muted);
}

.btn-danger {
  padding: 0.6rem 1.2rem;
  background: var(--accent-danger);
  border: none;
  border-radius: var(--border-radius-s);
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
}
.btn-danger:hover {
  filter: brightness(1.1);
}

/* ================= MAIN DASHBOARD SHELL ================= */
.app-container {
  display: flex;
  min-height: 100vh;
}

/* Sidebar navigation */
.sidebar {
  width: 260px;
  background: var(--bg-sidebar);
  backdrop-filter: blur(var(--blur-amount));
  -webkit-backdrop-filter: blur(var(--blur-amount));
  border-right: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100;
  padding: 1.5rem;
  transition: transform var(--transition-medium);
  overflow-y: auto;
}

.sidebar-brand {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: linear-gradient(135deg, var(--text-main) 30%, var(--accent-primary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sidebar-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex-grow: 1;
}

.sidebar-item button {
  width: 100%;
  padding: 0.8rem 1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-family);
  font-size: 0.95rem;
  font-weight: 500;
  text-align: left;
  border-radius: var(--border-radius-s);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.sidebar-item button:hover {
  background: var(--border-glass);
  color: var(--text-main);
}

.sidebar-item.active button {
  background: var(--accent-primary);
  color: var(--text-main);
  box-shadow: 0 4px 12px rgba(56, 158, 146, 0.2);
}

.sidebar-user {
  margin-top: auto;
  padding: 1rem 0;
  border-top: 1px solid var(--border-glass);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.user-info {
  display: flex;
  flex-direction: column;
}
.user-name {
  font-weight: 600;
  font-size: 0.95rem;
}
.user-role {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.btn-logout {
  width: 100%;
  padding: 0.6rem;
  background: none;
  border: 1px solid var(--accent-danger);
  color: var(--accent-danger);
  border-radius: var(--border-radius-s);
  cursor: pointer;
  font-family: var(--font-family);
  font-weight: 500;
  transition: background var(--transition-fast), color var(--transition-fast);
}
.btn-logout:hover {
  background: var(--accent-danger);
  color: var(--text-main);
}

/* Content Area */
.main-content {
  flex-grow: 1;
  margin-left: 260px;
  padding: 2.5rem;
  max-width: 1200px;
  width: calc(100% - 260px);
  transition: margin-left var(--transition-medium), width var(--transition-medium);
}

.app-container.sidebar-collapsed .sidebar {
  transform: translateX(-260px);
}

.app-container.sidebar-collapsed .main-content {
  margin-left: 0;
  width: 100%;
}

/* Header inside main content */
.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 1rem;
}

.main-title {
  font-size: 1.8rem;
}

.company-badge {
  background: var(--accent-dark-teal);
  border: 1px solid var(--accent-primary);
  color: var(--text-main);
  padding: 0.4rem 0.8rem;
  border-radius: var(--border-radius-s);
  font-size: 0.85rem;
  font-weight: 500;
}

/* Dynamic Tab Content styling */
.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
  animation: fadeIn var(--transition-medium) forwards;
}

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

/* Grid helper layouts */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

/* Profile cards and key metrics */
.profile-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.profile-detail-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 0.5rem;
}
.profile-detail-row span:first-child {
  color: var(--text-muted);
}
.profile-detail-row span:last-child {
  font-weight: 500;
}

/* Cards summary dashboard styles */
.metric-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  height: 100%;
}
.metric-value {
  font-size: 2.2rem;
  font-weight: 700;
  margin-top: 0.5rem;
  color: var(--accent-primary);
}

/* Attendance clock-in panels */
.attendance-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 1.5rem;
  padding: 2.5rem;
}

.clock-timer {
  font-size: 3rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.gps-status {
  font-size: 0.9rem;
  color: var(--accent-teal);
  background: rgba(56, 158, 146, 0.1);
  border: 1px solid rgba(56, 158, 146, 0.25);
  padding: 0.4rem 0.8rem;
  border-radius: var(--border-radius-s);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.clock-buttons {
  display: flex;
  gap: 1rem;
  width: 100%;
  max-width: 360px;
}
.btn-clock-in {
  flex: 1;
  padding: 1rem;
  background: var(--accent-success);
  border: none;
  color: var(--text-main);
  font-family: var(--font-family);
  font-weight: 600;
  border-radius: var(--border-radius-s);
  cursor: pointer;
  transition: transform var(--transition-fast), filter var(--transition-fast);
}
.btn-clock-out {
  flex: 1;
  padding: 1rem;
  background: var(--accent-danger);
  border: none;
  color: var(--text-main);
  font-family: var(--font-family);
  font-weight: 600;
  border-radius: var(--border-radius-s);
  cursor: pointer;
  transition: transform var(--transition-fast), filter var(--transition-fast);
}
.btn-clock-in:hover, .btn-clock-out:hover {
  filter: brightness(1.1);
}

/* Table layouts styling */
.table-container {
  overflow-x: auto;
  margin-top: 1rem;
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius-s);
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}

.custom-table th, 
.custom-table td {
  padding: 0.8rem 1rem;
}

.custom-table th {
  background-color: var(--bg-input);
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-glass);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.custom-table tr {
  border-bottom: 1px solid var(--border-glass);
  transition: background-color var(--transition-fast);
}
.custom-table tr:hover {
  background-color: rgba(255, 255, 255, 0.02);
}

/* Badges statuses */
.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
}
.badge-pending { background: rgba(243, 156, 18, 0.18); color: var(--accent-warning); }
.badge-approved { background: rgba(46, 204, 113, 0.18); color: var(--accent-success); }
.badge-rejected { background: rgba(231, 76, 60, 0.18); color: var(--accent-danger); }

/* Announcements and policies blocks */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.post-card {
  padding: 1.2rem;
}

.post-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.6rem;
  border-bottom: 1px solid var(--border-glass);
  padding-bottom: 0.4rem;
}
.post-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--accent-teal);
}
.post-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ================= MODAL & DIALOG SYSTEM ================= */
dialog {
  background: var(--bg-card);
  backdrop-filter: blur(var(--blur-amount));
  -webkit-backdrop-filter: blur(var(--blur-amount));
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius-m);
  box-shadow: var(--glass-shadow);
  padding: 2.2rem;
  color: var(--text-main);
  max-width: 500px;
  width: 90%;
  margin: auto;
  outline: none;
  animation: modalSlide var(--transition-medium) forwards;
}

dialog::backdrop {
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
}

@keyframes modalSlide {
  from { opacity: 0; transform: translateY(30px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.dialog-header {
  margin-bottom: 1.5rem;
}
.dialog-header h3 {
  font-size: 1.3rem;
  color: var(--accent-primary);
}

.dialog-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

/* ================= TOASTER NOTIFICATION ================= */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--bg-card);
  backdrop-filter: blur(var(--blur-amount));
  border: 1px solid var(--border-glass);
  padding: 0.8rem 1.2rem;
  border-radius: var(--border-radius-s);
  box-shadow: var(--glass-shadow);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 250px;
  max-width: 400px;
  color: var(--text-main);
  animation: slideIn var(--transition-medium) forwards;
}

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

.toast-success { border-left: 4px solid var(--accent-success); }
.toast-error { border-left: 4px solid var(--accent-danger); }
.toast-info { border-left: 4px solid var(--accent-primary); }

/* ================= PUBLIC CANDIDATE ONBOARDING PAGE ================= */
.onboard-container {
  max-width: 800px;
  margin: 3rem auto;
  padding: 0 1rem;
}

.onboard-letter {
  margin-top: 1.5rem;
  line-height: 1.7;
}

.signature-box {
  border: 1px solid var(--border-glass);
  background: var(--bg-input);
  padding: 1.5rem;
  border-radius: var(--border-radius-s);
  margin-top: 1.5rem;
}

/* Camera drop-in photo preview component */
.photo-uploader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  border: 2px dashed var(--border-glass);
  padding: 1.5rem;
  border-radius: var(--border-radius-s);
  text-align: center;
  background: var(--bg-input);
}
.photo-uploader input[type="file"] {
  display: none;
}
.photo-preview {
  max-width: 100%;
  max-height: 200px;
  border-radius: var(--border-radius-s);
  display: none;
  object-fit: cover;
}

.bottom-nav {
  display: none;
}

/* Responsive side nav tweaks & Mobile Bottom Nav Drawer */
@media (max-width: 768px) {
  .sidebar {
    display: none !important; /* Hide standard sidebar */
  }
  .bottom-nav {
    display: block !important;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 68px;
    background: var(--bg-sidebar);
    backdrop-filter: blur(var(--blur-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount));
    border-top: 1px solid var(--border-glass);
    z-index: 999;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.4);
  }
  .bottom-nav-list {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    overflow-x: auto;
    padding: 0.5rem;
    height: 100%;
    width: 100%;
    margin: 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;  /* Firefox */
  }
  .bottom-nav-list::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
  }
  
  .bottom-nav-list .sidebar-item button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 1.5rem !important;
    padding: 0.4rem 0.6rem !important;
    height: 100%;
    color: var(--text-muted);
    background: none !important;
    border: none;
    cursor: pointer;
    font-family: var(--font-family);
    white-space: nowrap;
    box-shadow: none !important;
    border-radius: var(--border-radius-s);
    transition: color var(--transition-fast), background var(--transition-fast);
  }
  
  .bottom-nav-list .sidebar-item.active button {
    color: var(--accent-teal) !important;
    background: rgba(56, 158, 146, 0.12) !important;
    font-weight: 600;
  }

  .main-content {
    margin-left: 0 !important;
    width: 100% !important;
    padding: 1.5rem 1.5rem 85px 1.5rem !important; /* Bottom pad so nav doesn't cover content */
  }
}

/* ================= ORG CHART HIERARCHY TREE STYLE ================= */
.org-tree {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  width: 100%;
  padding: 1rem 0;
}

.org-level {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  width: 100%;
  position: relative;
}

.org-node {
  background: var(--bg-card);
  backdrop-filter: blur(var(--blur-amount));
  -webkit-backdrop-filter: blur(var(--blur-amount));
  border: 1px solid var(--border-glass);
  border-radius: var(--border-radius-m);
  padding: 1.2rem;
  min-width: 220px;
  max-width: 260px;
  text-align: center;
  position: relative;
  box-shadow: var(--glass-shadow);
  transition: border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

.org-node:hover {
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(56, 158, 146, 0.15);
}

.org-node-self {
  border-color: var(--accent-teal) !important;
  box-shadow: 0 0 15px rgba(56, 158, 146, 0.25) !important;
  background: rgba(56, 158, 146, 0.05) !important;
}

.org-node .node-avatar {
  width: 42px;
  height: 42px;
  background: var(--accent-dark-teal);
  border: 1px solid var(--accent-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.6rem auto;
  font-size: 1.1rem;
}

.org-node .node-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-main);
}

.org-node .node-title {
  font-size: 0.78rem;
  color: var(--accent-teal);
  margin-bottom: 0.3rem;
}

.org-node .node-company {
  font-size: 0.68rem;
  background: var(--bg-input);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  color: var(--text-muted);
  display: inline-block;
}

.org-connector {
  width: 2px;
  height: 1.5rem;
  background: var(--border-glass);
  position: relative;
}
.org-connector::after {
  content: "▼";
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.55rem;
  color: var(--border-glass);
}

/* Bell Shake Animation & Hover Style */
#btn-notifications-toggle:hover {
  background-color: var(--border-glass);
}
@keyframes shakeBell {
  0% { transform: rotate(0); }
  15% { transform: rotate(15deg); }
  30% { transform: rotate(-15deg); }
  45% { transform: rotate(10deg); }
  60% { transform: rotate(-10deg); }
  75% { transform: rotate(4deg); }
  100% { transform: rotate(0); }
}
.shake-bell {
  animation: shakeBell 0.6s ease-in-out;
}

/* Collapsible Analytics Tree Component */
.analytics-toggle-btn {
  background: none;
  border: 1px solid transparent;
  color: var(--text-main);
  font-family: var(--font-family);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  width: 100%;
  text-align: left;
  padding: 0.5rem;
  border-radius: var(--border-radius-s);
  transition: background var(--transition-fast), border-color var(--transition-fast);
  margin: 0.2rem 0;
}

.analytics-toggle-btn:hover {
  background: rgba(56, 158, 146, 0.08);
  border-color: var(--border-glass);
}

.analytics-toggle-btn svg {
  transition: transform var(--transition-fast);
}

.analytics-toggle-btn.expanded svg {
  transform: rotate(90deg);
}

.analytics-staff-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-glass);
  padding: 0.6rem 0.8rem;
  border-radius: var(--border-radius-s);
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: transform var(--transition-fast), background var(--transition-fast);
}

.analytics-staff-card:hover {
  background: rgba(56, 158, 146, 0.05);
  transform: translateX(4px);
}

/* ================= DOCUMENT PREVIEW SYSTEM ================= */
.letter-preview-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  background: var(--bg-card);
  padding: 1.5rem;
  border-radius: var(--border-radius-m);
  border: 1px solid var(--border-glass);
  margin-top: 1rem;
}

.letter-preview-sheet {
  background: #ffffff;
  color: #333333;
  padding: 3rem 2.5rem;
  border-radius: var(--border-radius-s);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  font-family: 'Georgia', 'Times New Roman', Times, serif;
  line-height: 1.6;
  position: relative;
  max-width: 100%;
  margin: 0 auto;
  border: 1px solid #ddd;
}

.letter-preview-header {
  border-bottom: 2px solid #389e92;
  padding-bottom: 1rem;
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.letter-preview-logo {
  font-size: 1.6rem;
  font-weight: 800;
  color: #1a4f47;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.letter-preview-logo span {
  color: #389e92;
}

.letter-preview-meta {
  font-size: 0.85rem;
  color: #666;
  text-align: right;
  line-height: 1.4;
}

.letter-preview-title {
  font-size: 1.3rem;
  font-weight: 700;
  text-align: center;
  text-transform: uppercase;
  margin-bottom: 2.5rem;
  color: #111;
  letter-spacing: 0.5px;
  text-decoration: underline;
}

.letter-preview-body {
  font-size: 0.95rem;
  margin-bottom: 3rem;
  white-space: pre-line;
  text-align: justify;
}

.letter-preview-signatures {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-top: 3rem;
  font-size: 0.9rem;
}

.signature-line {
  border-top: 1px solid #444;
  width: 200px;
  text-align: center;
  padding-top: 0.5rem;
  margin-top: 3.5rem;
  font-size: 0.85rem;
  color: #555;
}

/* Clickable Org Chart Nodes for managers & HR */
.org-node-clickable {
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}
.org-node-clickable:hover {
  transform: scale(1.05);
  border-color: var(--accent-primary) !important;
  box-shadow: 0 8px 25px rgba(56, 158, 146, 0.25) !important;
}

/* Scoped Collapsible Folder Tree Org Chart styles */
.org-folder-tree-container {
  width: 100%;
  text-align: left;
}

.org-folder-tree {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.org-folder-tree ul {
  list-style: none;
  padding-left: 1.2rem;
  border-left: 1px dashed rgba(255, 255, 255, 0.08);
  margin: 0.1rem 0 0.1rem 0.5rem;
}

.org-folder-tree li {
  margin: 0.2rem 0;
  position: relative;
}

.org-folder-node {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  padding: 0.25rem 0.5rem;
  border-radius: var(--border-radius-s);
  transition: background var(--transition-fast);
}

.org-folder-node:hover {
  background: rgba(255, 255, 255, 0.03);
}

.org-folder-toggle {
  cursor: pointer;
  font-size: 0.65rem;
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  user-select: none;
  transition: transform 0.15s ease;
  margin-top: 2px;
}

.org-folder-toggle.collapsed {
  transform: rotate(-90deg);
}

.org-folder-toggle-dot {
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.5rem;
  color: var(--text-muted);
  opacity: 0.4;
  user-select: none;
  margin-top: 2px;
}

.org-folder-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  cursor: default;
  flex-grow: 1;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  border: 1px solid transparent;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

/* Clickable states for tree nodes */
.org-folder-content.org-tree-node-clickable {
  cursor: pointer;
}

/* Selected state highlight */
.org-folder-content.org-tree-node-selected {
  background: rgba(56, 158, 146, 0.08) !important;
  border-color: rgba(56, 158, 146, 0.25) !important;
}

/* Self state highlight */
.org-folder-content.org-tree-node-self {
  border-left: 2px solid var(--accent-primary) !important;
  padding-left: calc(0.5rem - 2px) !important;
}

.org-folder-name-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.org-folder-name {
  font-weight: 600;
  color: var(--text-main);
  font-size: 0.88rem;
}

.org-folder-title {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.org-folder-company-badge {
  font-size: 0.6rem;
  padding: 1px 4px;
  border-radius: 3px;
  text-transform: uppercase;
  font-weight: 600;
  display: inline-block;
  line-height: 1.2;
}

.badge-innov8 {
  background: rgba(16, 185, 129, 0.1) !important;
  color: rgb(16, 185, 129) !important;
  border: 1px solid rgba(16, 185, 129, 0.2) !important;
}

.badge-beyond {
  background: rgba(245, 158, 11, 0.1) !important;
  color: rgb(245, 158, 11) !important;
  border: 1px solid rgba(245, 158, 11, 0.2) !important;
}

.badge-uvc {
  background: rgba(59, 130, 246, 0.1) !important;
  color: rgb(59, 130, 246) !important;
  border: 1px solid rgba(59, 130, 246, 0.2) !important;
}


