/* ============================================================================
   profile.css — Ufitini Profile (Hydra / Airtel NG)
   Estilos para profile.php. Replica el diseño del Figma (4 estados).
   Tokens: gradiente cian→púrpura, dark mode, Poppins.
   ========================================================================== */

:root {
    --primary: #00BFFF;
    --secondary: #9A4EFE;
    --bg: #0a0a0a;
    --card: #1a1a1a;
    --pill: #0f0f0f;
    --text: #E0E0E0;
    --muted: #888;
    --danger: #ef4444;
    --radius: 14px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Poppins', sans-serif;
    -webkit-font-smoothing: antialiased;
    padding-bottom: 90px;
}

a { text-decoration: none; color: inherit; }

/* --- TOPBAR --------------------------------------------------------------- */
.topbar {
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.topbar-logo { height: 26px; width: auto; }
.nav-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--primary);
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
}

/* --- PROFILE CONTENT ------------------------------------------------------ */
.profile {
    max-width: 420px;
    margin: 0 auto;
    padding: 28px 22px 30px;
    text-align: center;
}
.profile-title {
    margin: 0 0 22px;
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.avatar {
    font-size: 3.4rem;
    line-height: 1;
    color: var(--primary);
    margin-bottom: 26px;
}

/* --- STATUS BADGES -------------------------------------------------------- */
.badge {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--pill);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 30px;
    padding: 8px 8px 8px 20px;
    margin: 0 0 12px;
    font-size: 0.92rem;
    font-weight: 600;
    color: #fff;
}
/* El icono se muestra como un "chip" relleno a la derecha */
.badge i {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.82rem;
    flex: 0 0 auto;
}
/* 1ª badge = suscripción → chip cuadrado redondeado; 2ª = elegibilidad → círculo */
.avatar + .badge i { border-radius: 9px; }
.badge-on  { background: var(--primary); }
.badge-off { background: var(--danger); }

/* --- ELIGIBLE UNTIL ------------------------------------------------------- */
.elig-until {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 8px 0 26px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--muted);
}
/* La etiqueta cambia de color según el estado (requiere clase elig-on/elig-off
   en el <p>; si no la añades, queda en gris neutro, sin romper nada). */
.elig-until.elig-on  { color: var(--primary); }
.elig-until.elig-off { color: var(--danger); }

.date-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    color: #fff;
}
.date-on  { background: var(--primary); }
.date-off { background: var(--danger); }

/* --- BUTTONS -------------------------------------------------------------- */
.btn-grad,
.btn-gray {
    display: block;
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    margin-bottom: 12px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn-grad {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: #fff;
}
.btn-grad:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0, 191, 255, 0.32);
}
.btn-gray {
    background: #2a2a2a;
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.btn-gray:hover { background: #333; }

/* --- BRAND CREDIT --------------------------------------------------------- */
.brand-by {
    margin-top: 20px;
    display: flex;
    justify-content: center;
}
.brand-by img { height: 22px; width: auto; opacity: 0.9; }

/* --- BOTTOM NAV ----------------------------------------------------------- */
.bottomnav {
    position: fixed;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 30px);
    max-width: 440px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-around;
    background: rgba(30, 30, 30, 0.72);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    z-index: 20;
}
.bottomnav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--muted);
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: color 0.25s ease;
}
.bottomnav a i { font-size: 1.25rem; }
.bottomnav a:hover,
.bottomnav a.active { color: var(--primary); }

/* --- UNSUBSCRIBE MODAL ---------------------------------------------------- */
.overlay {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    padding: 24px;
}
.overlay[hidden] { display: none; }

.modal {
    position: relative;
    width: 100%;
    max-width: 340px;
    background: var(--card);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 18px;
    padding: 32px 24px 26px;
    text-align: center;
}
.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: none;
    border: none;
    color: var(--muted);
    font-size: 1.1rem;
    cursor: pointer;
}
.modal-close:hover { color: #fff; }
.modal-icon { margin-bottom: 14px; }
.modal-icon img { height: 54px; width: auto; }
.modal-title {
    margin: 0 0 10px;
    font-size: 1.25rem;
    font-weight: 700;
    color: #fff;
}
.modal-text {
    margin: 0 0 22px;
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--muted);
}
.modal-text strong { color: var(--primary); }
.modal-btn {
    display: block;
    width: 100%;
    padding: 13px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    color: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(0, 191, 255, 0.32);
}

.sidebar-backdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,.5);
    opacity: 0; visibility: hidden; transition: opacity .25s ease; z-index: 90;
}
.sidebar-backdrop.open { opacity: 1; visibility: visible; }

.sidebarWrapper {
    position: fixed; top: 0; right: 0; height: 100%;
    width: 280px; max-width: 85%;
    background: #111; border-left: 1px solid rgba(255,255,255,.1);
    transform: translateX(100%); transition: transform .28s ease;
    z-index: 100; overflow-y: auto;
}
.sidebarWrapper.open { transform: translateX(0); }

.sidebar .profilebox { display:flex; align-items:center; justify-content:space-between; padding:25px 20px; border-bottom:1px solid rgba(255,255,255,.1); }
.sidebar .profilebox .title { color: var(--primary); font-size:1.8rem; margin:0; }
.sidebar-close { background:none; border:none; cursor:pointer; padding:0 4px; }
.sidebar-close img { width:22px; height:22px; display:block; }
.sidebarMenu { list-style:none; padding:10px 0; margin:0; }
.sidebarMenu li a { display:flex; align-items:center; gap:12px; padding:15px 20px; color:var(--text); font-weight:500; border-bottom:1px solid rgba(255,255,255,.05); }
.sidebarMenu li a i { font-size:18px; width:24px; text-align:center; color:var(--primary); }
.sidebarMenu li:last-child a { border-bottom:none; }
.sidebarMenu li a:hover { color:var(--primary); background:var(--card); }


/* --- DESKTOP TWEAKS ------------------------------------------------------- */
@media (min-width: 992px) {
    .profile { padding-top: 40px; }
}