/* ========== 全局变量与基础样式 ========== */
:root {
    --primary: #0ea5a4;
    --primary-dark: #0d9488;
    --primary-light: #14b8a6;
    --primary-bg: #f0fdfa;
    --secondary: #6366f1;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;
    --text-primary: #1e293b;
    --text-main: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --card-bg: #ffffff;
    --bg: #f8fafc;
    --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);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --radius: 10px;
    --radius-lg: 16px;
    --sidebar-width: 260px;
    --sidebar-collapsed: 70px;
    --transition: all 0.3s ease;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background: var(--bg-light);
    color: var(--text-primary);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

/* ========== 登录页面 ========== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0ea5a4 0%, #6366f1 100%);
    padding: 20px;
}

.login-container {
    display: flex;
    width: 100%;
    max-width: 980px;
    min-height: 580px;
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
}

.login-left {
    flex: 1.1;
    background: linear-gradient(135deg, #0f766e 0%, #4338ca 100%);
    color: white;
    padding: 50px 45px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.login-left::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -30%;
    width: 400px;
    height: 400px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
}

.login-left::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -20%;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.06);
    border-radius: 50%;
}

.brand {
    position: relative;
    z-index: 1;
}

.brand-icon {
    width: 70px;
    height: 70px;
    background: rgba(255,255,255,0.15);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.brand h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 6px;
}

.brand p {
    font-size: 15px;
    opacity: 0.85;
}

.login-features {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    background: rgba(255,255,255,0.1);
    padding: 12px 14px;
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.feature-item i {
    color: #5eead4;
    font-size: 16px;
}

.login-right {
    flex: 1;
    padding: 50px 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-form-wrapper {
    width: 100%;
    max-width: 340px;
}

.login-form-wrapper h2 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.login-form-wrapper > p {
    color: var(--text-secondary);
    margin-bottom: 30px;
}

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

.form-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group label i {
    color: var(--primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 14px;
    transition: var(--transition);
    font-family: inherit;
    background: var(--bg-white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(14,165,164,0.1);
}

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

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-secondary);
}

.checkbox-label input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
    cursor: pointer;
}

.btn-login {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(14,165,164,0.3);
}

.btn-login:active {
    transform: translateY(0);
}

.login-hint {
    margin-top: 20px;
    padding: 12px;
    background: var(--primary-bg);
    border-radius: 8px;
    text-align: center;
    font-size: 12px;
    color: var(--primary-dark);
}

/* ========== 主应用布局 ========== */
.app {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    color: #cbd5e1;
    display: flex;
    flex-direction: column;
    transition: width 0.3s ease;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    overflow: hidden;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 700;
    color: white;
    white-space: nowrap;
    cursor: pointer;
}

.logo i {
    font-size: 24px;
    color: var(--primary-light);
}

.sidebar.collapsed .logo span {
    display: none;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    transition: var(--transition);
}

.sidebar-toggle:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.sidebar.collapsed .sidebar-toggle {
    display: none;
}

.sidebar-nav {
    flex: 1;
    padding: 14px 10px;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-nav::-webkit-scrollbar {
    width: 5px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.15);
    border-radius: 3px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 11px 14px;
    margin-bottom: 4px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    color: #94a3b8;
    text-decoration: none;
    white-space: nowrap;
    position: relative;
}

.nav-item i {
    font-size: 17px;
    width: 22px;
    text-align: center;
}

.nav-item span {
    font-size: 14px;
}

.sidebar.collapsed .nav-item span {
    display: none;
}

.nav-item:hover {
    background: rgba(255,255,255,0.06);
    color: white;
}

.nav-item.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(14,165,164,0.35);
}

.nav-section-title {
    padding: 14px 14px 8px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #475569;
    font-weight: 600;
}

.sidebar.collapsed .nav-section-title {
    display: none;
}

.sidebar-footer {
    padding: 14px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: rgba(255,255,255,0.05);
    border-radius: 10px;
    margin-bottom: 10px;
}

.avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 15px;
    flex-shrink: 0;
}

.user-details {
    overflow: hidden;
}

.user-name {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: white;
}

.user-role {
    display: block;
    font-size: 11px;
    color: #94a3b8;
}

.sidebar.collapsed .user-details {
    display: none;
}

.btn-logout {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px;
    background: transparent;
    border: 1px solid rgba(239,68,68,0.3);
    color: #f87171;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    transition: var(--transition);
}

.btn-logout:hover {
    background: rgba(239,68,68,0.15);
    border-color: var(--danger);
    color: #fca5a5;
}

.sidebar.collapsed .btn-logout span {
    display: none;
}

/* 主内容 */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.sidebar.collapsed ~ .main-content {
    margin-left: var(--sidebar-collapsed);
}

/* 底部备案 */
.main-footer {
    text-align: center;
    padding: 12px 0;
    font-size: 12px;
    color: var(--text-muted);
    background: var(--bg-white);
    border-top: 1px solid var(--border);
}
.main-footer a {
    color: var(--text-muted);
    text-decoration: none;
}
.main-footer a:hover {
    color: var(--primary);
}

/* 顶部栏 */
.topbar {
    background: var(--bg-white);
    padding: 14px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow-sm);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
    display: none;
}

.menu-toggle:hover {
    background: var(--bg-light);
}

.page-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 18px;
    position: relative;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-light);
    padding: 8px 14px;
    border-radius: 8px;
    gap: 8px;
    width: 260px;
    border: 1px solid transparent;
    transition: var(--transition);
}

.search-box:focus-within {
    border-color: var(--primary);
    background: var(--bg-white);
}

.search-box i {
    color: var(--text-muted);
}

.search-box input {
    border: none;
    background: none;
    outline: none;
    flex: 1;
    font-size: 13px;
}

.topbar-icon-btn {
    position: relative;
    background: none;
    border: none;
    font-size: 18px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: var(--transition);
}

.topbar-icon-btn:hover {
    background: var(--bg-light);
    color: var(--primary);
}

.badge {
    position: absolute;
    top: 3px;
    right: 3px;
    background: var(--danger);
    color: white;
    font-size: 10px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.date-display {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* 内容区 */
.content-area {
    flex: 1;
    padding: 28px;
    overflow-y: auto;
}

/* ========== 卡片 ========== */
.card {
    background: var(--bg-white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 22px;
    margin-bottom: 22px;
}

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

.card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
}

/* ========== 统计卡片 ========== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 18px;
    transition: var(--transition);
    border-left: 4px solid var(--primary);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-card.success { border-left-color: var(--success); }
.stat-card.warning { border-left-color: var(--warning); }
.stat-card.danger { border-left-color: var(--danger); }
.stat-card.info { border-left-color: var(--info); }

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

.stat-card .stat-icon { background: var(--primary-bg); color: var(--primary); }
.stat-card.success .stat-icon { background: #ecfdf5; color: var(--success); }
.stat-card.warning .stat-icon { background: #fffbeb; color: var(--warning); }
.stat-card.danger .stat-icon { background: #fef2f2; color: var(--danger); }
.stat-card.info .stat-icon { background: #eff6ff; color: var(--info); }

.stat-info {
    flex: 1;
}

.stat-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.stat-value {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-change {
    font-size: 12px;
    margin-top: 2px;
}

.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* ========== 按钮 ========== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(14,165,164,0.35);
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
}

.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #059669; }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover { background: #dc2626; }
.btn-warning { background: var(--warning); color: white; }
.btn-warning:hover { background: #d97706; }
.btn-info { background: var(--info); color: white; }
.btn-info:hover { background: #2563eb; }

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

.btn-icon {
    padding: 7px 9px;
    border-radius: 6px;
    background: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
}

.btn-icon.edit { color: var(--info); }
.btn-icon.delete { color: var(--danger); }
.btn-icon.view { color: var(--success); }
.btn-icon:hover {
    background: var(--bg-light);
}

.btn-group {
    display: flex;
    gap: 8px;
}

/* ========== 表格 ========== */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius);
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-white);
}

.table thead {
    background: var(--bg-light);
}

.table th {
    padding: 13px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.table td {
    padding: 13px 14px;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-primary);
}

.table tbody tr {
    transition: var(--transition);
}

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

.table tbody tr:last-child td {
    border-bottom: none;
}

.table-actions {
    display: flex;
    gap: 4px;
}

/* 标签/徽章 */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.tag-success { background: #d1fae5; color: #065f46; }
.tag-warning { background: #fef3c7; color: #92400e; }
.tag-danger { background: #fee2e2; color: #991b1b; }
.tag-info { background: #dbeafe; color: #1e40af; }
.tag-default { background: #f1f5f9; color: #475569; }
.tag-primary { background: var(--primary-bg); color: var(--primary-dark); }

/* ========== 搜索与筛选栏 ========== */
.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 12px;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.search-input {
    padding: 8px 14px;
    border: 1px solid var(--border);
    border-radius: 7px;
    font-size: 13px;
    width: 240px;
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(14,165,164,0.1);
}

.filter-select {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 7px;
    font-size: 13px;
    background: var(--bg-white);
    cursor: pointer;
}

/* ========== 模态框 ========== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15,23,42,0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-lg { max-width: 780px; }
.modal-xl { max-width: 960px; }

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

.modal-title {
    font-size: 17px;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--bg-light);
    color: var(--danger);
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* 表单网格 */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.form-grid .full {
    grid-column: 1 / -1;
}

/* ========== 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: 12px;
    padding: 14px 18px;
    background: var(--bg-white);
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    border-left: 4px solid var(--success);
    min-width: 300px;
    animation: slideInRight 0.3s ease;
}

.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
.toast.info { border-left-color: var(--info); }

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.toast-icon {
    font-size: 18px;
}

.toast.success .toast-icon { color: var(--success); }
.toast.error .toast-icon { color: var(--danger); }
.toast.warning .toast-icon { color: var(--warning); }
.toast.info .toast-icon { color: var(--info); }

.toast-message {
    flex: 1;
    font-size: 13px;
    color: var(--text-primary);
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 16px;
}

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

.empty-state i {
    font-size: 56px;
    margin-bottom: 16px;
    color: var(--border);
}

.empty-state p {
    font-size: 14px;
}

/* ========== 分页 ========== */
.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.pagination-info {
    font-size: 13px;
    color: var(--text-secondary);
}

.pagination-controls {
    display: flex;
    gap: 6px;
}

.page-btn {
    padding: 6px 12px;
    border: 1px solid var(--border);
    background: var(--bg-white);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: var(--transition);
}

.page-btn:hover:not(:disabled) {
    background: var(--primary-bg);
    border-color: var(--primary);
}

.page-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========== 日历 ========== */
.calendar {
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.calendar-header h3 {
    font-size: 17px;
    font-weight: 700;
}

.calendar-nav {
    display: flex;
    gap: 8px;
}

.calendar-nav button {
    background: rgba(255,255,255,0.15);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}

.calendar-nav button:hover {
    background: rgba(255,255,255,0.25);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.calendar-weekday {
    padding: 10px;
    text-align: center;
    font-weight: 600;
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--bg-light);
    border-bottom: 1px solid var(--border);
}

.calendar-day {
    min-height: 100px;
    padding: 8px;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.calendar-day:nth-child(7n) {
    border-right: none;
}

.calendar-day:hover {
    background: var(--primary-bg);
}

.calendar-day.other-month {
    background: var(--bg-light);
    opacity: 0.5;
}

.calendar-day.today {
    background: var(--primary-bg);
}

.calendar-day.today .day-number {
    background: var(--primary);
    color: white;
}

.day-number {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
}

.appointment-dot {
    display: block;
    padding: 3px 6px;
    margin-bottom: 3px;
    background: var(--primary);
    color: white;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: opacity 0.2s;
}
.appointment-dot:hover { opacity: 0.85; }

/* 日历视图状态颜色 — 与列表视图一致 */
.appointment-dot.appt-status-success { background: var(--success); }
.appointment-dot.appt-status-warning { background: var(--warning); }
.appointment-dot.appt-status-danger { background: var(--danger); }
.appointment-dot.appt-status-info { background: var(--info); }
.appointment-dot.appt-status-default { background: var(--text-muted); }

.appointment-dot.urgent { background: var(--danger); }

/* ========== 年视图 ========== */
.year-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    padding: 16px;
}

.year-month-card {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px;
    background: var(--bg-white);
    transition: box-shadow 0.2s;
}

.year-month-card:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.ym-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 8px;
    text-align: center;
}

.ym-total {
    font-size: 11px;
    font-weight: normal;
    color: var(--text-muted);
}

.ym-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 4px;
}

.ym-weekdays span {
    font-size: 10px;
    color: var(--text-muted);
    text-align: center;
    padding: 2px 0;
}

.ym-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
}

.ym-cell {
    position: relative;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: var(--text-main);
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.15s;
}

.ym-cell:hover {
    background: var(--primary-bg);
}

.ym-cell.ym-empty {
    background: transparent;
    cursor: default;
}

.ym-cell.ym-today {
    background: var(--primary);
    color: white;
    font-weight: 700;
}

.ym-cell.ym-has {
    background: #dbeafe;
    color: #1d4ed8;
    font-weight: 600;
}

.ym-cell.ym-today.ym-has {
    background: var(--primary);
    color: white;
}

.ym-day {
    font-size: 11px;
}

.ym-cnt {
    position: absolute;
    bottom: 1px;
    right: 2px;
    font-size: 9px;
    font-weight: 700;
    color: #dc2626;
    background: white;
    border-radius: 50%;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dc2626;
}

.ym-cell.ym-today .ym-cnt {
    color: var(--primary);
    background: white;
}

/* 尾款记录行 */
.tail-row td {
    font-size: 12px;
    color: #6b7280;
}

/* ========== 权限矩阵 ========== */
.permission-table {
    width: 100%;
    border-collapse: collapse;
}

.permission-table th,
.permission-table td {
    padding: 10px 12px;
    border: 1px solid var(--border);
    text-align: center;
    font-size: 13px;
}

.permission-table th {
    background: var(--bg-light);
    font-weight: 600;
}

.permission-table td:first-child {
    text-align: left;
    font-weight: 500;
}

/* ========== 仪表盘图表区 ========== */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 22px;
}

.recent-list {
    list-style: none;
}

.recent-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.recent-list li:last-child {
    border-bottom: none;
}

.recent-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary-bg);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.recent-info {
    flex: 1;
    min-width: 0;
}

.recent-name {
    font-weight: 600;
    font-size: 13px;
}

.recent-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

.recent-time {
    font-size: 12px;
    color: var(--text-muted);
}

/* 简易柱状图 */
.bar-chart {
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    height: 200px;
    padding: 20px 0;
    gap: 8px;
}

.bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
    gap: 8px;
}

.bar {
    width: 100%;
    max-width: 40px;
    background: linear-gradient(180deg, var(--primary-light) 0%, var(--primary) 100%);
    border-radius: 6px 6px 0 0;
    min-height: 4px;
    transition: height 0.5s ease;
    position: relative;
}

.bar:hover::after {
    content: attr(data-value);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 6px;
    background: var(--text-primary);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 10;
}

.bar-label {
    font-size: 12px;
    color: var(--text-secondary);
}

/* 环形进度 */
.progress-ring {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px 0;
}

.progress-ring svg {
    transform: rotate(-90deg);
}

.progress-ring text {
    font-size: 22px;
    font-weight: 700;
    fill: var(--text-primary);
    transform: rotate(90deg);
    transform-origin: center;
}

/* ========== 新增样式：牙位选择器、标签页、诊所/权限多选、诊费项目行等 ========== */

/* 模态框超大尺寸 */
.modal-xl { max-width: 1100px; width: 95vw; }
.modal-xl .modal-body { max-height: 78vh; overflow-y: auto; }

/* 标签页 */
.tab-bar { display: flex; gap: 4px; border-bottom: 2px solid var(--border); margin-bottom: 16px; }
.tab-btn { padding: 10px 20px; background: none; border: none; cursor: pointer; font-size: 14px; color: var(--text-secondary); border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all 0.2s; }
.tab-btn:hover { color: var(--primary); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.tab-content { display: none; }
.tab-content.active { display: block; }
.detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.detail-grid .full { grid-column: 1 / -1; }
.detail-grid label { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.detail-grid > div { padding: 8px 12px; background: var(--bg); border-radius: 6px; }

/* 诊所只读显示 */
.clinic-readonly { padding: 8px 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; color: var(--text-secondary); }

/* 诊所/权限多选 */
.clinic-checkboxes, .perm-checkboxes { display: flex; flex-wrap: wrap; gap: 10px; padding: 14px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; align-items: flex-start; }
.clinic-cb, .perm-cb { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; background: #ffffff; border: 1px solid var(--border); border-radius: 6px; cursor: pointer; font-size: 13px; white-space: nowrap; word-break: keep-all; overflow-wrap: normal; flex: 0 0 auto; min-width: max-content; transition: all 0.15s; }
.clinic-cb:hover, .perm-cb:hover { border-color: var(--primary); background: var(--primary-bg); }
.clinic-cb input, .perm-cb input { width: 16px !important; height: 16px; cursor: pointer; accent-color: var(--primary); flex-shrink: 0; margin: 0; }

/* 牙位选择器 */
.tooth-picker { padding: 14px; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; }
.tooth-section { margin-bottom: 16px; }
.tooth-section:last-child { margin-bottom: 12px; }
.tooth-section-title { font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }
.tooth-arch { display: flex; flex-direction: column; gap: 2px; align-items: center; }
.tooth-row { display: flex; gap: 2px; }
.tooth-midline { height: 4px; }
.tooth { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; background: var(--card-bg); border: 1.5px solid var(--border); border-radius: 6px; cursor: pointer; font-size: 11px; font-weight: 600; color: var(--text-secondary); transition: all 0.15s; user-select: none; }
.tooth:hover { border-color: var(--primary); transform: scale(1.08); }
.tooth.selected { background: var(--primary); color: #fff; border-color: var(--primary); }
.tooth.prim { background: #e8f5e9; border-color: #a5d6a7; }
.tooth.prim.selected { background: #43a047; border-color: #43a047; }
.tooth-selected { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--border); }
.tooth-selected-label { font-size: 13px; color: var(--text-secondary); margin-right: 8px; }
.tooth-tags { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.tooth-tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; background: var(--primary-bg); color: var(--primary); border-radius: 12px; font-size: 12px; font-weight: 600; }
.tooth-tag .fa-times { cursor: pointer; opacity: 0.7; }
.tooth-tag .fa-times:hover { opacity: 1; }

/* 静态牙位图（详情/打印） */
.tooth-print-wrap { display: inline-block; }
.tooth-print-row { display: flex; gap: 1px; margin-bottom: 1px; }
.tooth-print { width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; background: #f0f0f0; border: 1px solid #ccc; border-radius: 3px; font-size: 9px; font-weight: 600; }
.tooth-print.sel { background: #2c6e8f; color: #fff; border-color: #2c6e8f; }
.tooth-print-row.small .tooth-print { width: 16px; height: 16px; font-size: 8px; }

/* 诊费项目行 */
.fee-item-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: var(--bg); border: 1px solid var(--border); border-radius: 6px; margin-bottom: 6px; }
.fee-item-row .btn-icon { color: var(--danger); }

/* 筛选下拉 */
.filter-select { padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--card-bg); color: var(--text-primary); font-size: 13px; cursor: pointer; }
.btn-sm { padding: 6px 12px; font-size: 12px; }

/* 可搜索选择器（备用） */
.search-select { position: relative; }
.search-select-input { width: 100%; padding: 8px 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--card-bg); color: var(--text-primary); }
.search-select-dropdown { position: absolute; top: 100%; left: 0; right: 0; background: #ffffff; border: 1px solid var(--border); border-radius: 6px; margin-top: 4px; max-height: 220px; overflow-y: auto; z-index: 9999; display: none; box-shadow: 0 6px 16px rgba(0,0,0,0.15); }
.search-select-dropdown.show { display: block; }
.ss-item { padding: 8px 12px; cursor: pointer; font-size: 13px; background: #ffffff; white-space: nowrap; }
.ss-item:hover { background: var(--primary-bg); }
.ss-create, .ss-empty { padding: 10px 12px; text-align: center; color: var(--primary); cursor: pointer; font-size: 13px; background: #ffffff; }

/* ========== 响应式 ========== */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .login-container {
        flex-direction: column;
    }
    .login-left {
        display: none;
    }
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width);
    }
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
    }
    .menu-toggle {
        display: block;
    }
    .search-box {
        display: none;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
    .content-area {
        padding: 16px;
    }
}

/* ========== 通知下拉 ========== */
.notif-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 360px;
    max-height: 460px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.15);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.notif-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    font-size: 14px;
    background: var(--bg);
}
.notif-list {
    overflow-y: auto;
    max-height: 400px;
}
.notif-item {
    display: flex;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.15s;
}
.notif-item:hover { background: var(--bg); }
.notif-item.unread { background: #f0f7ff; }
.notif-item.unread:hover { background: #e6f0fa; }
.notif-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 14px;
}
.notif-body { flex: 1; min-width: 0; }
.notif-title { font-size: 13px; font-weight: 600; color: var(--text); }
.notif-content { font-size: 12px; color: var(--text-secondary); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-time { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.notif-empty { padding: 40px 20px; text-align: center; color: var(--text-muted); }
.notif-empty i { font-size: 32px; margin-bottom: 10px; opacity: 0.4; }

/* ========== 公告卡片 ========== */
.announcement-card {
    background: #fff;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 12px;
    border-left: 4px solid #2c6e8f;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.announcement-card .ann-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}
.announcement-card .ann-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
}
.announcement-card .ann-content {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.7;
    white-space: pre-wrap;
}
.tabs-bar {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid var(--border);
    margin-bottom: 16px;
}
.tab-item {
    padding: 10px 18px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.15s;
}
.tab-item.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
    font-weight: 600;
}
.msg-item {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.15s;
}
.msg-item:hover { background: var(--bg); }
.msg-item.unread { background: #f0f7ff; }
.msg-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #2c6e8f;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}
.msg-body { flex: 1; min-width: 0; }
.msg-header { display: flex; justify-content: space-between; align-items: center; }
.msg-sender { font-weight: 600; font-size: 14px; }
.msg-time { font-size: 11px; color: var(--text-muted); }
.msg-content { font-size: 13px; color: var(--text-secondary); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ========== 新闻动态 ========== */
.news-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f0fdfa 0%, #eef2ff 100%);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    margin-bottom: 18px;
    border: 1px solid #e0e7ff;
}
.news-header-info { flex: 1; }
.news-title-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 10px;
}
.news-main-icon {
    font-size: 36px;
    color: var(--primary);
    background: #fff;
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
}
.news-main-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}
.news-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}
.news-meta {
    display: flex;
    gap: 16px;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
}
.news-update-time i, .news-source-badge i { margin-right: 4px; }
.news-source-badge {
    background: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    color: var(--secondary);
    font-weight: 500;
    border: 1px solid #e0e7ff;
}
.news-filter-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.news-filter-chip {
    padding: 6px 16px;
    border: 1px solid var(--border);
    background: #fff;
    border-radius: 20px;
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.15s;
}
.news-filter-chip:hover { border-color: var(--primary); color: var(--primary); }
.news-filter-chip.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    font-weight: 500;
}
.news-loading {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}
.news-loading i {
    font-size: 32px;
    color: var(--primary);
    margin-bottom: 14px;
    display: block;
}
.news-loading p { font-size: 14px; }

/* 头条卡片 */
.news-headline {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 32px;
    border-radius: var(--radius-lg);
    color: #fff;
    margin-bottom: 20px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}
.news-headline::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
}
.news-headline:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}
.news-headline-body { flex: 1; z-index: 1; }
.news-headline-badge {
    display: inline-block;
    background: rgba(255,255,255,0.25);
    padding: 3px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 10px;
}
.news-headline-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.4;
}
.news-headline-summary {
    font-size: 14px;
    opacity: 0.92;
    line-height: 1.6;
    margin-bottom: 14px;
}
.news-headline-meta {
    display: flex;
    gap: 20px;
    font-size: 12px;
    opacity: 0.85;
    align-items: center;
}
.news-headline-meta i { margin-right: 5px; }
.news-read-more {
    margin-left: auto;
    background: rgba(255,255,255,0.2);
    padding: 6px 14px;
    border-radius: 16px;
    font-weight: 500;
}

/* 新闻卡片网格 */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 18px;
}
.news-card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid var(--border);
}
.news-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}
.news-card-cover {
    height: 140px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.news-card-cat {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255,255,255,0.95);
    color: var(--text-primary);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}
.news-card-body { padding: 16px 18px; }
.news-card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-card-summary {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-card-meta {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-muted);
}
.news-card-meta i { margin-right: 4px; }

/* 新闻详情弹窗 */
.news-detail { padding: 4px; }
.news-detail-cover {
    height: 180px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 20px;
}
.news-detail-cat {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(255,255,255,0.95);
    color: var(--text-primary);
    padding: 5px 14px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 600;
}
.news-detail-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    line-height: 1.4;
}
.news-detail-meta {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}
.news-detail-meta i { margin-right: 5px; }
.news-detail-summary {
    font-size: 15px;
    color: var(--primary-dark);
    background: var(--primary-bg);
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    line-height: 1.7;
    font-weight: 500;
    border-left: 4px solid var(--primary);
}
.news-detail-content {
    font-size: 14px;
    color: var(--text-primary);
    line-height: 1.9;
}
.news-detail-content p { margin-bottom: 14px; }
.news-content-subtitle {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 18px 0 10px;
    padding-left: 10px;
    border-left: 3px solid var(--primary);
}

/* 原文配图 */
.news-detail-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}
.news-detail-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: #f1f5f9;
}

/* 原文链接 */
.news-source-link {
    margin-top: 20px;
    padding: 14px 16px;
    background: var(--primary-bg);
    border: 1px dashed var(--primary);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}
.news-source-link i { color: var(--primary); }
.news-source-info { display: flex; flex-direction: column; gap: 4px; }
.news-source-info a {
    color: var(--primary-dark);
    text-decoration: none;
    font-weight: 500;
    word-break: break-all;
}
.news-source-info a:hover { text-decoration: underline; }
.news-source-host {
    font-size: 12px;
    color: var(--text-muted);
}

.news-detail-footer {
    margin-top: 24px;
    padding: 14px 16px;
    background: #f1f5f9;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: var(--text-muted);
}
.news-detail-footer i { color: var(--secondary); font-size: 16px; }

@media (max-width: 768px) {
    .news-headline {
        flex-direction: column;
        text-align: center;
        padding: 24px 20px;
    }
    .news-headline-title { font-size: 18px; }
    .news-headline-meta { flex-direction: column; gap: 8px; }
    .news-read-more { margin-left: 0; }
    .news-grid { grid-template-columns: 1fr; }
}
