/* Defense Ledger — Core Styles */
:root {
  --bg:       #0a0c10;
  --bg2:      #111318;
  --bg3:      #1a1d24;
  --border:   #2a2d35;
  --border2:  #3a3d48;
  --text:     #d4d8e2;
  --text2:    #8b919e;
  --text3:    #5a6070;
  --accent:   #4a9eff;
  --accent2:  #2563d8;
  --green:    #22c55e;
  --red:      #ef4444;
  --yellow:   #f59e0b;
  --radius:   6px;
  --radius2:  10px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: 'Inter', sans-serif; font-size: 14px; line-height: 1.6; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ── Header ─────────────────────────────────────────────────────────────── */
.site-header { background: var(--bg2); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 100; }
.site-header .container { display: flex; align-items: center; gap: 32px; height: 56px; }
.logo { display: flex; align-items: center; }
.logo:hover { text-decoration: none; opacity: .85; }
.logo-img { height: 28px; width: auto; max-width: 280px; display: block; object-fit: contain; }
.main-nav { display: flex; gap: 4px; flex: 1; }
.main-nav a { color: var(--text2); font-size: 13px; padding: 6px 10px; border-radius: var(--radius); transition: all 0.15s; }
.main-nav a:hover { color: var(--text); background: var(--bg3); text-decoration: none; }
.nav-highlight { background: var(--accent2) !important; color: white !important; font-weight: 500; }
.admin-link { font-size: 12px; color: var(--text3); }

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero { padding: 48px 0 32px; border-bottom: 1px solid var(--border); margin-bottom: 32px; display: flex; justify-content: space-between; align-items: center; }
.hero h1 { font-size: 36px; font-weight: 700; color: white; line-height: 1.2; }
.hero .accent { color: var(--accent); }
.hero p { color: var(--text2); font-size: 15px; margin-top: 8px; }
.hero-stats { display: flex; gap: 8px; flex-wrap: wrap; }
.stat-pill { background: var(--bg3); border: 1px solid var(--border); border-radius: 20px; padding: 6px 14px; font-size: 12px; color: var(--text2); }

/* ── Home grid ───────────────────────────────────────────────────────────── */
.home-grid { display: grid; grid-template-columns: 1fr 320px; gap: 32px; }
@media (max-width: 900px) { .home-grid { grid-template-columns: 1fr; } }

/* ── Section header ─────────────────────────────────────────────────────── */
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; border-bottom: 1px solid var(--border); padding-bottom: 12px; }
.section-header h2 { font-size: 15px; font-weight: 600; color: white; }
.see-all { font-size: 12px; color: var(--accent); }
.section-title { font-size: 16px; font-weight: 600; color: white; margin: 28px 0 16px; }

/* ── News cards ─────────────────────────────────────────────────────────── */
.news-feed .news-card, .news-list .news-card { border-bottom: 1px solid var(--border); padding: 16px 0; }
.news-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.news-card h3 { font-size: 14px; font-weight: 500; color: white; margin-bottom: 4px; }
.news-card h3 a { color: white; }
.news-card h3 a:hover { color: var(--accent); text-decoration: none; }
.news-summary { font-size: 12px; color: var(--text2); margin-top: 4px; }
.news-source { font-size: 11px; color: var(--text3); }
.news-date { font-size: 11px; color: var(--text3); }
.news-score { font-size: 11px; color: var(--text3); background: var(--bg3); padding: 1px 5px; border-radius: 4px; }
.news-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.news-card-sm { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.news-card-sm a { color: var(--text); flex: 1; }
.news-card-sm a:hover { color: var(--accent); }
.news-card-sm .news-date { margin-left: auto; white-space: nowrap; }

/* ── Category badges ─────────────────────────────────────────────────────── */
.cat-badge { font-size: 10px; font-weight: 600; padding: 2px 6px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.cat-procurement    { background: #1e3a5f; color: #7eb8ff; }
.cat-export         { background: #1a3d2e; color: #6ee7a0; }
.cat-test-delivery  { background: #3b2a12; color: #f5b942; }
.cat-rd             { background: #2d1a40; color: #c084fc; }
.cat-policy         { background: #2a1f1a; color: #fb923c; }
.cat-company-news   { background: #1e2535; color: #94a3b8; }
.cat-event          { background: #1a2a3a; color: #67c5f8; }
.cat-international  { background: #261a2a; color: #e879f9; }
.cat-program        { background: #1a2a20; color: #4ade80; }

/* ── Entity tags ─────────────────────────────────────────────────────────── */
.entity-tag { font-size: 11px; background: var(--bg3); border: 1px solid var(--border2); border-radius: 4px; padding: 2px 6px; color: var(--text2); }
.entity-tag:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.company-tag { border-color: #2a4a6a; color: #7eb8ff; }
.product-tag { border-color: #2a3a2a; color: #6ee7a0; }

/* ── Sidebar ─────────────────────────────────────────────────────────────── */
.sidebar-block { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius2); padding: 16px; margin-bottom: 16px; }
.sidebar-block h3 { font-size: 13px; font-weight: 600; color: white; margin-bottom: 12px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }

/* ── YouTube ─────────────────────────────────────────────────────────────── */
.yt-embed-main { position: relative; padding-bottom: 56.25%; height: 0; border-radius: var(--radius); overflow: hidden; margin-bottom: 8px; }
.yt-embed-main iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.yt-title { font-size: 12px; color: var(--text); font-weight: 500; }
.yt-channel { font-size: 11px; color: var(--text3); margin-top: 2px; }
.yt-thumb { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/9; background: var(--bg3); }
.yt-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yt-play { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); background: rgba(0,0,0,0.7); color: white; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; pointer-events: none; }
.yt-card-title { font-size: 12px; color: var(--text); margin-top: 6px; font-weight: 500; line-height: 1.4; }
.yt-card-channel { font-size: 11px; color: var(--text3); }
.yt-thumb-sm { margin-bottom: 12px; }
.yt-thumb-sm .yt-play-sm { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); background: rgba(0,0,0,0.7); color: white; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; }
.yt-sm-title { font-size: 11px; color: var(--text2); margin-top: 4px; }

/* ── Video grids ─────────────────────────────────────────────────────────── */
.video-section { margin-top: 40px; }
.video-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.video-grid-full { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; margin-top: 24px; }

/* ── Events ─────────────────────────────────────────────────────────────── */
.event-row { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); align-items: flex-start; }
.event-date { font-size: 11px; color: var(--accent); font-family: 'JetBrains Mono', monospace; white-space: nowrap; min-width: 80px; }
.event-name { font-size: 13px; color: var(--text); font-weight: 500; }
.event-name:hover { color: var(--accent); }
.event-loc { font-size: 11px; color: var(--text3); }
.events-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px; }
.event-card { display: flex; gap: 20px; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius2); padding: 16px 20px; transition: border-color 0.15s; }
.event-card:hover { border-color: var(--accent); text-decoration: none; }
.event-card.past { opacity: 0.6; }
.event-dates { font-size: 12px; color: var(--accent); font-family: 'JetBrains Mono', monospace; min-width: 90px; }
.event-body h3 { font-size: 15px; font-weight: 600; color: white; margin-bottom: 4px; }
.event-desc { font-size: 12px; color: var(--text2); margin-top: 4px; }
.event-type-badge { font-size: 10px; background: var(--bg3); border: 1px solid var(--border2); border-radius: 4px; padding: 2px 6px; color: var(--text3); margin-top: 6px; display: inline-block; }

/* ── Company grid ────────────────────────────────────────────────────────── */
.company-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; margin-top: 24px; }
.company-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius2); padding: 16px; display: flex; gap: 12px; transition: border-color 0.15s; }
.company-card:hover { border-color: var(--accent); text-decoration: none; }
.company-logo { width: 48px; height: 48px; object-fit: contain; border-radius: var(--radius); }
.company-logo-placeholder { width: 48px; height: 48px; border-radius: var(--radius); background: var(--bg3); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 700; color: var(--text2); flex-shrink: 0; }
.company-info h3 { font-size: 14px; font-weight: 600; color: white; }
.company-name-en { font-size: 12px; color: var(--text3); }
.company-city { font-size: 12px; color: var(--text3); margin-top: 2px; }
.company-bio { font-size: 12px; color: var(--text2); margin-top: 4px; }
.company-cats { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.company-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.company-chip { font-size: 11px; background: var(--bg3); border: 1px solid var(--border2); border-radius: 4px; padding: 3px 8px; color: var(--text2); }
.company-chip:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.cat-tag { font-size: 10px; background: var(--bg3); border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; color: var(--text3); }

/* ── Profile (company detail) ────────────────────────────────────────────── */
.profile-header { display: flex; gap: 20px; align-items: flex-start; margin: 24px 0; }
.profile-logo { width: 72px; height: 72px; object-fit: contain; border-radius: var(--radius2); }
.profile-logo-ph { width: 72px; height: 72px; border-radius: var(--radius2); background: var(--bg3); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; color: var(--text2); flex-shrink: 0; }
.profile-header h1 { font-size: 24px; font-weight: 700; color: white; }
.sub-name { font-size: 14px; color: var(--text3); margin-top: 2px; }
.meta-row { display: flex; gap: 12px; margin-top: 8px; font-size: 12px; color: var(--text2); flex-wrap: wrap; }
.meta-row a { color: var(--accent); }
.tag-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.profile-bio { font-size: 14px; color: var(--text2); max-width: 680px; margin-bottom: 28px; line-height: 1.7; }
.profile-grid { display: grid; grid-template-columns: 1fr 280px; gap: 32px; }
@media (max-width: 840px) { .profile-grid { grid-template-columns: 1fr; } }
.profile-section { margin-bottom: 32px; }
.profile-section h2 { font-size: 15px; font-weight: 600; color: white; margin-bottom: 12px; border-bottom: 1px solid var(--border); padding-bottom: 8px; }
.product-list { display: flex; flex-direction: column; gap: 12px; }
.product-row { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; }
.product-name { font-size: 14px; font-weight: 500; color: white; }
.product-desc { font-size: 12px; color: var(--text2); margin-top: 4px; }
.profile-aside .sidebar-block { margin-bottom: 16px; }

/* ── Briefings ───────────────────────────────────────────────────────────── */
.briefings-list { display: flex; flex-direction: column; gap: 16px; margin-top: 24px; }
.briefing-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius2); padding: 20px; transition: border-color 0.15s; }
.briefing-card:hover { border-color: var(--accent); text-decoration: none; }
.briefing-period { font-size: 11px; color: var(--accent); font-family: 'JetBrains Mono', monospace; margin-bottom: 6px; }
.briefing-card h3 { font-size: 16px; font-weight: 600; color: white; margin-bottom: 8px; }
.briefing-preview { font-size: 13px; color: var(--text2); }
.briefing-date { font-size: 11px; color: var(--text3); margin-top: 8px; display: block; }
.brief-container { max-width: 720px; }
.brief-header { margin: 24px 0; }
.brief-period { font-size: 12px; color: var(--accent); font-family: 'JetBrains Mono', monospace; }
.brief-header h1 { font-size: 24px; font-weight: 700; color: white; margin-top: 8px; }
.brief-date { font-size: 12px; color: var(--text3); margin-top: 6px; }
.brief-body { font-size: 14px; color: var(--text); line-height: 1.8; }
.brief-body h2 { font-size: 18px; color: white; margin: 24px 0 8px; }
.brief-body h3 { font-size: 15px; color: white; margin: 20px 0 6px; }
.brief-footer { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border); }

/* ── Article ─────────────────────────────────────────────────────────────── */
.art-container { max-width: 720px; }
.article-full { padding: 24px 0; }
.article-full h1 { font-size: 22px; font-weight: 700; color: white; margin: 12px 0; line-height: 1.4; }
.article-summary { font-size: 15px; color: var(--text2); line-height: 1.7; margin: 16px 0; padding: 16px; background: var(--bg2); border-left: 3px solid var(--accent); border-radius: 0 var(--radius) var(--radius) 0; }
.entity-section { margin: 24px 0; }
.entity-section h3 { font-size: 13px; font-weight: 600; color: var(--text2); margin-bottom: 8px; }
.entity-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.source-block { margin: 24px 0; }
.btn-source { display: inline-block; background: var(--bg2); border: 1px solid var(--border2); border-radius: var(--radius); padding: 10px 18px; color: var(--accent); font-size: 13px; }
.btn-source:hover { background: var(--bg3); text-decoration: none; }
.related-videos { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border); }
.related-videos h3 { font-size: 15px; font-weight: 600; color: white; margin-bottom: 16px; }

/* ── Admin ───────────────────────────────────────────────────────────────── */
.admin-container { padding-top: 24px; padding-bottom: 48px; }
.admin-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; }
.admin-stats { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--text2); }
.queue-hint { font-size: 12px; color: var(--text3); margin-bottom: 16px; }
.queue-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius2); padding: 16px; margin-bottom: 12px; }
.queue-card.status-draft { border-left: 3px solid var(--accent); }
.queue-card.status-scored { border-left: 3px solid var(--border2); }
.queue-meta { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; font-size: 12px; }
.queue-source { color: var(--text3); }
.queue-status { color: var(--text3); font-family: 'JetBrains Mono', monospace; font-size: 11px; }
.queue-date { color: var(--text3); margin-left: auto; }
.queue-form { display: flex; flex-direction: column; gap: 8px; }
.edit-title { background: var(--bg3); border: 1px solid var(--border2); border-radius: var(--radius); padding: 8px 12px; color: white; font-size: 14px; font-weight: 500; width: 100%; }
.edit-summary { background: var(--bg3); border: 1px solid var(--border2); border-radius: var(--radius); padding: 8px 12px; color: var(--text2); font-size: 13px; width: 100%; resize: vertical; }
.queue-actions { display: flex; gap: 8px; }
.score-badge { font-size: 11px; font-family: 'JetBrains Mono', monospace; padding: 2px 6px; border-radius: 4px; font-weight: 700; }
.score-high { background: #1a3d2e; color: var(--green); }
.score-mid  { background: #3b2a12; color: var(--yellow); }
.score-low  { background: #2a1a1a; color: var(--red); }
.source-link { font-size: 11px; color: var(--accent); }
.btn-publish { background: var(--green); color: white; border: none; border-radius: var(--radius); padding: 7px 16px; font-size: 13px; font-weight: 600; cursor: pointer; }
.btn-reject  { background: transparent; color: var(--red); border: 1px solid var(--red); border-radius: var(--radius); padding: 6px 14px; font-size: 13px; cursor: pointer; margin-top: 8px; }
.btn-sm { font-size: 12px; background: var(--bg3); border: 1px solid var(--border2); border-radius: var(--radius); padding: 5px 10px; color: var(--text2); }
.brief-preview { font-size: 12px; color: var(--text3); margin: 8px 0; white-space: pre-wrap; max-height: 120px; overflow: hidden; }

/* ── Login ───────────────────────────────────────────────────────────────── */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-box { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius2); padding: 40px; width: 320px; text-align: center; }
.login-logo { font-size: 22px; color: var(--accent); font-weight: 700; margin-bottom: 8px; }
.login-box h2 { font-size: 18px; color: white; margin-bottom: 20px; }
.login-box input { width: 100%; background: var(--bg3); border: 1px solid var(--border2); border-radius: var(--radius); padding: 10px 14px; color: white; font-size: 14px; margin-bottom: 12px; }
.login-box button { width: 100%; background: var(--accent2); color: white; border: none; border-radius: var(--radius); padding: 10px; font-size: 14px; font-weight: 600; cursor: pointer; }

/* ── Misc ────────────────────────────────────────────────────────────────── */
.page-header { padding: 32px 0 24px; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.page-header h1 { font-size: 24px; font-weight: 700; color: white; margin-bottom: 4px; }
.page-header p { font-size: 14px; color: var(--text2); }
.breadcrumb { font-size: 12px; color: var(--text3); margin: 16px 0; }
.breadcrumb a { color: var(--text3); }
.breadcrumb a:hover { color: var(--accent); }
.search-bar { display: flex; gap: 8px; margin-bottom: 24px; }
.search-bar input { flex: 1; background: var(--bg2); border: 1px solid var(--border2); border-radius: var(--radius); padding: 9px 14px; color: white; font-size: 14px; }
.search-bar button { background: var(--accent2); color: white; border: none; border-radius: var(--radius); padding: 9px 20px; cursor: pointer; font-size: 14px; }
.cat-filters { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.cat-filters a { font-size: 11px; background: var(--bg3); border: 1px solid var(--border); border-radius: 4px; padding: 4px 10px; color: var(--text2); }
.cat-filters a.active, .cat-filters a:hover { background: var(--accent2); border-color: var(--accent); color: white; text-decoration: none; }
.pagination { display: flex; justify-content: center; align-items: center; gap: 16px; padding: 32px 0; font-size: 13px; color: var(--text2); }
.btn-page { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 7px 16px; color: var(--text); }
.btn-page:hover { border-color: var(--accent); text-decoration: none; }
.empty-state { color: var(--text3); font-size: 13px; padding: 32px 0; text-align: center; }
.error { color: var(--red); font-size: 13px; margin-bottom: 12px; }

/* ── Footer ─────────────────────────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--border); background: var(--bg2); margin-top: 80px; padding: 40px 0 24px; }
.footer-cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; margin-bottom: 24px; }
.footer-cols a { display: block; font-size: 13px; color: var(--text3); margin-bottom: 6px; }
.footer-cols a:hover { color: var(--text); text-decoration: none; }
.footer-brand { font-size: 16px; color: var(--accent); font-weight: 600; margin-bottom: 6px; }
.footer-tagline { font-size: 12px; color: var(--text3); }
.footer-heading { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--text3); margin-bottom: 10px; }
.footer-copy { font-size: 11px; color: var(--text3); border-top: 1px solid var(--border); padding-top: 16px; }
.site-main { padding: 0 0 40px; min-height: calc(100vh - 56px - 200px); }
