/* ============================================================
   智慧校园设备管理平台 · 通用样式
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body, h1, h2, p { margin: 0; }

:root {
  --blue: #3b82f6;
  --blue-dark: #2563eb;
  --blue-grad: linear-gradient(135deg, #3d7bfd 0%, #63a0ff 100%);
  --bg: #eef1f6;
  --text: #1f2937;
  --text-2: #5b6472;
  --muted: #8a94a6;
  --line: #eef1f6;
  --radius: 12px;
  --shadow: 0 2px 14px rgba(23, 43, 77, .06);
  --sidebar-w: 260px;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #d5dbe5; border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------- 侧边栏 ---------------- */
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  padding: 30px 20px 22px;
  background: #fff;
  display: flex;
  flex-direction: column;
  z-index: 50;
  overflow-y: auto;
}
.profile { display: flex; align-items: center; gap: 14px; padding: 0 8px 24px; border-bottom: 1px solid #f0f2f6; }
.avatar {
  width: 52px; height: 52px; flex: 0 0 auto; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 600; color: #fff;
  background: linear-gradient(135deg, #7cb3ff, #3b82f6);
  box-shadow: 0 6px 14px -6px rgba(59, 130, 246, .9);
}
.profile .name { font-size: 16px; font-weight: 600; line-height: 1.3; }
.profile .role { margin-top: 5px; font-size: 12.5px; color: #9aa3b5; }

.nav { display: flex; flex-direction: column; gap: 6px; margin-top: 26px; }
.nav a {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px; border-radius: 10px;
  font-size: 14.5px; color: var(--text-2); text-decoration: none;
  transition: background .18s, color .18s, box-shadow .18s;
}
.nav a svg { width: 19px; height: 19px; flex: 0 0 auto; color: #9aa4b5; transition: color .18s; }
.nav a:hover { background: #f4f7fe; color: var(--blue); }
.nav a:hover svg { color: var(--blue); }
.nav a.active {
  background: var(--blue-grad);
  color: #fff;
  box-shadow: 0 12px 22px -10px rgba(59, 130, 246, .95);
}
.nav a.active svg { color: #fff; }

.side-foot { margin-top: auto; padding: 26px 10px 0; font-size: 12px; color: #b9c1ce; }

/* ---------------- 主区域 ---------------- */
.main { margin-left: var(--sidebar-w); padding: 26px 30px 44px; min-height: 100vh; }

/* 顶部横幅 */
.banner {
  position: relative; overflow: hidden;
  padding: 30px 34px 34px;
  border-radius: var(--radius);
  color: #fff; background: var(--blue-grad);
  box-shadow: 0 16px 30px -18px rgba(37, 99, 235, .95);
}
.banner .waves { position: absolute; top: 0; right: 0; width: 52%; height: 100%; pointer-events: none; }
.banner h1 { position: relative; font-size: 27px; font-weight: 700; letter-spacing: .5px; }
.banner p { position: relative; margin-top: 12px; font-size: 13.5px; color: rgba(255, 255, 255, .88); max-width: 720px; }
.banner .btn-ghost {
  position: absolute; right: 34px; bottom: 30px;
  padding: 9px 26px; font-size: 13.5px;
  color: #fff; background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .85); border-radius: 5px; cursor: pointer;
  transition: background .18s;
}
.banner .btn-ghost:hover { background: rgba(255, 255, 255, .16); }
.banner .close {
  position: absolute; top: 14px; right: 16px;
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  color: #fff; background: none; border: 0; cursor: pointer; opacity: .85; border-radius: 6px;
}
.banner .close:hover { opacity: 1; background: rgba(255, 255, 255, .12); }
.banner .close svg { width: 16px; height: 16px; }

/* 网格 */
.grid { display: grid; gap: 24px; margin-top: 24px; }
.grid-2 { grid-template-columns: 1.62fr 1fr; }

/* 卡片 */
.card {
  background: #fff; border-radius: var(--radius);
  padding: 26px 28px; box-shadow: var(--shadow);
}
.card h2 { margin-bottom: 24px; font-size: 16px; font-weight: 600; }

/* 概览卡片 */
.overview-row { display: flex; align-items: flex-end; gap: 30px; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: 12px; }
.field-label { font-size: 13px; color: var(--muted); }
.field-value { font-size: 27px; font-weight: 700; line-height: 1; letter-spacing: .3px; }
.field-value i { margin-left: 6px; font-size: 14px; font-style: normal; font-weight: 500; color: var(--muted); }
.overview-row .btn { margin-left: auto; }
.overview-sub {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
  margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--line);
}
.overview-sub .field { align-items: center; text-align: center; gap: 10px; }
.overview-sub .field-value { font-size: 24px; }

/* 开关 */
.switch { position: relative; display: inline-block; width: 46px; height: 25px; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch .track { position: absolute; inset: 0; border-radius: 999px; background: #d8dee9; transition: background .2s; }
.switch .track::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 19px; height: 19px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .22); transition: transform .2s;
}
.switch input:checked + .track { background: var(--blue-grad); }
.switch input:checked + .track::after { transform: translateX(21px); }

/* 阈值输入 */
.threshold { display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border: 1px solid #dfe4ec; border-radius: 8px; background: #fff; }
.threshold input { width: 64px; border: 0; outline: 0; font: inherit; color: var(--text); }
.threshold i { font-style: normal; font-size: 13px; color: var(--muted); }

/* 待办底部 */
.backlog-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--line); }
.unread { display: flex; align-items: baseline; gap: 8px; margin-top: 10px; }
.unread b { font-size: 24px; }
.unread span { font-size: 13px; color: var(--muted); }
.link { font-size: 13.5px; color: var(--blue); text-decoration: none; }
.link:hover { text-decoration: underline; }

/* 按钮 */
.btn { border: 0; border-radius: 8px; padding: 10px 22px; font-size: 13.5px; cursor: pointer; transition: filter .18s, box-shadow .18s; white-space: nowrap; }
.btn-primary { color: #fff; background: var(--blue-grad); box-shadow: 0 12px 20px -12px rgba(59, 130, 246, 1); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: 8px; }
.btn-outline-danger { color: #e0433b; background: #fff; border: 1px solid #ffd3d1; box-shadow: none; }
.btn-outline-danger:hover:not(:disabled) { background: #fff6f6; border-color: #ffb3ae; }
.btn-outline-danger:disabled { color: #b8c0cc; border-color: #e8ebf1; background: #fafbfe; cursor: not-allowed; }
.btn-danger { color: #fff; background: linear-gradient(135deg, #ef5350, #e0433b); box-shadow: 0 12px 20px -12px rgba(224, 67, 59, .85); }
.btn-danger:hover { filter: brightness(1.05); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* 页面标题 */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { font-size: 21px; font-weight: 700; }
.page-head p { margin-top: 6px; font-size: 13px; color: var(--muted); }
.page-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* 统计卡片 */
.grid-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 24px; }
.grid-stats.cols-5 { grid-template-columns: repeat(5, 1fr); }
.stat-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 22px 24px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.stat-card .label { font-size: 13px; color: var(--muted); }
.stat-card .value { margin-top: 10px; font-size: 26px; font-weight: 700; line-height: 1; }
.stat-card .value .unit { margin-left: 5px; font-size: 13px; font-weight: 500; color: var(--muted); }
.stat-card .icon { width: 46px; height: 46px; flex: 0 0 auto; border-radius: 12px; display: flex; align-items: center; justify-content: center; }
.stat-card .icon svg { width: 21px; height: 21px; }
.icon-blue { background: #eaf1ff; color: #3b82f6; }
.icon-green { background: #e9f9f0; color: #12a150; }
.icon-orange { background: #fff5e6; color: #e08a00; }
.icon-purple { background: #f2ecff; color: #7c5cff; }
.icon-cyan { background: #e6f7fb; color: #0891b2; }
.icon-gray { background: #f2f4f8; color: #7c8698; }

/* 表格卡片 */
.card-table { padding: 0; }
.card-table .card-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 22px 26px; }
.card-table h2 { margin: 0; }
.card-table h2 small { margin-left: 8px; font-size: 12.5px; font-weight: 400; color: var(--muted); }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.chip { padding: 8px 16px; font-size: 13px; color: var(--text-2); background: #fff; border: 1px solid #e8ebf1; border-radius: 8px; cursor: pointer; transition: all .15s; }
.chip:hover { color: var(--blue); border-color: #cddcff; }
.chip.active { color: #fff; background: var(--blue-grad); border-color: transparent; box-shadow: 0 10px 16px -10px rgba(59, 130, 246, 1); }
.search { position: relative; display: inline-flex; align-items: center; }
.search svg { position: absolute; left: 12px; width: 15px; height: 15px; color: #9aa4b5; pointer-events: none; }
.search input { width: 260px; padding: 9px 14px 9px 36px; font: inherit; font-size: 13px; color: var(--text); background: #fff; border: 1px solid #e8ebf1; border-radius: 8px; outline: none; transition: border-color .15s, box-shadow .15s; }
.search input:focus { border-color: #9dc0ff; box-shadow: 0 0 0 3px rgba(59, 130, 246, .12); }

.table-wrap { overflow-x: auto; }
.table { width: 100%; min-width: 860px; border-collapse: collapse; font-size: 13.5px; }
.table th { padding: 12px 26px; text-align: left; font-size: 12.5px; font-weight: 500; color: var(--muted); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 15px 26px; border-bottom: 1px solid #f5f7fb; color: #333c4d; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafbfe; }
.table .strong { font-weight: 600; color: var(--text); }
.row-sub { display: block; margin-top: 3px; font-size: 11.5px; font-weight: 400; color: var(--muted); }
.cell-unit { margin-left: 3px; font-size: 11.5px; color: var(--muted); }
.check-cell { width: 46px; padding-left: 26px !important; padding-right: 0 !important; }
.check-cell input { width: 15px; height: 15px; accent-color: var(--blue); cursor: pointer; vertical-align: middle; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; font-size: 12px; border-radius: 999px; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.online { color: #12a150; background: #e9f9f0; }
.badge.offline { color: #7c8698; background: #f2f4f8; }
.badge.normal { color: #12a150; background: #e9f9f0; }
.badge.fault { color: #e08a00; background: #fff5e6; }
.badge.damaged { color: #e0433b; background: #feecec; }
.badge.repair { color: #3b82f6; background: #eaf1ff; }
.badge.maintain { color: #e08a00; background: #fff5e6; }
.badge.ok { color: #12a150; background: #e9f9f0; }
.badge.warn { color: #e08a00; background: #fff5e6; }

.progress { display: flex; align-items: center; gap: 10px; min-width: 130px; }
.progress .bar { flex: 1; height: 6px; border-radius: 6px; background: #eef1f6; overflow: hidden; }
.progress .bar span { display: block; height: 100%; border-radius: 6px; background: var(--blue-grad); }
.progress em { width: 36px; font-size: 12.5px; font-style: normal; text-align: right; color: var(--text-2); }

.t-link { font-size: 13px; color: var(--blue); text-decoration: none; }
.t-link:hover { text-decoration: underline; }
.t-link.danger { color: #e0433b; }
.t-link + .t-link { margin-left: 14px; }

.empty { padding: 40px; text-align: center; font-size: 13.5px; color: var(--muted); }

/* 轻提示 */
.toast {
  position: fixed; right: 28px; bottom: 28px; z-index: 99;
  padding: 12px 20px; font-size: 13.5px; color: #fff;
  background: #1f2937; border-radius: 10px;
  box-shadow: 0 16px 34px rgba(15, 23, 42, .28);
  opacity: 0; transform: translateY(12px);
  transition: opacity .22s, transform .22s;
  pointer-events: none;
}
.toast.show { opacity: 1; transform: none; }

/* 移动端菜单按钮 / 遮罩 */
.menu-btn {
  display: none; position: fixed; top: 14px; left: 14px; z-index: 60;
  width: 40px; height: 40px; align-items: center; justify-content: center;
  color: #41506b; background: #fff; border: 1px solid #e8ebf1; border-radius: 10px;
  box-shadow: var(--shadow); cursor: pointer;
}
.menu-btn svg { width: 18px; height: 18px; }
.backdrop { position: fixed; inset: 0; z-index: 45; background: rgba(15, 23, 42, .38); opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s; }
.backdrop.show { opacity: 1; visibility: visible; }

/* 学校列表 */
.card-schools { margin-top: 24px; }
.card-schools + .card { margin-top: 24px; }
.card-schools .card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.card-schools h2 { margin: 0; }
.card h2 small { margin-left: 8px; font-size: 12.5px; font-weight: 400; color: var(--muted); }
.card h2 small b { color: var(--blue); font-weight: 600; }
.school-foot { display: flex; justify-content: flex-end; margin-top: 14px; font-size: 13px; color: var(--muted); }
.school-foot b { margin-left: 4px; font-weight: 600; color: var(--blue); }
.mt24 { margin-top: 24px; }

/* 分区小标题 */
.section-head { display: flex; align-items: baseline; gap: 10px; margin: 24px 0 14px; }
.section-head h2 { font-size: 16px; font-weight: 600; }
.section-head small { font-size: 12.5px; color: var(--muted); }

.school-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px, 1fr)); gap: 12px; }
.school-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 58px; padding: 12px 14px;
  font-size: 14px; line-height: 1.35; color: var(--text-2);
  background: #fff; border: 1px solid #e8ebf1; border-radius: 10px; cursor: pointer;
  transition: color .15s, border-color .15s, background .15s, box-shadow .15s;
}
.school-btn .sub { margin-top: 3px; font-size: 12px; opacity: .72; }
.school-btn:hover { color: var(--blue); border-color: #cddcff; background: #f7faff; }
.school-btn.active { color: #fff; background: var(--blue-grad); border-color: transparent; box-shadow: 0 12px 20px -12px rgba(59, 130, 246, 1); }
.school-btn.active .sub { opacity: .88; }
.school-btn.school-all { color: var(--blue); background: #f7faff; border-color: #cddcff; }
.school-btn.school-all.active { color: #fff; background: var(--blue-grad); border-color: transparent; }

/* 弹窗 */
.modal-mask {
  position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center;
  padding: 20px; background: rgba(15, 23, 42, .45); opacity: 0; transition: opacity .2s;
}
.modal-mask.show { opacity: 1; }
.modal {
  position: relative; width: min(460px, 100%); max-height: calc(100vh - 40px); overflow-y: auto;
  padding: 26px 28px; background: #fff; border-radius: 14px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .28);
  transform: translateY(12px) scale(.98); transition: transform .2s;
}
.modal-mask.show .modal { transform: none; }
.modal-wide { width: min(760px, 100%); }
.modal h3 { font-size: 17px; font-weight: 600; }
.modal .modal-sub { margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.modal-close {
  position: absolute; top: 16px; right: 16px; width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  color: #9aa4b5; background: none; border: 0; border-radius: 8px; cursor: pointer;
}
.modal-close:hover { color: var(--text); background: #f2f4f8; }
.modal-close svg { width: 15px; height: 15px; }

.kv { margin-top: 20px; }
.kv > div { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px dashed #f0f2f6; font-size: 13.5px; }
.kv > div:last-child { border-bottom: 0; }
.kv > div > span:first-child { color: var(--muted); }
.kv b { font-weight: 600; }

.form { display: flex; flex-direction: column; gap: 14px; margin-top: 20px; }
.form-row { display: flex; flex-direction: column; gap: 7px; }
.form-row > span { font-size: 12.5px; color: var(--muted); }
.form-row input, .form-row select {
  height: 40px; padding: 0 12px; font: inherit; font-size: 13.5px; color: var(--text);
  background: #fff; border: 1px solid #dfe4ec; border-radius: 8px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.form-row input:focus, .form-row select:focus { border-color: #9dc0ff; box-shadow: 0 0 0 3px rgba(59, 130, 246, .12); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-hint { font-size: 12px; color: var(--muted); }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }

/* 批量导入 */
.import-panel { margin-top: 18px; }
.import-guide { font-size: 12.5px; line-height: 1.8; color: var(--text-2); }
.import-guide b { color: var(--text); }
.import-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.import-file-input { display: none; }
.import-result { margin-top: 16px; }
.import-summary { font-size: 13px; color: var(--text-2); }
.import-summary b { color: var(--text); }
.import-ok { color: #12a150; }
.import-bad { color: #dc2626; }
.import-warn { color: #d97706; }
.import-preview { margin-top: 12px; max-height: 300px; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.import-preview .table { min-width: 0; font-size: 12.5px; }
.import-preview .table th, .import-preview .table td { padding: 8px 10px; white-space: nowrap; }
.import-preview .table td:last-child { white-space: normal; }
.import-errors { margin-top: 12px; padding: 10px 12px; border-radius: 9px; background: #fff7f6; color: #a23b36; font-size: 12px; line-height: 1.8; }
.import-errors b { display: block; margin-bottom: 4px; }
.confirm-text { margin: 4px 0 0; font-size: 13.5px; color: var(--text-2); line-height: 1.75; }
.confirm-text b { color: var(--text); }
.warn-note { margin-top: 14px; padding: 12px 14px; border-radius: 10px; background: #fff7f6; color: #a23b36; font-size: 12.5px; line-height: 1.8; }
.btn-plain {
  padding: 10px 20px; font-size: 13.5px; color: var(--text-2);
  background: #f4f6fa; border: 0; border-radius: 8px; cursor: pointer; transition: background .15s;
}
.btn-plain:hover { background: #eaeef6; }
@media (max-width: 640px) {
  .modal { padding: 22px 18px; }
  .form-grid { grid-template-columns: 1fr; }
}

/* 响应式 */
@media (max-width: 1180px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-stats { grid-template-columns: repeat(2, 1fr); }
  .grid-stats.cols-5 { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 1024px) {
  .menu-btn { display: flex; }
  .sidebar { transform: translateX(-100%); transition: transform .25s; box-shadow: 0 0 40px rgba(15, 23, 42, .18); }
  .sidebar.open { transform: none; }
  .main { margin-left: 0; padding: 72px 18px 36px; }
}
@media (max-width: 640px) {
  .grid-stats { grid-template-columns: 1fr; }
  .school-grid { grid-template-columns: repeat(2, 1fr); }
  .card { padding: 22px 18px; }
  .card-table .card-head { padding: 18px; }
  .table th, .table td { padding: 12px 18px; }
  .banner { padding: 24px 20px 88px; }
  .banner h1 { font-size: 22px; }
  .banner .btn-ghost { right: auto; left: 20px; bottom: 24px; }
  .overview-row { gap: 22px; }
  .overview-sub { gap: 12px; }
  .search { flex: 1 1 100%; }
  .search input { width: 100%; }
}

/* ---------------- 云端登录 / 同步状态 ---------------- */
body.cloud-locked { overflow: hidden; }
body.cloud-locked > :not(.cloud-login):not(script) { visibility: hidden; }

.cloud-login {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 18% 8%, rgba(59, 130, 246, .3), transparent 42%),
    rgba(15, 23, 42, .64);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.cloud-login-card {
  width: min(420px, 100%);
  padding: 34px 32px 26px;
  text-align: center;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 30px 80px -20px rgba(15, 23, 42, .55);
  animation: cloudIn .25s ease-out;
}
@keyframes cloudIn {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to { opacity: 1; transform: none; }
}
.cloud-login-mark {
  width: 54px; height: 54px; margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 600; color: #fff;
  background: var(--blue-grad);
  border-radius: 16px;
  box-shadow: 0 14px 24px -12px rgba(59, 130, 246, .95);
}
.cloud-login-mark.warn { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.cloud-login-card h2 { font-size: 20px; font-weight: 650; }
.cloud-login-desc { margin-top: 10px; font-size: 13px; line-height: 1.7; color: var(--text-2); }
.cloud-login-form { margin-top: 22px; text-align: left; }
.cloud-login-form label { display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; color: var(--muted); }
.cloud-login-form input {
  width: 100%; padding: 12px 14px;
  font: inherit; font-size: 14px; color: var(--text);
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 9px;
  outline: none; transition: border-color .15s, box-shadow .15s, background .15s;
}
.cloud-login-form input:focus { background: #fff; border-color: #9dc0ff; box-shadow: 0 0 0 3px rgba(59, 130, 246, .12); }
.cloud-login-form .btn { width: 100%; margin-top: 14px; padding: 11px 20px; }
.cloud-login-error { min-height: 18px; margin-top: 9px; font-size: 12.5px; color: #dc2626; }
.cloud-login-foot { margin-top: 20px; font-size: 11.5px; color: var(--muted); }
.cloud-fatal-actions { margin-top: 20px; }
.cloud-fatal-actions .btn { width: 100%; }

.cloud-dot { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: #94a3b8; }
.cloud-status {
  display: flex; align-items: center; gap: 8px;
  width: 100%; margin: 0 0 12px; padding: 8px 10px;
  font-size: 12px; color: #64748b; text-align: left;
  background: #f8fafc; border: 1px solid #eef2f7; border-radius: 9px;
  cursor: pointer; transition: background .15s, border-color .15s;
}
.cloud-status:hover { background: #f1f5f9; border-color: #e2e8f0; }
.cloud-status [data-cloud-label] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cloud-status.ok .cloud-dot, .cloud-panel-state.ok .cloud-dot { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .13); }
.cloud-status.syncing .cloud-dot, .cloud-panel-state.syncing .cloud-dot { background: #f59e0b; animation: cloudPulse 1s infinite; }
.cloud-status.error .cloud-dot, .cloud-panel-state.error .cloud-dot { background: #ef4444; box-shadow: 0 0 0 3px rgba(239, 68, 68, .13); }
@keyframes cloudPulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.cloud-panel-state {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px; margin-top: 18px;
  background: #f8fafc; border: 1px solid #eef2f7; border-radius: 11px;
}
.cloud-panel-state .cloud-dot { margin-top: 5px; }
.cloud-panel-state > div { display: flex; flex-direction: column; gap: 3px; }
.cloud-panel-state b { font-size: 13px; font-weight: 600; }
.cloud-panel-state.ok { background: #f0fdf4; border-color: #dcfce7; }
.cloud-panel-state.error { background: #fef2f2; border-color: #fee2e2; }
.cloud-panel-state.syncing { background: #fffbeb; border-color: #fef3c7; }
.cloud-kv { margin-top: 12px; }
.cloud-panel-actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 20px; }
.cloud-panel-actions .btn:disabled { opacity: .5; cursor: not-allowed; }
.cloud-panel-error {
  margin-top: 14px; padding: 10px 12px;
  font-size: 12.5px; color: #b91c1c;
  background: #fef2f2; border: 1px solid #fee2e2; border-radius: 8px;
}
.btn-plain.btn-danger-text { color: #dc2626; }
.btn-plain.btn-danger-text:hover { background: #fef2f2; }
