/* OnlyPanel — estética Apple/iOS + identidad Onlycable */

:root {
  --oc-azul: #005CB9;
  --oc-azul-claro: #65B2E8;
  --oc-gris: #6D6E6F;
  --fondo: #F2F2F7;
  --fondo-elevado: rgba(255, 255, 255, 0.72);
  --borde: rgba(60, 60, 67, 0.12);
  --texto: #1C1C1E;
  --texto-secundario: #6D6E6F;
  --sombra: 0 8px 30px rgba(0, 0, 0, 0.08);
  --radio: 20px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fondo: #000000;
    --fondo-elevado: rgba(28, 28, 30, 0.72);
    --borde: rgba(255, 255, 255, 0.12);
    --texto: #F2F2F7;
    --texto-secundario: #9A9A9E;
    --sombra: 0 8px 30px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "Inter", Arial, sans-serif;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(101, 178, 232, 0.25), transparent 60%),
    radial-gradient(1000px 500px at 110% 10%, rgba(0, 92, 185, 0.18), transparent 55%),
    var(--fondo);
  color: var(--texto);
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

/* ---------- Cabecera ---------- */

.op-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 28px;
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: var(--fondo-elevado);
  border-bottom: 1px solid var(--borde);
}

.op-marca {
  display: flex;
  align-items: center;
  gap: 12px;
}

.op-marca img {
  width: 34px;
  height: 34px;
}

.op-marca .op-titulo {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.op-marca .op-subtitulo {
  font-size: 12px;
  color: var(--texto-secundario);
  margin-top: -2px;
}

.op-usuario {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
  color: var(--texto-secundario);
}

.op-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--oc-azul), var(--oc-azul-claro));
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 600;
  font-size: 13px;
}

.op-boton {
  appearance: none;
  border: 1px solid var(--borde);
  background: var(--fondo-elevado);
  color: var(--texto);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.op-boton:hover {
  box-shadow: var(--sombra);
  transform: translateY(-1px);
}

.op-boton:active {
  transform: translateY(0);
}

.op-boton.primario {
  background: linear-gradient(135deg, var(--oc-azul), var(--oc-azul-claro));
  color: #fff;
  border: none;
}

/* ---------- Contenido ---------- */

.op-main {
  flex: 1;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 36px 28px 60px;
}

.op-saludo h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}

.op-saludo p {
  color: var(--texto-secundario);
  margin: 0 0 32px;
  font-size: 15px;
}

.op-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}

.op-card {
  background: var(--fondo-elevado);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  animation: op-entrada 0.4s ease both;
}

.op-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sombra);
  border-color: rgba(0, 92, 185, 0.35);
}

.op-card .op-icono {
  font-size: 26px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(0, 92, 185, 0.15), rgba(101, 178, 232, 0.18));
}

.op-card h3 {
  margin: 4px 0 0;
  font-size: 16px;
  font-weight: 600;
}

.op-card p {
  margin: 0;
  font-size: 13px;
  color: var(--texto-secundario);
  line-height: 1.4;
}

@keyframes op-entrada {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Estados: cargando / vacío / error / 403 ---------- */

.op-estado {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
  padding: 80px 20px;
  color: var(--texto-secundario);
}

.op-estado .op-emoji {
  font-size: 42px;
}

.op-estado h2 {
  margin: 0;
  font-size: 20px;
  color: var(--texto);
}

.op-estado p {
  max-width: 420px;
  margin: 0;
  font-size: 14px;
}

.op-spinner {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 3px solid var(--borde);
  border-top-color: var(--oc-azul);
  animation: op-girar 0.8s linear infinite;
}

@keyframes op-girar {
  to { transform: rotate(360deg); }
}

.oculto { display: none !important; }

/* ---------- Pie ---------- */

.op-footer {
  text-align: center;
  font-size: 12px;
  color: var(--texto-secundario);
  padding: 18px;
  opacity: 0.7;
}

@media (max-width: 480px) {
  .op-header { padding: 16px; }
  .op-main { padding: 24px 16px 40px; }
  .op-usuario span.op-email { display: none; }
}
