/* ==========================================
   Panel Verificación Meta — UI moderna
   ========================================== */
:root {
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-soft: #eef2ff;
  --sidebar-bg: #0f172a;
  --sidebar-bg2: #1e1b4b;
  --body-bg: #f1f5f9;
  --card-radius: 1rem;
  --text-main: #0f172a;
  --text-muted: #64748b;
}

* { -webkit-tap-highlight-color: transparent; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--body-bg);
  color: var(--text-main);
  font-size: .925rem;
}

/* ---------- Layout ---------- */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 264px;
  min-width: 264px;
  background: linear-gradient(180deg, var(--sidebar-bg) 0%, var(--sidebar-bg2) 100%);
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 1045;
}
@media (max-width: 991.98px) {
  .sidebar { position: fixed; height: 100dvh; }
}

.sidebar .brand {
  padding: 1.35rem 1.5rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  color: #fff;
  text-decoration: none;
}
.sidebar .brand .brand-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem; color: #fff;
  box-shadow: 0 6px 16px rgba(99,102,241,.45);
}
.sidebar .brand h5 { margin: 0; font-weight: 700; font-size: 1rem; letter-spacing: .2px; }
.sidebar .brand small { color: #818cf8; font-size: .7rem; font-weight: 600; letter-spacing: 1.5px; text-transform: uppercase; }

.sidebar .nav-section {
  font-size: .68rem; font-weight: 700; letter-spacing: 1.5px;
  text-transform: uppercase; color: #475569;
  padding: 1.1rem 1.5rem .45rem;
}
.sidebar .nav-link {
  color: #94a3b8;
  padding: .68rem 1rem;
  margin: .12rem .75rem;
  border-radius: .7rem;
  display: flex; align-items: center; gap: .8rem;
  font-weight: 500;
  transition: all .18s ease;
}
.sidebar .nav-link i { font-size: 1.05rem; width: 22px; text-align: center; }
.sidebar .nav-link:hover { color: #fff; background: rgba(255,255,255,.06); }
.sidebar .nav-link.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(99,102,241,.28), rgba(168,85,247,.16));
  box-shadow: inset 3px 0 0 var(--primary);
}
.sidebar .sidebar-footer {
  margin-top: auto;
  padding: 1rem .75rem;
  border-top: 1px solid rgba(255,255,255,.07);
}
.sidebar .user-chip {
  display: flex; align-items: center; gap: .7rem;
  padding: .55rem .75rem; border-radius: .8rem;
}
.sidebar .user-chip .avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #fff; font-weight: 700; font-size: .85rem;
  display: flex; align-items: center; justify-content: center;
}
.sidebar .user-chip .u-name { color: #e2e8f0; font-weight: 600; font-size: .83rem; line-height: 1.15; }
.sidebar .user-chip .u-rol { color: #64748b; font-size: .72rem; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* ---------- Topbar ---------- */
.topbar {
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid #e2e8f0;
  padding: .8rem 1.5rem;
  display: flex; align-items: center; gap: 1rem;
  position: sticky; top: 0; z-index: 1030;
}
.topbar .page-title { font-weight: 700; font-size: 1.05rem; margin: 0; }

.content { padding: 1.5rem; max-width: 1400px; width: 100%; margin: 0 auto; }
@media (max-width: 575.98px) { .content { padding: 1rem; } }

/* ---------- Cards ---------- */
.card { border: 0; border-radius: var(--card-radius); box-shadow: 0 1px 3px rgba(15,23,42,.06), 0 8px 24px -12px rgba(15,23,42,.08); }
.card-header { background: transparent; border-bottom: 1px solid #f1f5f9; font-weight: 700; padding: 1.1rem 1.35rem; }

.stat-card { padding: 1.2rem 1.35rem; display: flex; align-items: center; gap: 1rem; transition: transform .18s ease; }
.stat-card:hover { transform: translateY(-3px); }
.stat-card .stat-icon {
  width: 52px; height: 52px; border-radius: 1rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; flex-shrink: 0;
}
.stat-card .stat-num { font-size: 1.65rem; font-weight: 800; line-height: 1; }
.stat-card .stat-label { color: var(--text-muted); font-size: .8rem; font-weight: 600; margin-top: .3rem; }

/* ---------- Badges de estado ---------- */
.badge-estado {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .74rem; font-weight: 700;
  padding: .38rem .75rem; border-radius: 2rem;
  white-space: nowrap;
}
.estado-pendiente   { background: #f1f5f9; color: #475569; }
.estado-creada      { background: #e0f2fe; color: #0369a1; }
.estado-en_revision { background: #fef3c7; color: #b45309; }
.estado-aprobada    { background: #d1fae5; color: #047857; }
.estado-entregada   { background: #ede9fe; color: #6d28d9; }
.estado-rechazada   { background: #fee2e2; color: #b91c1c; }

/* ---------- Tablas ---------- */
.table-modern { margin: 0; }
.table-modern thead th {
  background: #f8fafc; color: #64748b;
  font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .8px;
  border-bottom: 1px solid #e2e8f0; padding: .8rem 1rem;
  white-space: nowrap;
}
.table-modern thead th i {
  margin-right: .45rem;
  color: var(--primary);
  font-size: .85rem;
  vertical-align: -1px;
}
.table-modern tbody td { padding: .85rem 1rem; vertical-align: middle; border-bottom: 1px solid #f1f5f9; }
.table-modern tbody tr { transition: background .15s; }
.table-modern tbody tr:hover { background: #f8fafc; }

/* ---------- Botones ---------- */
.btn { border-radius: .65rem; font-weight: 600; }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border: 0;
  box-shadow: 0 4px 14px rgba(99,102,241,.35);
}
.btn-primary:hover { background: linear-gradient(135deg, var(--primary-dark), #4338ca); }
.btn-icon {
  width: 34px; height: 34px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: .6rem; font-size: .9rem;
}
.btn-soft { background: var(--primary-soft); color: var(--primary-dark); border: 0; }
.btn-soft:hover { background: #e0e7ff; color: var(--primary-dark); }

/* ---------- Formularios ---------- */
.form-label { font-weight: 600; font-size: .82rem; color: #334155; }
.form-control, .form-select {
  border-radius: .65rem; border-color: #e2e8f0;
  padding: .58rem .9rem; font-size: .9rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 .2rem rgba(99,102,241,.12);
}
.input-group-text { border-radius: .65rem; border-color: #e2e8f0; background: #f8fafc; color: #64748b; }

/* ---------- Vista Ver Empresa (ficha de datos) ---------- */
.dato-row {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .85rem 1.1rem;
  border-bottom: 1px solid #f1f5f9;
}
.dato-row:last-child { border-bottom: 0; }
.dato-row .dato-label {
  font-size: .68rem; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase; color: #94a3b8; margin-bottom: .15rem;
}
.dato-row .dato-valor { font-weight: 600; font-size: .95rem; word-break: break-word; }
.btn-copy {
  border: 1px solid #e2e8f0; background: #fff; color: #64748b;
  border-radius: .55rem; width: 32px; height: 32px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.btn-copy:hover { background: var(--primary-soft); color: var(--primary-dark); border-color: #c7d2fe; }
.btn-copy.copied { background: #d1fae5; color: #047857; border-color: #a7f3d0; }

/* ---------- Login ---------- */
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 55%, #312e81 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem; position: relative; overflow: hidden;
}
.login-page::before, .login-page::after {
  content: ''; position: absolute; border-radius: 50%; filter: blur(90px); opacity: .35;
}
.login-page::before { width: 420px; height: 420px; background: #6366f1; top: -120px; right: -80px; }
.login-page::after  { width: 380px; height: 380px; background: #a855f7; bottom: -140px; left: -100px; }
.login-card {
  width: 100%; max-width: 420px;
  background: rgba(255,255,255,.97);
  border-radius: 1.5rem;
  box-shadow: 0 25px 60px -12px rgba(0,0,0,.5);
  padding: 2.5rem 2.25rem;
  position: relative; z-index: 2;
}
.login-logo {
  width: 60px; height: 60px; border-radius: 1.1rem;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.6rem; margin: 0 auto 1rem;
  box-shadow: 0 10px 25px rgba(99,102,241,.4);
}

/* ---------- Timeline historial ---------- */
.timeline { position: relative; padding-left: 1.6rem; }
.timeline::before {
  content: ''; position: absolute; left: 7px; top: 6px; bottom: 6px;
  width: 2px; background: #e2e8f0;
}
.timeline-item { position: relative; padding-bottom: 1.1rem; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: ''; position: absolute; left: -1.6rem; top: 5px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; border: 4px solid var(--primary);
}

/* ---------- Progreso responsables ---------- */
.progress { height: 8px; border-radius: 1rem; background: #eef2f7; }

/* ---------- Otros ---------- */
.avatar-sm {
  width: 32px; height: 32px; border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  color: #fff; font-weight: 700; font-size: .72rem;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

/* Avatar cuadrado con la inicial de la empresa */
.empresa-avatar {
  width: 40px; height: 40px; border-radius: .8rem;
  background: linear-gradient(135deg, #eef2ff, #ede9fe);
  color: var(--primary-dark); font-weight: 800; font-size: .95rem;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  border: 1px solid #e0e7ff;
}

/* Chips de filtro por estado */
.chip {
  --chip-color: #6366f1;
  display: inline-flex; align-items: center; gap: .45rem;
  padding: .45rem .85rem; border-radius: 2rem;
  background: #fff; border: 1px solid #e2e8f0;
  color: #475569; font-size: .8rem; font-weight: 600;
  text-decoration: none;
  transition: all .18s ease;
}
.chip i { color: var(--chip-color); font-size: .85rem; }
.chip:hover { border-color: var(--chip-color); color: #1e293b; transform: translateY(-1px); box-shadow: 0 4px 12px -4px rgba(15,23,42,.15); }
.chip-num {
  background: #f1f5f9; color: #475569;
  border-radius: 2rem; padding: .1rem .5rem;
  font-size: .72rem; font-weight: 700; line-height: 1.3;
}
.chip-active {
  background: var(--chip-color); border-color: var(--chip-color); color: #fff;
  box-shadow: 0 4px 14px -4px var(--chip-color);
}
.chip-active i { color: #fff; }
.chip-active .chip-num { background: rgba(255,255,255,.25); color: #fff; }

/* Gmail en tabla */
.gmail-cell { font-size: .85rem; }
.btn-copy-sm { width: 26px; height: 26px; font-size: .75rem; border-radius: .45rem; }
.text-muted-sm { font-size: .78rem; color: var(--text-muted); }
.empty-state { text-align: center; padding: 3.5rem 1rem; color: var(--text-muted); }
.empty-state i { font-size: 3rem; opacity: .3; }

.clave-oculta { font-family: monospace; letter-spacing: 2px; }

.dropdown-menu { border: 0; border-radius: .8rem; box-shadow: 0 10px 35px -8px rgba(15,23,42,.25); font-size: .875rem; }
.dropdown-item { border-radius: .5rem; margin: 0 .35rem; width: auto; padding: .5rem .8rem; }
.dropdown-item:hover { background: var(--primary-soft); }

.toast-copy {
  position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%) translateY(80px);
  background: #0f172a; color: #fff; padding: .6rem 1.2rem;
  border-radius: 2rem; font-size: .82rem; font-weight: 600;
  opacity: 0; transition: all .25s ease; z-index: 2000; pointer-events: none;
}
.toast-copy.show { opacity: 1; transform: translateX(-50%) translateY(0); }
