/* ============================================================
   ZakaPanel 设计系统
   深空暗色 + 青绿主色，管理面板调性
   ============================================================ */

:root {
    --bg: #0b0f19;
    --bg-soft: #0f1524;
    --panel: #131a2b;
    --panel-2: #18223a;
    --line: #23304d;
    --line-soft: #1c2740;
    --text: #e6ecff;
    --text-dim: #9aa8c7;
    --text-mute: #6b7899;
    --brand: #2ee6c5;
    --brand-2: #7c5cff;
    --brand-dim: rgba(46, 230, 197, .12);
    --ok: #35d07f;
    --warn: #f2b73d;
    --danger: #ff5f6d;
    --info: #4aa8ff;
    --radius: 14px;
    --radius-sm: 10px;
    --shadow: 0 10px 30px rgba(0, 0, 0, .35);
    --sidebar-w: 230px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

body {
    background-image:
        radial-gradient(900px 500px at 12% -10%, rgba(46, 230, 197, .10), transparent 60%),
        radial-gradient(800px 460px at 92% 0%, rgba(124, 92, 255, .12), transparent 60%);
    background-attachment: fixed;
    min-height: 100vh;
}

a { color: var(--brand); text-decoration: none; }
a:hover { opacity: .85; }

h1, h2, h3, h4 { margin: 0 0 12px; font-weight: 650; line-height: 1.35; color: #fff; }
h1 { font-size: 24px; }
h2 { font-size: 19px; }
h3 { font-size: 16px; }
p { margin: 0 0 10px; }

.ic { flex: none; vertical-align: -3px; }

/* ------------------------------------------------------------ 布局 */
.layout { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-w);
    flex: none;
    background: linear-gradient(180deg, #101728, #0c1120);
    border-right: 1px solid var(--line-soft);
    padding: 18px 14px;
    position: fixed;
    top: 0; bottom: 0; left: 0;
    overflow-y: auto;
    z-index: 50;
    transition: transform .24s ease;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: #223052; border-radius: 3px; }

.brand {
    display: flex; align-items: center; gap: 10px;
    padding: 4px 8px 18px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--line-soft);
}
.brand-logo {
    width: 34px; height: 34px; flex: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--brand), var(--brand-2));
    display: grid; place-items: center;
    color: #06121a; font-weight: 800;
    box-shadow: 0 6px 18px rgba(46, 230, 197, .25);
}
.brand-name { font-weight: 700; font-size: 15px; color: #fff; letter-spacing: .3px; }
.brand-sub { font-size: 11px; color: var(--text-mute); }

.nav-group { margin-top: 16px; }
.nav-title {
    font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase;
    color: var(--text-mute); padding: 0 10px 8px; font-weight: 600;
}
.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 11px;
    border-radius: var(--radius-sm);
    color: var(--text-dim);
    font-size: 13.5px;
    margin-bottom: 2px;
    transition: background .16s, color .16s;
}
.nav-item:hover { background: rgba(255, 255, 255, .04); color: var(--text); opacity: 1; }
.nav-item.active {
    background: linear-gradient(90deg, rgba(46, 230, 197, .16), rgba(46, 230, 197, .02));
    color: #fff;
    box-shadow: inset 2px 0 0 var(--brand);
}
.nav-item .badge-mini {
    margin-left: auto; font-size: 11px; padding: 1px 7px;
    background: rgba(46, 230, 197, .16); color: var(--brand); border-radius: 20px;
}

.main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; }

.topbar {
    height: 62px;
    display: flex; align-items: center; gap: 14px;
    padding: 0 22px;
    border-bottom: 1px solid var(--line-soft);
    background: rgba(11, 15, 25, .82);
    backdrop-filter: blur(10px);
    position: sticky; top: 0; z-index: 40;
}
.topbar h1 { font-size: 17px; margin: 0; }
.topbar-sub { font-size: 12px; color: var(--text-mute); }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.menu-btn {
    display: none;
    width: 38px; height: 38px; border-radius: 10px;
    background: var(--panel); border: 1px solid var(--line);
    color: var(--text); align-items: center; justify-content: center; cursor: pointer;
}

.content { padding: 22px; flex: 1; min-width: 0; }
.content > * + * { margin-top: 18px; }

.page-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.page-head .spacer { margin-left: auto; }

/* ------------------------------------------------------------ 卡片 */
.card {
    background: var(--panel);
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
}
.card.flush { padding: 0; overflow: hidden; }
.card-head {
    display: flex; align-items: center; gap: 10px;
    padding: 14px 18px;
    border-bottom: 1px solid var(--line-soft);
    flex-wrap: wrap;
}
.card-head h3 { margin: 0; font-size: 15px; }
.card-head .spacer { margin-left: auto; }
.card-body { padding: 18px; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.grid-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

/* ------------------------------------------------------------ 统计卡 */
.stat {
    background: linear-gradient(160deg, var(--panel-2), var(--panel));
    border: 1px solid var(--line-soft);
    border-radius: var(--radius);
    padding: 16px 16px 14px;
    position: relative;
    overflow: hidden;
    min-width: 0;
}
.stat::after {
    content: ''; position: absolute; right: -30px; top: -30px;
    width: 90px; height: 90px; border-radius: 50%;
    background: radial-gradient(circle, rgba(46, 230, 197, .16), transparent 70%);
}
.stat-label { font-size: 12.5px; color: var(--text-mute); display: flex; align-items: center; gap: 6px; }
.stat-value { font-size: 27px; font-weight: 720; color: #fff; margin: 8px 0 2px; letter-spacing: -.5px; }
.stat-value small { font-size: 13px; font-weight: 500; color: var(--text-dim); margin-left: 4px; }
.stat-foot { font-size: 12px; color: var(--text-dim); display: flex; gap: 8px; align-items: center; }
.stat.accent::after { background: radial-gradient(circle, rgba(124, 92, 255, .22), transparent 70%); }

/* ------------------------------------------------------------ 按钮 */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 9px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--panel-2);
    color: var(--text);
    font-size: 13.5px;
    font-family: inherit;
    cursor: pointer;
    transition: transform .12s, background .16s, border-color .16s, opacity .16s;
    white-space: nowrap;
    text-decoration: none;
}
.btn:hover { background: #1d2942; border-color: #2c3d63; opacity: 1; }
.btn:active { transform: translateY(1px); }
.btn-primary {
    background: linear-gradient(135deg, var(--brand), #23c9ae);
    border-color: transparent; color: #041b18; font-weight: 650;
}
.btn-primary:hover { background: linear-gradient(135deg, #3ff0d0, #22c4a8); }
.btn-purple { background: linear-gradient(135deg, var(--brand-2), #5b41d6); border-color: transparent; color: #fff; font-weight: 600; }
.btn-danger { background: rgba(255, 95, 109, .12); border-color: rgba(255, 95, 109, .4); color: #ff8b95; }
.btn-danger:hover { background: rgba(255, 95, 109, .2); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: 8px; }
.btn-lg { padding: 12px 22px; font-size: 15px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ------------------------------------------------------------ 表单 */
.field { margin-bottom: 15px; }
.field label { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 6px; font-weight: 500; }
.field .hint { font-size: 12px; color: var(--text-mute); margin-top: 5px; }

.input, select.input, textarea.input {
    width: 100%;
    padding: 10px 13px;
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    transition: border-color .16s, box-shadow .16s;
    outline: none;
}
.input::placeholder { color: #55628a; }
.input:focus {
    border-color: rgba(46, 230, 197, .6);
    box-shadow: 0 0 0 3px rgba(46, 230, 197, .12);
}
textarea.input { min-height: 100px; resize: vertical; line-height: 1.6; }
select.input {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239aa8c7' stroke-width='2' stroke-linecap='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 11px center;
    padding-right: 34px;
}
.input-group { display: flex; gap: 8px; }
.input-group .input { flex: 1; min-width: 0; }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { display: none; }
.switch .track {
    width: 42px; height: 24px; border-radius: 20px;
    background: #263352; position: relative; transition: background .18s; flex: none;
}
.switch .track::after {
    content: ''; position: absolute; left: 3px; top: 3px;
    width: 18px; height: 18px; border-radius: 50%; background: #8794b5;
    transition: transform .18s, background .18s;
}
.switch input:checked + .track { background: rgba(46, 230, 197, .3); }
.switch input:checked + .track::after { transform: translateX(18px); background: var(--brand); }

.checkbox { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13.5px; color: var(--text-dim); }
.checkbox input { width: 16px; height: 16px; accent-color: var(--brand); }

/* ------------------------------------------------------------ 表格 */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; min-width: 560px; }
table.tbl th {
    text-align: left; padding: 11px 14px;
    color: var(--text-mute); font-weight: 600; font-size: 12.5px;
    background: rgba(255, 255, 255, .02);
    border-bottom: 1px solid var(--line-soft);
    white-space: nowrap;
}
table.tbl td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(35, 48, 77, .5);
    color: var(--text-dim);
    vertical-align: middle;
}
table.tbl tr:last-child td { border-bottom: none; }
table.tbl tr:hover td { background: rgba(255, 255, 255, .018); }
table.tbl td strong { color: var(--text); font-weight: 600; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }

/* ------------------------------------------------------------ 徽标 */
.badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 2px 9px; border-radius: 20px;
    font-size: 12px; font-weight: 500;
    border: 1px solid transparent;
    white-space: nowrap;
}
.badge-ok { background: rgba(53, 208, 127, .14); color: #5fe0a0; border-color: rgba(53, 208, 127, .28); }
.badge-warn { background: rgba(242, 183, 61, .14); color: #f6ca70; border-color: rgba(242, 183, 61, .3); }
.badge-danger { background: rgba(255, 95, 109, .14); color: #ff8b95; border-color: rgba(255, 95, 109, .3); }
.badge-info { background: rgba(74, 168, 255, .14); color: #7cc0ff; border-color: rgba(74, 168, 255, .3); }
.badge-muted { background: rgba(139, 151, 184, .12); color: var(--text-dim); border-color: rgba(139, 151, 184, .22); }

.tag {
    display: inline-block; padding: 1px 8px; border-radius: 6px;
    background: rgba(124, 92, 255, .14); color: #b3a2ff; font-size: 11.5px;
    border: 1px solid rgba(124, 92, 255, .26);
}

/* ------------------------------------------------------------ 提示 */
.alert {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 12px 15px; border-radius: var(--radius-sm);
    border: 1px solid var(--line); background: var(--panel-2);
    font-size: 13.5px; color: var(--text-dim);
    margin-bottom: 14px;
}
.alert-success { background: rgba(53, 208, 127, .1); border-color: rgba(53, 208, 127, .3); color: #7fe5b3; }
.alert-error { background: rgba(255, 95, 109, .1); border-color: rgba(255, 95, 109, .32); color: #ff9aa3; }
.alert-warn { background: rgba(242, 183, 61, .1); border-color: rgba(242, 183, 61, .3); color: #f6ca70; }
.alert-info { background: rgba(74, 168, 255, .1); border-color: rgba(74, 168, 255, .3); color: #8ec8ff; }
.alert .ic { margin-top: 2px; }

.empty { text-align: center; padding: 46px 20px; color: var(--text-mute); }
.empty .ic { color: #2e3d5e; margin-bottom: 10px; }

/* ------------------------------------------------------------ 分页 */
.pager { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 14px 18px; }
.pager a, .pager span {
    min-width: 34px; height: 34px; padding: 0 10px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 9px; border: 1px solid var(--line);
    background: var(--panel-2); color: var(--text-dim); font-size: 13px;
}
.pager .active { background: var(--brand); color: #041b18; border-color: transparent; font-weight: 650; }
.pager-gap { border: none !important; background: none !important; color: var(--text-mute) !important; }

/* ------------------------------------------------------------ 首页 / 认证页 */
.auth-wrap {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 28px 16px;
}
.auth-card {
    width: 100%; max-width: 430px;
    background: var(--panel);
    border: 1px solid var(--line-soft);
    border-radius: 18px;
    padding: 30px 26px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .5);
}
.auth-head { text-align: center; margin-bottom: 22px; }
.auth-head .brand-logo { width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 15px; font-size: 20px; }
.auth-head h2 { margin-bottom: 4px; }
.auth-head p { color: var(--text-mute); font-size: 13px; margin: 0; }
.auth-foot { text-align: center; margin-top: 18px; font-size: 13px; color: var(--text-mute); }

.hero { max-width: 1080px; margin: 0 auto; padding: 40px 20px 60px; }
.hero-top { display: flex; align-items: center; gap: 12px; margin-bottom: 46px; flex-wrap: wrap; }
.hero-top .spacer { margin-left: auto; }
.hero h1 { font-size: 40px; line-height: 1.2; margin-bottom: 14px; letter-spacing: -1px; }
.hero .lead { font-size: 16px; color: var(--text-dim); max-width: 620px; margin-bottom: 26px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 46px; }
.grad-text {
    background: linear-gradient(100deg, var(--brand), var(--brand-2));
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.feature {
    background: var(--panel); border: 1px solid var(--line-soft);
    border-radius: var(--radius); padding: 18px;
}
.feature .icon-box {
    width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
    background: var(--brand-dim); color: var(--brand); margin-bottom: 12px;
}
.feature h3 { font-size: 15px; margin-bottom: 6px; }
.feature p { color: var(--text-mute); font-size: 13px; margin: 0; }
.hero-foot { text-align: center; color: var(--text-mute); font-size: 12.5px; padding: 28px 0 0; border-top: 1px solid var(--line-soft); }

/* ------------------------------------------------------------ 进度 / 步骤 */
.steps { display: flex; flex-direction: column; gap: 10px; }
.step-item {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 12px 14px; border-radius: var(--radius-sm);
    background: var(--bg-soft); border: 1px solid var(--line-soft);
}
.step-item .dot {
    width: 24px; height: 24px; border-radius: 50%; flex: none;
    display: grid; place-items: center; font-size: 12px; font-weight: 700;
}
.step-item.ok .dot { background: rgba(53, 208, 127, .16); color: var(--ok); }
.step-item.fail .dot { background: rgba(255, 95, 109, .16); color: var(--danger); }
.step-item .st-title { color: var(--text); font-weight: 550; }
.step-item .st-msg { color: var(--text-mute); font-size: 12.5px; }
.step-item .st-time { margin-left: auto; color: var(--text-mute); font-size: 12px; }

.loader {
    width: 15px; height: 15px; border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .2); border-top-color: var(--brand);
    animation: spin .7s linear infinite; display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------ 弹窗 */
.modal-mask {
    position: fixed; inset: 0; background: rgba(4, 7, 14, .72);
    display: none; align-items: center; justify-content: center;
    padding: 18px; z-index: 100; backdrop-filter: blur(3px);
}
.modal-mask.open { display: flex; }
.modal {
    width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto;
    background: var(--panel); border: 1px solid var(--line);
    border-radius: 16px; padding: 22px;
    box-shadow: 0 30px 70px rgba(0, 0, 0, .6);
}
.modal-head { display: flex; align-items: center; margin-bottom: 16px; }
.modal-head h3 { margin: 0; }
.modal-head .close {
    margin-left: auto; background: none; border: none; color: var(--text-mute);
    cursor: pointer; padding: 4px; line-height: 0;
}
.modal-foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

/* ------------------------------------------------------------ Toast */
#toasts { position: fixed; top: 18px; right: 18px; z-index: 200; display: flex; flex-direction: column; gap: 10px; max-width: 330px; }
.toast {
    padding: 12px 15px; border-radius: var(--radius-sm);
    background: var(--panel-2); border: 1px solid var(--line);
    box-shadow: var(--shadow); font-size: 13.5px; color: var(--text);
    animation: slideIn .22s ease;
    display: flex; gap: 9px; align-items: flex-start;
}
.toast.ok { border-color: rgba(53, 208, 127, .4); }
.toast.err { border-color: rgba(255, 95, 109, .4); }
@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } }

/* ------------------------------------------------------------ 其它 */
.copy-box {
    display: flex; align-items: center; gap: 8px;
    background: var(--bg-soft); border: 1px dashed var(--line);
    border-radius: var(--radius-sm); padding: 10px 12px; font-size: 13px;
}
.copy-box code { flex: 1; min-width: 0; overflow-x: auto; color: var(--brand); white-space: nowrap; }
.copy-box .btn { flex: none; }

.avatar {
    width: 32px; height: 32px; border-radius: 50%; flex: none;
    background: linear-gradient(135deg, var(--brand-2), var(--brand));
    display: grid; place-items: center; color: #06121a; font-weight: 700; font-size: 13px;
}
.user-chip { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--text-dim); }

.chart { width: 100%; height: 280px; }
.progress { height: 7px; border-radius: 6px; background: #1e2a44; overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }

.kv { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px dashed rgba(35, 48, 77, .7); font-size: 13.5px; }
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--text-mute); flex: none; min-width: 96px; }
.kv .v { color: var(--text); word-break: break-all; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line-soft); margin-bottom: 16px; }
.tab {
    padding: 9px 14px; border-radius: 10px 10px 0 0; color: var(--text-dim);
    font-size: 13.5px; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab.active { color: #fff; border-bottom-color: var(--brand); background: rgba(46, 230, 197, .06); }

.code-block {
    background: #060a13; border: 1px solid var(--line-soft); border-radius: var(--radius-sm);
    padding: 14px; overflow-x: auto; font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 12.5px; color: #9fd8c9; line-height: 1.7; white-space: pre-wrap; word-break: break-all;
}

.mask-overlay {
    position: fixed; inset: 0; background: rgba(4, 7, 14, .6);
    z-index: 45; display: none;
}
.mask-overlay.open { display: block; }

.text-dim { color: var(--text-dim); }
.text-mute { color: var(--text-mute); }
.text-ok { color: var(--ok); }
.text-danger { color: var(--danger); }
.text-warn { color: var(--warn); }
.fs-sm { font-size: 12.5px; }
.fs-xs { font-size: 12px; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.nowrap { white-space: nowrap; }
.break { word-break: break-all; }

/* ------------------------------------------------------------ 响应式 */
@media (max-width: 1100px) {
    .grid-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .grid-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main { margin-left: 0; }
    .menu-btn { display: inline-flex; }
    .grid-3, .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 700px) {
    .content { padding: 14px 14px 34px; }
    .topbar { padding: 0 14px; height: 56px; }
    .topbar h1 { font-size: 15.5px; }
    .topbar-sub { display: none; }
    .card { padding: 15px; border-radius: 12px; }
    .card-head { padding: 12px 15px; }
    .card-body { padding: 15px; }
    .grid-2, .grid-3, .grid-4, .grid-5, .grid-6 { grid-template-columns: 1fr; }
    .stat-value { font-size: 23px; }
    .hero { padding: 24px 16px 44px; }
    .hero h1 { font-size: 27px; letter-spacing: -.5px; }
    .hero .lead { font-size: 14.5px; }
    .auth-card { padding: 24px 18px; border-radius: 15px; }
    .modal { padding: 18px; border-radius: 14px; }
    #toasts { left: 14px; right: 14px; max-width: none; top: 12px; }
    .btn-row .btn { flex: 1; justify-content: center; }
    .pager { padding: 12px 14px; }
    .chart { height: 230px; }
    table.tbl th, table.tbl td { padding: 10px 12px; }
    .card-head { gap: 8px; }
    .card-head .input-group { flex: 1 1 100%; max-width: none !important; }
    .card-head > .btn { flex: 1 1 auto; justify-content: center; }
    .table-wrap { box-shadow: inset -14px 0 12px -12px rgba(0, 0, 0, .6); }
    .kv .k { min-width: 74px; }
    .copy-box { flex-wrap: wrap; }
    .copy-box code { flex: 1 1 100%; white-space: normal; word-break: break-all; }
}

@media (max-width: 420px) {
    .stat-value { font-size: 21px; }
    .btn { padding: 8px 13px; font-size: 13px; }
}
