/* ==========================================================================
   LY云计算 - 界面样式
   风格：蓝白底色 + 樱花粉点缀，直角小圆角，无渐变、无重阴影
   ========================================================================== */

:root {
  --pink: #d96c86;
  --pink-dark: #c4566f;
  --pink-soft: #fdf1f4;
  --pink-line: #f3d5de;
  --blue: #3b6ea5;
  --blue-soft: #eef4fb;
  --bg: #f5f7fa;
  --card: #ffffff;
  --line: #e7ebf0;
  --line-dark: #d8dee7;
  --text: #1f2937;
  --text-2: #4b5563;
  --muted: #7a8699;
  --green: #2f9e6b;
  --green-soft: #eaf7f0;
  --orange: #b9770f;
  --orange-soft: #fdf4e6;
  --red: #c94f4f;
  --red-soft: #fdf0f0;
  --radius: 8px;
  --sidebar-w: 228px;
  --topbar-h: 56px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--pink); }
h1, h2, h3, h4 { margin: 0; font-weight: 600; color: var(--text); }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
svg.ico { flex: 0 0 auto; vertical-align: -3px; }

/* ---------------- 布局 ---------------- */

.ly-shell { min-height: 100vh; }

.ly-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  background: var(--card);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  z-index: 60;
}

.ly-brand { height: var(--topbar-h); display: flex; align-items: center; padding: 0 16px; border-bottom: 1px solid var(--line); }
.ly-brand-link { display: flex; align-items: center; gap: 10px; width: 100%; color: inherit; }
.ly-brand-link:hover { color: inherit; }
.ly-logo {
  width: 32px; height: 32px; border-radius: 7px;
  background: var(--pink); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; letter-spacing: .3px;
}
.ly-brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.ly-brand-text strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ly-brand-text em { font-style: normal; font-size: 11px; color: var(--muted); }
.ly-sidebar-close { display: none; margin-left: auto; background: none; border: 0; color: var(--muted); padding: 4px; cursor: pointer; }

.ly-nav { flex: 1; overflow-y: auto; padding: 12px 10px 24px; }
.ly-nav::-webkit-scrollbar { width: 6px; }
.ly-nav::-webkit-scrollbar-thumb { background: #e2e6ed; border-radius: 3px; }
.ly-nav-group { margin-bottom: 14px; }
.ly-nav-label {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 10px; font-size: 11px; color: var(--muted); letter-spacing: .4px;
}
.ly-nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; margin-bottom: 2px;
  border-radius: 7px; color: var(--text-2); font-size: 13.5px;
  border-left: 2px solid transparent;
}
.ly-nav-item:hover { background: #f7f9fc; color: var(--text); }
.ly-nav-item.active { background: var(--pink-soft); color: var(--pink-dark); border-left-color: var(--pink); font-weight: 600; }
.ly-nav-item.active svg { color: var(--pink); }
.ly-nav-badge {
  margin-left: auto; background: var(--pink); color: #fff;
  font-style: normal; font-size: 10px; line-height: 1;
  padding: 3px 5px; border-radius: 9px; min-width: 16px; text-align: center;
}
.ly-sidebar-foot {
  border-top: 1px solid var(--line); padding: 10px 16px;
  display: flex; justify-content: space-between; font-size: 11px; color: var(--muted);
}

.ly-body { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }

.ly-topbar {
  position: sticky; top: 0; z-index: 40;
  height: var(--topbar-h);
  background: var(--card);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px;
}
.ly-topbar-left { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ly-topbar-right { display: flex; align-items: center; gap: 6px; }
.ly-crumbs { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; }
.ly-crumbs a { color: var(--muted); }
.ly-crumbs a:hover { color: var(--pink); }
.ly-crumb-sep { color: #c9d0da; }
.ly-top-link {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12.5px; color: var(--text-2); padding: 6px 8px; border-radius: 6px;
}
.ly-top-link:hover { background: #f7f9fc; color: var(--pink); }
.ly-icon-btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 6px; border: 0; background: none;
  color: var(--text-2); cursor: pointer;
}
.ly-icon-btn:hover { background: #f2f5f9; color: var(--text); }
.ly-dot { position: absolute; top: 7px; right: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--pink); }
.ly-menu-btn { display: none; }

.ly-user { position: relative; }
.ly-user-btn {
  display: flex; align-items: center; gap: 8px;
  background: none; border: 1px solid transparent; border-radius: 7px;
  padding: 4px 8px 4px 4px; cursor: pointer; color: var(--text);
  font-family: inherit; font-size: 13px;
}
.ly-user-btn:hover { background: #f7f9fc; border-color: var(--line); }
.ly-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--pink-soft); color: var(--pink-dark);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 12px;
}
.ly-user-name { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ly-dropdown {
  display: none; position: absolute; right: 0; top: calc(100% + 8px);
  width: 200px; background: var(--card); border: 1px solid var(--line);
  border-radius: 8px; padding: 6px; z-index: 70;
}
.ly-user.open .ly-dropdown { display: block; }
.ly-dropdown-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 5px; display: flex; flex-direction: column; }
.ly-dropdown-head strong { font-size: 13px; }
.ly-dropdown-head span { font-size: 11.5px; color: var(--muted); word-break: break-all; }
.ly-dropdown a {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 6px; font-size: 13px; color: var(--text-2);
}
.ly-dropdown a:hover { background: #f7f9fc; color: var(--text); }
.ly-dropdown a.danger { color: var(--red); }
.ly-dropdown a.danger:hover { background: var(--red-soft); }

.ly-main { flex: 1; display: flex; flex-direction: column; }
.ly-content { padding: 22px 24px 28px; flex: 1; max-width: 1440px; width: 100%; margin: 0 auto; }
.ly-foot {
  padding: 14px 24px 22px; display: flex; justify-content: space-between;
  font-size: 11.5px; color: var(--muted);
}
.ly-nav-mask { display: none; }

/* ---------------- 页头 ---------------- */

.page-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 18px; flex-wrap: wrap;
}
.page-head h1 { font-size: 19px; letter-spacing: .2px; }
.page-head-text p { margin-top: 4px; font-size: 12.5px; color: var(--muted); }
.page-head-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------------- 卡片 ---------------- */

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }
.card + .card { margin-top: 16px; }
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line);
}
.card-head h2 { font-size: 14px; }
.card-head .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.card-head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card-body { padding: 18px; }
.card-body.tight { padding: 12px 18px; }
.card-body.flush { padding: 0; }

.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)); }
.col-span-2 { grid-column: span 2; }

/* ---------------- 统计卡 ---------------- */

.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; display: flex; flex-direction: column; gap: 6px;
}
.stat-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 12.5px; }
.stat-top svg { color: var(--pink); }
.stat-value { font-size: 24px; font-weight: 600; letter-spacing: .2px; line-height: 1.2; }
.stat-value small { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 4px; }
.stat-foot { font-size: 11.5px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.stat-foot .up { color: var(--green); }
.stat-foot .down { color: var(--red); }

/* ---------------- 资源用量卡 ---------------- */

.usage-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); padding: 16px 18px; }
.usage-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.usage-head h3 { font-size: 13px; color: var(--text-2); display: flex; align-items: center; gap: 7px; }
.usage-head svg { color: var(--pink); }
.usage-num { font-size: 12px; color: var(--muted); }
.usage-num b { color: var(--text); font-size: 15px; font-weight: 600; }
.progress { height: 6px; background: #eef1f6; border-radius: 4px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--pink); border-radius: 4px; }
.progress.blue > span { background: var(--blue); }
.progress.warn > span { background: #d9a13b; }
.progress.danger > span { background: var(--red); }
.usage-foot { margin-top: 8px; font-size: 11.5px; color: var(--muted); display: flex; justify-content: space-between; }

/* ---------------- 快捷入口 ---------------- */

.quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 10px; }
.quick-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  padding: 16px 8px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); color: var(--text-2); font-size: 12.5px; text-align: center;
}
.quick-item svg { color: var(--pink); }
.quick-item:hover { border-color: var(--pink-line); background: var(--pink-soft); color: var(--pink-dark); }

/* ---------------- 按钮 ---------------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 32px; padding: 0 13px; border-radius: 6px;
  border: 1px solid var(--line-dark); background: var(--card); color: var(--text-2);
  font-size: 13px; font-family: inherit; cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: #c3ccd8; color: var(--text); background: #fafbfc; }
.btn-primary { background: var(--pink); border-color: var(--pink); color: #fff; }
.btn-primary:hover { background: var(--pink-dark); border-color: var(--pink-dark); color: #fff; }
.btn-blue { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-blue:hover { background: #325f8f; border-color: #325f8f; color: #fff; }
.btn-danger { color: var(--red); border-color: #eccccc; }
.btn-danger:hover { background: var(--red-soft); border-color: #e0b6b6; color: var(--red); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: #f2f5f9; border-color: transparent; }
.btn-sm { height: 27px; padding: 0 9px; font-size: 12px; border-radius: 5px; }
.btn-lg { height: 38px; padding: 0 18px; font-size: 14px; }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .55; pointer-events: none; }
.btn-link { background: none; border: 0; color: var(--blue); padding: 0; height: auto; cursor: pointer; font-size: 13px; }
.btn-link:hover { color: var(--pink); }
.btn-link.danger { color: var(--red); }
.btn-group { display: inline-flex; gap: 6px; flex-wrap: wrap; }

/* ---------------- 表单 ---------------- */

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.form-grid.single { grid-template-columns: minmax(0, 1fr); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field > label { font-size: 12.5px; color: var(--text-2); }
.field .hint { font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.hint { font-size: 12px; color: var(--muted); line-height: 1.65; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.field.required > label::after { content: " *"; color: var(--pink); }

.input, .select, .textarea {
  width: 100%; height: 34px; padding: 0 10px;
  border: 1px solid var(--line-dark); border-radius: 6px;
  background: #fff; color: var(--text); font-size: 13px; font-family: inherit;
  outline: none;
}
.textarea { height: auto; min-height: 96px; padding: 8px 10px; line-height: 1.6; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--pink); box-shadow: 0 0 0 2px var(--pink-soft); }
.input[readonly] { background: #f8fafc; color: var(--muted); }
.select { appearance: none; background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237a8699' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 28px; }
.input-group { display: flex; align-items: stretch; }
.input-group .input { border-radius: 6px 0 0 6px; }
.input-group .btn { border-radius: 0 6px 6px 0; border-left: 0; height: 34px; }

.check { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-2); cursor: pointer; }
.check input { width: 14px; height: 14px; accent-color: var(--pink); }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.switch-row:last-child { border-bottom: 0; }
.switch-row .switch-text strong { font-size: 13px; font-weight: 500; display: block; }
.switch-row .switch-text span { font-size: 11.5px; color: var(--muted); }
.switch { position: relative; width: 38px; height: 21px; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; background: #d7dde6; border-radius: 12px; transition: .15s; cursor: pointer; }
.switch i::after { content: ""; position: absolute; width: 15px; height: 15px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .15s; }
.switch input:checked + i { background: var(--pink); }
.switch input:checked + i::after { transform: translateX(17px); }

.form-actions { display: flex; gap: 8px; padding-top: 16px; margin-top: 4px; border-top: 1px solid var(--line); }
.form-actions.right { justify-content: flex-end; }

/* ---------------- 表格 ---------------- */

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar-left, .toolbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.search-box { position: relative; }
.search-box svg { position: absolute; left: 9px; top: 9px; color: var(--muted); }
.search-box .input { padding-left: 30px; width: 220px; }

.table-wrap { width: 100%; overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  text-align: left; font-weight: 500; color: var(--muted); font-size: 12px;
  background: #fafbfd; padding: 10px 12px; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table td { padding: 11px 12px; border-bottom: 1px solid #f0f3f7; vertical-align: middle; }
.table td .empty { padding: 26px 12px; }
.table td .empty-icon { width: 38px; height: 38px; margin-bottom: 8px; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fbfcfe; }
.table .cell-main { font-weight: 500; color: var(--text); }
.table .cell-sub { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.table .nowrap { white-space: nowrap; }
.table .actions { white-space: nowrap; text-align: right; }
.table .actions .btn-link { margin-left: 10px; }
.table .actions .btn-link:first-child { margin-left: 0; }

.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 7px; border-radius: 4px; font-size: 11.5px; line-height: 1.5;
  border: 1px solid transparent; white-space: nowrap;
}
.badge-green { background: var(--green-soft); color: var(--green); border-color: #cfeade; }
.badge-red { background: var(--red-soft); color: var(--red); border-color: #f0d3d3; }
.badge-orange { background: var(--orange-soft); color: var(--orange); border-color: #f2e0c2; }
.badge-blue { background: var(--blue-soft); color: var(--blue); border-color: #d5e3f4; }
.badge-pink { background: var(--pink-soft); color: var(--pink-dark); border-color: var(--pink-line); }
.badge-gray { background: #f3f5f8; color: var(--text-2); border-color: #e4e9f0; }

.progress-mini { width: 78px; height: 4px; background: #eef1f6; border-radius: 3px; display: inline-block; vertical-align: middle; overflow: hidden; }
.progress-mini span { display: block; height: 100%; background: var(--pink); }

/* ---------------- 分页 ---------------- */

.pager { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.pager-info { font-size: 12px; color: var(--muted); }
.pager-btns { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.pager-btn {
  min-width: 28px; height: 28px; padding: 0 8px; border-radius: 5px;
  border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center;
  font-size: 12.5px; color: var(--text-2); background: #fff;
}
.pager-btn:hover { border-color: var(--pink-line); color: var(--pink-dark); }
.pager-btn.active { background: var(--pink); border-color: var(--pink); color: #fff; }
.pager-btn.disabled { opacity: .45; pointer-events: none; }
.pager-gap { color: var(--muted); padding: 0 2px; }

/* ---------------- 标签页 ---------------- */

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab {
  padding: 9px 14px; font-size: 13px; color: var(--text-2); white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab:hover { color: var(--pink-dark); }
.tab.active { color: var(--pink-dark); border-bottom-color: var(--pink); font-weight: 600; }

/* ---------------- 详情列表 ---------------- */

.kv { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px 12px; font-size: 13px; }
.kv dt { color: var(--muted); font-size: 12.5px; }
.kv dd { margin: 0; color: var(--text); word-break: break-all; }
.kv dd .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12.5px; }

/* ---------------- 空状态 / 提示 ---------------- */

.empty { padding: 44px 20px; text-align: center; color: var(--muted); }
.empty-icon {
  width: 46px; height: 46px; margin: 0 auto 12px; border-radius: 50%;
  background: var(--pink-soft); color: var(--pink); display: flex; align-items: center; justify-content: center;
}
.empty p { font-size: 13px; }
.empty .btn { margin-top: 12px; }

.alert { display: flex; gap: 10px; padding: 11px 14px; border-radius: 6px; font-size: 12.5px; border: 1px solid; margin-bottom: 16px; }
.alert svg { flex: 0 0 auto; margin-top: 1px; }
.alert-info { background: var(--blue-soft); border-color: #d6e4f4; color: #315f8e; }
.alert-warn { background: var(--orange-soft); border-color: #f0dfc4; color: #8a5c10; }
.alert-danger { background: var(--red-soft); border-color: #f0d3d3; color: #9c3b3b; }
.alert-success { background: var(--green-soft); border-color: #cfeade; color: #226e4d; }

/* ---------------- 弹窗 ---------------- */

.ly-modal { position: fixed; inset: 0; z-index: 100; display: none; }
.ly-modal.open { display: block; }
.ly-modal-mask { position: absolute; inset: 0; background: rgba(23, 32, 46, .38); }
.ly-modal-box {
  position: relative; width: min(560px, calc(100vw - 32px));
  margin: 8vh auto 0; background: #fff; border-radius: 10px;
  border: 1px solid var(--line); max-height: 84vh; display: flex; flex-direction: column;
}
.ly-modal-box.wide { width: min(820px, calc(100vw - 32px)); }
.ly-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.ly-modal-head h3 { font-size: 15px; }
.ly-modal-body { padding: 18px; overflow-y: auto; }
.ly-modal-foot { padding: 13px 18px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
.ly-modal-close { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 2px; }

/* ---------------- 轻提示 ---------------- */

.ly-toasts { position: fixed; top: 18px; right: 18px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast {
  min-width: 220px; max-width: 340px; background: #fff; border: 1px solid var(--line);
  border-left: 3px solid var(--blue); border-radius: 6px; padding: 10px 13px;
  font-size: 12.5px; color: var(--text-2); line-height: 1.5; box-shadow: 0 6px 18px rgba(31, 41, 55, .06);
  animation: toast-in .18s ease-out;
}
.toast.success { border-left-color: var(--green); }
.toast.error { border-left-color: var(--red); }
.toast.info { border-left-color: var(--blue); }
@keyframes toast-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ---------------- 登录页 ---------------- */

.auth-wrap { min-height: 100vh; display: flex; }
.auth-aside {
  width: 44%; max-width: 520px; background: #fff; border-right: 1px solid var(--line);
  padding: 54px 52px; display: flex; flex-direction: column; justify-content: space-between;
}
.auth-brand { display: flex; align-items: center; gap: 10px; }
.auth-brand .ly-logo { width: 36px; height: 36px; font-size: 14px; }
.auth-brand strong { font-size: 16px; display: block; }
.auth-brand span { font-size: 12px; color: var(--muted); }
.auth-copy h2 { font-size: 22px; line-height: 1.45; margin-bottom: 12px; }
.auth-copy p { font-size: 13px; color: var(--muted); line-height: 1.8; }
.auth-points { display: flex; flex-direction: column; gap: 10px; margin-top: 22px; }
.auth-points li { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--text-2); }
.auth-points svg { color: var(--pink); margin-top: 2px; }
.auth-foot { font-size: 11.5px; color: var(--muted); }
.auth-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 32px 24px; }
.auth-card { width: 100%; max-width: 356px; }
.auth-card h1 { font-size: 20px; margin-bottom: 6px; }
.auth-card .auth-sub { font-size: 12.5px; color: var(--muted); margin-bottom: 24px; }
.auth-card .field { margin-bottom: 14px; }
.auth-card .input { height: 38px; }
.auth-card .btn { width: 100%; height: 38px; margin-top: 6px; }
.auth-extra { margin-top: 16px; display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); }
.captcha-row { display: flex; gap: 8px; }
.captcha-row .input { flex: 1; }
.captcha-img { height: 38px; width: 104px; border: 1px solid var(--line-dark); border-radius: 6px; cursor: pointer; background: #fff; }

/* ---------------- 文件管理 ---------------- */

.file-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.file-path {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px; color: var(--text-2); background: #f8fafc;
  border: 1px solid var(--line); border-radius: 5px; padding: 4px 8px; word-break: break-all;
}
.file-list { font-size: 13px; }
.file-row { display: flex; align-items: center; gap: 10px; padding: 9px 6px; border-bottom: 1px solid #f2f5f8; }
.file-row:hover { background: #fbfcfe; }
.file-row .f-icon { color: var(--muted); display: inline-flex; }
.file-row .f-icon.dir { color: var(--pink); }
.file-row .f-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.file-row .f-name:hover { color: var(--pink); }
.file-row .f-size { width: 86px; text-align: right; color: var(--muted); font-size: 11.5px; }
.file-row .f-time { width: 118px; text-align: right; color: var(--muted); font-size: 11.5px; }
.file-row .f-act { width: 108px; text-align: right; white-space: nowrap; }
.file-row .f-act .btn-link { margin-left: 8px; font-size: 12px; }
.code-area {
  width: 100%; min-height: 420px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px; line-height: 1.65; padding: 12px; border: 1px solid var(--line-dark);
  border-radius: 6px; resize: vertical; color: var(--text); background: #fff;
}

/* ---------------- 主机选择 ---------------- */

.host-pick { display: flex; align-items: center; gap: 10px; }
.host-pick select { max-width: 320px; }

/* ---------------- 响应式 ---------------- */

@media (max-width: 1200px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  .ly-sidebar { transform: translateX(-100%); transition: transform .18s ease; width: 258px; }
  body.nav-open .ly-sidebar { transform: none; }
  .ly-sidebar-close { display: inline-flex; }
  .ly-body { margin-left: 0; }
  .ly-menu-btn { display: inline-flex; }
  .ly-nav-mask { display: none; position: fixed; inset: 0; background: rgba(23, 32, 46, .36); z-index: 55; }
  body.nav-open .ly-nav-mask { display: block; }
  .ly-content { padding: 16px 14px 22px; }
  .ly-topbar { padding: 0 12px; }
  .ly-user-name { display: none; }
  .ly-top-link span { display: none; }
  .auth-aside { display: none; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .col-span-2 { grid-column: auto; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .stat-value { font-size: 21px; }
  .search-box .input { width: 100%; }
  .toolbar-left { width: 100%; }
  .toolbar-left .search-box { flex: 1; }
  .file-row .f-time { display: none; }
  .file-row .f-size { width: 64px; }
  .file-row .f-act { width: 92px; }
  .ly-modal-box { margin-top: 4vh; }
  .kv { grid-template-columns: 92px minmax(0, 1fr); }
}

@media (max-width: 560px) {
  .page-head h1 { font-size: 17px; }
  .card-head { flex-direction: column; align-items: flex-start; }
  .card-head-actions { width: 100%; }
  .btn { padding: 0 10px; }
  .quick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .table th, .table td { padding: 9px 8px; }
  .toolbar-right { width: 100%; }
}

/* 在线文件（表格版，参照宝塔文件管理的密度与列结构） */
.file-card { min-width: 0; }
.file-card .file-head { align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-start; }
.file-card .file-head .file-tools { margin-left: auto; }
.file-card .path-bar { flex: 1 1 auto; min-width: 0; }
.path-bar { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; min-width: 0; font-size: 12.5px; }
.path-bar a { color: var(--text); text-decoration: none; padding: 3px 7px; border-radius: 6px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.path-bar a:hover { background: #f5f7fa; color: var(--pink); }
.path-sep { color: #c6cdd8; }
.file-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.btn-icon { width: 30px; height: 30px; padding: 0; justify-content: center; }
.file-table { font-size: 12.5px; }
.file-table thead th { font-size: 12px; color: var(--muted); font-weight: 500; white-space: nowrap; }
.file-table tbody td { padding: 9px 12px; }
.file-table tbody tr:hover td { background: #fbfcfe; }
.file-table .cell-name { display: flex; align-items: center; gap: 8px; min-width: 0; }
.file-table .cell-name .f-icon { color: var(--muted); display: inline-flex; flex: none; }
.file-table .cell-name .f-icon.dir { color: var(--pink); }
.file-table .cell-name .f-icon.php { color: #6f5bd4; }
.file-table .cell-name .f-icon.html { color: #d9722b; }
.file-table .cell-name .f-icon.css { color: #2f7fbf; }
.file-table .cell-name .f-icon.js { color: #b8912a; }
.file-table .cell-name .f-icon.conf { color: #5b8a72; }
.file-table .cell-name .f-icon.zip { color: #b4783a; }
.file-table .cell-name .f-icon.img { color: #4f8f6f; }
.file-table .cell-name .f-icon.txt { color: #7b8698; }
.file-table .cell-name a { color: var(--text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-table .cell-name a:hover { color: var(--pink); }
.file-table .col-perm { width: 150px; white-space: nowrap; color: var(--muted); }
.file-table .col-perm .mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11.5px; }
.file-table .perm-owner { color: #a8b1bf; font-size: 11.5px; }
.file-table .col-size { width: 96px; white-space: nowrap; color: var(--muted); }
.file-table .col-time { width: 140px; white-space: nowrap; color: var(--muted); font-size: 11.5px; }
.file-table .actions { width: 150px; text-align: right; white-space: nowrap; }
.file-table .actions .btn-link { margin-left: 10px; font-size: 12px; }
.file-table .actions .btn-link:first-child { margin-left: 0; }
.file-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.file-foot-tip { color: #a8b1bf; }
@media (max-width: 720px) {
  .file-table .col-perm { display: none; }
  .file-table .col-time { display: none; }
  .file-table .actions { width: auto; }
  .file-head { align-items: flex-start; }
  .file-card .file-head { padding: 12px 14px; }
  .file-card .file-head .file-tools { width: 100%; margin-left: 0; }
  .file-foot { flex-direction: column; align-items: flex-start; gap: 4px; }
}

/* 上传进度条（文件上传 / SQL 导入共用） */
.up-progress { margin-top: 14px; }
.up-track { height: 8px; border-radius: 5px; background: #edf0f4; overflow: hidden; }
.up-fill { display: block; height: 100%; width: 0; background: var(--pink); border-radius: 5px; transition: width .15s ease; }
.up-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 6px; font-size: 11.5px; color: var(--muted); }
.up-meta #upPercent, .up-meta #impPercent { color: var(--text); }

/* ==========================================================================
   液态玻璃 / 磨砂质感主题层（保持原粉白配色，仅叠加通透感）
   —— 半透明面板 + 背景模糊 + 柔和光影 + 顶部 1px 高光
   ========================================================================== */

:root {
  --radius: 10px;
  --glass-bg: rgba(255, 255, 255, .70);
  --glass-bg-soft: rgba(255, 255, 255, .5);
  --glass-bg-strong: rgba(255, 255, 255, .82);
  --glass-border: rgba(255, 255, 255, .78);
  --glass-line: rgba(31, 41, 55, .06);
  --glass-blur: 16px;
  --glass-shadow: 0 12px 30px rgba(217, 108, 134, .075), 0 2px 6px rgba(31, 41, 55, .04);
  --glass-inner: inset 0 1px 0 rgba(255, 255, 255, .95);
  --glass-inner-soft: inset 0 1px 0 rgba(255, 255, 255, .7);
}

/* 背景：极淡的粉/蓝柔光，为玻璃提供可透的层次（不改变整体白色基调） */
body {
  background:
    radial-gradient(720px 400px at -4% -18%, rgba(217, 108, 134, .095), transparent 60%),
    radial-gradient(640px 400px at 104% -8%, rgba(59, 110, 165, .07), transparent 58%),
    radial-gradient(620px 420px at 90% 112%, rgba(217, 108, 134, .06), transparent 62%),
    linear-gradient(180deg, #fdfeff 0%, #f7f9fb 46%, #f5f7fa 100%);
  background-attachment: fixed;
}

/* ---------- 侧栏 / 顶栏：磨砂面板 ---------- */

.ly-sidebar {
  background: rgba(255, 255, 255, .66);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  backdrop-filter: blur(var(--glass-blur)) saturate(150%);
  border-right: 1px solid var(--glass-border);
  box-shadow: 1px 0 0 rgba(31, 41, 55, .035), 12px 0 36px rgba(217, 108, 134, .05);
}
.ly-brand { border-bottom: 1px solid var(--glass-line); }
.ly-sidebar-foot { border-top: 1px solid var(--glass-line); }
.ly-logo {
  box-shadow: 0 6px 14px rgba(217, 108, 134, .28), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.ly-nav-item { border-radius: 8px; }
.ly-nav-item:hover { background: rgba(255, 255, 255, .72); box-shadow: var(--glass-inner-soft); }
.ly-nav-item.active {
  background: rgba(217, 108, 134, .13);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85), 0 2px 8px rgba(217, 108, 134, .08);
}

.ly-topbar {
  background: rgba(255, 255, 255, .70);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .7), 0 6px 20px rgba(31, 41, 55, .03);
}
.ly-top-link, .ly-icon-btn, .ly-user-btn { border-radius: 8px; }
.ly-top-link:hover, .ly-icon-btn:hover, .ly-user-btn:hover {
  background: rgba(255, 255, 255, .8);
  border-color: rgba(255, 255, 255, .9);
  box-shadow: var(--glass-inner-soft);
}
.ly-avatar {
  background: rgba(253, 241, 244, .9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 2px 6px rgba(217, 108, 134, .12);
}

/* ---------- 卡片：核心玻璃面板 ---------- */

.card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow), var(--glass-inner);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
}
.card-head { background: rgba(255, 255, 255, .42); border-bottom: 1px solid var(--glass-line); }
.card-body + .card-body { border-top-color: var(--glass-line); }
.card-head-actions .btn { background: rgba(255, 255, 255, .58); }

.stat {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow), var(--glass-inner);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  transition: transform .16s ease, box-shadow .16s ease;
}
.stat:hover { transform: translateY(-1px); box-shadow: 0 14px 34px rgba(217, 108, 134, .10), var(--glass-inner); }

.usage-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow), var(--glass-inner);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
}

.quick-item {
  background: rgba(255, 255, 255, .56);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-inner-soft);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  backdrop-filter: blur(10px) saturate(140%);
  transition: background .15s ease, box-shadow .15s ease, transform .15s ease;
}
.quick-item:hover {
  background: rgba(253, 241, 244, .82);
  border-color: rgba(243, 213, 222, .95);
  box-shadow: 0 8px 20px rgba(217, 108, 134, .12), var(--glass-inner);
  transform: translateY(-1px);
}

/* ---------- 表格：让玻璃从行间透出 ---------- */

.table th { background: rgba(255, 255, 255, .42); border-bottom: 1px solid var(--glass-line); }
.table td { border-bottom: 1px solid rgba(31, 41, 55, .045); }
.table tbody tr:hover, .file-table tbody tr:hover td { background: rgba(255, 255, 255, .55); }
.pager { border-top: 1px solid var(--glass-line); background: rgba(255, 255, 255, .22); }
.pager-btn {
  background: rgba(255, 255, 255, .68);
  border-color: rgba(255, 255, 255, .85);
  box-shadow: var(--glass-inner-soft);
}
.pager-btn:hover { background: #fff; border-color: var(--pink-line); }

/* ---------- 输入控件：内凹玻璃 ---------- */

.input, .select, .textarea {
  background: rgba(255, 255, 255, .72);
  border-color: rgba(31, 41, 55, .10);
  box-shadow: inset 0 1px 2px rgba(31, 41, 55, .035), inset 0 1px 0 rgba(255, 255, 255, .9);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.input:hover, .select:hover, .textarea:hover { background: rgba(255, 255, 255, .86); }
.input:focus, .select:focus, .textarea:focus {
  background: #fff;
  border-color: var(--pink);
  box-shadow: 0 0 0 3px rgba(217, 108, 134, .14), inset 0 1px 0 #fff;
}
.search-box .input { background: rgba(255, 255, 255, .7); }

/* ---------- 按钮：柔和玻璃 + 粉色实心态 ---------- */

.btn {
  background: rgba(255, 255, 255, .7);
  border-color: rgba(31, 41, 55, .09);
  box-shadow: 0 1px 2px rgba(31, 41, 55, .04), var(--glass-inner-soft);
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease, transform .12s ease;
}
.btn:hover {
  background: rgba(255, 255, 255, .95);
  border-color: var(--pink-line);
  color: var(--pink-dark);
  box-shadow: 0 4px 12px rgba(217, 108, 134, .10), var(--glass-inner);
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--pink);
  border-color: var(--pink);
  box-shadow: 0 6px 16px rgba(217, 108, 134, .28), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.btn-primary:hover {
  background: var(--pink-dark);
  border-color: var(--pink-dark);
  color: #fff;
  box-shadow: 0 8px 20px rgba(217, 108, 134, .34), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.btn-blue { box-shadow: 0 6px 16px rgba(59, 110, 165, .24), inset 0 1px 0 rgba(255, 255, 255, .26); }
.btn-ghost { background: transparent; box-shadow: none; }
.btn-ghost:hover { background: rgba(255, 255, 255, .6); }

/* ---------- 徽标 / 进度 / 提示 ---------- */

.badge { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7); }
.progress, .progress-mini { background: rgba(31, 41, 55, .07); }
.progress span, .progress-mini span { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35); }
.alert { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6); backdrop-filter: blur(6px); }

/* ---------- 下拉 / 弹窗 / 轻提示：更强的玻璃层 ---------- */

.ly-dropdown {
  background: rgba(255, 255, 255, .86);
  border: 1px solid var(--glass-border);
  box-shadow: 0 18px 44px rgba(31, 41, 55, .14), var(--glass-inner);
  -webkit-backdrop-filter: blur(22px) saturate(170%);
  backdrop-filter: blur(22px) saturate(170%);
}
.ly-dropdown a:hover { background: rgba(253, 241, 244, .85); }
.ly-dropdown-head { border-bottom: 1px solid var(--glass-line); }

.ly-modal-mask {
  background: rgba(23, 32, 46, .30);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.ly-modal-box {
  background: rgba(255, 255, 255, .84);
  border: 1px solid rgba(255, 255, 255, .88);
  border-radius: 14px;
  box-shadow: 0 28px 70px rgba(31, 41, 55, .20), var(--glass-inner);
  -webkit-backdrop-filter: blur(26px) saturate(170%);
  backdrop-filter: blur(26px) saturate(170%);
}
.ly-modal-head, .ly-modal-foot { border-color: var(--glass-line); }
.ly-modal-foot { background: rgba(255, 255, 255, .30); }

.toast {
  background: rgba(255, 255, 255, .9);
  border: 1px solid var(--glass-border);
  border-left: 3px solid var(--blue);
  border-radius: 9px;
  box-shadow: 0 14px 34px rgba(31, 41, 55, .12), var(--glass-inner);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  backdrop-filter: blur(18px) saturate(160%);
}
.toast.success { border-left-color: var(--green); }
.toast.error { border-left-color: var(--red); }

/* ---------- 登录页 ---------- */

.auth-wrap { background: transparent; }
.auth-aside {
  background: rgba(255, 255, 255, .58);
  border-right: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
  box-shadow: 12px 0 40px rgba(217, 108, 134, .05);
}
.auth-card {
  background: rgba(255, 255, 255, .70);
  border: 1px solid rgba(255, 255, 255, .86);
  border-radius: 16px;
  padding: 26px 24px 24px;
  box-shadow: 0 22px 56px rgba(31, 41, 55, .10), var(--glass-inner);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  backdrop-filter: blur(24px) saturate(170%);
}
.auth-card .input { background: rgba(255, 255, 255, .82); }
.captcha-img { background: #fff; box-shadow: var(--glass-inner-soft); }

/* ---------- 顶栏吸顶时的柔和过渡（滚动后仍有层次） ---------- */

.ly-content > .page-head h1 { letter-spacing: .2px; }
.ly-foot { color: var(--muted); }

/* ---------- 低版本浏览器降级：无 backdrop-filter 时用高不透明度白 ---------- */

@supports not ((backdrop-filter: blur(2px)) or (-webkit-backdrop-filter: blur(2px))) {
  .card, .stat, .usage-card, .quick-item, .ly-sidebar, .ly-topbar,
  .ly-dropdown, .ly-modal-box, .toast, .auth-aside, .auth-card {
    background: rgba(255, 255, 255, .97);
  }
  body { background: var(--bg); }
}

/* 移动端：避免 background-attachment: fixed 在 iOS 上的错位 */
@media (max-width: 960px) {
  body { background-attachment: scroll; }
  .ly-sidebar { background: rgba(255, 255, 255, .86); }
  .card, .stat, .usage-card { -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
}
