:root {
  --bg: #0D1B2A;
  --card: #1A2B3C;
  --card-2: #142433;
  --accent: #00F5D4;
  --accent-soft: rgba(0, 245, 212, 0.15);
  --text: #F5F7FA;
  --muted: #A7B4C2;
  --danger: #FF6B6B;
  --warning: #F6C453;
  --success: #2DD4BF;
  --border: #24384B;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, sans-serif;
  min-height: 100%;
}

body {
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
  letter-spacing: 0.01em;
}

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

a:hover {
  text-decoration: underline;
}

.container {
  width: min(1200px, 92vw);
  margin: 0 auto;
}

header {
  padding: 32px 0 12px;
}

.site-header {
  border-top: 3px solid var(--accent);
}

.site-header .brand {
  align-items: center;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 16px;
  flex-wrap: wrap;
}

.brand-icon {
  width: 28px;
  height: 28px;
  color: var(--accent);
  flex: 0 0 auto;
}

.brand-icon path {
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand h1 {
  font-size: clamp(28px, 3vw, 40px);
  margin: 0;
}

.brand p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.banner {
  background: #0f2a33;
  border: 1px solid #13414c;
  color: #9feee3;
  padding: 10px 16px;
  border-radius: 10px;
  margin: 16px 0 24px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2DD4BF;
  box-shadow: 0 0 0 rgba(45, 212, 191, 0.0);
  animation: pulseDot 1.6s ease-in-out infinite;
  flex: 0 0 auto;
}

@keyframes pulseDot {
  0% { box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.0); }
  50% { box-shadow: 0 0 10px 4px rgba(45, 212, 191, 0.25); }
  100% { box-shadow: 0 0 0 0 rgba(45, 212, 191, 0.0); }
}

.dropzone {
  border: 2px dashed #2a4a61;
  border-radius: 14px;
  padding: 32px;
  text-align: center;
  background: var(--card-2);
  box-shadow: inset 0 0 40px rgba(0, 245, 212, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.dropzone.dragover {
  border-color: var(--accent);
  box-shadow: inset 0 0 60px rgba(0, 245, 212, 0.12);
  animation: pulse 1.2s infinite;
}

@keyframes pulse {
  0% { box-shadow: inset 0 0 60px rgba(0, 245, 212, 0.12); }
  50% { box-shadow: inset 0 0 80px rgba(0, 245, 212, 0.18); }
  100% { box-shadow: inset 0 0 60px rgba(0, 245, 212, 0.12); }
}

.dropzone h2 {
  margin: 0 0 8px;
  font-size: 22px;
}

.dropzone p {
  margin: 6px 0;
  color: var(--muted);
}

#file-input {
  display: none;
}

.dropzone .cta {
  display: inline-block;
  margin-top: 14px;
  background: var(--accent);
  color: #08201c;
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.thumbnail-strip {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 18px 4px 8px;
}

.feature-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.feature-pill {
  background: rgba(0, 245, 212, 0.1);
  border: 1px solid rgba(0, 245, 212, 0.2);
  color: #9feee3;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.is-hidden {
  display: none !important;
}

.thumb-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  min-width: 180px;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.thumb-card:hover {
  transform: scale(1.03);
}

.thumb-card.active {
  border-color: var(--accent);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.thumb-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
}

.thumb-meta {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  margin-top: 6px;
}

.badge.gps {
  background: rgba(255, 107, 107, 0.15);
  color: #ff9a9a;
}

.badge.nogps {
  background: rgba(45, 212, 191, 0.15);
  color: #8bf5de;
}

.badge.pending {
  background: rgba(246, 196, 83, 0.15);
  color: #f6c453;
}

.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin: 22px 0 30px;
  box-shadow: var(--shadow);
}

.panel.hidden {
  display: none;
}

.tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.tab-btn {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
  position: relative;
  overflow: hidden;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.tab-btn::after {
  content: '';
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 6px;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.tab-btn.active {
  border-color: var(--accent);
  color: var(--accent);
}

.tab-btn.active::after {
  transform: scaleX(1);
}
.tab-content {
  display: none;
}

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

.risk-score {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.risk-score .score {
  font-size: 36px;
  font-weight: 700;
}

.risk-pill {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

.risk-pill.low {
  background: rgba(45, 212, 191, 0.15);
  color: #7ff3de;
}

.risk-pill.medium {
  background: rgba(246, 196, 83, 0.15);
  color: #f6c453;
}

.risk-pill.high {
  background: rgba(255, 107, 107, 0.15);
  color: #ff9a9a;
  animation: riskPulse 2s ease-in-out infinite;
}

@keyframes riskPulse {
  0% { box-shadow: 0 0 0 rgba(255, 107, 107, 0.0); }
  50% { box-shadow: 0 0 18px rgba(255, 107, 107, 0.35); }
  100% { box-shadow: 0 0 0 rgba(255, 107, 107, 0.0); }
}

.meta-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 10px;
}

.button {
  background: var(--accent);
  color: #08201c;
  border: none;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 245, 212, 0.2);
}

.button.secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.button.danger {
  background: var(--danger);
  color: #1b0b0b;
}

.button.small {
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 8px;
}

.meta-section {
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: #122434;
}

.meta-section summary {
  padding: 12px 16px;
  cursor: pointer;
  font-weight: 600;
  background: #142a3a;
}

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

.meta-table th, .meta-table td {
  padding: 10px 14px;
  border-bottom: 1px solid #1e3446;
  text-align: left;
  vertical-align: top;
}

.meta-table td.value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace;
  color: #d2dae4;
  word-break: break-word;
}

.meta-table tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.02);
}

.meta-table tr.sensitive td {
  color: #ffb3b3;
}

.meta-table tr.sensitive td:first-child {
  border-left: 3px solid rgba(0, 245, 212, 0.35);
  padding-left: 11px;
}

.meta-table tr.sensitive td.value::before {
  content: '⚠ ';
}

.location-warning {
  background: rgba(255, 107, 107, 0.12);
  border: 1px solid rgba(255, 107, 107, 0.4);
  padding: 12px 14px;
  border-radius: 10px;
  margin: 12px 0;
  color: #ffb3b3;
}

.location-ok {
  background: rgba(45, 212, 191, 0.1);
  border: 1px solid rgba(45, 212, 191, 0.4);
  padding: 12px 14px;
  border-radius: 10px;
  color: #86f1dc;
}

.map {
  height: 320px;
  border-radius: 12px;
  overflow: hidden;
  margin-top: 12px;
  border: 1px solid var(--border);
}

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

.strip-card {
  background: #132637;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
}

.strip-card h3 {
  margin-top: 0;
}

.strip-card .status {
  color: var(--muted);
  font-size: 13px;
  margin-top: 10px;
}

.progress {
  background: #0f2231;
  border-radius: 999px;
  overflow: hidden;
  height: 10px;
  margin-top: 10px;
  border: 1px solid #163647;
}

.progress span {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.2s ease;
}

.batch-panel {
  margin-top: 18px;
}

.batch-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

.batch-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 12px;
  font-size: 13px;
}

.batch-table th, .batch-table td {
  border-bottom: 1px solid #203446;
  padding: 10px;
  text-align: left;
}

.batch-table img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 8px;
}

.empty-state {
  color: var(--muted);
  text-align: center;
  padding: 40px 0;
}

footer {
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding: 24px 0 40px;
  color: var(--muted);
  font-size: 14px;
}

.site-footer {
  background: #111D2B;
  border-top: 1px solid #1f3445;
  margin-top: 40px;
  padding: 28px 0 40px;
}

.site-footer .footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
}

.footer-tagline {
  margin-top: 6px;
  color: var(--muted);
}

.footer-privacy {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #9feee3;
  font-size: 13px;
}

.site-footer .footer-links {
  display: grid;
  gap: 10px;
  text-align: right;
}

.site-footer .footer-links a {
  color: var(--accent);
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.article {
  padding: 24px 0 40px;
}

.article h1 {
  font-size: clamp(26px, 3vw, 36px);
  color: var(--text);
}

.article h2 {
  margin-top: 28px;
  font-size: 20px;
  color: var(--text);
}

.article p {
  line-height: 1.7;
  color: #d9e2ec;
}

.article .cta {
  margin: 24px 0;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #112635;
}

.article-page {
  width: min(720px, 92vw);
  margin: 0 auto;
}

.article-page h1 {
  font-size: clamp(28px, 3.2vw, 40px);
  border-left: 4px solid var(--accent);
  padding-left: 16px;
  color: var(--text);
}

.article-page h2 {
  margin-top: 28px;
  font-size: 20px;
  color: var(--accent);
}

.article-page p {
  line-height: 1.8;
  color: #CBD5E0;
}

.article-page code {
  background: #0D1B2A;
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', monospace;
  font-size: 0.95em;
}

.article-page pre {
  background: #0D1B2A;
  padding: 12px 14px;
  border-radius: 8px;
  overflow-x: auto;
}

.article-page pre code {
  background: none;
  padding: 0;
  display: block;
}

.article-page blockquote {
  border-left: 3px solid var(--accent);
  margin: 16px 0;
  padding-left: 16px;
  color: #B7C7D6;
  font-style: italic;
}

.article-header {
  border-bottom: 1px solid rgba(0, 245, 212, 0.4);
  padding: 18px 0;
}

.article-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.article-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 700;
}

.article-back {
  color: var(--accent);
  font-weight: 600;
}

.article-page .article-cta {
  margin: 32px 0 10px;
  padding: 18px;
  border-radius: 12px;
  border: 1px solid rgba(0, 245, 212, 0.4);
  background: rgba(0, 245, 212, 0.08);
}

.article-page .article-cta h3 {
  margin: 0 0 6px;
  color: var(--text);
}

.article-page .article-cta p {
  margin: 0 0 12px;
  color: #CBD5E0;
}

.article-page .article-cta .button {
  display: inline-block;
}

.articles-section {
  margin: 30px 0 10px;
}

.articles-header h2 {
  margin-bottom: 6px;
}

.articles-header p {
  margin-top: 0;
  color: var(--muted);
}

.articles-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.article-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.article-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 245, 212, 0.15);
}

.article-card h3 {
  margin-top: 0;
  margin-bottom: 8px;
  color: var(--text);
}

.article-card p {
  margin-top: 0;
  color: var(--muted);
}

.article-card a {
  color: var(--accent);
  font-weight: 600;
}

@media (max-width: 900px) {
  .batch-table th:nth-child(4),
  .batch-table td:nth-child(4),
  .batch-table th:nth-child(5),
  .batch-table td:nth-child(5) {
    display: none;
  }

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

@media (max-width: 700px) {
  .thumbnail-strip {
    padding-bottom: 16px;
  }
  .batch-table th:nth-child(3),
  .batch-table td:nth-child(3) {
    display: none;
  }

  .site-footer .footer-links {
    text-align: left;
  }
}
