/* ==========================================================================
   海图授权管理系统 - 基础样式（浅色主题）
   ========================================================================== */
:root {
    --bg: #f4f7fc;
    --bg-soft: #eef3fb;
    --panel: #ffffff;
    --ink: #0f1d33;
    --ink-2: #47566d;
    --ink-3: #8794a8;
    --line: #e5ecf6;
    --line-2: #d6e0ee;
    --brand: #2563eb;
    --brand-dark: #1d4ed8;
    --brand-soft: #eaf1ff;
    --violet: #7c3aed;
    --green: #0d9b64;
    --green-soft: #e6f8f0;
    --amber: #c2740a;
    --amber-soft: #fdf3e2;
    --red: #d92d20;
    --red-soft: #fdeceb;
    --gray-soft: #f1f4f9;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow-sm: 0 2px 8px rgba(16, 32, 56, .05);
    --shadow: 0 10px 30px rgba(16, 32, 56, .07);
    --shadow-lg: 0 24px 60px rgba(16, 32, 56, .12);
    --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--ink);
    font-size: 14px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }

h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: .2px; }

code, pre, .mono { font-family: var(--mono); }

code {
    background: var(--bg-soft);
    padding: 2px 6px;
    border-radius: 5px;
    font-size: 12.5px;
    color: #33415c;
    word-break: break-all;
}

/* ---------- 按钮 ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    height: 40px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--brand), #4f46e5);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: .18s ease;
    box-shadow: 0 8px 18px rgba(37, 99, 235, .22);
    white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 12px 24px rgba(37, 99, 235, .28); color: #fff; }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

.btn-ghost {
    background: #fff;
    border-color: var(--line-2);
    color: var(--ink-2);
    box-shadow: none;
}
.btn-ghost:hover { background: var(--bg-soft); color: var(--ink); box-shadow: none; }

.btn-danger { background: linear-gradient(135deg, #ef4444, #dc2626); box-shadow: 0 8px 18px rgba(220, 38, 38, .2); }
.btn-sm { height: 30px; padding: 0 12px; font-size: 12.5px; border-radius: 8px; box-shadow: none; font-weight: 500; }
.btn-sm:hover { box-shadow: none; }
.btn-block { width: 100%; }
.btn-link {
    background: none; border: 0; padding: 0; height: auto; box-shadow: none;
    color: var(--brand); font-size: 12.5px; font-weight: 500; cursor: pointer;
}
.btn-link:hover { text-decoration: underline; color: var(--brand-dark); box-shadow: none; transform: none; }
.btn-link.danger { color: var(--red); }

/* ---------- 徽标 ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    height: 23px;
    padding: 0 9px;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}
.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge-blue { background: var(--brand-soft); color: var(--brand-dark); }
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-amber { background: var(--amber-soft); color: var(--amber); }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-gray { background: var(--gray-soft); color: #64748b; }

/* ---------- 通用面板 ---------- */
.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.panel-pad { padding: 22px; }
.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 22px;
    border-bottom: 1px solid var(--line);
}
.panel-head h3 { font-size: 14.5px; }
.panel-head .sub { font-size: 12.5px; color: var(--ink-3); }

/* ---------- 表单控件 ---------- */
.field { margin-bottom: 15px; }
.field > label {
    display: block;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--ink-2);
    margin-bottom: 6px;
}
.input, select, textarea {
    width: 100%;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--line-2);
    border-radius: var(--radius-sm);
    background: #fbfcfe;
    font-size: 13.5px;
    font-family: inherit;
    color: var(--ink);
    outline: none;
    transition: .16s;
}
textarea { height: auto; padding: 10px 12px; line-height: 1.6; resize: vertical; }
.input:focus, select:focus, textarea:focus {
    border-color: var(--brand);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.input::placeholder { color: #a8b4c6; }
select { cursor: pointer; }
.hint { font-size: 12px; color: var(--ink-3); margin-top: 6px; line-height: 1.7; }
.req::after { content: " *"; color: var(--red); }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 720px) { .form-grid { grid-template-columns: 1fr; } }

.inline-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.inline-form .field { margin-bottom: 0; }

/* ---------- 表格 ---------- */
.table-wrap { width: 100%; overflow-x: auto; }
table.tb {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
table.tb th {
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--ink-3);
    letter-spacing: .3px;
    padding: 11px 14px;
    background: #f8fafd;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
table.tb td {
    padding: 13px 14px;
    border-bottom: 1px solid #f0f4fa;
    color: var(--ink-2);
    vertical-align: middle;
}
table.tb tbody tr:hover td { background: #fafcff; }
table.tb tbody tr:last-child td { border-bottom: 0; }
table.tb .key { font-family: var(--mono); font-size: 12.5px; color: var(--ink); font-weight: 600; letter-spacing: .3px; }
table.tb .nw { white-space: nowrap; }
table.tb .muted { color: var(--ink-3); }
table.tb .actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.empty {
    padding: 46px 20px;
    text-align: center;
    color: var(--ink-3);
    font-size: 13px;
}
.empty .big { font-size: 30px; display: block; margin-bottom: 8px; opacity: .35; }

/* ---------- 分页 ---------- */
.pager { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 16px 0 2px; }
.pg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    border: 1px solid var(--line-2);
    border-radius: 8px;
    background: #fff;
    color: var(--ink-2);
    font-size: 12.5px;
}
.pg:hover { border-color: var(--brand); color: var(--brand); }
.pg-on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.pg-on:hover { color: #fff; }
.pg-off { opacity: .45; }
.pg-dot { color: var(--ink-3); padding: 0 2px; }

/* ---------- 提示条 ---------- */
.flash { border-radius: var(--radius-sm); padding: 11px 14px; font-size: 13px; margin-bottom: 14px; line-height: 1.6; border: 1px solid; }
.flash-ok { background: var(--green-soft); border-color: #b7ebd3; color: #0a7d52; }
.flash-err { background: var(--red-soft); border-color: #f9c7c3; color: #b42318; }
.flash-info { background: var(--brand-soft); border-color: #c7dbff; color: var(--brand-dark); }
.flash-warn { background: var(--amber-soft); border-color: #f5ddb0; color: #96530a; }

/* ---------- 状态页 ---------- */
.result-box { border-radius: var(--radius); border: 1px solid var(--line); overflow: hidden; }
.result-head {
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: linear-gradient(135deg, #f7faff, #eef4ff);
    border-bottom: 1px solid var(--line);
}
.result-head .key { font-family: var(--mono); font-size: 15px; font-weight: 700; letter-spacing: 1px; color: var(--ink); }
.kv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; }
.kv > div { padding: 13px 20px; border-bottom: 1px solid #f0f4fa; }
.kv > div:nth-child(odd) { border-right: 1px solid #f0f4fa; }
.kv dt { font-size: 12px; color: var(--ink-3); margin: 0 0 3px; }
.kv dd { margin: 0; font-size: 13.5px; color: var(--ink); font-weight: 550; }
@media (max-width: 620px) { .kv { grid-template-columns: 1fr; } .kv > div:nth-child(odd) { border-right: 0; } }

/* ---------- 进度条 ---------- */
.progress { height: 6px; border-radius: 4px; background: var(--bg-soft); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--brand), var(--violet)); }

/* ---------- 公共站点 ---------- */
.site-wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

.site-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, .82);
    border-bottom: 1px solid rgba(229, 236, 246, .9);
}
.site-nav .inner {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 20px;
    height: 62px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.brandmark { display: flex; align-items: center; gap: 10px; }
.brandmark .logo {
    width: 34px; height: 34px; border-radius: 10px;
    background: linear-gradient(135deg, var(--brand), var(--violet));
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 15px;
    box-shadow: 0 6px 16px rgba(37, 99, 235, .28);
}
.brandmark strong { font-size: 15px; font-weight: 650; letter-spacing: .3px; }
.brandmark small { display: block; font-size: 11px; color: var(--ink-3); font-weight: 400; letter-spacing: .2px; }
.site-nav .links { display: flex; gap: 20px; font-size: 13px; color: var(--ink-2); }
.site-nav .links a:hover { color: var(--brand); }

.hero {
    position: relative;
    padding: 54px 0 40px;
    overflow: hidden;
}
.hero::before {
    content: "";
    position: absolute;
    inset: -40% 30% auto -10%;
    height: 420px;
    background: radial-gradient(circle at 30% 40%, rgba(37, 99, 235, .16), transparent 62%);
    pointer-events: none;
}
.hero::after {
    content: "";
    position: absolute;
    inset: -30% -10% auto 55%;
    height: 380px;
    background: radial-gradient(circle at 60% 50%, rgba(124, 58, 237, .13), transparent 60%);
    pointer-events: none;
}
.hero .inner { position: relative; }
.hero h1 { font-size: 34px; line-height: 1.3; margin-bottom: 12px; letter-spacing: -.5px; }
.hero h1 em {
    font-style: normal;
    background: linear-gradient(120deg, var(--brand), var(--violet));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero p.lead { font-size: 14.5px; color: var(--ink-2); max-width: 560px; margin: 0 0 22px; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.tagpill {
    display: inline-flex; align-items: center; gap: 6px;
    background: #fff; border: 1px solid var(--line);
    border-radius: 999px; padding: 5px 13px; font-size: 12.5px; color: var(--ink-2);
    box-shadow: var(--shadow-sm);
}
.tagpill i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); }

.query-panel { padding: 24px; }
.query-panel h2 { font-size: 15.5px; margin-bottom: 4px; }
.query-panel .sub { font-size: 12.5px; color: var(--ink-3); margin-bottom: 16px; }
.query-row { display: flex; gap: 10px; }
.query-row .input { height: 44px; font-family: var(--mono); letter-spacing: 1px; text-transform: uppercase; }
.query-row .btn { height: 44px; padding: 0 24px; }

.section { padding: 12px 0 34px; }
.section-title { font-size: 16px; margin-bottom: 4px; }
.section-sub { font-size: 13px; color: var(--ink-3); margin-bottom: 18px; }

.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 860px) { .grid-3 { grid-template-columns: 1fr; } .grid-2 { grid-template-columns: 1fr; } }

.feature { padding: 20px; }
.feature .ico {
    width: 38px; height: 38px; border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    background: var(--brand-soft); color: var(--brand);
    font-size: 17px; margin-bottom: 12px;
}
.feature h4 { font-size: 14px; margin-bottom: 6px; }
.feature p { margin: 0; font-size: 12.8px; color: var(--ink-2); line-height: 1.75; }

.faq-item { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq-item:last-child { border-bottom: 0; }
.faq-item h4 { font-size: 13.5px; margin-bottom: 5px; color: var(--ink); }
.faq-item p { margin: 0; font-size: 12.8px; color: var(--ink-2); line-height: 1.8; }

.site-foot {
    border-top: 1px solid var(--line);
    padding: 26px 0 40px;
    margin-top: 20px;
    font-size: 12.5px;
    color: var(--ink-3);
    text-align: center;
    line-height: 2;
}
.site-foot a { color: var(--ink-2); }

.announce {
    display: flex; gap: 10px; align-items: flex-start;
    background: var(--amber-soft); border: 1px solid #f6e2bd; color: #8a5108;
    border-radius: var(--radius-sm); padding: 11px 14px; font-size: 12.8px; margin-bottom: 18px;
}

/* ---------- 工具类 ---------- */
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.wrap-gap { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.mt0 { margin-top: 0; } .mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.mb0 { margin-bottom: 0; } .mb8 { margin-bottom: 8px; } .mb16 { margin-bottom: 16px; }
.text-sm { font-size: 12.5px; }
.text-muted { color: var(--ink-3); }
.text-mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.copy-box {
    font-family: var(--mono); font-size: 12.5px; background: #f7f9fd;
    border: 1px dashed var(--line-2); border-radius: var(--radius-sm);
    padding: 12px 14px; white-space: pre-wrap; word-break: break-all; color: #33415c; line-height: 1.9;
}
pre.code {
    background: #0f1d33; color: #dbe6f5; padding: 16px 18px; border-radius: var(--radius-sm);
    overflow-x: auto; font-size: 12.5px; line-height: 1.85; margin: 0;
}
pre.code .cm { color: #7f93ad; }
.docs h3 { font-size: 14.5px; margin: 26px 0 10px; }
.docs h4 { font-size: 13.5px; margin: 18px 0 8px; color: var(--brand-dark); }
.docs p { font-size: 13px; color: var(--ink-2); line-height: 1.85; }
.docs ul { font-size: 13px; color: var(--ink-2); line-height: 1.95; padding-left: 20px; }
