/* 控制台样式(与 base.css 一起加载)。登录页、房间管理、关房确认框。 */
.page { padding-top: 1.75rem; padding-bottom: 1rem; min-height: 60vh; }

/* 登录 */
.login-wrap { display: flex; justify-content: center; padding: 1rem 0 0; }
.login-card { width: 100%; max-width: 26rem; }
.login-title { font-size: 1.5rem; margin-bottom: .35rem; }
.login-sub { color: var(--muted); font-size: .95rem; margin-bottom: 1.25rem; }
.field { margin: 0 0 1.1rem; }
.login-card .field:last-of-type { margin-bottom: 1.35rem; }
button.block { display: flex; width: 100%; min-height: 2.9rem; }
.login-foot { margin: 1.25rem 0 0; text-align: center; font-size: .92rem; color: var(--muted); }

/* 房间管理 */
.page-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1rem; margin-bottom: 1.1rem; }
.page-head h1 { margin: 0; font-size: 1.5rem; }
.page-head h1:focus { outline: none; }
.who { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem .75rem; color: var(--muted); font-size: .92rem; }
.block-gap { margin-bottom: 1.1rem; }
.card h2 { font-size: 1.1rem; }
.card .field:last-child { margin-bottom: 0; }
.create-grid { display: grid; grid-template-columns: 2fr 1.4fr auto; gap: 0 1rem; align-items: end; }
.field-action { margin-bottom: 1.1rem; }
.table-scroll { overflow-x: auto; margin-bottom: .5rem; }
.table-scroll:focus { outline: none; }
.table-scroll table { min-width: 36rem; }
.table-scroll td button, .table-scroll td .btn { min-height: 2.1rem; padding: .25rem .8rem; font-size: .9rem; margin-right: .4rem; }
.pager { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding-top: .75rem; }
.pager button { min-height: 2.2rem; padding: .3rem .9rem; font-size: .92rem; }
.pager span { margin-left: .25rem; color: var(--muted); font-size: .9rem; }

/* 状态着色:颜色之外都有文字标记 */
.tone-ok { color: var(--ok); font-weight: 600; }
.tone-warn { color: var(--warn); font-weight: 600; }
.tone-muted { color: var(--muted); }
.tone-bad { color: var(--danger); font-weight: 700; }
.row-bad { background: var(--danger-soft); }

/* 关房确认框:居中浮层,用超大 box-shadow 做遮罩,不需要额外元素 */
.confirm {
  position: fixed; z-index: 20; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: calc(100% - 2rem); max-width: 26rem; padding: 1.35rem;
  background: var(--surface); border: 1px solid var(--border); border-radius: 1rem;
  box-shadow: 0 0 0 100vmax rgba(15, 23, 42, .5), 0 12px 40px rgba(15, 23, 42, .3);
}
.confirm h3 { color: var(--danger); }
.confirm-actions { display: flex; justify-content: flex-end; gap: .6rem; }

@media (max-width: 640px) {
  .page { padding-top: 1.1rem; }
  .create-grid { grid-template-columns: 1fr; }
  .field-action { margin-bottom: 0; }
  .field-action button { width: 100%; }
  .table-scroll table { min-width: 0; }
  .table-scroll th:nth-child(4), .table-scroll td:nth-child(4) { display: none; }
  .table-scroll th, .table-scroll td { padding: .5rem .45rem; font-size: .88rem; }
  .table-scroll td button { margin: 0 .3rem .3rem 0; }
  .confirm-actions button { flex: 1; }
}

/* 登录视图时,状态条与登录卡片同宽居中 */
.page:has(#view-login:not([hidden])) > .status { max-width: 26rem; margin-left: auto; margin-right: auto; }

/* 登录表单里的复选框行(「信任此设备」预留位) */
.login-card .check-row { margin: -.25rem 0 1.1rem; font-size: .92rem; }
label.inline { display: flex; align-items: flex-start; font-weight: 500; margin: 0; }
label.inline input { margin-top: .3rem; flex: none; }

.login-need { margin: 1.1rem 0 0; font-size: .85rem; line-height: 1.6; color: var(--muted); text-align: center; }
.login-need + .login-foot { margin-top: .6rem; }

.who .forget { font-size: .88rem; color: var(--muted); }
.who .forget input { margin-top: .15rem; }

/* Workspace: existing tytalk blue, Geist-style quiet borders; system fonts, no CDN. */
#view-main { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 2rem; }
.workspace-sidebar { border-right: 1px solid var(--border); padding-right: 1.25rem; }
.eyebrow { font-size: .7rem; letter-spacing: .12em; color: var(--muted); font-weight: 700; }
.workspace-sidebar nav { display: grid; gap: .35rem; margin: 1rem 0 2rem; }
.workspace-sidebar nav a { padding: .65rem .8rem; border-radius: .5rem; text-decoration: none; color: var(--text); font-size: .92rem; }
.workspace-sidebar nav a[aria-current="page"], .workspace-sidebar nav a:hover { background: var(--primary-soft); color: var(--primary-dark); }
.workspace-content { min-width: 0; }
.workspace-content .card { box-shadow: none; }
.account-menu { position: relative; }
.account-menu summary { cursor: pointer; padding: .5rem .7rem; border: 1px solid var(--border); border-radius: .5rem; font-size: .9rem; }
.account-menu .who { position: absolute; right: 0; top: 3rem; z-index: 5; width: 270px; padding: 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: .65rem; box-shadow: var(--shadow); }
.welcome { padding: 1.5rem 0 2rem; max-width: 36rem; }
.welcome h2 { font-size: 2rem; letter-spacing: -.04em; }
.welcome p { color: var(--muted); }
.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: .6rem; }
.metric-grid .card { padding: 1rem 1.2rem; }
.metric-grid span { font-size: .85rem; color: var(--muted); }
.metric-grid strong { display: block; font-size: 2rem; color: var(--ink); font-weight: 600; }
.onboarding { padding-left: 1.4rem; margin-bottom: 0; }
.onboarding li { padding: .55rem 0 .8rem .4rem; font-weight: 600; }
.onboarding span { display: block; color: var(--muted); font-size: .9rem; font-weight: 400; }
.filter-row { display: flex; gap: .8rem; align-items: end; margin-bottom: .6rem; flex-wrap: wrap; }
.filter-row > div:first-child { flex: 1; min-width: 150px; }
.capability-list dt { font-weight: 600; border-top: 1px solid var(--border); padding-top: 1rem; }
.capability-list dd { margin: .3rem 0 1rem; color: var(--muted); }
.workspace-panel pre { overflow: auto; padding: 1rem; background: var(--bg-soft); border: 1px solid var(--border); border-radius: .5rem; font-size: .8rem; }
.workspace-panel code { border: 0; padding: 0; }
@media (max-width: 760px) {
 #view-main { display: block; }
 .workspace-sidebar { border-right: 0; padding: 0; }
 .workspace-sidebar > p { display: none; }
 .workspace-sidebar nav { display: flex; overflow-x: auto; margin: 0 0 1.25rem; gap: .15rem; }
 .workspace-sidebar nav a { white-space: nowrap; padding: .55rem .65rem; }
 .metric-grid { gap: .5rem; }
 .metric-grid .card { padding: .8rem; }
 .metric-grid strong { font-size: 1.65rem; }
 .welcome h2 { font-size: 1.7rem; }
 .filter-row > div { flex: 1; }
 .workspace-content .page-head { align-items: center; }
}
