/* CSS para Panel de Administración (CMS) */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@100..900&display=swap');

:root {
    --primary: #D08DFB;
    --accent: #7C3AED;
    --accent-hover: #6D28D9;
    --bg-dark: #1F2937;
    --bg-light: #F9FAFB;
    --border-color: #E5E7EB;
    --text-color: #374151;
    --text-muted: #9CA3AF;
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
}

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

body {
    font-family: 'Outfit', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-color);
    line-height: 1.5;
}

/* Login Page Layout */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, rgba(208, 141, 251, 0.15) 0%, rgba(124, 58, 237, 0.1) 100%), #FFFFFF;
}

.login-card {
    background-color: #FFFFFF;
    padding: 3rem 2.5rem;
    border-radius: 16px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 440px;
    border: 1px solid rgba(208, 141, 251, 0.15);
}

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

.login-logo {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    color: var(--accent);
}

.login-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--bg-dark);
}

.login-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Admin Dashboard Layout */
.admin-wrapper {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
    background-color: var(--bg-dark);
    color: #FFFFFF;
    padding: 2rem 1rem;
    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0 0.5rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 2rem;
}

.sidebar-logo {
    width: 32px;
    height: 32px;
}

.sidebar-title {
    font-size: 1.1rem;
    font-weight: 700;
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-grow: 1;
}

.sidebar-menu-item a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #D1D5DB;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s;
}

.sidebar-menu-item a:hover,
.sidebar-menu-item.active a {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--primary);
}

.sidebar-footer {
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-logout {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    background: none;
    border: none;
    color: #FCA5A5;
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.95rem;
    cursor: pointer;
    font-family: inherit;
    border-radius: 8px;
    transition: all 0.2s;
}

.btn-logout:hover {
    background-color: rgba(239, 68, 68, 0.15);
    color: #EF4444;
}

/* Main Area */
.admin-main {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
}

.admin-header {
    background-color: #FFFFFF;
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.admin-page-title {
    font-size: 1.5rem;
    font-weight: 700;
}

.admin-profile {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

/* Page Content */
.admin-content {
    padding: 2rem;
    flex-grow: 1;
}

/* Info Cards Metrics */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.metric-card {
    background-color: #FFFFFF;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.metric-info h4 {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.metric-value {
    font-size: 1.75rem;
    font-weight: 700;
    margin-top: 0.25rem;
}

.metric-icon {
    font-size: 1.75rem;
    color: var(--accent);
    background-color: var(--primary-light);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Tables */
.table-container {
    background-color: #FFFFFF;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    margin-top: 1.5rem;
}

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

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.admin-table th {
    background-color: #F9FAFB;
    padding: 1rem 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

.admin-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.td-img {
    width: 60px;
    height: 45px;
    object-fit: cover;
    border-radius: 4px;
}

/* Badge tags */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
}

.badge-success { background-color: #D1FAE5; color: #065F46; }
.badge-primary { background-color: #E0E7FF; color: #3730A3; }
.badge-info { background-color: #E0F2FE; color: #075985; }

/* Buttons */
.btn-admin {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-admin-primary {
    background-color: var(--accent);
    color: #FFFFFF;
}

.btn-admin-primary:hover {
    background-color: var(--accent-hover);
}

.btn-admin-danger {
    background-color: var(--danger);
    color: #FFFFFF;
}

.btn-admin-danger:hover {
    background-color: #C53030;
}

.action-links {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
}

.action-btn-edit {
    background-color: #FEF3C7;
    color: #92400E;
}

.action-btn-delete {
    background-color: #FEE2E2;
    color: #991B1B;
}

/* Forms in Admin */
.admin-card {
    background-color: #FFFFFF;
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    max-width: 800px;
}

.admin-form-group {
    margin-bottom: 1.25rem;
}

.admin-form-label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.admin-form-control {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.95rem;
}

.admin-form-control:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

textarea.admin-form-control {
    min-height: 150px;
}

/* Modal view for details */
.modal-detail {
    background: #F3F4F6;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 0.5rem;
    white-space: pre-wrap;
    font-size: 0.9rem;
}

/* Responsive sidebar */
@media (max-width: 768px) {
    .admin-wrapper {
        grid-template-columns: 1fr;
    }
    .admin-sidebar {
        display: none;
    }
    .metrics-grid {
        grid-template-columns: 1fr 1fr;
    }
}
