:root {
  --purple-900: #B71C1C;
  --purple-700: #C62828;
  --purple-600: #D32F2F;
  --purple-100: #FFCDD2;
  --purple-50: #FFEBEE;

  --ink-900: #1E1B2E;
  --ink-600: #5B5770;
  --ink-400: #9490A6;

  --line: #E7E3F0;
  --bg: #F7F6FB;
  --card: #FFFFFF;

  --red: #EF4444;
  --red-bg: #FEF2F2;
  --amber: #F59E0B;
  --amber-bg: #FFFBEB;
  --green: #10B981;
  --green-bg: #ECFDF5;
  --overdue: #7F1D1D;

  --radius: 12px;
  --shadow: 0 1px 2px rgba(30,27,46,0.04), 0 8px 24px rgba(46,16,101,0.06);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  background: url('../images/user_bg.png') no-repeat center center fixed;
  background-size: cover;
  color: var(--ink-900);
}

a { text-decoration: none; color: inherit; }

.app-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  background: linear-gradient(145deg, #FCA5A5 0%, #EF4444 100%);
  border-right: 1px solid #EF4444;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  color: #FFFFFF;
}

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

.brand-mark {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--purple-600), var(--purple-900));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.brand-name { font-weight: 700; font-size: 16px; line-height: 1.3; color: #FFFFFF; }
.brand-sub { font-size: 12px; color: #FECACA; }

.nav-section-label {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #FECACA;
  margin: 4px 0 6px 10px;
  font-weight: 600;
}

.nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}
.nav-item:hover { background: rgba(255, 255, 255, 0.2); color: #FFFFFF; }
.nav-item.active { background: #FFFFFF; color: #DC2626; box-shadow: 0 4px 12px rgba(153,27,27,0.3); font-weight: 600; }

.entity-dot {
  width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex-shrink: 0;
}

/* Topbar */
.main-col { display: flex; flex-direction: column; min-height: 100vh; }

.topbar-banner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 32px;
  background: #EEEDF2;
  border-radius: 12px;
  margin: 20px 32px 20px;
  position: relative;
  overflow: hidden;
  background-image: 
    linear-gradient(to right, rgba(0,0,0,0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0,0,0,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}

.topbar-banner::before {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0; height: 60%;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 200' preserveAspectRatio='none'%3E%3Cpath d='M0,200 L0,150 L100,120 L200,160 L300,90 L400,140 L500,60 L600,110 L700,40 L800,80 L900,20 L1000,60 L1000,200 Z' fill='rgba(0,0,0,0.02)'/%3E%3Cpath d='M0,200 L0,170 L150,140 L250,180 L350,100 L450,150 L550,70 L650,130 L750,50 L850,100 L1000,40 L1000,200 Z' fill='rgba(0,0,0,0.03)'/%3E%3Cpath fill='none' stroke='rgba(0,0,0,0.06)' stroke-width='2' d='M0,150 L100,120 L200,160 L300,90 L400,140 L500,60 L600,110 L700,40 L800,80 L900,20 L1000,60'/%3E%3C/svg%3E") no-repeat bottom center;
  background-size: cover;
  pointer-events: none;
  z-index: 0;
}

.topbar-left {
  display: flex; align-items: center; gap: 16px;
  position: relative; z-index: 1;
}

.topbar-icon {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
}

.page-title { font-size: 24px; font-weight: 700; color: var(--ink-900); }
.page-subtitle { font-size: 14px; color: var(--ink-600); margin-top: 2px; }

.topbar-right-pill {
  display: flex; align-items: center; gap: 10px;
  background: var(--card);
  padding: 6px 12px 6px 8px;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  position: relative; 
  z-index: 100;
}

.avatar-small {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--purple-100); color: var(--purple-700);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 11px; overflow: hidden;
}
.avatar-small img { width: 100%; height: 100%; object-fit: cover; }
.avatar-fallback { display: inline-flex; }

.icon-btn-minimal {
  background: none; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding: 4px; border-radius: 50%; color: var(--ink-600);
}
.icon-btn-minimal:hover { background: var(--bg); }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: none;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  font-family: var(--font);
}
.btn-primary { background: linear-gradient(145deg, #FCA5A5 0%, #EF4444 100%); color: #fff; border: none; }
.btn-primary:hover { opacity: 0.9; }
.btn-secondary { background: var(--card); color: var(--ink-900); border: 1px solid var(--line); }
.btn-secondary:hover { background: var(--bg); }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-danger-outline { background: var(--red-bg); color: var(--red); border: 1px solid #FCA5A5; }

.icon-btn {
  width: 40px; height: 40px;
  border-radius: 9px;
  border: 1px solid var(--line);
  background: var(--card);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  position: relative;
}

.badge-count {
  position: absolute;
  top: -6px; right: -6px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px; height: 18px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
}

.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--purple-100); color: var(--purple-700);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
}

.content { padding: 0 32px 32px; flex: 1; }

.card {
  background: var(--card);
  border-radius: 12px;
  border: 1px solid var(--line);
  box-shadow: 0 4px 12px rgba(0,0,0,0.02);
  overflow-x: auto;
  margin-bottom: 24px;
}

.filter-bar {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 12px 16px;
  background: var(--card);
  border-radius: 12px;
  border: 1px solid var(--line);
  margin-bottom: 20px;
}

.pill {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 500;
  border: none;
  background: transparent;
  color: var(--ink-600);
  cursor: pointer;
  transition: all 0.2s;
}
.pill:hover { background: var(--bg); }
.pill.active { background: linear-gradient(145deg, #FCA5A5 0%, #EF4444 100%); color: #fff; box-shadow: 0 4px 12px rgba(153, 27, 27, 0.3); border: none; }

.filter-divider {
  width: 1px;
  height: 24px;
  background: var(--line);
  margin: 0 8px;
}

.search-input {
  flex: 1; min-width: 180px;
  padding: 8px 12px 8px 32px;
  border-radius: 6px;
  border: 1px solid var(--line);
  font-family: var(--font);
  font-size: 13.5px;
  background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239490A6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E") no-repeat 10px center;
}

table.report-table { width: 100%; border-collapse: collapse; }
.report-table th {
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-400);
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
}
.report-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  vertical-align: top;
}
.report-table tbody tr:nth-child(odd) {
  background-color: #F8F9FA;
}
.report-table tr:last-child td { border-bottom: none; }
.report-table th:first-child,
.report-table td:first-child { padding-left: 20px; }
.report-table th:last-child,
.report-table td:last-child { padding-right: 20px; }
.report-name { font-weight: 600; color: var(--ink-900); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.report-meta { color: var(--ink-400); font-size: 12.5px; margin-top: 2px; }

.status-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
}
.status-badge.pending { background: var(--red-bg); color: var(--red); }
.status-badge.in_progress { background: var(--amber-bg); color: var(--amber); }
.status-badge.revision { background: #FFEDD5; color: #C2410C; }
.status-badge.done { background: var(--green-bg); color: var(--green); }
.status-badge.overdue { background: #FEE2E2; color: var(--overdue); }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

select.status-select {
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  border-radius: 6px;
  border: none;
  padding: 4px 22px 4px 8px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 6px center;
}
span.status-select {
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  border-radius: 6px;
  border: none;
  padding: 4px 10px;
  display: inline-block;
  cursor: default;
  pointer-events: none;
  background-image: none !important;
}
.status-select.pending { background-color: var(--red-bg); color: var(--purple-700); }
.status-select.in_progress { background-color: var(--amber-bg); color: var(--amber); }
.status-select.revision { background-color: #FFEDD5; color: #C2410C; }
.status-select.done { background-color: var(--green-bg); color: var(--green); }
.status-select.overdue { background-color: #FEE2E2; color: #991B1B; }

.entity-tag {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; color: var(--ink-600);
}

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(30,27,46,0.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  padding: 24px;
}
.modal {
  background: var(--card);
  border-radius: 16px;
  width: 100%; max-width: 640px;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(46,16,101,0.25);
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 26px;
  border-bottom: 1px solid var(--line);
  background: var(--purple-50);
  border-radius: 16px 16px 0 0;
  flex-shrink: 0;
}
.modal > form {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}
.modal-header h2 { margin: 0; font-size: 18px; }
.modal-close { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--ink-400); }
.modal-body {
  padding: 24px 26px;
  overflow-y: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--ink-900); }
.form-input, select.form-input, textarea.form-input {
  width: 100%;
  padding: 10px 13px;
  border-radius: 9px;
  border: 1px solid var(--line);
  font-family: var(--font);
  font-size: 14px;
  background: var(--card);
}
.form-input:focus, select.form-input:focus { outline: 2px solid var(--purple-600); outline-offset: 1px; }
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 18px 26px;
  border-top: 1px solid var(--line);
  flex-shrink: 0;
  background: var(--card);
}

.auth-wrap {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: transparent;
  padding: 24px;
}
.auth-card {
  background: var(--card);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 40px;
  width: 100%; max-width: 420px;
}
.auth-card h1 { font-size: 22px; margin: 18px 0 6px; }
.auth-card .sub { color: var(--ink-400); font-size: 14px; margin-bottom: 24px; }
.auth-hint { font-size: 12.5px; color: var(--ink-400); margin-top: 6px; }
.auth-footer { text-align: center; margin-top: 20px; font-size: 13.5px; color: var(--ink-600); }
.auth-footer a { color: var(--purple-600); font-weight: 600; }

.alert { padding: 12px 16px; border-radius: 9px; font-size: 13.5px; margin-bottom: 14px; }
.alert-success { background: var(--green-bg); color: #047857; }
.alert-error { background: var(--red-bg); color: #B91C1C; }
.alert-warning { background: var(--amber-bg); color: #92400E; }
.alert-info { background: var(--purple-50); color: var(--purple-700); }

.errorlist { list-style: none; padding: 0; margin: 4px 0 0; color: var(--red); font-size: 12.5px; }

.calendar-legend { display: flex; gap: 18px; align-items: center; padding: 4px 20px 16px; flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-600); }
.legend-dot { width: 9px; height: 9px; border-radius: 50%; }

#calendar { padding: 10px 20px 24px; }

.fc { font-family: var(--font); }
.fc-toolbar-title { font-size: 18px !important; font-weight: 700; color: var(--ink-900); }
.fc-button-primary {
  background: linear-gradient(145deg, #FCA5A5 0%, #EF4444 100%) !important;
  border: none !important;
  color: #fff !important;
}
.fc-button-primary:hover { opacity: 0.9 !important; }

.fc-daygrid-event.status-pending, .fc-timegrid-event.status-pending { background: linear-gradient(145deg, #FCA5A5 0%, #EF4444 100%) !important; border: none !important; color: #fff !important; }
.fc-daygrid-day.fc-day-today { background: var(--purple-50) !important; }
.fc-event { border: none !important; cursor: pointer; }

/* Calendar container*/
#calendar {
  background-color: var(--card) !important;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
}
.fc-view-harness {
  background: var(--card);
}

.notif-dropdown {
  position: absolute;
  top: 54px; right: 0;
  width: 340px;
  background-color: #FFFFFF !important;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  z-index: 9999 !important;
  max-height: 420px;
  overflow-y: auto;
  display: none;
}
.notif-dropdown.open { display: block; }
.notif-item { padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 13px; }
.notif-item:last-child { border-bottom: none; }
.notif-item.unread { background: var(--purple-50); }
.notif-item .msg { color: var(--ink-900); }
.notif-item .meta { color: var(--ink-400); font-size: 11.5px; margin-top: 3px; }
.notif-header { padding: 12px 16px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 13.5px; }
.notif-header a { font-size: 12px; font-weight: 600; color: var(--purple-600); }
.notif-empty { padding: 24px 16px; text-align: center; color: var(--ink-400); font-size: 13px; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--ink-400); }

.topbar-banner,
.topbar-right-pill,
.icon-btn {
    position: relative !important;
    z-index: 99999 !important;
    overflow: visible !important; 
}

#calendar, 
.fc {
    position: relative !important;
    z-index: 0 !important;
    isolation: isolate !important;
}

.fc .fc-button, 
.fc-scrollgrid {
    z-index: 0 !important;
}

.notif-dropdown {
    background-color: #FFFFFF !important;
    z-index: 999999 !important;
}

.notif-item {
    background-color: #FFFFFF !important;
}
.notif-item.unread {
    background-color: #FFEBEE !important;
}

/* hamburger button */
.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  flex-shrink: 0;
}
.hamburger-btn span {
  display: block;
  width: 22px;
  height: 2px;
  background: #DC2626;
  border-radius: 2px;
  transition: all 0.3s ease;
}
.hamburger-btn:hover { background: #FEE2E2; }

/* mobile sidebar */
.mobile-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 998;
  transition: opacity 0.3s ease;
}
.mobile-sidebar-overlay.active {
  display: block;
}

/* mobile button overlay */
.mobile-bottom-nav {
  display: none;
}

@media (max-width: 900px) {
  /* Layout */
  .app-shell {
    display: block;
    min-height: 100vh;
  }

  .sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 260px;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
    z-index: 999;
    overflow-y: auto;
  }
  .sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: 4px 0 24px rgba(0,0,0,0.2);
  }

  .hamburger-btn {
    display: flex;
  }

  .topbar {
    margin: 12px 12px 12px !important;
    padding: 14px 16px !important;
    border-radius: 10px !important;
  }
  .page-title { font-size: 18px !important; }
  .page-subtitle { font-size: 12px !important; }

  /* content padding */
  .content {
    padding: 0 12px 100px !important; /* extra bottom for mobile nav */
  }

  /* main col */
  .main-col {
    min-height: 100vh;
  }

  /* filter bar */
  .filter-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .filter-bar form {
    flex-wrap: wrap;
  }
  .filter-bar .search-input {
    min-width: 0;
    width: 100%;
  }
  .filter-bar form select.form-input,
  .filter-bar form input[type="text"],
  .filter-bar form input[type="date"] {
    max-width: 100% !important;
    width: auto !important;
    flex: 1 1 120px;
  }
  .filter-divider {
    display: none;
  }

  /* Table mobile card layout */
  .card {
    background: transparent;
    border: none;
    box-shadow: none;
    overflow-x: visible;
  }
  .report-table {
    min-width: 0;
    display: block;
  }
  .report-table thead {
    display: none;
  }
  .report-table tbody {
    display: block;
  }
  .report-table tr {
    display: block;
    background: var(--card) !important;
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-bottom: 16px;
    padding: 14px 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
  }
  .report-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: none !important;
    padding: 6px 0 !important;
    text-align: right !important;
  }
  .report-table td > * {
    text-align: right;
  }
  
  .report-table td::before {
    font-size: 11px;
    font-weight: 700;
    color: var(--ink-400);
    text-transform: uppercase;
    margin-right: 12px;
    text-align: left;
    flex-shrink: 0;
  }
  
  .report-table td:nth-child(1)::before { content: "NAMA PEKERJAAN"; display: none; }
  .report-table td:nth-child(2)::before { content: "REGULATOR"; }
  .report-table td:nth-child(3)::before { content: "PORTAL/SISTEM"; }
  .report-table td:nth-child(4)::before { content: "FREKUENSI"; }
  .report-table td:nth-child(5)::before { content: "DIVISI"; }
  .report-table td:nth-child(6)::before { content: "PENGUNGGAH"; }
  .report-table td:nth-child(7)::before { content: "PIC"; }
  .report-table td:nth-child(8)::before { content: "DEADLINE"; }
  .report-table td:nth-child(9)::before { content: "STATUS"; }
  .report-table td:nth-child(10)::before { content: "DOCS"; }
  .report-table td:nth-child(11)::before { content: "AKSI"; display: none; }
  
  .report-table td:nth-child(1) {
    flex-direction: column;
    align-items: flex-start;
    padding-bottom: 12px !important;
    border-bottom: 1px dashed var(--line) !important;
    margin-bottom: 8px;
  }
  .report-table td:nth-child(1) .report-name {
    font-size: 15px;
    text-align: left;
    margin-bottom: 6px;
  }
  .report-table td:nth-child(1) .report-meta {
    text-align: left;
  }
  
  .report-table td:last-child {
    justify-content: flex-end;
    gap: 8px;
    padding-top: 12px !important;
    border-top: 1px dashed var(--line) !important;
    margin-top: 8px;
    width: auto !important;
    white-space: normal !important;
  }
  .report-table td:last-child > div {
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .report-table td:last-child::before {
    display: none;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .modal-overlay {
    padding: 0;
    align-items: flex-end;
  }
  .modal {
    max-width: 100% !important;
    width: 100%;
    border-radius: 20px 20px 0 0 !important;
    max-height: calc(92vh - 56px);
    margin-bottom: 56px;
  }
  .modal-body {
    padding: 16px 18px;
  }
  .modal-header {
    padding: 16px 18px;
  }
  .modal-footer {
    padding: 14px 18px;
  }

  /* notification dropdown */
  .notif-dropdown {
    position: fixed !important;
    top: 76px !important;
    right: 12px !important;
    left: 12px !important;
    width: auto !important;
    max-width: 400px;
    margin: 0 auto;
  }

  /* mobile bottom navigation */
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 62px;
    background: #FFFFFF;
    border-top: 1px solid #FEE2E2;
    box-shadow: 0 -4px 20px rgba(153,27,27,0.08);
    z-index: 900;
    justify-content: space-around;
    align-items: stretch;
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  .mobile-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: #9CA3AF;
    font-size: 10px;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
    padding: 8px 4px;
    position: relative;
  }
  .mobile-nav-item:hover,
  .mobile-nav-item.active {
    color: #DC2626;
  }
  .mobile-nav-item.active svg {
    stroke: #DC2626;
  }
  .mobile-nav-item svg {
    stroke: #9CA3AF;
    transition: stroke 0.2s;
  }
  .mobile-nav-item.active::before {
    content: '';
    position: absolute;
    top: 0; left: 20%; right: 20%;
    height: 3px;
    background: linear-gradient(90deg, #FCA5A5, #DC2626);
    border-radius: 0 0 4px 4px;
  }

  .topbar-actions > div:first-child {
    padding: 4px 8px 4px 6px !important;
  }

  body.sidebar-open {
    overflow: hidden;
  }
  
  .btn {
    font-size: 12px;
    padding: 8px 14px;
  }
  .btn-sm {
    font-size: 11px;
    padding: 5px 10px;
  }
  .pill {
    font-size: 12px;
    padding: 5px 10px;
  }
  .status-select {
    font-size: 11px !important;
    padding: 4px 20px 4px 8px !important;
  }

  #calendar {
    background-color: var(--card) !important;
    border-radius: 12px;
    padding: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
  }
  .fc .fc-toolbar-title {
    font-size: 16px !important;
  }
  .fc .fc-button {
    font-size: 12px !important;
    padding: 6px 10px !important;
  }
  .fc-view-harness {
    background: #FFFFFF;
  }
}

@media (max-width: 480px) {
  .topbar {
    margin: 8px 8px 8px !important;
    padding: 10px 12px !important;
  }
  .page-title { font-size: 15px !important; }
  .page-subtitle { font-size: 11px !important; }

  .content {
    padding: 0 8px 100px !important;
  }

  .auth-card {
    padding: 24px 20px;
  }

  .filter-bar > div:first-child {
    flex-wrap: wrap;
  }

  .report-table td::before {
    font-size: 10px;
    margin-right: 8px;
  }
  .report-table td {
    font-size: 11px !important;
  }
  .report-table td:nth-child(1) .report-name {
    font-size: 14px;
  }
}
