/**
 * ONE Innovation & Development Platform
 * Complete Styles
 * ==========================================
 */

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

/* ==========================================
   VARIABLES CSS
   ========================================== */
:root {
    --color-primary: #00D4FF;
    --color-primary-dark: #00A8CC;
    --color-primary-light: #5CE1FF;
    --color-secondary: #90EE90;
    --color-secondary-dark: #5CB85C;
    --bg-dark: #0D0D1A;
    --bg-darker: #080812;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --bg-glass: rgba(13, 13, 26, 0.95);
    --text-primary: #FFFFFF;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.4);
    --color-success: #10B981;
    --color-warning: #F59E0B;
    --color-error: #EF4444;
    --color-info: #3B82F6;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-color-hover: rgba(0, 212, 255, 0.3);
    --shadow-glow: 0 0 40px rgba(0, 212, 255, 0.15);
    --shadow-glow-strong: 0 0 60px rgba(0, 212, 255, 0.25);
    --gradient-primary: linear-gradient(135deg, #00D4FF 0%, #00A8CC 100%);
    --gradient-hero: linear-gradient(135deg, #00D4FF 0%, #90EE90 100%);
    --gradient-bg: linear-gradient(180deg, #0D0D1A 0%, #080812 100%);
    --gradient-card: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    --font-primary: 'Sora', sans-serif;
    --font-secondary: 'Space Grotesk', sans-serif;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* ==========================================
   RESET
   ========================================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }

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

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: 
        radial-gradient(circle at 20% 80%, rgba(0, 212, 255, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(144, 238, 144, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.hidden { display: none !important; }

/* ==========================================
   HOMEPAGE - HERO
   ========================================== */
.home-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    z-index: 1000;
}

.home-header-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
}

.home-header-logo img { height: 40px; }

.home-header-brand {
    font-family: var(--font-secondary);
    font-size: 1.125rem;
    font-weight: 600;
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.home-header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.hero-section {
    margin-top: 70px;
    padding: 6rem 2rem 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero-logo {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin-bottom: 2rem;
    animation: floatIn 1s ease;
    position: relative;
}

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

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    line-height: 1.1;
    position: relative;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 3rem;
    line-height: 1.6;
    position: relative;
}

/* ==========================================
   HOMEPAGE - CATALOG
   ========================================== */
.catalog-section {
    padding: 4rem 2rem;
    max-width: 1600px;
    margin: 0 auto;
}

.catalog-title {
    font-size: 2.25rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 0.5rem;
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.catalog-subtitle {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    font-size: 1rem;
}

.catalog-filters {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.catalog-filter-btn {
    padding: 0.6rem 1.25rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
}

.catalog-filter-btn:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.catalog-filter-btn.active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    box-shadow: var(--shadow-glow);
}

.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
}

.catalog-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    transition: all var(--transition-slow);
    position: relative;
    overflow: hidden;
}

.catalog-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #00D4FF, #90EE90);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.catalog-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-color-hover);
    box-shadow: 0 20px 40px rgba(0, 212, 255, 0.12);
}

.catalog-card:hover::before { opacity: 1; }

.catalog-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.catalog-card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.catalog-card-desc {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.catalog-card-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.catalog-loading {
    text-align: center;
    padding: 4rem;
    color: var(--text-muted);
}

/* ==========================================
   PANTALLA DE LOGIN
   ========================================== */
#loginScreen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-box {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 3rem;
    width: 100%;
    max-width: 440px;
    text-align: center;
}

.login-logo {
    width: 100px;
    height: 100px;
    object-fit: contain;
    margin-bottom: 1.5rem;
}

.login-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-subtitle {
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-size: 0.9375rem;
}

.login-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.login-tab {
    flex: 1;
    padding: 0.75rem 0.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
}

.login-tab:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.login-tab.active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    box-shadow: var(--shadow-glow);
}

.login-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--color-error);
    border-radius: var(--radius-md);
    padding: 1rem;
    color: var(--color-error);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

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

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

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: all var(--transition-fast);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.1);
}

.form-input::placeholder { color: var(--text-muted); }
.form-textarea { min-height: 100px; resize: vertical; }

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='rgba(255,255,255,0.5)' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* ==========================================
   BOTONES
   ========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    text-decoration: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-glow);
}

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

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

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

.btn-success { background: var(--color-success); color: white; }
.btn-success:hover { background: #059669; transform: translateY(-2px); }

.btn-danger { background: var(--color-error); color: white; }
.btn-danger:hover { background: #DC2626; }

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

.btn-full { width: 100%; }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.8125rem; }
.btn-icon { width: 40px; height: 40px; padding: 0; }

/* ==========================================
   HEADER (PANELES)
   ========================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    z-index: 1000;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
}

.header-logo img { height: 40px; }

.header-brand {
    font-family: var(--font-secondary);
    font-size: 1.125rem;
    font-weight: 600;
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-nav {
    display: flex;
    gap: 0.5rem;
}

.nav-tab {
    padding: 0.5rem 1.25rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.nav-tab::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.nav-tab span { position: relative; z-index: 1; }

.nav-tab:hover {
    color: var(--text-primary);
    background: var(--bg-card-hover);
}

.nav-tab.active {
    color: white;
    border-color: transparent;
    box-shadow: var(--shadow-glow);
}

.nav-tab.active::before { opacity: 1; }

.header-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info { text-align: right; }
.user-name { font-weight: 600; font-size: 0.9375rem; }
.user-role { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.user-role.superadmin { color: var(--color-warning); }
.user-role.admin { color: var(--color-info); }
.user-role.usuario { color: var(--color-success); }

/* ==========================================
   CONTENIDO PRINCIPAL
   ========================================== */
.main-content {
    margin-top: 70px;
    padding: 2rem;
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
    min-height: calc(100vh - 70px);
}

.page-header { margin-bottom: 2rem; }

.page-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-subtitle { color: var(--text-muted); }

.action-bar {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-box input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: inherit;
}

.search-box input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.search-box i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    width: 18px;
    height: 18px;
}

/* ==========================================
   TABS CONTAINER
   ========================================== */
.tabs-container {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

/* ==========================================
   STATS GRID
   ========================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    transition: all var(--transition-base);
}

.stat-card:hover {
    border-color: var(--border-color-hover);
    transform: translateY(-4px);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ==========================================
   PROJECTS GRID
   ========================================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 1.5rem;
}

.project-card {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    transition: all var(--transition-slow);
    position: relative;
    overflow: hidden;
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #00D4FF, #90EE90);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.project-card:hover {
    transform: translateY(-8px);
    border-color: var(--border-color-hover);
    box-shadow: 0 20px 40px rgba(0, 212, 255, 0.15);
}

.project-card:hover::before { opacity: 1; }

.project-header { margin-bottom: 1rem; }

.project-title { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; }

.project-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.project-description {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.project-tags { margin-bottom: 1rem; }

.tag {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(59, 130, 246, 0.15);
    color: var(--color-info);
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.project-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.link-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 6px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.8125rem;
    text-decoration: none;
    transition: all var(--transition-fast);
}

.link-chip:hover {
    background: var(--bg-card-hover);
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.project-actions {
    display: flex;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* ==========================================
   BADGES
   ========================================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success { background: rgba(16, 185, 129, 0.15); color: var(--color-success); }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: var(--color-warning); }
.badge-error { background: rgba(239, 68, 68, 0.15); color: var(--color-error); }
.badge-info { background: rgba(59, 130, 246, 0.15); color: var(--color-info); }

/* ==========================================
   TABLAS
   ========================================== */
.table-container {
    background: var(--gradient-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    overflow-x: auto;
}

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

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

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

.table tbody tr:hover { background: var(--bg-card-hover); }
.table tbody tr:last-child td { border-bottom: none; }

/* ==========================================
   MODAL
   ========================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.modal-overlay.active { opacity: 1; visibility: visible; }

.modal {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 550px;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.95) translateY(20px);
    transition: transform var(--transition-slow);
}

.modal.modal-lg { max-width: 700px; }
.modal.modal-sm { max-width: 400px; }

.modal-overlay.active .modal { transform: scale(1) translateY(0); }

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.modal-title { font-size: 1.25rem; font-weight: 600; }

.modal-close {
    width: 36px; height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    max-height: calc(90vh - 140px);
}

.modal-footer {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--border-color);
}

/* ==========================================
   INFO/WARNING BOX
   ========================================== */
.info-box {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid var(--color-info);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.info-box p { color: var(--color-info); font-size: 0.875rem; margin: 0; }

.warning-box {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid var(--color-warning);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.warning-box p { color: var(--color-warning); font-size: 0.875rem; margin: 0; }

/* ==========================================
   USUARIO DEMO - CARDS ESPECIALES
   ========================================== */
.demo-card {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(0, 212, 255, 0.05) 100%);
    border: 2px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-xl);
    padding: 2rem;
    text-align: center;
    transition: all 0.3s;
}

.demo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(16, 185, 129, 0.2);
}

.demo-card-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.5rem; }

.demo-card-base {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
}

.attempts-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.attempts-number {
    font-size: 3.5rem;
    font-weight: 800;
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}

.attempts-label {
    text-align: left;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.3;
}

.demo-exhausted { background: rgba(239, 68, 68, 0.1); border-color: var(--color-error); }

.demo-exhausted .attempts-number {
    background: linear-gradient(135deg, var(--color-error) 0%, #DC2626 100%);
    -webkit-background-clip: text;
}

/* ==========================================
   IFRAME VIEWER
   ========================================== */
.iframe-viewer {
    position: fixed;
    inset: 0;
    background: var(--bg-dark);
    z-index: 3000;
    display: none;
    flex-direction: column;
}

.iframe-viewer.active { display: flex; }

.iframe-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: var(--bg-glass);
    border-bottom: 1px solid var(--border-color);
}

.iframe-title { font-weight: 600; }

.iframe-container { flex: 1; position: relative; }
.iframe-container iframe { width: 100%; height: 100%; border: none; }

/* ==========================================
   SECTIONS
   ========================================== */
.section { display: none; }
.section.active { display: block; animation: fadeIn 0.3s ease; }

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

/* ==========================================
   EMPTY STATE
   ========================================== */
.empty-state { text-align: center; padding: 4rem 2rem; }
.empty-state-icon { font-size: 4rem; margin-bottom: 1rem; opacity: 0.3; }
.empty-state-title { font-size: 1.5rem; margin-bottom: 0.5rem; }
.empty-state-text { color: var(--text-muted); margin-bottom: 1.5rem; }

/* ==========================================
   LOADING
   ========================================== */
.loading-spinner {
    width: 40px; height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem;
    gap: 1rem;
}

/* ==========================================
   TOAST
   ========================================== */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toast {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
    min-width: 280px;
}

.toast.success { border-left: 3px solid var(--color-success); }
.toast.error { border-left: 3px solid var(--color-error); }
.toast.warning { border-left: 3px solid var(--color-warning); }
.toast.info { border-left: 3px solid var(--color-info); }

@keyframes slideIn {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: translateX(0); }
}

/* ==========================================
   AVATAR
   ========================================== */
.avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.avatar-sm { width: 28px; height: 28px; }

/* ==========================================
   FOOTER
   ========================================== */
.footer {
    background: var(--bg-darker);
    border-top: 1px solid var(--border-color);
    padding: 2rem;
    margin-top: auto;
}

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

.footer-logo img {
    height: 32px;
    opacity: 0.7;
    transition: opacity var(--transition-fast);
}

.footer-logo:hover img { opacity: 1; }

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

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 1200px) {
    .projects-grid, .catalog-grid { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
}

@media (max-width: 768px) {
    .header, .home-header { padding: 0 1rem; height: 60px; }
    .header-brand, .home-header-brand { display: none; }
    .header-nav { gap: 0.25rem; }
    .nav-tab { padding: 0.4rem 0.75rem; font-size: 0.75rem; }
    .main-content { margin-top: 60px; padding: 1rem; }
    .page-title { font-size: 1.5rem; }
    .projects-grid, .catalog-grid { grid-template-columns: 1fr; }
    .action-bar { flex-direction: column; }
    .search-box { max-width: 100%; }
    .login-box { padding: 2rem; }
    .login-tabs { flex-direction: column; }
    .hero-title { font-size: 2.5rem; }
    .hero-section { padding: 4rem 1.5rem 3rem; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-value { font-size: 2rem; }
    .hero-title { font-size: 2rem; }
}
