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

:root {
  --brand-25: #f2f7ff;
  --brand-50: #ecf3ff;
  --brand-100: #dde9ff;
  --brand-200: #c2d6ff;
  --brand-300: #9cb9ff;
  --brand-400: #7592ff;
  --brand-500: #465fff;
  --brand-600: #3641f5;
  --brand-700: #2a31d8;
  --brand-800: #252dae;
  --brand-900: #262e89;
  --brand-950: #161950;

  --slate-25: #f8fafc;
  --slate-50: #f1f5f9;
  --slate-100: #e2e8f0;
  --slate-200: #cbd5e1;
  --slate-300: #94a3b8;
  --slate-700: #334155;
  --slate-800: #1e293b;

  --success: #16a34a;
  --danger: #ef4444;
  --danger-600: #dc2626;
  --danger-700: #b91c1c;
  --warning: #f59e0b;
  --info: #0ea5e9;

  --shadow-card: 0 20px 40px rgba(22, 25, 80, 0.16);
  --shadow-soft: 0 10px 25px rgba(22, 25, 80, 0.1);
  --radius-lg: 18px;
}

* {
  font-family: "Outfit", "Inter", system-ui, -apple-system, sans-serif;
  box-sizing: border-box;
}

body {
  background: radial-gradient(circle at 15% 20%, rgba(70, 95, 255, 0.12), transparent 28%),
    radial-gradient(circle at 85% 10%, rgba(42, 49, 216, 0.12), transparent 22%),
    linear-gradient(165deg, #f6f8fc 0%, #eef2fa 45%, #e8edfb 100%);
  color: var(--slate-800);
  min-height: 100vh;
  overscroll-behavior-y: none;
  -webkit-tap-highlight-color: transparent;
}

a {
  color: var(--brand-700);
  text-decoration: none;
}

a:hover {
  color: var(--brand-600);
}

.app-shell {
  min-height: 100vh;
}

.sidebar-panel {
  background: #0b1021;
  color: #e7ecfb;
  box-shadow: var(--shadow-soft);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

/* Ensure sidebar is hidden by default on mobile */
@media (max-width: 1023px) {
  /* Ensure main content area is visible and full width */
  .flex-1.flex.flex-col.min-h-screen {
    position: relative;
    z-index: 1;
  }
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.logo-box,
.sidebar-brand .logo-box {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 12px 30px rgba(70, 95, 255, 0.35);
}

.sidebar-brand .brand-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.sidebar-nav {
  padding: 18px 14px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  color: #c8d5f3;
  font-weight: 600;
  transition: all 0.18s ease;
}

.sidebar-link svg {
  width: 20px;
  height: 20px;
  color: #9bb4ff;
}

.sidebar-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.sidebar-link.active {
  color: #fff;
  background: linear-gradient(120deg, rgba(70, 95, 255, 0.18), rgba(54, 65, 245, 0.2));
  border: 1px solid rgba(70, 95, 255, 0.6);
  box-shadow: 0 10px 26px rgba(70, 95, 255, 0.2);
}

.sidebar-accordion {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-toggle {
  justify-content: space-between;
  width: 100%;
  border: none;
  background: transparent;
  cursor: pointer;
}

.sidebar-chevron {
  margin-left: auto;
  font-size: 0.9rem;
  color: #9bb4ff;
  transition: transform 0.18s ease;
}

.sidebar-subnav {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding-left: 12px;
  margin-top: 4px;
  border-left: 1px dashed rgba(255, 255, 255, 0.18);
}

.sidebar-subnav.open {
  display: flex;
}

.sidebar-sublink {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  color: #c8d5f3;
  font-weight: 600;
  transition: all 0.18s ease;
}

.sidebar-sublink:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.sidebar-sublink.active {
  color: #fff;
  background: linear-gradient(120deg, rgba(70, 95, 255, 0.18), rgba(54, 65, 245, 0.2));
  border: 1px solid rgba(70, 95, 255, 0.6);
  box-shadow: 0 10px 26px rgba(70, 95, 255, 0.2);
}

.sidebar-toggle[aria-expanded="true"] .sidebar-chevron {
  transform: rotate(180deg);
}

.sidebar-footer {
  padding: 14px 16px 18px;
  margin: 18px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #dfe4f3;
  box-shadow: 0 10px 25px rgba(22, 25, 80, 0.08);
}

.topbar .user-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid #e5e9f5;
  background: linear-gradient(120deg, #fff, #f5f7ff);
  box-shadow: 0 8px 18px rgba(22, 25, 80, 0.07);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
}

.badge-light {
  color: var(--slate-700);
  background: var(--brand-25);
  border: 1px solid #dfe4f6;
}

.badge-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
}

.badge-secondary {
  color: #fff;
  background: linear-gradient(135deg, #64748b, #0f172a);
}

.badge-success {
  color: #fff;
  background: linear-gradient(135deg, var(--success), #0f9b42);
}

.badge-danger {
  color: #fff;
  background: linear-gradient(135deg, var(--danger), var(--danger-700));
}

.badge-warning {
  color: #fff;
  background: linear-gradient(135deg, #fbbf24, #f97316);
}

.badge-info {
  color: #fff;
  background: linear-gradient(135deg, #22c55e, #10b981);
}

.badge-secondary,
.badge-success,
.badge-warning,
.badge-info,
.badge-primary,
.badge-light,
.badge-danger {
  box-shadow: 0 12px 30px rgba(16, 24, 40, 0.1);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  border-radius: 12px;
  padding: 10px 16px;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.btn-sm {
  padding: 8px 12px;
  font-size: 0.9rem;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  box-shadow: 0 12px 25px rgba(70, 95, 255, 0.28);
}

.btn-primary:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--brand-600), var(--brand-700));
  transform: translateY(-1px);
}

.btn-secondary {
  color: var(--brand-800);
  background: #eef2ff;
  border-color: #d7ddff;
}

.btn-secondary:hover {
  color: var(--brand-900);
  border-color: var(--brand-300);
}

.btn-light {
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e5e9f5;
}

.btn-light:hover {
  background: #eef2f7;
  color: #0f172a;
}

.btn-outline {
  color: var(--brand-700);
  background: transparent;
  border-color: #d6def7;
}

.btn-outline:hover {
  background: #eef2ff;
}

.btn-danger {
  color: #fff;
  background: linear-gradient(135deg, #f87171, #ef4444);
  box-shadow: 0 12px 25px rgba(239, 68, 68, 0.25);
}

.btn-danger:hover {
  background: linear-gradient(135deg, #ef4444, #dc2626);
}

.btn-link {
  background: transparent;
  border: none;
  color: var(--brand-700);
  padding: 4px 8px;
  font-weight: 700;
}

.btn-link:hover {
  color: var(--brand-900);
  text-decoration: underline;
}

.btn-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.card {
  background: #fff;
  border: 1px solid #e5e9f5;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

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

.shadow-soft {
  box-shadow: var(--shadow-soft);
}

.card-header {
  padding: 18px 22px;
  border-bottom: 1px solid #e5e9f5;
  background: linear-gradient(120deg, rgba(70, 95, 255, 0.08), rgba(236, 243, 255, 0.6));
}

.card-body {
  padding: 22px;
}

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

.stat-card {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid #e5e9f5;
  background: #f8fafc;
  box-shadow: var(--shadow-soft);
}

.stat-card .label {
  color: var(--slate-700);
  font-weight: 600;
  font-size: 0.9rem;
}

.stat-card .value {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--brand-800);
}

.stat-card .hint {
  color: #6b7280;
  font-size: 0.85rem;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #eef2ff;
  color: var(--brand-700);
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(70, 95, 255, 0.12);
}

.modern-form label {
  font-weight: 700;
  color: var(--slate-800);
}

.form-control,
select,
textarea,
input {
  border-radius: 12px;
  border: 1px solid #dfe4f3;
  padding: 12px 14px;
  width: 100%;
  background: #f8fafc;
  transition: all 0.12s ease;
}

.form-control:focus,
select:focus,
textarea:focus,
input:focus {
  outline: none;
  border-color: var(--brand-400);
  box-shadow: 0 0 0 4px rgba(70, 95, 255, 0.18);
  background: #fff;
}

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

.reminder-list {
  display: grid;
  gap: 12px;
}

.reminder-row {
  display: grid;
  grid-template-columns: minmax(160px, 220px) 1fr auto;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.reminder-actions {
  display: flex;
  justify-content: flex-end;
}

.reminder-list .btn {
  width: 100%;
}

/* ====================================
   MOBILE RESPONSIVE STYLES
   ==================================== */

/* Small devices (phones, less than 640px) */
@media (max-width: 640px) {
  /* Topbar responsive */
  .topbar {
    padding: 12px 16px;
  }

  .topbar .text-xl {
    font-size: 1rem;
  }

  .topbar .user-chip {
    padding: 6px 8px;
    gap: 6px;
  }

  .topbar .user-chip .leading-tight {
    display: none;
  }

  .avatar-circle {
    width: 32px;
    height: 32px;
    font-size: 0.875rem;
  }

  /* Main content responsive */
  main {
    padding: 16px !important;
  }

  main h1 {
    font-size: 1.5rem !important;
  }

  main .text-sm {
    font-size: 0.8rem;
  }

  /* Button groups responsive */
  .flex.gap-2 {
    flex-direction: column;
    width: 100%;
  }

  .flex.gap-2 .btn {
    width: 100%;
    justify-content: center;
  }

  /* Stats grid responsive - home page cards */
  .grid.gap-4 {
    grid-template-columns: 1fr !important;
  }

  .stat-card .value {
    font-size: 1.2rem;
  }

  /* Card body responsive */
  .card .card-body {
    overflow-x: visible;
  }

  /* Card responsive */
  .card-header {
    padding: 14px 16px;
  }

  .card-body {
    padding: 16px;
  }

  /* Form responsive */
  .form-actions {
    flex-direction: column;
  }

  .form-actions .btn {
    width: 100%;
  }

  /* Reminder list responsive */
  .reminder-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .reminder-actions {
    justify-content: flex-start;
  }

  .reminder-list .btn {
    font-size: 0.85rem;
    padding: 8px 10px;
  }

  /* Table responsive */
  .table thead th {
    font-size: 0.7rem;
    padding: 8px 10px;
  }

  .table tbody td {
    font-size: 0.85rem;
    padding: 8px 10px;
  }

  /* Hide some table columns on mobile */
  .table .d-none-mobile {
    display: none;
  }

  /* Sidebar adjustments */
  .sidebar-panel {
    width: 280px;
  }

  .sidebar-footer {
    font-size: 0.85rem;
  }

  /* Hero pill responsive */
  .hero-pill {
    font-size: 0.85rem;
    padding: 6px 10px;
  }

  /* Badge responsive */
  .badge {
    font-size: 0.75rem;
    padding: 4px 8px;
  }

  /* Note card responsive */
  .note-card {
    padding: 12px;
  }

  .note-text {
    font-size: 0.9rem;
  }

  /* File row responsive */
  .file-row {
    padding: 10px 12px;
  }

  /* Upload card responsive */
  .upload-card {
    padding: 12px;
  }
}

/* Medium devices (tablets, 640px to 768px) */
@media (max-width: 768px) {
  .reminder-row {
    grid-template-columns: 1fr;
  }

  .reminder-actions {
    justify-content: flex-start;
  }

  /* Stats grid for tablets */
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Topbar for tablets */
  .topbar .user-chip .leading-tight {
    display: block;
  }

  /* Button groups for tablets */
  .flex.gap-2 {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .flex.gap-2 .btn {
    width: auto;
    flex: 1 1 auto;
  }
}

/* Landscape phone orientation fixes */
@media (max-width: 768px) and (orientation: landscape) {
  .sidebar-panel {
    width: 240px;
  }

  .sidebar-nav {
    padding: 12px 10px;
  }

  .sidebar-link {
    padding: 8px 10px;
    font-size: 0.9rem;
  }

  .sidebar-footer {
    display: none;
  }
}

/* Ensure touch targets are large enough */
@media (max-width: 768px) {
  .btn,
  .sidebar-link,
  .tab-link,
  a[class*="btn"] {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  /* Form inputs touch friendly */
  .form-control,
  select,
  textarea,
  input {
    min-height: 44px;
    font-size: 16px; /* Prevents zoom on iOS */
  }

  /* Checkbox touch target */
  .form-check {
    min-height: 44px;
  }
}

/* Fix overflow issues on mobile */
@media (max-width: 768px) {
  body {
    overflow-x: hidden;
  }

  .table-responsive {
    -webkit-overflow-scrolling: touch;
  }

  /* Prevent horizontal scroll */
  .row {
    margin-left: 0;
    margin-right: 0;
  }

  .row > [class*="col"] {
    padding-left: 4px;
    padding-right: 4px;
  }
}

.modern-confirm {
  border-radius: 18px !important;
  box-shadow: var(--shadow-card) !important;
  border: 1px solid #e5e9f5 !important;
  padding: 1.5rem !important;
}

.modern-confirm .swal2-title {
  color: var(--text);
  font-weight: 800;
}

.modern-confirm .swal2-html-container {
  color: var(--muted);
  font-size: 0.95rem;
}

.modern-confirm .swal2-actions {
  gap: 0.65rem;
  width: 100%;
  justify-content: flex-end;
}

.flatpickr-calendar {
  border-radius: 14px !important;
  box-shadow: var(--shadow-card) !important;
  border: 1px solid #e5e9f5 !important;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700)) !important;
  color: #fff !important;
  border: none !important;
}

.flatpickr-day:hover {
  background: rgba(70, 95, 255, 0.12) !important;
}

.flatpickr-time input {
  color: var(--text);
  font-weight: 700;
}

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

.table thead {
  background: #f1f5fb;
  color: var(--slate-700);
}

.table thead th {
  text-transform: uppercase;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  font-weight: 800;
  padding: 12px 14px;
  border-bottom: 1px solid #e5e9f5;
  text-align: left;
}

.table thead th.text-right {
  text-align: right;
}

.table tbody tr {
  border-bottom: 1px solid #eef2f7;
  transition: background 0.12s ease;
}

.table tbody tr:hover {
  background: #f8fbff;
}

.table tbody td {
  padding: 12px 14px;
  font-weight: 500;
  color: #1f2937;
  text-align: left;
}

.table tbody td.text-right {
  text-align: right;
}

.table th,
.table td {
  white-space: normal;
  word-break: break-word;
}

.table .actions-cell {
  white-space: nowrap;
}

.table .actions-cell .btn {
  white-space: nowrap;
}

.dataTable th,
.dataTable td {
  white-space: normal !important;
}

.dataTable .actions-cell {
  white-space: nowrap !important;
}

/* Table responsiveness: desktop no scroll, mobile allow scroll */
.table-responsive {
  overflow-x: visible;
}

@media (max-width: 992px) {
  .table-responsive {
    overflow-x: auto;
  }
}

@media (max-width: 640px) {
  .actions-cell .d-flex {
    flex-wrap: wrap;
    justify-content: flex-start;
  }
}

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

/* Keep data tables readable on small screens instead of squeezing to 100% */
@media (max-width: 1024px) {
  .table-responsive .table {
    min-width: 720px;
  }
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin-left: -8px;
  margin-right: -8px;
}

.row > [class*="col"] {
  padding-left: 8px;
  padding-right: 8px;
}

.col {
  flex: 1 0 0%;
}

.col-auto {
  flex: 0 0 auto;
}

.col-md-3,
.col-md-4,
.col-md-6,
.col-md-8,
.col-md-12 {
  width: 100%;
}

@media (min-width: 768px) {
  .col-md-3 {
    width: 25%;
  }
  .col-md-4 {
    width: 33.333%;
  }
  .col-md-6 {
    width: 50%;
  }
  .col-md-8 {
    width: 66.666%;
  }
  .col-md-12 {
    width: 100%;
  }
}

@media (min-width: 992px) {
  .col-lg-6 {
    width: 50%;
  }
}

@media (min-width: 1200px) {
  .col-xl-3 {
    width: 25%;
  }
}

.d-flex {
  display: flex;
}

.d-inline {
  display: inline-block;
}

.d-none {
  display: none;
}

.hidden {
  display: none;
}

.justify-content-between {
  justify-content: space-between;
}

.align-items-center {
  align-items: center;
}

.align-items-start {
  align-items: flex-start;
}

.flex-wrap {
  flex-wrap: wrap;
}

.text-muted {
  color: #6b7280;
}

.text-secondary {
  color: #475569;
}

.text-danger {
  color: #ef4444;
}

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

.mb-0 {
  margin-bottom: 0;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-3 {
  margin-bottom: 0.75rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-5 {
  margin-bottom: 1.25rem;
}

.mt-2 {
  margin-top: 0.5rem;
}

.mt-4 {
  margin-top: 1rem;
}

.mt-6 {
  margin-top: 1.5rem;
}

.ml-auto {
  margin-left: auto;
}

.ml-2 {
  margin-left: 0.5rem;
}

.mr-3 {
  margin-right: 0.75rem;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-3 {
  gap: 0.75rem;
}

.w-full {
  width: 100%;
}

.font-weight-bold {
  font-weight: 700;
}

.small {
  font-size: 0.9rem;
}

.text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-unstyled {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.avatar-circle {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.5px;
  box-shadow: 0 10px 20px rgba(70, 95, 255, 0.35);
}

.tab-wrapper {
  display: flex;
  gap: 14px;
  border-bottom: 1px solid #e5e9f5;
}

.tab-link {
  padding: 12px 4px;
  font-weight: 700;
  color: #6b7280;
  border-bottom: 2px solid transparent;
  transition: all 0.12s ease;
}

.tab-link.active {
  color: var(--brand-700);
  border-color: var(--brand-500);
}

.note-card {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  background: #f8fafc;
  padding: 16px;
  margin-bottom: 12px;
}

.note-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.note-meta-time {
  display: block;
  color: #6b7280;
  font-size: 0.85rem;
  line-height: 1.3;
}

.note-text {
  white-space: pre-wrap;
  font-size: 0.97rem;
}

.file-row {
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 8px;
  background: #fff;
}

.upload-card {
  border: 1px dashed rgba(70, 95, 255, 0.6);
  background: linear-gradient(180deg, rgba(70, 95, 255, 0.04), rgba(70, 95, 255, 0.08));
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 16px;
}

.upload-zone {
  padding: 12px;
  border: 1px dashed rgba(15, 23, 42, 0.15);
  border-radius: 10px;
  background: #fff;
}

.dataTables_wrapper .dataTables_filter {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  float: none !important;
  width: 100%;
}

.dataTables_wrapper .dataTables_filter label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-weight: 600;
  color: var(--slate-700);
  width: 100%;
  max-width: 420px;
  position: relative;
}

.dataTables_wrapper .dataTables_filter input {
  border-radius: 14px;
  border: 1px solid #e3e8f5;
  padding: 12px 14px 12px 44px;
  width: 100%;
  max-width: 440px;
  min-width: 0;
  background: #f8fafc;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.05), 0 8px 16px rgba(22, 25, 80, 0.08);
  transition: all 0.15s ease;
}

.dataTables_wrapper .dataTables_filter label::before {
  content: "";
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23465fff' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='6'/%3E%3Cpath d='m15 15 4.5 4.5'/%3E%3C/svg%3E") center/contain no-repeat;
  opacity: 0.75;
  pointer-events: none;
}

.dataTables_wrapper .dataTables_filter input:focus {
  outline: none;
  border-color: var(--brand-400);
  box-shadow: 0 0 0 3px rgba(70, 95, 255, 0.15), 0 8px 16px rgba(22, 25, 80, 0.08);
  background-color: #fff;
}

.dataTables_wrapper .dataTables_filter input::placeholder {
  color: #94a3b8;
}

@media (max-width: 768px) {
  .dataTables_wrapper .dataTables_filter {
    justify-content: flex-start;
    gap: 8px;
  }

  .dataTables_wrapper .dataTables_filter label {
    width: 100%;
  }

  .dataTables_wrapper .dataTables_filter input {
    width: 100%;
    max-width: none;
  }
}

.table thead th.actions-cell {
  text-align: left !important;
}

.table tbody td.actions-cell {
  text-align: right;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
  border-radius: 10px !important;
  padding: 6px 12px !important;
  border: 1px solid #dfe4f3 !important;
  color: var(--brand-700) !important;
  background: #fff !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700)) !important;
  color: #fff !important;
  border-color: transparent !important;
}

.dt-buttons .dt-button {
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700)) !important;
  border: none !important;
  color: #fff !important;
  border-radius: 12px !important;
  padding: 8px 14px !important;
  font-weight: 700 !important;
  box-shadow: 0 10px 20px rgba(70, 95, 255, 0.2);
}

.dt-buttons .dt-button:hover {
  background: linear-gradient(135deg, var(--brand-600), var(--brand-700)) !important;
}

.table-empty {
  text-align: center;
  padding: 18px;
  color: #6b7280;
}

.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-check-input[type="checkbox"] {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 2px solid #dfe4f3;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.form-check-input[type="checkbox"]:checked {
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  border-color: var(--brand-500);
  box-shadow: 0 4px 12px rgba(70, 95, 255, 0.3);
}

.form-check-input[type="checkbox"]:focus {
  outline: none;
  border-color: var(--brand-400);
  box-shadow: 0 0 0 3px rgba(70, 95, 255, 0.15);
}

.form-check-label {
  font-weight: 600;
  color: var(--slate-700);
  cursor: pointer;
  user-select: none;
}

.text-gray {
  color: #6b7280;
}

/* FullCalendar layout tweaks */
.fc {
  font-family: "Outfit", "Inter", system-ui, -apple-system, sans-serif;
}

.fc .fc-toolbar {
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.fc .fc-toolbar-chunk {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.fc .fc-toolbar-title {
  font-weight: 800;
  color: #0f172a;
}

@media (max-width: 768px) {
  .fc .fc-toolbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .fc .fc-toolbar-chunk {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .fc .fc-toolbar-title {
    font-size: 1.05rem;
    line-height: 1.3;
  }

  .fc .fc-button-group {
    flex-wrap: wrap;
    gap: 0.4rem;
  }
}

/* Mobile menu specific enhancements */
@media (max-width: 1023px) {
  /* Ensure main content is visible */
  .flex-1.flex.flex-col {
    width: 100%;
    min-width: 0;
  }

  /* Prevent body scroll when menu is open */
  body.sidebar-open {
    overflow: hidden !important;
    position: fixed;
    width: 100%;
  }

  /* Improve sidebar shadow on mobile */
  .sidebar-panel {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
  }

  /* Smooth scrolling for sidebar content */
  .sidebar-nav {
    overflow-y: auto;
    max-height: calc(100vh - 200px);
  }

  /* Hamburger button enhancement */
  .btn.lg\:hidden {
    touch-action: manipulation;
    -webkit-user-select: none;
    user-select: none;
  }

  /* Ensure content is scrollable when sidebar is closed */
  body:not(.sidebar-open) {
    overflow-y: auto;
  }
}

/* Sidebar open state helpers */
.sidebar-overlay {
  opacity: 0;
}

body.sidebar-open .sidebar-overlay {
  opacity: 1;
}

.sidebar-panel {
  transition: transform 0.3s ease;
}

body.sidebar-open .sidebar-panel {
  transform: translateX(0) !important;
}

@media (min-width: 1024px) {
  .sidebar-overlay {
    display: none !important;
    opacity: 0 !important;
  }

  body.sidebar-open {
    overflow: auto;
    position: static;
    width: auto;
  }

  .sidebar-panel {
    transform: translateX(0) !important;
  }
}

/* Improve touch interactions */
@media (hover: none) and (pointer: coarse) {
  /* Remove hover effects on touch devices */
  .sidebar-link:hover {
    background: transparent;
  }

  .sidebar-link:active {
    background: rgba(255, 255, 255, 0.08);
  }

  .btn:hover {
    transform: none;
  }

  .btn:active {
    transform: scale(0.98);
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Safe area insets for notched devices */
@supports (padding: max(0px)) {
  .sidebar-panel {
    padding-left: max(0px, env(safe-area-inset-left));
  }

  .topbar {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }

  main {
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
  }
}

/* File upload zone with dashed border */
.border-dashed {
  border-style: dashed !important;
}
