/* GEO Denetim Paneli — 212 Medya kurumsal kimliği (yalnızca açık tema).
   Palet panel/brands.py::MEDYA212.colors_light ile birebir eşleşiyor. */
:root {
  --bg: #F2F5F8;
  --card: #FFFFFF;
  --card-2: #E9EDF3;
  --ink: #2C2F44;
  --ink-muted: #4F5165;
  --ink-faint: #9295A8;
  --line: #DCE1E8;
  --accent: #D8222A;
  --accent-ink: #A81920;
  --accent-soft: #FAE4E5;
  --good: #1C8F5E;
  --warn: #B8862A;
  --warn-soft: #F5EBD8;
  --shadow: 0 1px 2px rgba(44,47,68,0.05), 0 8px 24px -12px rgba(44,47,68,0.10);
  --font-display: "Newsreader", Georgia, "Times New Roman", serif;
  --font-body: "IBM Plex Sans", -apple-system, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* --- Top bar --------------------------------------------------------- */

.topbar {
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: 0.01em;
}
.topnav { display: flex; gap: 28px; }
.nav-link {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-muted);
  text-decoration: none;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.nav-link:hover { color: var(--ink); }
.nav-link.active { color: var(--accent-ink); border-bottom-color: var(--accent); }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 24px;
}
.user-menu {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-muted);
}
.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
  background: var(--card-2);
}
.user-name {
  font-weight: 500;
  max-width: 140px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.logout-btn {
  font-size: 12px;
  color: var(--ink-faint);
  text-decoration: none;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--line);
  transition: all 0.15s;
}
.logout-btn:hover {
  color: var(--accent-ink);
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* --- Layout ------------------------------------------------------------ */

.wrap { max-width: 880px; margin: 0 auto; padding: 40px 24px 100px; }
.hidden { display: none; }

.page-head { margin-bottom: 28px; }
.page-head h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 28px;
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}
.page-head .sub { color: var(--ink-muted); margin: 0; font-size: 14px; }
.back-link {
  display: inline-block;
  font-size: 13px;
  color: var(--ink-muted);
  text-decoration: none;
  margin-bottom: 10px;
}
.back-link:hover { color: var(--accent-ink); }

.steps { display: flex; gap: 24px; margin-bottom: 24px; font-size: 12.5px; color: var(--ink-faint); font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; }
.step.active { color: var(--accent-ink); }

.panel-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 28px;
  margin-bottom: 20px;
}

h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  margin: 0 0 12px;
}

/* --- Forms --------------------------------------------------------- */

label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
  margin: 16px 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
label:first-child { margin-top: 0; }
.section-label { margin-top: 26px; }
.field-hint { font-weight: 400; font-size: 12.5px; color: var(--ink-faint); text-transform: none; letter-spacing: 0; margin-left: 8px; }
.checkbox-label { text-transform: none; font-weight: 500; display: flex; align-items: center; gap: 8px; }
.checkbox-label input[type="checkbox"] { width: auto; margin: 0; }

input, select, textarea {
  width: 100%;
  padding: 9px 12px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  font-family: inherit;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--card);
}

#bulk-add-box { margin-top: 10px; display: flex; flex-direction: column; gap: 8px; }
#bulk-add-box textarea { resize: vertical; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.span-2 { grid-column: 1 / -1; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row input { flex: 1; }
.actions-row { margin-top: 24px; }

/* --- Buttons --------------------------------------------------------- */

button {
  padding: 9px 16px;
  border-radius: 6px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #FFFFFF;
  font-weight: 600;
  font-size: 13.5px;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
button:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
button.secondary { background: transparent; border: 1px solid var(--line); color: var(--ink); }
button.secondary:hover { background: var(--card-2); border-color: var(--ink-faint); }
button.secondary.danger { color: var(--accent-ink); border-color: var(--accent-soft); }
button.secondary.danger:hover { background: var(--accent-soft); border-color: var(--accent); }
button:disabled { opacity: 0.5; cursor: default; }

.button {
  display: inline-block;
  padding: 9px 16px;
  border-radius: 6px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #FFFFFF;
  text-decoration: none;
  font-weight: 600;
  font-size: 13.5px;
}
.button:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.button.secondary { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.button.secondary:hover { background: var(--card-2); }

.status { font-size: 13px; color: var(--ink-muted); min-height: 18px; }
.field-error { border-color: var(--accent) !important; background: var(--accent-soft) !important; }

.competitor-row, .query-row, .keyword-row { display: flex; gap: 8px; margin-bottom: 8px; }
.competitor-row input:first-child { flex: 1; }
.competitor-row input:last-child { flex: 1; }
.query-row input, .keyword-row input { flex: 1; }
.remove-row { background: transparent; border: 1px solid var(--line); color: var(--ink-faint); padding: 8px 10px; }
.remove-row:hover { background: var(--card-2); border-color: var(--ink-faint); }

#run-log {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px;
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 12.5px;
  max-height: 280px;
  overflow-y: auto;
  white-space: pre-wrap;
  color: var(--ink-muted);
}

.mono { font-family: ui-monospace, "SF Mono", monospace; font-size: 12px; color: var(--ink-muted); }

/* --- Tables ---------------------------------------------------------- */

.cost-table, .data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; margin-top: 8px; }
.cost-table th, .cost-table td, .data-table th, .data-table td {
  text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line);
}
.cost-table th, .data-table th {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-faint);
  font-weight: 600; background: var(--card-2);
}
.cost-table tr.total td { border-bottom: none; font-family: var(--font-display); }
.data-table tbody tr:hover { background: var(--card-2); }

/* --- Stat tiles & badges ---------------------------------------------- */

.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0; }
.stat-tile {
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
  padding: 16px; text-align: center;
}
.stat-num { font-family: var(--font-display); font-size: 26px; font-weight: 600; color: var(--ink); }
.stat-label { font-size: 11.5px; color: var(--ink-muted); margin-top: 4px; text-transform: uppercase; letter-spacing: 0.04em; }
.badge {
  display: inline-block; font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em;
  background: var(--warn-soft); color: var(--warn); border-radius: 4px; padding: 2px 7px; margin-left: 6px;
}

/* --- Live activity feed ------------------------------------------------ */

.live-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: #2ecc71; margin-right: 4px; vertical-align: middle;
  animation: live-pulse 1.8s ease-in-out infinite;
}
@keyframes live-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.5); }
  50% { opacity: 0.6; box-shadow: 0 0 0 4px rgba(46, 204, 113, 0); }
}
.activity-feed { display: flex; flex-direction: column; max-height: 340px; overflow-y: auto; }
.activity-row { display: flex; align-items: center; gap: 10px; padding: 9px 2px; border-bottom: 1px solid var(--line); font-size: 13px; }
.activity-row:last-child { border-bottom: none; }
.activity-icon { font-size: 15px; width: 20px; text-align: center; flex-shrink: 0; }
.activity-slug { font-weight: 600; color: var(--ink); }
.activity-label { color: var(--ink-muted); }
.activity-loc { color: var(--ink-faint); font-size: 12px; }
.activity-time { margin-left: auto; font-size: 11.5px; color: var(--ink-faint); white-space: nowrap; flex-shrink: 0; }
