/* 城市更新全流程系统 - 全局样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "Microsoft YaHei", "PingFang SC", sans-serif; background: #f0f2f5; color: #333; font-size: 14px; }
a { text-decoration: none; color: inherit; }

/* 登录页 */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1e3c72 0%, #2a5298 50%, #4b6cb7 100%); }
.login-box { width: 400px; background: #fff; border-radius: 12px; padding: 40px 36px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.login-box h1 { text-align: center; font-size: 24px; color: #1e3c72; margin-bottom: 6px; }
.login-box .sub { text-align: center; color: #999; font-size: 13px; margin-bottom: 30px; }
.login-box .field { margin-bottom: 18px; }
.login-box label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.login-box input { width: 100%; height: 42px; border: 1px solid #d9d9d9; border-radius: 6px; padding: 0 12px; font-size: 14px; outline: none; transition: border .2s; }
.login-box input:focus { border-color: #2a5298; }
.login-box .btn { width: 100%; height: 44px; background: linear-gradient(135deg, #1e3c72, #2a5298); color: #fff; border: none; border-radius: 6px; font-size: 16px; cursor: pointer; margin-top: 6px; }
.login-box .btn:hover { opacity: .92; }
.login-tabs { display: flex; margin-bottom: 24px; border-bottom: 2px solid #eee; }
.login-tabs span { flex: 1; text-align: center; padding: 10px 0; cursor: pointer; color: #888; font-size: 15px; }
.login-tabs span.active { color: #1e3c72; font-weight: bold; border-bottom: 2px solid #1e3c72; margin-bottom: -2px; }
.msg { text-align: center; color: #e74c3c; font-size: 13px; min-height: 20px; margin-top: 10px; }
.link-reg { text-align: center; font-size: 13px; color: #2a5298; margin-top: 12px; cursor: pointer; }

/* 主框架 */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 230px; background: #1e293b; color: #cbd5e1; flex-shrink: 0; display: flex; flex-direction: column; }
.sidebar .brand { padding: 20px 18px; font-size: 17px; font-weight: bold; color: #fff; border-bottom: 1px solid #334155; display: flex; align-items: center; gap: 8px; }
.sidebar .brand .icon { font-size: 20px; }
.sidebar .menu { flex: 1; overflow-y: auto; padding: 10px 0; }
.sidebar .menu-item { padding: 12px 18px; cursor: pointer; display: flex; align-items: center; gap: 10px; transition: background .2s; font-size: 14px; }
.sidebar .menu-item:hover { background: #334155; color: #fff; }
.sidebar .menu-item.active { background: #2a5298; color: #fff; border-left: 3px solid #60a5fa; }
.sidebar .menu-group { padding: 10px 18px 4px; font-size: 12px; color: #64748b; }
.sidebar .user-info { padding: 14px 18px; border-top: 1px solid #334155; font-size: 13px; }
.sidebar .user-info .logout { color: #f87171; cursor: pointer; margin-left: 8px; }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar { height: 56px; background: #fff; border-bottom: 1px solid #e5e7eb; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; box-shadow: 0 1px 4px rgba(0,0,0,.04); }
.topbar .title { font-size: 16px; font-weight: 600; color: #1e293b; }
.topbar .right { display: flex; align-items: center; gap: 16px; font-size: 13px; color: #666; }
.content { flex: 1; padding: 20px 24px; overflow-y: auto; }

/* 卡片与表格 */
.card { background: #fff; border-radius: 8px; padding: 20px; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.card .card-title { font-size: 15px; font-weight: 600; margin-bottom: 16px; color: #1e293b; }
.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; flex-wrap: wrap; gap: 8px; }
.toolbar .left { display: flex; gap: 8px; flex-wrap: wrap; }
.btn { display: inline-block; padding: 8px 16px; border-radius: 6px; font-size: 13px; cursor: pointer; border: none; transition: all .2s; }
.btn-primary { background: #2a5298; color: #fff; }
.btn-primary:hover { opacity: .9; }
.btn-success { background: #16a34a; color: #fff; }
.btn-danger { background: #dc2626; color: #fff; }
.btn-warning { background: #d97706; color: #fff; }
.btn-default { background: #fff; border: 1px solid #d9d9d9; color: #333; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
input[type=text], input[type=password], input[type=number], input[type=date], select, textarea {
  border: 1px solid #d9d9d9; border-radius: 6px; padding: 8px 10px; font-size: 13px; outline: none; font-family: inherit; }
input:focus, select:focus, textarea:focus { border-color: #2a5298; }
.form-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.form-item { display: flex; flex-direction: column; gap: 5px; }
.form-item label { font-size: 12px; color: #666; }
.form-item input, .form-item select { min-width: 160px; }
table.list { width: 100%; border-collapse: collapse; font-size: 13px; }
table.list th { background: #f8fafc; padding: 10px 12px; text-align: left; font-weight: 600; color: #475569; border-bottom: 1px solid #e2e8f0; white-space: nowrap; }
table.list td { padding: 10px 12px; border-bottom: 1px solid #f1f5f9; }
table.list tr:hover td { background: #f8fafc; }

/* 状态标签 */
.tag { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 12px; }
.tag-green { background: #dcfce7; color: #16a34a; }
.tag-blue { background: #dbeafe; color: #2563eb; }
.tag-orange { background: #ffedd5; color: #ea580c; }
.tag-red { background: #fee2e2; color: #dc2626; }
.tag-gray { background: #f1f5f9; color: #64748b; }
.tag-purple { background: #ede9fe; color: #7c3aed; }

/* 仪表盘 */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 16px; }
.stat-card { background: #fff; border-radius: 10px; padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.stat-card .num { font-size: 30px; font-weight: 700; color: #1e293b; margin: 6px 0; }
.stat-card .label { font-size: 13px; color: #64748b; }
.stat-card .icon { font-size: 22px; }
.progress-wrap { background: #f1f5f9; border-radius: 8px; height: 12px; overflow: hidden; margin-top: 8px; }
.progress-bar { height: 100%; background: linear-gradient(90deg, #2a5298, #60a5fa); border-radius: 8px; transition: width .5s; }
.stage-flow { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.stage-node { padding: 8px 14px; border-radius: 20px; font-size: 12px; background: #f1f5f9; color: #64748b; }
.stage-node.done { background: #16a34a; color: #fff; }
.stage-node.current { background: #2a5298; color: #fff; font-weight: bold; }
.stage-arrow { color: #cbd5e1; }

/* 弹窗 */
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: none; align-items: center; justify-content: center; z-index: 100; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 10px; width: 560px; max-width: 92vw; max-height: 88vh; overflow-y: auto; padding: 24px; }
.modal .modal-title { font-size: 16px; font-weight: 600; margin-bottom: 18px; }
.modal .modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.tabs { display: flex; border-bottom: 2px solid #e2e8f0; margin-bottom: 16px; flex-wrap: wrap; }
.tabs .tab { padding: 10px 18px; cursor: pointer; color: #64748b; font-size: 14px; border-bottom: 2px solid transparent; margin-bottom: -2px; }
.tabs .tab.active { color: #2a5298; font-weight: 600; border-bottom-color: #2a5298; }

.empty { text-align: center; color: #94a3b8; padding: 40px 0; font-size: 13px; }
.loading { text-align: center; color: #94a3b8; padding: 30px 0; }
.pager { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; align-items: center; font-size: 13px; color: #64748b; }

/* V3：悬停气泡提示（V4 改白底黑字简洁风） */
.pop-trigger { position: relative; cursor: help; border-bottom: 1px dashed #94a3b8; }
.pop-trigger:hover::after {
    content: attr(data-tip);
    position: absolute; left: 0; bottom: calc(100% + 8px); z-index: 99;
    background: #fff; color: #334155; font-size: 12px; line-height: 1.8;
    padding: 8px 12px; border-radius: 6px; white-space: pre-line;
    min-width: 120px; border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(15,23,42,.12);
}
.pop-trigger:hover::before {
    content: ''; position: absolute; left: 20px; bottom: calc(100% + 2px); z-index: 100;
    border: 6px solid transparent; border-top-color: #e2e8f0;
}
