/* ==========================================
   Portal de Clientes - EnlaceWifi
   Tema verde/teal
   ========================================== */

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

:root {
    --portal-primary: #00897b;
    --portal-primary-dark: #00695c;
    --portal-primary-light: #4db6ac;
    --portal-primary-bg: #e0f2f1;
    --portal-sidebar-bg: #0a1628;
    --portal-sidebar-w: 250px;
    --portal-bg: #f5f7fa;
    --portal-card-border: #e8edf2;
    --portal-text: #1e293b;
    --portal-text-muted: #64748b;
    --portal-success: #10b981;
    --portal-warning: #f59e0b;
    --portal-danger: #ef4444;
    --portal-info: #0ea5e9;
}

* { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; box-sizing: border-box; }
body { background: var(--portal-bg); margin: 0; min-height: 100vh; color: var(--portal-text); }

/* ---- Sidebar ---- */
.portal-sidebar {
    position: fixed; left: 0; top: 0; bottom: 0;
    width: var(--portal-sidebar-w);
    background: linear-gradient(180deg, var(--portal-sidebar-bg) 0%, #0d2137 100%);
    color: white; display: flex; flex-direction: column; z-index: 1000;
    transition: transform 0.3s ease;
}
.portal-sidebar-brand {
    padding: 20px; display: flex; align-items: center; gap: 12px;
    text-decoration: none; color: white; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.portal-sidebar-brand .brand-icon {
    width: 40px; height: 40px; background: var(--portal-primary);
    border-radius: 10px; display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 1rem;
}
.portal-sidebar-brand .brand-text { font-size: 1.05rem; font-weight: 600; line-height: 1.2; }
.portal-sidebar-brand .brand-sub { font-size: 0.68rem; color: var(--portal-primary-light); font-weight: 400; letter-spacing: 0.5px; }

.portal-sidebar-user {
    padding: 16px 20px; border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex; align-items: center; gap: 10px;
}
.portal-sidebar-user .avatar {
    width: 36px; height: 36px; background: var(--portal-primary);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: 0.9rem;
}
.portal-sidebar-user .user-name { font-size: 0.85rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.portal-sidebar-user .user-status { font-size: 0.7rem; color: var(--portal-primary-light); }

.portal-nav { flex: 1; padding: 12px 0; overflow-y: auto; }
.portal-nav .nav-section { padding: 8px 20px 4px; font-size: 0.65rem; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,0.35); font-weight: 600; }
.portal-nav a {
    display: flex; align-items: center; gap: 10px; padding: 10px 20px;
    color: rgba(255,255,255,0.65); text-decoration: none; font-size: 0.88rem;
    border-left: 3px solid transparent; transition: all 0.2s;
}
.portal-nav a:hover { color: white; background: rgba(255,255,255,0.06); }
.portal-nav a.active { color: white; background: rgba(255,255,255,0.1); border-left-color: var(--portal-primary); font-weight: 500; }
.portal-nav a i { font-size: 1.1rem; width: 22px; text-align: center; }
.portal-nav .nav-badge {
    margin-left: auto; background: var(--portal-danger); color: white; border-radius: 10px;
    padding: 1px 7px; font-weight: 600; font-size: 0.7rem;
}

/* ---- Main ---- */
.portal-main { margin-left: var(--portal-sidebar-w); min-height: 100vh; }
.portal-topbar {
    padding: 16px 24px; display: flex; justify-content: space-between; align-items: center;
    background: white; border-bottom: 1px solid var(--portal-card-border);
}
.portal-topbar h4 { margin: 0; font-weight: 600; color: var(--portal-text); font-size: 1.15rem; }
.portal-topbar small { color: var(--portal-text-muted); }

/* ---- Cards ---- */
.portal-card {
    background: white; border-radius: 12px; border: 1px solid var(--portal-card-border);
    box-shadow: 0 1px 3px rgba(0,0,0,0.04); overflow: hidden;
}
.portal-card .card-header {
    padding: 14px 20px; border-bottom: 1px solid var(--portal-card-border);
    font-weight: 600; font-size: 0.9rem;
}
.portal-card .card-body { padding: 20px; }

/* Stat cards */
.stat-card {
    border-radius: 12px; padding: 20px; color: white; position: relative; overflow: hidden;
}
.stat-card .stat-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.5px; opacity: 0.85; font-weight: 500; }
.stat-card .stat-value { font-size: 1.6rem; font-weight: 700; margin: 6px 0 4px; }
.stat-card .stat-sub { font-size: 0.78rem; opacity: 0.8; }
.stat-card.bg-danger { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); }
.stat-card.bg-success { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }
.stat-card.bg-primary { background: linear-gradient(135deg, var(--portal-primary) 0%, var(--portal-primary-dark) 100%); }
.stat-card.bg-info { background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%); }
.stat-card.bg-warning { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }
.stat-card.bg-purple { background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%); }

/* ---- Table ---- */
.portal-table { width: 100%; border-collapse: collapse; }
.portal-table thead th {
    background: #f8fafc; padding: 10px 16px; font-size: 0.75rem; text-transform: uppercase;
    letter-spacing: 0.5px; color: var(--portal-text-muted); font-weight: 600; border-bottom: 2px solid var(--portal-card-border);
}
.portal-table tbody td { padding: 12px 16px; border-bottom: 1px solid #f1f5f9; font-size: 0.88rem; vertical-align: middle; }
.portal-table tbody tr:hover { background: #f8fafc; }

/* ---- Badges ---- */
.badge-estado { padding: 4px 10px; border-radius: 6px; font-size: 0.72rem; font-weight: 600; display: inline-block; }
.badge-estado.pagado { background: #d1fae5; color: #065f46; }
.badge-estado.pendiente { background: #fef3c7; color: #92400e; }
.badge-estado.vencido { background: #fee2e2; color: #991b1b; }
.badge-estado.activo { background: #d1fae5; color: #065f46; }
.badge-estado.suspendido { background: #fee2e2; color: #991b1b; }

/* ---- Login ---- */
.login-container { min-height: 100vh; display: flex; }
.login-visual {
    flex: 1; background: linear-gradient(135deg, var(--portal-sidebar-bg) 0%, #0d2137 60%, var(--portal-primary-dark) 100%);
    display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden;
}
.login-visual::after {
    content: ''; position: absolute; width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(0,137,123,0.2) 0%, transparent 70%);
    top: 20%; right: -100px;
}
.login-visual .visual-content { text-align: center; color: white; z-index: 1; padding: 40px; }
.login-visual .visual-content h1 { font-size: 2.5rem; font-weight: 700; margin-bottom: 10px; }
.login-visual .visual-content p { font-size: 1.1rem; opacity: 0.8; max-width: 400px; }
.login-form-side {
    width: 480px; min-width: 380px; display: flex; flex-direction: column;
    justify-content: center; padding: 40px 50px; background: white;
}
.login-form-side .brand-logo { text-align: center; margin-bottom: 30px; }
.login-form-side .brand-logo .logo-icon {
    width: 60px; height: 60px; background: var(--portal-primary); border-radius: 14px;
    display: inline-flex; align-items: center; justify-content: center;
    color: white; font-weight: 700; font-size: 1.3rem; margin-bottom: 10px;
}
.login-form-side .brand-logo h3 { font-weight: 600; color: var(--portal-text); margin: 0; }
.login-form-side .brand-logo p { color: var(--portal-text-muted); font-size: 0.85rem; margin: 4px 0 0; }

.portal-input {
    width: 100%; padding: 12px 16px; border: 1.5px solid #e2e8f0; border-radius: 10px;
    font-size: 0.95rem; transition: border-color 0.2s; outline: none;
}
.portal-input:focus { border-color: var(--portal-primary); box-shadow: 0 0 0 3px rgba(0,137,123,0.1); }
.portal-btn {
    width: 100%; padding: 13px; border: none; border-radius: 10px; font-size: 1rem;
    font-weight: 600; cursor: pointer; transition: all 0.2s;
}
.portal-btn-primary { background: var(--portal-primary); color: white; }
.portal-btn-primary:hover { background: var(--portal-primary-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,137,123,0.3); }

/* ---- Mobile ---- */
.portal-menu-toggle {
    display: none; position: fixed; top: 12px; left: 12px; z-index: 1100;
    background: var(--portal-primary); color: white; border: none; border-radius: 8px;
    width: 38px; height: 38px; font-size: 1.2rem; cursor: pointer;
}
.portal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 999; }
.portal-overlay.active { display: block; }

@media (max-width: 992px) {
    .portal-sidebar { width: 240px; }
    .portal-main { margin-left: 240px; }
}
@media (max-width: 768px) {
    .portal-sidebar { transform: translateX(-100%); width: 260px; }
    .portal-sidebar.show { transform: translateX(0); }
    .portal-main { margin-left: 0; }
    .portal-menu-toggle { display: flex; align-items: center; justify-content: center; }
    .portal-topbar { padding-left: 56px; }
    .login-visual { display: none; }
    .login-form-side { width: 100%; min-width: 0; padding: 30px 24px; }
}
