/**
 * Wisemoni Admin Styles
 * 后台专用样式
 */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
    --bg-primary: #fafbfc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f3f5;
    --bg-dark: #0d1117;
    --bg-dark-secondary: #161b22;
    
    --text-primary: #1a1d21;
    --text-secondary: #4a5568;
    --text-tertiary: #718096;
    --text-muted: #a0aec0;
    --text-inverse: #ffffff;
    
    --accent-primary: #2563eb;
    --accent-secondary: #3b82f6;
    --accent-gradient: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    --accent-success: #10b981;
    --accent-warning: #f59e0b;
    --accent-danger: #ef4444;
    
    --border-light: #e5e7eb;
    --border-medium: #d1d5db;
    
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12), 0 4px 8px rgba(0, 0, 0, 0.06);
    --shadow-xl: 0 20px 48px rgba(0, 0, 0, 0.16);
    
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', monospace;
    
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;
    
    --header-bg: rgba(255, 255, 255, 0.95);
    --sidebar-bg: #fafbfc;
    --sidebar-border: #e5e7eb;
    --sidebar-text: #4b5563;
    --sidebar-hover: #f3f4f6;
    --sidebar-active-bg: #eff6ff;
    --sidebar-active-text: #2563eb;
    --table-hover: #fafbfc;
    --input-bg: #ffffff;
    --code-bg: #f3f4f6;
}

[data-theme="dark"] {
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #21262d;
    
    --text-primary: #f0f6fc;
    --text-secondary: #c9d1d9;
    --text-tertiary: #8b949e;
    --text-muted: #6e7681;
    --text-inverse: #0d1117;
    
    --border-light: #30363d;
    --border-medium: #484f58;
    
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2), 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.4), 0 4px 8px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 20px 48px rgba(0, 0, 0, 0.5);
    
    --header-bg: rgba(22, 27, 34, 0.95);
    --sidebar-bg: #0d1117;
    --sidebar-border: #30363d;
    --sidebar-text: #8b949e;
    --sidebar-hover: #161b22;
    --sidebar-active-bg: rgba(37, 99, 235, 0.15);
    --sidebar-active-text: #58a6ff;
    --table-hover: #161b22;
    --input-bg: #0d1117;
    --code-bg: #21262d;
    
    --accent-primary: #58a6ff;
    --accent-secondary: #79c0ff;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
    background: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}

.admin-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--header-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-light);
    height: 56px;
}

.admin-header-inner {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.admin-header-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.admin-header-brand .logo {
    width: 32px;
    height: 32px;
    background: var(--accent-gradient);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 800;
    color: white;
}

.admin-header-brand .brand-text {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.admin-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-header-actions a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.admin-header-actions a:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.admin-header-actions a svg {
    width: 16px;
    height: 16px;
}

.admin-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: calc(100vh - 56px);
}

.admin-sidebar {
    background: var(--sidebar-bg);
    border-right: 1px solid var(--sidebar-border);
    padding: 16px 0;
    position: sticky;
    top: 56px;
    height: calc(100vh - 56px);
    overflow-y: auto;
}

.admin-sidebar h3 {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--text-muted);
    padding: 16px 20px 8px;
    font-weight: 700;
}

.admin-sidebar a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    font-size: 0.875rem;
    color: var(--sidebar-text);
    transition: all 0.15s ease;
    border-left: 3px solid transparent;
}

.admin-sidebar a svg {
    width: 18px;
    height: 18px;
    opacity: 0.7;
}

.admin-sidebar a:hover {
    background: var(--sidebar-hover);
    color: var(--text-primary);
}

.admin-sidebar a:hover svg {
    opacity: 1;
}

.admin-sidebar a.active {
    background: var(--sidebar-active-bg);
    color: var(--sidebar-active-text);
    border-left-color: var(--sidebar-active-text);
    font-weight: 500;
}

.admin-sidebar a.active svg {
    opacity: 1;
    color: var(--sidebar-active-text);
}

.admin-content {
    padding: 24px 32px;
    background: var(--bg-primary);
    min-height: calc(100vh - 56px);
}

.admin-content h1 {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 20px;
    letter-spacing: -0.02em;
}

.admin-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.admin-toolbar h1 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.02em;
}

.admin-filter-bar {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    padding: 16px 20px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-light);
    margin-bottom: 20px;
}

.admin-filter-bar .admin-search {
    flex: 1;
    min-width: 200px;
    max-width: 320px;
}

.admin-filter-bar .form-control {
    padding: 10px 16px;
    font-size: 0.875rem;
    border-radius: 8px;
}

.admin-filter-bar .btn {
    padding: 10px 18px;
}

.admin-filter-bar .clear-link {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.admin-filter-bar .clear-link:hover {
    color: var(--accent-primary);
}

.admin-search {
    flex: 1;
    max-width: 320px;
    position: relative;
}

.admin-search input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-size: 0.875rem;
    background: var(--input-bg);
    color: var(--text-primary);
    transition: all 0.15s ease;
}

.admin-search input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.admin-search svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-muted);
}

.admin-table {
    background: var(--bg-secondary);
    border-radius: 16px;
    border: 1px solid var(--border-light);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

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

.admin-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

.admin-table th {
    background: var(--bg-tertiary);
    padding: 14px 20px;
    text-align: left;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-tertiary);
    border-bottom: 2px solid var(--border-light);
    white-space: nowrap;
    position: relative;
}

.admin-table th:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 20px;
    width: 1px;
    background: var(--border-light);
    opacity: 0.5;
}

.admin-table th a {
    color: inherit;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color var(--transition-fast);
}

.admin-table th a:hover {
    color: var(--accent-primary);
}

.admin-table td {
    padding: 16px 20px;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
    transition: background var(--transition-fast);
}

.admin-table tbody tr {
    position: relative;
}

.admin-table tbody tr td:first-child::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: transparent;
    transition: background var(--transition-fast);
}

.admin-table tbody tr:hover td:first-child::before {
    background: var(--accent-primary);
}

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

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

.admin-table .title-cell {
    max-width: 320px;
}

.admin-table .title-cell a {
    color: var(--text-primary);
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all var(--transition-fast);
    position: relative;
}

.admin-table .title-cell a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-primary);
    transition: width var(--transition-base);
}

.admin-table .title-cell a:hover {
    color: var(--accent-primary);
}

.admin-table .title-cell a:hover::after {
    width: 100%;
}

.admin-table .id-cell {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.admin-table .date-cell {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    white-space: nowrap;
}

.admin-table .category-cell {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.status-badge svg {
    width: 12px;
    height: 12px;
}

.status-published {
    background: rgba(16, 185, 129, 0.12);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-draft {
    background: rgba(245, 158, 11, 0.12);
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.status-featured {
    background: rgba(139, 92, 246, 0.12);
    color: #7c3aed;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.status-badge svg {
    width: 12px;
    height: 12px;
}

.table-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.table-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    transition: all var(--transition-fast);
    white-space: nowrap;
    border: 1px solid transparent;
}

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

.table-action-btn.edit {
    background: rgba(37, 99, 235, 0.08);
    color: var(--accent-primary);
    border-color: rgba(37, 99, 235, 0.15);
}

.table-action-btn.edit:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
}

.table-action-btn.view {
    background: rgba(107, 114, 128, 0.08);
    color: var(--text-secondary);
    border-color: rgba(107, 114, 128, 0.15);
}

.table-action-btn.view:hover {
    background: var(--text-secondary);
    color: white;
    border-color: var(--text-secondary);
}

.table-action-btn.delete {
    background: rgba(239, 68, 68, 0.08);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.15);
}

.table-action-btn.delete:hover {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.admin-stat-card {
    background: var(--bg-secondary);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.admin-stat-card .stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.admin-stat-card .stat-icon svg {
    width: 22px;
    height: 22px;
    color: white;
}

.admin-stat-card .stat-icon.brand { background: linear-gradient(135deg, #2563eb, #3b82f6); }
.admin-stat-card .stat-icon.blue { background: linear-gradient(135deg, #0284c7, #0ea5e9); }
.admin-stat-card .stat-icon.orange { background: linear-gradient(135deg, #ea580c, #f97316); }
.admin-stat-card .stat-icon.purple { background: linear-gradient(135deg, #7c3aed, #8b5cf6); }
.admin-stat-card .stat-icon.green { background: linear-gradient(135deg, #059669, #10b981); }

.admin-stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 4px;
}

.admin-stat-card .stat-label {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.admin-quick-actions {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.admin-quick-actions a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.15s ease;
}

.admin-quick-actions a:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
    background: var(--sidebar-active-bg);
}

.admin-quick-actions a svg {
    width: 16px;
    height: 16px;
}

.admin-section {
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-light);
    padding: 20px;
    margin-bottom: 24px;
}

.admin-section .admin-table {
    margin: -20px;
    border: none;
    border-radius: 0 0 11px 11px;
}

.admin-section .admin-table th {
    border-top: none;
}

.admin-section .admin-table th:first-child {
    border-left: none;
}

.admin-section .admin-table th:last-child {
    border-right: none;
}

.admin-section .admin-table td:first-child {
    border-left: none;
}

.admin-section .admin-table td:last-child {
    border-right: none;
}

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

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

.admin-section h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.admin-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.slug-code {
    background: var(--bg-tertiary);
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
}

@media (max-width: 768px) {
    .admin-grid-2 {
        grid-template-columns: 1fr;
    }
}

.admin-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.admin-empty svg {
    width: 64px;
    height: 64px;
    margin-bottom: 16px;
    opacity: 0.4;
    color: var(--text-tertiary);
}

.admin-empty div {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.admin-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 16px;
    border-top: 1px solid var(--border-light);
}

.admin-pagination a,
.admin-pagination span {
    padding: 8px 12px;
    font-size: 0.875rem;
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-secondary);
}

.admin-pagination a:hover {
    background: var(--bg-tertiary);
}

.admin-pagination .active {
    background: var(--accent-primary);
    color: white;
}

.admin-pagination .disabled {
    color: var(--text-muted);
    cursor: not-allowed;
}

.admin-bulk-actions {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--sidebar-active-bg);
    border-bottom: 1px solid var(--border-light);
}

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

.admin-bulk-actions span {
    font-size: 0.875rem;
    color: var(--accent-primary);
    font-weight: 500;
}

.row-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent-primary);
}

.admin-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 12px 20px;
    background: #111827;
    color: white;
    border-radius: 8px;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 1000;
}

.admin-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.admin-toast.success {
    background: #059669;
}

.admin-toast.error {
    background: #dc2626;
}

.admin-form-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-light);
    padding: 24px;
    max-width: 800px;
}

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

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

.admin-form-card label .required {
    color: #dc2626;
}

.admin-form-card .form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.15s ease;
    background: var(--input-bg);
    color: var(--text-primary);
}

.admin-form-card .form-control:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.admin-form-card .form-control::placeholder {
    color: var(--text-muted);
}

.admin-form-card textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

.admin-form-card select.form-control {
    cursor: pointer;
}

.admin-form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

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

.admin-checkbox-group {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.admin-checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 400;
}

.admin-checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-primary);
}

.admin-form-actions {
    display: flex;
    gap: 12px;
    padding-top: 8px;
    border-top: 1px solid var(--border-light);
    margin-top: 24px;
}

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

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

.form-group label .required {
    color: var(--accent-danger);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    color: var(--text-primary);
    background: var(--bg-secondary);
    transition: all var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-control::placeholder {
    color: var(--text-muted);
}

textarea.form-control {
    min-height: 140px;
    resize: vertical;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
}

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

.btn-primary:hover {
    background: var(--accent-secondary);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--border-medium);
}

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

.btn-sm {
    padding: 8px 16px;
    font-size: 0.875rem;
}

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

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

.btn-block {
    width: 100%;
}

.auth-container {
    max-width: 440px;
    margin: 80px auto;
    padding: 48px;
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-lg);
}

.auth-container h1 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    text-align: center;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.auth-container .auth-subtitle {
    text-align: center;
    color: var(--text-tertiary);
    margin-bottom: 32px;
}

.auth-container .auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.auth-container .auth-footer a {
    color: var(--accent-primary);
    font-weight: 500;
}

.alert {
    padding: 14px 18px;
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    font-size: 0.9rem;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

@media (max-width: 768px) {
    .admin-layout {
        grid-template-columns: 1fr;
    }
    
    .admin-sidebar {
        display: none;
    }
    
    .admin-content {
        padding: 16px;
    }
    
    .admin-table {
        border-radius: 12px;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 12px 14px;
    }
    
    .admin-table .title-cell {
        max-width: 180px;
    }
    
    .table-actions {
        flex-direction: column;
        gap: 6px;
    }
    
    .table-action-btn {
        width: 100%;
        justify-content: center;
    }
    
    .admin-toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .admin-toolbar h1 {
        font-size: 1.2rem;
    }
    
    .admin-toolbar .btn {
        width: 100%;
        justify-content: center;
    }
}

svg.feather {
    width: 1em;
    height: 1em;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    vertical-align: middle;
}

.admin-sidebar a svg.feather {
    width: 16px;
    height: 16px;
    margin-right: 8px;
}

.lang-tabs-container {
    margin-bottom: 24px;
}

.lang-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-tertiary);
    padding: 4px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    overflow-x: auto;
    scrollbar-width: none;
}

.lang-tabs::-webkit-scrollbar {
    display: none;
}

.lang-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-tertiary);
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    flex-shrink: 0;
}

.lang-tab:hover {
    color: var(--text-secondary);
    background: var(--bg-tertiary);
}

.lang-tab.active {
    color: var(--accent-primary);
    background: var(--bg-secondary);
    box-shadow: var(--shadow-xs);
}

.lang-tab .lang-flag {
    font-size: 1.1rem;
    line-height: 1;
}

.lang-tab .lang-name {
    font-weight: 600;
}

.lang-tab .lang-status {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--border-medium);
    transition: background var(--transition-fast);
}

.lang-tab.active .lang-status {
    background: var(--accent-success);
}

.lang-tab.has-content .lang-status {
    background: var(--accent-success);
}

.lang-tab.active.has-content .lang-status {
    background: var(--accent-primary);
}

.lang-content {
    display: none;
    animation: fadeIn 0.2s ease;
}

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

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

.lang-field-group {
    margin-bottom: 20px;
}

.lang-field-group:last-child {
    margin-bottom: 0;
}

.lang-field-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.lang-field-label .lang-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--bg-tertiary);
    color: var(--text-tertiary);
    border-radius: var(--radius-full);
}

.lang-field-label .lang-badge .flag {
    font-size: 0.85rem;
}

.lang-required-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 400;
    margin-left: auto;
}

.common-fields-section {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-top: 24px;
    border: 1px solid var(--border-light);
}

.common-fields-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.common-fields-title svg {
    width: 18px;
    height: 18px;
    color: var(--text-tertiary);
}

.cover-upload-section {
    margin-bottom: 20px;
}

.cover-upload-section > label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.cover-upload-area {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    padding: 16px;
}

.cover-preview {
    width: 100%;
    max-height: 300px;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.cover-preview img {
    width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: cover;
    display: block;
}

.cover-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.cover-placeholder:hover {
    color: var(--accent-primary);
    background: rgba(37, 99, 235, 0.05);
}

.cover-placeholder svg {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.cover-placeholder span {
    font-size: 0.875rem;
}

.cover-upload-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.cover-hint {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 8px;
    margin-bottom: 0;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.8rem;
}

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

.upload-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-right: 6px;
}

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

@media (max-width: 640px) {
    .lang-tabs {
        padding: 3px;
    }
    
    .lang-tab {
        padding: 8px 12px;
        font-size: 0.8rem;
    }
    
    .lang-tab .lang-name {
        display: none;
    }
    
    .lang-tab .lang-flag {
        font-size: 1.25rem;
    }
}

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--text-secondary);
    position: relative;
    overflow: hidden;
}

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

.theme-toggle svg {
    width: 18px;
    height: 18px;
    position: absolute;
    transition: all 0.3s ease;
}

.theme-toggle .sun-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.theme-toggle .moon-icon {
    opacity: 0;
    transform: rotate(-90deg) scale(0.5);
}

[data-theme="dark"] .theme-toggle .sun-icon {
    opacity: 0;
    transform: rotate(90deg) scale(0.5);
}

[data-theme="dark"] .theme-toggle .moon-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.lang-dropdown {
    position: relative;
}

.lang-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 10px 10px;
    border: none;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
}

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

.lang-current {
    text-transform: uppercase;
}

.lang-menu {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 140px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all var(--transition-fast);
    z-index: 1000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.lang-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: block;
    padding: 10px 14px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    transition: all var(--transition-fast);
}

.lang-option:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.lang-option.active {
    background: var(--accent-primary);
    color: white;
}

.admin-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-table th {
    background: var(--bg-tertiary);
}

.admin-table {
    background: var(--bg-secondary);
}

.admin-section {
    background: var(--bg-secondary);
}

.admin-stat-card {
    background: var(--bg-secondary);
}

.admin-form-card {
    background: var(--bg-secondary);
}

.admin-search input {
    background: var(--input-bg);
}

[data-theme="dark"] .admin-filter-bar {
    background: var(--bg-tertiary);
    border-color: var(--border-light);
}

[data-theme="dark"] .admin-filter-bar .clear-link {
    color: var(--text-tertiary);
}

[data-theme="dark"] .admin-filter-bar .clear-link:hover {
    color: var(--accent-primary);
}

.status-published {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.status-draft {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

[data-theme="dark"] .status-published {
    background: rgba(16, 185, 129, 0.2);
}

[data-theme="dark"] .status-draft {
    background: rgba(245, 158, 11, 0.2);
}

[data-theme="dark"] .status-featured {
    background: rgba(139, 92, 246, 0.2);
}

[data-theme="dark"] .table-action-btn.edit {
    background: rgba(88, 166, 255, 0.1);
    border-color: rgba(88, 166, 255, 0.2);
}

[data-theme="dark"] .table-action-btn.view {
    background: rgba(139, 148, 158, 0.1);
    border-color: rgba(139, 148, 158, 0.2);
}

[data-theme="dark"] .table-action-btn.delete {
    background: rgba(248, 81, 73, 0.1);
    border-color: rgba(248, 81, 73, 0.2);
}

[data-theme="dark"] .admin-table tbody tr:hover td:first-child::before {
    background: var(--accent-primary);
}

[data-theme="dark"] .admin-table .title-cell a::after {
    background: var(--accent-primary);
}

.admin-empty {
    color: var(--text-muted);
}

.admin-pagination a:hover {
    background: var(--bg-tertiary);
}

.admin-pagination .active {
    background: var(--accent-primary);
}

code {
    background: var(--code-bg);
    color: var(--text-primary);
}

[data-theme="dark"] .form-control {
    background: var(--input-bg);
    color: var(--text-primary);
    border-color: var(--border-light);
}

[data-theme="dark"] .form-control:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.2);
}

[data-theme="dark"] .form-control::placeholder {
    color: var(--text-tertiary);
}

[data-theme="dark"] textarea {
    background: var(--input-bg);
    color: var(--text-primary);
}

[data-theme="dark"] select.form-control {
    background: var(--input-bg);
    color: var(--text-primary);
}

[data-theme="dark"] .admin-header-actions a {
    color: var(--text-secondary);
}

[data-theme="dark"] .admin-header-actions a:hover {
    color: var(--text-primary);
}

[data-theme="dark"] .admin-table a {
    color: var(--accent-primary);
}

[data-theme="dark"] .admin-table a:hover {
    color: var(--accent-secondary);
}

[data-theme="dark"] .admin-section a:not(.btn) {
    color: var(--accent-primary);
}

[data-theme="dark"] .admin-section a:not(.btn):hover {
    color: var(--accent-secondary);
}

[data-theme="dark"] .admin-form-card a:not(.btn) {
    color: var(--accent-primary);
}

[data-theme="dark"] .admin-form-card a:not(.btn):hover {
    color: var(--accent-secondary);
}

[data-theme="dark"] .btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

[data-theme="dark"] .btn-secondary:hover {
    background: var(--border-light);
}

[data-theme="dark"] .admin-search input {
    background: var(--input-bg);
    color: var(--text-primary);
    border-color: var(--border-light);
}

[data-theme="dark"] .admin-search input::placeholder {
    color: var(--text-tertiary);
}

[data-theme="dark"] .alert {
    border-color: var(--border-light);
}

[data-theme="dark"] .lang-tab {
    color: var(--text-tertiary);
}

[data-theme="dark"] .lang-tab:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

[data-theme="dark"] .lang-tab.active {
    color: var(--accent-primary);
    background: var(--bg-secondary);
}

[data-theme="dark"] .lang-tab.has-content .lang-status {
    background: var(--accent-success);
}

[data-theme="dark"] .common-fields-section {
    background: var(--bg-tertiary);
    border-color: var(--border-light);
}

[data-theme="dark"] .common-fields-title {
    color: var(--text-primary);
}

[data-theme="dark"] .lang-field-label {
    color: var(--text-primary);
}

[data-theme="dark"] .lang-badge {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

[data-theme="dark"] .lang-required-hint {
    color: var(--text-tertiary);
}

[data-theme="dark"] .admin-stat-card {
    border-color: var(--border-light);
}

[data-theme="dark"] .admin-stat-value {
    color: var(--text-primary);
}

[data-theme="dark"] .admin-stat-label {
    color: var(--text-tertiary);
}

[data-theme="dark"] .admin-toolbar h1 {
    color: var(--text-primary);
}

[data-theme="dark"] .admin-section h2 {
    color: var(--text-primary);
}

[data-theme="dark"] .admin-section h3 {
    color: var(--text-primary);
}

[data-theme="dark"] .form-group label {
    color: var(--text-primary);
}

[data-theme="dark"] .admin-empty {
    color: var(--text-tertiary);
}

[data-theme="dark"] .admin-pagination a {
    color: var(--text-secondary);
}

[data-theme="dark"] .admin-pagination a:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

[data-theme="dark"] .admin-form-card {
    border-color: var(--border-light);
}

[data-theme="dark"] .admin-table td {
    border-color: var(--border-light);
}

[data-theme="dark"] .admin-table th {
    border-color: var(--border-light);
    color: var(--text-primary);
}

[data-theme="dark"] .admin-table {
    border-color: var(--border-light);
}

.content-editor-wrapper {
    position: relative;
}

.content-editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    border-bottom: none;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    align-items: center;
}

.toolbar-group {
    display: flex;
    gap: 4px;
    align-items: center;
}

.toolbar-divider {
    width: 1px;
    height: 24px;
    background: var(--border-light);
    margin: 0 4px;
}

.md-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: transparent;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

.md-btn:active {
    transform: scale(0.95);
}

.md-btn svg {
    width: 16px;
    height: 16px;
}

.content-editor-wrapper .form-control {
    border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.btn-insert-image {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.875rem;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-insert-image:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.btn-insert-image:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-insert-image svg {
    flex-shrink: 0;
}

.hidden-image-input,
input[type="file"].hidden-image-input {
    display: none !important;
    visibility: hidden;
    width: 0;
    height: 0;
    position: absolute;
    left: -9999px;
}

.upload-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid var(--border-light);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.lang-content-input.dragover {
    border-color: var(--accent-primary);
    background: rgba(37, 99, 235, 0.05);
    outline: 2px dashed var(--accent-primary);
    outline-offset: -2px;
}

[data-theme="dark"] .content-editor-toolbar {
    background: var(--bg-tertiary);
    border-color: var(--border-light);
}

[data-theme="dark"] .btn-insert-image {
    background: var(--bg-secondary);
    border-color: var(--border-light);
    color: var(--text-secondary);
}

[data-theme="dark"] .btn-insert-image:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

[data-theme="dark"] .lang-content-input.dragover {
    background: rgba(88, 166, 255, 0.1);
}
