@charset "utf-8";
/* =========================================================
   云仓控制台样式
   ---------------------------------------------------------
   ⚠️ 这份样式**刻意不引用任何外部资源**（无 bootstrap、无 jQuery、无字体 CDN）。
   理由：控制台是"程序出问题时唯一还能进的页面"——使用者库连不上、静态资源
   CDN 被墙、静态目录没配好，业主都得能进来处理。它自己的渲染不能依赖任何
   外部可用性。（租户侧的页面另说，那边是给使用者用的，可以富一点。）

   主题色沿用后台的果绿：主色 #67b527，深绿 #1a4f28。
   ========================================================= */

:root {
    --c-primary: #67b527;
    --c-primary-dark: #52951c;
    --c-primary-soft: #eef7e4;
    --c-ink: #1a4f28;
    --c-text: #3d4451;
    --c-muted: #7a8494;
    --c-bg: #f5f7fa;
    --c-card: #ffffff;
    --c-border: #e6eaf0;
    --c-danger: #d93a3a;
    --c-warn: #c8860d;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--c-bg);
    color: var(--c-text);
    font: 14px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
}
a { color: var(--c-primary-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- 登录页 ---------- */

.ct-login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: linear-gradient(160deg, #1a4f28 0%, #2c7038 55%, #4b9b2e 100%);
}
.ct-login-card {
    width: 100%;
    max-width: 400px;
    background: var(--c-card);
    border-radius: 14px;
    padding: 38px 36px 32px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, .22);
}
.ct-login-card h1 {
    margin: 0 0 6px;
    font-size: 21px;
    color: var(--c-ink);
    letter-spacing: .5px;
}
.ct-login-card .ct-sub {
    margin: 0 0 26px;
    color: var(--c-muted);
    font-size: 13px;
}

/* ---------- 通用控件 ---------- */

.ct-field { margin-bottom: 16px; }
.ct-field label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--c-text);
}
.ct-field .ct-hint {
    margin-top: 5px;
    font-size: 12px;
    color: var(--c-muted);
    line-height: 1.55;
}
.ct-input, .ct-select, .ct-textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--c-border);
    border-radius: 8px;
    background: #fff;
    color: var(--c-text);
    font-size: 14px;
    font-family: inherit;
    transition: border-color .15s, box-shadow .15s;
}
.ct-input:focus, .ct-select:focus, .ct-textarea:focus {
    outline: none;
    border-color: var(--c-primary);
    box-shadow: 0 0 0 3px rgba(103, 181, 39, .15);
}
.ct-textarea { min-height: 64px; resize: vertical; }

.ct-btn {
    display: inline-block;
    padding: 9px 18px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: var(--c-primary);
    color: #fff;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: background .15s;
}
.ct-btn:hover { background: var(--c-primary-dark); }
.ct-btn:disabled { opacity: .6; cursor: not-allowed; }
.ct-btn-block { width: 100%; padding: 11px; font-size: 15px; }
.ct-btn-ghost {
    background: #fff;
    color: var(--c-text);
    border-color: var(--c-border);
}
.ct-btn-ghost:hover { background: #f2f5f9; }
.ct-btn-sm { padding: 4px 11px; font-size: 13px; border-radius: 6px; }
.ct-btn-danger { background: #fff; color: var(--c-danger); border-color: #f0c9c9; }
.ct-btn-danger:hover { background: #fdf3f3; }

.ct-msg {
    margin-top: 14px;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 13px;
    display: none;
    line-height: 1.6;
}
.ct-msg.show { display: block; }
.ct-msg-err { background: #fdf1f1; color: var(--c-danger); border: 1px solid #f4d4d4; }
.ct-msg-ok  { background: var(--c-primary-soft); color: var(--c-primary-dark); border: 1px solid #d6ecc0; }

/* ---------- 顶栏 ---------- */

.ct-top {
    background: var(--c-ink);
    color: #fff;
    padding: 0 26px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.ct-top .ct-brand { font-size: 16px; font-weight: 600; letter-spacing: .5px; }
.ct-top .ct-brand span {
    margin-left: 10px;
    font-size: 12px;
    font-weight: 400;
    color: #a8c6a8;
}
.ct-top .ct-user { font-size: 13px; color: #cfe0cf; }
.ct-top .ct-user a { color: #fff; margin-left: 14px; }

/* ---------- 主体 ---------- */

.ct-main { max-width: 1180px; margin: 0 auto; padding: 22px 26px 60px; }

.ct-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}
.ct-card {
    background: var(--c-card);
    border: 1px solid var(--c-border);
    border-radius: 10px;
    padding: 16px 18px;
}
.ct-card .ct-card-label { font-size: 13px; color: var(--c-muted); }
.ct-card .ct-card-value {
    margin-top: 4px;
    font-size: 24px;
    font-weight: 600;
    color: var(--c-ink);
    font-variant-numeric: tabular-nums;
}
.ct-card .ct-card-value small { font-size: 13px; font-weight: 400; color: var(--c-muted); margin-left: 3px; }

.ct-panel {
    background: var(--c-card);
    border: 1px solid var(--c-border);
    border-radius: 10px;
    margin-bottom: 18px;
    overflow: hidden;
}
.ct-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--c-border);
}
.ct-panel-head h2 { margin: 0; font-size: 15px; color: var(--c-ink); font-weight: 600; }
.ct-panel-body { padding: 18px; }

/* ---------- 表格 ---------- */

.ct-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ct-table th {
    text-align: left;
    padding: 10px 14px;
    background: #fafbfd;
    border-bottom: 1px solid var(--c-border);
    color: var(--c-muted);
    font-weight: 500;
    white-space: nowrap;
}
.ct-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #f2f4f8;
    vertical-align: middle;
}
.ct-table tr:last-child td { border-bottom: none; }
.ct-table .ct-host { font-family: Consolas, Monaco, monospace; font-size: 13px; }
.ct-table .ct-db   { font-family: Consolas, Monaco, monospace; font-size: 12.5px; color: var(--c-muted); }
.ct-table .ct-num  { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.ct-empty { padding: 44px 18px; text-align: center; color: var(--c-muted); }

.ct-tag {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 20px;
    font-size: 12px;
    line-height: 1.7;
    white-space: nowrap;
}
.ct-tag-on   { background: var(--c-primary-soft); color: var(--c-primary-dark); }
.ct-tag-off  { background: #f0f2f6; color: var(--c-muted); }
.ct-tag-warn { background: #fdf5e6; color: var(--c-warn); }

.ct-actions { white-space: nowrap; }
.ct-actions button, .ct-actions a { margin-right: 6px; }
.ct-actions button:last-child, .ct-actions a:last-child { margin-right: 0; }

/* ---------- 表单栅格 ---------- */

.ct-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 0 18px; }
.ct-grid .ct-span-all { grid-column: 1 / -1; }

.ct-check { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 16px; }
.ct-check input { margin-top: 3px; }
.ct-check label { font-size: 13px; line-height: 1.6; }

.ct-tip {
    background: #fbfcfd;
    border: 1px solid var(--c-border);
    border-left: 3px solid var(--c-primary);
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 13px;
    color: var(--c-muted);
    line-height: 1.75;
    margin-bottom: 18px;
}
.ct-tip strong { color: var(--c-text); }
.ct-tip code {
    background: #eef1f5;
    padding: 1px 5px;
    border-radius: 4px;
    font-family: Consolas, Monaco, monospace;
    font-size: 12.5px;
    color: var(--c-ink);
}

.ct-hidden { display: none !important; }

/* 窄屏：表格横向滚动，别把布局挤烂 */
.ct-scroll { overflow-x: auto; }
