/* PLAGIS Dashboard Styles - Exact replica from index_v3.html */

/* Global Box Sizing Fix */
*, *::before, *::after {
  box-sizing: border-box;
}

:root {
  --primary-green: #10b981;
  --primary-dark: #047857;
  --primary-darker: #064e3b;
  --accent-green: #059669;
  --bg-dark: #065f46;
  --sidebar-bg: #0f766e;
  --sidebar-hover: #14b8a6;
  --card-bg: rgba(255, 255, 255, 0.98);
  --border-color: rgba(16, 185, 129, 0.2);
  --text-dark: #1f2937;
  --text-muted: #6b7280;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  --shadow-hover: 0 15px 50px rgba(0, 0, 0, 0.25);
}

/* Main Layout */
.app-container {
  display: flex;
  min-height: 100vh;
  width: 100%;
  position: relative;
  background: linear-gradient(135deg, var(--bg-dark) 0%, var(--primary-darker) 100%);
  overflow-x: auto;
  overflow-y: hidden;
  box-sizing: border-box;
  padding-right: 20px;
}

/* Animated background */
.animated-bg {
  position: fixed;
  width: 200%;
  height: 200%;
  top: -50%;
  left: -50%;
  background-image: 
    radial-gradient(circle at 20% 50%, rgba(16, 185, 129, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(5, 150, 105, 0.1) 0%, transparent 50%);
  animation: float 20s ease-in-out infinite;
  z-index: 0;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(30px, -30px) rotate(180deg); }
}

/* Sidebar */
.sidebar {
  width: 80px;
  min-width: 80px;
  flex-shrink: 0;
  background: linear-gradient(180deg, var(--sidebar-bg) 0%, var(--primary-dark) 100%);
  backdrop-filter: blur(20px);
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  position: fixed;
  left: 0;
  top: 0;
  height: 100vh;
  z-index: 100;
  box-sizing: border-box;
}

.sidebar.expanded {
  width: 260px;
  box-shadow: 4px 0 30px rgba(0, 0, 0, 0.4);
}

/* Sidebar Backdrop Overlay */
.sidebar-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(2px);
}

.sidebar-backdrop.visible {
  opacity: 1;
  visibility: visible;
}

/* Hamburger Menu Button */
.hamburger-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(255, 255, 255, 0.15);
  border: 2px solid rgba(255, 255, 255, 0.2);
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  z-index: 101;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hamburger-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.1);
  border-color: rgba(255, 255, 255, 0.4);
}

.sidebar.expanded .hamburger-btn {
  background: rgba(255, 255, 255, 0.2);
}

.hamburger-icon {
  width: 24px;
  height: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hamburger-icon span {
  display: block;
  height: 3px;
  width: 100%;
  background: white;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.hamburger-icon.open span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger-icon.open span:nth-child(2) {
  opacity: 0;
}

.hamburger-icon.open span:nth-child(3) {
  transform: translateY(-10px) rotate(-45deg);
}

.sidebar-logo {
  font-size: 2.2em;
  margin-bottom: 30px;
  margin-top: 50px;
  cursor: pointer;
  transition: all 0.3s ease;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.sidebar-logo:hover {
  transform: scale(1.15) rotate(5deg);
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}

.sidebar.collapsed .sidebar-logo {
  margin-top: 50px;
}

.sidebar.expanded .sidebar-logo {
  margin-bottom: 40px;
}

/* Scrollable nav area so sidebar doesn't overflow on small screens */
.sidebar-nav {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  width: 100%;
  -webkit-overflow-scrolling: touch;
}

.sidebar-nav::-webkit-scrollbar {
  width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.25);
  border-radius: 3px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.4);
}

.nav-item {
  width: 100%;
  padding: 18px 20px;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  gap: 15px;
  white-space: nowrap;
  position: relative;
  margin: 2px 0;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  transform: translateX(5px);
}

.nav-item.active {
  background: var(--sidebar-hover);
  color: white;
  font-weight: 600;
  border-left: 4px solid white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.nav-item-icon {
  font-size: 1.5em;
  min-width: 40px;
  text-align: center;
}

.nav-item-text {
  font-size: 0.95em;
  opacity: 0;
  transition: opacity 0.3s ease;
  width: 0;
  overflow: hidden;
}

.sidebar.expanded .nav-item-text {
  opacity: 1;
  width: auto;
}

.sidebar-footer {
  margin-top: auto;
  padding: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  width: 100%;
  text-align: center;
}

.logout-btn {
  background: rgba(239, 68, 68, 0.8);
  color: white;
  border: none;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.3em;
  transition: all 0.3s ease;
  width: 100%;
}

.logout-btn:hover {
  background: rgba(220, 38, 38, 1);
  transform: scale(1.05);
}

/* User management */
.user-management-section {
  background: transparent;
  padding-top: 16px;
}

.user-management-toolbar {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 20px;
}

.user-management-toolbar input,
.user-management-toolbar select {
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  background: white;
  min-width: 180px;
  font-size: 0.95em;
}

.user-management-grid {
  margin-bottom: 25px;
}

.user-management-table-wrapper {
  margin-bottom: 20px;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.18);
  border: 1px solid rgba(148, 163, 184, 0.35);
  overflow: hidden;
}

.user-management-table tbody tr.selected {
  background: rgba(16, 185, 129, 0.12);
}

.user-management-table thead {
  background: linear-gradient(135deg, #047857, #059669);
}

.user-management-table thead th {
  color: #f9fafb;
  font-weight: 600;
  letter-spacing: 0.03em;
  font-size: 0.9rem;
  padding-top: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.12);
}

.user-management-table tbody tr:nth-child(even) {
  background: rgba(249, 250, 251, 0.9);
}

.user-management-table tbody tr:nth-child(odd) {
  background: rgba(243, 244, 246, 0.9);
}

.user-management-table tbody tr:hover {
  background: rgba(16, 185, 129, 0.08);
}

.user-management-table td {
  padding-top: 10px;
  padding-bottom: 10px;
  font-size: 0.9rem;
}

.user-management-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  gap: 12px;
}

.user-management-page-info {
  font-size: 0.85rem;
  color: #e5e7eb;
}

.user-management-page-buttons {
  display: flex;
  gap: 8px;
}

.user-management-page-buttons .pagination-btn {
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.8);
  background: rgba(15, 23, 42, 0.3);
  color: #e5e7eb;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.user-management-page-buttons .pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.user-management-page-buttons .pagination-btn:not(:disabled):hover {
  background: rgba(16, 185, 129, 0.25);
  border-color: rgba(16, 185, 129, 0.8);
}

.user-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(14, 165, 233, 0.15);
  font-size: 0.8em;
  color: #0369a1;
  font-weight: 600;
}

.user-chip-muted {
  background: rgba(16, 185, 129, 0.1);
  color: var(--primary-darker);
}

.status-pill {
  display: inline-flex;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.8em;
  font-weight: 600;
}

.status-pill.enabled {
  background: rgba(16, 185, 129, 0.15);
  color: var(--primary-dark);
}

.status-pill.disabled {
  background: rgba(239, 68, 68, 0.15);
  color: #b91c1c;
}

.user-details-panel {
  background: var(--card-bg);
  border-radius: 20px;
  padding: 25px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow);
}

.user-details-header {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 15px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 15px;
}

.user-details-header h3 {
  margin: 0;
  color: var(--primary-dark);
}

.user-details-header p {
  margin: 4px 0 0;
  color: var(--text-muted);
}

.user-details-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.9em;
  color: var(--text-muted);
}

.user-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.user-detail-grid div {
  background: rgba(15, 118, 110, 0.06);
  border-radius: 12px;
  padding: 12px 14px;
}

.user-detail-grid span {
  font-size: 0.75em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.user-detail-grid strong {
  display: block;
  margin-top: 6px;
  color: var(--text-dark);
}

.user-properties {
  margin-top: 25px;
}

.user-properties h4 {
  margin-bottom: 12px;
  color: var(--primary-dark);
}

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

.property-chip {
  border: 1px dashed var(--border-color);
  border-radius: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.85);
}

.property-chip span {
  font-size: 0.75em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.property-chip strong {
  display: block;
  margin-top: 6px;
  font-size: 0.95em;
  color: var(--text-dark);
  word-break: break-word;
}

/* Main Content */
.main-content {
  flex: 1;
  min-width: 0;
  margin-left: 80px;
  display: flex;
  flex-direction: column;
  overflow-x: auto;
  overflow-y: hidden;
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Top Header */
.top-header {
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  padding: 20px 30px;
  box-shadow: var(--shadow);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 3px solid var(--primary-green);
}

.header-title {
  font-size: 1.8em;
  background: linear-gradient(135deg, var(--primary-green) 0%, var(--accent-green) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: bold;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 15px;
  color: var(--text-dark);
}

.user-avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-green), var(--accent-green));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
  font-size: 1.2em;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

/* Tab Navigation */
.tab-nav {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 0 20px;
  display: flex;
  gap: 5px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  overflow-x: auto;
}

.tab-button {
  padding: 15px 25px;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.95em;
  font-weight: 500;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.tab-button:hover {
  color: var(--primary-green);
  background: rgba(16, 185, 129, 0.05);
}

.tab-button.active {
  color: var(--primary-green);
  border-bottom-color: var(--primary-green);
  font-weight: 600;
}

/* Content Area */
.content-area {
  flex: 1;
  overflow-y: auto;
  overflow-x: auto;
  padding: 30px;
  box-sizing: border-box;
  max-width: 100%;
}

.content-section {
  display: none;
  animation: fadeIn 0.4s ease-in-out;
}

.content-section.active {
  display: block;
}

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

/* Search Card */
.search-card {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 30px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  box-sizing: border-box;
  max-width: 100%;
}

.search-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.section-title {
  font-size: 1.3em;
  color: var(--primary-dark);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-color);
  font-weight: 600;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-label {
  font-size: 0.9em;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.form-input,
.form-select {
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.95em;
  transition: all 0.3s ease;
  background: white;
}

.form-input:focus,
.form-select:focus {
  outline: none;
  border-color: var(--primary-green);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Buttons */
.button-group {
  display: flex;
  gap: 15px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.btn {
  padding: 14px 30px;
  border: none;
  border-radius: 10px;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-green) 0%, var(--accent-green) 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-secondary {
  background: white;
  color: var(--text-dark);
  border: 2px solid #e5e7eb;
}

.btn-secondary:hover {
  background: #f9fafb;
  border-color: var(--primary-green);
  color: var(--primary-green);
}

/* Results Table */
.results-container {
  background: var(--card-bg);
  border-radius: 16px;
  padding: 30px;
  box-shadow: var(--shadow);
  margin-top: 20px;
  box-sizing: border-box;
  max-width: 100%;
  overflow-x: auto;
}

.results-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.results-table th {
  background: linear-gradient(135deg, var(--primary-green) 0%, var(--accent-green) 100%);
  color: white;
  padding: 15px;
  text-align: left;
  font-weight: 600;
  font-size: 0.9em;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.results-table th:first-child {
  border-top-left-radius: 10px;
}

.results-table th:last-child {
  border-top-right-radius: 10px;
}

.results-table td {
  padding: 15px;
  border-bottom: 1px solid #e5e7eb;
  color: var(--text-dark);
}

.results-table tr:hover {
  background: rgba(16, 185, 129, 0.05);
  cursor: pointer;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 4em;
  margin-bottom: 20px;
  opacity: 0.5;
}

/* Loading Spinner */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px;
  color: #6c757d;
}

.spinner {
  width: 60px;
  height: 60px;
  border: 6px solid #f3f3f3;
  border-top-color: #10b981;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-bottom: 25px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.loading-text {
  font-size: 1.2em;
  font-weight: 600;
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.modal-content {
  background: white;
  border-radius: 16px;
  width: 90%;
  max-width: 1200px;
  height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-header {
  padding: 20px 30px;
  background: linear-gradient(135deg, var(--primary-green) 0%, var(--accent-green) 100%);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 1.5em;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.modal-body {
  flex: 1;
  overflow: auto;
  padding: 20px;
}

/* PDF Container */
.pdf-container {
  flex: 1;
  min-height: 700px;
  position: relative;
}

.pdf-container iframe {
  width: 100%;
  height: 100%;
  min-height: 700px;
  border: none;
}

/* Alert Messages */
.alert {
  padding: 15px 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  font-weight: 500;
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--primary-dark);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  color: #991b1b;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.alert-info {
  background: rgba(59, 130, 246, 0.1);
  color: #1e40af;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Badge */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 0.85em;
  font-weight: 600;
}

.badge-success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--primary-dark);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.1);
  color: #92400e;
}

.badge-info {
  background: rgba(59, 130, 246, 0.1);
  color: #1e40af;
}

/* Responsive Design */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    height: 100vh;
    z-index: 100;
  }

  .sidebar.collapsed {
    width: 0;
    padding: 0;
  }

  .hamburger-btn {
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 101;
    background: var(--primary-green);
  }

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

  .top-header {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
}

/* Search Section */
.search-section {
  box-sizing: border-box;
  max-width: 100%;
}

/* Search Params Panel (for results pages) */
.search-params-panel {
  box-sizing: border-box;
  max-height: calc(100vh - 200px);
  overflow-y: auto;
}

/* Overview Experience */
.overview-hero {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  border: 1px solid rgba(16, 185, 129, 0.15);
  box-shadow: var(--shadow);
  padding: 30px;
  display: flex;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: 25px;
  flex-wrap: wrap;
}

.overview-eyebrow {
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: var(--primary-green);
  margin-bottom: 6px;
}

.overview-hero h2 {
  font-size: 1.9rem;
  margin-bottom: 10px;
  color: var(--primary-dark);
}

.hero-tags {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.hero-tags span {
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--primary-dark);
}

.hero-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 15px;
  min-width: 280px;
}

.hero-summary div {
  background: rgba(16, 185, 129, 0.07);
  border-radius: 18px;
  padding: 18px;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.hero-summary p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.hero-summary strong {
  font-size: 1.8rem;
  display: block;
  margin: 8px 0;
  color: var(--primary-darker);
}

.overview-filters {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  border: 1px solid rgba(16, 185, 129, 0.15);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 25px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.filter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.filter-chip {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.filter-chip label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-dark);
}

.filter-chip input,
.filter-chip select {
  border: 1px solid rgba(15, 23, 42, 0.15);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.95);
}

.filter-chip input:focus,
.filter-chip select:focus {
  outline: none;
  border-color: var(--primary-green);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.filter-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.overview-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 18px;
  margin-bottom: 25px;
}

.overview-card {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(16, 185, 129, 0.15);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.overview-card span {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.overview-card strong {
  display: block;
  font-size: 2rem;
  margin: 10px 0;
  color: var(--primary-darker);
}

.overview-card small {
  color: var(--text-muted);
}

.overview-chart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin-bottom: 25px;
}

.chart-card {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(16, 185, 129, 0.15);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.chart-legend {
  list-style: none;
  padding: 0;
  margin: 12px 0 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chart-legend li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
}

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

.overview-shortcuts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 25px;
}

.shortcut-card {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  padding: 18px;
  text-align: left;
  display: flex;
  gap: 12px;
  align-items: center;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.shortcut-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
}

.shortcut-icon {
  font-size: 1.5rem;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 14px;
  padding: 10px;
}

.overview-table-card {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(16, 185, 129, 0.15);
  border-radius: 20px;
  padding: 0;
  box-shadow: var(--shadow);
}

.overview-table-header {
  padding: 22px 24px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.overview-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.overview-table th {
  background: rgba(16, 185, 129, 0.15);
  padding: 14px;
  text-align: left;
  font-size: 0.85rem;
  text-transform: uppercase;
}

.overview-table td {
  padding: 14px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  font-size: 0.92rem;
}

.overview-table .link-button {
  background: none;
  border: none;
  color: var(--primary-green);
  font-weight: 600;
  cursor: pointer;
}

.overview-table .link-button:hover {
  text-decoration: underline;
}

.table-cta {
  background: rgba(16, 185, 129, 0.15);
  border: none;
  border-radius: 999px;
  padding: 6px 14px;
  color: var(--primary-darker);
  cursor: pointer;
  font-weight: 600;
}

.overview-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  gap: 12px;
  flex-wrap: wrap;
}

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

.pagination-btn {
  border: 1px solid rgba(15, 23, 42, 0.2);
  background: white;
  border-radius: 8px;
  padding: 8px 16px;
  cursor: pointer;
}

.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.05);
}

::-webkit-scrollbar-thumb {
  background: var(--primary-green);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-green);
}

/* Duty dashboard (indexing/scanning officers) */
.duty-main {
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.duty-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

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

.duty-link-full-dashboard {
  font-size: 0.95rem;
  color: var(--primary-green);
  font-weight: 500;
  text-decoration: none;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: rgba(255, 255, 255, 0.6);
  transition: all 0.2s ease;
}

.duty-link-full-dashboard:hover {
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--primary-green);
  color: var(--primary-dark);
}

.duty-title {
  font-size: 1.1rem;
  color: var(--text-muted);
  font-weight: 500;
}

.duty-content {
  max-width: 720px;
  margin: 0 auto;
  width: 100%;
}

.duty-welcome {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-dark);
  margin: 0 0 8px 0;
}

.duty-subtitle {
  color: var(--text-muted);
  margin: 0 0 8px 0;
  font-size: 1rem;
}

.duty-subtitle.duty-role {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary-dark);
  margin-bottom: 24px;
}

.duty-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.duty-card {
  display: block;
  background: var(--card-bg);
  border-radius: 12px;
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.duty-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.duty-card-primary {
  border-color: var(--primary-green);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, var(--card-bg) 100%);
}

.duty-card-primary:hover {
  border-color: var(--accent-green);
}

.duty-card-muted {
  opacity: 0.85;
  cursor: default;
  pointer-events: none;
}

.duty-card-secondary {
  border-style: dashed;
  border-color: var(--border-color);
  background: rgba(255, 255, 255, 0.7);
}

.duty-card-secondary:hover {
  border-color: var(--primary-green);
  background: rgba(16, 185, 129, 0.06);
}

.duty-card-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 12px;
}

.duty-card h3 {
  margin: 0 0 8px 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-dark);
}

.duty-card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Landing admin (Dashboard → Landing) */
.landing-admin { padding: 1rem; max-width: 800px; }
.landing-admin-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; flex-wrap: wrap; gap: 0.5rem; }
.landing-admin-header h2 { margin: 0; font-size: 1.25rem; }
.landing-admin-view-link { color: var(--primary-green); text-decoration: none; }
.landing-admin-view-link:hover { text-decoration: underline; }
.landing-admin-error { color: #dc2626; margin-bottom: 0.75rem; }
.landing-admin-message { color: var(--primary-dark); margin-bottom: 0.75rem; }
.landing-admin-loading { padding: 2rem; text-align: center; color: var(--text-muted); }
.landing-admin-tabs { display: flex; gap: 0.25rem; margin-bottom: 1rem; flex-wrap: wrap; }
.landing-admin-tab { padding: 0.5rem 0.75rem; border: 1px solid var(--border-color); background: var(--card-bg); border-radius: 6px; cursor: pointer; }
.landing-admin-tab.active { background: var(--primary-green); color: #fff; border-color: var(--primary-green); }
.landing-admin-content { background: var(--card-bg); border-radius: 8px; padding: 1rem; border: 1px solid var(--border-color); }
.landing-admin-form label { display: block; margin-bottom: 0.5rem; }
.landing-admin-form input, .landing-admin-form textarea { width: 100%; max-width: 400px; padding: 0.5rem; margin-left: 0.25rem; }
.landing-admin-form button { margin-right: 0.5rem; margin-top: 0.5rem; padding: 0.5rem 1rem; border-radius: 6px; cursor: pointer; }
.landing-admin-form-inline { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-bottom: 1rem; }
.landing-admin-form-inline input { max-width: 120px; }
.landing-admin-list { list-style: none; padding: 0; margin: 0; }
.landing-admin-list li { display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 0; border-bottom: 1px solid var(--border-color); }
.landing-admin-list li button { margin-left: 0.5rem; padding: 0.25rem 0.5rem; font-size: 0.875rem; }
.landing-admin-stats .landing-admin-form, .landing-admin-cards .landing-admin-form { margin-bottom: 1rem; }

