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

:root {
    --primary: #6C5CE7;
    --primary-dark: #5f4fd1;
    --secondary: #636E72;
    --success: #00B894;
    --error: #D63031;
    --bg-light: #F8F9FA;
    --border: #DFE6E9;
    --text-dark: #2D3436;
}

body {
    font-family: 'Poppins', 'Arial', sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 80px);
    background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
    padding-top: 20px;
}

.login-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 28px;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.login-header p {
    color: var(--secondary);
    font-size: 14px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    text-align: center;
    font-size: 13px;
    color: var(--secondary);
}

/* Admin Layout */
.admin-header {
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 15px 30px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left h2 {
    color: var(--primary);
    font-size: 24px;
    margin: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.admin-container {
    display: flex;
    min-height: 100vh;
    padding-top: 70px;
}

.admin-sidebar {
    width: 260px;
    background: white;
    border-right: 1px solid var(--border);
    padding: 20px 0;
    position: fixed;
    left: 0;
    top: 70px;
    bottom: 0;
    overflow-y: auto;
}

.admin-main,
.admin-content {
    flex: 1;
    padding: 30px;
    margin-left: 260px;
    background: var(--bg-light);
    min-height: calc(100vh - 70px);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 25px;
    color: var(--text-dark);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: var(--bg-light);
    border-left-color: var(--primary);
    color: var(--primary);
}

.nav-item.active {
    background: var(--bg-light);
    border-left-color: var(--primary);
    color: var(--primary);
    font-weight: 600;
}

.admin-content {
    flex: 1;
    padding: 30px;
    overflow-x: auto;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.content-header h1 {
    font-size: 32px;
    color: var(--text-dark);
}

/* Form Elements */
.form-container {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.form-group {
    margin-bottom: 20px;
}

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

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="color"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s;
}

.form-group input[type="color"] {
    height: 50px;
    cursor: pointer;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: var(--secondary);
    font-size: 13px;
}

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

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

/* Buttons */
.btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

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

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

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

.btn-secondary:hover {
    background: #555;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    padding: 8px 12px;
    border: none;
    background: transparent;
    font-size: 18px;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s;
}

.btn-icon:hover {
    background: var(--bg-light);
}

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

.btn-delete {
    color: var(--error);
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background: #D5F9EB;
    color: #00B894;
    border-left: 4px solid #00B894;
}

.alert-error {
    background: #FFE5E5;
    color: #D63031;
    border-left: 4px solid #D63031;
}

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

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

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

.stat-info h3 {
    font-size: 32px;
    margin-bottom: 5px;
}

.stat-info p {
    color: var(--secondary);
    font-size: 14px;
}

/* Quick Actions */
.quick-actions {
    background: white;
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.quick-actions h2 {
    margin-bottom: 20px;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.action-card {
    background: var(--bg-light);
    padding: 25px;
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.3s;
    border: 2px solid transparent;
}

.action-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.action-card h3 {
    margin-bottom: 10px;
    color: var(--primary);
}

.action-card p {
    color: var(--secondary);
    font-size: 14px;
}

/* Table */
.table-container {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    overflow-x: auto;
}

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

.data-table thead {
    background: var(--bg-light);
}

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

.data-table th {
    font-weight: 600;
    color: var(--text-dark);
}

.data-table tbody tr:hover {
    background: var(--bg-light);
}

.table-actions {
    display: flex;
    gap: 10px;
}

.color-box {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid var(--border);
    vertical-align: middle;
}

/* Logo Configuration */
.logo-preview-section {
    background: white;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.logo-preview {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100px;
    background: var(--bg-light);
    border-radius: 10px;
    border: 2px dashed var(--border);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
}

.logo-container img {
    max-height: 60px;
    max-width: 250px;
    width: auto;
    height: auto;
    object-fit: contain;
    image-rendering: auto;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    will-change: auto;
}

.logo-tabs {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.tab-buttons {
    display: flex;
    background: var(--bg-light);
    border-bottom: 1px solid var(--border);
}

.tab-btn {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: transparent;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--secondary);
}

.tab-btn.active {
    background: white;
    color: var(--primary);
    border-bottom: 3px solid var(--primary);
}

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

.tab-content {
    display: none;
    padding: 30px;
}

.tab-content.active {
    display: block;
}

.current-image {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.current-image h4 {
    margin-bottom: 10px;
    color: var(--text-dark);
}

.current-image img {
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: white;
    border-radius: 15px;
    padding: 0;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalSlide 0.3s ease;
}

@keyframes modalSlide {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

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

.modal-header h2 {
    font-size: 24px;
}

.close {
    color: var(--secondary);
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

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

.modal-content form {
    padding: 30px;
}

/* Responsive */
@media (max-width: 968px) {
    .admin-container {
        flex-direction: column;
        padding-top: 70px;
    }
    
    .admin-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
        position: relative;
        top: 0;
    }
    
    .admin-main,
    .admin-content {
        margin-left: 0;
        padding: 20px;
    }
    
    .sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
    }
    
    .nav-item {
        white-space: nowrap;
        border-left: none;
        border-bottom: 3px solid transparent;
    }
    
    .nav-item:hover,
    .nav-item.active {
        border-left: none;
        border-bottom-color: var(--primary);
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .content-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
}

/* Estilos para el acordeón */
.nav-section {
    margin: 5px 0;
}

.nav-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 25px;
    color: var(--text-dark);
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    margin: 2px 0;
    user-select: none;
    border-left: 3px solid transparent;
}

.nav-section-header:hover {
    background: var(--bg-light);
    border-left-color: var(--primary);
    color: var(--primary);
}

.nav-section-header .section-arrow {
    margin-left: auto;
    transition: transform 0.3s ease;
}

.nav-section-header.expanded .section-arrow {
    transform: rotate(180deg);
}

.nav-section-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 8px;
    margin: 0 15px;
}

.nav-section-content.expanded {
    max-height: 500px;
}

.nav-subitem {
    padding: 12px 25px 12px 55px;
    font-size: 14px;
    margin: 1px 0;
    border-radius: 6px;
    border-left: 3px solid transparent;
}

.nav-subitem:hover {
    background: rgba(108, 92, 231, 0.08);
    border-left-color: rgba(108, 92, 231, 0.3);
}

.nav-subitem.active {
    background: rgba(108, 92, 231, 0.12);
    border-left-color: var(--primary);
    color: var(--primary);
    font-weight: 600;
}

/* Responsive para el acordeón */
@media (max-width: 768px) {
    .nav-section-header {
        border-left: none;
        border-bottom: 3px solid transparent;
    }
    
    .nav-section-header:hover {
        border-left: none;
        border-bottom-color: var(--primary);
    }
    
    .nav-subitem {
        border-left: none;
        border-bottom: 3px solid transparent;
    }
    
    .nav-subitem:hover,
    .nav-subitem.active {
        border-left: none;
        border-bottom-color: var(--primary);
    }
}
