/* ===== 全局（对应原 top.asp / bottom.asp 风格） ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    background: #f5f5f5;
    color: #333;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.top-bar {
    background: #1976d2;
    color: #fff;
    height: 50px;
    line-height: 50px;
    padding: 0 20px;
}
.top-bar .logo { font-size: 18px; font-weight: bold; float: left; }
.top-bar .logo.logo-lg { font-size: 24px; }
.top-bar .nav { float: right; }
.top-bar .nav a {
    color: #fff;
    text-decoration: none;
    margin-left: 20px;
    font-size: 14px;
}
.top-bar .nav a:hover { text-decoration: underline; }
.clear { clear: both; }

.page-body { flex: 1; width: 100%; }

.bottom-bar {
    background: #f5f5f5;
    color: #666;
    text-align: center;
    padding: 15px;
    font-size: 12px;
    border-top: 1px solid #ddd;
    margin-top: 20px;
}

/* ===== 通用卡片 / 表格 ===== */
.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin: 15px auto;
}
.card-title { font-size: 18px; color: #333; margin-bottom: 15px; font-weight: bold; }
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: #fff;
}
.table th {
    background: #1976d2;
    color: #fff;
    padding: 8px 10px;
    text-align: left;
    font-weight: normal;
}
.table td { padding: 8px 10px; border-bottom: 1px solid #eee; }
.table tr:hover td { background: #f5f9ff; }
.btn {
    display: inline-block;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    color: #fff;
    background: #1976d2;
}
.btn:hover { opacity: 0.85; text-decoration: none; color: #fff; }
.btn-green { background: #388e3c; }
.btn-red { background: #d32f2f; }
.btn-gray { background: #757575; }
.btn-sm { padding: 4px 10px; font-size: 13px; }
input[type=text], input[type=password], select, textarea {
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: #1976d2; }

.msg-ok { background: #e8f5e9; color: #1b5e20; border: 1px solid #a5d6a7; padding: 10px 15px; border-radius: 4px; margin: 10px 0; font-size: 14px; }
.msg-err { background: #ffebee; color: #c62828; border: 1px solid #ef9a9a; padding: 10px 15px; border-radius: 4px; margin: 10px 0; font-size: 14px; }

/* ===== 登录页（对应原 index.asp） ===== */
.login-wrap {
    max-width: 900px;
    margin: 40px auto;
    display: flex;
    flex-wrap: wrap;        /* 允许新生入学须知占满整行 */
    gap: 30px;
    justify-content: center;
    align-items: stretch;   /* 两登录框等高，视觉一致 */
}
.login-notice {
    flex: 1 1 100%;
    background: #fff8e1;
    border: 1px solid #ffcc02;
    border-radius: 8px;
    padding: 16px 22px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.login-notice h3 {
    margin: 0 0 8px;
    font-size: 16px;
    color: #6d4c00;
    border-bottom: 1px dashed #ffcc02;
    padding-bottom: 8px;
}
.login-notice .login-notice-body {
    font-size: 14px;
    line-height: 1.8;
    color: #4e342e;
    word-break: break-all;
    font-variant-numeric: tabular-nums;
    text-autospace: no-autospace;
    -webkit-text-autospace: no-autospace;
}
/* 新生入学须知富文本图片：不超出卡片宽度、居中显示 */
.login-notice .login-notice-body img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    display: block;
    margin: 10px auto;
}
.login-notice .login-notice-body p { margin: 6px 0; }
.login-notice .login-notice-body ul, .login-notice .login-notice-body ol { margin: 6px 0; padding-left: 24px; }
.login-box { width: 400px; padding: 30px; background: #fff; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); display: flex; flex-direction: column; }
.login-box.student { border-top: 4px solid #1976d2; }
.login-box.teacher { border-top: 4px solid #388e3c; }
.login-box h2 { text-align: center; color: #333; margin-bottom: 20px; font-size: 22px; }
.login-box label { display: block; margin-bottom: 5px; color: #555; font-size: 14px; }
.login-box .pwd-note { font-size: 14px; color: #90a4ae; font-weight: normal; margin-left: 2px; }
.login-box .pwd-example { color: #d32f2f; font-size: 13px; margin-top: 6px; line-height: 1.6; }
.login-box input[type=text], .login-box input[type=password] { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; box-sizing: border-box; }
.login-box input:focus, .login-box select:focus, .login-box textarea:focus { border-color: #1976d2; }
.login-box form { flex: 1; display: flex; flex-direction: column; }
.login-box form button { margin-top: 22px; }
.login-box button { width: 100%; padding: 12px; color: #fff; border: none; border-radius: 4px; font-size: 16px; cursor: pointer; }
.login-box.student button { background: #1976d2; }
.login-box.teacher button { background: #388e3c; }
.login-box .form-item { margin-bottom: 15px; }
.login-box .err-msg { color: #d32f2f; text-align: center; margin-bottom: 10px; font-size: 14px; }
.login-box .cap-row { display: flex; align-items: center; gap: 10px; }
.login-box .cap-row input { flex: 1; min-width: 0; }
.login-box .cap-img { width: 110px; height: 40px; border: 1px solid #ddd; border-radius: 4px; cursor: pointer; flex-shrink: 0; background: #f5f5f5; }
.login-box .cap-hint { font-size: 12px; color: #90a4ae; margin-top: 4px; }
.login-box .extra-info { margin-top: 20px; padding: 12px 15px; border-radius: 4px; font-size: 14px; line-height: 1.8; word-break: break-all; font-variant-numeric: tabular-nums; text-autospace: no-autospace; -webkit-text-autospace: no-autospace; }
.login-box .extra-info.e1 { background: #fff8e1; border: 1px solid #ffcc02; color: #6d4c00; }
.login-box .extra-info.e2 { background: #e8f5e9; border: 1px solid #a5d6a7; color: #1b5e20; margin-top: 10px; }
.login-box .extra-info b { display: block; margin-bottom: 3px; }

/* ===== 表单页（对应 xsinfo.asp / tuser_edit.asp） ===== */
.form-wrap { max-width: 860px; margin: 20px auto; background: #fff; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); padding: 25px; }
.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px 20px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid label { display: block; font-size: 13px; color: #555; margin-bottom: 4px; }
.form-grid label .req { color: #d32f2f; }
.form-grid input[type=text], .form-grid input[type=password], .form-grid select { width: 100%; }
.form-grid textarea { width: 100%; min-height: 60px; resize: vertical; }
.form-actions { margin-top: 20px; text-align: center; }
.form-actions .btn { min-width: 120px; margin: 0 8px; }
.required-hint { color: #d32f2f; font-size: 12px; margin: 8px 0; }
.readonly-flag { background: #fff3e0; border: 1px solid #ffb74d; color: #e65100; padding: 8px 12px; border-radius: 4px; font-size: 13px; margin-bottom: 15px; }

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .top-bar { height: auto; line-height: 1.5; padding: 8px 10px; text-align: center; }
    .top-bar .logo { float: none; font-size: 15px; margin-bottom: 6px; }
    .top-bar .logo.logo-lg { font-size: 21px; }
    .top-bar .nav { float: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 6px; }
    .top-bar .nav a { margin: 0; font-size: 13px; padding: 4px 8px; border-radius: 4px; background: rgba(255,255,255,0.15); }
    .top-bar .nav a:hover { background: rgba(255,255,255,0.3); text-decoration: none; }
    .login-wrap { flex-direction: column; margin: 20px 10px; gap: 20px; }
    .login-box { width: 100%; padding: 20px 15px; box-sizing: border-box; }
    .login-box h2 { font-size: 18px; }
    .login-box input[type=text], .login-box input[type=password] { padding: 12px 10px; font-size: 16px; }
    .login-box button { padding: 14px; font-size: 18px; }
    .login-box .extra-info { font-size: 15px; padding: 10px 12px; }
    .form-wrap { margin: 10px; padding: 15px; }
    .form-grid { grid-template-columns: 1fr; }
    .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .table { font-size: 13px; min-width: 600px; }
}
