/* ============================================================
   JA Americas Clipping — Estilos v2
   Montserrat + paleta JA Americas
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap');

:root {
  --ja-dark:    #1a3a4a;
  --ja-teal:    #1d6a7a;
  --ja-teal-lt: #2a8fa3;
  --ja-accent:  #00b4cc;
  --ja-red:     #c8102e;
  --ja-gold:    #f0a500;
  --gray-50:    #f7f9fa;
  --gray-100:   #eef1f3;
  --gray-200:   #dde3e7;
  --gray-400:   #9aaab4;
  --gray-600:   #4a6070;
  --gray-800:   #1a2e38;
  --white:      #ffffff;
  --shadow-sm:  0 1px 4px rgba(26,58,74,.08);
  --shadow-md:  0 4px 16px rgba(26,58,74,.12);
  --radius:     10px;
}

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

body {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 13px;
  background: var(--gray-50);
  color: var(--gray-800);
  line-height: 1.6;
}

/* ── Header ──────────────────────────────────────────────── */

.header {
  background: var(--ja-dark);
  color: #fff;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: #fff;
}

.header-logo img {
  height: 38px;
  width: auto;
  mix-blend-mode: screen;   /* hace transparente el fondo negro del logo */
  display: block;
}

.header-logo-mark {
  width: 36px;
  height: 36px;
  background: var(--ja-accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 800;
  color: var(--ja-dark);
  letter-spacing: -1px;
  flex-shrink: 0;
}

.header-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.header-logo-title {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .3px;
}

.header-logo-sub {
  font-size: 10px;
  font-weight: 500;
  opacity: .6;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.header-right { display: flex; align-items: center; gap: 20px; }

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 2px;
  background: rgba(255,255,255,.08);
  border-radius: 6px;
  padding: 3px;
}

.lang-switcher a {
  color: rgba(255,255,255,.6);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  padding: 3px 8px;
  border-radius: 4px;
  transition: all .15s;
  letter-spacing: .5px;
}

.lang-switcher a.active,
.lang-switcher a:hover {
  color: var(--ja-dark);
  background: var(--ja-accent);
}

.header-admin-link {
  color: rgba(255,255,255,.5);
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: .5px;
  text-transform: uppercase;
  transition: color .15s;
}
.header-admin-link:hover { color: rgba(255,255,255,.9); }

/* ── Stats bar ───────────────────────────────────────────── */

.stats-bar {
  background: linear-gradient(135deg, var(--ja-teal) 0%, var(--ja-dark) 100%);
  padding: 20px 32px;
  display: flex;
  gap: 40px;
  align-items: center;
}

.stat {
  display: flex;
  align-items: baseline;
  gap: 8px;
  color: #fff;
}

.stat-num {
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -1px;
}

.stat-label {
  font-size: 12px;
  font-weight: 500;
  opacity: .75;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.stats-divider {
  width: 1px;
  height: 36px;
  background: rgba(255,255,255,.15);
}

/* ── Filters ─────────────────────────────────────────────── */

.filters-wrap {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 14px 32px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  box-shadow: var(--shadow-sm);
}

.filter-search {
  flex: 1;
  min-width: 220px;
  padding: 9px 14px 9px 36px;
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  font-size: 13px;
  font-family: 'Montserrat', sans-serif;
  outline: none;
  background: var(--gray-50) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239aaab4' stroke-width='2.5'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E") 12px center no-repeat;
  transition: all .2s;
}
.filter-search:focus {
  border-color: var(--ja-teal);
  background-color: var(--white);
  box-shadow: 0 0 0 3px rgba(29,106,122,.1);
}

.filter-select {
  padding: 8px 12px;
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  font-size: 12px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  background: var(--white);
  cursor: pointer;
  min-width: 130px;
  color: var(--gray-800);
  transition: border-color .2s;
}
.filter-select:focus {
  border-color: var(--ja-teal);
  outline: none;
  box-shadow: 0 0 0 3px rgba(29,106,122,.1);
}

.btn-clear {
  padding: 8px 16px;
  background: none;
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  font-size: 12px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  cursor: pointer;
  color: var(--gray-600);
  transition: all .15s;
}
.btn-clear:hover {
  background: var(--gray-100);
  border-color: var(--gray-400);
}

/* ── Main ────────────────────────────────────────────────── */

.main { padding: 24px 32px; }

/* ── Table ───────────────────────────────────────────────── */

.clips-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.clips-table th {
  background: var(--gray-100);
  padding: 11px 14px;
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--gray-600);
  border-bottom: 2px solid var(--gray-200);
  white-space: nowrap;
}

.clips-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: top;
}

.clips-table tbody tr:last-child td { border-bottom: none; }

.clips-table tbody tr {
  transition: background .12s;
}
.clips-table tbody tr:hover td {
  background: #f0f8fa;
}

.clip-title a {
  color: var(--ja-teal);
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  line-height: 1.4;
  transition: color .15s;
}
.clip-title a:hover { color: var(--ja-accent); }

.clip-medio {
  font-size: 11px;
  color: var(--gray-400);
  margin-top: 3px;
  font-weight: 500;
}

/* ── Badges ──────────────────────────────────────────────── */

.tier {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .3px;
}
.tier-1 { background: #e8f4f8; color: var(--ja-teal); border: 1px solid var(--ja-teal-lt); }
.tier-2 { background: #e8f0f8; color: #2a5ea3; border: 1px solid #7aaae0; }
.tier-3 { background: var(--gray-100); color: var(--gray-600); border: 1px solid var(--gray-200); }

.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .3px;
}
.badge-digital       { background: #e6f7f0; color: #0d7a4e; }
.badge-grafico       { background: #fef7e0; color: #a07000; }
.badge-institucional { background: #e8f4f8; color: var(--ja-teal); }
.badge-radio         { background: #f5e8f8; color: #7a2a9d; }
.badge-tv            { background: #fde8ec; color: #a0102a; }

.val-pos { color: #0d7a4e; font-weight: 600; }
.val-neg { color: var(--ja-red); font-weight: 600; }
.val-neu { color: var(--gray-400); font-weight: 600; }

.pais-tag {
  font-size: 12px;
  color: var(--gray-600);
  font-weight: 500;
}

/* ── Pagination ──────────────────────────────────────────── */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px 0 8px;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  padding: 7px 16px;
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  background: var(--white);
  color: var(--gray-800);
  font-size: 12px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  text-decoration: none;
  transition: all .15s;
}
.page-btn:hover { background: var(--gray-100); border-color: var(--gray-400); }
.page-btn.active { background: var(--ja-teal); color: #fff; border-color: var(--ja-teal); }
.page-info { font-size: 12px; color: var(--gray-600); font-weight: 500; }

/* ── No results ──────────────────────────────────────────── */

.no-results {
  text-align: center;
  padding: 80px 20px;
  color: var(--gray-400);
  font-size: 14px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* ── Admin ───────────────────────────────────────────────── */

.admin-header {
  background: var(--gray-800);
  color: #fff;
  padding: 0 32px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.admin-header a {
  color: rgba(255,255,255,.7);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  transition: color .15s;
}
.admin-header a:hover { color: #fff; }
.admin-title { font-weight: 700; font-size: 15px; }

.admin-nav {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 0 32px;
  display: flex;
  gap: 4px;
  box-shadow: var(--shadow-sm);
}
.admin-nav a {
  padding: 14px 18px;
  color: var(--gray-600);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  border-bottom: 3px solid transparent;
  transition: all .15s;
  letter-spacing: .2px;
}
.admin-nav a.active,
.admin-nav a:hover {
  color: var(--ja-teal);
  border-bottom-color: var(--ja-teal);
}

.admin-main { padding: 28px 32px; max-width: 1200px; }

.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.card-title { font-size: 14px; font-weight: 700; color: var(--gray-800); }

.form-row { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 16px; }
.form-group { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 180px; }
.form-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--gray-600);
  text-transform: uppercase;
  letter-spacing: .7px;
}

.form-input, .form-select, .form-textarea {
  padding: 9px 12px;
  border: 1.5px solid var(--gray-200);
  border-radius: 8px;
  font-size: 13px;
  font-family: 'Montserrat', sans-serif;
  width: 100%;
  transition: border-color .2s, box-shadow .2s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--ja-teal);
  outline: none;
  box-shadow: 0 0 0 3px rgba(29,106,122,.1);
}
.form-textarea { resize: vertical; min-height: 80px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 12px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all .15s;
  letter-spacing: .2px;
}
.btn-primary { background: var(--ja-teal); color: #fff; }
.btn-primary:hover { background: var(--ja-dark); }
.btn-danger  { background: var(--ja-red); color: #fff; }
.btn-danger:hover { background: #a00d24; }
.btn-success { background: #0d7a4e; color: #fff; }
.btn-success:hover { background: #095c3a; }
.btn-outline {
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  color: var(--gray-800);
}
.btn-outline:hover { background: var(--gray-100); }
.btn-sm { padding: 4px 10px; font-size: 11px; }

.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 13px; font-weight: 500; }
.alert-success { background: #e6f7f0; color: #0d7a4e; border: 1px solid #86efcb; }
.alert-error   { background: #fde8ec; color: #9b1c32; border: 1px solid #fca5b4; }

.status-badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .3px;
}
.status-published { background: #e6f7f0; color: #0d7a4e; }
.status-pending   { background: #fef7e0; color: #a07000; }
.status-rejected  { background: #fde8ec; color: #9b1c32; }

/* ── Login ───────────────────────────────────────────────── */

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--ja-dark) 0%, var(--ja-teal) 100%);
}
.login-box {
  background: var(--white);
  border-radius: 14px;
  padding: 40px 44px;
  width: 380px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.login-logo { text-align: center; margin-bottom: 28px; }
.login-logo-mark {
  width: 52px;
  height: 52px;
  background: var(--ja-teal);
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
}
.login-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--gray-800);
  text-align: center;
  margin-bottom: 24px;
}

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 768px) {
  .stats-bar { flex-wrap: wrap; gap: 16px; padding: 16px; }
  .stats-divider { display: none; }
  .main, .filters-wrap, .admin-main { padding: 12px 16px; }
  .header { padding: 0 16px; }
  .clips-table th:nth-child(n+4),
  .clips-table td:nth-child(n+4) { display: none; }
}
