/* ES CRELI - Main Stylesheet */
/* Light Mode Colorido - Gradientes, sombras, colores vibrantes */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1565C0;
    --primary-dark: #0D47A1;
    --primary-light: #E3F2FD;
    --secondary-color: #7C4DFF;
    --secondary-dark: #651FFF;
    --secondary-light: #EDE7F6;
    --success-color: #10b981;
    --success-light: #d1fae5;
    --success-dark: #065f46;
    --warning-color: #f59e0b;
    --warning-light: #fef3c7;
    --danger-color: #ef4444;
    --danger-light: #fef2f2;
    --text-primary: #1a1a2e;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --bg-primary: #f8fafc;
    --bg-card: #ffffff;
    --border-color: #e5e7eb;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-lg: 16px;
    --gradient-primary: linear-gradient(135deg, #1565C0, #7C4DFF);
    --gradient-hero: linear-gradient(135deg, #0D47A1 0%, #1565C0 50%, #7C4DFF 100%);
    --gradient-btn: linear-gradient(135deg, #1565C0, #1976D2);
    --gradient-btn-premium: linear-gradient(135deg, #7C4DFF, #B388FF);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

/* ===== LAYOUT ===== */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem;
}

/* ===== LANGUAGE SELECTOR ===== */
.lang-selector {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
}

.lang-selector select {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-card);
    font-size: 0.9rem;
    cursor: pointer;
    outline: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.lang-selector select:hover {
    border-color: var(--primary-color);
}

/* ===== HEADER ===== */
.header {
    text-align: center;
    margin-bottom: 2rem;
    padding-top: 2rem;
}

.title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.title-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.welcome-text {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

/* ===== HERO SECTION ===== */
.hero {
    background: var(--gradient-hero);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    color: white;
    margin-bottom: 3rem;
    box-shadow: 0 8px 32px rgba(21, 101, 192, 0.25);
}

.hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.15rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== CARDS ===== */
.cards-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

@media (max-width: 768px) {
    .cards-container {
        grid-template-columns: 1fr;
    }
}

.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-public {
    border-top: 4px solid var(--success-color);
}

.card-member {
    border-top: 4px solid var(--primary-color);
}

.card-premium {
    border-top: 4px solid var(--secondary-color);
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

/* ===== BADGES ===== */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.badge-free {
    background: var(--success-light);
    color: var(--success-dark);
}

.badge-premium {
    background: var(--secondary-light);
    color: var(--secondary-dark);
}

/* ===== FEATURE BOXES ===== */
.feature-box {
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.feature-box strong {
    display: block;
    margin-bottom: 0.25rem;
}

.feature-box p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
}

.feature-box-green { background: #f0fdf4; }
.feature-box-blue { background: #eff6ff; }
.feature-box-purple { background: #f5f3ff; }

.feature-list {
    list-style: none;
    margin-bottom: 1.5rem;
}

.feature-list li {
    padding: 0.5rem 0;
    color: var(--text-primary);
}

/* ===== BUTTONS ===== */
.btn {
    display: block;
    width: 100%;
    padding: 0.875rem 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg-card);
    color: var(--text-primary);
}

.btn:hover {
    border-color: var(--primary-color);
    background: var(--bg-primary);
}

.btn-primary {
    background: var(--gradient-btn);
    border-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(21, 101, 192, 0.3);
}

.btn-premium {
    background: var(--gradient-btn-premium);
    border-color: var(--secondary-color);
    color: white;
}

.btn-premium:hover {
    box-shadow: 0 4px 12px rgba(124, 77, 255, 0.3);
}

.btn-secondary {
    background: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-primary);
}

.btn-success {
    background: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

.btn-inline {
    display: inline-block;
    width: auto;
}

/* ===== FORMS ===== */
.form-group {
    margin-bottom: 1rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: var(--bg-card);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(21, 101, 192, 0.1);
}

.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 1.2rem;
}

/* ===== ALERTS ===== */
.alert {
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.alert-success {
    background: var(--success-light);
    color: var(--success-dark);
    border: 1px solid var(--success-color);
}

.alert-error {
    background: var(--danger-light);
    color: #991b1b;
    border: 1px solid var(--danger-color);
}

.alert-info {
    background: var(--primary-light);
    color: var(--primary-dark);
    border: 1px solid var(--primary-color);
}

/* ===== AUTH PAGES ===== */
.auth-body {
    background: var(--gradient-hero);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-container {
    max-width: 450px;
    width: 100%;
    margin: 2rem;
}

.auth-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
    text-align: center;
}

.auth-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.auth-title {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 1.5rem 0;
    color: var(--text-muted);
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.auth-divider span {
    padding: 0 1rem;
}

/* ===== CAPTCHA ===== */
.captcha-box {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1rem;
    text-align: center;
}

.captcha-question {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.captcha-input {
    width: 120px;
    text-align: center;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1.1rem;
}

/* ===== CHECKBOX & TERMS ===== */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1rem;
    text-align: left;
}

.checkbox-group input[type="checkbox"] {
    margin-top: 0.25rem;
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.checkbox-group label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.checkbox-group a {
    color: var(--primary-color);
    text-decoration: underline;
    cursor: pointer;
}

/* ===== MODALS ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

/* ===== SIGNUP STEPS ===== */
.steps-header {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.step-pill {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    background: var(--bg-primary);
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.step-pill.active {
    background: var(--primary-light);
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.step-pill.completed {
    background: var(--success-light);
    color: var(--success-dark);
    border-color: var(--success-color);
}

.step-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.step-content.active {
    display: block;
}

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

/* ===== PLAN CARDS ===== */
.plan-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 2rem;
    border: 2px solid var(--border-color);
    text-align: center;
    transition: all 0.3s ease;
}

.plan-card:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 8px 24px rgba(124, 77, 255, 0.15);
}

.plan-card.selected {
    border-color: var(--secondary-color);
    box-shadow: 0 8px 24px rgba(124, 77, 255, 0.2);
}

.plan-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin: 1rem 0;
}

.plan-price span {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 400;
}

/* ===== PASSWORD STRENGTH ===== */
.strength-meter {
    height: 4px;
    border-radius: 2px;
    background: var(--border-color);
    margin-top: 0.5rem;
    overflow: hidden;
}

.strength-meter-fill {
    height: 100%;
    border-radius: 2px;
    transition: width 0.3s ease, background 0.3s ease;
    width: 0;
}

.strength-text {
    font-size: 0.75rem;
    margin-top: 0.25rem;
    color: var(--text-muted);
}

/* ===== TOOLS GRID (info page) ===== */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.tool-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.tool-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(21, 101, 192, 0.12);
    transform: translateY(-2px);
}

.tool-icon {
    font-size: 2.5rem;
    margin-bottom: 0.75rem;
}

.tool-name {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.tool-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ===== FOOTER ===== */
.footer {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    transition: all 0.3s ease;
}

.footer-link:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.copyright {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.footer small {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* ===== UTILITIES ===== */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.hidden { display: none; }

/* ===== BILLING TOGGLE ===== */
.billing-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.billing-toggle span {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.billing-toggle span.active {
    color: var(--text-primary);
    font-weight: 600;
}

.toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--border-color);
    border-radius: 26px;
    transition: 0.3s;
}

.toggle-slider:before {
    content: '';
    position: absolute;
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
    background: var(--primary-color);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

/* ===== PAYMENT METHODS ===== */
.payment-methods {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.payment-btn {
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-card);
    cursor: pointer;
    text-align: center;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 500;
}

.payment-btn:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(21, 101, 192, 0.1);
}

.payment-btn .payment-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* ===== SECURITY INFO ===== */
.security-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 1rem;
}

/* ===== ADMIN STYLES ===== */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 260px;
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    padding: 1.5rem;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.admin-main {
    flex: 1;
    margin-left: 260px;
    padding: 2rem;
}

.admin-nav {
    list-style: none;
}

.admin-nav li {
    margin-bottom: 0.5rem;
}

.admin-nav button {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: var(--radius);
    background: transparent;
    color: var(--text-primary);
    text-align: left;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.admin-nav button:hover,
.admin-nav button.active {
    background: var(--primary-light);
    color: var(--primary-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* ===== TABLE ===== */
.table-container {
    overflow-x: auto;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background: var(--bg-primary);
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

td {
    color: var(--text-primary);
}

.status-active {
    color: var(--success-color);
    font-weight: 500;
}

.status-inactive {
    color: var(--danger-color);
    font-weight: 500;
}

.btn-sm {
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
    display: inline-block;
    width: auto;
}

/* ===== LEGAL PAGES ===== */
.legal-content {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow);
    max-width: 800px;
    margin: 2rem auto;
}

.legal-content h1 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.legal-content h2 {
    font-size: 1.3rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.legal-content p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

/* ===== BACK LINK ===== */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: var(--primary-color);
}
