:root {
  --bg: #f5f6fb;
  --surface: #ffffff;
  --surface-alt: #f1f3fb;
  --text: #101323;
  --muted: #5c6376;
  --border: #e1e5f2;
  --accent: #2f35f2;
  --accent-2: #f4c21b;
  --accent-3: #ff5b6e;
  --shadow: 0 20px 45px rgba(20, 24, 44, 0.1);
  --glass: rgba(255, 255, 255, 0.78);
  --gradient: linear-gradient(135deg, #f6f7ff, #eef0ff 55%, #f7f4ff);
}

body[data-theme="dark"] {
  --bg: #0e111c;
  --surface: #141a2b;
  --surface-alt: #232c40;
  --text: #f5f7ff;
  --muted: #a2abc2;
  --border: #313a50;
  - --accent: #4d5bff;
  --accent-2: #f4c21b;
  --accent-3: #ff6b7a;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  --glass: rgba(20, 26, 43, 0.8);
  --gradient: radial-gradient(circle at top left, #1b2240, #0e111c 60%);
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Manrope", sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  font-family: "DM Serif Display", serif;
  margin: 0 0 0.4rem;
}

p {
  margin: 0;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
  background: var(--gradient);
}

.sidebar {
  background: var(--surface);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  border-right: 1px solid var(--border);
  position: sticky;
  top: 0;
  height: 100vh;
  transition: transform 0.3s ease;
  z-index: 1000;
  overflow: hidden;
}

.sidebar.collapsed {
  transform: translateX(-100%);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-badge {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--accent), #7ce6d5);
  color: #fff;
  box-shadow: 0 12px 20px rgba(14, 165, 164, 0.25);
}

.logo-badge img {
  width: 100%;
  height: 100%;
  border-radius: 16px;
  object-fit: cover;
  display: block;
}

.logo-mark {
  width: 26px;
  height: 26px;
}

.brand-title {
  font-weight: 700;
}

.brand-subtitle {
  font-size: 0.8rem;
  color: var(--muted);
}

.sidebar-nav {
  display: grid;
  gap: 10px;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1 1 1;
  padding-right: 6px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.sidebar-nav::-webkit-scrollbar {
  display: none;
}

.nav-item {
  display: grid;
  gap: 6px;
}

.sidebar-nav .nav-link {
  color: var(--text);
  padding: 10px 14px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  background: transparent;
  transition: all 0.2s ease;
}

.sidebar-nav .nav-link.active {
  background: var(--accent-subtle, rgba(99, 102, 241, 0.1));
  color: var(--accent);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(99, 102, 241, 0.2);
}

.sidebar-nav .nav-link.active i {
  color: var(--accent);
}

.sidebar-nav .nav-link.has-submenu {
  justify-content: space-between;
}

.sidebar-nav .nav-link.has-submenu>i:first-child {
  margin-right: 10px;
}

.submenu-caret {
  margin-left: auto;
  font-size: 0.9rem;
  transition: transform 0.25s ease;
}

.submenu {
  display: grid;
  gap: 6px;
  padding-left: 14px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.3s ease;
}

.submenu-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  height: 40px;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.9rem;
  background: transparent;
  transition: all 0.2s ease;
}

.submenu-link:hover,
.submenu-link.active {
  color: var(--accent);
  background: rgba(14, 165, 164, 0.12);
}

.nav-item.open>.submenu {
  max-height: 240px;
  opacity: 1;
}

.nav-item.open>.nav-link .submenu-caret {
  transform: rotate(180deg);
}

.sidebar-nav .nav-link i {
  font-size: 1.1rem;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
  background: var(--surface-alt);
  color: var(--accent);
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 16px;
}

.sidebar-status {
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  gap: 8px;
  align-items: center;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

.content {
  padding: 28px 32px 48px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  position: sticky;
  top: 0;
  z-index: 900;
  background: var(--bg);
  padding: 12px 0;
}

.search-bar {
  flex: 1 1 320px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--surface);
  border-radius: 999px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.search-bar input {
  border: none;
  outline: none;
  width: 100%;
  background: transparent;
  color: var(--text);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.dropdown {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dropdown-toggle {
  cursor: pointer;
}

.topbar .dropdown-toggle::after {
  display: none;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 260px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 12px;
  display: none;
  z-index: 1200;
}

.dropdown-menu.show {
  display: grid;
  gap: 10px;
}

.dropdown-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 600;
}

.dropdown-list {
  display: grid;
  gap: 10px;
}

.dropdown-item {
  padding: 10px 12px;
  border-radius: 12px;
  background: transparent;
  display: grid;
  gap: 4px;
  transition: all 0.2s ease;
}

.dropdown-item:hover {
  background: var(--surface-alt);
}

.dropdown-title {
  font-weight: 600;
}

.dropdown-footer {
  display: flex;
  justify-content: flex-end;
}

.dropdown-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px;
}

.dropdown-user img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.dropdown-action {
  background: transparent;
  border: none;
  border-radius: 10px;
  padding: 10px 12px;
  text-align: left;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  transition: all 0.2s ease;
}

.dropdown-action:hover {
  background: var(--surface-alt);
  color: var(--accent);
}

.dropdown-action.text-danger {
  color: var(--accent-3);
}

.dropdown-action.text-danger:hover {
  background: rgba(255, 91, 110, 0.1);
  color: var(--accent-3);
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
}

.user-chip img {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
}

.user-name {
  font-weight: 600;
}

.user-role {
  font-size: 0.75rem;
  color: var(--muted);
}

.section {
  margin-bottom: 36px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.section-head h1 {
  font-size: 2.1rem;
}

.muted {
  color: var(--muted);
}

.action-group {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  border-radius: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-primary {
  background: var(--accent);
  border: none;
}

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

.btn-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.btn-icon {
  border: 1px solid var(--border);
  background: var(--surface);
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  position: relative;
}

.btn-theme {
  width: 40px;
  height: 40px;
  justify-content: center;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 50%;
  padding: 0;
  position: relative;
}

body[data-theme="dark"] .btn-theme {
  color: #f8fafc;
}

body[data-theme="dark"] .sidebar,
body[data-theme="dark"] .topbar,
body[data-theme="dark"] .card,
body[data-theme="dark"] .user-chip,
body[data-theme="dark"] .search-bar,
body[data-theme="dark"] .dropdown-menu {
  background: var(--surface);
}

body[data-theme="dark"] .btn-icon,
body[data-theme="dark"] .btn-outline,
body[data-theme="dark"] .btn-link,
body[data-theme="dark"] .nav-link,
body[data-theme="dark"] .submenu-link,
body[data-theme="dark"] .dropdown-action,
body[data-theme="dark"] .table,
body[data-theme="dark"] .table th,
body[data-theme="dark"] .table td {
  color: var(--text);
}

body[data-theme="dark"] .table {
  --bs-table-bg: var(--surface);
  --bs-table-striped-bg: var(--surface-alt);
  --bs-table-hover-bg: rgba(245, 158, 11, 0.08);
  --bs-table-color: var(--text);
  background-color: var(--surface) !important;
  border-color: var(--border);
}

body[data-theme="dark"] .table tbody tr {
  background-color: var(--surface) !important;
}

body[data-theme="dark"] .table tbody tr:nth-child(even) {
  background-color: var(--surface-alt) !important;
}

body[data-theme="dark"] .table> :not(caption)>*>* {
  border-color: var(--border);
}

body[data-theme="dark"] .table thead th {
  color: var(--muted);
  border-color: var(--border);
  background-color: var(--surface-alt) !important;
}

body[data-theme="dark"] .table-responsive {
  background: var(--surface);
}

body[data-theme="dark"] .table-filter {
  background: var(--surface-alt);
  border-color: var(--border);
  color: var(--muted);
}

body[data-theme="dark"] .table-filter input {
  color: var(--text);
}

body[data-theme="dark"] .table-filter .table-clear {
  background: var(--surface);
  color: var(--muted);
}

body[data-theme="dark"] .table-sort i {
  color: var(--muted);
}

body[data-theme="dark"] .table-sort[data-sort-dir="asc"] i,
body[data-theme="dark"] .table-sort[data-sort-dir="desc"] i {
  color: var(--accent);
}

body[data-theme="dark"] .btn-outline {
  border-color: var(--border);
}

body[data-theme="dark"] .btn-icon,
body[data-theme="dark"] .btn-outline {
  background: var(--surface-alt);
}

body[data-theme="dark"] .chip,
body[data-theme="dark"] .status,
body[data-theme="dark"] .priority,
body[data-theme="dark"] .pill {
  color: var(--text);
}

body[data-theme="dark"] .table thead th {
  color: var(--muted);
  border-color: var(--border);
}

body[data-theme="dark"] .table> :not(caption)>*>* {
  border-color: var(--border);
}

body[data-theme="dark"] .dropdown-item {
  background: var(--surface-alt);
}

body[data-theme="dark"] .form-control,
body[data-theme="dark"] .form-select,
body[data-theme="dark"] .form-check-input,
body[data-theme="dark"] textarea,
body[data-theme="dark"] input[type="text"],
body[data-theme="dark"] input[type="email"],
body[data-theme="dark"] input[type="password"],
body[data-theme="dark"] input[type="search"],
body[data-theme="dark"] input[type="date"],
body[data-theme="dark"] input[type="number"],
body[data-theme="dark"] input[type="tel"],
body[data-theme="dark"] input[type="url"] {
  background-color: var(--surface-alt);
  color: var(--text);
  border: 1px solid var(--border);
}

body[data-theme="dark"] .form-control::placeholder,
body[data-theme="dark"] textarea::placeholder,
body[data-theme="dark"] input::placeholder {
  color: var(--muted);
}

body[data-theme="dark"] .form-control:focus,
body[data-theme="dark"] .form-select:focus,
body[data-theme="dark"] textarea:focus,
body[data-theme="dark"] input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 0.2rem rgba(245, 158, 11, 0.2);
}

body[data-theme="dark"] .form-label {
  color: var(--muted);
}

body[data-theme="dark"] .form-check-input {
  background-color: var(--surface-alt);
  border-color: var(--border);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

body[data-theme="dark"] .form-check-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 0.2rem rgba(245, 158, 11, 0.2);
}

body[data-theme="dark"] .form-check-input:checked {
  background-color: var(--accent);
  border-color: var(--accent);
  background-image: none;
}

body[data-theme="dark"] .form-check-input[type="checkbox"]:checked {
  box-shadow: inset 0 0 0 2px rgba(15, 23, 42, 0.85);
}

body[data-theme="dark"] .form-check-input[type="radio"]:checked {
  box-shadow: inset 0 0 0 5px rgba(15, 23, 42, 0.85);
  border-radius: 50%;
}

body[data-theme="dark"] .form-switch .form-check-input {
  background-image: none;
}

body[data-theme="dark"] .form-switch .form-check-input:checked {
  background-color: var(--accent);
}

body[data-theme="dark"] .form-check-label {
  color: var(--text);
}

body[data-theme="dark"] input[type="date"]::-webkit-calendar-picker-indicator,
body[data-theme="dark"] input[type="datetime-local"]::-webkit-calendar-picker-indicator,
body[data-theme="dark"] input[type="month"]::-webkit-calendar-picker-indicator,
body[data-theme="dark"] input[type="week"]::-webkit-calendar-picker-indicator,
body[data-theme="dark"] input[type="time"]::-webkit-calendar-picker-indicator {
  filter: invert(1) opacity(0.8);
}

body[data-theme="dark"] input[type="date"]::-webkit-inner-spin-button,
body[data-theme="dark"] input[type="time"]::-webkit-inner-spin-button,
body[data-theme="dark"] input[type="datetime-local"]::-webkit-inner-spin-button {
  filter: invert(1) opacity(0.8);
}

body[data-theme="dark"] select,
body[data-theme="dark"] .form-select {
  color-scheme: dark;
}

body[data-theme="dark"] select[multiple] {
  scrollbar-color: var(--muted) var(--surface-alt);
}

body[data-theme="dark"] select[multiple]::-webkit-scrollbar {
  width: 8px;
}

body[data-theme="dark"] select[multiple]::-webkit-scrollbar-track {
  background: var(--surface-alt);
}

body[data-theme="dark"] select[multiple]::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 999px;
}

body[data-theme="dark"] select[multiple]::-webkit-scrollbar-thumb:hover {
  background: rgba(245, 158, 11, 0.6);
}

body[data-theme="dark"] .form-control[type="file"] {
  color: var(--text);
  background-color: var(--surface-alt);
  border-color: var(--border);
}

body[data-theme="dark"] .form-control[type="file"]::file-selector-button {
  background: var(--accent);
  color: var(--text);
  border-color: var(--border);
}

body[data-theme="dark"] .input-group-text {
  background: var(--surface-);
  color: var(--text);
  border-color: var(--border);
}

body[data-theme="dark"] .form-control:disabled,
body[data-theme="dark"] .form-select:disabled,
body[data-theme="dark"] .form-control[readonly],
body[data-theme="dark"] .form-select[readonly] {
  background-color: rgba(20, 26, 43, 0.7);
  color: var(--muted);
  border-color: var(--border);
}

body[data-theme="dark"] .content,
body[data-theme="dark"] .section,
body[data-theme="dark"] .section-head,
body[data-theme="dark"] h1,
body[data-theme="dark"] h2,
body[data-theme="dark"] h3,
body[data-theme="dark"] .card h1,
body[data-theme="dark"] .card h2,
body[data-theme="dark"] .card h3,
body[data-theme="dark"] .kpi-value,
body[data-theme="dark"] .stat-value,
body[data-theme="dark"] .metric-value,
body[data-theme="dark"] .timeline-title,
body[data-theme="dark"] .report-title,
body[data-theme="dark"] .quick-title,
body[data-theme="dark"] .settings-title,
body[data-theme="dark"] .mini-title,
body[data-theme="dark"] .user-name,
body[data-theme="dark"] .user-role,
body[data-theme="dark"] .dropdown-title,
body[data-theme="dark"] .pill,
body[data-theme="dark"] .status,
body[data-theme="dark"] .priority,
body[data-theme="dark"] .chip,
body[data-theme="dark"] .message-title,
body[data-theme="dark"] .auth-card,
body[data-theme="dark"] .auth-hero,
body[data-theme="dark"] .auth-brand,
body[data-theme="dark"] .auth-tabs,
body[data-theme="dark"] .tab-btn,
body[data-theme="dark"] .hero-value,
body[data-theme="dark"] .hero-actions,
body[data-theme="dark"] .auth-footer,
body[data-theme="dark"] .link,
body[data-theme="dark"] .table,
body[data-theme="dark"] .table th,
body[data-theme="dark"] .table td {
  color: var(--text);
}

body[data-theme="dark"] .sidebar-brand,
body[data-theme="dark"] .brand-title,
body[data-theme="dark"] .nav-link,
body[data-theme="dark"] .submenu-link,
body[data-theme="dark"] .topbar i,
body[data-theme="dark"] .btn i,
body[data-theme="dark"] .btn-icon i,
body[data-theme="dark"] .kpi-icon i,
body[data-theme="dark"] .quick-card i,
body[data-theme="dark"] .notice-list i,
body[data-theme="dark"] .dropdown-head,
body[data-theme="dark"] .dropdown-footer {
  color: var(--text);
}

body[data-theme="dark"] .avatar,
body[data-theme="dark"] .user-chip,
body[data-theme="dark"] .dropdown-user,
body[data-theme="dark"] .settings-item,
body[data-theme="dark"] .quick-card,
body[data-theme="dark"] .stat-card,
body[data-theme="dark"] .kpi-card,
body[data-theme="dark"] .kanban-card,
body[data-theme="dark"] .mini-card,
body[data-theme="dark"] .table-card,
body[data-theme="dark"] .card,
body[data-theme="dark"] .message,
body[data-theme="dark"] .timeline-item,
body[data-theme="dark"] .auth-card,
body[data-theme="dark"] .auth-hero {
  background: var(--surface);
}

body[data-theme="dark"] .auth-card .btn-outline,
body[data-theme="dark"] .tab-btn,
body[data-theme="dark"] .btn-theme,
body[data-theme="dark"] .btn-outline,
body[data-theme="dark"] .btn-icon {
  background: var(--surface-alt);
  color: var(--text);
  border-color: var(--border);
}

body[data-theme="dark"] .user-chip img,
body[data-theme="dark"] .dropdown-user img {
  border: 1px solid var(--border);
}

body[data-theme="dark"] .sidebar-nav .nav-link:hover,
body[data-theme="dark"] .sidebar-nav .nav-link.active,
body[data-theme="dark"] .submenu-link:hover,
body[data-theme="dark"] .submenu-link.active {
  background: rgba(77, 91, 255, 0.18);
  color: var(--text);
}

body[data-theme="dark"] .muted,
body[data-theme="dark"] .brand-subtitle,
body[data-theme="dark"] .kpi-label,
body[data-theme="dark"] .metric-label,
body[data-theme="dark"] .time,
body[data-theme="dark"] .chip,
body[data-theme="dark"] .stat-label,
body[data-theme="dark"] .stat-note,
body[data-theme="dark"] .calendar-header,
body[data-theme="dark"] .map-legend,
body[data-theme="dark"] .heatmap-legend,
body[data-theme="dark"] .settings-title,
body[data-theme="dark"] .notice-list {
  color: var(--muted);
}

body[data-theme="dark"] .card,
body[data-theme="dark"] .kpi-card,
body[data-theme="dark"] .quick-card,
body[data-theme="dark"] .kanban-card,
body[data-theme="dark"] .settings-item,
body[data-theme="dark"] .mini-card,
body[data-theme="dark"] .table-card,
body[data-theme="dark"] .message,
body[data-theme="dark"] .timeline-item {
  border-color: var(--border);
}

body[data-theme="dark"] .card.glass {
  background: rgba(20, 26, 43, 0.72);
}

body[data-theme="dark"] .progress-ring {
  background: conic-gradient(var(--accent) calc(var(--percent) * 1%), var(--surface-alt) 0);
}

body[data-theme="dark"] .heat-cell {
  background: rgba(245, 247, 255, 0.08);
}

body[data-theme="dark"] .calendar-grid span {
  background: var(--surface-alt);
  color: var(--text);
}

body[data-theme="dark"] .map-card .map-surface {
  border-color: var(--border);
}

body[data-theme="dark"] .avatar {
  background: var(--surface-alt);
  color: var(--text);
  border: 1px solid var(--border);
}

body[data-theme="dark"] .message {
  border-bottom-color: var(--border);
}

.btn-theme span {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.badge-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--accent-3);
  border-radius: 50%;
  top: 10px;
  right: 12px;
}

.badge-pill {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--accent);
  color: #fff;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 0.7rem;
}

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

.kpi-card {
  background: var(--surface);
  border-radius: 16px;
  padding: 18px;
  display: flex;
  gap: 14px;
  align-items: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform 0.2s ease;
}

.kpi-card:hover {
  transform: translateY(-4px);
}

.kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 1.2rem;
}

.bg-coral {
  background: linear-gradient(135deg, #f97316, #fcd34d);
}

.bg-violet {
  background: linear-gradient(135deg, #0ea5a4, #5eead4);
}

.bg-mint {
  background: linear-gradient(135deg, #22c55e, #86efac);
}

.bg-sun {
  background: linear-gradient(135deg, #fb7185, #fda4af);
}

.kpi-label {
  font-size: 0.85rem;
  color: var(--muted);
}

.kpi-value {
  font-size: 1.4rem;
  font-weight: 700;
}

.kpi-trend {
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.kpi-trend.up {
  color: var(--accent);
}

.kpi-trend.down {
  color: var(--accent-3);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.card {
  background: var(--surface);
  border-radius: 18px;
  padding: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.card canvas {
  width: 100% !important;
  height: auto !important;
  display: block;
}

.chart-wrap {
  width: 100%;
  height: 220px;
  position: relative;
}

.chart-canvas {
  width: 100% !important;
  height: 100% !important;
  max-width: 100%;
  display: block;
}

.reports-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 20px;
  align-items: stretch;
}

.reports-hero__content {
  background: var(--surface);
  border-radius: 24px;
  padding: 28px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
}

.reports-hero__tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(14, 165, 164, 0.12);
  color: var(--accent);
  font-weight: 600;
  width: fit-content;
}

.reports-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.reports-hero__stats {
  display: grid;
  gap: 14px;
}

.stat-tile {
  background: var(--surface);
  border-radius: 18px;
  padding: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: grid;
  gap: 6px;
}

.stat-label {
  font-size: 0.85rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-note {
  font-size: 0.85rem;
  color: var(--muted);
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.report-grid--wide {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.spotlight-card {
  grid-column: span 2;
  display: grid;
  gap: 14px;
}

.spotlight-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 12px;
  border-radius: 16px;
  background: var(--surface-alt);
}

.chart-card {
  display: grid;
  gap: 8px;
}

.report-table .card-head {
  align-items: flex-start;
}

.card.glass {
  background: var(--glass);
  backdrop-filter: blur(14px);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.chip {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--muted);
  font-size: 0.75rem;
}

.speedometer {
  display: grid;
  gap: 18px;
}

.dial {
  width: 200px;
  height: 100px;
  border-radius: 200px 200px 0 0;
  position: relative;
  margin: 0 auto;
  background: conic-gradient(var(--accent) calc(var(--value) * 1%),
      var(--accent-2) calc(var(--value) * 1%),
      var(--border) 0);
  --value: 72;
  display: grid;
  place-items: center;
}

.needle {
  position: absolute;
  width: 4px;
  height: 90px;
  background: var(--text);
  bottom: -5px;
  left: 50%;
  transform-origin: bottom center;
  transform: translateX(-50%) rotate(calc((var(--value) * 1.8deg) - 90deg));
  border-radius: 999px;
}

.dial-center {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface);
  padding: 6px 14px;
  border-radius: 999px;
  font-weight: 700;
  box-shadow: var(--shadow);
}

.dial-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  text-align: center;
}

.metric-label {
  font-size: 0.75rem;
  color: var(--muted);
}

.metric-value {
  font-weight: 600;
}

.table-card {
  max-width: 100%;
}

.table-card table {
  margin: 0;
}

.table-responsive {
  width: 100%;
  max-width: 100vw;
  overflow-x: auto;
  display: block;
  position: relative;
  -webkit-overflow-scrolling: touch;
}

.table-responsive table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

@media (max-width: 900px) {
  .table-responsive table {
    display: table;
    width: max-content;
  }
}

.table-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.table-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--muted);
}

.table-filter input {
  border: none;
  outline: none;
  background: transparent;
  color: var(--text);
  min-width: 180px;
}

.table-filter .table-clear {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--surface);
  color: var(--muted);
  display: grid;
  place-items: center;
}

.table-sort {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: transparent;
  color: inherit;
  font-weight: 600;
  padding: 0;
  cursor: pointer;
}

.table-sort i {
  font-size: 0.85rem;
  color: var(--muted);
}

.table-sort[data-sort-dir="asc"] i,
.table-sort[data-sort-dir="desc"] i {
  color: var(--accent);
}

@media (max-width: 600px) {
  .logo-badge {
    display: none;
  }

  .table-card .table-responsive {
    overflow-x: auto;
    width: 100%;
    display: block;
  }

  .table-card table {
    max-width: 100%;
    display: table;
    width: max-content;
  }

}

.status {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.status.success {
  background: rgba(34, 197, 94, 0.16);
  color: #22c55e;
}

.status.warning {
  background: rgba(249, 115, 22, 0.2);
  color: #f97316;
}

.priority {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.priority.high {
  background: rgba(239, 68, 68, 0.18);
  color: var(--accent-3);
}

.priority.medium {
  background: rgba(14, 165, 164, 0.18);
  color: var(--accent);
}

.priority.low {
  background: rgba(34, 197, 94, 0.18);
  color: #22c55e;
}

.report-title {
  font-weight: 600;
}

.insight {
  position: relative;
  overflow: hidden;
}

.insight-tag {
  position: absolute;
  top: 18px;
  right: 18px;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  padding: 4px 8px;
  border-radius: 999px;
}

.message {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.message-title {
  font-weight: 600;
}

.message:last-child {
  border-bottom: none;
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--surface-alt);
  display: grid;
  place-items: center;
  font-weight: 600;
}

.time {
  font-size: 0.75rem;
  color: var(--muted);
}

.notice-list {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.notice-list i {
  color: var(--accent);
  margin-right: 8px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-grid .full {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.auth {
  background: var(--surface-alt);
}

.footer {
  text-align: center;
  color: var(--muted);
  margin-top: auto;
  padding-top: 32px;
}

.stat-card {
  display: grid;
  gap: 12px;
}

.stat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-title {
  font-weight: 600;
}

.stat-value {
  font-size: 1.6rem;
  font-weight: 700;
}

.progress-ring {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: conic-gradient(var(--accent) calc(var(--percent) * 1%), var(--surface-alt) 0);
  display: grid;
  place-items: center;
  margin: 0 auto;
  font-weight: 700;
  color: var(--text);
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
}

.quick-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  text-decoration: none;
  color: var(--text);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease;
}

.quick-card:hover {
  transform: translateY(-4px);
  color: var(--accent);
}

.quick-card i {
  font-size: 1.4rem;
  color: var(--accent);
}

.quick-title {
  font-weight: 600;
}

.timeline {
  display: grid;
  gap: 16px;
}

.timeline-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.timeline-item:last-child {
  border-bottom: none;
}

.timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px rgba(14, 165, 164, 0.5);
}

.timeline-title {
  font-weight: 600;
}

.pill {
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--surface-alt);
  font-size: 0.75rem;
  font-weight: 600;
}

.pill.warning {
  background: rgba(249, 115, 22, 0.2);
  color: #f97316;
}

.mini-card {
  display: grid;
  gap: 10px;
}

.mini-title {
  font-weight: 600;
}

.settings-list {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
}

.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--surface-alt);
}

.settings-title {
  font-weight: 600;
}

.map-card .map-surface {
  position: relative;
  height: 220px;
  border-radius: 18px;
  background: radial-gradient(circle at 20% 30%, rgba(14, 165, 164, 0.18), transparent 45%),
    radial-gradient(circle at 70% 45%, rgba(245, 158, 11, 0.18), transparent 50%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.06), rgba(15, 23, 42, 0.02));
  border: 1px dashed var(--border);
  overflow: hidden;
}

.map-pin {
  position: absolute;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(14, 165, 164, 0.45);
  left: var(--x);
  top: var(--y);
}

.map-legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 12px;
  color: var(--muted);
  font-size: 0.85rem;
}

.heatmap {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  padding: 8px;
}

.heat-cell {
  width: 100%;
  padding-top: 100%;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.06);
}

.heat-0 {
  background: rgba(14, 165, 164, 0.08);
}

.heat-1 {
  background: rgba(14, 165, 164, 0.18);
}

.heat-2 {
  background: rgba(14, 165, 164, 0.32);
}

.heat-3 {
  background: rgba(14, 165, 164, 0.48);
}

.heat-4 {
  background: rgba(14, 165, 164, 0.7);
}

.heatmap-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
  color: var(--muted);
  font-size: 0.75rem;
}

.heatmap-legend .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.kanban {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.kanban-column {
  background: var(--surface-alt);
  border-radius: 14px;
  padding: 12px;
  display: grid;
  gap: 10px;
}

.kanban-title {
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
}

.kanban-card {
  background: var(--surface);
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  font-size: 0.9rem;
}

.calendar {
  display: grid;
  gap: 10px;
}

.calendar-header,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
  text-align: center;
  font-size: 0.8rem;
}

.calendar-header {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.calendar-grid span {
  padding: 8px 0;
  border-radius: 10px;
  background: var(--surface-alt);
}

.calendar-grid span.active {
  background: var(--accent);
  color: #fff;
}

.calendar-grid span.event {
  border: 1px solid var(--accent);
}

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

.auth-page {
  min-height: 100vh;
  background: var(--gradient);
  padding: 28px 32px 48px;
}

.auth-standalone {
  min-height: 100vh;
  background: var(--gradient);
  display: grid;
  place-items: center;
  padding: 28px 20px 48px;
  position: relative;
  overflow: hidden;
}

.auth-center {
  width: min(450px, 100%);
}

.auth-standalone::before,
.auth-standalone::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(14, 165, 164, 0.35), transparent 70%);
  filter: blur(20px);
  z-index: 0;
}

.auth-standalone::before {
  top: -120px;
  right: -140px;
}

.auth-standalone::after {
  bottom: -160px;
  left: -160px;
  background: radial-gradient(circle, rgba(245, 158, 11, 0.28), transparent 70%);
}

.auth-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
}

.auth-hero {
  background: var(--surface);
  border-radius: 24px;
  padding: 36px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.hero-value {
  font-size: 1.4rem;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.auth-card {
  background: var(--surface);
  border-radius: 28px;
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.tab-btn {
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--text);
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tab-btn.active {
  background: var(--accent);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 12px 24px rgba(14, 165, 164, 0.25);
}

.auth-viewport {
  width: 100%;
  overflow: hidden;
}

.auth-panels {
  display: flex;
  width: 200%;
  transition: transform 0.5s ease;
}

.auth-card.show-signup .auth-panels,
#authShell.show-signup .auth-panels {
  transform: translateX(-50%);
}

.auth-panel {
  flex: 0 0 50%;
  min-width: 50%;
  padding: 12px 8px 0;
}

.panel-head {
  margin-bottom: 16px;
}

.auth-methods {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
}

.auth-methods.auth-icons {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.icon-only {
  width: 100%;
  height: 48px;
  justify-content: center;
  font-size: 1.2rem;
}

.icon-only i {
  margin: 0;
}

.auth-card .btn-outline {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
}

.divider {
  position: relative;
  text-align: center;
  margin: 16px 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.divider::before,
.divider::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 35%;
  height: 1px;
  background: var(--border);
}

.divider::before {
  left: 0;
}

.divider::after {
  right: 0;
}

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.link-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.otp {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.auth-footer {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  margin-top: 18px;
}

@media (max-width: 1100px) {
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .spotlight-card {
    grid-column: span 2;
  }
}

@media (max-width: 900px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100%;
    width: 280px;
    transform: translateX(-100%);
    box-shadow: var(--shadow);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .content {
    padding: 24px;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  .reports-hero {
    grid-template-columns: 1fr;
  }

  .report-grid {
    grid-template-columns: 1fr;
  }

  .report-grid--wide {
    grid-template-columns: 1fr;
  }

  .spotlight-card {
    grid-column: auto;
  }
}

@media (max-width: 600px) {
  .chart-canvas {
    height: 100% !important;
  }

  .chart-wrap {
    height: 180px;
  }

  .reports-hero__content {
    padding: 20px;
  }

  .spotlight-metrics {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
  }

  #sidebarToggle {
    justify-self: start;
  }

  .search-bar {
    border-radius: 12px;
    padding: 10px 12px;
    width: 100%;
    min-width: 0;
  }

  .topbar-actions {
    justify-content: flex-start;
    width: auto;
    flex-wrap: nowrap;
    gap: 8px;
  }

  .user-chip {
    width: auto;
    justify-content: center;
    flex: 0 0 auto;
    padding: 4px;
  }

  .user-chip div {
    display: none;
  }

  .user-chip img {
    width: 34px;
    height: 34px;
  }

  .dropdown-toggle::after {
    content: none !important;
  }

  .dropdown-menu {
    left: auto;
    right: 0;
    min-width: 220px;
  }

  .btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  .action-group {
    width: 100%;
  }

  .action-group .btn {
    flex: 1 1 auto;
    justify-content: center;
  }

  .card {
    padding: 16px;
  }

  .section-head h1 {
    font-size: 1.7rem;
  }

  .section-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .auth-page {
    padding: 20px;
  }

  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-hero {
    order: 2;
  }

  .hero-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .auth-footer {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Centered auth refinements */
.auth-card {
  text-align: center;
}

.auth-brand.centered {
  justify-content: center;
  text-align: left;
  margin-bottom: 12px;
}

.panel-head {
  text-align: center;
}

.auth-card .form-grid {
  text-align: left;
  grid-template-columns: 1fr;
}

.auth-card .form-grid .full,
.auth-card .form-grid>div {
  width: 100%;
}

.auth-card .auth-methods,
.auth-card .otp {
  justify-items: center;
}

.auth-card {
  max-width: 100%;
}

@media (max-width: 520px) {
  .auth-methods.auth-icons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* --- Custom Date Picker (Flatpickr) --- */
.flatpickr-calendar {
  background: var(--surface) !important;
  border: 1px solid var(--border) !important;
  box-shadow: var(--shadow) !important;
  border-radius: 24px !important;
  font-family: 'Manrope', sans-serif !important;
  padding: 16px 12px !important;
  width: 335px !important;
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-sizing: border-box !important;
}

.flatpickr-innerContainer {
  width: 100% !important;
}

.flatpickr-days {
  width: 100% !important;
}

.dayContainer {
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
}


.flatpickr-day {
  border-radius: 14px !important;
  color: var(--text) !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  height: 38px !important;
  line-height: 38px !important;
  font-weight: 500;
  margin: 2px 0 !important;
}

/* Fade colors for dates other than current month */
.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
  color: var(--muted) !important;
  opacity: 0.4;
}

.flatpickr-day:hover {
  background: var(--surface-alt) !important;
  color: var(--accent) !important;
  transform: translateY(-1px);
}

.flatpickr-day.today {
  border-color: var(--accent) !important;
  color: var(--accent) !important;
  background: var(--accent-subtle, rgba(99, 102, 241, 0.1)) !important;
}

.flatpickr-day.selected {
  background: var(--accent) !important;
  color: #fff !important;
  border-color: var(--accent) !important;
  box-shadow: 0 8px 15px rgba(99, 102, 241, 0.4) !important;
}

.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover {
  color: var(--muted) !important;
  opacity: 0.2;
  cursor: not-allowed !important;
  transform: none !important;
}

.flatpickr-months {
  padding: 0 8px 12px 8px !important;
}

.flatpickr-months .flatpickr-month {
  color: var(--text) !important;
  fill: var(--text) !important;
  height: 48px !important;
}

.flatpickr-current-month {
  font-weight: 700 !important;
  font-size: 1.1rem !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
  font-weight: 700 !important;
  padding: 4px 10px !important;
  border-radius: 10px !important;
  background: transparent !important;
  border: none !important;
  cursor: pointer;
}

.flatpickr-current-month .flatpickr-monthDropdown-months:hover {
  background: var(--surface-alt) !important;
}

.flatpickr-weekday {
  color: var(--muted) !important;
  font-weight: 700 !important;
  font-size: 0.75rem !important;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding-bottom: 8px !important;
}

.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
  background: var(--surface-alt) !important;
  border-radius: 12px !important;
  width: 36px !important;
  height: 36px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  top: 10px !important;
  transition: all 0.2s ease !important;
  padding: 0 !important;
}

.flatpickr-months .flatpickr-prev-month {
  left: 12px !important;
}

.flatpickr-months .flatpickr-next-month {
  right: 12px !important;
}

.flatpickr-months .flatpickr-prev-month:hover,
.flatpickr-months .flatpickr-next-month:hover {
  background: var(--accent) !important;
}

.flatpickr-months .flatpickr-prev-month:hover svg,
.flatpickr-months .flatpickr-next-month:hover svg {
  fill: #fff !important;
}

.flatpickr-calendar.arrowTop:before,
.flatpickr-calendar.arrowTop:after {
  border-bottom-color: var(--border) !important;
}

/* Dark mode adjustments for date picker */
body[data-theme="dark"] .flatpickr-calendar {
  background: var(--surface) !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7) !important;
  border-color: var(--border) !important;
}

body[data-theme="dark"] .flatpickr-day:hover {
  background: var(--surface-alt) !important;
}

body[data-theme="dark"] .flatpickr-current-month input.cur-year {
  color: var(--text) !important;
}

body[data-theme="dark"] .flatpickr-time {
  border-top-color: var(--border) !important;
}

body[data-theme="dark"] .flatpickr-time input {
  color: var(--text) !important;
}

body[data-theme="dark"] .flatpickr-am-pm {
  color: var(--text) !important;
}

/* Fix for date picker in modal */
.flatpickr-calendar.open {
  z-index: 99999 !important;
}

/* Form control with date picker icon on the left */
.flatpickr-custom-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236366f1' class='bi bi-calendar3' viewBox='0 0 16 16'%3E%3Cpath d='M14 0H2a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2zM1 3.857C1 3.384 1.448 3 2 3h12c.552 0 1 .384 1 .857v10.286c0 .473-.448.857-1 .857H2c-.552 0-1-.384-1-.857V3.857z'/%3E%3Cpath d='M6.5 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm-9 3a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm-9 3a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2zm3 0a1 1 0 1 0 0-2 1 1 0 0 0 0 2z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: left 1rem center !important;
  background-size: 1.1rem !important;
  padding-left: 3rem !important;
  cursor: pointer !important;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  display: none !important;
}

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