/* mock-ui.css — 擬真應用程式視窗、手機 LINE、表格、按鈕、側欄等共用元件 */

/* ===== 應用程式視窗 ===== */
:where(section.aj) .win {
  background: #fff; border: 1px solid var(--line-2); border-radius: 14px;
  box-shadow: 0 22px 60px rgba(19,47,72,.16);
  overflow: hidden; display: flex; flex-direction: column;
  font-size: 26px; color: #1F2937; line-height: 1.45;
}
:where(section.aj) .win-bar {
  height: 46px; flex: none; background: #F3F4F6; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; padding: 0 18px; gap: 12px; color: var(--muted); font-size: 24px;
}
:where(section.aj) .win-bar .dots { display: flex; gap: 8px; }
:where(section.aj) .win-bar .dots i { width: 14px; height: 14px; border-radius: 50%; display: block; background: #FC605B; }
:where(section.aj) .win-bar .dots i:nth-child(2) { background: #FDBC40; }
:where(section.aj) .win-bar .dots i:nth-child(3) { background: #34C749; }
:where(section.aj) .win-bar .url {
  margin-left: 12px; flex: 1; background: #fff; border: 1px solid var(--line);
  border-radius: 8px; padding: 5px 16px; font-size: 23px; color: #4B5563; white-space: nowrap; overflow: hidden;
}
:where(section.aj) .win-bar .title { font-weight: 600; color: #374151; }
:where(section.aj) .win-body { flex: 1; min-height: 0; position: relative; overflow: hidden; }

/* ===== 通用按鈕／輸入 ===== */
:where(section.aj) .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 11px 26px; border-radius: 10px; font: inherit; font-size: 26px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap; user-select: none;
  transition: transform .12s ease, filter .12s ease, background .2s ease;
}
:where(section.aj) .btn:disabled, :where(section.aj) .btn.disabled { opacity: .5; cursor: default; }
:where(section.aj) .btn-primary { background: #2563EB; color: #fff; }
:where(section.aj) .btn-success { background: #16A34A; color: #fff; }
:where(section.aj) .btn-danger { background: #DC2626; color: #fff; }
:where(section.aj) .btn-ghost { background: #F3F4F6; color: #1F2937; }
:where(section.aj) .btn-outline { background: #fff; color: #1F2937; border-color: var(--line-2); }
:where(section.aj) .input {
  display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: 10px;
  background: #fff; padding: 10px 16px; font-size: 26px; color: #1F2937; min-height: 52px;
}
:where(section.aj) .input.ph { color: #9CA3AF; }
:where(section.aj) .field label { display: block; font-weight: 600; font-size: 24px; margin-bottom: 6px; color: #374151; }
:where(section.aj) .field .hint { font-size: 21px; color: var(--muted); margin-top: 4px; }

/* ===== 標籤／徽章 ===== */
:where(section.aj) .chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 12px; border-radius: 999px;
  font-size: 22px; font-weight: 600; line-height: 1.5; white-space: nowrap;
}
:where(section.aj) .chip-ok { background: var(--ok-soft); color: var(--ok); }
:where(section.aj) .chip-bad { background: var(--bad-soft); color: var(--bad); }
:where(section.aj) .chip-warn { background: var(--warn-soft); color: var(--warn); }
:where(section.aj) .chip-gray { background: #F3F4F6; color: #4B5563; }
:where(section.aj) .chip-blue { background: #DBEAFE; color: #1D4ED8; }

/* ===== 表格 ===== */
:where(section.aj) .tbl { width: 100%; border-collapse: collapse; font-size: 25px; }
:where(section.aj) .tbl th {
  background: #F9FAFB; color: #374151; font-weight: 600; text-align: left;
  padding: 12px 14px; border-bottom: 2px solid var(--line); white-space: nowrap;
}
:where(section.aj) .tbl td { padding: 11px 14px; border-bottom: 1px solid #F1F5F9; vertical-align: middle; }
:where(section.aj) .tbl tr.total td { font-weight: 700; background: #F8FAFC; border-top: 2px solid #94A3B8; }
:where(section.aj) .tbl tr.appear { animation: rowIn .45s ease both; }
@keyframes rowIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
:where(section.aj) .tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
:where(section.aj) .tbl .c { text-align: center; }
:where(section.aj) .tbl td.diff { background: var(--bad-soft); color: var(--bad); font-weight: 700; }

/* ===== 轉圈與進度 ===== */
:where(section.aj) .spin {
  display: inline-block; width: 22px; height: 22px; border-radius: 50%;
  border: 3px solid #CBD5E1; border-top-color: #2563EB; animation: spin .8s linear infinite; vertical-align: -4px; margin-right: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }
:where(section.aj) .bar { height: 12px; background: #E5E7EB; border-radius: 999px; overflow: hidden; }
:where(section.aj) .bar > i { display: block; height: 100%; width: 0; background: var(--ok); border-radius: 999px; transition: width .9s ease; }

/* ===== 手機（LINE） ===== */
:where(section.aj) .phone {
  width: 470px; height: 960px; border-radius: 56px; background: #111827; padding: 16px;
  box-shadow: 0 30px 70px rgba(0,0,0,.3), inset 0 0 0 2px #374151; position: relative; flex: none;
}
:where(section.aj) .phone .notch { position: absolute; left: 50%; top: 16px; transform: translateX(-50%); width: 150px; height: 30px; background: #111827; border-radius: 0 0 20px 20px; z-index: 2; }
:where(section.aj) .phone .screen {
  background: #8CB1DA; border-radius: 42px; height: 100%; overflow: hidden;
  display: flex; flex-direction: column; font-size: 24px; color: #111827;
}
:where(section.aj) .line-hdr {
  flex: none; height: 92px; padding: 34px 20px 0; background: rgba(255,255,255,.92);
  display: flex; align-items: center; gap: 14px; font-weight: 700; font-size: 26px; box-sizing: border-box;
}
:where(section.aj) .line-hdr .back { font-size: 30px; color: #374151; }
:where(section.aj) .line-hdr .n { color: #6B7280; font-weight: 500; }
:where(section.aj) .line-body { flex: 1; overflow: hidden; padding: 18px 16px; display: flex; flex-direction: column; gap: 12px; justify-content: flex-end; }
:where(section.aj) .line-foot {
  flex: none; height: 74px; background: #fff; display: flex; align-items: center; gap: 10px; padding: 0 14px; box-sizing: border-box;
}
:where(section.aj) .line-foot .inp { flex: 1; background: #F3F4F6; border-radius: 20px; padding: 9px 16px; font-size: 24px; min-height: 40px; box-sizing: border-box; color: #111827; }
:where(section.aj) .line-foot .inp:empty::before { content: 'Aa'; color: #9CA3AF; }
:where(section.aj) .line-foot .send { width: 40px; height: 40px; border-radius: 50%; background: #06C755; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 24px; }
:where(section.aj) .msg { display: flex; gap: 10px; align-items: flex-end; max-width: 92%; animation: msgIn .35s ease both; }
:where(section.aj) .msg.me { align-self: flex-end; flex-direction: row-reverse; }
:where(section.aj) .msg .ava { width: 40px; height: 40px; border-radius: 50%; background: #64748B; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; flex: none; }
:where(section.aj) .msg .bub { background: #fff; border-radius: 18px; padding: 10px 16px; line-height: 1.45; box-shadow: 0 1px 1px rgba(0,0,0,.08); white-space: pre-wrap; word-break: break-all; }
:where(section.aj) .msg.me .bub { background: #8DE055; }
:where(section.aj) .msg .t { font-size: 18px; color: #E5EEF8; align-self: flex-end; flex: none; }
:where(section.aj) .msg .who { font-size: 19px; color: #E5EEF8; margin-bottom: 4px; }
@keyframes msgIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
:where(section.aj) .typing { display: inline-flex; gap: 5px; padding: 12px 16px; }
:where(section.aj) .typing i { width: 8px; height: 8px; border-radius: 50%; background: #9CA3AF; animation: blink 1s infinite; }
:where(section.aj) .typing i:nth-child(2) { animation-delay: .2s; } :where(section.aj) .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
/* Flex 卡片 */
:where(section.aj) .flex-card { background: #fff; border-radius: 16px; overflow: hidden; width: 360px; box-shadow: 0 2px 6px rgba(0,0,0,.12); font-size: 22px; }
:where(section.aj) .flex-card .fc-hd { padding: 14px 18px; color: #fff; font-weight: 700; font-size: 25px; }
:where(section.aj) .flex-card .fc-hd small { display: block; font-weight: 500; font-size: 20px; opacity: .9; }
:where(section.aj) .flex-card .fc-bd { padding: 14px 18px; display: flex; flex-direction: column; gap: 8px; }
:where(section.aj) .flex-card .fc-row { display: flex; gap: 8px; font-size: 21px; }
:where(section.aj) .flex-card .fc-row .g { color: #9CA3AF; }
:where(section.aj) .flex-card .fc-row .r { margin-left: auto; font-variant-numeric: tabular-nums; }
:where(section.aj) .flex-card .sep { border-top: 1px solid #E5E7EB; margin: 4px 0; }
:where(section.aj) .flex-card .fc-btn { border: 1px solid #06C755; color: #06C755; border-radius: 8px; text-align: center; padding: 8px; font-weight: 600; }

/* ===== 桌面版 LINE 聊天視窗 ===== */
:where(section.aj) .line-desk { display: flex; height: 100%; background: #fff; }
:where(section.aj) .line-desk .lside { width: 300px; flex: none; background: #F1F3F5; border-right: 1px solid var(--line); padding: 16px 0; }
:where(section.aj) .line-desk .lside .item { padding: 14px 20px; display: flex; gap: 12px; align-items: center; font-size: 24px; }
:where(section.aj) .line-desk .lside .item.on { background: #fff; }
:where(section.aj) .line-desk .lside .item .ava { width: 44px; height: 44px; border-radius: 50%; background: #94A3B8; flex: none; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; }
:where(section.aj) .line-desk .lside .item .nm { font-weight: 600; }
:where(section.aj) .line-desk .lside .item .pv { font-size: 20px; color: var(--muted); }
:where(section.aj) .line-desk .lmain { flex: 1; display: flex; flex-direction: column; background: #8CB1DA; min-width: 0; }
:where(section.aj) .line-desk .lmain .lh { background: #fff; padding: 14px 22px; font-weight: 700; border-bottom: 1px solid var(--line); font-size: 26px; }
:where(section.aj) .line-desk .lmain .lb { flex: 1; padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; justify-content: flex-end; overflow: hidden; }
:where(section.aj) .line-desk .lmain .lf { background: #fff; padding: 12px 18px; display: flex; gap: 10px; align-items: center; }
:where(section.aj) .line-desk .lmain .lf .inp { flex: 1; background: #F3F4F6; border-radius: 18px; padding: 10px 16px; min-height: 42px; box-sizing: border-box; }
:where(section.aj) .line-desk .msg .bub { font-size: 26px; padding: 12px 18px; }

/* ===== 一般 SaaS 側欄佈局 ===== */
:where(section.aj) .app { display: flex; height: 100%; }
:where(section.aj) .app .side { width: 250px; flex: none; border-right: 1px solid var(--line); background: #fff; display: flex; flex-direction: column; }
:where(section.aj) .app .main { flex: 1; min-width: 0; background: #F5F6F8; display: flex; flex-direction: column; }
:where(section.aj) .app .topbar { height: 68px; flex: none; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 16px; padding: 0 24px; }
:where(section.aj) .app .content { flex: 1; min-height: 0; overflow: hidden; padding: 22px 26px; position: relative; }
:where(section.aj) .card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 20px 24px; }
