:root {
    --bg-primary: #0f0f23;
    --bg-secondary: #1a1a2e;
    --bg-card: #16213e;
    --bg-sidebar: #1f1f3a;
    --text-primary: #eaeaea;
    --text-secondary: #a0a0b0;
    --text-muted: #6b6b7b;
    --border-color: #2a2a4a;
    --border-light: #3a3a5a;
    --primary-color: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --accent-cyan: #22d3ee;
    --accent-teal: #14b8a6;
    --accent-pink: #f472b6;
    --accent-orange: #fb923c;
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-bg: linear-gradient(180deg, #0f0f23 0%, #1a1a2e 100%);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: var(--font-family);
    background: var(--gradient-bg);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.app-container {
    display: flex;
    min-height: 100vh;
    overflow: hidden;
}

/* Sidebar Styling */
.sidebar {
    width: 340px;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 0;
    position: relative;
    overflow-y: auto;
}

.logo-area {
    padding: 2rem 1.5rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.1) 0%, transparent 100%);
}

.logo-area h2 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.025em;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-area p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.controls-area {
    flex: 1;
    padding: 1.5rem;
}

#pdc-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-group select,
.form-group input {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    color: var(--text-primary);
    outline: none;
    transition: var(--transition);
    appearance: none;
}

.form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%2364748b'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1.2em;
    cursor: pointer;
}

.form-group select:hover,
.form-group input:hover {
    border-color: var(--primary-color);
    background: var(--bg-card);
}

.form-group select:focus,
.form-group input:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2), var(--shadow-glow);
}

.form-group select:disabled {
    background-color: var(--bg-secondary);
    cursor: not-allowed;
    opacity: 0.6;
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 0.5rem;
    padding: 0.75rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 8px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    color: #ffffff;
    cursor: pointer;
    padding: 4px 0;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    min-width: 20px;
    accent-color: #818cf8;
    cursor: pointer;
    border: 2px solid #818cf8;
    background-color: #1a1a2e;
    border-radius: 4px;
    appearance: none;
    -webkit-appearance: none;
    position: relative;
}

.checkbox-group input[type="checkbox"]:checked {
    background-color: #818cf8;
}

.checkbox-group input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 14px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.form-section-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, #818cf8, transparent);
    margin: 1rem 0;
}

/* Buttons */
.btn-primary {
    width: 100%;
    padding: 1rem;
    background: var(--gradient-primary);
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    margin-top: 0.5rem;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:active {
    transform: translateY(0);
}

/* Main Content Styling */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background: var(--gradient-bg);
    position: relative;
}

.main-content::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.topbar {
    padding: 2.5rem 3rem 1.5rem;
    position: relative;
    z-index: 1;
}

.topbar h1 {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.5rem;
}

.topbar .subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.topbar .subtitle::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--accent-cyan);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.workspace {
    padding: 0 3rem 3rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

/* Empty State */
.empty-state {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-lg);
    text-align: center;
    padding: 4rem;
    position: relative;
    overflow: hidden;
    animation: fadeIn 0.5s ease-out;
}

.empty-state::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 30%, rgba(99, 102, 241, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 70% 70%, rgba(236, 72, 153, 0.05) 0%, transparent 50%);
    pointer-events: none;
}

.empty-state h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.empty-state p {
    color: var(--text-secondary);
    max-width: 450px;
    font-size: 1rem;
}

.icon-pulse {
    width: 80px;
    height: 80px;
    background: var(--bg-secondary);
    border-radius: 50%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--border-color);
}

.icon-pulse::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 30px;
    background: var(--gradient-primary);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

/* PDC Display Area */
.pdc-result {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    animation: slideUp 0.5s ease-out;
    margin-top: 2rem;
}

.pdc-result h2 {
    text-align: center;
    margin-bottom: 1rem;
}

.pdc-result .datos-ref {
    margin-bottom: 1rem;
}

.pdc-result .datos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
    font-size: 0.85rem;
}

.pdc-result .desarrollo {
    margin-bottom: 1rem;
}

.pdc-result .desarrollo p {
    font-size: 0.9rem;
}

.pdc-result * {
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
}

.pdc-result .pdc-table,
.pdc-result .pdc-table * {
    pointer-events: auto;
}

.pdc-result .action-buttons,
.pdc-result .action-buttons * {
    pointer-events: auto !important;
    user-select: auto !important;
}

.protection-notice {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-secondary);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    justify-content: center;
}

.action-buttons .btn-primary,
.action-buttons .btn-secondary {
    max-width: 200px;
}

.btn-secondary {
    width: 100%;
    padding: 1rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: var(--bg-card);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.hidden {
    display: none !important;
}

.adaptaciones-section {
    margin-top: 2rem;
}

.adaptaciones-section h3 {
    color: #818cf8;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.adaptaciones-table {
    margin-top: 0.5rem;
}

.firmas-section {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-top: 3rem;
    padding-top: 2rem;
}

.firma {
    text-align: center;
    width: 200px;
}

.firma-line {
    width: 100%;
    border-top: 1px solid var(--text-primary);
    margin-bottom: 0.5rem;
}

.firma-name {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

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

/* Table Styling */
.pdc-table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    margin-top: 1.5rem;
}

.pdc-table th, 
.pdc-table td {
    border: 2px solid var(--border-color);
    padding: 1rem;
    text-align: left;
    vertical-align: top;
    font-size: 0.9rem;
}

.pdc-table th {
    background: var(--bg-secondary);
    font-weight: 600;
    color: var(--primary-light);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.pdc-table tr:nth-child(even) td {
    background: rgba(99, 102, 241, 0.03);
}

.section-title {
    background: var(--gradient-primary) !important;
    color: white !important;
    font-weight: 700;
    text-align: center;
    font-size: 1rem !important;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.5); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 20px rgba(99, 102, 241, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--border-light);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Print Styles */
@media print {
    .sidebar, .topbar, .btn-primary, .logo-area, .controls-area, .empty-state, #generate-btn, .action-buttons, .protection-notice, .adsense-header, .cookie-banner {
        display: none !important;
    }

    .workspace {
        padding: 0 !important;
        margin: 0 !important;
    }

    html, body {
        background: white !important;
        margin: 0 !important;
        padding: 0 !important;
        width: auto !important;
        height: auto !important;
    }

    * {
        color: #000 !important;
        background-image: none !important;
        -webkit-print-color-adjust: economy !important;
        print-color-adjust: economy !important;
    }

    .app-container {
        display: block !important;
    }

    .main-content {
        padding: 0 !important;
    }

    .pdc-result {
        background: transparent !important;
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
    }

    .pdc-result h2, .pdc-result h3, .pdc-result p, .pdc-result span, .pdc-result li, .pdc-result strong {
        color: #000 !important;
        font-family: Arial, sans-serif !important;
    }
    
    .section-title {
        background-color: #ddd !important;
        color: #000 !important;
        font-weight: bold !important;
        text-align: center !important;
        border: 1px solid #000 !important;
    }

    .pdc-result .datos-grid {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 3px !important;
        font-size: 10pt !important;
    }

    .pdc-result p, .pdc-result span, .pdc-result li, .pdc-result strong {
        font-family: Arial, sans-serif !important;
        font-size: 10pt !important;
    }

    .pdc-table {
        width: 100% !important;
        min-width: 100% !important;
        table-layout: auto !important;
        font-family: Arial, sans-serif !important;
        font-size: 8pt !important;
        border-collapse: collapse !important;
        border: 1px solid black !important;
        margin-bottom: 10px !important;
    }

    .pdc-table thead {
        display: table-header-group !important;
    }

    .pdc-table tbody {
        display: table-row-group !important;
    }

    .pdc-table th, .pdc-table td {
        border: 1px solid black !important;
        padding: 3px !important;
        font-family: Arial, sans-serif !important;
        font-size: 8pt !important;
    }

    .pdc-table th {
        background-color: #eee !important;
        color: #000 !important;
        font-weight: bold !important;
    }

    .pdc-table tr {
        page-break-after: auto !important;
    }

    .pdc-table td[rowspan] {
        page-break-after: auto !important;
    }

    @page {
        size: landscape;
        margin: 2cm;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        width: 300px;
    }
    
    .topbar, 
    .workspace {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

@media (max-width: 768px) {
    .app-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        max-height: 50vh;
    }
    
    .topbar h1 {
        font-size: 1.5rem;
    }
}
/* Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 500px;
    padding: 2.5rem;
    position: relative;
    box-shadow: var(--shadow-lg), 0 0 40px rgba(99, 102, 241, 0.15);
    animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--text-primary);
    transform: rotate(90deg);
}

.modal-header {
    text-align: center;
    margin-bottom: 2rem;
}

.modal-header h2 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-light);
}

.modal-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.payment-options,
.export-options {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.payment-option {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.payment-option:hover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
}

.payment-option.selected {
    border-color: var(--primary-light);
    background: rgba(99, 102, 241, 0.2);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.2);
}

.option-icon {
    width: 40px;
    height: 40px;
    background: var(--bg-card);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-light);
    font-size: 1.2rem;
}

.option-info h4 {
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.option-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.qr-container {
    text-align: center;
    padding: 1.5rem;
    background: white;
    border-radius: var(--radius-md);
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.qr-container img {
    width: 200px;
    height: 200px;
    object-fit: contain;
}

.qr-container p {
    color: #333;
    font-weight: 600;
    font-size: 0.9rem;
}

.verify-btn {
    margin-top: 2rem;
}

/* Status steps */
.payment-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    position: relative;
}

.payment-steps::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--border-color);
    z-index: 0;
}

.step {
    width: 32px;
    height: 32px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    color: var(--text-muted);
    z-index: 1;
    position: relative;
    transition: var(--transition);
}

.step.active {
    background: var(--primary-color);
    border-color: var(--primary-light);
    color: white;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
}

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

/* === AUTH & USER AREA === */
.user-area {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.btn-login {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.btn-login:hover {
    background: var(--primary-dark);
    box-shadow: var(--shadow-glow);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    background: var(--bg-card);
    border-radius: var(--radius-md);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.user-info {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.user-info #user-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-primary);
}

.plan-badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    font-weight: 600;
}

.badge-free {
    background: var(--text-muted);
    color: white;
}

.badge-basic {
    background: var(--accent-teal);
    color: white;
}

.badge-premium {
    background: var(--primary-color);
    color: white;
}

.btn-logout {
    padding: 0.4rem 0.75rem;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-logout:hover {
    border-color: var(--error);
    color: var(--error);
}

/* === COOKIE BANNER === */
.cookie-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--bg-sidebar);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.cookie-content p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    flex: 1;
    min-width: 300px;
}

.cookie-buttons {
    display: flex;
    gap: 0.5rem;
}

.btn-cookie {
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

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

.btn-accept:hover {
    background: var(--primary-dark);
}

.btn-reject {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-reject:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
}

/* === ADSENSE HEADER === */
.adsense-header {
    text-align: center;
    padding: 0.5rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
}

.adsense-header ins {
    display: inline-block;
}

/* === MODAL === */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1rem;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: var(--bg-sidebar);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: pointer;
    background: none;
    border: none;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-content h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--primary-light);
}

/* === PLAN CARDS === */
.plan-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.plan-card {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.plan-card:hover {
    border-color: var(--primary-light);
}

.plan-card.selected {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-glow);
}

.plan-card h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.plan-card .price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent-cyan);
    margin-bottom: 0.75rem;
}

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

.plan-card ul {
    list-style: none;
    text-align: left;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.plan-card li {
    margin-bottom: 0.25rem;
}

.plan-free { border-color: var(--text-muted); }
.plan-basic { border-color: var(--accent-teal); }
.plan-premium { border-color: var(--primary-color); }

.plan-basic.selected { border-color: var(--accent-teal); box-shadow: 0 0 15px rgba(20, 184, 166, 0.3); }
.plan-premium.selected { border-color: var(--primary-color); box-shadow: 0 0 15px rgba(99, 102, 241, 0.3); }

/* === REGISTRATION FORM === */
.registration-form {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

.registration-form h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.registration-form .form-group {
    margin-bottom: 1rem;
}

.registration-form label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.registration-form select {
    width: 100%;
    padding: 0.6rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.9rem;
}

.registration-form select:focus {
    outline: none;
    border-color: var(--primary-color);
}

.registration-form input[type="checkbox"] {
    margin-right: 0.5rem;
}

/* === UPGRADE BANNER === */
.upgrade-banner {
    background: linear-gradient(135deg, var(--accent-orange) 0%, var(--error) 100%);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

.upgrade-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.upgrade-content span {
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
}

.btn-upgrade {
    background: white;
    color: var(--accent-orange);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition);
}

.btn-upgrade:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
