/* Admin Panel Styles */

/* Admin Body */
.admin-body {
    background: #f1f5f9;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Login Styles */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 2rem;
}

.login-box {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 10px 10px -5px rgb(0 0 0 / 0.04);
    padding: 3rem;
    width: 100%;
    max-width: 400px;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h1 {
    color: #1e293b;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.login-header p {
    color: #64748b;
    font-size: 0.875rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.login-footer {
    margin-top: 2rem;
    text-align: center;
}

.login-footer a {
    color: #6366f1;
    text-decoration: none;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Admin Layout */
.admin-header-bar {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
}

.admin-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.admin-title a {
    color: #1e293b;
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 600;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.admin-user span {
    color: #64748b;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.session-time {
    color: #94a3b8;
    font-size: 0.75rem;
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.session-time i {
    font-size: 0.7rem;
}

.admin-container {
    display: flex;
    min-height: calc(100vh - 64px);
}

/* Sidebar */
.admin-sidebar {
    width: 260px;
    background: white;
    border-right: 1px solid #e2e8f0;
    box-shadow: 1px 0 3px 0 rgb(0 0 0 / 0.1);
}

.sidebar-nav ul {
    list-style: none;
    padding: 1rem 0;
}

.sidebar-nav li {
    margin: 0;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
}

.sidebar-nav a:hover {
    background: #f8fafc;
    color: #2563eb;
}

.sidebar-nav a.active {
    background: #eff6ff;
    color: #2563eb;
    border-right: 3px solid #2563eb;
}

.sidebar-nav a i {
    width: 20px;
    text-align: center;
}

.nav-divider {
    padding: 1rem 1.5rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge {
    background: #ef4444;
    color: white;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    min-width: 20px;
    text-align: center;
    line-height: 1;
}

/* Main Content */
.admin-main {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.admin-header {
    margin-bottom: 2rem;
}

.admin-header h1 {
    color: #1e293b;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.admin-header p {
    color: #64748b;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.stat-info h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.stat-info p {
    color: #64748b;
    font-size: 0.875rem;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
}

.dashboard-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    overflow: hidden;
}

.section-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-header h2 {
    color: #1e293b;
    font-size: 1.125rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.recent-items {
    padding: 1rem 0;
}

.recent-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    border-bottom: 1px solid #f1f5f9;
}

.recent-item:last-child {
    border-bottom: none;
}

.item-info h4 {
    color: #1e293b;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.item-info p,
.item-info small {
    color: #64748b;
    font-size: 0.75rem;
}

.item-actions {
    display: flex;
    gap: 0.5rem;
}

/* Ocultar texto de botones en desktop */
.btn-text {
    display: none;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #64748b;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

/* Quick Actions */
.quick-actions {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
}

.quick-actions h2 {
    color: #1e293b;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.action-card {
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.2s ease;
    text-align: center;
}

.action-card:hover {
    background: #eff6ff;
    transform: translateY(-2px);
}

.action-card i {
    font-size: 2rem;
    color: #2563eb;
    margin-bottom: 1rem;
}

.action-card h3 {
    color: #1e293b;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.action-card p {
    color: #64748b;
    font-size: 0.875rem;
}

/* Form Styles */
.post-form {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    overflow: hidden;
}

.form-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    min-height: 600px;
}

.form-main {
    padding: 2rem;
    border-right: 1px solid #e2e8f0;
}

.form-sidebar {
    padding: 2rem;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.sidebar-section {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
}

.sidebar-section h3 {
    color: #1e293b;
    font-size: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #374151;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.875rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-help {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: #6b7280;
}

.form-actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Button Variants */
.btn-full {
    width: 100%;
    justify-content: center;
}

.btn-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
}

.btn-success {
    background: #16a34a;
    color: white;
}

.btn-success:hover {
    background: #15803d;
}

.btn-danger {
    background: #dc2626;
    color: white;
}

.btn-danger:hover {
    background: #b91c1c;
}

/* Table Styles */
.admin-table {
    width: 100%;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
}

.admin-table table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th,
.admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.admin-table th {
    background: #f8fafc;
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
}

.admin-table td {
    color: #6b7280;
    font-size: 0.875rem;
}

.admin-table tr:hover {
    background: #f9fafb;
}

/* Preview Section */
#preview-content {
    max-height: 300px;
    overflow-y: auto;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 6px;
    font-size: 0.875rem;
    line-height: 1.6;
}

.text-muted {
    color: #9ca3af;
    font-style: italic;
}

/* Responsive Admin */
@media (max-width: 1024px) {
    .admin-container {
        flex-direction: column;
    }
    
    .admin-sidebar {
        width: 100%;
        order: 2;
    }
    
    .admin-main {
        order: 1;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .form-main {
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .admin-header-content {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .admin-main {
        padding: 1rem;
    }
    
    .sidebar-nav {
        display: flex;
        overflow-x: auto;
        padding: 0.5rem;
    }
    
    .sidebar-nav ul {
        display: flex;
        gap: 0.5rem;
        padding: 0;
    }
    
    .sidebar-nav a {
        white-space: nowrap;
        padding: 0.75rem 1rem;
        border-radius: 6px;
    }
    
    .sidebar-nav a.active {
        border-right: none;
        background: #2563eb;
        color: white;
    }
    
    .actions-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================================================
   PAGE BUILDER - ESTILOS ESPECÍFICOS PARA GESTIÓN DE PRESENTACIÓN
   ============================================================================ */

.admin-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    margin-bottom: 2rem;
    overflow: hidden;
}

.admin-section .section-header {
    background: #f8fafc;
    padding: 2rem;
    border-bottom: 1px solid #e2e8f0;
}

.admin-section .section-header h2 {
    color: #1e293b;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.admin-section .section-header p {
    color: #64748b;
    margin: 0;
}

.admin-form {
    padding: 2rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    margin-bottom: 1rem;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.checkmark {
    width: 20px;
    height: 20px;
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    position: relative;
    transition: all 0.2s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #2563eb;
    border-color: #2563eb;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: "✓";
    color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    font-weight: bold;
}

/* Servicios */
.services-list {
    padding: 0 2rem 2rem;
}

.service-item {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.service-header {
    background: #f8fafc;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e2e8f0;
}

.service-header h4 {
    color: #1e293b;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-disabled {
    background: #fef2f2;
    color: #dc2626;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: 1rem;
}

.service-edit-form {
    padding: 1.5rem;
    background: white;
    border-top: 1px solid #e2e8f0;
}

/* Alertas */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.alert i {
    font-size: 1.1rem;
}

/* Responsive Page Builder */
@media (max-width: 768px) {
    .admin-section .section-header {
        padding: 1.5rem;
    }
    
    .admin-form {
        padding: 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .services-list {
        padding: 0 1rem 1rem;
    }
    
    .service-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .service-edit-form {
        padding: 1rem;
    }
}
    
    /* Mejoras para botones de posts en móviles */
    .recent-item {
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
        gap: 1rem;
        background: #fafafa;
        margin-bottom: 0.5rem;
        border-radius: 8px;
        border: 1px solid #e5e7eb;
    }
    
    .item-info {
        text-align: left;
    }
    
    .item-info h4 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
        color: #1e293b;
    }
    
    .item-actions {
        justify-content: center;
        gap: 1rem;
        padding-top: 0.5rem;
        border-top: 1px solid #e5e7eb;
    }
    
    .item-actions .btn {
        flex: 1;
        max-width: 120px;
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
        border-radius: 6px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        min-height: 42px;
        font-weight: 500;
    }
    
    .item-actions .btn i {
        font-size: 1rem;
    }
    
    /* Mostrar texto en botones en móviles */
    .btn-text {
        display: inline;
        margin-left: 0.25rem;
    }
    
    /* Botón de editar más prominente */
    .item-actions .btn-edit {
        background: #2563eb;
        color: white;
        border: 1px solid #2563eb;
    }
    
    .item-actions .btn-edit:hover {
        background: #1d4ed8;
    }
    
    /* Botón de ver */
    .item-actions .btn-view {
        background: #f8fafc;
        color: #64748b;
        border: 1px solid #d1d5db;
    }
    
    .item-actions .btn-view:hover {
        background: #f1f5f9;
        color: #374151;
    }
    
    /* Botón de aprobar comentario */
    .item-actions .btn-approve {
        background: #10b981;
        color: white;
        border: 1px solid #10b981;
    }
    
    .item-actions .btn-approve:hover {
        background: #059669;
    }
    
    /* Botón de eliminar comentario */
    .item-actions .btn-delete {
        background: #ef4444;
        color: white;
        border: 1px solid #ef4444;
    }
    
    .item-actions .btn-delete:hover {
        background: #dc2626;
    }
    
    /* Stats grid en móvil */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-info h3 {
        font-size: 1.5rem;
    }
    
    /* Dashboard grid en móvil */
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .dashboard-section {
        background: white;
        border-radius: 8px;
        box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    }
    
    .section-header {
        padding: 1.5rem 1rem 1rem;
        border-bottom: 1px solid #f1f5f9;
    }
    
    .section-header h2 {
        font-size: 1.125rem;
        margin-bottom: 0.5rem;
    }
    
    .recent-items {
        padding: 0;
    }
    
    /* Sidebar móvil mejorado */
    .admin-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100vh;
        background: white;
        z-index: 1000;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        overflow-y: auto;
    }
    
    .admin-sidebar.sidebar-open {
        transform: translateX(0);
    }
    
    /* Ocultar el sidebar en la vista normal de móvil */
    .admin-container {
        display: block;
    }
    
    .admin-main {
        margin-left: 0;
        width: 100%;
    }
    
    /* Overlay para cerrar sidebar */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
    }

/* ================================================
   MODE SELECTOR & TOGGLE STYLES
   ================================================ */

.mode-selector {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
}

.mode-info h3 {
    margin: 0 0 0.5rem 0;
    color: #1e293b;
    font-size: 1.1rem;
}

.status-active {
    color: #059669;
    font-weight: 600;
}

.status-inactive {
    color: #dc2626;
    font-weight: 600;
}

.mode-info p {
    margin: 0;
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.4;
}

.toggle-control {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #10b981;
}

input:focus + .toggle-slider {
    box-shadow: 0 0 1px #10b981;
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

.toggle-label {
    color: #374151;
    font-weight: 500;
    font-size: 0.9rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .mode-selector {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .toggle-control {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Page Builder Dashboard Section */
.page-builder-section {
    margin: 30px 0;
}

.page-builder-section .admin-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 15px;
    color: white;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    overflow: hidden;
}

.page-builder-section .card-header {
    background: rgba(255,255,255,0.1);
    padding: 20px 25px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-builder-section .card-header h2 {
    margin: 0;
    font-size: 1.3rem;
    color: white;
}

.page-builder-section .btn-outline {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
}

.page-builder-section .btn-outline:hover {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.5);
}

.page-builder-info {
    padding: 25px;
}

.pb-status {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.pb-status label {
    font-weight: 600;
    font-size: 1rem;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.status-badge.active {
    background: rgba(76, 175, 80, 0.9);
    color: white;
}

.status-badge.inactive {
    background: rgba(244, 67, 54, 0.9);
    color: white;
}

.pb-description {
    margin-bottom: 25px;
    padding: 15px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    border-left: 4px solid rgba(255,255,255,0.3);
}

.pb-description p {
    margin: 0;
    line-height: 1.6;
    font-size: 0.95rem;
}

.pb-sections {
    margin-bottom: 25px;
}

.pb-sections label {
    display: block;
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 1rem;
}

.sections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.section-status {
    padding: 10px 15px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.section-status.configured {
    background: rgba(76, 175, 80, 0.2);
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.section-status.missing {
    background: rgba(255, 193, 7, 0.2);
    border: 1px solid rgba(255, 193, 7, 0.3);
}

.pb-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.pb-actions .btn {
    flex: 1;
    min-width: 140px;
    text-align: center;
    font-weight: 500;
    transition: all 0.3s ease;
}

.pb-actions .btn-primary {
    background: rgba(33, 150, 243, 0.9);
    border: none;
    color: white;
}

.pb-actions .btn-primary:hover {
    background: rgba(33, 150, 243, 1);
    transform: translateY(-2px);
}

.pb-actions .btn-success {
    background: rgba(76, 175, 80, 0.9);
    border: none;
    color: white;
}

.pb-actions .btn-success:hover {
    background: rgba(76, 175, 80, 1);
    transform: translateY(-2px);
}

.pb-actions .btn-warning {
    background: rgba(255, 152, 0, 0.9);
    border: none;
    color: white;
}

.pb-actions .btn-warning:hover {
    background: rgba(255, 152, 0, 1);
    transform: translateY(-2px);
}

.pb-actions .btn-info {
    background: rgba(0, 188, 212, 0.9);
    border: none;
    color: white;
}

.pb-actions .btn-info:hover {
    background: rgba(0, 188, 212, 1);
    transform: translateY(-2px);
}

/* Responsive Design for Page Builder */
@media (max-width: 768px) {
    .page-builder-section .card-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .pb-status {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .sections-grid {
        grid-template-columns: 1fr;
    }
    
    .pb-actions {
        flex-direction: column;
    }
    
    .pb-actions .btn {
        flex: none;
        min-width: auto;
    }
}

/* Logo Configuration Styles */
.toggle-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 15px;
    background: rgba(0,0,0,0.05);
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.toggle-group input[type="checkbox"] {
    margin-top: 4px;
}

.toggle-label {
    flex: 1;
}

.toggle-text {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 4px;
}

.toggle-description {
    display: block;
    font-size: 0.9rem;
    color: #6b7280;
    line-height: 1.4;
}

.logo-settings {
    margin-left: 20px;
    padding-left: 20px;
    border-left: 2px solid #e5e7eb;
    transition: opacity 0.3s ease;
}

.logo-preview {
    margin-top: 20px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.logo-preview h4 {
    margin: 0 0 15px 0;
    color: #374151;
    font-size: 1rem;
}

.preview-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    padding: 15px;
    background: white;
    border: 2px dashed #cbd5e1;
    border-radius: 6px;
}

.preview-container img {
    max-height: 100%;
    object-fit: contain;
}

.preview-container span {
    color: #9ca3af;
    font-style: italic;
}

/* Footer Preview Styles */
.footer-preview {
    margin-top: 20px;
    padding: 20px;
    background: #1f2937;
    color: white;
    border-radius: 8px;
}

.footer-preview h4 {
    margin: 0 0 15px 0;
    color: white;
    font-size: 1rem;
}

.preview-footer {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-logo-preview img {
    max-height: 40px;
    object-fit: contain;
}

.footer-content-preview p {
    margin: 8px 0;
    line-height: 1.5;
}

.footer-content-preview p:first-child {
    font-size: 0.95rem;
    opacity: 0.9;
}

.footer-content-preview p:last-child {
    font-size: 0.85rem;
    opacity: 0.7;
}

/* Enhanced Form Styles for New Sections */
.form-section {
    margin-bottom: 40px;
}

.form-section h2 {
    color: #1f2937;
    font-size: 1.4rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.form-group input[type="url"],
.form-group input[type="text"],
.form-group input[type="number"],
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group small {
    display: block;
    margin-top: 6px;
    color: #6b7280;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* Responsive Design for New Sections */
@media (max-width: 768px) {
    .toggle-group {
        flex-direction: column;
        gap: 8px;
    }
    
    .logo-settings {
        margin-left: 0;
        padding-left: 0;
        border-left: none;
        border-top: 2px solid #e5e7eb;
        padding-top: 15px;
    }
    
    .preview-footer {
        flex-direction: column;
        text-align: center;
    }
    
    .form-section h2 {
        font-size: 1.2rem;
    }
}

/* Help Text Styles */
.help-text {
    margin-top: 5px;
}

.help-text small {
    color: #6b7280;
    font-size: 0.8rem;
    font-style: italic;
    display: block;
    line-height: 1.4;
}

/* User Management Section Styles */
.user-management-section {
    margin: 2rem 0;
}

.user-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.user-stat-item {
    text-align: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.user-stat-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.user-stat-item .stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.user-stat-item .stat-label {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}

.user-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.user-actions .btn {
    min-width: 160px;
}

@media (max-width: 768px) {
    .user-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .user-stat-item {
        padding: 1rem;
    }
    
    .user-stat-item .stat-number {
        font-size: 2rem;
    }
    
    .user-actions {
        flex-direction: column;
    }
    
    .user-actions .btn {
        min-width: auto;
    }
}