
/* ===== RESET Y VARIABLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #336cf6;
    --primary-dark: #1e88e5;
    --secondary: #ff9800;
    --background: #f5f7fc;
    --card-bg: #ffffff;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --border: #e1e8f9;
    --shadow: 0 2px 10px rgba(0,0,0,0.05);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--background);
    overflow-x: hidden;
}

/* ===== HEADER ===== */
.reseller-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--primary);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s;
}

.menu-toggle:hover {
    background: #f0f4ff;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.logo-text {
    font-weight: 600;
    font-size: 18px;
    color: var(--primary);
}

/* ===== HEADER RIGHT ===== */
.header-right {
    display: flex;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f5f5f5;
    padding: 8px 15px;
    border-radius: 30px;
    font-size: 14px;
}

.user-info i {
    font-size: 18px;
    color: var(--primary);
}

.user-email {
    font-weight: 500;
    color: var(--text-dark);
}

.user-credits {
    color: var(--primary);
    font-weight: 600;
}

.logout-link {
    color: #999;
    text-decoration: none;
    margin-left: 5px;
}

.logout-link:hover {
    color: #f44336;
}

.auth-buttons {
    display: flex;
    gap: 10px;
}

.auth-btn {
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.login-btn {
    background: white;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.login-btn:hover {
    background: var(--primary);
    color: white;
}

.register-btn {
    background: var(--primary);
    color: white;
}

.register-btn:hover {
    background: var(--primary-dark);
}

/* ===== MENÚ LATERAL ===== */
.side-menu {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background: white;
    box-shadow: 2px 0 20px rgba(0,0,0,0.1);
    z-index: 1000;
    transition: left 0.3s ease;
    display: flex;
    flex-direction: column;
}

.side-menu.open {
    left: 0;
}

.menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border);
}

.menu-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu-logo img {
    width: 35px;
    height: 35px;
}

.menu-logo span {
    font-weight: 600;
    font-size: 18px;
    color: var(--primary);
}

.menu-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #999;
    padding: 5px;
}

.menu-close:hover {
    color: #f44336;
}

.menu-items {
    list-style: none;
    padding: 20px 0;
    flex: 1;
}

.menu-items li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-dark);
    font-size: 15px;
}

.menu-items li:hover {
    background: #f5f9ff;
}

.menu-items li.active {
    background: #eef3ff;
    color: var(--primary);
    border-right: 3px solid var(--primary);
}

.menu-items li i {
    width: 24px;
    text-align: center;
    font-size: 18px;
}

.menu-items .divider {
    height: 1px;
    background: var(--border);
    margin: 15px 20px;
    padding: 0;
    cursor: default;
}

.menu-footer {
    padding: 20px;
    text-align: center;
    border-top: 1px solid var(--border);
    color: var(--text-light);
    font-size: 12px;
}

/* ===== OVERLAY ===== */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
    display: none;
}

.menu-overlay.active {
    display: block;
}

/* ===== MAIN CONTENT ===== */
.reseller-main {
    margin-top: 70px;
    min-height: calc(100vh - 70px);
    padding: 20px;
}

.content-area {
    max-width: 1200px;
    margin: 0 auto;
    background: transparent;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .logo-text {
        display: none;
    }
    
    .user-email {
        display: none;
    }
    
    .user-info {
        padding: 8px 12px;
    }
    
    .auth-buttons .auth-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .reseller-main {
        padding: 15px;
    }
}
/* ===== POPUPS ===== */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(3px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.popup-overlay.active {
    display: flex;
}

.popup-container {
    background: white;
    border-radius: 24px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: popupFadeIn 0.2s ease;
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #eef2f9;
}

.popup-header h3 {
    margin: 0;
    font-size: 18px;
    color: #2c3e50;
}

.popup-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
    line-height: 1;
}

.popup-close:hover {
    color: #f44336;
}

.popup-body {
    padding: 24px;
}

.popup-footer {
    padding: 16px 24px;
    border-top: 1px solid #eef2f9;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.popup-footer button {
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.popup-footer .btn-cancel {
    background: #f5f5f5;
    border: 1px solid #ddd;
    color: #666;
}

.popup-footer .btn-cancel:hover {
    background: #eee;
}

.popup-footer .btn-submit {
    background: #336cf6;
    border: none;
    color: white;
}

.popup-footer .btn-submit:hover {
    background: #1e88e5;
}

/* Formularios dentro del popup */
.popup-body .form-group {
    margin-bottom: 20px;
}

.popup-body label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #2c3e50;
    font-size: 14px;
}

.popup-body input,
.popup-body textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #e1e8f9;
    border-radius: 12px;
    font-size: 14px;
    box-sizing: border-box;
    transition: all 0.2s;
}

.popup-body input:focus,
.popup-body textarea:focus {
    outline: none;
    border-color: #336cf6;
    box-shadow: 0 0 0 3px rgba(51, 108, 246, 0.1);
}

.popup-body textarea {
    resize: vertical;
    min-height: 80px;
}

.popup-body .note-info {
    font-size: 12px;
    color: #7f8c8d;
    margin-top: 5px;
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Mobile */
@media (max-width: 700px) {
    .popup-container {
        width: 95%;
        max-width: none;
        border-radius: 20px;
    }
    
    .popup-body {
        padding: 20px;
    }
    
    .popup-footer button {
        padding: 12px 20px;
    }
}
/* ===== MÁRGEN SUPERIOR PARA TÍTULOS DE TODAS LAS PÁGINAS ===== */
.dashboard-page h2,
.reseller-dashboard h2,
.add-playlist-page h2,
.users-page h2,
.admin-page h2,
.reseller-landing h1 {
    margin-top: 12px;
}

/* Si quieres un margen mayor, usa 15px o 20px */
@media (max-width: 700px) {
    .dashboard-page h2,
    .reseller-dashboard h2,
    .add-playlist-page h2,
    .users-page h2,
    .admin-page h2,
    .reseller-landing h1 {
        margin-top: 8px;
    }
}

/* ===== ESTILOS PARA BUY PAGE (completo) ===== */
.plans-container {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    justify-content: left;
    flex-wrap: wrap;
}

.plan-option {
    background-color: rgba(215, 228, 255, 0.2) !important;
    border-radius: 10px;
    padding: 12px;
    width: 150px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.plan-option p {
    color: black;
    font-size: 18px;
    font-weight: bold;
    margin: 10px 0;
}

.plan-option:hover {
    background-color: rgba(215, 228, 255, 1) !important;
}

.plan-option.selected {
    background-color: rgba(215, 228, 255, 1) !important;
    border-left: 2px solid #42a5f5;
}

#submit {
    padding: 10px 20px;
    border-radius: 10px !important;
    overflow: hidden !important;
    height: 48px !important;
    border-left: 2px solid #42a5f5;
    border-right: 2px solid #42a5f5;
    background-color: rgba(215, 228, 255, 0.3) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    cursor: pointer;
}

/* Device ID input para buy page */
#content .device-id-container {
    display: flex !important;
    align-items: center;
    border-radius: 12px !important;
    overflow: hidden !important;
    height: 52px !important;
    border-left: 4px solid #42a5f5;
    background-color: rgba(215, 228, 255, 0.3) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    padding: 0;
    margin-bottom: 20px;
}

#content .device-id-input {
    flex-grow: 1;
    border: none;
    outline: none;
    font-size: 15px;
    background-color: transparent !important;
    height: 100%;
    padding: 0 16px;
    color: #2c3e50;
    font-weight: 500;
}

#content .device-id-input::placeholder {
    color: #a0b3d9;
}

#message {
    margin-top: 20px;
    font-weight: bold;
    display: none;
    padding: 12px;
    border-radius: 10px;
    background: #e8f5e8;
    color: #4CAF50;
}
@media (max-width: 700px) {
    .plans-container {
        flex-direction: row !important;
        justify-content: center !important;
        gap: 15px !important;
    }
    
    .plan-option {
        width: calc(50% - 15px) !important;
        min-width: 120px !important;
    }
}

h2, h3 {
    margin-top: 20px;
    margin-bottom: 15px;
}

/* Específico para el primer título de cada página */
.dashboard-page h2:first-of-type,
.reseller-dashboard h2:first-of-type,
.add-playlist-page h2:first-of-type,
.users-page h2:first-of-type,
.admin-page h2:first-of-type,
#content h2:first-of-type {
    margin-top: 0;
}

/* ===== FORZAR QUE SE VEA EL SCROLLBAR ===== */
body {
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

.reseller-main {
    overflow-y: auto !important;
}

/* Asegurar que el scrollbar sea visible en Chrome */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}
