/* 管理后台样式 (admin.html) */

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif; background: var(--bg); color: var(--text-primary); line-height: 1.6; }

.admin-login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
}
.admin-login-box {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    width: 90%; max-width: 360px;
    text-align: center;
}
.admin-login-box h2 {
    font-size: 24px;
    margin-bottom: 8px;
}
.admin-login-box p {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
}
.admin-login-box input {
    width: 100%;
    padding: 12px 14px;
    margin-bottom: 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    box-sizing: border-box;
}
.admin-login-box button {
    width: 100%;
    padding: 12px;
    background: var(--gold);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
}

.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    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-header h1 {
    font-size: 24px;
    margin: 0;
}
.admin-header-actions {
    display: flex;
    gap: 12px;
}

.admin-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--border);
}
.admin-card h3 {
    font-size: 16px;
    margin: 0 0 16px;
    font-weight: 600;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.admin-stat {
    background: white;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border);
    text-align: center;
}
.admin-stat-number {
    font-size: 28px;
    font-weight: 700;
    color: var(--gold);
}
.admin-stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.admin-table-wrap {
    overflow-x: auto;
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.admin-table th,
.admin-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.admin-table th {
    background: var(--bg);
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.admin-table tr:hover {
    background: var(--gold-light);
}
.admin-table .tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}
.tag-general { background: #E8F4FD; color: #0A6EBD; }
.tag-diagnosis { background: #FFF3E0; color: #E65100; }
.tag-experience { background: #E8F5E9; color: #2E7D32; }
.tag-diagnosis_pack { background: #F3E5F5; color: #7B1FA2; }
.tag-annual { background: #E0F2F1; color: #00695C; }
.tag-custom { background: #ECEFF1; color: #455A64; }

.admin-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}
@media (max-width: 768px) {
    .admin-form-row {
        grid-template-columns: 1fr;
    }
    .admin-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
}

.admin-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.admin-toggle input[type="checkbox"] {
    width: 40px; height: 22px;
    appearance: none;
    background: var(--border);
    border-radius: 11px;
    position: relative;
    cursor: pointer;
    transition: background 0.2s;
}
.admin-toggle input[type="checkbox"]::after {
    content: '';
    position: absolute;
    width: 18px; height: 18px;
    background: white;
    border-radius: 50%;
    top: 2px; left: 2px;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.admin-toggle input[type="checkbox"]:checked {
    background: var(--gold);
}
.admin-toggle input[type="checkbox"]:checked::after {
    transform: translateX(18px);
}
.admin-toggle label {
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid var(--border);
    background: white;
    color: var(--text-primary);
    font-weight: 500;
}
.btn-sm.btn-primary {
    background: var(--gold);
    color: white;
    border-color: var(--gold);
}
.btn-sm.btn-danger {
    background: #FFEBEE;
    color: #C62828;
    border-color: #EF9A9A;
}
