/* ==========================================================================
   Win11 Web — 应用专属样式（任务管理器 / 照片 / 时钟 / 商店 / 回收站 / 浏览器）
   ========================================================================== */

/* ---------- 通用：标签条 / 按钮 ---------- */
.tm-tabs, .ck-tabs, .st-tabs {
  display: flex; gap: 4px; padding: 8px 12px; border-bottom: 1px solid var(--line);
  background: var(--panel-bg); flex: none; overflow-x: auto;
}
.tm-tab, .ck-tab, .st-tab {
  border: 0; background: transparent; color: var(--text-2); font: inherit; font-size: 12.5px;
  padding: 6px 14px; border-radius: 6px; cursor: pointer; white-space: nowrap;
}
.tm-tab:hover, .ck-tab:hover, .st-tab:hover { background: var(--hover); color: var(--text); }
.tm-tab.on, .ck-tab.on, .st-tab.on { background: var(--panel-bg); color: var(--text); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); }

/* ======================= 任务管理器 ======================= */
.tm-body { flex: 1; overflow: auto; padding: 10px 12px; }
.tm-group { margin-bottom: 14px; }
.tm-gh {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 12px; font-weight: 600; color: var(--text-2);
  padding: 6px 8px; letter-spacing: .2px;
}
.tm-gh > span:first-child { display: flex; align-items: center; gap: 6px; }
.tm-gh svg { width: 15px; height: 15px; }
.tm-sum { font-weight: 500; color: var(--text-3); font-variant-numeric: tabular-nums; }
.tm-row {
  display: grid; grid-template-columns: 24px 1fr 88px; align-items: center; gap: 10px;
  padding: 7px 8px; border-radius: 5px; cursor: default; font-size: 12.5px;
}
.tm-row:hover { background: var(--hover); }
.tm-row.on { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.tm-ic { width: 20px; height: 20px; display: flex; }
.tm-ic svg { width: 100%; height: 100%; }
.tm-nm { display: flex; flex-direction: column; min-width: 0; }
.tm-nm em { font-style: normal; font-size: 11px; color: var(--text-3); }
.tm-mem { text-align: right; color: var(--text-2); font-variant-numeric: tabular-nums; font-size: 12px; }
.tm-none { padding: 18px; text-align: center; color: var(--text-3); font-size: 12.5px; }
.tm-row.sys { opacity: .72; }

.tm-perf { display: flex; flex-direction: column; gap: 16px; padding: 6px 2px 12px; }
.tm-bar .tm-bl { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-2); margin-bottom: 5px; }
.tm-bt { height: 8px; border-radius: 4px; background: var(--hover); overflow: hidden; }
.tm-bt i { display: block; height: 100%; border-radius: 4px; transition: width .5s cubic-bezier(.3,.9,.3,1); }
.tm-stat { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 8px; }
.tm-stat > div { background: var(--panel-bg); border: 1px solid var(--line); border-radius: 7px; padding: 12px; text-align: center; }
.tm-stat b { display: block; font-size: 20px; font-weight: 600; }
.tm-stat span { font-size: 11px; color: var(--text-3); }
.tm-sys { display: flex; flex-direction: column; }
.tm-kv { display: flex; justify-content: space-between; padding: 7px 6px; font-size: 12.5px; border-bottom: 1px solid var(--line); }
.tm-kv:last-child { border-bottom: 0; }
.tm-kv span { color: var(--text-2); }
.tm-kv b { font-weight: 500; text-align: right; max-width: 60%; word-break: break-all; }

/* ======================= 照片 ======================= */
.ph-top {
  display: flex; align-items: center; gap: 4px; padding: 8px 10px;
  border-bottom: 1px solid var(--line); background: var(--panel-bg); flex: none;
}
.ph-btn {
  width: 34px; height: 34px; border: 0; background: transparent; border-radius: 5px;
  display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text);
}
.ph-btn:hover { background: var(--hover); }
.ph-btn svg { width: 17px; height: 17px; }
.ph-name { flex: 1; text-align: center; font-size: 12.5px; color: var(--text-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 8px; }
.ph-stage {
  flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center;
  background: repeating-conic-gradient(var(--hover) 0% 25%, transparent 0% 50%) 50%/22px 22px;
  overflow: auto; position: relative;
}
.ph-stage img { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform .12s ease; transform-origin: center; }
.ph-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--text-2); font-size: 13px; }
.ph-empty svg { width: 52px; height: 52px; opacity: .5; }
.ph-empty .sub { font-size: 11.5px; color: var(--text-3); }
.ph-cta { margin-top: 6px; border: 0; background: var(--accent); color: #fff; padding: 7px 16px; border-radius: 5px; cursor: pointer; font: inherit; font-size: 12.5px; }
.ph-bar { flex: none; height: 28px; display: flex; align-items: center; justify-content: center; font-size: 11.5px; color: var(--text-3); border-top: 1px solid var(--line); font-variant-numeric: tabular-nums; }

/* ======================= 时钟 ======================= */
.ck-body { flex: 1; overflow: auto; display: flex; flex-direction: column; }
.ck-clock { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 16px; }
.ck-digital { font-size: 42px; font-weight: 300; letter-spacing: 2px; font-variant-numeric: tabular-nums; }
.ck-date { font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.ck-analog { width: 190px; height: 190px; }
.ck-face { fill: var(--panel-bg); stroke: var(--line); stroke-width: 1.5; }
.ck-tick { stroke: var(--text-3); stroke-width: 2; stroke-linecap: round; }
.ck-h { stroke: var(--text); stroke-width: 5.5; stroke-linecap: round; transform-origin: 100px 100px; }
.ck-m { stroke: var(--text); stroke-width: 3.6; stroke-linecap: round; transform-origin: 100px 100px; }
.ck-s { stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; transform-origin: 100px 100px; }
.ck-pin { fill: var(--accent); }

.ck-stop, .ck-timer { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; padding: 20px; }
.ck-big { font-size: 50px; font-weight: 300; font-variant-numeric: tabular-nums; letter-spacing: 1px; }
.ck-ctrl { display: flex; gap: 10px; }
.ck-b { border: 0; background: var(--accent); color: #fff; padding: 9px 26px; border-radius: 6px; font: inherit; font-size: 13px; cursor: pointer; }
.ck-b:hover { background: var(--accent-hover); }
.ck-b.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.ck-b.ghost:hover { background: var(--hover); }
.ck-preset { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.ck-p { border: 1px solid var(--line); background: var(--panel-bg); color: var(--text-2); padding: 5px 12px; border-radius: 14px; font: inherit; font-size: 12px; cursor: pointer; }
.ck-p:hover { background: var(--hover); color: var(--text); }
.ck-laps { width: 100%; max-width: 340px; max-height: 130px; overflow: auto; }
.ck-lap { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; padding: 5px 8px; font-size: 12.5px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.ck-lap em { font-style: normal; color: var(--text-3); }
.ck-world { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; padding: 14px; }
.ck-z { background: var(--panel-bg); border: 1px solid var(--line); border-radius: 8px; padding: 12px; text-align: center; }
.ck-zn { font-size: 12px; color: var(--text-2); }
.ck-zt { font-size: 25px; font-weight: 400; margin: 5px 0 2px; font-variant-numeric: tabular-nums; }
.ck-zd { font-size: 11px; color: var(--text-3); }

/* ======================= 应用商店 ======================= */
.st-head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 18px; border-bottom: 1px solid var(--line); flex: none; flex-wrap: wrap;
}
.st-title { display: flex; align-items: center; gap: 10px; }
.st-title svg { width: 30px; height: 30px; }
.st-title b { display: block; font-size: 15px; }
.st-title span { font-size: 11.5px; color: var(--text-3); }
.st-search { display: flex; align-items: center; gap: 7px; background: var(--panel-bg); border: 1px solid var(--line); border-radius: 6px; padding: 0 10px; height: 34px; min-width: 220px; }
.st-search svg { width: 15px; height: 15px; color: var(--text-3); }
.st-search input { flex: 1; border: 0; background: transparent; outline: 0; font: inherit; font-size: 12.5px; color: var(--text); }
.st-list { flex: 1; overflow: auto; padding: 14px 18px; display: flex; flex-direction: column; gap: 10px; }
.st-card {
  display: grid; grid-template-columns: 52px 1fr auto; gap: 14px; align-items: center;
  background: var(--panel-bg); border: 1px solid var(--line); border-radius: 9px; padding: 14px 16px;
}
.st-card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.st-ic { width: 48px; height: 48px; display: flex; }
.st-ic svg { width: 100%; height: 100%; }
.st-meta { min-width: 0; }
.st-nm { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.st-pub { font-style: normal; font-weight: 400; font-size: 11px; color: var(--text-3); }
.st-ds { font-size: 12px; color: var(--text-2); margin: 4px 0 7px; line-height: 1.5; }
.st-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.st-tags span { font-size: 10.5px; padding: 2px 8px; border-radius: 10px; background: var(--hover); color: var(--text-2); }
.st-tags .ok { background: color-mix(in srgb, #4caf50 20%, transparent); color: #2e7d32; }
.st-tags .demo { background: color-mix(in srgb, #ff9800 20%, transparent); color: #b26a00; }
.st-tags .run { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent); }
.st-act { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.st-act button { border: 0; border-radius: 5px; padding: 7px 16px; font: inherit; font-size: 12.5px; cursor: pointer; white-space: nowrap; }
.st-open, .st-ins { background: var(--accent); color: #fff; }
.st-open:hover, .st-ins:hover { background: var(--accent-hover); }
.st-unins { background: transparent; color: var(--text-2); border: 1px solid var(--line) !important; }
.st-unins:hover { background: var(--hover); color: var(--text); }
.st-none { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: var(--text-3); font-size: 13px; }
.st-none svg { width: 44px; height: 44px; opacity: .4; }

/* ======================= 回收站 ======================= */
.rc-top { display: flex; align-items: center; gap: 6px; padding: 9px 12px; border-bottom: 1px solid var(--line); background: var(--panel-bg); flex: none; }
.rc-b {
  display: flex; align-items: center; gap: 6px; border: 1px solid transparent; background: transparent;
  color: var(--text); font: inherit; font-size: 12.5px; padding: 6px 12px; border-radius: 5px; cursor: pointer;
}
.rc-b:hover:not(:disabled) { background: var(--hover); }
.rc-b:disabled { opacity: .38; cursor: default; }
.rc-b svg { width: 15px; height: 15px; }
.rc-b.danger { color: #d13438; }
.rc-b.danger:hover { background: color-mix(in srgb, #d13438 12%, transparent); }
.rc-list { flex: 1; overflow: auto; }
.rc-row {
  display: grid; grid-template-columns: 1.4fr 1.6fr 150px 72px; gap: 10px; align-items: center;
  padding: 8px 16px; font-size: 12.5px; border-bottom: 1px solid var(--line); cursor: default;
}
.rc-row.hov { background: var(--hover); }
.rc-row.sel { background: color-mix(in srgb, var(--accent) 16%, transparent); }
.rc-nm { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rc-nm svg { width: 18px; height: 18px; flex: none; }
.rc-nm span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-from, .rc-del, .rc-type { color: var(--text-3); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-status { flex: none; height: 28px; display: flex; align-items: center; padding: 0 16px; font-size: 11.5px; color: var(--text-3); border-top: 1px solid var(--line); }
.rc-list .empty-state { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--text-3); }
.rc-list .empty-state svg { width: 52px; height: 52px; opacity: .45; }

/* ======================= 浏览器 ======================= */
.br-tabs { display: flex; gap: 2px; padding: 6px 8px 0; background: var(--panel-bg); flex: none; overflow-x: auto; }
.br-tab {
  display: flex; align-items: center; gap: 7px; padding: 6px 8px 6px 12px; border-radius: 7px 7px 0 0;
  font-size: 12px; color: var(--text-2); cursor: default; max-width: 200px; min-width: 110px; background: transparent;
}
.br-tab.on { background: var(--win-bg); color: var(--text); }
.br-fav svg { width: 14px; height: 14px; }
.br-tt { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.br-close { border: 0; background: transparent; color: var(--text-3); cursor: pointer; padding: 2px; border-radius: 3px; display: flex; }
.br-close:hover { background: var(--active); color: var(--text); }
.br-close svg { width: 12px; height: 12px; }
.br-bar { display: flex; align-items: center; gap: 4px; padding: 7px 10px; border-bottom: 1px solid var(--line); background: var(--win-bg); flex: none; }
.br-btn { width: 32px; height: 32px; border: 0; background: transparent; border-radius: 5px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--text); flex: none; }
.br-btn:hover { background: var(--hover); }
.br-btn svg { width: 16px; height: 16px; }
.br-url { flex: 1; display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; background: var(--panel-bg); border: 1px solid var(--line); border-radius: 16px; min-width: 0; }
.br-lock svg { width: 13px; height: 13px; color: #2e7d32; }
.br-url input { flex: 1; border: 0; background: transparent; outline: 0; font: inherit; font-size: 12.5px; color: var(--text); min-width: 0; }
.br-url:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 22%, transparent); }
.br-view { flex: 1; position: relative; background: #fff; }
.br-view iframe { width: 100%; height: 100%; border: 0; display: block; }
.br-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px; background: var(--win-bg); color: var(--text-2); font-size: 12.5px; z-index: 2; }
.br-spin { width: 20px; height: 20px; border: 2.5px solid var(--hover); border-top-color: var(--accent); border-radius: 50%; animation: brspin .7s linear infinite; }
@keyframes brspin { to { transform: rotate(360deg); } }
.br-hint {
  position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); max-width: 90%;
  background: var(--panel-bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px;
  font-size: 11.5px; color: var(--text-2); box-shadow: var(--shadow-win); z-index: 3;
}
.br-hint.soft { opacity: .9; }
.br-hint svg { width: 14px; height: 14px; vertical-align: -2px; }
.br-hint code { background: var(--hover); padding: 1px 5px; border-radius: 3px; font-size: 11px; }
.br-hint button { border: 0; border-radius: 5px; padding: 5px 12px; font: inherit; font-size: 12px; cursor: pointer; background: var(--accent); color: #fff; }
.br-hint .br-back2 { background: transparent; color: var(--text); border: 1px solid var(--line); }
.br-status { flex: none; height: 24px; display: flex; align-items: center; padding: 0 14px; font-size: 11px; color: var(--text-3); border-top: 1px solid var(--line); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.br-block, .br-home { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--text-2); }
.br-block svg { width: 46px; height: 46px; }
.br-block b { font-size: 15px; }
.br-home { gap: 26px; padding: 30px; }
.br-logo { display: flex; align-items: center; gap: 12px; font-size: 20px; }
.br-logo svg { width: 40px; height: 40px; }
.br-form { display: flex; gap: 8px; width: min(520px, 90%); }
.br-form input { flex: 1; height: 40px; border: 1px solid var(--line); border-radius: 20px; padding: 0 18px; font: inherit; font-size: 13.5px; background: var(--panel-bg); color: var(--text); outline: 0; }
.br-form input:focus { border-color: var(--accent); }
.br-form button { border: 0; background: var(--accent); color: #fff; border-radius: 20px; padding: 0 22px; font: inherit; font-size: 13px; cursor: pointer; }
.br-links { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.br-links a { display: flex; flex-direction: column; align-items: center; gap: 7px; width: 92px; padding: 14px 6px; border-radius: 10px; cursor: pointer; font-size: 11.5px; color: var(--text-2); background: var(--panel-bg); border: 1px solid var(--line); }
.br-links a:hover { background: var(--hover); color: var(--text); }
.br-links svg { width: 26px; height: 26px; }
.br-hist { width: min(520px, 90%); font-size: 12px; }
.br-hist b { display: block; margin-bottom: 8px; color: var(--text-3); font-weight: 500; }
.br-hist a { display: block; padding: 7px 10px; border-radius: 5px; cursor: pointer; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.br-hist a:hover { background: var(--hover); color: var(--text); }
