:root {
    --primary-green: #00E676;
    --secondary-green: #00C853;
    --dark-green: #1B5E20;
    --bg-dark: #0a0f0d;
    --glass-bg: rgba(20, 35, 25, 0.6);
    --glass-border: rgba(0, 230, 118, 0.2);
    --text-main: #ffffff;
    --text-muted: #a0aab2;
    --error: #ff4757;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-dark);
    background-image: linear-gradient(rgba(10, 15, 13, 0.85), rgba(10, 15, 13, 0.85)), url('aztec_bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow-x: hidden;
}

/* Background animated shapes */
.background-shapes {
    display: none;
    /* Oculto para usar el nuevo fondo azteca */
    position: absolute;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: float 20s infinite ease-in-out alternate;
}

.shape-1 {
    width: 400px;
    height: 400px;
    background: var(--primary-green);
    top: -100px;
    left: -100px;
}

.shape-2 {
    width: 300px;
    height: 300px;
    background: var(--dark-green);
    bottom: -50px;
    right: -50px;
    animation-delay: -5s;
}

.shape-3 {
    width: 200px;
    height: 200px;
    background: #00BFA5;
    top: 40%;
    left: 60%;
    animation-delay: -10s;
}

@keyframes float {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(50px, 50px) scale(1.2);
    }
}

/* Container & Glassmorphism */
.container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
    perspective: 1000px;
    margin: 40px 0;
}

.container-large {
    max-width: 600px;
    /* Larger box for the register form */
}

.form-box {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 25px 45px rgba(0, 0, 0, 0.5);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

/* Typography */
.header {
    text-align: center;
    margin-bottom: 30px;
}

.header h2 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #fff, var(--primary-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header p {
    color: var(--text-muted);
    font-size: 14px;
}

/* Forms */
form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.input-row {
    display: flex;
    gap: 15px;
}

.input-row .input-group {
    flex: 1;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    transition: color 0.3s;
}

.input-group input,
.input-group select {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 16px;
    border-radius: 12px;
    color: white;
    font-size: 14px;
    outline: none;
    transition: all 0.3s ease;
}

.input-group input:focus,
.input-group select:focus {
    border-color: var(--primary-green);
    background: rgba(0, 230, 118, 0.05);
    box-shadow: 0 0 15px rgba(0, 230, 118, 0.2);
    transform: translateY(-2px);
}

.input-group input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.input-group select option {
    background: var(--bg-dark);
    color: white;
}

.input-group:focus-within label {
    color: var(--primary-green);
}

/* Buttons */
.btn {
    background: linear-gradient(135deg, var(--secondary-green), var(--primary-green));
    color: #000;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(45deg) translateY(-100%);
    transition: transform 0.5s ease;
}

.btn:hover::after {
    transform: rotate(45deg) translateY(100%);
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 230, 118, 0.5);
}

.btn:active {
    transform: translateY(1px);
}

.btn-small {
    padding: 10px;
    font-size: 14px;
}

/* Switch Form */
.switch-form {
    text-align: center;
    margin-top: 25px;
    font-size: 14px;
    color: var(--text-muted);
}

.switch-form a {
    color: var(--primary-green);
    font-weight: 600;
    cursor: pointer;
    transition: color 0.3s;
    text-decoration: none;
}

.switch-form a:hover {
    color: #fff;
    text-decoration: underline;
}

/* Checkbox (Data Protection) */
.data-protection-banner {
    background: rgba(0, 0, 0, 0.2);
    border: 1px dashed var(--glass-border);
    padding: 15px;
    border-radius: 12px;
    margin-top: 5px;
    transition: all 0.3s ease;
}

.data-protection-banner:hover {
    border-color: var(--primary-green);
    background: rgba(0, 230, 118, 0.05);
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
    position: relative;
    cursor: pointer;
    font-size: 13px;
    user-select: none;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    min-width: 18px;
    height: 18px;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    margin-right: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s;
    margin-top: 2px;
}

.checkbox-container input:checked~.checkmark {
    background-color: var(--primary-green);
    border-color: var(--primary-green);
    box-shadow: 0 0 10px rgba(0, 230, 118, 0.5);
}

.checkmark:after {
    content: "";
    display: none;
    width: 4px;
    height: 8px;
    border: solid black;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-container input:checked~.checkmark:after {
    display: block;
}

.checkbox-container .text {
    color: var(--text-muted);
    line-height: 1.4;
}

.checkbox-container a {
    color: var(--primary-green);
    text-decoration: none;
}

.checkbox-container a:hover {
    text-decoration: underline;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
}

.modal.show {
    display: flex;
    animation: fadeIn 0.3s;
}

.modal-content {
    background: var(--bg-dark);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 30px;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.8);
    transform: scale(0.9);
    animation: scaleUp 0.3s forwards;
}

.modal-content h2 {
    color: var(--primary-green);
    margin-bottom: 15px;
    font-size: 20px;
}

.modal-content p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    color: var(--text-muted);
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover {
    color: white;
}

/* Toast Notification */
.toast {
    visibility: hidden;
    min-width: 250px;
    background-color: var(--primary-green);
    color: #000;
    text-align: center;
    border-radius: 12px;
    padding: 16px;
    position: fixed;
    z-index: 1000;
    bottom: 30px;
    font-weight: 600;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.5s, bottom 0.5s;
}

.toast.show {
    visibility: visible;
    opacity: 1;
    bottom: 50px;
}

.toast.error {
    background-color: var(--error);
    color: white;
}

/* Logo */
.logo-container {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

.logo-container-admin {
    display: flex;
    justify-content: center;
    align-items: center;
}

.app-logo {
    max-width: 80px;
    height: auto;
    filter: drop-shadow(0 0 10px rgba(0, 230, 118, 0.5));
    animation: pulse 3s infinite ease-in-out;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes scaleUp {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Staggered form animations */
.animate-in {
    animation: slideUpFade 0.6s ease-out forwards;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 0 10px rgba(0, 230, 118, 0.5));
    }

    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 20px rgba(0, 230, 118, 0.8));
    }

    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 10px rgba(0, 230, 118, 0.5));
    }
}

.stagger-1 {
    animation: slideUpFade 0.5s ease-out 0.1s both;
}

.stagger-2 {
    animation: slideUpFade 0.5s ease-out 0.2s both;
}

.stagger-3 {
    animation: slideUpFade 0.5s ease-out 0.3s both;
}

.stagger-4 {
    animation: slideUpFade 0.5s ease-out 0.4s both;
}

.stagger-5 {
    animation: slideUpFade 0.5s ease-out 0.5s both;
}

.stagger-6 {
    animation: slideUpFade 0.5s ease-out 0.6s both;
}

.stagger-7 {
    animation: slideUpFade 0.5s ease-out 0.7s both;
}

/* Admin Dashboard */
.admin-container {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    width: 90%;
    max-width: 1000px;
    box-shadow: 0 25px 45px rgba(0, 0, 0, 0.5);
    margin: 40px 0;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--glass-border);
    padding-bottom: 20px;
}

.admin-header h2 {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, #fff, var(--primary-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.admin-header p {
    color: var(--text-muted);
    font-size: 14px;
    margin-top: 5px;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--primary-green);
    color: var(--primary-green);
}

.btn-outline:hover {
    background: var(--primary-green);
    color: #000;
}

.table-wrapper {
    overflow-x: auto;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.data-table th,
.data-table td {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.data-table th {
    background: rgba(0, 230, 118, 0.1);
    color: var(--primary-green);
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
}

.data-table td {
    font-size: 14px;
    color: #e0e0e0;
}

.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
    font-style: italic;
}

/* Admin Controls */
.admin-controls {
    margin-bottom: 20px;
}

.admin-controls input {
    width: 100%;
    max-width: 400px;
    background: rgba(0, 0, 0, 0.3);
}

/* Badges */
.badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-red {
    background: rgba(255, 71, 87, 0.2);
    color: #ff4757;
    border: 1px solid rgba(255, 71, 87, 0.4);
}

.badge-green {
    background: rgba(0, 230, 118, 0.2);
    color: var(--primary-green);
    border: 1px solid rgba(0, 230, 118, 0.4);
}

/* Action Buttons */
.btn-action {
    background: transparent;
    border: 1px solid var(--primary-green);
    color: var(--primary-green);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-action:hover {
    background: var(--primary-green);
    color: #000;
}

.btn-action:disabled {
    border-color: var(--text-muted);
    color: var(--text-muted);
    cursor: not-allowed;
    background: transparent;
}

.hidden {
    display: none !important;
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .input-row {
        flex-direction: column;
        gap: 20px;
    }

    .form-box {
        padding: 30px 20px;
    }

    .container {
        margin: 20px 0;
    }
}

/* Ad Modals */
.ad-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    justify-content: center;
    align-items: center;
}

.ad-modal.show {
    display: flex;
    animation: fadeIn 0.5s;
}

.ad-modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    animation: scaleUp 0.5s forwards;
}

.ad-image {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 230, 118, 0.3);
    object-fit: contain;
}

.ad-close-btn {
    min-width: 150px;
    opacity: 1;
}

.ad-close-btn:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}
.ad-close-btn:disabled::after {
    display: none;
}

/* Footer Styles */
.app-footer {
    position: fixed;
    bottom: 10px;
    right: 15px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    z-index: 100;
    opacity: 0.5;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.app-footer:hover {
    opacity: 1;
}

.footer-logo {
    height: 80px;
    width: auto;
    max-width: 100px;
    object-fit: contain;
}

.footer-credits {
    text-align: right;
    font-size: 11px;
    color: #ffffff;
    line-height: 1.3;
}

/* Print Specific Styles */
@media print {
    .app-footer {
        position: fixed;
        bottom: 10px;
        right: 15px;
        opacity: 1;
    }
}

/* Dashboard Styles */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
    background: rgba(0, 0, 0, 0.2);
    padding: 20px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.dashboard-filter {
    min-width: 150px;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.kpi-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: transform 0.3s;
}

.kpi-card:hover {
    transform: translateY(-5px);
    background: rgba(0, 230, 118, 0.05);
    border-color: rgba(0, 230, 118, 0.3);
}

.kpi-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
}

.kpi-info h3 {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 400;
}

.kpi-value {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin-top: 5px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.chart-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 20px;
}

.col-span-2 {
    grid-column: span 2;
}

.chart-card h3 {
    margin-bottom: 20px;
    font-size: 16px;
    color: #fff;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 10px;
}

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .col-span-2 {
        grid-column: span 1;
    }
}