/* 基础样式 */
:root {
    --bg: #f5f6f8;
    --card: #ffffff;
    --text: #0f172a;
    --muted: #6b7280;
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --danger: #ef4444;
    --success: #10b981;
    --border: #e5e7eb;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

.navbar {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    padding: 0;
}
/*.navbar-inner {
    max-width: 1500px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    width: 100%;
}*/
.navbar-inner {
    width: 94%;
    max-width: 80%;   /* 导航比内容更宽，视觉更稳 */
    margin: 0 auto;

    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
}
.nav-brand { 
    flex: 0 0 auto;
    white-space: nowrap;
}
.nav-brand a { 
    font-weight: 1000; 
    color: var(--text); 
    text-decoration: none;
    font-size: 22px
}
.nav-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1 1 auto;
    justify-content: flex-end;
}
.nav-links { 
    display: flex; 
    gap: 8px; 
    align-items: center; 
    flex-wrap: wrap;
}
.nav-links > a { 
    padding: 6px 12px; 
    border-radius: 6px; 
    color: var(--text); 
    white-space: nowrap;
    transition: background 0.2s;
}
.nav-links > a:hover { 
    background: var(--border); 
}
.nav-dropdown {
    position: relative;
    display: inline-block;
}
.nav-dropdown-toggle {
    padding: 6px 12px;
    border-radius: 6px;
    color: var(--text);
    white-space: nowrap;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    transition: background 0.2s;
}
.nav-dropdown-toggle:hover {
    background: var(--border);
}
.dropdown-arrow {
    font-size: 10px;
    transition: transform 0.2s;
}
.nav-dropdown:hover .dropdown-arrow {
    transform: rotate(180deg);
}
.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    min-width: 140px;
    margin-top: 4px;
    z-index: 100;
}
.nav-dropdown:hover .nav-dropdown-menu {
    display: block;
}
.nav-dropdown-menu a {
    display: block;
    padding: 10px 16px;
    color: var(--text);
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.2s;
}
.nav-dropdown-menu a:hover {
    background: var(--border);
}
.nav-dropdown-menu a:first-child {
    border-radius: 6px 6px 0 0;
}
.nav-dropdown-menu a:last-child {
    border-radius: 0 0 6px 6px;
}
.nav-toggle { 
    display: none; 
    background: none; 
    border: none; 
    font-size: 20px; 
    cursor: pointer; 
    padding: 4px 8px;
}

.page-container { padding: 16px; min-height: calc(100vh - 120px); }
/*.card {
    background: var(--card);
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.04);
    padding: 20px;
    margin: 0 auto;
    max-width: 1500px;
}*/
.card {
    background: var(--card);
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.04);
    padding: 20px;
    margin: 0 auto;

    width: 94%;
    /*max-width: 1400px;   /* 重点：放宽 */
    max-width: 80%;   /* 重点：放宽 */
}

h1 { margin-top: 0; }
.btn {
    display: inline-block;
    padding: 12px 12px;
    border: none;
    border-radius: 6px;
    background: var(--primary);
    color: #fff;
    cursor: pointer;
    font-size: 14px;
}
.btn:hover { 
    background: var(--primary-dark); 
    color: white;
}
.btn-secondary { background: var(--muted); }
.btn-danger { background: var(--danger); }
.btn-success { background: var(--success); }

table { width: 100%; border-collapse: collapse; margin-top: 12px; }
th, td { padding: 10px 8px; border-bottom: 1px solid var(--border); text-align: left; font-size: 14px; }
th { background: #f8fafc; }
tr:hover { background: #f9fafb; }
.empty { text-align: center; color: var(--muted); padding: 16px 0; }

form .row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
label { display: block; margin-bottom: 4px; color: var(--text); font-size: 14px; }
input, select { 
    padding: 8px 12px; 
    border: 1px solid var(--border); 
    border-radius: 6px; 
    font-size: 14px; 
    width: 100%; 
    font-family: inherit;
    background: #fff;
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
input:hover, select:hover {
    border-color: #cbd5e1;
}
select {
    cursor: pointer;
    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='%236b7280' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 32px;
}
input[type="date"], input[type="time"], input[type="datetime-local"] { font-family: inherit; color: var(--text); }
input[type="file"] { padding: 6px; }

.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.footer { border-top: 1px solid var(--border); padding: 12px 16px; background: var(--card); }
.footer-inner { max-width: 82%; margin: 0 auto; color: var(--muted); font-size: 13px; }

/* 表单样式 */
.form { max-width: 600px; }
.form-group { margin-bottom: 16px; }
.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }
.form-actions { display: flex; gap: 10px; margin-top: 20px; }
textarea { width: 100%; padding: 8px; border: 1px solid var(--border); border-radius: 6px; font-size: 14px; font-family: inherit; resize: vertical; }
input[type="checkbox"] { width: auto; margin-right: 6px; }

/* 提示信息 */
.alert { padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-success { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }

/* 按钮尺寸 */
.btn-sm { padding: 6px 10px; font-size: 13px; }

/* 结果高低标记 */
.flag-high { color: #dc2626; font-weight: 700; }
.flag-low { color: #2563eb; font-weight: 700; } /* 蓝色：低于最低值 */
.flag-question { color: #f59e0b; font-weight: 700; } /* 橙色：有疑问（如+-） */

/* 响应式 */
@media (max-width: 768px) {
    .navbar-inner { flex-wrap: wrap; }
    .nav-brand { width: 100%; margin-bottom: 8px; }
    .nav-right { width: 100%; justify-content: space-between; }
    .nav-links { display: none; flex-direction: column; align-items: flex-start; width: 100%; margin-top: 10px; }
    .nav-links.open { display: flex; }
    .nav-toggle { display: block; }
    .nav-dropdown {
        width: 100%;
    }
    .nav-dropdown-toggle {
        width: 100%;
        justify-content: space-between;
    }
    .nav-dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        border-top: 1px solid var(--border);
        margin-top: 0;
        border-radius: 0;
        width: 100%;
    }
    .nav-dropdown-menu a {
        padding-left: 24px;
    }
}

