:root {
  /* Theme Variables: Professional Dark (Default) */
  --bg-main: #101417;
  --bg-card: #181f23;
  --bg-card-hover: #20292e;
  --border-color: rgba(255, 255, 255, 0.08);
  --text-main: #f8fafc;
  --text-muted: #a6b0b8;
  
  --primary: #2f80ed;
  --primary-gradient: linear-gradient(135deg, #2f80ed 0%, #0f766e 100%);
  --accent: #0f766e;
  --accent-gradient: linear-gradient(135deg, #0f766e 0%, #2f80ed 100%);
  --success: #16a34a;
  --warning: #c47a1a;
  --danger: #dc2626;
  
  --font-title: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.15);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.35);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --radius: 8px;
}

/* Light Theme Overrides */
html.light-theme, body.light-theme {
  --bg-main: #f3f4f6;
  --bg-card: #ffffff;
  --bg-card-hover: #f9fafb;
  --border-color: rgba(0, 0, 0, 0.08);
  --text-main: #111827;
  --text-muted: #6b7280;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.12);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  font-family: var(--font-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-title);
  font-weight: 700;
  letter-spacing: 0;
}

/* Header */
header {
  background: rgba(22, 31, 48, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 0 24px;
  height: 64px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: background 0.3s ease;
}
html.light-theme header,
body.light-theme header {
  background: rgba(255, 255, 255, 0.85);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
}
.brand svg {
  width: 36px;
  height: 36px;
  filter: drop-shadow(0 0 8px rgba(47, 128, 237, 0.35));
}
.brand-text {
  display: flex;
  flex-direction: column;
}
.brand-name {
  font-size: 1.25rem;
  font-weight: 800;
  background: linear-gradient(135deg, #2f80ed, #14b8a6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand-sub {
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0;
  text-transform: uppercase;
  font-weight: 600;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin: 0;
}
.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
  transition: var(--transition);
  padding: 6px 14px;
  border-radius: 20px;
  position: relative;
}
.site-nav a:hover {
  color: var(--text-main);
  background: rgba(255,255,255,0.06);
}
.site-nav a.active {
  color: var(--text-main);
  background: rgba(47, 128, 237, 0.14);
  font-weight: 700;
}
.site-nav a.active::after {
  content: '';
  display: block;
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 18px;
  height: 3px;
  border-radius: 99px;
  background: var(--primary);
}
html.light-theme .site-nav a.active,
body.light-theme .site-nav a.active {
  background: rgba(47, 128, 237, 0.10);
}

.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.875rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: var(--transition);
  user-select: none;
}
.btn-primary {
  background: var(--primary-gradient);
  color: #fff;
  box-shadow: 0 4px 12px rgba(47, 128, 237, 0.22);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(47, 128, 237, 0.34);
}
.btn-secondary {
  background: var(--bg-card);
  border-color: var(--border-color);
  color: var(--text-main);
}
.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary);
}
.btn-accent {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.25);
}
.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(15, 118, 110, 0.34);
}
.btn-icon {
  width: 40px;
  height: 40px;
  padding: 0;
  border-radius: 50%;
}
.btn-sm {
  padding: 5px 10px;
  font-size: 0.75rem;
  border-radius: 6px;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* Theme Switcher Button */
#themeToggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

/* Main Container Grid */
.app-layout {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 400px);
  gap: 20px;
  padding: 24px;
  max-width: 1800px;
  margin: 0 auto;
  width: 100%;
}

@media (max-width: 1200px) {
  .app-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Left Section Content */
.main-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.sidebar-panel {
  min-width: 0;
}

.tool-intro,
.workflow-panel,
.trust-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.tool-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 20px;
  align-items: center;
}

.tool-intro > *,
.workflow-panel > * {
  min-width: 0;
}

.eyebrow {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
  margin-bottom: 8px;
}

.tool-intro h1 {
  font-size: clamp(1.8rem, 3vw, 2.8rem);
  line-height: 1.08;
  margin-bottom: 12px;
  overflow-wrap: anywhere;
}

.intro-copy {
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 860px;
  overflow-wrap: anywhere;
}

.intro-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.intro-actions span {
  display: flex;
  align-items: center;
  min-height: 38px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  color: var(--text-main);
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 650;
}

.workflow-panel {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 20px;
  align-items: start;
}

.workflow-panel h2 {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.workflow-panel p,
.trust-card li,
.trust-card a {
  color: var(--text-muted);
  line-height: 1.65;
  font-size: 0.9rem;
}

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

.workflow-grid div {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255,255,255,0.03);
}

.workflow-grid h3 {
  font-size: 0.96rem;
  margin-bottom: 6px;
}

.trust-card h2 {
  font-size: 1rem;
  margin-bottom: 12px;
}

.trust-card ul {
  padding-left: 18px;
  margin-bottom: 12px;
}

.trust-card a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

/* Ad Container styles */
.ad-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  min-height: 90px;
}
.ad-badge {
  position: absolute;
  top: 4px;
  right: 8px;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0;
  color: var(--text-muted);
  font-weight: 700;
}
.ad-placeholder {
  font-size: 0.8rem;
  color: var(--text-muted);
  border: 1px dashed var(--border-color);
  padding: 16px;
  border-radius: 6px;
  width: 100%;
  background: rgba(0, 0, 0, 0.05);
}

/* Statistics Dashboard Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
}
.stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
}
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: rgba(47, 128, 237, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}
.stat-info h4 {
  font-size: 1.5rem;
  line-height: 1;
  margin-bottom: 4px;
}
.stat-info p {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0;
  font-weight: 600;
}

/* File Dropzone Workspace */
.dropzone {
  border: 2px dashed rgba(47, 128, 237, 0.32);
  background: rgba(22, 31, 48, 0.4);
  border-radius: var(--radius);
  padding: 40px 24px;
  text-align: center;
  cursor: pointer;
  position: relative;
  transition: var(--transition);
  overflow: hidden;
}
html.light-theme .dropzone,
body.light-theme .dropzone {
  background: rgba(255, 255, 255, 0.95);
}
.dropzone:hover, .dropzone.dragover {
  border-color: var(--primary);
  background: rgba(47, 128, 237, 0.07);
}
.dropzone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.dropzone-icon {
  width: 64px;
  height: 64px;
  background: rgba(47, 128, 237, 0.1);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}
.dropzone:hover .dropzone-icon {
  transform: scale(1.1) rotate(5deg);
}
.dropzone-title {
  font-size: 1.125rem;
  font-weight: 600;
}
.dropzone-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}
#imageInput {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

/* Dashboard Map Card */
.map-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 450px;
  box-shadow: var(--shadow-md);
}
.panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.panel-title {
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}
.panel-title svg {
  color: var(--accent);
  width: 18px;
  height: 18px;
}
#map {
  flex: 1;
  width: 100%;
  z-index: 10;
}
/* Dark style leaflet overrides */
body:not(.light-theme) .leaflet-tile-container {
  filter: invert(100%) hue-rotate(180deg) brightness(95%) contrast(90%);
}
body:not(.light-theme) .leaflet-container {
  background: #0f172a;
}
.leaflet-popup-content-wrapper {
  background: var(--bg-card) !important;
  color: var(--text-main) !important;
  border-radius: 8px !important;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md) !important;
}
.leaflet-popup-tip {
  background: var(--bg-card) !important;
}

/* File Management List Card */
.data-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}
.data-toolbar {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.search-box {
  position: relative;
  flex: 1;
  min-width: 200px;
}
.search-box input {
  width: 100%;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 8px 12px 8px 36px;
  border-radius: 8px;
  outline: none;
  font-family: var(--font-body);
  font-size: 0.85rem;
  transition: var(--transition);
}
.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(47, 128, 237, 0.15);
}
.search-box svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  width: 16px;
  height: 16px;
}
.table-container {
  overflow-x: auto;
  max-height: 500px;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}
th {
  background: rgba(0, 0, 0, 0.08);
  padding: 12px 18px;
  color: var(--text-muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border-color);
  user-select: none;
}
td {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border-color);
  vertical-align: middle;
  transition: background-color 0.2s ease;
}
tr:hover td {
  background-color: var(--bg-card-hover);
}
.img-preview-container {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.img-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}
.img-preview:hover {
  transform: scale(1.15);
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
}
.badge-gps {
  background: rgba(15, 118, 110, 0.15);
  color: var(--accent);
}
.badge-no-gps {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}
.text-truncated {
  max-width: 180px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.actions-cell {
  display: flex;
  gap: 6px;
}

/* RIGHT COLUMN SIDEBAR PANEL */
.sidebar-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.inspector-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  position: sticky;
  top: 90px;
  transition: var(--transition);
}
.inspector-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.05);
}
.inspector-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 80vh;
  overflow-y: auto;
}
.inspector-empty {
  color: var(--text-muted);
  text-align: center;
  padding: 40px 20px;
  font-size: 0.875rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.inspector-empty svg {
  width: 48px;
  height: 48px;
  opacity: 0.4;
}

.detail-section {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 16px;
}
.detail-section:last-child {
  border: none;
  padding-bottom: 0;
}
.section-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0;
  color: var(--text-muted);
  margin-bottom: 10px;
  font-weight: 700;
}
.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
  font-size: 0.8rem;
}
.detail-label {
  color: var(--text-muted);
}
.detail-value {
  font-weight: 600;
  text-align: right;
  max-width: 60%;
  word-break: break-word;
}
.editable-value {
  border-bottom: 1px dashed var(--primary);
  cursor: pointer;
}

/* Modal / Popups Styling */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
  animation: fadeIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.modal-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 500px;
  width: 90%;
  position: relative;
  box-shadow: var(--shadow-lg);
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.25rem;
  transition: var(--transition);
}
.modal-close:hover {
  color: var(--danger);
}
.modal-form-group {
  margin-bottom: 16px;
}
.modal-form-group label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 700;
}
.modal-form-group input {
  width: 100%;
  background: var(--bg-main);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 10px 12px;
  border-radius: 8px;
  outline: none;
  font-family: var(--font-body);
  font-size: 0.875rem;
}
.modal-form-group input:focus {
  border-color: var(--primary);
}

/* Ad Block Banner reminder (Elegant & Polite) */
.adblock-alert {
  display: none;
  background: linear-gradient(135deg, rgba(47, 128, 237, 0.14) 0%, rgba(15, 118, 110, 0.14) 100%);
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 20px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.adblock-message h4 {
  font-size: 1rem;
  color: var(--text-main);
  margin-bottom: 4px;
}
.adblock-message p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Footer styling */
footer {
  border-top: 1px solid var(--border-color);
  padding: 30px 24px;
  background: rgba(22, 31, 48, 0.5);
  margin-top: auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.footer-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 0.8rem;
}
.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: var(--transition);
}
.footer-links a:hover {
  color: var(--primary);
}
.copyright {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.yoonow-link {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  display: inline-block;
}
.yoonow-link:hover {
  color: var(--accent);
}
.yoonow-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--primary);
  color: var(--text-main);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: 8px;
  white-space: nowrap;
  box-shadow: var(--shadow-md);
  z-index: 100;
  pointer-events: none;
}
.yoonow-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--primary);
}
.yoonow-link:hover .yoonow-tooltip,
.yoonow-link:focus .yoonow-tooltip {
  display: block;
}
html.light-theme footer,
body.light-theme footer {
  background: #ffffff;
  border-top-color: rgba(0, 0, 0, 0.08);
}

html.light-theme .footer-links a,
body.light-theme .footer-links a {
  color: var(--text-muted);
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}
.fade-in {
  animation: fadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Notification System */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--bg-card);
  border-left: 4px solid var(--primary);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 12px 18px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateX(-120%);
  animation: slideIn 0.3s forwards cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.toast.success { border-left-color: var(--success); }
.toast.danger { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
@keyframes slideIn {
  to { transform: translateX(0); }
}

/* Image Viewer Modal styles */
.img-modal-content {
  max-width: 90%;
  max-height: 90%;
  background: transparent;
  padding: 0;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.img-modal-content img {
  max-width: 100%;
  max-height: 85vh;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* CSS loader spinners */
.spinner {
  border: 3px solid rgba(255,255,255,0.1);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border-left-color: var(--primary);
  animation: spin 1s linear infinite;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Content Pages */
.content-page {
  max-width: 1120px;
  width: 100%;
  margin: 0 auto;
  padding: 32px 24px 56px;
}
.content-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.content-card + .content-card {
  margin-top: 18px;
}
.content-card h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.08;
  margin-bottom: 14px;
}
.content-card h2 {
  font-size: 1.35rem;
  margin: 26px 0 10px;
}
.content-card h3 {
  font-size: 1rem;
  margin: 18px 0 8px;
}
.content-card p,
.content-card li {
  color: var(--text-muted);
  line-height: 1.78;
}
.content-card ul,
.content-card ol {
  padding-left: 22px;
  margin: 10px 0;
}
.content-card a {
  color: var(--accent);
  font-weight: 700;
}
.content-meta {
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
  margin-bottom: 10px;
}
.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 18px;
}
.guide-card {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 18px;
  background: rgba(255,255,255,0.03);
  text-decoration: none;
}
.guide-card h2 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  color: var(--text-main);
}
.guide-card p {
  font-size: 0.9rem;
}
.callout {
  border-left: 4px solid var(--accent);
  background: rgba(15, 118, 110, 0.12);
  padding: 14px 16px;
  border-radius: 8px;
  margin: 18px 0;
}

@media (max-width: 980px) {
  header {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    height: auto;
    padding: 12px 24px 10px;
    gap: 0;
  }
  .brand {
    grid-column: 1;
    grid-row: 1;
  }
  .header-actions {
    grid-column: 2;
    grid-row: 1;
    justify-content: flex-end;
  }
  .site-nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    margin-top: 10px;
    overflow-x: auto;
    padding-bottom: 4px;
    gap: 2px;
  }
  .tool-intro,
  .workflow-panel {
    grid-template-columns: 1fr;
  }
  .workflow-grid,
  .guide-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  header,
  .app-layout,
  .content-page {
    padding-left: 16px;
    padding-right: 16px;
  }
  .header-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .brand-sub {
    display: none;
  }
  .tool-intro,
  .workflow-panel,
  .trust-card,
  .content-card {
    padding: 16px;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .panel-header,
  .data-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .route-toggle-bar,
  .batch-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }
}
