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

:root {
  /* Colors */
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-light: rgba(37, 99, 235, 0.08);
  --primary-glow: rgba(37, 99, 235, 0.25);
  
  --secondary: #4f46e5;
  --secondary-hover: #4338ca;
  
  --accent: #06b6d4;
  --accent-light: rgba(6, 182, 212, 0.1);
  
  --success: #10b981;
  --success-light: rgba(16, 185, 129, 0.1);
  --success-hover: #059669;
  
  --warning: #f59e0b;
  --warning-light: rgba(245, 158, 11, 0.1);
  
  --danger: #ef4444;
  --danger-light: rgba(239, 68, 68, 0.1);
  
  /* Light Theme Variables */
  --bg-app: #f8fafc;
  --bg-sidebar: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%);
  --bg-card: #ffffff;
  --bg-input: #f1f5f9;
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-white: #ffffff;
  --border-color: #e2e8f0;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.02);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.05);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.08);
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(255, 255, 255, 0.4);
  
  /* Fonts & Layout */
  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --sidebar-width: 260px;
  --sidebar-collapsed-width: 80px;
  --header-height: 70px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
}

[data-theme="dark"] {
  /* Dark Theme Variables */
  --bg-app: #0b0f19;
  --bg-sidebar: linear-gradient(135deg, #090d16 0%, #020617 100%);
  --bg-card: #151c2c;
  --bg-input: #1e293b;
  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --border-color: #2e3c54;
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.2);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.3);
  --glass-bg: rgba(21, 28, 44, 0.6);
  --glass-border: rgba(255, 255, 255, 0.05);
  
  --primary-light: rgba(37, 99, 235, 0.15);
  --success-light: rgba(16, 185, 129, 0.15);
  --warning-light: rgba(245, 158, 11, 0.15);
  --danger-light: rgba(239, 68, 68, 0.15);
}

/* Reset & Global */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-main);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* Keyframes & Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes slideLeft {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

@keyframes pulseNotification {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.animate-fade {
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-slide-up {
  animation: slideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* App Layout Grid */
#app-root {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-sidebar);
  color: var(--text-white);
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 4px 0 25px rgba(0, 0, 0, 0.15);
}

.sidebar.collapsed {
  width: var(--sidebar-collapsed-width);
}

.sidebar-header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  padding: 0 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  gap: 12px;
  overflow: hidden;
}

.sidebar.collapsed .logo-area {
  display: none;
}
.sidebar.collapsed .sidebar-header {
  justify-content: center !important;
  padding: 0;
}

.d-none-desktop {
  display: none !important;
}

.logo-icon {
  width: 38px;
  height: 38px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 20px;
  color: var(--text-white);
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.3);
  flex-shrink: 0;
}

.logo-text {
  font-weight: 700;
  font-size: 20px;
  background: linear-gradient(to right, #ffffff, #93c5fd);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
}

.sidebar-menu {
  list-style: none;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex-grow: 1;
}

.menu-item {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
  gap: 16px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
}

.menu-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.menu-item:hover, .menu-item.active {
  color: var(--text-white);
  background: rgba(255, 255, 255, 0.06);
}

.menu-item.active {
  background: linear-gradient(to right, var(--primary-hover), rgba(37, 99, 235, 0.15));
  border-left: 4px solid var(--accent);
  padding-left: 12px;
}

/* Collapsed state rules for menu items */
.sidebar.collapsed .menu-item span {
  display: none;
}
.sidebar.collapsed .menu-item {
  justify-content: center;
  padding: 12px 0;
}
.sidebar.collapsed .menu-item.active {
  padding-left: 0;
}
.sidebar.collapsed .user-info {
  display: none;
}
.sidebar.collapsed .sidebar-footer {
  justify-content: center;
  padding: 20px 0;
}

.sidebar-footer {
  padding: 20px 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent);
}

.user-info {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  white-space: nowrap;
}

.user-name {
  font-weight: 600;
  font-size: 14px;
}

.user-role {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

/* Main Dashboard Panel */
.main-content {
  margin-left: var(--sidebar-width);
  width: calc(100% - var(--sidebar-width));
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left 0.3s cubic-bezier(0.16, 1, 0.3, 1), width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.main-content.expanded {
  margin-left: var(--sidebar-collapsed-width);
  width: calc(100% - var(--sidebar-collapsed-width));
}

.header {
  height: var(--header-height);
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 900;
  box-shadow: var(--shadow-sm);
}

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

.toggle-sidebar-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
}

.page-title {
  font-weight: 700;
  font-size: 22px;
  color: var(--text-main);
}

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

.notification-bell {
  position: relative;
  cursor: pointer;
  color: var(--text-muted);
}

.notification-bell:hover {
  color: var(--primary);
}

.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background-color: var(--danger);
  color: var(--text-white);
  font-size: 10px;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulseNotification 2s infinite;
}

.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
}

.theme-toggle:hover {
  color: var(--primary);
}

.content-body {
  padding: 32px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* KPI Count Grid Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.stat-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.03;
  pointer-events: none;
  background: linear-gradient(135deg, currentColor 0%, transparent 100%);
}

.stat-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: currentColor;
}

.stat-card.primary { color: var(--primary); }
.stat-card.success { color: var(--success); }
.stat-card.warning { color: var(--warning); }
.stat-card.danger { color: var(--danger); }
.stat-card.accent { color: var(--accent); }

.stat-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 28px;
}

.stat-card.primary .stat-icon { background-color: var(--primary-light); color: var(--primary); }
.stat-card.success .stat-icon { background-color: var(--success-light); color: var(--success); }
.stat-card.warning .stat-icon { background-color: var(--warning-light); color: var(--warning); }
.stat-card.danger .stat-icon { background-color: var(--danger-light); color: var(--danger); }
.stat-card.accent .stat-icon { background-color: var(--accent-light); color: var(--accent); }

.stat-details {
  display: flex;
  flex-direction: column;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.stat-label {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Analytics Charts & Multi-columns layout */
.dashboard-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
}

@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: box-shadow 0.3s ease;
}

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

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-main);
}

/* Glassmorphism Forms & Cards */
.glass-panel {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px);
  border-radius: var(--radius-md);
}

/* Chart Canvas Mock SVG representation */
.chart-container {
  height: 250px;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 10px 0 30px 0;
  position: relative;
  border-bottom: 2px solid var(--border-color);
}

.chart-bar-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-grow: 1;
  height: 100%;
  justify-content: flex-end;
  gap: 8px;
}

.chart-bar {
  width: 32px;
  background: linear-gradient(180deg, var(--accent) 0%, var(--primary) 100%);
  border-radius: 4px 4px 0 0;
  position: relative;
  min-height: 4px;
  animation: slideUp 0.8s ease forwards;
  transform-origin: bottom;
  cursor: pointer;
}

.chart-bar:hover {
  background: linear-gradient(180deg, var(--accent) 0%, var(--primary-hover) 100%);
  filter: brightness(1.1);
}

.chart-bar::after {
  content: attr(data-value);
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-main);
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.chart-bar:hover::after {
  opacity: 1;
}

.chart-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  position: absolute;
  bottom: -24px;
}

/* Pie Chart Visual Representation */
.pie-chart-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  height: 100%;
}

.pie-circle-mock {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: conic-gradient(
    var(--primary) 0% 75%,
    var(--accent) 75% 100%
  );
  position: relative;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pie-circle-mock::after {
  content: '';
  position: absolute;
  width: 80px;
  height: 80px;
  background-color: var(--bg-card);
  border-radius: 50%;
}

.pie-legend {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.legend-color {
  width: 14px;
  height: 14px;
  border-radius: 3px;
}

/* Table Style System */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  background-color: var(--bg-card);
}

.data-table th {
  background-color: var(--bg-app);
  color: var(--text-muted);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
}

.data-table td {
  padding: 16px 24px;
  border-bottom: 1px solid var(--border-color);
  font-size: 14px;
  color: var(--text-main);
  vertical-align: middle;
}

.data-table tr:last-child td {
  border-bottom: none;
}

.data-table tr:hover td {
  background-color: var(--primary-light);
}

/* Badges styling */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
  gap: 6px;
}

.badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: currentColor;
}

.badge.active, .badge.success { background-color: var(--success-light); color: var(--success); }
.badge.closed, .badge.danger { background-color: var(--danger-light); color: var(--danger); }
.badge.warning { background-color: var(--warning-light); color: var(--warning); }
.badge.secondary { background-color: var(--primary-light); color: var(--primary); }

/* Inputs and Forms */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background-color: var(--bg-card);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 14px;
  outline: none;
  transition: all 0.2s ease;
}

.form-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Custom interactive forms validation */
.form-input:user-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-light);
}

/* Buttons style */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  outline: none;
  gap: 8px;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-primary {
  background-color: var(--primary);
  color: var(--text-white);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
}

.btn-secondary {
  background-color: var(--primary-light);
  color: var(--primary);
}

.btn-secondary:hover {
  background-color: rgba(37, 99, 235, 0.15);
}

.btn-danger {
  background-color: var(--danger);
  color: var(--text-white);
}

.btn-danger:hover {
  background-color: #dc2626;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

.btn-outline:hover {
  border-color: var(--text-muted);
  color: var(--text-main);
}

/* Modals & Popovers using native dialog */
dialog::backdrop {
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(8px);
  animation: fadeIn 0.3s ease;
}

dialog {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  padding: 32px;
  background-color: var(--bg-card);
  color: var(--text-main);
  max-width: 600px;
  width: 90%;
  margin: auto;
  outline: none;
}

.dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
  margin-bottom: 24px;
}

.dialog-title {
  font-size: 20px;
  font-weight: 700;
}

.close-dialog-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
}

/* Login Screen design overrides */
.login-container {
  min-height: 100vh;
  width: 100vw;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  background: var(--bg-app);
  overflow: hidden;
}

/* ── Left panel: animated visual ── */
.login-visual {
  flex: 1 1 55%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #0f172a 0%, #1e3a8a 55%, #0ea5e9 100%);
  overflow: hidden;
  padding: 60px 48px;
}

/* Background subtle grid */
.login-visual::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.login-visual-inner {
  position: relative;
  z-index: 2;
  max-width: 480px;
  width: 100%;
}

/* Brand row */
.lv-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 36px;
}

.lv-logo {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #06b6d4, #3b82f6);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 22px;
  color: #fff;
  box-shadow: 0 8px 24px rgba(6, 182, 212, 0.45);
}

.lv-brand-name {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

.lv-headline {
  font-size: 32px;
  font-weight: 800;
  color: #fff;
  line-height: 1.3;
  margin-bottom: 16px;
}

.lv-desc {
  font-size: 14px;
  color: rgba(255,255,255,0.65);
  line-height: 1.7;
  margin-bottom: 40px;
  max-width: 380px;
}

/* Orbit decoration */
.lv-orbit {
  position: absolute;
  bottom: -120px;
  right: -120px;
  width: 380px;
  height: 380px;
  pointer-events: none;
}

.lv-orbit-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.1);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.lv-orbit-ring-1 {
  width: 220px;
  height: 220px;
  animation: orbit-spin 18s linear infinite;
}

.lv-orbit-ring-2 {
  width: 340px;
  height: 340px;
  animation: orbit-spin 28s linear infinite reverse;
  border-style: dashed;
}

@keyframes orbit-spin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}

.lv-orbit-dot {
  position: absolute;
  border-radius: 50%;
  top: 50%;
  left: 50%;
}

.lv-orbit-dot-1 {
  width: 10px;
  height: 10px;
  background: #06b6d4;
  box-shadow: 0 0 12px #06b6d4;
  margin: -5px 0 0 95px;
  animation: orbit-dot-1 18s linear infinite;
}

.lv-orbit-dot-2 {
  width: 8px;
  height: 8px;
  background: #3b82f6;
  box-shadow: 0 0 10px #3b82f6;
  margin: -4px 0 0 155px;
  animation: orbit-dot-2 28s linear infinite reverse;
}

.lv-orbit-dot-3 {
  width: 6px;
  height: 6px;
  background: #f8fafc;
  margin: -3px 0 0 105px;
  animation: orbit-dot-1 12s linear infinite;
  animation-delay: -6s;
}

@keyframes orbit-dot-1 {
  from { transform: rotate(0deg)   translateX(0); }
  to   { transform: rotate(360deg) translateX(0); }
}
@keyframes orbit-dot-2 {
  from { transform: rotate(0deg)   translateX(0); }
  to   { transform: rotate(360deg) translateX(0); }
}

/* ── Right panel: form ── */
.login-panel {
  flex: 0 0 auto;
  width: 440px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-app);
  padding: 40px 32px;
}

.login-card {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  animation: slideUp 0.55s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.login-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 28px;
  color: var(--text-white);
  box-shadow: 0 8px 25px rgba(6, 182, 212, 0.4);
}

.login-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-main);
}

.login-subtitle {
  font-size: 14px;
  color: var(--text-muted);
}

/* Responsive: stack vertically on small screens */
@media (max-width: 900px) {
  .login-container { flex-direction: column; }
  .login-visual { flex: 0 0 auto; min-height: 280px; padding: 40px 24px; }
  .lv-orbit { display: none; }
  .login-panel { width: 100%; padding: 32px 24px; }
  .login-card { max-width: 100%; }
}


/* Document Upload and checklists */
.doc-upload-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.doc-upload-box {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-sm);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
  cursor: pointer;
}

.doc-upload-box:hover {
  border-color: var(--primary);
  background-color: var(--primary-light);
}

.doc-name {
  font-weight: 600;
  font-size: 14px;
}

.doc-status {
  font-size: 12px;
  color: var(--text-muted);
}

/* Custom interactive tab-system */
.tab-nav {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
  margin-bottom: 24px;
  overflow-x: auto;
}

.tab-btn {
  background: none;
  border: none;
  padding: 10px 20px;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.tab-btn:hover {
  color: var(--text-main);
  background-color: var(--primary-light);
}

.tab-btn.active {
  color: var(--primary);
  background-color: var(--primary-light);
}

/* Filter controls panel */
.filter-panel {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) auto;
  gap: 16px;
  align-items: flex-end;
}

.filter-actions {
  display: flex;
  gap: 8px;
}

/* Pagination container */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}

.pagination-info {
  font-size: 14px;
  color: var(--text-muted);
}

.pagination-controls {
  display: flex;
  gap: 8px;
}

/* Notification Drawer popover style */
.notif-drawer {
  position: fixed;
  right: -380px;
  top: 0;
  width: 380px;
  height: 100vh;
  background-color: var(--bg-card);
  box-shadow: var(--shadow-lg);
  border-left: 1px solid var(--border-color);
  z-index: 1100;
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.notif-drawer.open {
  right: 0;
}

.notif-header {
  padding: 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.notif-title {
  font-weight: 700;
  font-size: 18px;
}

.notif-list {
  flex-grow: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.notif-item {
  padding: 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.notif-item:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

.notif-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 4px;
  height: 100%;
  border-radius: 4px 0 0 4px;
}

.notif-item.danger { background-color: var(--bg-card); border-left-color: var(--danger); }
.notif-item.danger::before { background-color: var(--danger); }
.notif-item.warning { background-color: var(--bg-card); border-left-color: var(--warning); }
.notif-item.warning::before { background-color: var(--warning); }

.notif-item:hover.danger { background-color: var(--danger-light); }
.notif-item:hover.warning { background-color: var(--warning-light); }

.notif-item-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.notif-item-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-main);
}

.notif-item-cat {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  background-color: var(--bg-input);
  color: var(--text-muted);
}

.notif-item-msg {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Timeline component */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 17px;
  top: 8px;
  width: 2px;
  height: calc(100% - 16px);
  background-color: var(--border-color);
}

.timeline-item {
  display: flex;
  gap: 20px;
  position: relative;
}

.timeline-marker {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--bg-card);
  border: 2px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  flex-shrink: 0;
  color: var(--primary);
}

.timeline-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 4px;
}

.timeline-time {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}

.timeline-title {
  font-weight: 600;
  font-size: 14px;
}

.timeline-desc {
  font-size: 13px;
  color: var(--text-muted);
}

/* QR Code presentation */
.qr-card-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  gap: 16px;
  background-color: var(--bg-app);
}

.qr-box {
  width: 180px;
  height: 180px;
  background-color: var(--text-white);
  border: 8px solid var(--text-white);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
}

/* Utility classes */
.flex-row-between { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.flex-gap-12 { display: flex; gap: 12px; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.d-none { display: none !important; }

/* Responsive adjustments */
@media (max-width: 768px) {
  .sidebar {
    left: -260px;
  }
  .sidebar.open-mobile {
    left: 0;
  }
  .main-content {
    margin-left: 0 !important;
    width: 100% !important;
  }
  .d-none-mobile {
    display: none !important;
  }
  .d-none-desktop {
    display: flex !important;
  }
  .flex-row-between {
    flex-direction: column;
    align-items: flex-start;
  }
  .header {
    padding: 0 16px;
  }
  .content-body {
    padding: 16px;
  }
  .filter-panel {
    grid-template-columns: 1fr;
  }
}

/* Activity Calendar Styles */
.calendar-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.calendar-header-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 16px;
}
.calendar-header-controls h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}
.calendar-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  cursor: pointer;
}
.calendar-btn:hover {
  background: var(--bg-app);
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--border-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.calendar-day-header {
  background: var(--bg-card);
  padding: 10px;
  text-align: center;
  font-weight: 600;
  font-size: 13px;
  color: var(--text-muted);
}
.calendar-day {
  background: var(--bg-card);
  min-height: 100px;
  padding: 8px;
  position: relative;
  transition: background 0.2s;
}
.calendar-day:hover {
  background: var(--bg-app);
}
.calendar-day.empty {
  background: var(--bg-app);
  opacity: 0.5;
}
.calendar-date-num {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  display: inline-block;
}
.calendar-date-num.today {
  background: var(--primary);
  color: white;
  width: 24px;
  height: 24px;
  line-height: 24px;
  text-align: center;
  border-radius: 50%;
}
.calendar-events {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.cal-event {
  font-size: 11px;
  padding: 3px 6px;
  border-radius: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  font-weight: 600;
}
.cal-event.payroll {
  background: rgba(33, 150, 243, 0.15);
  color: #1976D2;
  border-left: 2px solid #1976D2;
}
.cal-event.project {
  background: rgba(255, 152, 0, 0.15);
  color: #F57C00;
  border-left: 2px solid #F57C00;
}
.cal-event.contract {
  background: rgba(244, 67, 54, 0.15);
  color: #D32F2F;
  border-left: 2px solid #D32F2F;
}
