/* Flarum风格论坛样式 */
:root {
    --primary: #4D90FE;
    --primary-dark: #3a7bd5;
    --text: #2c3e50;
    --text-light: #7f8c8d;
    --bg: #f5f7f9;
    --bg-white: #ffffff;
    --border: #e1e4e8;
    --success: #2ecc71;
    --danger: #e74c3c;
    --warning: #f39c12;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --radius: 8px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

/* 顶部导航 */
.navbar {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.navbar-brand {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.navbar-brand:hover { color: var(--primary-dark); }

.navbar-menu { display: flex; align-items: center; gap: 16px; }
.navbar-menu a { color: var(--text); padding: 8px 12px; border-radius: var(--radius); }
.navbar-menu a:hover { background: var(--bg); color: var(--primary); }

/* 导航下拉菜单 */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
    border-radius: var(--radius);
    transition: all 0.15s;
}

.nav-dropdown-toggle:hover {
    background: var(--bg);
    color: var(--primary);
}

.nav-dropdown-toggle i {
    font-size: 12px;
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    min-width: 180px;
    z-index: 1000;
    overflow: hidden;
}

.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    color: var(--text);
    text-decoration: none;
    font-size: 14px;
    transition: background 0.15s;
}

.nav-dropdown-item:hover {
    background: var(--bg);
    color: var(--primary);
}

.nav-dropdown-item.disabled {
    color: var(--text-light);
    cursor: default;
}

.nav-dropdown-item.disabled:hover {
    background: transparent;
    color: var(--text-light);
}

/* 搜索框样式 */
.search-form {
    margin: 0 16px;
    width: 200px;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: all 0.2s;
    width: 100%;
}

.search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(77,144,254,0.1);
}

.search-input {
    border: none;
    background: transparent;
    padding: 8px 12px;
    font-size: 14px;
    color: var(--text);
    width: 100%;
    outline: none;
}

.search-input::placeholder {
    color: var(--text-light);
}

.search-button {
    border: none;
    background: transparent;
    padding: 8px 12px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.2s;
}

.search-button:hover {
    color: var(--primary);
}

/* 响应式设计 */
@media (max-width: 992px) {
    .search-form {
        max-width: 400px;
        margin: 0 16px;
    }
}

@media (max-width: 768px) {
    .search-input {
        width: 100px;
    }

    .search-form {
        max-width: 300px;
        margin: 0 8px;
    }

    .navbar-menu {
        gap: 8px;
    }
}

@media (max-width: 576px) {
    .navbar {
        padding: 0 16px;
    }

    .search-form {
        max-width: 200px;
        margin: 0 8px;
    }

    .search-input {
        font-size: 12px;
        padding: 6px 8px;
    }

    .search-button {
        padding: 6px 8px;
    }

    .navbar-menu {
        gap: 4px;
    }

    .navbar-menu a {
        padding: 6px 8px;
        font-size: 12px;
    }

    .user-name {
        display: none;
    }
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-secondary { background: var(--bg); color: var(--text); }
.btn-secondary:hover { background: var(--border); }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #c0392b; }
.btn-sm { padding: 4px 10px; font-size: 12px; }

/* 主容器 */
.container {
    width: 75%;
    max-width: none;
    margin: 0 auto;
    padding: 24px;
}

.main-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 24px;
}

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

/* 侧边栏 */
.sidebar {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow);
    height: fit-content;
    position: sticky;
    top: 80px;
}

.sidebar-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-list { list-style: none; }
.category-item { margin-bottom: 4px; }
.category-item a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius);
    color: var(--text);
    transition: all 0.15s;
    text-decoration: none;
}
.category-item a:hover, .category-item a.active {
    background: var(--bg);
}
.category-item.parent-category > a {
    font-weight: 600;
}
.category-item.child-category {
    padding-left: 0;
}
.category-item.child-category > a {
    font-size: 14px;
    padding-left: 36px;
}

/* 分类折叠按钮 */
.category-toggle {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-light);
    transition: all 0.2s;
    margin-right: 4px;
}

.category-toggle:hover {
    color: var(--primary);
}

.category-toggle i {
    font-size: 10px;
    transition: transform 0.2s;
}

/* 子分类列表 */
.category-children {
    list-style: none;
    display: none;
    margin: 0;
    padding: 0;
}

.category-item.expanded > .category-children {
    display: block;
}

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

.category-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

/* 帖子列表 */
.post-list {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.post-item {
    display: flex;
    align-items: flex-start;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    gap: 16px;
    transition: background 0.15s;
    position: relative;
}
.post-item:last-child { border-bottom: none; }
.post-item:hover { background: #fafbfc; }

.post-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 10;
}

.post-action-btn {
    background: transparent;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 4px 8px;
    font-size: 14px;
    border-radius: 4px;
    opacity: 0;
    transition: opacity 0.15s, background 0.15s;
}

.post-item:hover .post-action-btn {
    opacity: 1;
}

.post-action-btn:hover {
    background: var(--bg);
    color: var(--text);
}

.post-action-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    min-width: 150px;
    z-index: 9999;
    overflow: hidden;
}

.post-action-menu button {
    display: block;
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    color: var(--text);
    cursor: pointer;
    padding: 8px 12px;
    font-size: 14px;
    transition: background 0.15s;
}

.post-action-menu button:hover {
    background: var(--bg);
    color: var(--primary);
}

.post-action-menu button i {
    margin-right: 8px;
    width: 16px;
    text-align: center;
}

.post-avatar {
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    border-radius: 50%;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--primary);
    flex-shrink: 0;
    overflow: hidden;
}

.post-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-avatar a {
    display: block;
    width: 100%;
    height: 100%;
}

.post-content { flex: 1; min-width: 0; }

.post-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.post-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}
.post-title a { color: var(--text); }
.post-title a:hover { color: var(--primary); }

.post-badge {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 600;
}
.badge-super-sticky { background: #e74c3c; color: white; }
.badge-category-sticky { background: var(--warning); color: white; }
.badge-sticky { background: var(--warning); color: white; }
.badge-lock { background: var(--text-light); color: white; }

.post-meta {
    font-size: 13px;
    color: var(--text-light);
}

.post-category {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--bg);
    color: var(--text-light);
}

.post-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tag {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 12px;
    background: var(--bg);
    color: var(--text-light);
    transition: all 0.15s;
}
.tag:hover { background: var(--primary); color: white; }

.post-stats {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-light);
    flex-shrink: 0;
    margin-right: 32px;
}
.post-stats span { display: flex; align-items: center; gap: 4px; }

/* 排序选择器 */
.sort-selector {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.sort-selector select {
    padding: 6px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-white);
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.15s;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237f8c8d' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 28px;
}

.sort-selector select:hover {
    border-color: var(--primary);
}

.sort-selector select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(77,144,254,0.1);
}

/* 帖子详情 */
.post-detail {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
}

.post-detail-header {
    border-bottom: 1px solid var(--border);
    padding-bottom: 16px;
    margin-bottom: 20px;
}

.post-detail-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 12px;
}

.post-detail-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text-light);
    font-size: 14px;
}

.post-detail-content {
    font-size: 15px;
    line-height: 1.8;
    padding: 20px 0;
    min-height: 200px;
}

.post-detail-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 12px 0;
    border-radius: var(--radius);
}

/* Markdown内容区图片样式 */
.markdown-content img,
.markdown-preview img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 12px 0;
    border-radius: var(--radius);
}

.post-detail-footer {
    border-top: 1px solid var(--border);
    padding-top: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 回复 */
.replies-section { margin-top: 24px; }
.replies-header {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.reply-item {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
}

.reply-author {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.reply-avatar {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    border-radius: 50%;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.reply-content {
    line-height: 1.7;
}

.reply-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 8px 0;
    border-radius: var(--radius);
}

.reply-content code {
    background: rgba(0,0,0,0.05);
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9em;
}

.reply-content pre {
    background: rgba(0,0,0,0.05);
    padding: 12px;
    border-radius: var(--radius);
    overflow-x: auto;
    margin: 8px 0;
}

.reply-content pre code {
    background: none;
    padding: 0;
}

.reply-content blockquote {
    border-left: 3px solid var(--primary);
    padding-left: 12px;
    margin: 8px 0;
    color: var(--text-light);
}

.reply-content ul,
.reply-content ol {
    margin: 8px 0 8px 20px;
}

.reply-time { font-size: 12px; color: var(--text-light); margin-top: 8px; }

/* 评论区域展开/收起 */
.reply-form-container {
    margin-top: 20px;
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 0;
    box-shadow: var(--shadow);
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: all 0.3s ease;
}

.reply-form-container.expanded {
    max-height: 800px;
    opacity: 1;
    padding: 20px;
}

.reply-form-container .markdown-toolbar {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: var(--radius) var(--radius) 0 0;
    background: var(--bg);
    flex-wrap: wrap;
}

.reply-form-container .markdown-toolbar button {
    padding: 5px 8px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--bg-white);
    color: var(--text);
    cursor: pointer;
    transition: all 0.15s;
    font-size: 12px;
}

.reply-form-container .markdown-toolbar button:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.reply-form-container #replyTextarea {
    border-top: none;
    border-radius: 0 0 var(--radius) var(--radius);
    min-height: 200px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

/* 表单 */
.form-group { margin-bottom: 20px; }
.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text);
}
.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    transition: border-color 0.2s;
}
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(77,144,254,0.1);
}
textarea.form-control { min-height: 150px; resize: vertical; }

.form-hint { font-size: 12px; color: var(--text-light); margin-top: 4px; }

/* 消息提示 */
.flash-messages { margin-bottom: 20px; }
.flash {
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.flash-success { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.flash-error { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.flash-warning { background: #fff3cd; color: #856404; border: 1px solid #ffeeba; }

/* 登录/注册 */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}

.auth-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 100%;
    max-width: 400px;
    padding: 40px;
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
}

.auth-subtitle {
    color: var(--text-light);
    font-size: 14px;
}

/* 用户信息 */
.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    height: 32px;
}

.user-info a {
    display: flex;
    align-items: center;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar img {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.user-name {
    line-height: 32px;
}

.user-avatar {
    display: block;
}

.user-avatar a {
    display: block;
    width: 100%;
    height: 100%;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.user-avatar a {
    display: block;
    width: 100%;
    height: 100%;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.user-name {
    font-weight: 500;
    color: var(--text);
}

/* 用户称号 */
.user-title {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-left: 8px;
    white-space: nowrap;
}

/* 帖子中的称号 */
.post-author-title {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 6px;
    white-space: nowrap;
}

/* 称号选项 */
.title-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.15s;
}

.title-option:hover {
    background: var(--bg);
}

.title-option input[type="radio"] {
    margin: 0;
}

.title-option .title-preview {
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.title-option .title-desc {
    color: var(--text-light);
    font-size: 13px;
    margin-left: auto;
}

/* 分页 */
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 20px; }
.pagination a, .pagination span {
    padding: 8px 14px;
    border-radius: var(--radius);
    background: var(--bg-white);
    color: var(--text);
    font-size: 14px;
}
.pagination a:hover { background: var(--primary); color: white; }
.pagination .active { background: var(--primary); color: white; }

/* 管理页面 */
.admin-page {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.admin-title { font-size: 20px; font-weight: 600; }

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

.admin-table th, .admin-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.admin-table th {
    font-weight: 600;
    color: var(--text-light);
    font-size: 13px;
    text-transform: uppercase;
}

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

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}

.empty-state-icon {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text);
}

/* 标签云 */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px;
}

.tag-cloud .tag {
    background: var(--bg);
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
}

.tag-cloud .tag:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-1px);
}

/* 选择框 - 隐藏原生箭头 */
select.form-control {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237f8c8d' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

/* 主题切换按钮 */
.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius);
    color: var(--text);
    font-size: 18px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.theme-toggle:hover {
    background: var(--bg);
    color: var(--primary);
}

/* ==================== 暗色模式 ==================== */
[data-theme="dark"] {
    --text: #e4e6eb;
    --text-light: #b0b3b8;
    --bg: #18191c;
    --bg-white: #242526;
    --border: #3e4042;
    --shadow: 0 2px 8px rgba(0,0,0,0.3);
}

[data-theme="dark"] body {
    background: var(--bg);
}

[data-theme="dark"] .navbar {
    background: var(--bg-white);
    border-bottom-color: var(--border);
}

[data-theme="dark"] .navbar-brand {
    color: var(--primary);
}

[data-theme="dark"] .sidebar {
    background: var(--bg-white);
}

[data-theme="dark"] .post-list,
[data-theme="dark"] .post-detail,
[data-theme="dark"] .reply-item,
[data-theme="dark"] .admin-page {
    background: var(--bg-white);
}

[data-theme="dark"] .post-item:hover {
    background: #2d2e31;
}

[data-theme="dark"] .category-item a:hover,
[data-theme="dark"] .category-item a.active {
    background: #2d2e31;
}

[data-theme="dark"] .btn-secondary {
    background: #3a3b3c;
    color: var(--text);
}

[data-theme="dark"] .btn-secondary:hover {
    background: #4e4f50;
}

[data-theme="dark"] .form-control {
    background: #18191c;
    border-color: var(--border);
    color: var(--text);
}

[data-theme="dark"] .form-control:focus {
    border-color: var(--primary);
}

[data-theme="dark"] select.form-control {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23b0b3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
    color: var(--text);
}

[data-theme="dark"] .flash-success {
    background: #1a3d1c;
    color: #75c379;
    border-color: #2d5a2d;
}

[data-theme="dark"] .flash-error {
    background: #3d1a1a;
    color: #f08a8a;
    border-color: #5a2d2d;
}

[data-theme="dark"] .flash-warning {
    background: #3d3a1a;
    border-color: #5a562d;
}

[data-theme="dark"] .pagination a,
[data-theme="dark"] .pagination span {
    background: var(--bg-white);
    color: var(--text);
}

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

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

[data-theme="dark"] .admin-table tr:hover {
    background: #2d2e31;
}

[data-theme="dark"] code {
    background: #18191c;
    padding: 2px 6px;
    border-radius: 4px;
}
