﻿@charset "UTF-8";
/* ============================================
   康鸿微电子 - 后台管理样式
   ============================================ */

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

body {
    font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    font-size: 14px;
    color: #333;
    background: #f0f2f5;
    line-height: 1.6;
}

a {
    color: #3464BC;
    text-decoration: none;
}

    a:hover {
        color: #2a50a0;
        text-decoration: underline;
    }

ul, ol {
    list-style: none;
}

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

.admin-header {
    background: #fff;
    height: 56px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

    .admin-header .admin-logo {
        font-size: 18px;
        font-weight: 700;
        color: #3464BC;
        white-space: nowrap;
    }

.admin-user {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    color: #666;
}

    .admin-user a {
        color: #666;
    }

        .admin-user a:hover {
            color: #3464BC;
        }

.admin-front-link {
    display: inline-block;
    padding: 4px 12px;
    background: #3464BC;
    color: #fff !important;
    border-radius: 4px;
    font-size: 13px;
    text-decoration: none;
}

    .admin-front-link:hover {
        background: #2a50a0;
        color: #fff !important;
    }

.admin-body {
    display: flex;
    margin-top: 56px;
    min-height: calc(100vh - 56px);
}

.admin-sidebar {
    width: 220px;
    background: #2a50a0;
    flex-shrink: 0;
    position: fixed;
    top: 56px;
    bottom: 0;
    left: 0;
    overflow-y: auto;
}

    .admin-sidebar ul {
        padding: 8px 0;
    }

    .admin-sidebar li a {
        display: block;
        padding: 13px 24px;
        color: rgba(255,255,255,0.85);
        font-size: 14px;
        border-left: 3px solid transparent;
        transition: all 0.2s;
    }

        .admin-sidebar li a:hover {
            background: rgba(255,255,255,0.15);
            color: #fff;
            text-decoration: none;
            border-left-color: #4a82d6;
        }

        .admin-sidebar li a.active {
            background: rgba(74,130,214,0.3);
            color: #fff;
            border-left-color: #4a82d6;
        }

    .admin-sidebar .nav-section {
        padding: 14px 24px 4px;
        font-size: 11px;
        color: rgba(255,255,255,0.5);
        text-transform: uppercase;
        letter-spacing: 1px;
        cursor: default;
        font-weight: 600;
    }

    .admin-sidebar li.nav-child a {
        padding-left: 40px;
        font-size: 13px;
    }

.admin-content {
    flex: 1;
    margin-left: 220px;
    padding: 24px;
    min-width: 0;
}

.page-title {
    font-size: 20px;
    font-weight: 600;
    color: #3464BC;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    align-items: center;
    gap: 12px;
}

    .page-title a {
        font-size: 13px;
        font-weight: 400;
    }

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.dash-card {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    text-align: center;
}

    .dash-card h3 {
        font-size: 14px;
        color: #6b7280;
        font-weight: 500;
        margin-bottom: 12px;
    }

.dash-num {
    font-size: 36px;
    font-weight: 700;
    color: #3464BC;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

    .admin-table thead {
        background: #f8f9fa;
    }

    .admin-table th {
        padding: 12px 14px;
        text-align: left;
        font-weight: 600;
        color: #495057;
        border-bottom: 2px solid #dee2e6;
        white-space: nowrap;
    }

    .admin-table td {
        padding: 10px 14px;
        border-bottom: 1px solid #e9ecef;
        color: #333;
    }

    .admin-table tbody tr:hover {
        background: #f8f9fa;
    }

    .admin-table td.col-content {
        max-width: 300px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .admin-table .col-name {
        width: 28%;
    }

    .admin-table .col-level {
        width: 8%;
    }

    .admin-table .col-seq {
        width: 6%;
    }

    .admin-table .col-image {
        width: 30%;
    }

    .admin-table .col-status {
        width: 8%;
    }

    .admin-table .col-action {
        width: 20%;
    }

.filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.form-inline {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    align-items: center;
    flex-wrap: wrap;
}

.form-area {
    background: #fff;
    border-radius: 8px;
    padding: 28px 32px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    max-width: 700px;
}

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

    .form-group label {
        display: block;
        margin-bottom: 6px;
        font-size: 14px;
        font-weight: 600;
        color: #374151;
    }

    .form-group .hint {
        display: block;
        margin-top: 4px;
        font-size: 12px;
        color: #9ca3af;
        font-weight: 400;
    }

.form-input, .form-textarea, .form-select {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}

    .form-input:focus, .form-textarea:focus, .form-select:focus {
        border-color: #3464BC;
        box-shadow: 0 0 0 3px rgba(52,100,188,0.1);
    }

.form-textarea {
    min-height: 100px;
    resize: vertical;
    line-height: 1.6;
}

.form-select {
    cursor: pointer;
}

.form-input::placeholder, .form-textarea::placeholder {
    color: #9ca3af;
}

.form-group table {
    border-collapse: separate;
    border-spacing: 8px 0;
}

    .form-group table td {
        padding: 0 12px 0 0;
    }

    .form-group table label {
        display: inline;
        font-weight: 400;
        margin-left: 4px;
    }

.form-group input[type="radio"] {
    margin-right: 2px;
    vertical-align: middle;
}

.btn {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    text-decoration: none;
    line-height: 1.5;
}

    .btn:hover {
        text-decoration: none;
    }

.btn-primary {
    background: #3464BC;
    color: #fff;
}

    .btn-primary:hover {
        background: #2a50a0;
        color: #fff;
    }

.btn-default {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

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

.btn-success {
    background: #16a34a;
    color: #fff;
}

    .btn-success:hover {
        background: #15803d;
        color: #fff;
    }

.btn-danger {
    background: #dc2626;
    color: #fff;
}

    .btn-danger:hover {
        background: #b91c1c;
        color: #fff;
    }

.btn-warning {
    background: #f59e0b;
    color: #fff;
}

    .btn-warning:hover {
        background: #d97706;
        color: #fff;
    }

.btn-sm {
    padding: 5px 12px;
    font-size: 12px;
}

.btn-block {
    width: 100%;
    text-align: center;
}

.btn-link {
    display: inline-block;
    padding: 2px 8px;
    font-size: 13px;
    color: #3464BC;
    border-radius: 4px;
    transition: background 0.2s;
}

    .btn-link:hover {
        background: #e8f4f8;
        text-decoration: none;
    }

    .btn-link.btn-danger {
        color: #dc2626;
        background: transparent;
    }

        .btn-link.btn-danger:hover {
            background: #fef2f2;
        }

.config-area {
    background: #fff;
    border-radius: 8px;
    padding: 24px 28px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.config-section-title {
    color: #3464BC;
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e8eef3;
}

.config-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px 24px;
}

.config-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

    .config-field.full {
        grid-column: 1 / -1;
    }

    .config-field label {
        font-weight: 600;
        font-size: 14px;
        color: #374151;
    }

    .config-field .form-input, .config-field textarea {
        width: 100%;
        box-sizing: border-box;
    }

    .config-field textarea {
        min-height: 80px;
        resize: vertical;
    }

.config-actions {
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #e8eef3;
}

.config-section-divider {
    grid-column: 1 / -1;
    margin: 10px 0 0 0;
    padding-top: 18px;
    border-top: 1px dashed #d1d5db;
    font-size: 15px;
    font-weight: 700;
    color: #3464BC;
}

.import-area {
    max-width: none !important;
}

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

.rich-editor {
    border: 1px solid #d1d5db;
    border-radius: 6px;
    overflow: hidden;
}

.rich-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px;
    padding: 6px 8px;
    background: #f9fafb;
    border-bottom: 1px solid #d1d5db;
}

    .rich-toolbar button {
        user-select: none;
    }

.rte-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 28px;
    padding: 0 6px;
    border: 1px solid transparent;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    color: #374151;
    transition: all 0.15s;
}

    .rte-btn:hover {
        background: #e5e7eb;
        border-color: #d1d5db;
    }

    .rte-btn:active {
        background: #d1d5db;
    }

.rte-sep {
    display: inline-block;
    width: 1px;
    height: 20px;
    background: #d1d5db;
    margin: 0 4px;
}

.rte-select {
    height: 28px;
    padding: 0 6px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 13px;
    background: #fff;
    cursor: pointer;
}

.rte-color-label {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 12px;
    color: #6b7280;
    cursor: pointer;
}

.rte-color {
    width: 24px;
    height: 24px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    cursor: pointer;
    padding: 0;
}

.rich-content {
    min-height: 350px;
    max-height: 600px;
    overflow-y: auto;
    padding: 16px;
    font-size: 14px;
    line-height: 1.8;
    outline: none;
    background: #fff;
}

    .rich-content:focus {
        border-color: #3b82f6;
    }

    .rich-content ul, .rich-content ol {
        margin: 8px 0;
        padding-left: 32px;
    }

    .rich-content img {
        max-width: 100%;
    }

    .rich-content a {
        color: #3464BC;
        text-decoration: underline;
    }

    .rich-content h1 {
        font-size: 1.8em;
        margin: 0.5em 0;
    }

    .rich-content h2 {
        font-size: 1.5em;
        margin: 0.5em 0;
    }

    .rich-content h3 {
        font-size: 1.3em;
        margin: 0.5em 0;
    }

    .rich-content blockquote {
        border-left: 4px solid #d1d5db;
        padding-left: 12px;
        margin: 8px 0;
        color: #6b7280;
    }

.news-edit-layout {
    width: 100%;
}

.news-edit-area {
    max-width: 100% !important;
}

.form-row-inline {
    display: flex;
    gap: 20px;
    margin-bottom: 0;
}

.form-group-half {
    flex: 1;
}

.cke {
    border-radius: 6px;
    overflow: hidden;
}

.cke_inner {
    border-radius: 6px;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 20px 0;
    flex-wrap: wrap;
}

    .pagination a {
        display: inline-block;
        padding: 6px 12px;
        border: 1px solid #dee2e6;
        border-radius: 4px;
        color: #3464BC;
        font-size: 14px;
        transition: all 0.2s;
    }

        .pagination a:hover {
            background: #3464BC;
            color: #fff;
            border-color: #3464BC;
            text-decoration: none;
        }

    .pagination .current {
        display: inline-block;
        padding: 6px 12px;
        background: #3464BC;
        color: #fff;
        border-radius: 4px;
        border: 1px solid #3464BC;
        font-size: 14px;
    }

.success {
    display: block;
    padding: 10px 16px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #15803d;
    border-radius: 6px;
    margin-top: 12px;
    font-size: 14px;
}

.error {
    display: block;
    padding: 10px 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #dc2626;
    border-radius: 6px;
    margin-top: 12px;
    font-size: 14px;
}

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #3464BC 0%, #4a82d6 100%);
}

.login-box {
    background: #fff;
    border-radius: 10px;
    padding: 40px;
    width: 380px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}

    .login-box h1 {
        text-align: center;
        margin-bottom: 28px;
        color: #3464BC;
        font-size: 22px;
    }

    .login-box .form-group {
        margin-bottom: 20px;
    }

    .login-box .btn {
        width: 100%;
        padding: 11px;
        font-size: 15px;
    }

    .login-box .success, .login-box .error {
        text-align: center;
    }

.admin-sidebar .nav-section {
    padding: 16px 24px 4px;
    font-size: 11px;
    color: rgba(255,255,255,0.45);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: default;
    font-weight: 600;
}

.admin-sidebar li.nav-child a {
    padding-left: 44px;
    font-size: 13px;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.stat-card {
    background: #fff;
    border-radius: 8px;
    padding: 16px 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: transform 0.2s, box-shadow 0.2s;
}

    .stat-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    }

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

    .stat-icon.blue {
        background: #eff6ff;
        color: #3b82f6;
    }

    .stat-icon.green {
        background: #f0fdf4;
        color: #22c55e;
    }

    .stat-icon.orange {
        background: #fff7ed;
        color: #f97316;
    }

    .stat-icon.purple {
        background: #faf5ff;
        color: #a855f7;
    }

    .stat-icon.red {
        background: #fef2f2;
        color: #ef4444;
    }

    .stat-icon.teal {
        background: #f0fdfa;
        color: #14b8a6;
    }

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

    .stat-info h3 {
        font-size: 22px;
        font-weight: 700;
        margin: 0;
        line-height: 1.2;
    }

    .stat-info p {
        color: #6b7280;
        font-size: 12px;
        margin: 2px 0 0;
    }

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.dashboard-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    overflow: hidden;
}

.dashboard-card-header {
    padding: 14px 20px;
    border-bottom: 1px solid #f0f0f0;
    font-weight: 600;
    font-size: 15px;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dashboard-card-body {
    padding: 16px 20px;
}

.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.quick-action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #333;
    font-size: 14px;
    transition: all 0.2s;
    background: #fafbfc;
}

    .quick-action-btn:hover {
        border-color: #3464BC;
        color: #3464BC;
        background: #eff6ff;
        text-decoration: none;
    }

    .quick-action-btn .qa-icon {
        font-size: 18px;
        flex-shrink: 0;
    }

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.badge-unread {
    background: #ef4444;
    color: #fff;
    margin-left: auto;
}

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

    .dashboard-table th {
        text-align: left;
        padding: 8px 10px;
        border-bottom: 2px solid #e5e7eb;
        color: #6b7280;
        font-weight: 600;
        font-size: 12px;
        text-transform: uppercase;
    }

    .dashboard-table td {
        padding: 8px 10px;
        border-bottom: 1px solid #f0f0f0;
    }

    .dashboard-table tr:hover td {
        background: #f9fafb;
    }

    .dashboard-table .num {
        text-align: right;
        font-weight: 600;
        color: #3464BC;
    }

    .dashboard-table .bar-bg {
        display: inline-block;
        width: 60px;
        height: 6px;
        background: #e5e7eb;
        border-radius: 3px;
        vertical-align: middle;
        margin-right: 6px;
    }

    .dashboard-table .bar-fill {
        display: block;
        height: 100%;
        border-radius: 3px;
        background: #3464BC;
    }

.dashboard-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.dashboard-message-item {
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

    .dashboard-message-item .msg-text {
        font-size: 13px;
        color: #333;
        flex: 1;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .dashboard-message-item .msg-time {
        font-size: 12px;
        color: #9ca3af;
        flex-shrink: 0;
        margin-left: 12px;
    }

    .dashboard-message-item .msg-status {
        display: inline-block;
        padding: 1px 8px;
        border-radius: 10px;
        font-size: 11px;
        margin-left: 8px;
        flex-shrink: 0;
    }

        .dashboard-message-item .msg-status.pending {
            background: #fef3c7;
            color: #dc2626;
        }

        .dashboard-message-item .msg-status.read {
            background: #fef3c7;
            color: #d97706;
        }

        .dashboard-message-item .msg-status.replied {
            background: #dbeafe;
            color: #2563eb;
        }

.dashboard-empty {
    text-align: center;
    padding: 30px 0;
    color: #9ca3af;
    font-size: 13px;
}

/* 分类管理页面样式 */
.cate-row {
    padding: 8px 10px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cate-parent {
    font-weight: 700;
    background: #f0f4f8;
}

.cate-child {
    padding-left: 36px;
}

.cate-row .cate-name {
    flex: 1;
}

.cate-row .cate-seq {
    width: 50px;
    text-align: center;
}

.cate-row .cate-actions {
    display: flex;
    gap: 6px;
}

/* 登录页验证码 */
.captcha-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.captcha-input {
    width: 100px !important;
    flex-shrink: 0;
}

.captcha-question {
    font-size: 16px;
    color: #333;
    user-select: none;
    white-space: nowrap;
}

.captcha-refresh {
    color: #3464BC;
    cursor: pointer;
    font-size: 20px;
    text-decoration: none;
    line-height: 1;
}

    .captcha-refresh:hover {
        color: #2a50a0;
        text-decoration: none;
    }

/* 用户管理页面样式 */
.admin-toolbar {
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

    .admin-table th {
        background: #f0f4f8;
        padding: 10px 14px;
        text-align: left;
        font-size: 13px;
        color: #555;
        font-weight: 600;
        border-bottom: 2px solid #e2e8f0;
    }

    .admin-table td {
        padding: 10px 14px;
        font-size: 13px;
        color: #333;
        border-bottom: 1px solid #eef2f6;
    }

    .admin-table tr:hover td {
        background: #fafbfc;
    }

.admin-form-panel {
    background: #fff;
    border-radius: 6px;
    padding: 20px 24px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

    .admin-form-panel h3 {
        margin: 0 0 16px;
        font-size: 15px;
        color: #333;
        border-bottom: 1px solid #eef2f6;
        padding-bottom: 10px;
    }

.form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 14px;
}

.form-field {
    flex: 1;
}

    .form-field label {
        display: block;
        font-size: 13px;
        color: #555;
        margin-bottom: 4px;
        font-weight: 500;
    }

    .form-field input, .form-field select {
        width: 100%;
        padding: 8px 10px;
        border: 1px solid #d1d5db;
        border-radius: 4px;
        font-size: 13px;
        box-sizing: border-box;
    }

        .form-field input:focus, .form-field select:focus {
            outline: none;
            border-color: #3464BC;
            box-shadow: 0 0 0 2px rgba(52,100,188,0.1);
        }

.form-actions {
    display: flex;
    gap: 8px;
    padding-top: 6px;
}

.msg-text {
    padding: 8px 14px;
    border-radius: 4px;
    font-size: 13px;
    margin-bottom: 12px;
}

    .msg-text.success {
        background: #ecfdf5;
        color: #065f46;
        border: 1px solid #a7f3d0;
    }

    .msg-text.error {
        background: #fef2f2;
        color: #991b1b;
        border: 1px solid #fecaca;
    }

.btn-edit {
    color: #3464BC;
    cursor: pointer;
    text-decoration: none;
    font-size: 13px;
}

    .btn-edit:hover {
        color: #2a50a0;
        text-decoration: underline;
    }

.btn-delete {
    color: #dc2626;
    cursor: pointer;
    text-decoration: none;
    font-size: 13px;
    margin-left: 8px;
}

    .btn-delete:hover {
        color: #b91c1c;
        text-decoration: underline;
    }

.hint-text {
    font-size: 12px;
    color: #9ca3af;
}
