/* Professional Admin Panel Styles */

/* Admin-Scoped Color Variables */
/* These map to admin-specific design system variables */
:root {
    /* All admin styles now depend solely on design system variables */
    --primary-color: var(--admin-primary-color);
    --primary-dark: var(--admin-primary-hover);
    --primary-light: var(--admin-primary-color);
    --secondary-color: var(--admin-secondary-color);
    --success-color: var(--admin-success-color);
    --warning-color: var(--admin-warning-color);
    --danger-color: var(--admin-danger-color);
    --info-color: var(--admin-info-color);
    
    --bg-primary: var(--admin-surface);
    --bg-secondary: var(--admin-bg-secondary);
    --bg-tertiary: var(--admin-surface-hover);
    --bg-dark: var(--admin-surface-elevated);
    --bg-darker: var(--admin-surface-elevated);
    
    --text-primary: var(--admin-text-primary);
    --text-secondary: var(--admin-text-secondary);
    --text-muted: var(--admin-text-muted);
    --text-light: var(--admin-text-inverse);
    
    --border-color: var(--admin-border-color);
    --border-dark: var(--admin-border-color);
    --border-light: var(--admin-border-light);
    
    --shadow-sm: var(--admin-shadow-sm);
    --shadow-md: var(--admin-shadow-md);
    --shadow-lg: var(--admin-shadow-lg);
    --shadow-xl: var(--admin-shadow-xl);
}

/* Admin Body Override - Fix global white background */
body.admin-body {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

/* Admin Layout */
.admin-layout {
    min-height: 100vh;
    background: var(--bg-secondary);
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

/* Admin Header - Override any conflicting styles */
.admin-header {
    background: var(--admin-header-gradient, linear-gradient(135deg, #4c1d95 0%, #312e81 50%, #1e1b4b 100%)) !important;
    border-bottom: 1px solid var(--admin-header-border-color, rgba(255, 255, 255, 0.1)) !important;
    box-shadow: var(--admin-header-shadow, 0 4px 20px rgba(0, 0, 0, 0.3)) !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 100 !important;
    padding: 0 !important; /* Override main.css padding */
    color: var(--admin-header-text-color, white) !important;
    width: 100% !important;
    box-sizing: border-box !important;
    height: 64px !important;
    display: flex !important;
    align-items: center !important;
}

/* Override main.css admin header styles completely */
.admin-layout .admin-header {
    background: var(--admin-header-gradient, linear-gradient(135deg, #4c1d95 0%, #312e81 50%, #1e1b4b 100%)) !important;
    padding: 0 !important;
    border-bottom: 1px solid var(--admin-header-border-color, rgba(255, 255, 255, 0.1)) !important;
    height: 64px !important;
    display: flex !important;
    align-items: center !important;
}

.admin-layout .admin-header-content {
    padding: 0 1rem !important;
    max-width: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    height: 64px !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.admin-layout .admin-header-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 0.75rem !important;
    height: 64px !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative !important;
    top: 0 !important;
}

.admin-header-content {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 1rem !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    height: 64px !important;
    position: relative !important;
    z-index: 1 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
}

.admin-header h1,
.admin-header .admin-title {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    color: var(--admin-title-color, var(--admin-header-text-color, white)) !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    text-shadow: var(--admin-header-text-shadow, 0 2px 4px rgba(0, 0, 0, 0.3)) !important;
    text-align: left !important;
    flex: 1 !important;
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    line-height: 1.2 !important;
}

.admin-header h1::before,
.admin-header .admin-title::before {
    content: '🦀' !important;
    width: 32px !important;
    height: 32px !important;
    background: none !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 20px !important;
    line-height: 1 !important;
    flex-shrink: 0 !important;
}

.admin-header-actions {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 0.75rem !important;
    flex-shrink: 0 !important;
    min-width: 0 !important;
    height: 64px !important;
    position: relative !important;
    top: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Admin Header Buttons */
.admin-header-actions .btn {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: rgba(255, 255, 255, 0.9) !important;
    padding: 0.5rem 0.75rem !important;
    border-radius: 8px !important;
    font-size: 0.8rem !important;
    font-weight: 500 !important;
    backdrop-filter: blur(10px) !important;
    transition: all 0.2s ease !important;
    white-space: nowrap !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.375rem !important;
    min-width: 0 !important;
    flex-shrink: 0 !important;
    height: auto !important;
    line-height: 1 !important;
}

.admin-header-actions .btn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    transform: translateY(-1px) !important;
}

.admin-header-actions .btn svg {
    flex-shrink: 0 !important;
    color: inherit !important;
}

/* Admin User Badge - Override main.css styles */
.admin-header .admin-user {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.375rem !important;
    padding: 0.5rem 0.75rem !important;
    background: var(--admin-user-bg, rgba(255, 255, 255, 0.15)) !important;
    border: 1px solid var(--admin-user-border, rgba(255, 255, 255, 0.2)) !important;
    border-radius: 8px !important;
    color: var(--admin-user-text, rgba(255, 255, 255, 0.9)) !important;
    font-weight: 500 !important;
    font-size: 0.8rem !important;
    backdrop-filter: blur(10px) !important;
    transition: all 0.2s ease !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    min-width: 0 !important;
    height: auto !important;
    line-height: 1 !important;
}

.admin-header .admin-user:hover {
    background: var(--admin-user-hover-bg, rgba(255, 255, 255, 0.2)) !important;
    border-color: var(--admin-user-hover-border, rgba(255, 255, 255, 0.3)) !important;
}

.admin-header .admin-user svg {
    flex-shrink: 0 !important;
    color: inherit !important;
}

/* Responsive Admin Header */
@media (max-width: 1024px) {
    .admin-header-content {
        padding: 0 0.75rem;
    }
    
    .admin-header h1,
    .admin-header .admin-title {
        font-size: 1.3rem;
        gap: 0.5rem;
    }
    
    .admin-header-actions {
        gap: 0.5rem;
    }
    
    .admin-header-actions .btn {
        padding: 0.4rem 0.6rem !important;
        font-size: 0.75rem !important;
    }
    
    .admin-header .admin-user {
        padding: 0.4rem 0.6rem !important;
        font-size: 0.75rem !important;
    }
}

@media (max-width: 768px) {
    .admin-header-content {
        padding: 0 0.5rem;
        height: 56px;
    }
    
    .admin-header h1,
    .admin-header .admin-title {
        font-size: 1.1rem;
        gap: 0.4rem;
    }
    
    .admin-header h1::before,
    .admin-header .admin-title::before {
        width: 24px;
        height: 24px;
    }
    
    .admin-header-actions {
        gap: 0.4rem;
    }
    
    .admin-header-actions .btn {
        padding: 0.3rem 0.5rem !important;
        font-size: 0.7rem !important;
        gap: 0.25rem !important;
    }
    
    .admin-header .admin-user {
        padding: 0.3rem 0.5rem !important;
        font-size: 0.7rem !important;
        gap: 0.25rem !important;
    }
}

@media (max-width: 480px) {
    .admin-header-content {
        padding: 0 0.4rem;
        height: 52px;
    }
    
    .admin-header h1,
    .admin-header .admin-title {
        font-size: 1rem;
        gap: 0.3rem;
    }
    
    .admin-header h1::before,
    .admin-header .admin-title::before {
        width: 20px;
        height: 20px;
    }
    
    .admin-header-actions {
        gap: 0.3rem;
    }
    
    .admin-header-actions .btn {
        padding: 0.25rem 0.4rem !important;
        font-size: 0.65rem !important;
        gap: 0.2rem !important;
    }
    
    .admin-header .admin-user {
        padding: 0.25rem 0.4rem !important;
        font-size: 0.65rem !important;
        gap: 0.2rem !important;
    }
}

/* Admin Content */
.admin-content {
    display: flex;
    flex: 1;
    min-height: calc(100vh - 64px);
}

/* Admin Sidebar */
.admin-sidebar {
    width: 280px;
    background: var(--admin-sidebar-bg, linear-gradient(180deg, #4c1d95 0%, #312e81 50%, #1e1b4b 100%));
    border-right: 1px solid var(--admin-sidebar-border-color, rgba(255, 255, 255, 0.1));
    overflow-y: auto;
    box-shadow: var(--admin-sidebar-shadow, 4px 0 20px rgba(0, 0, 0, 0.3));
}

.sidebar-section {
    padding: 0.5rem 0 !important;
    border-bottom: none !important;
    margin: 0 !important;
}

.sidebar-section:last-child {
    border-bottom: none;
}

/* Style section titles for admin sidebar - Override design system */
.admin-sidebar .section-title,
.admin-sidebar h3.section-title {
    font-size: 0.7rem !important;
    font-weight: 600 !important;
    color: var(--admin-primary-color, #667eea) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    margin: 0 1.5rem 0.5rem 1.5rem !important;
    padding-bottom: 0.375rem !important;
    border-bottom: 1px solid var(--admin-primary-color, #667eea) !important;
    line-height: 1.1 !important;
}

.admin-nav {
    list-style: none;
    margin: 0;
    padding: 0;
}

.admin-nav li {
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1 !important;
}

.admin-nav-link {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    padding: 0.5rem 1.5rem !important;
    background: none !important;
    border: none !important;
    text-align: left !important;
    color: var(--admin-nav-link-text-color, rgba(255, 255, 255, 0.8)) !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    font-family: inherit !important;
    gap: 0.75rem !important;
    position: relative !important;
    border-radius: 0 !important;
    line-height: 1.1 !important;
    margin: 0 !important;
}

.admin-nav-link:hover {
    background: var(--admin-nav-link-hover-bg, rgba(255, 255, 255, 0.1));
    color: var(--admin-nav-link-hover-text, white);
    transform: none;
}

.admin-nav-link.active {
    background: var(--admin-nav-link-active-bg, linear-gradient(135deg, #667eea, #764ba2));
    color: var(--admin-nav-link-hover-text, white);
    box-shadow: var(--admin-nav-link-active-shadow, 0 4px 15px rgba(102, 126, 234, 0.3));
    position: relative;
}

.admin-nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--admin-nav-link-active-indicator, white);
}

.admin-nav-link.public-link {
    color: var(--admin-nav-link-public-text, rgba(255, 255, 255, 0.6));
    font-weight: 500;
}

.admin-nav-link.public-link:hover {
    background: var(--admin-nav-link-public-hover-bg, rgba(255, 255, 255, 0.05));
    color: var(--admin-nav-link-public-hover-text, rgba(255, 255, 255, 0.8));
    transform: none;
}

.nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.nav-icon svg {
    width: 18px;
    height: 18px;
}

.nav-text {
    font-weight: 500;
    flex: 1;
}

/* Admin Main Content */
.admin-main {
    flex: 1;
    padding: 2rem;
    background: var(--bg-secondary);
    overflow-y: auto;
}

/* Enhanced Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: 1px solid transparent;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--bg-primary);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
    /* Default to large size */
    padding: 1.25rem 2.5rem;
    font-size: 1.1rem;
}

/* Button Size Classes */
.btn-small {
    padding: 0.5rem 1rem !important;
    font-size: 0.75rem !important;
}

.btn-medium {
    padding: 0.75rem 1.5rem !important;
    font-size: 0.875rem !important;
}

.btn-large {
    padding: 1.25rem 2.5rem !important;
    font-size: 1.1rem !important;
}

.btn-xl {
    padding: 2rem 4rem !important;
    font-size: 1.5rem !important;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-primary {
    background: var(--primary-color);
    color: var(--text-light);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: var(--text-light);
}

.btn-secondary {
    background: var(--bg-primary);
    color: var(--text-secondary);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border-color: var(--border-dark);
}

.btn-success {
    background: var(--success-color);
    color: var(--text-light);
    border-color: var(--success-color);
}

.btn-success:hover {
    background: var(--success-color);
    border-color: var(--success-color);
    opacity: 0.8;
}

.btn-warning {
    background: var(--warning-color);
    color: var(--text-light);
    border-color: var(--warning-color);
}

.btn-warning:hover {
    background: var(--warning-color);
    border-color: var(--warning-color);
    opacity: 0.8;
}

.btn-danger {
    background: var(--admin-btn-danger-bg);
    color: var(--admin-btn-danger-text);
    border-color: var(--admin-btn-danger-bg);
}

.btn-danger:hover {
    background: var(--admin-btn-danger-hover-bg);
    border-color: var(--admin-btn-danger-hover-bg);
    color: var(--admin-btn-danger-text);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
}

/* Enhanced Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 10%, transparent);
    background: var(--bg-primary);
    color: var(--text-primary);
}

/* Force readable text in active states */
.form-group input:active,
.form-group textarea:active,
.form-group select:active,
.form-group input:focus-visible,
.form-group textarea:focus-visible,
.form-group select:focus-visible {
    background: var(--bg-primary) !important;
    color: var(--text-primary) !important;
}

/* Ensure input text is always visible */
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

/* Webkit autofill fix */
.form-group input:-webkit-autofill,
.form-group input:-webkit-autofill:hover,
.form-group input:-webkit-autofill:focus,
.form-group input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px var(--bg-primary) inset !important;
    -webkit-text-fill-color: var(--text-primary) !important;
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    background: var(--bg-primary);
    color: var(--text-primary);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 10%, transparent);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Modern Post Editor Styles */
.post-editor.modern-editor {
    min-height: calc(100vh - 2rem);
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Post Editor Header Actions - inherits unified header style from main.css */
.post-editor .header-actions {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
    align-items: flex-start;
}

.post-editor .editor-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.post-editor .editor-main-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: none;
    width: 100%;
    flex: 1;
}

.post-editor .content-editor-card {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Modern Error Alert */
.error-alert {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: color-mix(in srgb, var(--admin-danger-color) 8%, transparent);
    border: 1px solid color-mix(in srgb, var(--admin-danger-color) 25%, transparent);
    border-left: 4px solid var(--admin-danger-color);
    border-radius: 12px;
    padding: 1.25rem;
    margin: 2rem 2.5rem 0;
    animation: slideIn 0.3s ease-out;
}

.error-alert .error-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.error-alert .error-content strong {
    display: block;
    color: var(--admin-danger-color);
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.error-alert .error-content p {
    color: var(--admin-text-primary);
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Modern Form Cards */
.form-card {
    background: var(--admin-surface);
    border-radius: 16px;
    border: 1px solid var(--admin-border-light);
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: all 0.2s ease;
}

.form-card:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-color: color-mix(in srgb, var(--admin-primary-color) 20%, var(--admin-border-light));
}

.form-card .card-header {
    background: linear-gradient(135deg, var(--admin-surface-elevated) 0%, var(--admin-surface) 100%);
    border-bottom: 1px solid var(--admin-border-light);
    padding: 1.5rem 2rem;
    text-align: left;
}

.form-card .card-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--admin-text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-align: left;
}

.form-card .card-header p {
    color: var(--admin-text-secondary);
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
    text-align: left;
}

.form-card .card-header br + p {
    margin-top: 0.5rem;
}

.form-card .card-content {
    padding: 2rem;
}

/* Modern Form Elements */
.form-label {
    display: block;
    font-weight: 600;
    color: var(--admin-form-label);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    letter-spacing: 0.01em;
}

.required-indicator {
    color: var(--admin-danger-color);
    margin-left: 0.25rem;
    font-weight: bold;
}

.form-input, .form-select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--admin-form-border);
    border-radius: 10px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.2s ease;
    background: var(--admin-form-bg);
    color: var(--admin-text-primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.form-input:focus, .form-select:focus {
    outline: none;
    border-color: var(--admin-form-border-focus);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--admin-primary-color) 15%, transparent),
                0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.form-input.title-input {
    font-size: 1.1rem;
    font-weight: 600;
    padding: 1rem 1.25rem;
}

.form-input::placeholder {
    color: var(--admin-form-placeholder);
    font-style: italic;
}

.select-wrapper {
    position: relative;
}

.select-wrapper::after {
    content: '▼';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--admin-text-secondary);
    font-size: 0.8rem;
}

.form-select {
    appearance: none;
    cursor: pointer;
    padding-right: 2.5rem;
}

.form-hint {
    display: block;
    color: var(--admin-text-muted);
    font-size: 0.8rem;
    margin-top: 0.5rem;
    line-height: 1.4;
}

.form-hint a {
    color: var(--admin-text-link);
    text-decoration: none;
}

.form-hint a:hover {
    color: var(--admin-text-link-hover);
    text-decoration: underline;
}

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

.form-group.title-group {
    margin-bottom: 2rem;
}

.form-group.content-group {
    margin-bottom: 0;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Full Width Layout Enhancements */
.form-row.wide-row {
    grid-template-columns: 2fr 1fr;
    gap: 2.5rem;
    margin-bottom: 2rem;
    align-items: start;
}

.form-card.full-width {
    width: 100%;
    max-width: none;
}

.form-group.full-width {
    width: 100%;
}

.form-group.author-group,
.form-group.status-group {
    margin-bottom: 0;
}

.form-group.author-group .form-hint,
.form-group.status-group .form-hint {
    margin-top: 0.25rem;
    font-size: 0.75rem;
}

/* Enhanced Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn-icon {
    font-size: 1rem;
    line-height: 1;
}

.btn-primary {
    background: var(--admin-primary-gradient);
    color: white;
    box-shadow: 0 4px 12px color-mix(in srgb, var(--primary-color) 30%, transparent);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px color-mix(in srgb, var(--primary-color) 40%, transparent);
}

.btn-outline-secondary {
    background: var(--bg-primary);
    color: var(--text-secondary);
    border-color: var(--border-color);
}

.btn-outline-secondary:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn.loading {
    pointer-events: none;
}

.loading-spinner {
    animation: spin 1s linear infinite;
}

/* Editor Wrapper */
.editor-wrapper {
    border: 2px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-primary);
    transition: border-color 0.2s ease;
    width: 100%;
    min-height: 400px;
}

.editor-wrapper:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary-color) 15%, transparent);
}

/* Content Editor Card Specific Styles */
.content-editor-card .editor-wrapper {
    min-height: 500px;
    flex: 1;
}

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

.content-editor-card .content-section {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.content-editor-card .form-group.content-group {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Mobile Responsiveness for Modern Post Editor */
@media (max-width: 768px) {
    .post-editor.modern-editor {
        /* Full width on mobile */
    }
    

    
    .post-editor .header-actions {
        flex-direction: row;
        justify-content: space-between;
        gap: 0.75rem;
    }
    
    .post-editor .header-actions .btn {
        flex: 1;
        justify-content: center;
        padding: 0.875rem 1rem;
    }
    
    .post-editor .editor-main-content {
        padding: 1rem;
        gap: 1.5rem;
    }
    
    .form-card .card-header {
        padding: 1.25rem 1.5rem;
    }
    
    .form-card .card-content {
        padding: 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .form-row.wide-row {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .form-input, .form-select {
        padding: 0.75rem 0.875rem;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .form-input.title-input {
        font-size: 1rem;
        padding: 0.875rem 1rem;
    }
    
    .error-alert {
        margin: 1.5rem 1.5rem 0;
        padding: 1rem;
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }
    
    .error-alert .error-icon {
        align-self: center;
    }
}

@media (max-width: 480px) {
    .post-editor .page-header {
        padding: 0.75rem;
    }
    
    .post-editor .page-header h1 {
        font-size: 1.5rem;
    }
    
    .post-editor .editor-main-content {
        padding: 0.75rem;
    }
    
    .form-card .card-header {
        padding: 1rem 1.25rem;
    }
    
    .form-card .card-content {
        padding: 1.25rem;
    }
    
    .post-editor .header-actions {
        flex-direction: column;
    }
    
    .post-editor .header-actions .btn {
        width: 100%;
    }
}

/* Enhanced Modern Tables */
.admin-table-container {
    background: var(--admin-table-bg, #ffffff);
    border-radius: 16px;
    padding: 0;
    border: 1px solid var(--admin-table-cell-border, #e5e7eb);
    box-shadow: var(--shadow-lg, 0 10px 15px -3px rgba(0, 0, 0, 0.1));
    overflow: hidden;
    position: relative;
    margin-top: 1.5rem;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 12px;
    background: transparent;
    padding: 1rem;
}

th, td {
    padding: 1.25rem 1.5rem;
    text-align: left;
    background: var(--bg-primary);
    position: relative;
    transition: all 0.2s ease;
}

th {
    font-weight: 700;
    color: var(--admin-table-header-text, #1f2937) !important;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: var(--admin-table-header-bg, #f8fafc) !important;
    border: 1px solid var(--admin-table-cell-border, #e5e7eb);
    padding: 1.5rem 1.5rem !important;
    border-radius: 8px 8px 0 0;
}

td {
    border-radius: 0;
    border-bottom: 1px solid var(--admin-table-cell-border, #e5e7eb);
    color: var(--text-primary, #374151);
    background: var(--bg-primary, #ffffff) !important;
}

tbody tr:first-child td:first-child {
    border-radius: 0 0 0 8px;
}

tbody tr:first-child td:last-child {
    border-radius: 0 0 8px 0;
}

tbody tr:last-child td:first-child {
    border-radius: 0 0 0 8px;
}

tbody tr:last-child td:last-child {
    border-radius: 0 0 8px 0;
}

tbody tr {
    transition: all 0.2s ease;
}

tbody tr:hover td {
    background: var(--bg-tertiary, #f8fafc) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    color: var(--text-primary, #1f2937) !important;
}

tbody tr:hover td::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.4), rgba(118, 75, 162, 0.4));
}

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

/* Table specific containers */
.posts-table, .users-table {
    margin-top: 2rem;
}

.posts-table table, .users-table table {
    background: transparent;
}

/* Individual cell styling for better spacing */
thead tr {
    background: transparent;
}

tbody tr {
    background: transparent;
    margin-bottom: 4px;
}

tbody tr td {
    border: 1px solid var(--admin-table-row-border);
    border-left: none;
    border-right: none;
}

tbody tr td:first-child {
    border-left: 1px solid var(--admin-table-row-border);
    border-radius: 8px 0 0 8px;
}

tbody tr td:last-child {
    border-right: 1px solid var(--admin-table-row-border);
    border-radius: 0 8px 8px 0;
}

/* Enhanced action buttons in tables */
td.actions {
    white-space: nowrap;
    text-align: right;
}

/* System Settings Specific Styles */
.system-settings {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

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

.info-card {
    background: var(--admin-card-bg);
    border: 1px solid var(--admin-card-border);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--admin-card-shadow);
    transition: var(--admin-transition-normal);
}

.info-card:hover {
    box-shadow: var(--admin-card-hover-shadow);
    transform: translateY(-2px);
}

.info-card h4 {
    color: var(--admin-text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--admin-border-light);
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--admin-border-light);
}

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

.info-item .label {
    color: var(--admin-text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
}

.info-item .value {
    color: var(--admin-text-primary);
    font-weight: 600;
    font-size: 0.9rem;
}

.info-item .value.verified {
    color: var(--admin-success-color);
}

.info-item .value.error {
    color: var(--admin-danger-color);
}

/* Settings Table Styling */
.settings-table-container {
    background: var(--admin-table-bg);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--admin-table-cell-border);
    box-shadow: var(--admin-shadow-md);
}

.settings-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0;
}

.settings-table th {
    background: var(--admin-table-header-bg);
    color: var(--admin-table-header-text);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--admin-table-cell-border);
}

.settings-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--admin-table-row-border);
    color: var(--admin-text-primary);
    vertical-align: top;
}

.settings-table tr:hover td {
    background: var(--admin-table-row-hover-bg);
}

.setting-key {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 0.85rem;
    color: var(--admin-primary-color);
    font-weight: 600;
}

.setting-value {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 0.85rem;
    max-width: 200px;
    word-wrap: break-word;
}

.setting-description {
    color: var(--admin-text-secondary);
    font-size: 0.85rem;
    line-height: 1.4;
    max-width: 250px;
}

.setting-updated {
    color: var(--admin-text-muted);
    font-size: 0.8rem;
}

/* Data Snapshot Styles */
.snapshot-overview {
    background: var(--admin-surface-elevated);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--admin-border-light);
}

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

.snapshot-stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-label {
    color: var(--admin-text-secondary);
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.stat-value {
    color: var(--admin-text-primary);
    font-size: 1.2rem;
    font-weight: 700;
}

.merkle-hash {
    background: var(--admin-surface);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid var(--admin-border-color);
}

.merkle-hash h4 {
    color: var(--admin-text-primary);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.hash-display {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 0.8rem;
    color: var(--admin-info-color);
    background: var(--admin-surface-elevated);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    border: 1px solid var(--admin-border-light);
    word-break: break-all;
    display: block;
}

/* Snapshot Table */
.snapshot-table-container {
    background: var(--admin-table-bg);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--admin-table-cell-border);
}

.snapshot-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0;
}

.snapshot-table th {
    background: var(--admin-table-header-bg);
    color: var(--admin-table-header-text);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--admin-table-cell-border);
}

.snapshot-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--admin-table-row-border);
    color: var(--admin-text-primary);
    font-size: 0.85rem;
}

.table-name {
    font-weight: 600;
    color: var(--admin-primary-color);
}

.row-count {
    font-weight: 600;
    text-align: right;
}

.table-hash {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 0.75rem;
}

.table-hash code {
    background: var(--admin-surface-elevated);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--admin-border-light);
}

.last-modified {
    color: var(--admin-text-muted);
    font-size: 0.8rem;
}

/* Backup Management Styles */
.backup-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.backups-table-container {
    background: var(--admin-table-bg);
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--admin-table-cell-border);
    box-shadow: var(--admin-shadow-md);
}

.backups-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0;
}

.backups-table th {
    background: var(--admin-table-header-bg);
    color: var(--admin-table-header-text);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--admin-table-cell-border);
}

.backups-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--admin-table-row-border);
    color: var(--admin-text-primary);
    font-size: 0.85rem;
}

.backups-table tr:hover td {
    background: var(--admin-table-row-hover-bg);
}

.backup-filename {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-weight: 600;
    color: var(--admin-primary-color);
}

.backup-size {
    font-weight: 600;
    text-align: right;
}

.backup-checksum {
    font-family: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-size: 0.75rem;
}

.backup-checksum code {
    background: var(--admin-surface-elevated);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--admin-border-light);
    color: var(--admin-text-secondary);
}

/* Loading States */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem;
    color: var(--admin-text-secondary);
    font-size: 1.1rem;
}

.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--admin-text-muted);
    background: var(--admin-surface);
    border-radius: 8px;
    border: 1px solid var(--admin-border-light);
}

.empty-state p {
    margin: 0;
    font-size: 1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .system-info-grid {
        grid-template-columns: 1fr;
    }
    
    .snapshot-header {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .backup-actions {
        flex-direction: column;
    }
    
    .settings-table,
    .snapshot-table,
    .backups-table {
        font-size: 0.8rem;
    }
    
    .settings-table th,
    .settings-table td,
    .snapshot-table th,
    .snapshot-table td,
    .backups-table th,
    .backups-table td {
        padding: 0.5rem 0.75rem;
    }
}

td.actions .btn {
    margin-left: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    border-radius: 6px;
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

td.actions .btn:first-child {
    margin-left: 0;
}

td.actions .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: transparent;
    transition: all 0.2s ease;
}

td.actions .btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

td.actions .btn-secondary:hover {
    background: var(--bg-secondary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

td.actions .btn-secondary:hover::before {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.6), rgba(118, 75, 162, 0.6));
}

td.actions .btn-danger {
    background: var(--admin-btn-danger-bg);
    color: var(--admin-btn-danger-text);
    border-color: var(--admin-btn-danger-bg);
}

td.actions .btn-danger:hover {
    background: var(--admin-btn-danger-hover-bg);
    border-color: var(--admin-btn-danger-hover-bg);
    color: var(--admin-btn-danger-text);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

td.actions .btn-danger:hover::before {
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.6), rgba(220, 38, 38, 0.6));
}

/* Enhanced Status Badges */
.status-badge {
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: capitalize;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.status-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.status-badge:hover::before {
    left: 100%;
}

.status-badge::after {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    animation: statusPulse 2s infinite;
}

.status-badge.published,
.status-badge.approved {
    background: var(--admin-status-published-bg);
    color: var(--admin-status-published-text);
}

.status-badge.active {
    background: var(--admin-status-active-bg);
    color: var(--admin-status-active-text);
}

.status-badge.draft {
    background: var(--admin-status-draft-bg);
    color: var(--admin-status-draft-text);
}

.status-badge.pending {
    background: var(--admin-status-pending-bg);
    color: var(--admin-status-pending-text);
}

.status-badge.spam,
.status-badge.inactive {
    background: var(--admin-status-inactive-bg);
    color: var(--admin-status-inactive-text);
}

@keyframes statusPulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

/* Enhanced Cards */
.card {
    background: var(--admin-card-bg);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--admin-card-shadow);
    border: 1px solid var(--admin-card-border);
    transition: var(--admin-transition-slow);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--admin-card-hover-shadow);
    border-color: var(--admin-card-border);
}

/* Navigation Manager Enhanced Styles */
.navigation-manager {
    padding: 2rem;
}

.menu-area-selector {
    background: var(--bg-primary);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.menu-area-selector h3 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
}

.menu-area-dropdown {
    width: 100%;
    max-width: 400px;
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.menu-area-dropdown:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.menu-area-description {
    margin: 0.75rem 0 0 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border-radius: 4px;
    border-left: 3px solid var(--primary-color);
}

.item-menu-area {
    margin: 0.5rem 0 0 0;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.menu-area-badge {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: 0.25rem;
}

/* Custom Menu Creator */
.custom-menu-creator {
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.custom-menu-creator h3 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.custom-menu-creator .section-description {
    margin: 0 0 1rem 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.custom-menu-form {
    background: var(--bg-primary);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    padding: 1rem;
}

.custom-menu-form .form-row {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.custom-menu-form .form-group {
    flex: 1;
}

.custom-menu-form .form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.custom-menu-form .form-control {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.custom-menu-form .form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(var(--primary-rgb), 0.2);
}

.custom-menu-form .form-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-start;
}

.custom-menu-form .btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.custom-menu-form .btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
}

.custom-menu-form .btn-primary:disabled {
    background: rgba(var(--primary-rgb), 0.5);
    cursor: not-allowed;
}

.custom-menu-form .btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.custom-menu-form .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

@media (min-width: 768px) {
    .custom-menu-form .form-row {
        flex-direction: row;
        align-items: flex-end;
    }
    
    .custom-menu-form .form-actions {
        flex-shrink: 0;
        margin-left: 1rem;
    }
}

.navigation-content {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
    max-width: 1400px;
    margin: 0 auto;
}

.add-navigation-item {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.add-navigation-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.6), rgba(118, 75, 162, 0.6));
}

.add-navigation-item h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.add-navigation-item h3::before {
    content: '➕';
    font-size: 1rem;
}

.navigation-list {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.navigation-list::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.1));
}

.navigation-list h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(102, 126, 234, 0.2);
}

.navigation-list h3::before {
    content: '🧭';
    font-size: 1rem;
}

.navigation-items {
    display: grid;
    gap: 1rem;
}

.navigation-item {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.navigation-item:hover {
    transform: translateY(-1px);
    background: var(--bg-tertiary);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.navigation-item:hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.5), rgba(118, 75, 162, 0.5));
}

.navigation-item .item-info {
    flex: 1;
}

.navigation-item .item-info h4 {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.navigation-item .item-url {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-family: monospace;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    display: inline-block;
    margin: 0;
}

.navigation-item .item-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.navigation-item .item-actions .btn {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    border-radius: 6px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.navigation-item .item-actions .btn-small {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.navigation-item .item-actions .btn-small:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.navigation-item .item-actions .btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.navigation-item .item-actions .btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.navigation-preview {
    background: var(--bg-primary);
    border-radius: 12px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.navigation-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, rgba(118, 75, 162, 0.6), rgba(102, 126, 234, 0.6));
}

.navigation-preview h3 {
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navigation-preview h3::before {
    content: '👁️';
    font-size: 1rem;
}

.preview-nav {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.preview-nav-link {
    padding: 0.75rem 1.5rem;
    background: var(--bg-secondary);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.2s ease;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.preview-nav-link:hover {
    background: var(--bg-tertiary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.preview-nav-link:hover::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.5), rgba(118, 75, 162, 0.5));
}

.navigation-item-form {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
}

.navigation-item-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, rgba(245, 158, 11, 0.6), rgba(217, 119, 6, 0.6));
}

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

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .navigation-item {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .navigation-item .item-actions {
        justify-content: center;
    }
    
    .preview-nav {
        justify-content: center;
    }
}

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

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

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

.stat-card {
    background: #ffffff !important;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    transition: all 0.2s ease;
}

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

.stat-card h3 {
    margin-bottom: 0.5rem;
    color: var(--admin-text-secondary, #6b7280) !important;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--admin-text-primary, #1f2937) !important;
    margin: 0;
}

/* Loading and Error States */
.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

.error {
    background: #fee2e2;
    color: var(--danger-color);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border: 1px solid #fecaca;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .admin-sidebar {
        width: 240px;
    }
    
    .admin-main {
        padding: 1.5rem;
    }
}

@media (max-width: 768px) {
    .admin-content {
        flex-direction: column;
    }
    
    .admin-sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .admin-header-content {
        padding: 0 1rem;
    }
    
    .admin-main {
        padding: 1rem;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .admin-header-actions {
        gap: 0.5rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }
}

/* Dark mode is now the default - no media query needed */

.card,
    .stat-card {
        background: #ffffff !important;
        border-color: rgba(0, 0, 0, 0.1) !important;
    }
    
    table {
        background: var(--bg-primary);
        border-color: var(--border-color);
    }
    
    th {
        background: var(--bg-tertiary);
        /* End th selector */
    margin-bottom: 3rem;
    padding: 2rem;
    background: var(--admin-header-gradient);
    border-radius: 20px;
    color: var(--admin-header-text-color);
    box-shadow: var(--admin-header-shadow);
    position: relative;
    overflow: hidden;
}

/* Removed circular pattern background */

.page-header h1 {
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
    color: var(--admin-header-text-color);
    text-shadow: var(--admin-header-text-shadow);
    position: relative;
    z-index: 1;
}

.page-header p {
    color: var(--admin-header-text-color);
    font-size: 1.2rem;
    font-weight: 300;
    position: relative;
    z-index: 1;
    margin-bottom: 0;
}

.header-actions {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    display: flex;
    gap: 1rem;
    z-index: 2;
}

.header-actions select,
.header-actions .btn {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.header-actions select:hover,
.header-actions .btn:hover {
    background: var(--bg-primary);
    transform: translateY(-1px);
}

.header-actions select option {
    background: var(--bg-primary);
    color: var(--text-primary);
}

/* Enhanced Key Metrics Styles */
.metrics-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.metrics-section h2::before {
    content: '📊';
    font-size: 1.2rem;
}

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

.metric-card {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

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

.metric-card::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    background: var(--primary-color);
    border-radius: 16px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.metric-card:hover::before {
    opacity: 0.1;
}

.metric-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    padding: 12px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color);
    color: var(--text-light);
    font-size: 24px;
}

.metric-card.posts .metric-icon {
    background: var(--primary-color);
}

.metric-card.users .metric-icon {
    background: var(--success-color);
}

.metric-card.comments .metric-icon {
    background: var(--warning-color);
}

.metric-card.media .metric-icon {
    background: var(--info-color);
}

.metric-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1;
}

.metric-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-breakdown {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.metric-breakdown span {
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    font-weight: 500;
}

.metric-breakdown .published {
    background: var(--admin-status-published-bg);
    color: var(--admin-status-published-text);
}

.metric-breakdown .draft {
    background: var(--admin-status-draft-bg);
    color: var(--admin-status-draft-text);
}

.metric-breakdown .approved {
    background: var(--admin-status-approved-bg);
    color: var(--admin-status-approved-text);
}

.metric-breakdown .pending {
    background: var(--admin-status-pending-bg);
    color: var(--admin-status-pending-text);
}

.metric-breakdown .active {
    background: var(--admin-status-active-bg);
    color: var(--admin-status-active-text);
}

.metric-breakdown .files {
    background: var(--admin-metric-breakdown-bg);
    color: var(--admin-text-secondary);
}

/* Enhanced System Status Styles */
.status-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-section h2::before {
    content: '⚡';
    font-size: 1.2rem;
}

.status-card {
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.95) 0%, rgba(31, 41, 55, 0.9) 100%);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    color: white;
}

.status-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.status-indicator::before {
    content: '';
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--danger-color);
    animation: pulse 2s infinite;
}

.status-indicator.online::before {
    background: var(--success-color);
}

.status-indicator.online {
    color: var(--success-color);
}

.status-indicator.offline {
    color: var(--danger-color);
}

@keyframes pulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.status-details p {
    margin: 0.5rem 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
}

.status-details p:first-child {
    font-weight: 500;
    color: white;
}

/* Enhanced Activity Section */
.activity-section h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.activity-section h2::before {
    content: '📝';
    font-size: 1.2rem;
}

/* Performance Monitoring Styles */
.performance-monitor {
    margin-top: 2rem;
}

.performance-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    background: var(--bg-primary);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.performance-header .header-info h2 {
    margin: 0 0 0.5rem 0;
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
}

.performance-header .header-info p {
    margin: 0 0 0.5rem 0;
    color: var(--text-secondary);
}

.performance-header .last-updated {
    font-size: 0.875rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.live-indicator {
    background: var(--danger-color);
    color: white;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

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

.performance-grid {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr;
}

.metrics-section {
    background: var(--bg-primary);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.metrics-section h3 {
    margin: 0 0 1.5rem 0;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

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

.metric-card {
    background: var(--bg-secondary);
    border-radius: 0.5rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.metric-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

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

.metric-header h4 {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.status-indicator {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: bold;
}

.status-good .status-indicator {
    background: var(--success-color);
    color: white;
}

.status-warning .status-indicator {
    background: var(--warning-color);
    color: white;
}

.status-critical .status-indicator {
    background: var(--danger-color);
    color: white;
}

.status-info .status-indicator {
    background: var(--info-color);
    color: white;
}

.metric-value {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    line-height: 1;
}

.metric-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Status-based card styling */
.metric-card.status-good {
    border-left: 4px solid var(--success-color);
}

.metric-card.status-warning {
    border-left: 4px solid var(--warning-color);
}

.metric-card.status-critical {
    border-left: 4px solid var(--danger-color);
}

.metric-card.status-info {
    border-left: 4px solid var(--info-color);
}

/* Backend Metrics */
.backend-metrics {
    border-top: 3px solid var(--primary-color);
}

/* Frontend Metrics */
.frontend-metrics {
    border-top: 3px solid var(--info-color);
}

/* System Metrics */
.system-metrics {
    border-top: 3px solid var(--warning-color);
}

/* Responsive Design */
@media (min-width: 768px) {
    .performance-grid {
        grid-template-columns: 1fr;
    }
    
    .metrics-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (min-width: 1024px) {
    .metrics-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (min-width: 1280px) {
    .performance-grid {
        grid-template-columns: 1fr;
    }
    
    .metrics-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

/* Error States */
.performance-monitor .error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: var(--danger-color);
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.performance-monitor .loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-state p {
    margin: 0;
    font-size: 1rem;
} 