/* 预约挂号系统自定义样式 —— 现代医疗风（医疗蓝主色 + 状态色） */

:root {
    --medical-blue: #0D6EFD;
    --medical-blue-2: #38b6ff;
    --medical-light: #E7F1FF;
    --medical-bg-1: #eaf3ff;
    --medical-bg-2: #f6f9fe;
    --status-valid: #198754;   /* 有效 绿 */
    --status-invalid: #DC3545; /* 无效 红 */
    --status-arrived: #0D6EFD; /* 已到 蓝 */
    --status-notyet: #6C757D;  /* 未到 灰 */
    --ink: #1f2d3d;
    --muted: #6b7a90;
}

* { -webkit-tap-highlight-color: transparent; }

body {
    background:
        radial-gradient(1200px 480px at 50% -12%, var(--medical-bg-1), transparent 60%),
        linear-gradient(180deg, var(--medical-bg-2) 0%, #ffffff 100%);
    background-attachment: fixed;
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
}

/* 顶部导航渐变 */
.navbar.navbar-gradient {
    background: linear-gradient(120deg, #0D6EFD 0%, #2f8bff 55%, #38b6ff 100%) !important;
    box-shadow: 0 4px 18px rgba(13, 110, 253, 0.25);
}
.navbar.navbar-gradient .navbar-brand {
    font-weight: 700; letter-spacing: .5px;
}

/* 表单外壳：限制最大宽度并居中 */
.form-shell { max-width: 760px; margin: 0 auto; }

/* Hero 区域 */
.hero { text-align: center; padding: 6px 0 24px; }
.hero .hero-icon {
    width: 64px; height: 64px; border-radius: 18px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 32px;
    background: linear-gradient(135deg, #0D6EFD, #38b6ff);
    box-shadow: 0 10px 24px rgba(13, 110, 253, 0.30);
    margin-bottom: 14px;
}
.hero h1 { font-size: 1.55rem; font-weight: 800; margin: 0; color: var(--ink); }
.hero p { color: var(--muted); margin: 8px 0 0; font-size: .95rem; }

/* 表单卡片 */
.booking-card {
    background: #fff;
    border: 1px solid #eaf0f8;
    border-radius: 20px;
    box-shadow: 0 12px 40px rgba(13, 110, 253, 0.10), 0 2px 8px rgba(13, 110, 253, 0.04);
    padding: 1.75rem;
}

/* 分区标题 */
.section-title {
    display: flex; align-items: center; gap: 8px;
    font-size: .92rem; font-weight: 700; color: var(--medical-blue);
    margin: 1.5rem 0 .9rem;
}
.section-title::before {
    content: ""; width: 4px; height: 16px; border-radius: 4px;
    background: linear-gradient(180deg, #0D6EFD, #38b6ff);
}
.section-title .st-num {
    width: 20px; height: 20px; border-radius: 50%;
    background: var(--medical-light); color: var(--medical-blue);
    font-size: .72rem; display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700;
}
.section-title:first-of-type { margin-top: .25rem; }

/* 必填星号 */
.req { color: #ff4d4f; font-weight: 700; }

/* 输入框通用样式 */
.form-control, .form-select {
    border-radius: 11px;
    border: 1.5px solid #e3e9f2;
    padding: .6rem .9rem;
    background: #fbfdff;
    transition: border-color .18s, box-shadow .18s, background .18s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--medical-blue);
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.12);
    background: #fff;
}
.form-label { font-weight: 600; color: #2c3e50; margin-bottom: .35rem; font-size: .9rem; }

/* 图标输入组 */
.input-icon .input-group-text {
    background: #f1f6ff;
    border: 1.5px solid #e3e9f2;
    border-right: none;
    border-radius: 11px 0 0 11px;
    color: var(--medical-blue);
    font-size: 1.05rem;
}
.input-icon .form-control, .input-icon .form-select {
    border-radius: 0 11px 11px 0;
}
.input-icon:focus-within .input-group-text { border-color: var(--medical-blue); }

/* 安全验证块 */
.captcha-block {
    background: linear-gradient(180deg, #f5f9ff, #eef5ff);
    border: 1.5px dashed #b9d4ff;
    border-radius: 14px;
    padding: 1rem 1.1rem;
}
.captcha-img {
    width: 200px; max-width: 100%; height: auto;
    border-radius: 10px; border: 1px solid #dbe7fb;
    background: #fff; flex: 0 0 auto;
    box-shadow: 0 4px 14px rgba(13, 110, 253, 0.08);
}
.captcha-answer {
    width: 130px; max-width: 45%; flex: 0 0 auto;
    text-align: center; font-weight: 700; letter-spacing: 2px;
    border-radius: 11px !important;
}
.btn-refresh {
    border-radius: 11px; border-color: #cfe0ff; color: var(--medical-blue);
    background: #fff; transition: background .15s;
}
.btn-refresh:hover { background: var(--medical-light); }
.captcha-hint { font-size: .82rem; color: var(--muted); margin-top: 8px; }

/* 渐变提交按钮 */
.btn-grad {
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #0D6EFD 0%, #38b6ff 100%);
    color: #fff; font-weight: 700; letter-spacing: 1px;
    padding: .8rem 1rem;
    box-shadow: 0 10px 24px rgba(13, 110, 253, 0.30);
    transition: transform .12s ease, box-shadow .12s ease, filter .12s;
}
.btn-grad:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(13, 110, 253, 0.38); filter: brightness(1.03); color: #fff; }
.btn-grad:active { transform: translateY(0); }

/* 提示卡 */
.tip-card {
    background: #eef6ff; border: 1px solid #d6e8ff; border-radius: 12px;
    padding: .8rem 1rem; color: #2c5fa8; font-size: .86rem; line-height: 1.5;
}
.tip-card b { color: #0D6EFD; }

/* 状态徽章配色 */
.badge-valid   { background: var(--status-valid); color: #fff; }
.badge-invalid { background: var(--status-invalid); color: #fff; }
.badge-arrived { background: var(--status-arrived); color: #fff; }
.badge-notyet  { background: var(--status-notyet); color: #fff; }

/* 后台表格适配 */
.table th, .table td { vertical-align: middle; }

/* 移动端卡片化（窄屏） */
@media (max-width: 768px) {
    .desktop-table { display: none; }
    .mobile-card { display: block; }
}
@media (min-width: 769px) {
    .desktop-table { display: table; }
    .mobile-card { display: none; }
}
.mobile-card {
    border: 1px solid #e6ebf2;
    border-radius: 12px;
    padding: 0.9rem;
    margin-bottom: 0.8rem;
    background: #fff;
}
.mobile-card .row-meta { display: flex; justify-content: space-between; padding: 2px 0; }

/* 后台顶栏 */
.admin-nav { box-shadow: 0 2px 10px rgba(0,0,0,0.08); }

/* 响应式微调 */
@media (max-width: 480px) {
    .booking-card { padding: 1.15rem; border-radius: 16px; }
    .hero h1 { font-size: 1.3rem; }
    .captcha-img { width: 160px; }
    .captcha-answer { width: 100px; }
}

/* ============ 成功页：提交信息 ============ */
.success-head { text-align: center; padding-bottom: 4px; }
.success-icon { font-size: 46px; line-height: 1; }
.info-block {
    background: linear-gradient(180deg, #f5f9ff, #eef5ff);
    border: 1.5px solid #d8e8ff; border-radius: 14px; padding: 1rem 1.1rem; margin-top: 4px;
}
.info-block-title { font-weight: 700; color: var(--medical-blue); margin-bottom: .7rem; font-size: .92rem; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem .9rem; }
.info-item { display: flex; flex-direction: column; }
.info-label { font-size: .72rem; color: var(--muted); }
.info-value { font-size: .98rem; font-weight: 600; color: var(--ink); word-break: break-all; }
.info-symptom { margin-top: .7rem; border-top: 1px dashed #cfe0ff; padding-top: .6rem; }
.info-symptom .info-value { font-weight: 500; line-height: 1.5; white-space: pre-wrap; }
@media (max-width: 480px) { .info-grid { grid-template-columns: 1fr; } }

/* ============ 前台医院信息卡 ============ */
.hospital-card {
    background: #fff; border: 1px solid #eaf0f8; border-radius: 16px;
    box-shadow: 0 8px 26px rgba(13, 110, 253, 0.07);
    padding: 1.1rem 1.2rem; margin-top: 1.1rem;
}
.hc-title { font-weight: 800; color: var(--ink); margin-bottom: .6rem; font-size: 1rem; }
.hc-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; color: #34507a; font-size: .92rem; }
.hc-row a { color: var(--medical-blue); text-decoration: none; font-weight: 600; }
.hc-ico { font-size: 1.05rem; }

/* ============ 后台仪表盘 ============ */
.admin-wrap { max-width: 1180px; }
.dash-grid {
    display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; margin-bottom: 18px;
}
.dash-card {
    border-radius: 16px; padding: 16px 14px; color: #fff; position: relative; overflow: hidden;
    box-shadow: 0 8px 22px rgba(0,0,0,0.10);
}
.dash-card::after {
    content: ""; position: absolute; right: -24px; top: -24px; width: 86px; height: 86px;
    background: rgba(255,255,255,0.16); border-radius: 50%;
}
.dc-num { font-size: 1.85rem; font-weight: 800; line-height: 1.1; }
.dc-label { font-size: .82rem; opacity: .95; margin-top: 2px; }
.c-blue   { background: linear-gradient(135deg, #0D6EFD, #3d92ff); }
.c-cyan   { background: linear-gradient(135deg, #0dcaf0, #36d6e6); }
.c-purple { background: linear-gradient(135deg, #6f42c1, #9a6bef); }
.c-gray   { background: linear-gradient(135deg, #6c757d, #95a0ad); }
.c-orange { background: linear-gradient(135deg, #fd7e14, #ffa04d); }
.c-green  { background: linear-gradient(135deg, #198754, #36c281); }
@media (max-width: 992px) { .dash-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .dash-grid { grid-template-columns: repeat(2, 1fr); } .dc-num { font-size: 1.5rem; } }

/* 跟进提醒 */
.reminder-box {
    background: linear-gradient(180deg, #fff7ec, #fff1dd); border: 1.5px solid #ffd9a0;
    border-radius: 14px; padding: 1rem 1.1rem; margin-bottom: 16px;
}
.reminder-title { font-weight: 700; color: #b5650b; margin-bottom: .6rem; }
.reminder-list { display: flex; flex-direction: column; gap: 6px; }
.reminder-item {
    display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
    background: #fff; border: 1px solid #ffe3b8; border-radius: 10px; padding: 6px 10px; font-size: .88rem;
}
.rm-date { font-weight: 700; color: #0D6EFD; }
.rm-name { font-weight: 600; }
.rm-phone { color: #555; }
.rm-dept { color: #999; margin-left: auto; }

/* 后台表格/筛选微调 */
.filter-bar { background: #fff; border: 1px solid #eef1f6; border-radius: 12px; padding: 12px; }
.admin-table { border-radius: 10px; overflow: hidden; }
.badge-done    { background: var(--status-valid); color: #fff; }
.badge-pending { background: var(--status-invalid); color: #fff; }

