/* EmailFlow - Modern Email Marketing Platform Styles */

:root {
    --primary-color: #1ABC9C;
    --primary-dark: #16A085;
    --primary-light: #48C9B0;
    --secondary-color: #3498DB;
    --danger-color: #E74C3C;
    --warning-color: #F39C12;
    --success-color: #2ECC71;
    --dark-color: #2C3E50;
    --light-color: #ECF0F1;
    --gray-color: #95A5A6;
    --white-color: #FFFFFF;
    --text-color: #34495E;
    --border-color: #BDC3C7;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: #F8F9FA;
}

/* Landing Page Styles */
.landing-page {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    min-height: 100vh;
    position: relative;
}

.landing-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(26, 188, 156, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(52, 152, 219, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.landing-container {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.landing-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-icon {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.brand-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white-color);
}

.nav-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.nav-link {
    color: var(--white-color);
    text-decoration: none;
    padding: 0.5rem 1rem;
    transition: var(--transition);
    opacity: 0.9;
}

.nav-link:hover {
    opacity: 1;
}

/* Hero Section */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    padding: 4rem 2rem;
    align-items: center;
}

.hero-content {
    color: var(--white-color);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.highlight {
    color: var(--primary-color);
    position: relative;
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.95;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-card {
    background: var(--white-color);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
    overflow: hidden;
    transform: perspective(1000px) rotateY(-5deg);
    transition: var(--transition);
}

.hero-card:hover {
    transform: perspective(1000px) rotateY(0deg);
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    padding: 1rem;
}

.card-dots {
    display: flex;
    gap: 0.5rem;
}

.card-dots span {
    width: 12px;
    height: 12px;
    background: var(--white-color);
    border-radius: 50%;
    opacity: 0.7;
}

.card-body {
    padding: 2rem;
}

.demo-email {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.demo-line {
    height: 12px;
    background: var(--light-color);
    border-radius: 6px;
    animation: pulse 2s infinite;
}

.demo-button {
    background: var(--primary-color);
    color: var(--white-color);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    margin-top: 1rem;
}

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

/* Features Section */
.features {
    padding: 5rem 2rem;
    background: var(--white-color);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--dark-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(26, 188, 156, 0.3);
    border-color: rgba(26, 188, 156, 0.5);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--dark-color);
}

.feature-card p {
    color: var(--gray-color);
    line-height: 1.8;
}

/* CTA Section */
.cta-section {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--white-color);
    background: rgba(26, 188, 156, 0.1);
    border-radius: 20px;
    margin: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(26, 188, 156, 0.2);
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* Footer */
.landing-footer {
    background: rgba(15, 23, 42, 0.8);
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    padding: 2rem;
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(26, 188, 156, 0.3);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white-color);
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-color);
    border-color: var(--white-color);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

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

.btn-secondary:hover {
    background: #2980B9;
}

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

.btn-danger:hover {
    background: #C0392B;
}

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

.btn-success:hover {
    background: #27AE60;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Modern icon buttons and groups */
.btn-group {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-icon {
    width: 38px;
    height: 38px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    line-height: 1;
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(6px);
}

.btn-ghost:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.btn-ghost-primary {
    color: var(--primary-dark);
    border-color: rgba(26, 188, 156, 0.25);
}
.btn-ghost-primary:hover {
    background: rgba(26, 188, 156, 0.15);
}

.btn-ghost-secondary {
    color: var(--secondary-color);
    border-color: rgba(52, 152, 219, 0.25);
}
.btn-ghost-secondary:hover {
    background: rgba(52, 152, 219, 0.15);
}

.btn-ghost-success {
    color: var(--success-color);
    border-color: rgba(46, 204, 113, 0.25);
}
.btn-ghost-success:hover {
    background: rgba(46, 204, 113, 0.15);
}

.btn-ghost-danger {
    color: var(--danger-color);
    border-color: rgba(231, 76, 60, 0.25);
}
.btn-ghost-danger:hover {
    background: rgba(231, 76, 60, 0.15);
}

/* Auth Pages */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.auth-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(26, 188, 156, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(52, 152, 219, 0.1) 0%, transparent 40%);
    animation: authGlow 15s ease-in-out infinite;
    pointer-events: none;
}

.auth-page::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        linear-gradient(45deg, transparent 30%, rgba(26, 188, 156, 0.03) 50%, transparent 70%),
        linear-gradient(-45deg, transparent 30%, rgba(52, 152, 219, 0.03) 50%, transparent 70%);
    background-size: 200% 200%;
    animation: authWave 20s ease-in-out infinite;
    pointer-events: none;
}

@keyframes authGlow {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 1;
    }
    50% {
        transform: translate(-10%, -10%) scale(1.1);
        opacity: 0.8;
    }
}

@keyframes authWave {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.auth-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(26, 188, 156, 0.3);
    overflow: hidden;
    backdrop-filter: blur(10px);
    max-width: 450px;
    width: 100%;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: authFloat 6s ease-in-out infinite;
}

@keyframes authFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.auth-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white-color);
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.auth-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    animation: authHeaderShine 3s ease-in-out infinite;
}

@keyframes authHeaderShine {
    0%, 100% {
        transform: translateX(-100%);
    }
    50% {
        transform: translateX(100%);
    }
}

.auth-header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.auth-header p {
    opacity: 0.95;
}

.auth-body {
    padding: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

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

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
}

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

.form-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.form-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.form-footer a:hover {
    text-decoration: underline;
}

.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Dashboard Layout */
.dashboard {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--dark-color);
    color: var(--white-color);
    padding: 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-header h2 {
    font-size: 1.5rem;
}

.sidebar-menu {
    list-style: none;
    padding: 1rem 0;
}

.sidebar-menu li {
    margin: 0;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    color: var(--white-color);
    text-decoration: none;
    transition: var(--transition);
    opacity: 0.8;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: rgba(26, 188, 156, 0.2);
    opacity: 1;
    border-left: 3px solid var(--primary-color);
}

.sidebar-menu .icon {
    font-size: 1.25rem;
}

.main-content {
    flex: 1;
    margin-left: 260px;
    background: #F8F9FA;
}

.topbar {
    background: var(--white-color);
    padding: 1rem 2rem;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-color);
}

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

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: var(--light-color);
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
}

.user-menu:hover {
    background: var(--primary-light);
    color: var(--white-color);
}

.user-avatar {
    width: 35px;
    height: 35px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white-color);
    font-weight: 700;
}

.content-area {
    padding: 2rem;
}

/* Cards */
.card {
    background: var(--white-color);
    border-radius: 15px;
    box-shadow: var(--shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

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

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-color);
}

.card-body {
    padding: 0;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--white-color);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: var(--transition);
}

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

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

.stat-icon.primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white-color);
}

.stat-icon.secondary {
    background: linear-gradient(135deg, var(--secondary-color), #2980B9);
    color: var(--white-color);
}

.stat-icon.success {
    background: linear-gradient(135deg, var(--success-color), #27AE60);
    color: var(--white-color);
}

.stat-icon.warning {
    background: linear-gradient(135deg, var(--warning-color), #E67E22);
    color: var(--white-color);
}

.stat-info h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.25rem;
}

.stat-info p {
    color: var(--gray-color);
    font-size: 0.9rem;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

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

table thead {
    background: var(--light-color);
}

table th {
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--dark-color);
}

table td {
    padding: 1rem;
    border-bottom: 1px solid var(--light-color);
}

table tbody tr {
    transition: var(--transition);
}

table tbody tr:hover {
    background: #F8F9FA;
}

.badge {
    display: inline-block;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

.badge-info {
    background: #d1ecf1;
    color: #0c5460;
}

.badge-primary {
    background: rgba(26, 188, 156, 0.2);
    color: var(--primary-dark);
}

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

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white-color);
    border-radius: 15px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

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

.modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-color);
}

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

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

.modal-body {
    padding: 1.5rem;
}

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

/* Email Editor */
.editor-container {
    border: 2px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    min-height: 400px;
}

.editor-toolbar {
    background: var(--light-color);
    padding: 0.75rem;
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    border-bottom: 2px solid var(--border-color);
}

.editor-btn {
    padding: 0.5rem 1rem;
    background: var(--white-color);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    cursor: pointer;
    transition: var(--transition);
}

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

.editor-content {
    padding: 1.5rem;
    min-height: 300px;
    background: var(--white-color);
}

[contenteditable] {
    outline: none;
}

/* Progress Bar */
.progress {
    background: var(--light-color);
    border-radius: 10px;
    height: 10px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-bar {
    background: linear-gradient(90deg, var(--primary-color), var(--primary-dark));
    height: 100%;
    transition: width 0.3s ease;
}

/* Responsive: tablets and down */
@media (max-width: 992px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-image {
        order: -1;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-links {
        flex-direction: column;
    }
    
    /* Off-canvas sidebar */
    .sidebar {
        width: 75vw;
        max-width: 280px;
        position: fixed;
        left: 0;
        top: 0;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        height: 100vh;
        z-index: 2001;
        box-shadow: 2px 0 8px rgba(0,0,0,0.15);
    }
    body.sidebar-open .sidebar {
        transform: translateX(0);
    }
    
    /* Main content takes full width on mobile */
    .main-content {
        margin-left: 0;
        width: 100%;
    }
    
    /* Compact sidebar header */
    .sidebar-header {
        padding: 1rem;
    }
    .sidebar-header h2 {
        font-size: 1.25rem;
    }
    
    /* Compact menu items */
    .sidebar-menu a {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }
    .sidebar-menu .icon {
        font-size: 1.1rem;
    }
    
    .dashboard {
        flex-direction: column;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }

    /* Topbar compact */
    .topbar {
        padding: 0.75rem 1rem;
        gap: 0.5rem;
        flex-direction: column;
        align-items: flex-start;
    }
    .topbar-title {
        font-size: 1.25rem;
    }
    .topbar-actions {
        width: 100%;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    .topbar-actions .btn {
        flex: 1;
        min-width: 140px;
        font-size: 0.85rem;
        padding: 0.6rem 1rem;
    }
    
    /* Cards responsive */
    .card {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    .card-header .d-flex {
        width: 100%;
        flex-direction: column;
    }
    .card-header .form-control,
    .card-header select {
        width: 100% !important;
    }
    
    /* Tables responsive */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    table {
        font-size: 0.85rem;
    }
    table th,
    table td {
        padding: 0.5rem;
        white-space: nowrap;
    }
    
    .editor-container { min-height: 300px; }
    .editor-content { min-height: 220px; }
}

/* Responsive: phones */
@media (max-width: 576px) {
    .topbar-title { font-size: 1.1rem; }
    .stat-info h3 { font-size: 1.5rem; }
    
    /* Botones más compactos */
    .btn { 
        padding: 0.5rem 0.75rem; 
        font-size: 0.85rem; 
    }
    .topbar-actions .btn {
        width: 100%;
        min-width: auto;
    }
    
    /* Tablas más compactas */
    table { 
        font-size: 0.8rem; 
    }
    table th, 
    table td { 
        padding: 0.4rem; 
    }
    
    /* Cards más compactas */
    .card {
        padding: 0.75rem;
    }
    .card-title {
        font-size: 1.1rem;
    }
    
    /* Sidebar even more compact on small phones */
    .sidebar {
        width: 85vw;
        max-width: 260px;
    }
    .sidebar-header {
        padding: 0.75rem;
    }
    .sidebar-header h2 {
        font-size: 1.1rem;
    }
    .sidebar-menu a {
        padding: 0.65rem 0.85rem;
        font-size: 0.9rem;
    }
    .content-area {
        padding: 0.75rem;
    }
}

/* Floating menu button for mobile */
.menu-fab {
    display: none;
}
@media (max-width: 992px) {
    .menu-fab {
        display: inline-flex;
        position: fixed;
        /* Esquina inferior derecha - estilo FAB Material Design */
        right: 1.5rem;
        bottom: 1.5rem;
        left: auto;
        top: auto;
        width: 56px;
        height: 56px;
        border-radius: 50%;
        background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
        color: #fff;
        align-items: center;
        justify-content: center;
        box-shadow: 0 6px 20px rgba(26, 188, 156, 0.6);
        z-index: 2100; /* por encima del sidebar y backdrop */
        cursor: pointer;
        border: none;
        font-size: 1.5rem;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .menu-fab:hover {
        transform: translateY(-3px);
        box-shadow: 0 8px 24px rgba(26, 188, 156, 0.7);
    }
    .menu-fab:active {
        transform: scale(0.95);
    }
    body.sidebar-open .menu-fab {
        background: linear-gradient(135deg, var(--danger-color), #C0392B);
        box-shadow: 0 6px 20px rgba(231, 76, 60, 0.6);
    }
}

/* Backdrop when sidebar open */
.sidebar-backdrop { 
    display: none; 
}
@media (max-width: 992px) {
    body.sidebar-open .sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 2000;
        backdrop-filter: blur(2px);
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.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; }
.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.align-center { align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.w-100 { width: 100%; }
