/* Reset e Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8fafc;
    color: #1e293b;
    line-height: 1.6;
    min-height: 100vh;
}

/* Header */
.header {
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-icon {
    width: 2rem;
    height: 2rem;
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
}

.logo-text {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
}

/* Navigation */
.navigation {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #64748b;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.5rem 0;
    transition: color 0.2s ease;
    position: relative;
}

.nav-link:hover {
    color: #8b5cf6;
}

.nav-link.active {
    color: #8b5cf6;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #8b5cf6;
}

/* User Menu */
.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.menu-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: #64748b;
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
}

.menu-link:hover {
    color: #8b5cf6;
    background-color: #f1f5f9;
}

.logout-btn {
    background: none;
    border: none;
    color: #64748b;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
}

.logout-btn:hover {
    color: #ef4444;
    background-color: #fef2f2;
}

/* Main Content */
.main-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2rem;
}

.content-container {
    width: 100%;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    gap: 2rem;
}

.page-title-section {
    flex: 1;
}

.page-title {
    font-size: 2rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.page-subtitle {
    color: #64748b;
    font-size: 1rem;
    font-weight: 400;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

/* Button Components */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    font-weight: 500;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    white-space: nowrap;
    line-height: 1.25;
}

.btn-primary {
    background-color: #8b5cf6;
    color: white;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.btn-primary:hover {
    background-color: #7c3aed;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.btn-success {
    background-color: #22c55e;
    color: white;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.btn-success:hover {
    background-color: #16a34a;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.btn-outline {
    background-color: white;
    color: #374151;
    border: 1px solid #d1d5db;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.btn-outline:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
    transform: translateY(-1px);
}

.btn-large {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
}

/* Empty State */
.empty-state {
    background-color: white;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    padding: 4rem 2rem;
    text-align: center;
    margin-top: 2rem;
}

.empty-state-content {
    max-width: 28rem;
    margin: 0 auto;
}

.empty-state-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.empty-state-icon svg {
    color: #94a3b8;
    width: 4rem;
    height: 4rem;
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 0.5rem;
}

.empty-state-message {
    color: #64748b;
    font-size: 0.875rem;
    margin-bottom: 2rem;
    line-height: 1.5;
}

/* SVG Icons */
svg {
    flex-shrink: 0;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .header-container {
        padding: 0 1rem;
        height: 3.5rem;
    }
    
    .logo-text {
        display: none;
    }
    
    .navigation {
        display: none;
    }
    
    .menu-link span {
        display: none;
    }
    
    .main-content {
        padding: 1.5rem 1rem;
    }
    
    .page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .page-title {
        font-size: 1.75rem;
    }
    
    .action-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        justify-content: center;
        width: 100%;
    }
    
    .empty-state {
        padding: 3rem 1.5rem;
        margin-top: 1rem;
    }
    
    .empty-state-icon svg {
        width: 3rem;
        height: 3rem;
    }
    
    .empty-state-title {
        font-size: 1.125rem;
    }
}

@media (max-width: 640px) {
    .user-menu {
        gap: 0.5rem;
    }
    
    .menu-link {
        padding: 0.5rem;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .empty-state-content {
        max-width: 20rem;
    }
}

/* Tablet Responsiveness */
@media (min-width: 769px) and (max-width: 1024px) {
    .header-container {
        padding: 0 1.5rem;
    }
    
    .main-content {
        padding: 2rem 1.5rem;
    }
    
    .page-header {
        gap: 1.5rem;
    }
    
    .action-buttons {
        flex-direction: column;
        min-width: 200px;
    }
}

/* Focus States */
.btn:focus {
    outline: 2px solid #8b5cf6;
    outline-offset: 2px;
}

.nav-link:focus,
.menu-link:focus {
    outline: 2px solid #8b5cf6;
    outline-offset: 2px;
}

/* Metrics Section */
.metrics-section {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 1.5rem;
}

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

.metric-card {
    background-color: white;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    padding: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.metric-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.metric-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.metric-icon-sales {
    background-color: #fef3c7;
    color: #d97706;
}

.metric-icon-users {
    background-color: #dbeafe;
    color: #3b82f6;
}

.metric-icon-content {
    background-color: #dcfce7;
    color: #22c55e;
}

.metric-icon-subscriptions {
    background-color: #f3e8ff;
    color: #8b5cf6;
}

.metric-content h3 {
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    margin: 0 0 0.5rem 0;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.25rem;
}

.metric-change {
    font-size: 0.875rem;
    color: #64748b;
}

.metric-change.positive {
    color: #22c55e;
}

.metric-change.negative {
    color: #ef4444;
}

.metric-change.neutral {
    color: #64748b;
}

/* Content Management Section */
.content-management-section {
    margin-bottom: 3rem;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.content-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    color: #64748b;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    color: #374151;
    background-color: #f8fafc;
}

.tab-btn.active {
    color: #8b5cf6;
    border-bottom-color: #8b5cf6;
    background-color: #faf5ff;
}

.content-list-container {
    background-color: white;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.content-list {
    display: none;
    padding: 1.5rem;
}

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

.content-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.2s ease;
}

.content-item:last-child {
    border-bottom: none;
}

.content-item:hover {
    background-color: #f8fafc;
}

.content-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.content-icon {
    color: #64748b;
}

.content-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: #0f172a;
    margin: 0 0 0.25rem 0;
}

.content-meta {
    font-size: 0.75rem;
    color: #64748b;
    margin: 0;
}

.content-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    padding: 0.5rem;
    background: none;
    border: none;
    border-radius: 0.375rem;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background-color: #f1f5f9;
    color: #374151;
}

.btn-icon.btn-danger:hover {
    background-color: #fef2f2;
    color: #ef4444;
}

/* Delete Button Styles */
.btn-delete {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #dc2626;
    border: 1px solid #f87171;
    border-radius: 10px;
    transition: all 0.2s ease;
    font-weight: 600;
}

.btn-delete:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.btn-delete:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.btn-danger {
    background-color: #ef4444;
    color: white;
    border: 1px solid #ef4444;
}

.btn-danger:hover {
    background-color: #dc2626;
    border-color: #dc2626;
    color: white;
}

.btn-danger:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Custom Modal Styles */
.custom-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.custom-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.custom-modal {
    background: white;
    border-radius: 12px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9) translateY(-20px);
    transition: all 0.3s ease;
}

.custom-modal-overlay.active .custom-modal {
    transform: scale(1) translateY(0);
}

.custom-modal-header {
    padding: 24px 24px 16px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.custom-modal-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
}

.custom-modal-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.custom-modal-icon.danger {
    background-color: #fef2f2;
    color: #ef4444;
}

.custom-modal-icon.warning {
    background-color: #fffbeb;
    color: #f59e0b;
}

.custom-modal-icon.success {
    background-color: #f0fdf4;
    color: #22c55e;
}


.custom-modal-body {
    padding: 16px 24px 24px;
    text-align: left;
}

.custom-modal-message {
    color: #6b7280;
    font-size: 16px;
    line-height: 1.5;
    margin: 0;
    text-align: left;
}

.custom-modal-footer {
    padding: 0 24px 24px;
    display: flex;
    gap: 12px;
    justify-content: flex-start;
}

.custom-modal-footer.right {
    justify-content: flex-end;
}

.custom-modal-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    min-width: 100px;
}

.custom-modal-btn.primary {
    background-color: #6366f1;
    color: white;
}

.custom-modal-btn.primary:hover {
    background-color: #5338db;
}

.custom-modal-btn.danger {
    background-color: #ef4444;
    color: white;
}

.custom-modal-btn.danger:hover {
    background-color: #dc2626;
}

.custom-modal-btn.secondary {
    background-color: #f9fafb;
    color: #374151;
    border-color: #d1d5db;
}

.custom-modal-btn.secondary:hover {
    background-color: #f3f4f6;
}

/* Plans Section */
.plans-section {
    margin-bottom: 3rem;
}

.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.plan-card {
    background-color: white;
    border-radius: 0.75rem;
    border: 1px solid #e2e8f0;
    padding: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.plan-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.plan-header {
    margin-bottom: 1.5rem;
}

.plan-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 0.5rem 0;
}

.plan-price {
    font-size: 1.875rem;
    font-weight: 700;
    color: #8b5cf6;
}

.plan-stats {
    margin-bottom: 1.5rem;
}

.plan-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.plan-stat:last-child {
    margin-bottom: 0;
}

.stat-label {
    font-size: 0.875rem;
    color: #64748b;
}

.stat-value {
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
}

.plan-actions {
    display: flex;
    gap: 0.75rem;
}

.btn-sm {
    padding: 0.625rem 1rem;
    font-size: 0.8rem;
    flex: 1;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    border: none;
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.btn-disabled {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: #9ca3af;
    border: 1px solid #d1d5db;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-disabled:hover {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    color: #9ca3af;
    transform: none;
    box-shadow: none;
}

/* Empty Content State */
.empty-content-state {
    text-align: center;
    padding: 2rem;
    color: #64748b;
    background-color: #f8fafc;
    border-radius: 0.5rem;
    border: 1px dashed #e2e8f0;
}

.empty-content-state p {
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.empty-content-state .btn {
    font-size: 0.75rem;
    padding: 0.5rem 1rem;
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background-color: white;
    border-radius: 0.75rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.modal-overlay.active .modal-container {
    transform: scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.modal-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: #0f172a;
    text-align: center;
}

.modal-close {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 0.375rem;
    color: #64748b;
    transition: all 0.2s;
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
}

.modal-close:hover {
    background-color: #f1f5f9;
    color: #475569;
}

.modal-form {
    padding: 1.5rem;
}

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

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #8b5cf6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

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

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-prefix {
    position: absolute;
    left: 0.875rem;
    color: #6b7280;
    font-size: 0.875rem;
    font-weight: 500;
}

.input-group input {
    padding-left: 2.5rem;
}

.form-help {
    display: block;
    margin-top: 0.375rem;
    font-size: 0.75rem;
    color: #6b7280;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    color: #374151;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
    cursor: pointer;
}

.modal-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 2rem;
}

.modal-actions button {
    flex: 1;
}

/* Animation */
.empty-state, .content-item {
    animation: fadeInUp 0.6s ease-out;
}

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

/* Mobile Responsiveness for New Sections */
@media (max-width: 768px) {
    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .metric-card {
        padding: 1rem;
    }
    
    .metric-value {
        font-size: 1.5rem;
    }
    
    .section-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .content-tabs {
        overflow-x: auto;
        padding-bottom: 0.5rem;
    }
    
    .tab-btn {
        white-space: nowrap;
        flex-shrink: 0;
    }
    
    .content-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .content-actions {
        align-self: flex-end;
    }
    
    .plans-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .plan-actions {
        flex-direction: column;
    }
    
    .member-areas-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .member-area-card {
        padding: 1rem;
    }
    
    .member-area-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Member Areas Section */
.member-areas-section {
    margin-bottom: 3rem;
}

.member-areas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.member-area-card {
    background: white;
    border-radius: 20px;
    padding: 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    min-height: 380px;
    display: flex;
    flex-direction: column;
}

.member-area-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    border-color: #8b5cf6;
}

/* Novos estilos para cards modernos */
.app-card-header {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    padding: 1.5rem 1.5rem 2rem 1.5rem;
    position: relative;
    overflow: hidden;
}

.app-card-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(30px, -30px);
}

.app-card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.member-area-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.member-area-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    line-height: 1.2;
    max-width: 200px;
    word-wrap: break-word;
}

.member-area-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.status-badges {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-end;
}

.status-badge {
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.status-badge.published {
    background-color: rgba(34, 197, 94, 0.9);
    color: white;
}

.status-badge.draft {
    background-color: rgba(251, 191, 36, 0.9);
    color: white;
}

.status-badge.active {
    background-color: rgba(59, 130, 246, 0.9);
    color: white;
}

.status-badge.inactive {
    background-color: rgba(107, 114, 128, 0.9);
    color: white;
}

.status-badge.not-published {
    background-color: rgba(107, 114, 128, 0.9);
    color: white;
}

.member-area-meta {
    margin-bottom: 1.5rem;
    flex: 1;
}

.member-area-description {
    color: #64748b;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.member-area-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.area-stat {
    text-align: center;
    padding: 1rem;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.area-stat:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.area-stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: #8b5cf6;
    margin-bottom: 0.25rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.area-stat-label {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.member-area-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: auto;
}

.btn-visit {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    border: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    text-decoration: none;
}

.btn-visit:hover {
    background: linear-gradient(135deg, #7c3aed, #6d28d9);
    color: white;
    text-decoration: none;
}

.btn-edit {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    color: #6366f1;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.btn-edit:hover {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.empty-member-areas {
    text-align: center;
    padding: 3rem 1.5rem;
    background: white;
    border-radius: 12px;
    border: 2px dashed #e2e8f0;
}

.empty-member-areas svg {
    color: #9ca3af;
    margin-bottom: 1rem;
}

.empty-member-areas h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.empty-member-areas p {
    color: #6b7280;
    margin-bottom: 1.5rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    background: white;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #f3f4f6;
    border-top: 3px solid #8b5cf6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.member-area-published-date {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.5rem;
}

/* Toggle Switch Styles */
.toggle-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.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: 0.3s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #22c55e;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
}

.toggle-label {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

/* App Card Styles */
.app-card .status-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.status-badge.active {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.status-badge.inactive {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.app-language {
    font-size: 12px;
    color: #6b7280;
    margin-top: 4px;
}

.member-area-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.member-area-actions .btn {
    width: 100%;
    justify-content: center;
}

/* Responsive adjustments */
@media (min-width: 768px) {
    .member-area-actions {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    
    .toggle-container {
        margin-bottom: 0;
    }
    
    .member-area-actions .btn {
        width: auto;
    }
}

/* Seleção Múltipla */
.bulk-actions-bar {
    position: sticky;
    top: 65px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    display: none;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 40;
}

.bulk-actions-bar.show {
    display: flex;
}

.bulk-actions-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #475569;
    font-weight: 500;
}

.bulk-actions-buttons {
    display: flex;
    gap: 0.5rem;
}

.member-area-card {
    position: relative;
    transition: all 0.2s ease;
}

.member-area-card.selected {
    border-color: #8b5cf6;
    box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.2);
    background: rgba(139, 92, 246, 0.02);
}

.app-checkbox {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 20px;
    height: 20px;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 10;
}

.bulk-mode .app-checkbox {
    opacity: 1;
}

.app-checkbox input[type="checkbox"] {
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
}

.member-area-card:hover .app-checkbox {
    opacity: 0.7;
}

.bulk-mode .member-area-card:hover .app-checkbox {
    opacity: 1;
}

.bulk-toggle-btn {
    margin-left: auto;
}

.btn-secondary {
    background-color: #64748b;
    border-color: #64748b;
    color: white;
}

.btn-secondary:hover {
    background-color: #475569;
    border-color: #475569;
}

.app-checkbox input[type="checkbox"] {
    accent-color: #8b5cf6;
}

.bulk-mode .member-area-card {
    cursor: pointer;
}

.bulk-mode .member-area-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Loading Overlay Global */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.show {
    opacity: 1;
    visibility: visible;
}

.loading-content {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    text-align: center;
    max-width: 300px;
    width: 90%;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #8b5cf6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 1rem;
    font-weight: 500;
    color: #64748b;
    margin-top: 0.5rem;
}

/* Member Areas Management Section */
.member-areas-management-section {
    margin-bottom: 3rem;
}

.member-areas-management-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.member-area-checkbox {
    position: absolute;
    top: 1rem;
    left: 1rem;
    opacity: 0;
    transform: scale(0);
    transition: all 0.2s ease;
    z-index: 2;
}

.member-areas-management-grid.bulk-mode .member-area-checkbox {
    opacity: 1;
    transform: scale(1);
}

.member-area-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #3b82f6;
    cursor: pointer;
}

.member-area-card {
    position: relative;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.2s ease;
    cursor: default;
}

.member-area-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #c7d2fe;
}

.member-area-card.selected {
    border-color: #3b82f6;
    background: #f8fafc;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.member-areas-management-grid.bulk-mode .member-area-card {
    cursor: pointer;
    padding-top: 3rem;
}

.member-area-header {
    margin-bottom: 1rem;
}

.member-area-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
}

.status-badges {
    display: flex;
    gap: 0.5rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-weight: 500;
}

.status-badge.published {
    background: #d1fae5;
    color: #065f46;
}

.status-badge.draft {
    background: #fef3c7;
    color: #92400e;
}

.member-area-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.member-area-meta {
    flex: 1;
}

.member-area-description {
    color: #64748b;
    font-size: 0.875rem;
    line-height: 1.5;
    margin: 0 0 0.75rem 0;
}

.member-area-published-date {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 0.25rem;
}

.member-area-language {
    font-size: 0.75rem;
    color: #64748b;
}

.member-area-stats {
    display: flex;
    gap: 1.5rem;
    padding: 1rem 0;
    border-top: 1px solid #f1f5f9;
}

.area-stat {
    text-align: center;
}

.area-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
}

.area-stat-label {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
    margin-top: 0.25rem;
}

.member-area-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.member-area-actions .btn {
    flex: 1;
    text-align: center;
    justify-content: center;
}

.empty-member-areas {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: #64748b;
}

.empty-member-areas svg {
    margin: 0 auto 1.5rem;
    opacity: 0.5;
}

.empty-member-areas h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 0.5rem 0;
}

.empty-member-areas p {
    margin: 0 0 2rem 0;
    color: #6b7280;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* Apps Grid */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.loading-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: #64748b;
}

.spinner {
    border: 3px solid #f3f4f6;
    border-top: 3px solid #6366f1;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* App Card Specific Overrides */
.apps-grid .product-card {
    position: relative;
}

.app-checkbox {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    display: none;
}

.bulk-mode .app-checkbox {
    display: block;
}

.product-stats {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
}

.product-stat {
    flex: 1;
    text-align: center;
}

.product-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1;
}

.product-stat-label {
    font-size: 0.75rem;
    color: #64748b;
    font-weight: 500;
    margin-top: 0.25rem;
}

.product-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.product-actions .btn {
    flex: 1;
    min-width: auto;
    text-align: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .loading-content {
        padding: 1.5rem;
        max-width: 280px;
    }
    
    .loading-spinner {
        width: 40px;
        height: 40px;
    }
    
    .member-areas-management-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .apps-grid {
        grid-template-columns: 1fr;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .product-actions .btn {
        flex: none;
    }
}

/* ====================================
   NOVO LAYOUT MOBILE PREVIEW PARA APPS
   ==================================== */

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    padding: 1rem 0;
}

.app-card.mobile-preview {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    border: 2px solid transparent;
}

.app-card.mobile-preview:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1);
}

.app-card.mobile-preview.published {
    border-color: #10b981;
}

.app-card.mobile-preview.draft {
    border-color: #f59e0b;
}

/* Checkbox para seleção */
.app-checkbox {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
}

.app-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #8b5cf6;
    cursor: pointer;
}

/* Container do preview mobile */
.mobile-preview-container {
    position: relative;
    margin: 1rem 0;
    display: flex;
    justify-content: center;
}

/* Frame do celular */
.mobile-frame {
    width: 180px;
    height: 320px;
    background: #1f2937;
    border-radius: 24px;
    padding: 12px;
    position: relative;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.mobile-frame::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: #374151;
    border-radius: 2px;
}

/* Tela do celular */
.mobile-screen {
    width: 100%;
    height: 100%;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Header do app mobile */
.mobile-header {
    padding: 12px;
    color: white;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
}

.mobile-title {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Conteúdo do mobile */
.mobile-content {
    flex: 1;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Stats no mobile */
.mobile-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: 8px;
}

.mobile-stat {
    text-align: center;
    font-size: 10px;
}

.mobile-stat-number {
    display: block;
    font-weight: 700;
    font-size: 16px;
    color: #1f2937;
}

.mobile-stat-label {
    color: #6b7280;
    font-size: 9px;
    margin-top: 2px;
}

/* Módulos preview */
.mobile-modules {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.mobile-module {
    height: 24px;
    background: #f3f4f6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    padding: 0 8px;
}

.module-placeholder {
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg, #e5e7eb, #f9fafb, #e5e7eb);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
    border-radius: 4px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.mobile-empty {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 10px;
    text-align: center;
}

/* Badge de status */
.status-badge {
    position: absolute;
    top: -8px;
    right: 12px;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    color: white;
}

.status-badge.published {
    background: #10b981;
}

.status-badge.draft {
    background: #f59e0b;
}

/* Nome do app no topo */
.app-info-header {
    margin-bottom: 1rem;
    display: flex;
    justify-content: flex-start;
}

.app-name {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    text-align: left;
    margin: 0;
}

/* Botões de ação */
.app-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.action-btn {
    flex: 1;
    min-width: 0;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.action-btn:hover {
    transform: translateY(-1px);
}

.action-btn.primary {
    background: #8b5cf6;
    color: white;
}

.action-btn.primary:hover {
    background: #7c3aed;
}

.action-btn.secondary {
    background: #f3f4f6;
    color: #4b5563;
    border: 1px solid #d1d5db;
}

.action-btn.secondary:hover {
    background: #e5e7eb;
    color: #374151;
}

.action-btn.danger {
    background: #ef4444;
    color: white;
}

.action-btn.danger:hover {
    background: #dc2626;
}

.action-btn svg {
    width: 14px;
    height: 14px;
}

/* Responsividade para mobile preview */
@media (max-width: 640px) {
    .apps-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .mobile-frame {
        width: 160px;
        height: 280px;
        padding: 10px;
    }
    
    .action-btn {
        font-size: 11px;
        padding: 0.4rem 0.6rem;
    }
    
    .app-name {
        font-size: 16px;
    }
}
