/* 后台管理样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

a {
    color: #f58220;
    text-decoration: none;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-box {
    width: 100%;
    max-width: 400px;
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

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

.login-box .hint {
    text-align: center;
    color: #888;
    margin-bottom: 20px;
    font-size: 13px;
}

.admin-header {
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
    padding: 0 20px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-header .brand {
    font-size: 18px;
    font-weight: bold;
    color: #f58220;
}

.admin-header .user-info {
    font-size: 13px;
    color: #666;
}

.admin-header .user-info a {
    margin-left: 12px;
}

.admin-nav {
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
    padding: 0 20px;
}

.admin-nav ul {
    list-style: none;
    display: flex;
    gap: 0;
}

.admin-nav li a {
    display: block;
    padding: 12px 20px;
    color: #666;
    border-bottom: 2px solid transparent;
}

.admin-nav li a:hover,
.admin-nav li a.active {
    color: #f58220;
    border-bottom-color: #f58220;
}

.admin-container {
    max-width: 1100px;
    margin: 20px auto;
    padding: 0 20px;
}

.page-title {
    font-size: 20px;
    margin-bottom: 16px;
    color: #333;
}

.card {
    background: #fff;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.card-header h2 {
    font-size: 16px;
}

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

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #555;
}

.form-group .hint {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    font-size: 14px;
}

.form-control:focus {
    outline: none;
    border-color: #f58220;
    box-shadow: 0 0 0 2px rgba(245, 130, 32, 0.15);
}

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

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

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

.form-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

.btn {
    display: inline-block;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    text-align: center;
}

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

.btn-primary:hover {
    background: #e07518;
}

.btn-secondary {
    background: #fff;
    color: #666;
    border: 1px solid #d9d9d9;
}

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

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

.btn-block {
    width: 100%;
    padding: 10px;
}

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

.table th,
.table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
    text-align: left;
    vertical-align: middle;
}

.table th {
    background: #fafafa;
    font-weight: 600;
    color: #555;
    font-size: 13px;
}

.table tr:hover td {
    background: #fafafa;
}

.table .thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #eee;
}

.table .actions {
    white-space: nowrap;
}

.table .actions a,
.table .actions form {
    display: inline-block;
    margin-right: 8px;
}

.alert {
    padding: 10px 14px;
    border-radius: 4px;
    margin-bottom: 16px;
    font-size: 13px;
}

.alert-success {
    background: #f6ffed;
    border: 1px solid #b7eb8f;
    color: #389e0d;
}

.alert-error {
    background: #fff2f0;
    border: 1px solid #ffccc7;
    color: #cf1322;
}

.stats-grid {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.stat-card {
    flex: 1;
    background: #fff;
    border-radius: 6px;
    padding: 20px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.stat-card .num {
    font-size: 28px;
    font-weight: bold;
    color: #f58220;
}

.stat-card .label {
    font-size: 13px;
    color: #888;
    margin-top: 4px;
}

.preview-img {
    max-width: 120px;
    max-height: 120px;
    border: 1px solid #eee;
    border-radius: 4px;
    margin-top: 8px;
}

.empty-tip {
    text-align: center;
    color: #999;
    padding: 30px;
}

.form-section {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px dashed #e8e8e8;
}

.form-section:last-of-type {
    border-bottom: none;
}

.form-section-title {
    font-size: 15px;
    color: #f58220;
    margin-bottom: 14px;
    padding-left: 10px;
    border-left: 3px solid #f58220;
}

.mode-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
}

.mode-tab {
    cursor: pointer;
}

.mode-tab input {
    display: none;
}

.mode-tab span {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid #d9d9d9;
    border-radius: 4px;
    color: #666;
    background: #fafafa;
}

.mode-tab input:checked + span {
    border-color: #f58220;
    color: #f58220;
    background: #fff7f0;
}

@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .stats-grid {
        flex-direction: column;
    }

    .admin-nav ul {
        overflow-x: auto;
    }
}
