/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
    color: #0f172a;
    background: #f1f5f9;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; font-size: inherit; }
code { font-family: "SF Mono", "Fira Code", "Consolas", monospace; }

/* ===== Variables ===== */
:root {
    --primary: #4f46e5;
    --primary-dark: #4338ca;
    --primary-light: #e0e7ff;
    --primary-lighter: #f0f0ff;
    --bg: #f1f5f9;
    --bg-hover: #f1f5f9;
    --surface: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --success: #10b981;
    --success-bg: #d1fae5;
    --warning: #f59e0b;
    --danger: #ef4444;
    --danger-bg: #fee2e2;
    --radius: 8px;
    --radius-lg: 12px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --sidebar-width: 260px;
}

/* ===== Layout ===== */
.app-layout { display: flex; min-height: 100vh; }
.main-content { flex: 1; margin-left: var(--sidebar-width); padding: 32px 32px 48px; min-width: 0; }

/* ===== Sidebar ===== */
.sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: var(--sidebar-width);
    background: var(--surface);
    border-right: 1px solid var(--border);
    display: flex; flex-direction: column;
    z-index: 100;
}
.sidebar-header { padding: 24px 20px; border-bottom: 1px solid var(--border); }
.logo { display: flex; align-items: center; gap: 10px; color: var(--primary); }
.logo-icon { flex-shrink: 0; }
.logo-text { font-size: 18px; font-weight: 700; color: var(--text-primary); }
.sidebar-nav { flex: 1; padding: 16px 12px; overflow-y: auto; }
.nav-section {
    font-size: 11px; font-weight: 600; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.05em;
    padding: 16px 12px 8px;
}
.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; border-radius: var(--radius);
    color: var(--text-secondary); font-size: 14px; font-weight: 500;
    transition: all 0.2s; margin-bottom: 2px;
}
.nav-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-item.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.nav-item svg { flex-shrink: 0; }

.sidebar-footer { padding: 16px 12px; border-top: 1px solid var(--border); }
.user-card { display: flex; align-items: center; gap: 12px; padding: 8px 12px; }
.user-avatar {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: 16px; flex-shrink: 0;
}
.user-meta { flex: 1; min-width: 0; }
.user-name { font-size: 14px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 12px; color: var(--text-secondary); }
.sidebar-actions { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 8px 12px; }
.btn-text { font-size: 13px; color: var(--text-secondary); padding: 4px 8px; border-radius: 4px; transition: all 0.2s; }
.btn-text:hover { background: var(--bg-hover); color: var(--text-primary); }
.btn-text-danger:hover { color: var(--danger); }
.action-divider { color: var(--border); }

/* ===== Page Header ===== */
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; gap: 16px; }
.page-title { font-size: 24px; font-weight: 700; color: var(--text-primary); }
.page-subtitle { font-size: 14px; color: var(--text-secondary); margin-top: 4px; }

/* ===== Buttons ===== */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 20px; border-radius: var(--radius);
    font-size: 14px; font-weight: 600;
    transition: all 0.2s; white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:disabled { background: var(--text-muted); cursor: not-allowed; }
.btn-secondary { background: var(--surface); color: var(--text-secondary); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg-hover); color: var(--text-primary); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-block { width: 100%; justify-content: center; }

.icon-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 32px; height: 32px; border-radius: var(--radius);
    color: var(--text-secondary); transition: all 0.2s;
}
.icon-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.icon-btn-danger:hover { background: var(--danger-bg); color: var(--danger); }
.action-buttons { display: flex; align-items: center; gap: 4px; }

/* ===== Stats Grid ===== */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 32px; }
.stat-card {
    display: flex; align-items: center; gap: 16px;
    padding: 20px; background: var(--surface);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}
.stat-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.stat-icon-total { background: var(--primary-light); color: var(--primary); }
.stat-icon-completed { background: var(--success-bg); color: var(--success); }
.stat-icon-progress { background: #fef3c7; color: var(--warning); }
.stat-icon-new { background: #dbeafe; color: #3b82f6; }
.stat-value { font-size: 28px; font-weight: 700; color: var(--text-primary); line-height: 1.2; }
.stat-label { font-size: 13px; color: var(--text-secondary); }

/* ===== Section Header ===== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}
.section-header h2 { font-size: 18px; font-weight: 600; color: var(--text-primary); }

/* ===== Sort Control ===== */
.sort-control {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-secondary);
}
.sort-control label { white-space: nowrap; }
.sort-control select {
    padding: 6px 28px 6px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    transition: border-color 0.2s;
}
.sort-control select:hover { border-color: var(--primary); }
.sort-control select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1); }

/* ===== Course Grid ===== */
.course-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.course-card {
    background: var(--surface); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm); border: 1px solid var(--border);
    overflow: hidden; transition: all 0.3s; display: flex; flex-direction: column;
}
.course-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.course-cover { height: 120px; position: relative; display: flex; align-items: flex-end; padding: 16px; }
.course-cover-text { color: rgba(255,255,255,0.9); font-size: 13px; font-weight: 600; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.course-status-badge {
    position: absolute; top: 12px; right: 12px;
    padding: 4px 10px; border-radius: 20px;
    font-size: 11px; font-weight: 600; backdrop-filter: blur(4px);
}
.badge-completed { background: rgba(16,185,129,0.9); color: #fff; }
.badge-progress { background: rgba(245,158,11,0.9); color: #fff; }
.badge-new { background: rgba(255,255,255,0.85); color: var(--text-primary); }
.badge-paid { background: rgba(220,38,38,0.9); color: #fff; }
.course-body { padding: 20px; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.course-title { font-size: 16px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.course-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.5; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; flex: 1; }

/* ===== Progress Bar ===== */
.progress-bar { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--primary); border-radius: 3px; transition: width 0.3s; }
.progress-bar-lg { height: 8px; }
.progress-text { font-size: 12px; color: var(--text-secondary); }

/* ===== Empty State ===== */
.empty-state { text-align: center; padding: 64px 20px; color: var(--text-muted); }
.empty-state svg { margin-bottom: 16px; color: var(--border); }
.empty-state h3 { font-size: 18px; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }
.empty-state p { font-size: 14px; }
.empty-state-sm { padding: 40px 20px; text-align: center; color: var(--text-muted); }

/* ===== Forms ===== */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%; padding: 10px 12px; border: 1px solid var(--border);
    border-radius: var(--radius); font-size: 14px; color: var(--text-primary);
    background: var(--surface); transition: all 0.2s;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
    outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-lighter);
}
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--text-muted); }
.form-group textarea { resize: vertical; min-height: 80px; }
.form-hint { display: block; font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.required { color: var(--danger); }
.form-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; }
.form-error { color: var(--danger); font-size: 13px; margin-bottom: 16px; min-height: 20px; }

/* ===== Color Picker ===== */
.color-picker { display: flex; gap: 10px; flex-wrap: wrap; }
.color-picker input[type="radio"] { display: none; }
.color-picker label {
    width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
    transition: all 0.2s; border: 3px solid transparent; margin: 0;
}
.color-picker input[type="radio"]:checked + label {
    border-color: var(--text-primary); transform: scale(1.1);
}

/* ===== Table Card ===== */
.table-card {
    background: var(--surface); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm); border: 1px solid var(--border);
    overflow: hidden; overflow-x: auto;
}
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
    text-align: left; padding: 14px 16px; font-size: 12px; font-weight: 600;
    color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.05em;
    background: #f8fafc; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.data-table td { padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: 14px; vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: background 0.2s; }
.data-table tbody tr:hover { background: #f8fafc; }
.empty-row td { padding: 40px; }

.user-cell { display: flex; align-items: center; gap: 10px; }
.user-avatar-sm { width: 32px; height: 32px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; flex-shrink: 0; }
.user-cell-name { font-weight: 500; }
.username-code { font-size: 13px; color: var(--text-secondary); background: #f1f5f9; padding: 2px 8px; border-radius: 4px; }

.course-cell { display: flex; align-items: center; gap: 12px; }
.course-color-dot { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }
.course-cell-title { font-weight: 600; color: var(--text-primary); }
.course-cell-desc { font-size: 12px; color: var(--text-muted); max-width: 250px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== Badges ===== */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.badge-purple { background: #f3e8ff; color: #7c3aed; }
.badge-blue { background: #dbeafe; color: #2563eb; }
.badge-green { background: var(--success-bg); color: #065f46; }
.badge-gray { background: #f3f4f6; color: #6b7280; }

.text-muted { color: var(--text-muted); font-size: 13px; }
.course-count { font-weight: 600; color: var(--text-primary); }

/* ===== Modal ===== */
.modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4); backdrop-filter: blur(2px);
    display: none; align-items: center; justify-content: center;
    z-index: 1000; padding: 20px;
}
.modal-overlay.active { display: flex; }
.modal {
    background: var(--surface); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md); width: 100%; max-width: 500px;
    max-height: 90vh; overflow-y: auto; animation: modalSlide 0.2s ease;
}
.modal-sm { max-width: 400px; }
@keyframes modalSlide { from { transform: translateY(-20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.modal-header h3 { font-size: 18px; font-weight: 600; }
.modal-close { font-size: 24px; color: var(--text-muted); padding: 4px; line-height: 1; }
.modal-close:hover { color: var(--text-primary); }
.modal-body { padding: 24px; }
.confirm-message { font-size: 15px; color: var(--text-primary); }

/* ===== Toast ===== */
#toast-container { position: fixed; top: 20px; right: 20px; z-index: 2000; display: flex; flex-direction: column; gap: 10px; }
.toast {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 20px; border-radius: var(--radius);
    box-shadow: var(--shadow-md); font-size: 14px; font-weight: 500;
    animation: toastSlide 0.3s ease; min-width: 280px;
}
@keyframes toastSlide { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
.toast-success { background: var(--success); color: #fff; }
.toast-error { background: var(--danger); color: #fff; }
.toast-info { background: var(--primary); color: #fff; }

/* ===== Login Page ===== */
.login-page { background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #db2777 100%); min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-container { width: 100%; max-width: 420px; padding: 20px; }
.login-card {
    background: var(--surface); border-radius: 16px;
    padding: 40px; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
}
.login-header { text-align: center; margin-bottom: 32px; }
.login-logo { color: var(--primary); margin-bottom: 16px; display: flex; justify-content: center; }
.login-header h1 { font-size: 24px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.login-subtitle { font-size: 14px; color: var(--text-secondary); }
.login-card .btn-block { padding: 12px; font-size: 15px; }
.register-link { text-align: center; margin-top: 20px; font-size: 14px; color: var(--text-secondary); }
.register-link a { color: var(--primary); font-weight: 600; }
.register-link a:hover { text-decoration: underline; }

/* ===== Pending Badge ===== */
.badge-orange { background: #fef3c7; color: #d97706; }
.badge-red { background: var(--danger-bg); color: var(--danger); }

/* ===== Course Viewer (overrides in EJS) ===== */

/* ===== Error Page ===== */
.error-page { background: var(--bg); min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.error-container { text-align: center; }
.error-code { font-size: 96px; font-weight: 800; color: var(--primary); line-height: 1; margin-bottom: 16px; }
.error-message { font-size: 18px; color: var(--text-secondary); margin-bottom: 24px; }

/* ===== Upload Page ===== */
.upload-container { max-width: 720px; margin: 0 auto; }
.upload-tips {
    background: var(--primary-lighter); border: 1px solid var(--primary-light);
    border-radius: var(--radius-lg); padding: 20px 24px; margin-bottom: 24px;
}
.upload-tips h3 { font-size: 15px; font-weight: 600; color: var(--primary); margin-bottom: 10px; }
.upload-tips ul { padding-left: 20px; }
.upload-tips li { font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; line-height: 1.6; }
.upload-tips code { background: #fff; padding: 1px 6px; border-radius: 3px; font-size: 12px; color: var(--primary); }

.upload-form {
    background: var(--surface); border-radius: var(--radius-lg);
    padding: 32px; box-shadow: var(--shadow-sm); border: 1px solid var(--border);
}

.dropzone {
    border: 2px dashed var(--border); border-radius: var(--radius-lg);
    padding: 40px 20px; text-align: center; cursor: pointer;
    transition: all 0.2s; background: #f8fafc;
}
.dropzone:hover, .dropzone.drag-over { border-color: var(--primary); background: var(--primary-lighter); }
.dropzone-content { color: var(--text-muted); }
.dropzone-text { font-size: 15px; font-weight: 500; margin-top: 12px; color: var(--text-secondary); }
.dropzone-hint { font-size: 13px; margin-top: 4px; }
.dropzone-link { color: var(--primary); font-weight: 500; }
.dropzone-file {
    display: flex; align-items: center; justify-content: space-between;
    padding: 8px 0; text-align: left;
}
.file-info { display: flex; align-items: center; gap: 12px; }
.file-info svg { color: var(--primary); flex-shrink: 0; }
.file-name { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.file-size { font-size: 12px; color: var(--text-muted); }

.upload-progress { margin-top: 16px; }

.upload-success {
    background: var(--surface); border-radius: var(--radius-lg);
    padding: 48px 32px; text-align: center; box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}
.success-icon { color: var(--success); display: flex; justify-content: center; margin-bottom: 16px; }
.upload-success h3 { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.upload-success p { font-size: 14px; color: var(--text-secondary); margin-bottom: 24px; }
.success-actions { display: flex; gap: 12px; justify-content: center; }

/* ===== Mobile Menu Toggle ===== */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 200;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    color: var(--text-primary);
    align-items: center;
    justify-content: center;
}
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s;
}

/* ===== Category Styles ===== */
.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}
.category-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    background: var(--surface);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border: 1px solid var(--border);
    transition: all 0.2s;
    cursor: pointer;
}
.category-tab:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.category-tab.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.category-tab-count {
    display: inline-block;
    min-width: 20px;
    padding: 2px 6px;
    border-radius: 10px;
    background: var(--border);
    color: var(--text-secondary);
    font-size: 12px;
    text-align: center;
    line-height: 1;
}
.category-tab.active .category-tab-count {
    background: rgba(255,255,255,0.25);
    color: #fff;
}

.category-section { margin-bottom: 8px; }
.category-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
}
.category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: box-shadow 0.2s;
}
.category-item:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.category-item-info { flex: 1; min-width: 0; }
.category-item-name {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
    margin-bottom: 4px;
}
.category-item-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .mobile-menu-toggle { display: flex; }
    .sidebar { transform: translateX(-100%); transition: transform 0.3s; box-shadow: var(--shadow-md); }
    .sidebar.open { transform: translateX(0); }
    .sidebar.open ~ .sidebar-overlay { display: block; opacity: 1; }
    .main-content { margin-left: 0; padding: 60px 16px 48px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .page-header { flex-direction: column; align-items: flex-start; }
    .login-card { padding: 28px 20px; }
    .modal { max-width: calc(100vw - 32px); }
}

/* ===== Messages (留言管理) ===== */
.messages-list { display: flex; flex-direction: column; gap: 16px; }
.message-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: 12px; padding: 20px;
    transition: box-shadow 0.2s;
}
.message-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.message-header {
    display: flex; justify-content: space-between; align-items: flex-start;
    margin-bottom: 12px;
}
.message-user { display: flex; align-items: center; gap: 12px; }
.message-name { font-weight: 600; font-size: 15px; color: var(--text-primary); margin-bottom: 2px; }
.message-contact { font-size: 13px; color: var(--text-secondary); }
.message-contact a { color: var(--primary); text-decoration: none; }
.message-contact a:hover { text-decoration: underline; }
.message-meta { display: flex; align-items: center; gap: 12px; }
.message-content {
    font-size: 14px; line-height: 1.6; color: var(--text-primary);
    padding: 12px 16px; background: var(--bg); border-radius: 8px;
    white-space: pre-wrap; word-wrap: break-word;
}
.empty-state {
    text-align: center; padding: 60px 20px;
}

/* ===== Footer ===== */
.site-footer {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    padding: 6px 20px;
    font-size: 12px;
    color: var(--text-muted);
    background: transparent;
    border-top: none;
    z-index: 999;
    white-space: nowrap;
    pointer-events: auto;
}
.site-footer a { color: var(--text-secondary); text-decoration: none; }
.site-footer a:hover { color: var(--primary); }
