/* ============================================================
   夕恬管理系统 · 安装向导  —  全新 UI（扁平直角 + 蓝白渐变）
   刻意去除原项目的圆角风格，统一使用直角(border-radius:0)
   ============================================================ */

:root {
    --blue: #1e6bff;
    --blue-600: #155ce0;
    --blue-700: #0b4ed6;
    --ink: #1b2440;
    --muted: #6a7591;
    --line: #e6ebf5;
    --soft: #f4f7fe;
}

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

html,
body {
    min-height: 100%;
}

body {
    font-family: "PingFang SC", "Microsoft YaHei", -apple-system, "Segoe UI", Arial, sans-serif;
    color: var(--ink);
    background: linear-gradient(130deg, #cddffb 0%, #e7f0ff 42%, #f6f9ff 72%, #ffffff 100%);
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 32px 20px;
}

/* ---------- 外层卡片：左右分栏，直角 ---------- */
.installer {
    width: 100%;
    max-width: 1180px;
    height: calc(100vh - 64px);
    min-height: 560px;
    max-height: 880px;
    display: flex;
    background: #ffffff;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(17, 58, 138, 0.18);
}

/* ---------- 左侧：品牌 + 竖向步骤条 ---------- */
.installer-side {
    width: 300px;
    flex: none;
    padding: 42px 32px 30px;
    color: #fff;
    background: linear-gradient(165deg, #3f86ff 0%, #1e6bff 42%, #0b4ed6 100%);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.installer-side::after {
    content: "";
    position: absolute;
    right: -70px;
    bottom: -70px;
    width: 220px;
    height: 220px;
    background: rgba(255, 255, 255, 0.06);
    transform: rotate(45deg);
}

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

.brand-name {
    font-size: 25px;
    font-weight: 800;
    letter-spacing: 1px;
}

.brand-sub {
    margin-top: 10px;
    font-size: 12px;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.72);
}

.steps {
    list-style: none;
    margin-top: 52px;
    flex: 1;
    position: relative;
    z-index: 1;
}

.step {
    display: flex;
    gap: 14px;
    position: relative;
    padding-bottom: 32px;
}

.step:last-child {
    padding-bottom: 0;
}

.step-no {
    width: 36px;
    height: 36px;
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: transparent;
    border-radius: 0;
}

.step:not(:last-child) .step-no::after {
    content: "";
    position: absolute;
    left: 18px;
    top: 36px;
    bottom: 0;
    width: 2px;
    transform: translateX(-1px);
    background: rgba(255, 255, 255, 0.22);
}

.step.done .step-no {
    color: #fff;
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.6);
}

.step.done .step-no::after {
    background: rgba(255, 255, 255, 0.5);
}

.step.active .step-no {
    color: var(--blue);
    background: #fff;
    border-color: #fff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.step-info {
    display: flex;
    flex-direction: column;
    padding-top: 4px;
}

.step-title {
    font-size: 15px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.94);
}

.step-desc {
    font-size: 12px;
    margin-top: 4px;
    color: rgba(255, 255, 255, 0.62);
}

.step.todo .step-title {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.55);
}

.step.todo .step-desc {
    color: rgba(255, 255, 255, 0.4);
}

.side-foot {
    position: relative;
    z-index: 1;
    font-size: 12px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.68);
}

.side-ver {
    display: inline-block;
    margin-bottom: 12px;
    padding: 3px 10px;
    font-size: 11px;
    letter-spacing: 0.5px;
    color: #fff;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.28);
}

/* ---------- 右侧：内容区 ---------- */
.installer-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.main-head {
    padding: 34px 40px 22px;
    border-bottom: 1px solid var(--line);
}

.main-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--ink);
}

.main-sub {
    margin-top: 9px;
    font-size: 13px;
    color: var(--muted);
}

.main-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 26px 40px;
}

.main-foot {
    padding: 18px 40px;
    border-top: 1px solid var(--line);
    background: #fbfcff;
    display: flex;
    justify-content: flex-end;
    gap: 14px;
}

/* ---------- 滚动条 ---------- */
.main-body::-webkit-scrollbar {
    width: 8px;
}

.main-body::-webkit-scrollbar-thumb {
    background: #cdd8ee;
}

.main-body::-webkit-scrollbar-thumb:hover {
    background: #b4c4e6;
}

/* ---------- 按钮（直角） ---------- */
.btn-primary {
    height: 42px;
    padding: 0 32px;
    border: none;
    border-radius: 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #3f86ff 0%, #1e6bff 55%, #0b4ed6 100%);
    transition: filter 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.btn-primary:hover {
    filter: brightness(1.06);
    box-shadow: 0 10px 22px rgba(30, 107, 255, 0.35);
    transform: translateY(-1px);
}

.btn-ghost {
    height: 42px;
    padding: 0 32px;
    border: 1px solid var(--line);
    border-radius: 0;
    cursor: pointer;
    font-size: 14px;
    color: var(--muted);
    background: #fff;
    transition: all 0.15s ease;
}

.btn-ghost:hover {
    border-color: var(--blue);
    color: var(--blue);
}

.btn-loading {
    height: 42px;
    padding: 0 28px;
    border: 1px solid var(--line);
    border-radius: 0;
    cursor: not-allowed;
    font-size: 14px;
    color: #8a94ad;
    background: #eef2fb;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-lg {
    height: 46px;
    padding: 0 44px;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

/* ---------- 步骤一：许可协议 ---------- */
.agreement h2 {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    color: var(--blue-700);
}

.agreement h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--ink);
    padding-left: 12px;
    border-left: 3px solid var(--blue);
}

.agreement p {
    font-size: 13.5px;
    line-height: 1.9;
    color: #3c476a;
}

.mt16 {
    margin-top: 16px;
}

/* ---------- 通用面板 / 表格 ---------- */
.panel {
    border: 1px solid var(--line);
    border-radius: 0;
}

.panel + .panel,
.panel-gap {
    margin-top: 20px;
}

.content-header {
    padding: 11px 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--blue-700);
    background: var(--soft);
    border-bottom: 1px solid var(--line);
    border-left: 3px solid var(--blue);
}

.content-table {
    padding: 0;
}

.layui-table {
    margin: 0;
    width: 100%;
    table-layout: fixed;
    border: none;
    border-collapse: collapse;
}

.layui-table tr,
.layui-table tr td,
.layui-table tr th {
    background-color: #fff !important;
}

.layui-table td,
.layui-table th {
    border: 1px solid var(--line) !important;
    padding: 10px 12px !important;
    line-height: 20px;
    word-break: break-all;
}

.layui-table th {
    font-size: 13px;
    font-weight: 600;
    color: #33406b;
    background: #f7f9ff !important;
}

.layui-table td {
    font-size: 13px;
    color: #3d486a;
}

/* 去掉表格最外一圈重复边框，交给 .content-table 容器统一 */
.content-table .layui-table tr td:first-child,
.content-table .layui-table tr th:first-child {
    border-left: none !important;
}

.content-table .layui-table tr td:last-child,
.content-table .layui-table tr th:last-child {
    border-right: none !important;
}

.content-table .layui-table thead tr th {
    border-top: none !important;
}

.content-table .layui-table tbody tr:last-child td {
    border-bottom: none !important;
}

/* ---------- 提示条 ---------- */
.mounted-tips {
    margin-top: 16px;
    padding: 12px 16px;
    font-size: 13px;
    line-height: 1.7;
    color: var(--blue-700);
    background: #eef4ff;
    border: 1px solid #d5e3ff;
    border-left: 3px solid var(--blue);
    border-radius: 0;
}

/* ---------- 步骤三：表单 ---------- */
.content-form {
    padding: 26px 40px;
}

.form-box-item {
    display: flex;
    align-items: center;
    margin-top: 16px;
}

.form-box-item:first-child {
    margin-top: 0;
}

.form-desc {
    width: 84px;
    flex: none;
    margin-right: 18px;
    text-align: right;
    font-size: 13px;
    color: var(--muted);
}

.form-ctrl {
    flex: 1;
    min-width: 0;
}

.form-box-item input {
    width: 100%;
    max-width: 440px;
    height: 40px;
    padding: 0 14px;
    font-size: 14px;
    color: var(--ink);
    border: 1px solid var(--line);
    border-radius: 0;
    background: #fff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-box-item input:focus {
    outline: none;
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(30, 107, 255, 0.14);
}

.form-hint {
    margin-top: 16px;
    padding-left: 102px;
    font-size: 12px;
    color: #9aa3bd;
}

/* ---------- 步骤四：安装日志 ---------- */
.install-log {
    border: 1px solid var(--line);
    border-radius: 0;
    min-height: 360px;
    padding: 14px 16px;
}

.install-log .log-db {
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
}

.item-cell {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 4px;
    font-size: 13px;
    color: #3d486a;
    border-bottom: 1px dashed var(--line);
    flex-wrap: wrap;
}

.green {
    color: #12b76a;
}

.wrong {
    color: #f5455c;
}

.layui-icon {
    font-size: 16px !important;
}

/* ---------- 步骤五：安装成功 ---------- */
.success {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 100%;
    padding: 20px;
}

.success-badge {
    width: 74px;
    height: 74px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    font-weight: 700;
    color: #fff;
    border-radius: 0;
    background: linear-gradient(135deg, #3f86ff, #0b4ed6);
    box-shadow: 0 14px 32px rgba(30, 107, 255, 0.4);
}

.success-title {
    margin-top: 24px;
    font-size: 22px;
    font-weight: 700;
    color: var(--ink);
}

.success-text {
    margin-top: 12px;
    max-width: 470px;
    font-size: 14px;
    line-height: 1.7;
    color: var(--muted);
}

.success-version {
    margin-top: 10px;
    font-size: 13px;
    color: #9aa3bd;
}

.success-tip {
    margin-top: 24px;
    max-width: 540px;
    padding: 16px 18px;
    text-align: left;
    font-size: 12.5px;
    line-height: 1.8;
    color: var(--muted);
    background: var(--soft);
    border: 1px solid #e0e8f7;
    border-left: 3px solid var(--blue);
    border-radius: 0;
}

.success-tip b {
    color: var(--blue-700);
}

.success .btn-lg {
    margin-top: 30px;
}

/* ---------- 响应式（窄屏时步骤条移到顶部横排） ---------- */
@media (max-width: 980px) {
    body {
        padding: 0;
    }

    .installer {
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        max-height: none;
        max-width: none;
        box-shadow: none;
    }

    .installer-side {
        width: 100%;
        padding: 24px 20px;
    }

    .steps {
        display: flex;
        gap: 14px;
        margin-top: 22px;
        overflow-x: auto;
    }

    .step {
        flex-direction: column;
        min-width: 96px;
        padding-bottom: 0;
    }

    .step:not(:last-child) .step-no::after {
        display: none;
    }

    .side-foot {
        margin-top: 20px;
    }

    .main-head {
        padding: 24px 22px 18px;
    }

    .main-body {
        padding: 22px;
    }

    .main-foot {
        padding: 16px 22px;
    }

    .content-form {
        padding: 22px 18px;
    }

    .form-hint {
        padding-left: 0;
    }
}
