/* OSINT Platform - Base Styles */
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    background: #f5f7fa;
    color: #2c3e50;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background: linear-gradient(135deg, #0b66c3 0%, #075091 100%);
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand a {
    color: white;
    text-decoration: none;
    font-size: 24px;
}

.menu ul {
    display: flex;
    gap: 20px;
    list-style: none;
}

.menu a {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background 0.3s;
}

.menu a:hover {
    background: rgba(255,255,255,0.1);
}

/* Main */
main {
    padding: 40px 0;
    min-height: calc(100vh - 200px);
}

/* Hero */
.hero {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    margin-bottom: 40px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 16px;
    color: #0b66c3;
}

.subtitle {
    font-size: 20px;
    color: #666;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border-left: 4px solid #0b66c3;
}

.stat-value {
    font-size: 36px;
    font-weight: bold;
    color: #0b66c3;
    margin-bottom: 8px;
}

.stat-label {
    color: #666;
    font-size: 14px;
}

/* Posts */
.posts-list {
    display: grid;
    gap: 20px;
}

.post-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.post-source {
    display: inline-block;
    background: #e8f4ff;
    color: #0b66c3;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 12px;
}

.post-card h3 {
    margin-bottom: 12px;
}

.post-card h3 a {
    color: #2c3e50;
    text-decoration: none;
}

.post-card h3 a:hover {
    color: #0b66c3;
}

.post-summary {
    color: #666;
    line-height: 1.6;
    margin-bottom: 12px;
}

.post-meta {
    color: #999;
    font-size: 14px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 20px;
    background: #0b66c3;
    color: white;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.3s;
}

.btn:hover {
    background: #075091;
}

.btn.outline {
    background: transparent;
    border: 2px solid #0b66c3;
    color: #0b66c3;
}

.btn.outline:hover {
    background: #0b66c3;
    color: white;
}

.btn.small {
    padding: 6px 12px;
    font-size: 14px;
}

/* Table */
.data-table {
    width: 100%;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.data-table tr:hover {
    background: #f8f9fa;
}

/* Footer */
.site-footer {
    background: #2c3e50;
    color: white;
    padding: 30px 0;
    margin-top: 60px;
    text-align: center;
}

/* Admin Grid */
.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.admin-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    color: #2c3e50;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.admin-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.admin-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 40px;
    width: 90%;
    max-width: 600px;
    border-radius: 12px;
    position: relative;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #999;
}

.close:hover {
    color: #000;
}

/* Forms */
label {
    display: block;
    margin: 16px 0 8px;
    font-weight: 600;
    color: #2c3e50;
}

input[type="text"],
input[type="url"],
input[type="email"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #0b66c3;
}

/* Responsive */
@media (max-width: 768px) {
    .nav {
        flex-direction: column;
        gap: 20px;
    }
    
    .menu ul {
        flex-wrap: wrap;
    }
    
    .hero h1 {
        font-size: 32px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   ADMIN UI 3.0 — Add-on (append at end of app.css)
   ========================================================= */

/* Theme tokens */
:root{
  --bg: #f5f7fa;
  --panel: rgba(255,255,255,.85);
  --panel-solid: #ffffff;
  --text: #0f172a;
  --muted: #64748b;

  --primary: #0b66c3;
  --primary-2: #075091;
  --danger: #dc2626;
  --success: #16a34a;
  --warning: #f59e0b;

  --border: rgba(15, 23, 42, .10);
  --shadow-sm: 0 2px 10px rgba(2, 6, 23, 0.06);
  --shadow-md: 0 10px 30px rgba(2, 6, 23, 0.10);

  --radius: 14px;
  --radius-sm: 10px;
}

@media (prefers-color-scheme: dark){
  :root{
    --bg: #0b1220;
    --panel: rgba(17, 24, 39, .70);
    --panel-solid: #111827;
    --text: #e5e7eb;
    --muted: #9ca3af;
    --border: rgba(229, 231, 235, .12);
    --shadow-sm: 0 2px 12px rgba(0,0,0,.35);
    --shadow-md: 0 16px 40px rgba(0,0,0,.45);
  }
}

body{
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(11,102,195,.18), transparent 60%),
    radial-gradient(900px 500px at 85% 0%, rgba(99,102,241,.14), transparent 55%),
    var(--bg);
  color: var(--text);
}

/* Layout */
.page{
  max-width: 1180px;
  margin: 24px auto;
  padding: 0 16px;
}
.page-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.page-title{
  margin: 0;
  font-size: clamp(24px, 2.5vw, 34px);
  letter-spacing: -0.02em;
  color: var(--text);
}
.page-subtitle{
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

/* Cards */
.card{
  background: var(--panel);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-header{
  padding: 18px 18px 0;
}
.card-body{
  padding: 18px;
}
.card + .card{ margin-top: 16px; }

/* Alerts (compat) */
.alert{
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  border: 1px solid var(--border);
  background: var(--panel-solid);
  box-shadow: var(--shadow-sm);
  margin: 12px 0;
}
.alert-success{
  border-color: rgba(22,163,74,.25);
  background: rgba(22,163,74,.10);
}
.alert-danger{
  border-color: rgba(220,38,38,.25);
  background: rgba(220,38,38,.10);
}

/* Buttons (compat + modern) */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap: 8px;
  border-radius: 10px;
  padding: 10px 14px;
  font-weight: 700;
  letter-spacing: .01em;
  border: 1px solid transparent;
  transition: transform .12s ease, box-shadow .12s ease, background .2s ease, border-color .2s ease;
  user-select:none;
}
.btn:active{ transform: translateY(1px); }

.btn-primary, .btn.primary{
  background: linear-gradient(135deg, var(--primary) 0%, #2c8cff 100%);
  color: #fff;
  box-shadow: 0 10px 20px rgba(11,102,195,.18);
}
.btn-primary:hover, .btn.primary:hover{ background: linear-gradient(135deg, var(--primary-2) 0%, var(--primary) 100%); }

.btn-danger{
  background: linear-gradient(135deg, var(--danger) 0%, #ff4d4d 100%);
  color: #fff;
}
.btn-ghost{
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover{ background: rgba(148,163,184,.12); }

/* Forms (compat) */
.form-control{
  width: 100%;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.9);
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text);
  outline: none;
  transition: box-shadow .15s ease, border-color .15s ease, background .15s ease;
}
@media (prefers-color-scheme: dark){
  .form-control{ background: rgba(17,24,39,.8); }
}
.form-control:focus{
  border-color: rgba(11,102,195,.55);
  box-shadow: 0 0 0 4px rgba(11,102,195,.18);
}
label{
  font-weight: 700;
  color: var(--text);
}

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