/* 
    Showcase CSS for Cooperativafeliz.cl 
    Modern, High-End Design System
*/

:root {
    --primary: #3b82f6; /* Blue 500 */
    --primary-dark: #1d4ed8; /* Blue 700 */
    --secondary: #2dd4bf; /* Teal 400 */
    --accent: #06b6d4; /* Cyan 500 */
    --brand-orange: #f59e0b; /* Amber 500 */
    --brand-orange-dark: #d97706; /* Amber 600 */
    --dark-bg: #f8fafc; /* Slate 50 (Light Background) */
    --dark-card: #ffffff; /* White (Cards) */
    --text-white: #0f172a; /* Slate 900 (Main Text) */
    --text-muted: #64748b; /* Slate 500 (Muted Text) */
    --glass-border: rgba(0, 0, 0, 0.08);
    --glass-bg: rgba(255, 255, 255, 0.5);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Premium Theme (Index Scoped) */
.theme-premium {
    --dark-bg: #f1f5f9; /* Slate 100 */
    --dark-card: #ffffff; /* White */
    --text-white: #0f172a; /* Slate 900 (Text is now dark) */
    --text-muted: #64748b; /* Slate 500 */
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(0, 0, 0, 0.05);
    --hero-gradient: radial-gradient(circle at 10% 10%, rgba(59, 130, 246, 0.03) 0%, transparent 40%),
                     radial-gradient(circle at 90% 90%, rgba(245, 158, 11, 0.03) 0%, transparent 40%);
}



.theme-premium .bg-gradient {
    background: var(--hero-gradient);
}



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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--dark-bg);
    color: var(--text-white);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Background Effects */
.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 10% 10%, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
                radial-gradient(circle at 90% 90%, rgba(45, 212, 191, 0.05) 0%, transparent 50%);
    z-index: -1;
}

/* Typography & Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

h1, h2, h3 {
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.2;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-orange {
    background: linear-gradient(135deg, var(--brand-orange), var(--brand-orange-dark));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 20px 0 rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.23);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-white);
}

.btn-outline:hover {
    background: var(--glass-border);
    border-color: var(--text-white);
}

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--text-white);
}

.theme-premium nav {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    margin-top: 1rem;
    padding: 1rem 2rem;
    border-radius: 1rem;
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}

.theme-premium .nav-links a {
    color: var(--text-muted);
}

.theme-premium .nav-links a:hover {
    color: var(--brand-orange);
}



/* Hero Section */
.hero {
    padding: 6rem 0;
    display: flex;
    align-items: center;
    gap: 4rem;
}

.hero-content {
    flex: 1;
}

.hero-subtitle {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--primary);
    margin-bottom: 1rem;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-white);
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.hero-image {
    flex: 1;
    position: relative;
}

.hero-image img {
    width: 100%;
    border-radius: 1.5rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--glass-border);
}

/* Features Section */
.features {
    padding: 6rem 0;
}

.tab-container {
    display: flex;
    justify-content: center;
    margin-bottom: 4rem;
}

.tab-pill {
    background: var(--dark-card);
    padding: 0.5rem;
    border-radius: 999px;
    display: flex;
    gap: 0.5rem;
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05);
}

.tab-btn {
    padding: 0.75rem 2rem;
    border-radius: 999px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.tab-btn.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.tab-btn.active.orange {
    background: var(--brand-orange);
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.features-content {
    display: none;
    animation: fadeIn 0.5s ease-out;
}

.features-content.active {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

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

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.feature-card {
    background: white;
    border: 1px solid var(--glass-border);
    padding: 2.5rem;
    border-radius: 1.5rem;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.1);
}

.feature-item-simple {
    display: flex;
    gap: 1.25rem;
    padding: 1rem 0;
    transition: var(--transition);
}

.feature-item-simple:hover {
    transform: translateX(5px);
}

.feature-item-simple .feature-icon {
    flex-shrink: 0;
    margin-bottom: 0;
    background: transparent;
    width: 2rem;
    height: 2rem;
    font-size: 1.25rem;
}

.feature-item-simple h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.feature-item-simple p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Preview Section */
.preview {
    padding: 6rem 0;
    background: rgba(59, 130, 246, 0.02);
}

.preview-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.preview-item {
    border-radius: 1rem;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-lg);
}

.preview-item img {
    width: 100%;
    display: block;
}

/* Benefits Section */
.benefits {
    padding: 6rem 0;
}

/* Footer */
footer {
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--glass-border);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 2rem;
}

.theme-premium footer {
    background: #f1f5f9;
    border-top: 1px solid var(--glass-border);
    padding: 6rem 0 3rem;
    margin-top: 6rem;
}



/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero { flex-direction: column; padding: 4rem 0; text-align: center; }
    .hero-title { font-size: 2.5rem; }
    .preview-grid { grid-template-columns: 1fr; }
    .footer-content { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

/* Admin Dashboard & Table Overrides */
.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.5rem;
    margin-top: 1rem;
}

.admin-table th {
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    text-align: left;
}

.admin-table tr {
    transition: var(--transition);
}

.admin-table tr:hover td {
    background: rgba(59, 130, 246, 0.06);
}

.admin-table td {
    padding: 1.25rem 1.5rem;
    background: var(--dark-card);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
    font-size: 0.875rem;
    color: var(--text-white);
}

.admin-table td:first-child {
    border-left: 1px solid var(--glass-border);
    border-top-left-radius: 1rem;
    border-bottom-left-radius: 1rem;
}

.admin-table td:last-child {
    border-right: 1px solid var(--glass-border);
    border-top-right-radius: 1rem;
    border-bottom-right-radius: 1rem;
}

.badge-danger { background: rgba(239, 68, 68, 0.1); color: #ef4444; }
.badge-info { background: rgba(14, 165, 233, 0.1); color: var(--secondary); }
.badge-secondary { background: rgba(148, 163, 184, 0.1); color: var(--text-muted); }

/* Modern Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

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

.form-control {
    width: 100%;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    padding: 0.875rem 1rem;
    border-radius: 0.75rem;
    color: #0f172a;
    font-family: inherit;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.form-message {
    padding: 1rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
    display: none;
    font-size: 0.875rem;
    font-weight: 500;
}

.form-message.success {
    display: block;
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.form-message.error {
    display: block;
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.loading-spinner {
    display: none;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
    margin-right: 0.5rem;
}

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

.btn.loading .loading-spinner {
    display: inline-block;
}

.btn.loading {
    opacity: 0.8;
    cursor: not-allowed;
}

.admin-sidebar {
    background: var(--dark-card);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--glass-border);
    height: 100vh;
    padding: 2rem;
    position: sticky;
    top: 0;
}

.admin-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

.admin-main {
    padding: 3rem;
}
