:root {
  --bg-sidebar: #0f3555;
  --bg-sidebar-hover: #164f7a;
  --bg-sidebar-active: #4caea3;
  --bg-main: #eff5eb;
  --card-bg: #ffffff;
  --text-dark: #000000;
  --text-primary: #0f3555;
  --text-muted: #818ca3;
  --accent-green-bg: #e2f5e8;
  --accent-green-text: #2fbc78;
  --accent-blue: #0f3555;
  --accent-purple: #7c4dff;
  --border-color: #eaedf2;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hidden {
  display: none !important;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Inter", sans-serif;
}

body {
  background: var(--bg-main);
  color: var(--text-dark);
  display: flex;
  min-height: 100vh;
  overflow-x: hidden;
}

.layout {
  display: flex;
  width: 100%;
}

/* Sidebar */
.sidebar {
  width: 280px;
  background: var(--bg-sidebar);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100vh;
  top: 0;
  left: 0;
}
.sidebar-header {
  padding: 2.5rem 1.5rem;
}
.sidebar-header h2 {
  font-size: 1.05rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.sidebar-brand-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.app-launcher-btn {
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: none;
}

.app-launcher-btn:hover {
  background: rgba(24, 38, 61, 0.98);
  border-color: rgba(255, 255, 255, 0.14);
}

.app-launcher-btn:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.9);
  outline-offset: 2px;
}

.app-launcher-indicator {
  font-size: 20px;
  color: #ff2a23;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 6px rgba(255, 42, 35, 0.28));
  font-variation-settings:
    "FILL" 1,
    "wght" 400,
    "GRAD" 0,
    "opsz" 24;
}

.app-launcher-copy {
  display: flex;
  align-items: center;
  min-width: 0;
}

.app-launcher-label {
  display: none;
}

.app-launcher-name {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

.app-launcher-icon {
  display: none;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0 1rem;
  margin: 1.25rem 0 1.75rem;
}

.nav-header,
.sidebar-section h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.15rem 0.45rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  user-select: none;
}

.nav-header:hover,
.sidebar-section h3:hover {
  color: #fff;
}

.chevron {
  font-size: 0.95rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.75);
  transition: transform 0.2s ease;
}

.collapsed .chevron {
  transform: rotate(-90deg);
}

.collapsible-content {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  overflow: hidden;
  max-height: 500px;
  opacity: 1;
  transition:
    max-height 0.24s ease,
    opacity 0.2s ease;
}

.collapsed + .collapsible-content {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}

.nav-item {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  column-gap: 0.8rem;
  width: 100%;
  padding: 0.78rem 0.9rem;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  background: transparent;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.nav-item.active {
  background: rgba(76, 174, 163, 0.2);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(76, 174, 163, 0.42);
}

.nav-item-icon.material-symbols-outlined {
  font-size: 1.15rem;
  line-height: 1;
  color: rgba(255, 255, 255, 0.72);
  font-variation-settings:
    "FILL" 0,
    "wght" 300,
    "GRAD" 0,
    "opsz" 24;
}

.nav-item:hover .nav-item-icon,
.nav-item.active .nav-item-icon {
  color: #fff;
}

.nav-item-label {
  min-width: 0;
  font-size: 0.94rem;
  font-weight: 500;
  line-height: 1.2;
  white-space: normal;
  overflow-wrap: anywhere;
}

.personnel-shell {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.personnel-card {
  padding: 1.5rem;
}

.personnel-head,
.personnel-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.personnel-head p,
.personnel-reference-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.personnel-badge,
.personnel-caption {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: rgba(76, 174, 163, 0.12);
  color: #1d786f;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
}

.personnel-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.personnel-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.personnel-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.personnel-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.personnel-field span {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-blue);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.personnel-field input,
.personnel-field select {
  width: 100%;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  background: #fff;
  font-size: 0.95rem;
  color: var(--text-dark);
}

.personnel-field input:focus,
.personnel-field select:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(15, 53, 85, 0.08);
}

.personnel-command-grid,
.personnel-reference-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.personnel-command-card,
.personnel-reference-card {
  border: 1px solid var(--border-color);
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff, #f8fbfd);
  padding: 1rem;
}

.personnel-command-card {
  text-align: left;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.personnel-command-card:hover {
  transform: translateY(-2px);
  border-color: rgba(76, 174, 163, 0.55);
  box-shadow: 0 14px 26px rgba(15, 53, 85, 0.08);
}

.personnel-command-title,
.personnel-reference-title,
.personnel-history-title {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--accent-blue);
  margin-bottom: 0.35rem;
}

.personnel-command-summary,
.personnel-reference-id,
.personnel-history-meta {
  color: var(--text-muted);
  font-size: 0.86rem;
  line-height: 1.5;
}

.personnel-results-grid {
  display: grid;
  grid-template-columns: 1.05fr 1.2fr;
  gap: 1.5rem;
}

.personnel-summary-empty,
.personnel-history-empty {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  padding: 0.5rem 0;
}

.personnel-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.personnel-summary-card {
  background: rgba(15, 53, 85, 0.03);
  border: 1px solid rgba(15, 53, 85, 0.06);
  border-radius: 12px;
  padding: 0.95rem 1rem;
}

.personnel-summary-label {
  display: block;
  color: var(--text-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.35rem;
}

.personnel-error-banner {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: rgba(231, 76, 60, 0.08);
  color: #b83c2f;
  font-size: 0.9rem;
  font-weight: 600;
}

.personnel-json {
  min-height: 320px;
  max-height: 520px;
  overflow: auto;
  background: #0d2238;
  color: #dbe9f8;
  border-radius: 14px;
  padding: 1rem;
  font-size: 0.82rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.personnel-copy-btn {
  font-size: 0.8rem;
  padding: 0.5rem 0.8rem;
}

.personnel-submit-btn[disabled] {
  opacity: 0.65;
  cursor: not-allowed;
}

.personnel-history-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.personnel-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: #fbfcfe;
}

.personnel-status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 88px;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.personnel-status-chip.success {
  background: rgba(47, 188, 120, 0.14);
  color: #1f8b57;
}

.personnel-status-chip.error {
  background: rgba(231, 76, 60, 0.12);
  color: #c0392b;
}

.personnel-status-chip.neutral {
  background: rgba(15, 53, 85, 0.08);
  color: var(--accent-blue);
}

.personnel-flow-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.personnel-flow-item {
  padding: 1rem 1.1rem;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: #fbfcfe;
}

.personnel-flow-item strong {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--accent-blue);
}

.personnel-flow-item p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

@media (max-width: 640px) {
  .app-launcher-btn {
    width: 100%;
  }

  .app-launcher-name {
    max-width: none;
  }

  .personnel-grid,
  .personnel-results-grid,
  .personnel-summary-grid {
    grid-template-columns: 1fr;
  }

  .personnel-form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .personnel-head,
  .personnel-panel-head,
  .personnel-history-item {
    flex-direction: column;
    align-items: flex-start;
  }
}
/* Custom Scrollbar */
.fleet-list-container::-webkit-scrollbar {
  width: 4px;
}
.fleet-list-container::-webkit-scrollbar-track {
  background: transparent;
}
.fleet-list-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}
.fleet-list-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.2);
}

.fleet-list,
.team-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.fleet-item,
.team-item {
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid transparent;
}
.fleet-item:hover,
.team-item:hover {
  background: rgba(255, 255, 255, 0.08);
}
.fleet-item.active {
  background: var(--bg-sidebar-active);
  color: #fff;
}
.report-btn {
  opacity: 0.3;
  transition:
    opacity 0.2s,
    transform 0.2s;
  padding: 2px;
}
.report-btn:hover {
  opacity: 1 !important;
  transform: scale(1.2);
}
.fleet-item:hover .report-btn {
  opacity: 0.6;
}
.team-item {
  cursor: default;
}
.team-item span.email {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 140px;
  font-weight: 400;
  opacity: 0.7;
}
.invite-box input {
  outline: none;
  transition: var(--transition);
}
.invite-box input:focus {
  border-color: var(--accent-blue);
  background: #fff;
}

.settings-input {
  width: 100%;
  padding: 12px;
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  transition: var(--transition);
  color: var(--text-dark);
}

.settings-input:focus {
  background: #fff;
  border-color: var(--accent-blue);
  outline: none;
  box-shadow: 0 0 0 3px rgba(15, 53, 85, 0.05);
}

.fleet-empty {
  padding: 1rem;
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.8rem;
  text-align: center;
  font-style: italic;
}

.sidebar-footer {
  padding: 1.5rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
}

/* Main */
.main-content {
  flex: 1;
  margin-left: 280px;
  padding: 2.5rem 3.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.account-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.top-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
}
h1 {
  font-size: 2.2rem;
  font-weight: 700;
  color: #000;
  letter-spacing: -0.5px;
}
.gov-badge {
  background: var(--accent-green-bg);
  color: #176f41;
  padding: 8px 14px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.search-section .search-box {
  background: #fff;
  padding: 12px;
  border-radius: 10px;
  display: flex;
  gap: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}
.search-box input {
  flex: 1;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0 18px;
  font-size: 1rem;
  outline: none;
  color: var(--text-dark);
}
.search-box input:focus {
  border-color: var(--accent-blue);
}
.search-actions {
  display: flex;
  gap: 10px;
}
.btn-primary {
  background: var(--accent-blue);
  color: #fff;
  border: none;
  padding: 14px 28px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
}
.btn-outline-blue {
  background: transparent;
  border: 1px solid var(--accent-blue);
  color: var(--accent-blue);
  padding: 14px 28px;
  border-radius: 6px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-outline-blue:hover {
  background: var(--accent-blue);
  color: #fff;
}
.btn-primary:hover {
  opacity: 0.9;
}

.results-area {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.stats-row {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 24px;
}
.stat-card {
  flex: 1;
  background: #fff;
  padding: 1.8rem;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}
.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: 1px;
}
.stat-val {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-primary);
}

.content-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
}
.left-col {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.right-col {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.meta-card,
.intel-card {
  flex: 1;
}
.timeline-card {
  flex: 2;
}

.card {
  max-height: fit-content;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  padding: 2rem;
}
.card h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: #000;
  letter-spacing: -0.3px;
}

/* Logs Table */
.logs-table {
  width: 100%;
  border-collapse: collapse;
}
.logs-table th {
  text-align: left;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 600;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}
.logs-table td {
  padding: 20px 0;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
  font-weight: 500;
}
.logs-table tr:last-child td {
  border-bottom: none;
  padding-bottom: 0;
}
.verified-badge {
  background: var(--accent-green-bg);
  color: var(--accent-green-text);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}
.lane-bold {
  font-weight: 800;
  color: #000;
}

/* Metadata & Intel */
.tabs {
  display: flex;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}
.tab {
  background: none;
  border: none;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}
.tab.active {
  color: var(--accent-blue);
  border-bottom-color: var(--accent-blue);
}
.tab:hover {
  color: var(--accent-blue);
}
.tab.tab-green {
  color: rgba(23, 111, 65, 0.6);
}
.tab.tab-green.active {
  color: #176f41;
  border-bottom-color: #176f41;
}
.tab.tab-green:hover {
  color: #176f41;
}
.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
}
.meta-content {
  display: flex;
  flex-direction: column;
}
.meta-section {
  display: flex;
  flex-direction: column;
}
.meta-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.meta-full-row {
  justify-content: space-between;
  align-items: center;
}
.meta-col {
  display: flex;
  flex-direction: column;
}
.meta-row {
  margin-bottom: 0;
  font-size: 0.9rem;
  color: #000;
  font-weight: 400;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
.meta-col .meta-row:last-child {
  border-bottom: none;
}
.meta-label {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
}
.meta-value {
  font-weight: 700;
  color: #000;
  text-align: right;
  word-break: break-word;
}
.meta-value.active {
  color: #176f41;
  background: #e2f5e8;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}
.meta-value.inactive {
  color: #e74c3c;
  background: #feebeb;
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}
.intel-content div {
  margin-bottom: 12px;
  font-size: 0.95rem;
  color: var(--text-muted);
}
.intel-content strong {
  font-weight: 600;
  color: var(--text-primary);
}

/* Utility */
.loading-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  color: #fff;
}
.loading-overlay.active {
  display: flex;
}
.spinner {
  width: 44px;
  height: 44px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 1rem;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: var(--accent-blue);
  color: #fff;
  padding: 14px 24px;
  border-radius: 8px;
  transform: translateY(200%);
  transition:
    transform 0.3s ease,
    background 0.3s ease;
  font-weight: 600;
  z-index: 10000;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}
.toast.show {
  transform: translateY(0);
}
.toast.error {
  background: #e74c3c;
}
.toast.warning {
  background: #f39c12;
}
.toast.info {
  background: var(--bg-sidebar-active);
}

.search-alert {
  margin-top: 1rem;
  padding: 1rem 1.5rem;
  background: #f39c12;
  color: #fff;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.5;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  box-shadow: 0 4px 15px rgba(243, 156, 18, 0.2);
  animation: slideIn 0.3s ease;
}

.search-alert::before {
  content: "warning";
  font-family: "Material Symbols Outlined";
  font-size: 22px;
  flex-shrink: 0;
}

.search-alert.hidden {
  display: none !important;
}

/* Added Map Styles */
#map {
  width: 100%;
  height: 400px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  overflow: hidden;
  z-index: 1;
}
.map-card {
  padding: 1.5rem;
}
.leaflet-popup-content-wrapper {
  background: white !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 8px !important;
  color: var(--text-dark) !important;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1) !important;
}
.leaflet-popup-tip {
  background: white !important;
}
.popup-title {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 6px;
  color: var(--accent-blue);
}
.popup-row {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 3px 0;
}
.popup-row strong {
  color: var(--text-dark);
}

/* Added Timeline Styles */
.timeline-card {
  padding: 1.5rem;
  max-height: 440px;
  overflow-y: auto;
}
.timeline {
  position: relative;
  padding-left: 20px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border-color);
}
.tl-item {
  position: relative;
  margin-bottom: 1.2rem;
  padding: 1rem;
  background: #fdfdfd;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  transition: var(--transition);
}
.tl-item:hover {
  background: #f5f8fa;
  border-color: #d1d9e6;
}
.tl-item::before {
  content: "";
  position: absolute;
  left: -21px;
  top: 18px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent-blue);
  border: 2px solid white;
}
.tl-plaza {
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 4px;
  color: var(--text-dark);
}
.tl-time {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.dir-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.dir-N {
  background: #e2f5e8;
  color: #176f41;
}
.dir-S {
  background: #feebeb;
  color: #e74c3c;
}
.dir-E {
  background: #ebf5ff;
  color: #2980b9;
}
.dir-W {
  background: #fef5e6;
  color: #d35400;
}

/* ===== LANDING PAGE & MODAL ===== */
.landing-page {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 100vh;
  background: var(--bg-sidebar);
  color: #fff;
}
.landing-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.landing-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.landing-brand .icon {
  font-size: 1.8rem;
}
.landing-brand .text {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}
.btn-outline {
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  padding: 10px 24px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-outline:hover {
  background: #fff;
  color: var(--bg-sidebar);
}

.landing-hero {
  flex: 1;
  display: flex;
  padding: 4rem;
  max-width: 1400px;
  margin: 0 auto;
  align-items: center;
  gap: 4rem;
}
.hero-content {
  flex: 1;
}
.hero-content .badge {
  display: inline-block;
  background: rgba(76, 174, 163, 0.2);
  color: #4caea3;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1.5rem;
}
.hero-content h1 {
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -1px;
}
.hero-content p {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.6;
  margin-bottom: 2.5rem;
  max-width: 500px;
}
.hero-stats {
  display: flex;
  gap: 2.5rem;
}
.hero-stats .stat {
  display: flex;
  flex-direction: column;
}
.hero-stats .num {
  font-size: 1.8rem;
  font-weight: 700;
  color: #4caea3;
}
.hero-stats .lbl {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  margin-top: 4px;
}

.hero-image {
  flex: 1;
  display: flex;
  justify-content: flex-end;
}
.mockup-card {
  width: 100%;
  max-width: 480px;
  height: 350px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 2rem;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}
.skeleton-h {
  width: 60%;
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  margin-bottom: 2rem;
}
.skeleton-r {
  width: 100%;
  height: 16px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  margin-bottom: 1rem;
}

/* Modal Auth Context overriding inline context */
.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    opacity 0.3s ease,
    visibility 0.3s ease;
}
.auth-modal.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.auth-card {
  background: #fff;
  padding: 3rem;
  border-radius: 16px;
  width: 100%;
  max-width: 440px;
  text-align: center;
  color: var(--text-dark);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  position: relative;
}
.btn-close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 1.5rem;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
}

.app-launcher-modal {
  padding: 1.5rem;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
}

.app-launcher-dialog {
  width: min(560px, 100%);
  background: #e9edf3;
  border-radius: 18px;
  padding: 3.5rem 4.2rem 3.4rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
  position: relative;
  overflow: hidden;
}

.app-launcher-dialog::before {
  content: none;
}

.app-launcher-head,
.app-launcher-grid {
  position: relative;
  z-index: 1;
}

.app-launcher-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
  color: #3c4149;
}

.app-launcher-head h2 {
  margin: 0 0 0.2rem;
  font-size: 1.4rem;
  font-weight: 800;
  color: #2f3640;
}

.app-launcher-head p {
  margin: 0;
  font-size: 0.92rem;
  color: #6f7782;
  line-height: 1.5;
}

.app-launcher-home {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.65);
  color: #c84f4f;
  box-shadow:
    -6px -6px 12px rgba(255, 255, 255, 0.82),
    8px 8px 14px rgba(171, 184, 204, 0.35);
}

.app-launcher-home .material-symbols-outlined {
  font-size: 1.35rem;
}

.app-launcher-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem 1.5rem;
  justify-items: center;
}

.app-launcher-card {
  width: 170px;
  min-height: 168px;
  border: 0;
  border-radius: 20px;
  padding: 1rem;
  background: #eef2f7;
  color: #3e434b;
  text-align: center;
  cursor: pointer;
  transition:
    transform 0.22s ease,
    box-shadow 0.22s ease,
    background 0.22s ease;
  box-shadow:
    -10px -10px 20px rgba(255, 255, 255, 0.9),
    12px 12px 24px rgba(171, 184, 204, 0.65);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
}

.app-launcher-card:hover {
  transform: translateY(-2px);
  box-shadow:
    -12px -12px 22px rgba(255, 255, 255, 0.95),
    14px 14px 28px rgba(171, 184, 204, 0.72);
}

.app-launcher-card.active {
  background: #edf2f8;
  box-shadow:
    inset -2px -2px 6px rgba(255, 255, 255, 0.75),
    inset 2px 2px 6px rgba(182, 191, 208, 0.32),
    -10px -10px 20px rgba(255, 255, 255, 0.82),
    12px 12px 24px rgba(171, 184, 204, 0.62);
}

.app-launcher-card-top {
  display: none;
}

.app-launcher-card-icon {
  display: none;
}

.app-launcher-card-pill {
  display: none;
}

.app-launcher-card-body {
  display: block;
  flex: 0;
}

.app-launcher-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: #3c4149;
  letter-spacing: 0;
  text-transform: uppercase;
}

.app-launcher-card-summary {
  display: none;
}

.app-launcher-card-meta {
  display: none;
}

.app-launcher-card-cta {
  display: none;
}

.app-launcher-dialog .btn-close {
  top: 1rem;
  right: 1.15rem;
  color: #9aa0a8;
  font-size: 2rem;
  line-height: 1;
  width: 32px;
  height: 32px;
}

@media (max-width: 640px) {
  .app-launcher-modal {
    padding: 1rem;
  }

  .app-launcher-dialog {
    width: min(360px, 100%);
    padding: 3rem 1.25rem 1.5rem;
    border-radius: 16px;
  }

  .app-launcher-head {
    align-items: flex-start;
  }

  .app-launcher-grid {
    gap: 1rem;
  }

  .app-launcher-card {
    width: 140px;
    min-height: 138px;
    border-radius: 18px;
  }

  .app-launcher-card-title {
    font-size: 0.92rem;
  }
}
.auth-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}
.auth-card h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.auth-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}
.input-group {
  margin-bottom: 1.25rem;
  text-align: left;
}
.input-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 6px;
  text-transform: uppercase;
}
.input-group input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
}
.input-group input:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px rgba(15, 53, 85, 0.1);
}
.auth-error {
  margin-top: 1rem;
  color: #e74c3c;
  font-size: 0.85rem;
  font-weight: 500;
}

.auth-divider {
  margin: 1.5rem 0;
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 600;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--border-color);
}
.auth-divider span {
  padding: 0 10px;
}

.btn-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #ffffff;
  border: 1px solid #dadce0;
  padding: 12px 16px;
  border-radius: 8px;
  font-weight: 500;
  color: #3c4043;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-size: 0.95rem;
  box-shadow:
    0 1px 2px 0 rgba(60, 64, 67, 0.3),
    0 1px 3px 1px rgba(60, 64, 67, 0.15);
}

.btn-google:hover {
  background: #f8f9fa;
  border-color: #d2e3fc;
  box-shadow:
    0 1px 3px 0 rgba(60, 64, 67, 0.3),
    0 4px 8px 3px rgba(60, 64, 67, 0.15);
}

.btn-google:active {
  background: #eeeeee;
  box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3);
}

.btn-google img {
  width: 20px;
  height: 20px;
}

.auth-toggle {
  margin-top: 1.5rem;
  font-size: 0.9rem;
}

.auth-toggle a {
  color: var(--accent-blue);
  font-weight: 700;
  text-decoration: none;
  margin-left: 5px;
}

.auth-toggle a:hover {
  text-decoration: underline;
}



/* Sign Out Button */
.btn-logout {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
  padding: 12px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
  margin-top: auto;
}

.btn-logout:hover {
  background: var(--bg-sidebar-hover);
  border-color: rgba(255, 255, 255, 0.2);
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn-logout .icon {
  font-size: 1.1rem;
}

/* Analytics & Dashboard Sections */
.dashboard-section {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.analytics-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 1.5rem;
}

.bar {
  transition: height 1s ease-out;
}

.breach-list > div {
  animation: slideIn 0.3s ease forwards;
  opacity: 0;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.breach-list > div:nth-child(1) {
  animation-delay: 0.1s;
}
.breach-list > div:nth-child(2) {
  animation-delay: 0.2s;
}

/* Responsive Overrides */
.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 8px;
  margin-right: 10px;
}

.sidebar-toggle .material-symbols-outlined {
  font-size: 28px;
}

.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  backdrop-filter: blur(2px);
}

@media (max-width: 1024px) {
  .landing-hero {
    flex-direction: column;
    padding: 2rem;
    text-align: center;
    gap: 2rem;
  }

  .hero-content {
    order: 2;
  }

  .hero-image-wrapper {
    order: 1;
    justify-content: center !important;
  }

  .hero-content p {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-stats {
    justify-content: center;
  }

  .content-grid,
  .analytics-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    transform: translateX(-100%);
    z-index: 1001;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .sidebar.active {
    transform: translateX(0);
  }

  .sidebar-backdrop.active {
    display: block;
  }

  .main-content {
    margin-left: 0;
    padding: 1.5rem;
    width: 100%;
  }

  .sidebar-toggle {
    display: flex;
    align-items: center;
  }

  .landing-nav {
    padding: 1rem 1.5rem;
  }

  .landing-links {
    display: none;
  }
}

@media (max-width: 768px) {
  h1 {
    font-size: 1.75rem;
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }

  .stats-row {
    flex-direction: column;
    gap: 1rem;
  }

  .top-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .gov-badge {
    width: 100%;
    text-align: center;
  }

  .search-box {
    flex-direction: column;
  }

  .search-actions {
    width: 100%;
  }

  .search-actions button {
    flex: 1;
  }

  .meta-grid {
    grid-template-columns: 1fr;
  }

  .landing-features {
    padding: 3rem 1.5rem !important;
  }

  .landing-how {
    padding: 3rem 1.5rem !important;
  }

  .how-container {
    flex-direction: column;
    gap: 2rem;
  }

  .landing-footer {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
    padding: 2rem 1.5rem !important;
  }

  .auth-card {
    padding: 2rem 1.5rem;
    margin: 1rem;
    max-height: 90vh;
    overflow-y: auto;
  }

  .logs-table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-stats {
    flex-direction: column;
    gap: 1rem;
  }

  .hero-cta {
    width: 100%;
  }

  .landing-brand .text {
    font-size: 1rem;
  }

  .feature-card {
    margin-bottom: 1rem;
  }
  
  .timeline-card {
    padding: 1rem;
  }
  
  .tl-item {
    padding: 0.75rem;
  }

  .sidebar {
    width: 100%;
  }
}
