/* FATE 後台 — 共用介面 */
:root {
    --bg: #0f1115;
    --bg-elevated: #161922;
    --fg: #e8eaef;
    --muted: #8b919d;
    --ok: #7ee787;
    --bad: #f85149;
    --warn: #d4a72c;
    --line: rgba(255, 255, 255, 0.08);
    --accent: #79c0ff;
    --accent-dim: rgba(121, 192, 255, 0.15);
    --accent-hover: rgba(121, 192, 255, 0.25);
    --radius: 8px;
    --radius-sm: 6px;
    --font: "Segoe UI", "Noto Sans TC", system-ui, sans-serif;
    --mono: ui-monospace, "Cascadia Code", "SF Mono", Menlo, monospace;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body.admin-body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.5;
    background: var(--bg);
    color: var(--fg);
}

.admin-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin: 0 auto;
    padding: 1rem 1.15rem 2rem;
    max-width: 1100px;
}

.admin-shell--auth {
    max-width: 28rem;
    justify-content: center;
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
}

@media (min-width: 900px) {
    .admin-shell:not(.admin-shell--auth) {
        flex-direction: row;
        align-items: flex-start;
        gap: 1.75rem;
        max-width: 1120px;
    }

    .admin-side {
        position: sticky;
        top: 1.25rem;
        flex: 0 0 220px;
        padding-right: 1rem;
        border-right: 1px solid var(--line);
        min-height: 0;
    }
}

.admin-side__brand {
    font-weight: 700;
    letter-spacing: 0.06em;
    font-size: 0.95rem;
}

.admin-side__brand a {
    color: var(--fg);
    text-decoration: none;
}

.admin-side__brand a:hover {
    color: var(--accent);
}

.admin-side__brand span {
    color: var(--muted);
    font-weight: 500;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    margin-top: 1rem;
}

@media (max-width: 899px) {
    .admin-shell:not(.admin-shell--auth) .admin-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.35rem 0.65rem;
        margin-top: 0.65rem;
    }
}

.admin-nav a {
    display: block;
    padding: 0.45rem 0.65rem;
    border-radius: var(--radius-sm);
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
    border: 1px solid transparent;
}

.admin-nav a:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--line);
}

.admin-nav a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.admin-nav a.on {
    color: var(--fg);
    font-weight: 600;
    background: rgba(121, 192, 255, 0.12);
    border-color: rgba(121, 192, 255, 0.22);
    pointer-events: none;
}

.admin-side__front {
    margin: 0.85rem 0 0;
    padding: 0;
    font-size: 0.9rem;
}

.admin-side__front a {
    display: inline-block;
    padding: 0.45rem 0.65rem;
    border-radius: var(--radius-sm);
    color: var(--muted);
    text-decoration: none;
    border: 1px solid var(--line);
}

.admin-side__front a:hover {
    color: var(--accent);
    border-color: rgba(121, 192, 255, 0.35);
    background: rgba(255, 255, 255, 0.04);
}

.auth-front-link {
    margin: -0.5rem 0 1rem;
    font-size: 0.9rem;
    text-align: center;
}

.auth-front-link a {
    color: var(--accent);
    text-decoration: none;
}

.auth-front-link a:hover {
    text-decoration: underline;
}

.admin-side__foot {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
    font-size: 0.85rem;
    color: var(--muted);
}

@media (max-width: 899px) {
    .admin-shell:not(.admin-shell--auth) .admin-side {
        padding-bottom: 0.85rem;
        border-bottom: 1px solid var(--line);
        margin-bottom: 0.25rem;
    }

    .admin-shell:not(.admin-shell--auth) .admin-side__foot {
        margin-top: 0.75rem;
        padding-top: 0.75rem;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.5rem 1rem;
    }
}

.admin-side__foot-user {
    word-break: break-all;
}

.admin-side__foot a {
    color: var(--accent);
    text-decoration: none;
}

.admin-side__foot a:hover {
    text-decoration: underline;
}

.admin-main {
    flex: 1;
    min-width: 0;
    padding-top: 0.15rem;
}

.auth-brand {
    margin-bottom: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    font-size: 0.95rem;
}

.auth-brand__title {
    color: var(--fg);
}

.auth-brand__sub {
    color: var(--muted);
    font-weight: 600;
    margin-left: 0.35rem;
}

.page-head {
    margin-bottom: 1.15rem;
}

.page-head .page-title {
    font-size: 1.35rem;
    font-weight: 650;
    margin: 0 0 0.35rem;
    line-height: 1.25;
}

.page-head .sub {
    margin-bottom: 0;
}

.sub {
    color: var(--muted);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    line-height: 1.55;
}

.sub:last-child {
    margin-bottom: 0;
}

.card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.02);
}

.card:last-child {
    margin-bottom: 0;
}

.card--narrow {
    max-width: 22rem;
}

.stack-form .card,
.stack-form .add-store-section {
    margin-bottom: 0.85rem;
}

.stack-form .card:last-child {
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
    letter-spacing: -0.02em;
}

.field-grid {
    display: grid;
    gap: 1rem 1.25rem;
}

@media (min-width: 720px) {
    .field-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .field-grid .field:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }
}

.field input[type="text"],
.field input[type="url"] {
    max-width: none;
}

.row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
}

.stat {
    min-width: 8rem;
}

.stat dt {
    font-size: 0.72rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.stat dd {
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0.2rem 0 0;
}

label {
    display: block;
    font-size: 0.88rem;
    margin-bottom: 0.35rem;
    color: var(--muted);
}

input[type="password"],
input[type="text"],
input[type="url"],
input[type="email"],
input[type="number"],
select {
    width: 100%;
    max-width: 22rem;
    padding: 0.5rem 0.65rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--bg-elevated);
    color: var(--fg);
    font-size: 1rem;
}

input:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

button,
.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--accent-dim);
    color: var(--accent);
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.25;
}

button:hover,
.btn:hover {
    background: var(--accent-hover);
}

button:focus-visible,
.btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

button.danger,
.btn.danger {
    background: rgba(248, 81, 73, 0.12);
    color: var(--bad);
}

button.danger:hover,
.btn.danger:hover {
    background: rgba(248, 81, 73, 0.2);
}

.msg {
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-size: 0.88rem;
    border: 1px solid var(--line);
}

.msg.warn {
    color: var(--warn);
    background: rgba(212, 167, 44, 0.1);
}

.msg.bad {
    color: var(--bad);
    background: rgba(248, 81, 73, 0.08);
}

.msg.ok {
    color: var(--ok);
    background: rgba(126, 231, 135, 0.08);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

th,
td {
    padding: 0.45rem 0.55rem;
    text-align: left;
    border-bottom: 1px solid var(--line);
}

tr:last-child td {
    border-bottom: none;
}

th {
    color: var(--muted);
    font-weight: 600;
}

/* 瀏覽統計等多欄資料表（stats.php） */
.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table--stats {
    table-layout: fixed;
    width: 100%;
    min-width: 36rem;
}

.table--stats th {
    width: auto;
    white-space: nowrap;
    vertical-align: bottom;
    font-size: 0.8rem;
    line-height: 1.35;
}

.table--stats td {
    vertical-align: top;
    line-height: 1.45;
}

.table--stats col.col-key {
    width: 12%;
}

.table--stats col.col-title {
    width: 46%;
}

.table--stats col.col-hits {
    width: 5.75rem;
}

.table--stats col.col-time {
    width: 10.75rem;
}

.table--stats--store col.col-key {
    width: 6.5rem;
}

.table--stats--store col.col-title {
    width: 52%;
}

.table--stats td.col-title {
    word-break: break-word;
}

.table--stats td.col-key code {
    word-break: break-all;
    font-size: 0.8em;
}

.table--stats th.col-hits,
.table--stats td.col-hits {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.table--stats th.col-time,
.table--stats td.col-time {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
    font-size: 0.82rem;
    color: var(--fg);
}

pre {
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.75rem;
    overflow: auto;
    font-size: 0.78rem;
    line-height: 1.45;
    font-family: var(--mono);
}

.check {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 1rem 0;
}

.check input {
    width: auto;
    margin-top: 0.2rem;
}

.check label {
    margin: 0;
    color: var(--fg);
}

code {
    font-size: 0.82em;
    background: rgba(0, 0, 0, 0.35);
    padding: 0.08em 0.3em;
    border-radius: 4px;
    font-family: var(--mono);
}

.sub a {
    color: var(--accent);
}

.page-actions {
    margin-top: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

/* 同步店家 — 進度與日誌（相容舊 class） */
.prog-wrap,
.sync-progress {
    margin: 0.75rem 0 1rem;
}

.prog-bar,
.sync-progress__bar {
    height: 10px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
    border: 1px solid var(--line);
}

.prog-bar > i,
.sync-progress__bar > i {
    display: block;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, rgba(121, 192, 255, 0.35), rgba(126, 231, 135, 0.45));
    transition: width 0.25s ease;
}

.prog-meta,
.sync-progress__meta {
    font-size: 0.8rem;
    color: var(--muted);
    margin: 0.35rem 0 0;
    line-height: 1.45;
}

.sync-log {
    font-family: var(--mono);
    font-size: 0.78rem;
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.65rem 0.75rem;
    max-height: 14rem;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0.5rem 0 0;
}

/* 同步店家頁面 */
.admin-body--sync .admin-main {
    position: relative;
}

.admin-body--sync .admin-main::before {
    content: "";
    position: absolute;
    inset: -1rem -0.5rem auto;
    height: 12rem;
    background:
        radial-gradient(ellipse 70% 55% at 15% 0%, rgba(121, 192, 255, 0.12), transparent 70%),
        radial-gradient(ellipse 50% 45% at 95% 5%, rgba(126, 231, 135, 0.05), transparent 65%);
    pointer-events: none;
    z-index: 0;
}

.sync {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.sync-hero {
    position: relative;
    overflow: hidden;
    border-radius: calc(var(--radius) + 4px);
    border: 1px solid rgba(121, 192, 255, 0.2);
    background: linear-gradient(135deg, rgba(22, 25, 34, 0.98), rgba(15, 17, 21, 0.99) 60%, rgba(18, 28, 42, 0.94));
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 10px 28px rgba(0, 0, 0, 0.24);
}

.sync-hero__glow {
    position: absolute;
    top: -50%;
    right: -5%;
    width: 50%;
    height: 160%;
    background: radial-gradient(circle, rgba(121, 192, 255, 0.14), transparent 68%);
    pointer-events: none;
}

.sync-hero__inner {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    padding: 1rem 1.15rem;
}

.sync-hero__lead {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex: 1 1 14rem;
    min-width: 0;
}

.sync-hero__icon {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 12px;
    color: var(--accent);
    background: rgba(121, 192, 255, 0.12);
    border: 1px solid rgba(121, 192, 255, 0.28);
    flex-shrink: 0;
}

.sync-hero__title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.sync-hero__sub {
    margin: 0.3rem 0 0;
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.45;
}

.sync-hero__sub code {
    font-size: 0.9em;
}

.sync-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    color: var(--muted);
}

.sync-pill--ok {
    color: var(--ok);
    border-color: rgba(126, 231, 135, 0.35);
    background: rgba(126, 231, 135, 0.08);
}

.sync-pill--bad {
    color: var(--bad);
    border-color: rgba(248, 81, 73, 0.35);
    background: rgba(248, 81, 73, 0.08);
}

.sync-pill--warn {
    color: var(--warn);
    border-color: rgba(212, 167, 44, 0.35);
    background: rgba(212, 167, 44, 0.08);
}

.sync-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.7rem 0.85rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
}

.sync-banner--ok {
    border-color: rgba(126, 231, 135, 0.28);
    background: linear-gradient(90deg, rgba(126, 231, 135, 0.08), rgba(126, 231, 135, 0.02));
}

.sync-banner--bad {
    border-color: rgba(248, 81, 73, 0.28);
    background: linear-gradient(90deg, rgba(248, 81, 73, 0.1), rgba(248, 81, 73, 0.03));
}

.sync-banner--warn {
    border-color: rgba(212, 167, 44, 0.35);
    background: linear-gradient(90deg, rgba(212, 167, 44, 0.1), rgba(212, 167, 44, 0.03));
}

.sync-banner--warn .sync-banner__icon {
    color: var(--warn);
}

.sync-banner__icon {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 9px;
    flex-shrink: 0;
}

.sync-banner--ok .sync-banner__icon {
    color: var(--ok);
    background: rgba(126, 231, 135, 0.12);
}

.sync-banner--bad .sync-banner__icon {
    color: var(--bad);
    background: rgba(248, 81, 73, 0.12);
}

.sync-banner__body {
    flex: 1;
    min-width: 0;
}

.sync-banner__text {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.45;
}

.sync-banner__links {
    margin: 0.4rem 0 0;
    font-size: 0.84rem;
}

.sync-banner__links a {
    color: var(--accent);
}

.sync-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 0.85rem;
    align-items: start;
}

.sync-main {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    min-width: 0;
}

.sync-images-info {
    margin: 0 0 0.75rem;
}

.sync-panel--images .sync-banner {
    margin-bottom: 0.75rem;
}

@media (max-width: 52rem) {
    .sync-layout {
        grid-template-columns: 1fr;
    }
}

.sync-panel {
    padding: 0.9rem 1rem 1rem;
    border-radius: calc(var(--radius) + 2px);
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(22, 25, 34, 0.92), rgba(15, 17, 21, 0.96));
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset;
}

.sync-panel__head {
    margin-bottom: 0.7rem;
}

.sync-panel__title {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.sync-option {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.sync-option:hover {
    border-color: rgba(121, 192, 255, 0.3);
    background: rgba(121, 192, 255, 0.04);
}

.sync-option input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.sync-option__box {
    width: 1.1rem;
    height: 1.1rem;
    margin-top: 0.15rem;
    border-radius: 4px;
    border: 1px solid var(--line);
    background: var(--bg-elevated);
    flex-shrink: 0;
    transition: background 0.15s, border-color 0.15s;
}

.sync-option input:checked + .sync-option__box {
    background: var(--accent-dim);
    border-color: rgba(121, 192, 255, 0.5);
    box-shadow: inset 0 0 0 2px var(--accent);
}

.sync-option__text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    font-size: 0.88rem;
}

.sync-option__text strong {
    color: var(--fg);
}

.sync-option__hint {
    font-size: 0.78rem;
    color: var(--muted);
    line-height: 1.35;
}

.sync-run__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.sync-run__actions--secondary {
    margin-top: 0.35rem;
}

.sync-run__hint {
    margin: 0.35rem 0 0;
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.45;
}

.sync-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--accent-dim);
    color: var(--accent);
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.sync-btn:hover:not(:disabled) {
    background: var(--accent-hover);
    transform: translateY(-1px);
}

.sync-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.sync-btn--primary {
    background: linear-gradient(180deg, rgba(121, 192, 255, 0.28), rgba(121, 192, 255, 0.14));
    border-color: rgba(121, 192, 255, 0.45);
    box-shadow: 0 4px 14px rgba(121, 192, 255, 0.12);
}

.sync-btn--primary:hover:not(:disabled) {
    background: linear-gradient(180deg, rgba(121, 192, 255, 0.38), rgba(121, 192, 255, 0.2));
    border-color: rgba(121, 192, 255, 0.6);
}

.sync-btn--danger {
    background: rgba(248, 81, 73, 0.1);
    color: var(--bad);
    border-color: rgba(248, 81, 73, 0.28);
}

.sync-btn--danger:hover:not(:disabled) {
    background: rgba(248, 81, 73, 0.18);
}

.sync-progress__bar {
    height: 12px;
    border-radius: 999px;
}

.sync-progress__bar > i {
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(121, 192, 255, 0.55), rgba(126, 231, 135, 0.65));
    box-shadow: 0 0 12px rgba(121, 192, 255, 0.25);
}

.sync-run__msg {
    margin-top: 0.5rem;
}

.sync-run__msg .msg {
    margin-bottom: 0;
}

.sync-log-wrap {
    margin-top: 0.85rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.02);
}

.sync-log-wrap summary {
    padding: 0.55rem 0.75rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--muted);
    cursor: pointer;
    user-select: none;
    list-style: none;
}

.sync-log-wrap summary::-webkit-details-marker {
    display: none;
}

.sync-log-wrap summary::before {
    content: "▸ ";
    color: var(--accent);
}

.sync-log-wrap[open] summary::before {
    content: "▾ ";
}

.sync-log-wrap[open] .sync-log {
    border-top: 1px solid var(--line);
}

.sync-steps {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.sync-steps__item {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
}

.sync-steps__num {
    display: grid;
    place-items: center;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--accent);
    background: rgba(121, 192, 255, 0.12);
    border: 1px solid rgba(121, 192, 255, 0.25);
    flex-shrink: 0;
}

.sync-steps__item strong {
    display: block;
    font-size: 0.88rem;
    margin-bottom: 0.15rem;
}

.sync-steps__item p {
    margin: 0;
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.45;
}

.sync-steps__item a {
    color: var(--accent);
}

.sync-steps__item--done .sync-steps__num {
    color: var(--ok);
    background: rgba(126, 231, 135, 0.1);
    border-color: rgba(126, 231, 135, 0.35);
}

.sync-steps__status {
    font-size: 0.78rem;
    font-weight: 600;
}

.sync-steps__status--ok {
    color: var(--ok);
}

.sync-steps__item--optional .sync-steps__num {
    color: var(--muted);
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--line);
}

.sync-notes {
    margin-top: 0.85rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--line);
}

.sync-notes__title {
    margin: 0 0 0.4rem;
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.sync-notes__list {
    margin: 0;
    padding-left: 1.1rem;
    font-size: 0.8rem;
    color: var(--muted);
    line-height: 1.5;
}

.sync-notes__list li + li {
    margin-top: 0.3rem;
}

.sync-notes__list a {
    color: var(--accent);
}

.sync-foot {
    margin: 0.85rem 0 0;
    padding-top: 0.65rem;
    border-top: 1px dashed var(--line);
    font-size: 0.76rem;
    color: var(--muted);
    line-height: 1.45;
}

.sync-foot code {
    font-size: 0.95em;
}

.btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.75rem;
}

button:disabled,
.btn.disabled {
    opacity: 0.45;
    pointer-events: none;
}

/* 新增店家表單 */
.page-add-store .field-grid .field--full {
    grid-column: 1 / -1;
}

.field--full {
    grid-column: 1 / -1;
}

.field-label {
    display: block;
    font-size: 0.88rem;
    margin-bottom: 0.35rem;
    color: var(--muted);
}

.field-label em {
    color: var(--bad);
    font-style: normal;
}

.field select,
.field textarea,
.field input[type="number"],
.field input[type="time"],
.field input[type="file"] {
    width: 100%;
    max-width: none;
    padding: 0.5rem 0.65rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--bg-elevated);
    color: var(--fg);
    font-size: 1rem;
    font-family: inherit;
}

.field textarea {
    resize: vertical;
    min-height: 5rem;
}

.field--check {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
}

.field--check input {
    width: auto;
    max-width: none;
}

.field--hours-actions {
    grid-column: 1 / -1;
}

.hours-btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
}

.hours-summary {
    margin: 0;
}

.btn--sm {
    padding: 0.35rem 0.65rem;
    font-size: 0.82rem;
}

.btn--danger {
    border-color: rgba(248, 113, 113, 0.45);
    color: #fca5a5;
}

.btn--xs {
    padding: 0.2rem 0.45rem;
    font-size: 0.75rem;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.hours-dialog {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0;
    max-width: min(32rem, 92vw);
    background: var(--bg);
    color: var(--fg);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.hours-dialog::backdrop {
    background: rgba(0, 0, 0, 0.55);
}

.hours-dialog__inner {
    padding: 1rem 1.1rem 1.1rem;
    margin: 0;
}

.hours-dialog__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.hours-dialog__head h2 {
    font-size: 1rem;
    margin: 0;
}

.hours-dialog__close {
    border: none;
    background: transparent;
    color: var(--muted);
    font-size: 1.35rem;
    line-height: 1;
    padding: 0.15rem 0.35rem;
    cursor: pointer;
}

.hours-dialog__foot {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.hours-table {
    width: 100%;
    font-size: 0.85rem;
}

.hours-table th {
    width: 4.5rem;
}

.hours-row-input {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.api-key-block {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--line);
}

.api-key-block:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.api-key-block:first-child {
    padding-top: 0;
}

.api-key-id {
    font-weight: normal;
    color: var(--muted);
    margin-left: 0.35rem;
}

.api-key-hint {
    margin: 0.15rem 0 0.4rem;
}

.api-key-links {
    margin: 0 0 0.55rem;
    padding-left: 1.15rem;
    font-size: 0.85rem;
    line-height: 1.5;
}

.api-key-links a {
    color: var(--accent);
}

.api-key-links a:hover {
    text-decoration: underline;
}

.api-key-status {
    font-size: 0.82rem;
    margin: 0 0 0.5rem;
    color: var(--muted);
}

.api-key-status--env {
    color: var(--warn);
}

.api-key-status--file {
    color: var(--ok);
}

.api-key-status--unset {
    color: var(--muted);
}

.api-key-mask {
    font-family: var(--mono);
    margin-left: 0.35rem;
}

.api-key-input {
    width: 100%;
    max-width: 28rem;
}

.api-key-clear {
    margin-top: 0.45rem;
}

/* 新增店家 — 相片縮圖預覽 */
.photo-preview {
    margin-top: 0.65rem;
}

.photo-preview--grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    align-items: flex-start;
}

.photo-preview__item {
    margin: 0;
    max-width: 8.5rem;
}

.photo-preview--cover .photo-preview__item {
    max-width: 12rem;
}

.photo-preview__item img {
    display: block;
    width: 100%;
    max-height: 7rem;
    object-fit: cover;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--bg-elevated);
}

.photo-preview--cover .photo-preview__item img {
    max-height: 10rem;
}

.photo-preview__cap {
    font-size: 0.72rem;
    color: var(--muted);
    margin-top: 0.25rem;
    line-height: 1.3;
    word-break: break-all;
}

.photo-preview__note {
    flex: 1 1 100%;
    margin: 0.25rem 0 0;
}

.hours-row-input .multi-hours-input {
    flex: 1 1 8rem;
    min-width: 7rem;
    padding: 0.35rem 0.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--bg-elevated);
    color: var(--fg);
    font-size: 0.85rem;
}

/* 驗證信與發信 */
.email-settings-split {
    display: grid;
    gap: 1rem;
}

@media (min-width: 960px) {
    .email-settings-split {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }
}

.card--sticky {
    position: sticky;
    top: 1rem;
}

.mono-area {
    font-family: var(--mono);
    font-size: 0.85rem;
    line-height: 1.45;
    width: 100%;
    min-height: 6rem;
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--bg-elevated);
    color: var(--fg);
    resize: vertical;
}

.radio-line {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin: 0.35rem 0;
    cursor: pointer;
}

.radio-line input {
    margin-top: 0.2rem;
}

.preview-tabs {
    display: flex;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}

.preview-tab {
    font: inherit;
    font-size: 0.85rem;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.preview-tab.on {
    color: var(--fg);
    border-color: var(--accent);
    background: var(--accent-dim);
}

.preview-subject {
    font-size: 0.9rem;
    margin: 0 0 0.75rem;
    word-break: break-word;
}

.preview-plain {
    margin: 0;
    padding: 0.75rem;
    max-height: 22rem;
    overflow: auto;
    font-family: var(--mono);
    font-size: 0.8rem;
    line-height: 1.45;
    white-space: pre-wrap;
    word-break: break-word;
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}

.preview-html-frame {
    width: 100%;
    min-height: 16rem;
    max-height: 22rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: #fff;
}

.btn--secondary {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--fg);
}

.btn--secondary:hover {
    border-color: var(--accent);
    background: var(--accent-dim);
}

.mail-hints {
    margin: 0.5rem 0 0;
    padding-left: 1.25rem;
    font-size: 0.9rem;
    line-height: 1.5;
}

.mail-hints li {
    margin: 0.25rem 0;
}

.admin-body--adsense .checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.95rem;
    cursor: pointer;
}

.admin-body--adsense .mono-input {
    width: 100%;
    font-family: var(--mono);
    font-size: 0.85rem;
    line-height: 1.45;
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--bg-elevated);
    color: var(--fg);
    resize: vertical;
}

.admin-body--adsense .ordered-steps {
    margin: 0;
    padding-left: 1.35rem;
    line-height: 1.55;
}

.admin-body--adsense .ordered-steps li {
    margin: 0.4rem 0;
}

.admin-body--adsense .adsense-verify-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.admin-body--adsense .adsense-verify-table th,
.admin-body--adsense .adsense-verify-table td {
    padding: 0.5rem 0.65rem;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.admin-body--adsense .inline-form {
    display: inline;
    margin: 0;
}

.admin-body--adsense .btn--danger {
    border-color: rgba(248, 113, 113, 0.45);
    color: #fca5a5;
}

.admin-body--adsense .text-warn {
    color: #fbbf24;
}

/* 會員管理 */
.member-summary {
    margin: 0 0 0.85rem;
    padding: 0.5rem 0.65rem;
    font-size: 0.88rem;
    line-height: 1.45;
    color: var(--muted);
    background: var(--bg-elevated);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
}

.member-summary__sep {
    color: var(--line);
    user-select: none;
}

.member-summary span:not(.member-summary__sep) {
    color: var(--fg);
}

.section-title--list {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0 0 0.5rem;
}

.badge {
    display: inline-block;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    font-size: 0.78rem;
    font-weight: 600;
    border: 1px solid var(--line);
    white-space: nowrap;
}

.badge--admin {
    background: rgba(121, 192, 255, 0.18);
    color: var(--accent);
    border-color: rgba(121, 192, 255, 0.35);
}

.badge--mod {
    background: rgba(212, 167, 44, 0.15);
    color: var(--warn);
    border-color: rgba(212, 167, 44, 0.35);
}

.badge--member {
    color: var(--muted);
}

.badge--ok {
    background: rgba(126, 231, 135, 0.12);
    color: var(--ok);
    border-color: rgba(126, 231, 135, 0.3);
}

.badge--off {
    color: var(--muted);
}

.badge--pending {
    background: rgba(212, 167, 44, 0.16);
    color: var(--warn);
    border-color: rgba(212, 167, 44, 0.38);
}

.member-quick-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0 0 0.85rem;
}

.member-quick-filters__chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--bg-elevated);
    color: var(--fg);
    font-size: 0.84rem;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
}

.member-quick-filters__chip:hover {
    border-color: rgba(121, 192, 255, 0.45);
    color: var(--accent);
}

.member-quick-filters__chip.is-active {
    background: var(--accent-dim);
    border-color: rgba(121, 192, 255, 0.5);
    color: var(--accent);
    font-weight: 600;
}

.member-quick-filters__count {
    display: inline-block;
    min-width: 1.25rem;
    padding: 0.05rem 0.35rem;
    border-radius: 999px;
    background: rgba(212, 167, 44, 0.22);
    color: var(--warn);
    font-size: 0.75rem;
    font-weight: 700;
    text-align: center;
}

.member-quick-filters__chip.is-active .member-quick-filters__count {
    background: rgba(121, 192, 255, 0.25);
    color: var(--accent);
}

.card--filter {
    margin-top: 0.75rem;
}

.member-filter-form__row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    align-items: flex-end;
}

.member-filter-form__row > div {
    flex: 1 1 10rem;
    min-width: 8rem;
}

.member-filter-form select {
    width: 100%;
    max-width: 14rem;
    padding: 0.5rem 0.65rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--bg-elevated);
    color: var(--fg);
    font-size: 1rem;
    font-family: inherit;
}

.member-filter-form__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    flex: 0 0 auto;
}

.btn--ghost {
    background: transparent;
}

.member-list-meta {
    margin: 0.65rem 0 0.5rem;
}

.member-list-hint {
    margin: 0.15rem 0 0.65rem;
    font-size: 0.84rem;
}

.member-edit__hint {
    margin: 0 0 0.85rem;
    font-size: 0.84rem;
}

.member-create {
    margin: 0 0 1.1rem;
    padding: 0.95rem 1.05rem;
}

.member-create__summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.member-create__summary::-webkit-details-marker {
    display: none;
}

.member-create__summary::before {
    content: '＋';
    display: inline-flex;
    width: 1.15rem;
    height: 1.15rem;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    border: 1px solid var(--line);
    font-size: 0.82rem;
    color: var(--muted);
    flex-shrink: 0;
}

.member-create[open] .member-create__summary::before {
    content: '－';
}

.member-create__hint {
    margin: 0.65rem 0 0.85rem;
    font-size: 0.84rem;
}

.member-create__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
    gap: 0.75rem 1rem;
    margin-bottom: 0.85rem;
}

.member-create__grid label {
    display: block;
    font-size: 0.78rem;
    color: var(--muted);
    margin-bottom: 0.25rem;
}

.member-create__grid input,
.member-create__grid select {
    width: 100%;
    padding: 0.45rem 0.55rem;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--bg2);
    color: var(--fg);
    font: inherit;
    font-size: 0.88rem;
}

.member-create__req {
    color: #f85149;
}

.member-create__checks {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1.25rem;
    margin-bottom: 0.85rem;
    font-size: 0.86rem;
}

.member-create__check {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    cursor: pointer;
}

.member-create__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.table--members {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.table--members th,
.table--members td {
    padding: 0.5rem 0.6rem;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.table--members th {
    font-size: 0.72rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}

.table--members .col-id {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    width: 3.5rem;
}

.table--members .col-email {
    font-size: 0.82rem;
    max-width: 12rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table--members .col-time {
    white-space: nowrap;
    font-size: 0.82rem;
    font-variant-numeric: tabular-nums;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.table-wrap {
    overflow-x: auto;
}

.btn-link {
    padding: 0;
    border: none;
    background: none;
    color: var(--accent);
    font-size: inherit;
    font-family: inherit;
    cursor: pointer;
    text-decoration: underline;
}

.btn-link:hover {
    color: var(--fg);
}

.table--members .col-actions {
    white-space: nowrap;
    font-size: 0.85rem;
}

.table--members .col-actions a {
    color: var(--accent);
    margin-right: 0.5rem;
}

.member-inline-form {
    display: inline;
    margin: 0;
}

.member-inline-form .btn-link {
    margin-left: 0.15rem;
}

.table--members tr.row--highlight {
    background: var(--accent-dim);
}

.table--members tr.member-row {
    cursor: default;
}

.table--members .col-inline-edit {
    min-width: 7.5rem;
}

.member-inline-input,
.member-inline-select {
    width: 100%;
    min-width: 6.5rem;
    max-width: 14rem;
    padding: 0.32rem 0.45rem;
    border-radius: 6px;
    border: 1px solid var(--line);
    background: var(--bg2);
    color: var(--fg);
    font: inherit;
    font-size: 0.84rem;
}

.member-inline-input:focus,
.member-inline-select:focus {
    outline: none;
    border-color: rgba(121, 192, 255, 0.45);
    box-shadow: 0 0 0 2px rgba(121, 192, 255, 0.12);
}

.member-inline-select {
    cursor: pointer;
    padding-right: 1.5rem;
}

.table--members tr.member-row--saving .member-inline-input,
.table--members tr.member-row--saving .member-inline-select {
    opacity: 0.72;
}

.table--members tr.member-row--saved .col-inline-edit {
    animation: member-inline-saved 1.2s ease;
}

.table--members tr.member-row--error .col-inline-edit {
    animation: member-inline-error 0.6s ease;
}

@keyframes member-inline-saved {
    0% { background: rgba(63, 185, 80, 0.12); }
    100% { background: transparent; }
}

@keyframes member-inline-error {
    0%, 100% { background: transparent; }
    50% { background: rgba(248, 81, 73, 0.1); }
}

.table--members tr.member-row--pending {
    background: rgba(212, 167, 44, 0.06);
}

.table--members tr.member-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

.table--members tr.member-row--pending:hover {
    background: rgba(212, 167, 44, 0.1);
}

.table--members .col-actions .member-action-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.table--members .col-actions .member-inline-form {
    display: inline-flex;
    margin: 0;
}

.table--members .col-actions .btn--sm {
    padding: 0.22rem 0.5rem;
    font-size: 0.78rem;
    white-space: nowrap;
}

.btn--approve {
    background: rgba(126, 231, 135, 0.18);
    border-color: rgba(126, 231, 135, 0.4);
    color: var(--ok);
}

.btn--approve:hover {
    background: rgba(126, 231, 135, 0.28);
}

.member-edit__approve {
    margin: 0 0 0.75rem;
}

.member-edit__approve[hidden] {
    display: none;
}

#member-ajax-flash[hidden] {
    display: none;
}

.table--members tr.member-row--removing {
    opacity: 0;
    transition: opacity 0.25s ease;
}

.table--members .col-actions .btn[disabled] {
    opacity: 0.65;
    cursor: wait;
}

.member-edit {
    margin-bottom: 0.85rem;
}

.member-edit__meta {
    margin: 0 0 0.65rem;
}

.member-edit__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
    gap: 0.65rem 1rem;
    margin-bottom: 0.65rem;
}

.member-edit__grid input,
.member-edit__grid select {
    width: 100%;
    max-width: none;
}

.member-edit__email {
    margin: 0 0 0.5rem;
}

.member-edit__actions,
.member-edit__sideform {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.member-edit__sideform {
    margin-top: 0.35rem;
}

/* 後台首頁 */
.admin-body--home .admin-main {
    position: relative;
}

.admin-body--home .admin-main::before {
    content: "";
    position: absolute;
    inset: -1rem -0.5rem auto;
    height: 14rem;
    background:
        radial-gradient(ellipse 80% 60% at 20% 0%, rgba(121, 192, 255, 0.14), transparent 70%),
        radial-gradient(ellipse 60% 50% at 90% 10%, rgba(126, 231, 135, 0.06), transparent 65%);
    pointer-events: none;
    z-index: 0;
}

.dash {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.dash-icon {
    display: block;
    flex-shrink: 0;
}

.dash-meta__muted {
    color: var(--muted);
    font-size: 0.82rem;
}

.dash-flash {
    margin: 0;
}

/* Hero */
.dash-hero-card {
    position: relative;
    overflow: hidden;
    border-radius: calc(var(--radius) + 4px);
    border: 1px solid rgba(121, 192, 255, 0.22);
    background:
        linear-gradient(135deg, rgba(22, 25, 34, 0.98) 0%, rgba(15, 17, 21, 0.99) 55%, rgba(18, 28, 42, 0.95) 100%);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.04) inset,
        0 12px 32px rgba(0, 0, 0, 0.28);
}

.dash-hero-card__glow {
    position: absolute;
    top: -40%;
    right: -10%;
    width: 55%;
    height: 140%;
    background: radial-gradient(circle, rgba(121, 192, 255, 0.16) 0%, transparent 68%);
    pointer-events: none;
}

.dash-hero-card__inner {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem 1.25rem;
    padding: 1.15rem 1.25rem;
}

.dash-hero-card__lead {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex: 1 1 16rem;
    min-width: 0;
}

.dash-monogram {
    display: grid;
    place-items: center;
    width: 3.1rem;
    height: 3.1rem;
    border-radius: 14px;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--accent);
    background: linear-gradient(145deg, rgba(121, 192, 255, 0.22), rgba(121, 192, 255, 0.06));
    border: 1px solid rgba(121, 192, 255, 0.35);
    box-shadow: 0 8px 20px rgba(121, 192, 255, 0.12);
}

.dash-hero-card__copy {
    min-width: 0;
}

.dash-hero-card__eyebrow {
    margin: 0 0 0.2rem;
    font-size: 0.78rem;
    color: var(--muted);
    letter-spacing: 0.02em;
}

.dash-hero-card__title {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.dash-hero-card__sub {
    margin: 0.35rem 0 0;
    font-size: 0.9rem;
    color: var(--muted);
}

.dash-hero-card__sub strong {
    color: var(--fg);
    font-weight: 600;
}

.dash-hero-card__tag {
    margin-left: 0.35rem;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    font-size: 0.78rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--line);
}

.dash-hero-card__aside {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.65rem;
    flex: 0 1 auto;
}

.dash-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.4rem;
}

.dash-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.22rem 0.55rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
    color: var(--muted);
}

.dash-pill code {
    font-size: 0.9em;
    color: var(--fg);
}

.dash-pill--ok {
    color: var(--ok);
    border-color: rgba(126, 231, 135, 0.35);
    background: rgba(126, 231, 135, 0.08);
}

.dash-pill--bad {
    color: var(--bad);
    border-color: rgba(248, 81, 73, 0.35);
    background: rgba(248, 81, 73, 0.08);
}

.dash-pill--muted {
    color: var(--muted);
}

.dash-hero-card__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.45rem;
}

.dash-btn-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.dash-btn-icon--primary {
    background: linear-gradient(180deg, rgba(121, 192, 255, 0.28), rgba(121, 192, 255, 0.14));
    border-color: rgba(121, 192, 255, 0.45);
    color: var(--accent);
    box-shadow: 0 4px 14px rgba(121, 192, 255, 0.15);
}

.dash-btn-icon--primary:hover {
    background: linear-gradient(180deg, rgba(121, 192, 255, 0.38), rgba(121, 192, 255, 0.2));
    border-color: rgba(121, 192, 255, 0.6);
}

/* 卡片區塊 */
.dash-card {
    padding: 0.9rem 1rem 1rem;
    border-radius: calc(var(--radius) + 2px);
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(22, 25, 34, 0.92), rgba(15, 17, 21, 0.96));
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset;
}

.dash-card__head {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.65rem;
}

.dash-card__title {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.dash-card__badge {
    display: inline-grid;
    place-items: center;
    min-width: 1.35rem;
    height: 1.35rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--warn);
    background: rgba(212, 167, 44, 0.14);
    border: 1px solid rgba(212, 167, 44, 0.35);
}

/* 待處理 */
.dash-alert-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dash-alert-item {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.65rem 0.75rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.02);
}

.dash-alert-item--warn {
    border-color: rgba(212, 167, 44, 0.28);
    background: linear-gradient(90deg, rgba(212, 167, 44, 0.1), rgba(212, 167, 44, 0.03));
}

.dash-alert-item--bad {
    border-color: rgba(248, 81, 73, 0.28);
    background: linear-gradient(90deg, rgba(248, 81, 73, 0.1), rgba(248, 81, 73, 0.03));
}

.dash-alert-item__icon {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 10px;
    flex-shrink: 0;
    color: var(--warn);
    background: rgba(212, 167, 44, 0.12);
}

.dash-alert-item--bad .dash-alert-item__icon {
    color: var(--bad);
    background: rgba(248, 81, 73, 0.12);
}

.dash-alert-item__body {
    flex: 1;
    min-width: 0;
}

.dash-alert-item__text {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.45;
}

.dash-alert-item__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    margin-top: 0.35rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
}

.dash-alert-item__cta:hover {
    text-decoration: underline;
}

/* 統計卡 */
.dash-stats {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
    gap: 0.6rem;
}

.dash-stat {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto auto auto;
    gap: 0.1rem 0.55rem;
    padding: 0.75rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.02);
    text-decoration: none;
    overflow: hidden;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.dash-stat::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, rgba(121, 192, 255, 0.5), transparent);
    opacity: 0.65;
}

.dash-stat:hover {
    transform: translateY(-2px);
    border-color: rgba(121, 192, 255, 0.38);
    background: rgba(121, 192, 255, 0.06);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.dash-stat__icon {
    grid-row: 1 / span 3;
    display: grid;
    place-items: center;
    width: 2.15rem;
    height: 2.15rem;
    border-radius: 10px;
    color: var(--accent);
    background: rgba(121, 192, 255, 0.1);
    border: 1px solid rgba(121, 192, 255, 0.18);
    align-self: center;
}

.dash-stat__label {
    grid-column: 2;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}

.dash-stat__value {
    grid-column: 2;
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.03em;
    color: var(--fg);
}

.dash-stat__hint {
    grid-column: 2;
    font-size: 0.76rem;
    line-height: 1.35;
    color: var(--muted);
}

.dash-stat__arrow {
    grid-column: 3;
    grid-row: 1 / span 3;
    display: grid;
    place-items: center;
    color: var(--muted);
    opacity: 0.45;
    align-self: center;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.dash-stat:hover .dash-stat__arrow {
    opacity: 1;
    color: var(--accent);
    transform: translateX(2px);
}

.dash-stat--ok .dash-stat__value { color: var(--ok); }
.dash-stat--ok .dash-stat__icon { color: var(--ok); background: rgba(126, 231, 135, 0.1); border-color: rgba(126, 231, 135, 0.22); }
.dash-stat--ok::before { background: linear-gradient(90deg, rgba(126, 231, 135, 0.55), transparent); }

.dash-stat--warn .dash-stat__value { color: var(--warn); }
.dash-stat--warn .dash-stat__icon { color: var(--warn); background: rgba(212, 167, 44, 0.12); border-color: rgba(212, 167, 44, 0.28); }
.dash-stat--warn { border-color: rgba(212, 167, 44, 0.25); background: rgba(212, 167, 44, 0.04); }
.dash-stat--warn::before { background: linear-gradient(90deg, rgba(212, 167, 44, 0.55), transparent); }

.dash-stat--accent .dash-stat__value { color: var(--accent); }
.dash-stat--accent .dash-stat__icon { color: var(--accent); }

@media (prefers-reduced-motion: no-preference) {
    .dash-stat {
        animation: dash-stat-in 0.45s ease both;
        animation-delay: calc(var(--dash-i, 0) * 0.05s);
    }
}

@keyframes dash-stat-in {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 雙欄 */
.dash-columns {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
    gap: 0.85rem;
    align-items: start;
}

@media (max-width: 56rem) {
    .dash-columns {
        grid-template-columns: 1fr;
    }

    .dash-hero-card__aside {
        align-items: flex-start;
        width: 100%;
    }

    .dash-pills,
    .dash-hero-card__actions {
        justify-content: flex-start;
    }
}

/* 操作卡 */
.dash-action-group {
    margin-bottom: 0.9rem;
}

.dash-action-group:last-child {
    margin-bottom: 0;
}

.dash-action-group__title {
    margin: 0 0 0.45rem;
    padding-left: 0.15rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--muted);
}

.dash-action-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr));
    gap: 0.5rem;
}

.dash-action-card {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    height: 100%;
    padding: 0.6rem 0.65rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.02);
    text-decoration: none;
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.dash-action-card:hover {
    border-color: rgba(121, 192, 255, 0.35);
    background: rgba(121, 192, 255, 0.07);
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.dash-action-card__icon {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 9px;
    flex-shrink: 0;
    color: var(--accent);
    background: rgba(121, 192, 255, 0.1);
    border: 1px solid rgba(121, 192, 255, 0.16);
}

.dash-action-card__text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
}

.dash-action-card__label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--fg);
}

.dash-action-card__desc {
    font-size: 0.74rem;
    line-height: 1.35;
    color: var(--muted);
}

.dash-action-card__arrow {
    flex-shrink: 0;
    color: var(--muted);
    opacity: 0.4;
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.dash-action-card:hover .dash-action-card__arrow {
    opacity: 1;
    color: var(--accent);
    transform: translateX(2px);
}

/* 系統資訊 */
.dash-sys-list {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.dash-sys-row {
    display: grid;
    grid-template-columns: 6.75rem minmax(0, 1fr);
    gap: 0.5rem 0.65rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.86rem;
}

.dash-sys-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.dash-sys-row dt {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin: 0;
    color: var(--muted);
    font-weight: 500;
    white-space: nowrap;
}

.dash-sys-row dd {
    margin: 0;
    line-height: 1.45;
    word-break: break-word;
}

.dash-sys-row dd code {
    font-size: 0.82em;
}

.dash-sys-row__icon {
    display: grid;
    place-items: center;
    width: 1.35rem;
    height: 1.35rem;
    color: var(--accent);
    opacity: 0.85;
}

.dash-sys-row__code {
    display: inline-block;
    max-width: 100%;
    overflow-wrap: anywhere;
}

@media (max-width: 32rem) {
    .dash-sys-row {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }
}

/* 新手村 API 金鑰頁 */
.admin-body--spa-api .admin-main {
    position: relative;
}

.admin-body--spa-api .admin-main::before {
    content: "";
    position: absolute;
    inset: -1rem -0.5rem auto;
    height: 12rem;
    background:
        radial-gradient(ellipse 70% 55% at 12% 0%, rgba(121, 192, 255, 0.11), transparent 70%),
        radial-gradient(ellipse 45% 40% at 92% 8%, rgba(212, 167, 44, 0.05), transparent 65%);
    pointer-events: none;
    z-index: 0;
}

.spa-api {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.spa-api-hero {
    position: relative;
    overflow: hidden;
    border-radius: calc(var(--radius) + 4px);
    border: 1px solid rgba(121, 192, 255, 0.2);
    background: linear-gradient(135deg, rgba(22, 25, 34, 0.98), rgba(15, 17, 21, 0.99) 60%, rgba(24, 22, 38, 0.94));
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 10px 28px rgba(0, 0, 0, 0.24);
}

.spa-api-hero__glow {
    position: absolute;
    top: -45%;
    right: -8%;
    width: 48%;
    height: 150%;
    background: radial-gradient(circle, rgba(121, 192, 255, 0.12), transparent 68%);
    pointer-events: none;
}

.spa-api-hero__inner {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    padding: 1rem 1.15rem;
}

.spa-api-hero__lead {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex: 1 1 14rem;
    min-width: 0;
}

.spa-api-hero__icon {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 12px;
    color: var(--accent);
    background: rgba(121, 192, 255, 0.12);
    border: 1px solid rgba(121, 192, 255, 0.28);
    flex-shrink: 0;
}

.spa-api-hero__title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.spa-api-hero__sub {
    margin: 0.3rem 0 0;
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.45;
}

.spa-api-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    gap: 0.85rem;
    align-items: start;
}

@media (max-width: 52rem) {
    .spa-api-layout {
        grid-template-columns: 1fr;
    }
}

.spa-api-main {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.spa-api-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.spa-api-refresh {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
}

.spa-api-refresh:hover {
    text-decoration: underline;
}

.spa-api-status {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.spa-api-status__row {
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.02);
}

.spa-api-status__row + .spa-api-status__row {
    margin-top: 0;
}

.spa-api-status__main {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.75rem;
}

.spa-api-status__label {
    font-size: 0.86rem;
    font-weight: 600;
}

.spa-status-badge {
    display: inline-block;
    padding: 0.18rem 0.6rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.spa-status--pending {
    color: #fff3cd;
    background: rgba(133, 100, 4, 0.55);
    border: 1px solid rgba(212, 167, 44, 0.45);
}

.spa-status--active {
    color: #d4edda;
    background: rgba(21, 87, 36, 0.55);
    border: 1px solid rgba(126, 231, 135, 0.35);
}

.spa-status--suspended {
    color: #f8d7da;
    background: rgba(114, 28, 36, 0.55);
    border: 1px solid rgba(248, 81, 73, 0.35);
}

.spa-status--revoked {
    color: #e2e3e5;
    background: rgba(56, 61, 65, 0.65);
    border: 1px solid var(--line);
}

.spa-status--unknown {
    color: #eee;
    background: rgba(74, 74, 74, 0.65);
    border: 1px solid var(--line);
}

.spa-api-status__detail {
    margin: 0.4rem 0 0;
    font-size: 0.82rem;
    line-height: 1.45;
    color: var(--muted);
}

.spa-api-status__mask {
    margin: 0.35rem 0 0;
    font-size: 0.78rem;
    color: var(--muted);
}

.spa-api-status__ok {
    color: var(--ok);
}

.spa-api-status__warn {
    color: var(--warn);
}

.spa-api-info {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.spa-api-info__row {
    display: grid;
    grid-template-columns: 5.5rem minmax(0, 1fr);
    gap: 0.45rem 0.65rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--line);
    font-size: 0.86rem;
}

.spa-api-info__row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.spa-api-info__row dt {
    margin: 0;
    color: var(--muted);
    font-weight: 500;
}

.spa-api-info__row dd {
    margin: 0;
    line-height: 1.45;
    word-break: break-word;
}

.spa-api-info__row dd code {
    font-size: 0.82em;
}

.spa-api-lead {
    margin: 0 0 0.65rem;
    font-size: 0.84rem;
    color: var(--muted);
    line-height: 1.45;
}

.spa-api-form {
    margin: 0;
}

.spa-api-key-block {
    margin-top: 0.85rem;
    padding: 0.75rem;
    border: 1px solid rgba(126, 231, 135, 0.28);
    border-radius: var(--radius);
    background: rgba(126, 231, 135, 0.05);
}

.spa-api-key-block__label {
    margin: 0 0 0.4rem;
    font-size: 0.84rem;
    font-weight: 600;
}

.spa-api-key-box {
    margin: 0 0 0.65rem;
    padding: 0.7rem 0.8rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.28);
    font-family: var(--mono);
    font-size: 0.78rem;
    line-height: 1.45;
    word-break: break-all;
    white-space: pre-wrap;
}

.spa-api-actions {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.spa-api-action {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.7rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.02);
    text-decoration: none;
    transition: border-color 0.15s, background 0.15s, transform 0.15s;
}

.spa-api-action:hover {
    border-color: rgba(121, 192, 255, 0.35);
    background: rgba(121, 192, 255, 0.06);
    transform: translateY(-1px);
}

.spa-api-action__icon {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 9px;
    color: var(--accent);
    background: rgba(121, 192, 255, 0.1);
    border: 1px solid rgba(121, 192, 255, 0.16);
    flex-shrink: 0;
}

.spa-api-action__text {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    min-width: 0;
}

.spa-api-action__text strong {
    font-size: 0.88rem;
    color: var(--fg);
}

.spa-api-action__text span {
    font-size: 0.76rem;
    color: var(--muted);
    line-height: 1.35;
}

.spa-api-guide .sync-steps__item code {
    font-size: 0.9em;
}

@media (max-width: 32rem) {
    .spa-api-info__row {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }
}

/* 推薦技師頁 */
.admin-body--masseurs .admin-main {
    position: relative;
}

.admin-body--masseurs .admin-main::before {
    content: "";
    position: absolute;
    inset: -1rem -0.5rem auto;
    height: 12rem;
    background:
        radial-gradient(ellipse 68% 55% at 10% 0%, rgba(212, 167, 44, 0.08), transparent 70%),
        radial-gradient(ellipse 50% 45% at 88% 5%, rgba(121, 192, 255, 0.1), transparent 65%);
    pointer-events: none;
    z-index: 0;
}

.masseur-admin {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.masseur-hero {
    position: relative;
    overflow: hidden;
    border-radius: calc(var(--radius) + 4px);
    border: 1px solid rgba(212, 167, 44, 0.22);
    background: linear-gradient(135deg, rgba(22, 25, 34, 0.98), rgba(15, 17, 21, 0.99) 58%, rgba(28, 24, 18, 0.94));
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 10px 28px rgba(0, 0, 0, 0.24);
}

.masseur-hero__glow {
    position: absolute;
    top: -45%;
    right: -6%;
    width: 46%;
    height: 150%;
    background: radial-gradient(circle, rgba(212, 167, 44, 0.1), transparent 68%);
    pointer-events: none;
}

.masseur-hero__inner {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    padding: 1rem 1.15rem;
}

.masseur-hero__lead {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex: 1 1 14rem;
    min-width: 0;
}

.masseur-hero__icon {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 12px;
    color: var(--warn);
    background: rgba(212, 167, 44, 0.12);
    border: 1px solid rgba(212, 167, 44, 0.28);
    flex-shrink: 0;
}

.masseur-hero__title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.masseur-hero__sub {
    margin: 0.3rem 0 0;
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.45;
}

/* 推薦技師：全寬三主題 TAB，高度隨內容、與其他後台頁同寬 */
.masseur-tabs-col {
    display: flex;
    flex-direction: column;
    min-width: 0;
    align-self: stretch;
}

.masseur-tabs-col.sync-panel {
    padding: 0;
}

.masseur-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.masseur-tabs__btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.75rem 1rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.masseur-tabs__btn:hover {
    color: var(--fg);
    background: rgba(121, 192, 255, 0.06);
}

.masseur-tabs__btn.is-active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    background: rgba(121, 192, 255, 0.08);
}

.masseur-tabs__count {
    display: inline-grid;
    place-items: center;
    min-width: 1.5rem;
    height: 1.35rem;
    padding: 0 0.4rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--line);
}

.masseur-tabs__btn.is-active .masseur-tabs__count {
    color: var(--accent);
    border-color: rgba(121, 192, 255, 0.35);
    background: rgba(121, 192, 255, 0.12);
}

.masseur-tabs--main .masseur-tabs__btn {
    padding: 0.7rem 0.85rem;
    font-size: 0.86rem;
}

.masseur-subtabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    padding: 0.65rem 1rem 0;
    border-bottom: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}

.masseur-subtabs__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.9rem;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--muted);
    text-decoration: none;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    margin-bottom: -1px;
    transition: color 0.15s, background 0.15s, border-color 0.15s;
}

.masseur-subtabs__btn:hover {
    color: var(--fg);
    background: rgba(121, 192, 255, 0.06);
}

.masseur-subtabs__btn.is-active {
    color: var(--accent);
    background: rgba(121, 192, 255, 0.1);
    border-color: var(--line);
}

.masseur-tab-foot {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--line);
}

.masseur-tab-panel {
    padding: 0.85rem 1rem 1rem;
}

.masseur-note {
    margin: 0 0 0.65rem;
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.45;
}

.masseur-rewards-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 0.5rem;
    max-width: 34rem;
}

.masseur-avatar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.85rem;
    margin-top: 0.65rem;
    max-width: 40rem;
}

@media (max-width: 32rem) {
    .masseur-rewards-grid {
        grid-template-columns: 1fr;
    }
}

.masseur-avatar-card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
}

.masseur-list-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.masseur-list-panel__count {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.masseur-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem 0.85rem;
    margin-bottom: 0.65rem;
}

.masseur-search {
    display: flex;
    flex: 1 1 14rem;
    gap: 0.45rem;
    min-width: 0;
}

.masseur-search__input {
    flex: 1;
    min-width: 0;
    padding: 0.45rem 0.65rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--bg-elevated);
    color: var(--fg);
    font-size: 0.9rem;
    font-family: inherit;
}

.masseur-per-page__label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--muted);
}

.masseur-per-page__label select {
    padding: 0.3rem 0.45rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--bg-elevated);
    color: var(--fg);
    font-size: 0.82rem;
}

.masseur-range {
    margin: 0 0 0.5rem;
    font-size: 0.8rem;
    color: var(--muted);
}

.masseur-range__hint {
    color: var(--accent);
}

.masseur-pager {
    margin: 0.5rem 0;
}

.masseur-pager__meta {
    font-size: 0.82rem;
    color: var(--muted);
    align-self: center;
}

.masseur-empty {
    margin: 0;
    font-size: 0.88rem;
    color: var(--muted);
}

.masseur-scroll-table {
    max-height: min(22rem, 48vh);
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(0, 0, 0, 0.12);
    -webkit-overflow-scrolling: touch;
}

.masseur-scroll-table--reviews {
    max-height: min(20rem, 44vh);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.86rem;
}

.data-table th,
.data-table td {
    padding: 0.5rem 0.55rem;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

.data-table th {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--muted);
    background: var(--bg-elevated);
}

.data-table tbody tr:hover {
    background: rgba(121, 192, 255, 0.04);
}

.masseur-scroll-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    box-shadow: 0 1px 0 var(--line);
}

.masseur-table__id {
    font-variant-numeric: tabular-nums;
    color: var(--muted);
    white-space: nowrap;
}

.masseur-table__primary {
    display: block;
    font-weight: 500;
}

.masseur-table__sub {
    display: block;
    font-size: 0.76rem;
    color: var(--muted);
    line-height: 1.35;
}

.masseur-table__num {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.masseur-inline-form {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    align-items: center;
}

.masseur-inline-form__name {
    width: 7.5rem;
    max-width: 100%;
    padding: 0.35rem 0.5rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--bg-elevated);
    color: var(--fg);
    font-size: 0.86rem;
}

.masseur-inline-form__gender {
    padding: 0.35rem 0.45rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--bg-elevated);
    color: var(--fg);
    font-size: 0.86rem;
}

.masseur-review-cell {
    min-width: 12rem;
    max-width: 28rem;
}

.masseur-review-preview {
    margin: 0 0 0.25rem;
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.4;
}

.masseur-review-expand {
    margin: 0 0 0.35rem;
    font-size: 0.78rem;
}

.masseur-review-form {
    display: flex;
    gap: 0.35rem;
    align-items: flex-start;
}

.masseur-review-form__body {
    flex: 1;
    min-width: 10rem;
    padding: 0.4rem 0.55rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--bg-elevated);
    color: var(--fg);
    font-size: 0.84rem;
    font-family: inherit;
    resize: vertical;
    min-height: 2.2rem;
    max-height: 8rem;
}

.masseur-review-row.is-collapsed .masseur-review-form {
    display: none;
}

.masseur-review-row.is-expanded .masseur-review-preview,
.masseur-review-row.is-expanded .masseur-review-expand {
    display: none;
}

.masseur-review-row.is-expanded .masseur-review-form {
    display: flex;
}

.masseur-review-row.is-expanded .masseur-review-form__body {
    min-height: 4.5rem;
    max-height: 14rem;
}

.masseur-admin[data-density="compact"] .data-table th,
.masseur-admin[data-density="compact"] .data-table td {
    padding: 0.32rem 0.42rem;
    font-size: 0.8rem;
}

.masseur-admin[data-density="compact"] .masseur-scroll-table {
    max-height: min(28rem, 54vh);
}

.masseur-admin[data-density="compact"] .masseur-scroll-table--reviews {
    max-height: min(26rem, 50vh);
}

/* 新增店家頁 */
.admin-body--add-store .admin-main {
    position: relative;
}

.admin-body--add-store .admin-main::before {
    content: "";
    position: absolute;
    inset: -1rem -0.5rem auto;
    height: 12rem;
    background:
        radial-gradient(ellipse 68% 55% at 14% 0%, rgba(126, 231, 135, 0.09), transparent 70%),
        radial-gradient(ellipse 50% 42% at 90% 6%, rgba(121, 192, 255, 0.1), transparent 65%);
    pointer-events: none;
    z-index: 0;
}

.add-store {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.add-store-hero {
    position: relative;
    overflow: hidden;
    border-radius: calc(var(--radius) + 4px);
    border: 1px solid rgba(126, 231, 135, 0.22);
    background: linear-gradient(135deg, rgba(22, 25, 34, 0.98), rgba(15, 17, 21, 0.99) 58%, rgba(18, 32, 28, 0.94));
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 10px 28px rgba(0, 0, 0, 0.24);
}

.add-store-hero__glow {
    position: absolute;
    top: -45%;
    right: -6%;
    width: 46%;
    height: 150%;
    background: radial-gradient(circle, rgba(126, 231, 135, 0.12), transparent 68%);
    pointer-events: none;
}

.add-store-hero__inner {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    padding: 1rem 1.15rem;
}

.add-store-hero__lead {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex: 1 1 14rem;
    min-width: 0;
}

.add-store-hero__icon {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 12px;
    color: var(--ok);
    background: rgba(126, 231, 135, 0.12);
    border: 1px solid rgba(126, 231, 135, 0.28);
    flex-shrink: 0;
}

.add-store-hero__title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.add-store-hero__sub {
    margin: 0.3rem 0 0;
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.45;
}

.add-store-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.add-store-section .sync-panel__head {
    margin-bottom: 0.55rem;
}

.add-store-section-hint {
    margin: 0.35rem 0 0;
    font-size: 0.8rem;
    color: var(--muted);
    line-height: 1.45;
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
}

.add-store-section .field-grid {
    margin-top: 0.15rem;
}

.add-store-hint {
    margin: 0.35rem 0 0;
    font-size: 0.8rem;
    color: var(--muted);
    line-height: 1.4;
    min-height: 1.2em;
}

.add-store-geocode {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.75rem;
    margin: 0.65rem 0 0.5rem;
}

.add-store-submit {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.85rem;
    padding-top: 0.25rem;
}

.add-store-more {
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.02);
}

.add-store-more__title {
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted);
    user-select: none;
    list-style: none;
}

.add-store-more__title::-webkit-details-marker {
    display: none;
}

.add-store-more__title::before {
    content: "▸ ";
    color: var(--accent);
}

.add-store-more[open] .add-store-more__title::before {
    content: "▾ ";
}

.add-store-more__list {
    margin: 0.55rem 0 0;
    padding-left: 1.15rem;
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.5;
}

.add-store-more__list li + li {
    margin-top: 0.35rem;
}

.add-store-more__list code {
    font-size: 0.9em;
}

.add-store-dialog-hint {
    margin-top: 0;
}

.page-add-store .hours-summary {
    margin: 0.25rem 0 0;
}

.ncoin-rewards-grid {
    margin-bottom: 0.85rem;
    max-width: none;
}

.ncoin-rewards-grid--store {
    max-width: 42rem;
}

.ncoin-rewards-subtitle {
    margin: 0 0 0.35rem;
    font-size: 1rem;
    font-weight: 700;
}

.ncoin-settings-panel__hint--tight {
    margin: 0 0 0.65rem;
}

.ncoin-rewards-store-block {
    margin: 1.25rem 0 0.85rem;
    padding: 1rem 1.1rem;
    border-radius: 10px;
    border: 1px solid rgba(212, 167, 44, 0.35);
    background: rgba(212, 167, 44, 0.06);
}

.ncoin-rewards-store-block .ncoin-rewards-subtitle {
    color: var(--accent, #d4a72c);
}

.admin-body--ncoin .admin-main {
    position: relative;
}

.admin-body--ncoin .admin-main::before {
    content: "";
    position: absolute;
    inset: -1rem -0.5rem auto;
    height: 12rem;
    background:
        radial-gradient(ellipse 68% 55% at 12% 0%, rgba(126, 231, 135, 0.09), transparent 70%),
        radial-gradient(ellipse 50% 45% at 90% 5%, rgba(121, 192, 255, 0.08), transparent 65%);
    pointer-events: none;
    z-index: 0;
}

.ncoin-admin {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.ncoin-hero {
    position: relative;
    overflow: hidden;
    border-radius: calc(var(--radius) + 4px);
    border: 1px solid rgba(126, 231, 135, 0.22);
    background: linear-gradient(135deg, rgba(22, 25, 34, 0.98), rgba(15, 17, 21, 0.99) 58%, rgba(18, 30, 24, 0.94));
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 10px 28px rgba(0, 0, 0, 0.24);
}

.ncoin-hero__glow {
    position: absolute;
    top: -45%;
    right: -6%;
    width: 46%;
    height: 150%;
    background: radial-gradient(circle, rgba(126, 231, 135, 0.1), transparent 68%);
    pointer-events: none;
}

.ncoin-hero__inner {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    padding: 1rem 1.15rem;
}

.ncoin-hero__lead {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex: 1 1 14rem;
    min-width: 0;
}

.ncoin-hero__icon {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 12px;
    color: var(--ok);
    background: rgba(126, 231, 135, 0.12);
    border: 1px solid rgba(126, 231, 135, 0.28);
    flex-shrink: 0;
}

.ncoin-hero__title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.ncoin-hero__sub {
    margin: 0.3rem 0 0;
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.45;
}

.ncoin-settings-panel {
    margin-bottom: 1rem;
}

.ncoin-settings-panel__title {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
    font-weight: 700;
}

.ncoin-settings-panel__hint {
    margin: 0 0 0.85rem;
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.45;
}

.ncoin-settings-form {
    display: grid;
    gap: 0.75rem;
    max-width: 28rem;
}

.ncoin-settings-form__row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    font-size: 0.9rem;
    cursor: pointer;
}

.ncoin-settings-form__field {
    display: grid;
    gap: 0.25rem;
}

.ncoin-settings-form__label {
    font-size: 0.82rem;
    color: var(--muted);
    font-weight: 600;
}

.ncoin-settings-form__field input[type="number"],
.ncoin-settings-form__field input[type="text"] {
    max-width: 16rem;
    padding: 0.45rem 0.55rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--bg2);
    color: var(--fg);
    font: inherit;
}

.ncoin-settings-form__field input[type="number"] {
    max-width: 10rem;
}

.ncoin-settings-form__hint {
    font-size: 0.78rem;
    color: var(--muted);
    line-height: 1.4;
}

.ncoin-review-paid-panel {
    margin: 0.35rem 0 0.85rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg2);
    max-width: 42rem;
}

.ncoin-review-paid-panel__toggle {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 0.55rem;
    margin: 0 0 0.35rem;
    cursor: pointer;
}

.ncoin-review-paid-panel__toggle input[type="checkbox"] {
    flex: 0 0 auto;
    width: 1rem;
    height: 1rem;
    margin: 0.12rem 0 0;
    cursor: pointer;
}

.ncoin-review-paid-panel__toggle-label {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--fg);
    line-height: 1.45;
}

.ncoin-review-paid-panel__hint {
    margin: 0 0 0.65rem;
    padding-left: 1.55rem;
}

.ncoin-review-paid-panel__grid {
    margin-top: 0.15rem;
    padding-top: 0.55rem;
    border-top: 1px dashed var(--line);
}

.ncoin-settings-form__field--row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.55rem;
    cursor: pointer;
}

.ncoin-settings-form__field--row .ncoin-settings-form__label {
    margin: 0;
}

.ncoin-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.65rem;
}

.ncoin-stat {
    padding: 0.75rem 0.85rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(22, 25, 34, 0.92), rgba(15, 17, 21, 0.96));
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03) inset;
}

.ncoin-stat__label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    margin-bottom: 0.25rem;
}

.ncoin-stat__value {
    display: block;
    font-size: 1.15rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.ncoin-stat--earn .ncoin-stat__value {
    color: var(--accent);
}

.ncoin-stat--revert .ncoin-stat__value {
    color: var(--bad);
}

.ncoin-stat--net .ncoin-stat__value {
    color: var(--ok);
}

.ncoin-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem 0.85rem;
    margin-bottom: 0.65rem;
}

.ncoin-search {
    display: flex;
    flex: 1 1 16rem;
    flex-wrap: wrap;
    gap: 0.45rem;
    min-width: 0;
}

.ncoin-search__input {
    flex: 1 1 10rem;
    min-width: 0;
    padding: 0.45rem 0.65rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--bg-elevated);
    color: var(--fg);
    font-size: 0.9rem;
    font-family: inherit;
}

.ncoin-search__select {
    padding: 0.45rem 0.55rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--bg-elevated);
    color: var(--fg);
    font-size: 0.86rem;
    font-family: inherit;
}

.ncoin-per-page__label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--muted);
}

.ncoin-per-page__label select {
    padding: 0.3rem 0.45rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--bg-elevated);
    color: var(--fg);
    font-size: 0.82rem;
}

.ncoin-range {
    margin: 0 0 0.5rem;
    font-size: 0.8rem;
    color: var(--muted);
}

.ncoin-pager {
    margin: 0.5rem 0;
}

.ncoin-pager__meta {
    font-size: 0.82rem;
    color: var(--muted);
    align-self: center;
}

.ncoin-empty {
    margin: 0;
    font-size: 0.88rem;
    color: var(--muted);
}

.ncoin-scroll-table {
    max-height: min(22rem, 48vh);
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(0, 0, 0, 0.12);
    -webkit-overflow-scrolling: touch;
}

.ncoin-scroll-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    box-shadow: 0 1px 0 var(--line);
}

.ncoin-table__id {
    font-variant-numeric: tabular-nums;
    color: var(--muted);
    white-space: nowrap;
}

.ncoin-table__time {
    white-space: nowrap;
}

.ncoin-table__primary {
    display: block;
    font-weight: 500;
}

.ncoin-table__sub {
    display: block;
    font-size: 0.76rem;
    color: var(--muted);
    line-height: 1.35;
}

.ncoin-table__note {
    max-width: 20rem;
    font-size: 0.82rem;
    color: var(--muted);
    line-height: 1.4;
}

.ncoin-table__amount {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    font-weight: 600;
    color: var(--accent);
}

.ncoin-table__amount--debit {
    color: #f85149;
}

.ncoin-table__amount--reverted {
    color: var(--muted);
}

.ncoin-row--reverted .ncoin-table__amount {
    text-decoration: line-through;
    opacity: 0.55;
    color: var(--muted);
}

.ncoin-badge {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
}

.ncoin-badge--ok {
    color: var(--accent);
}

.ncoin-badge--reverted {
    color: var(--bad);
}

@media (max-width: 56rem) {
    .ncoin-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 32rem) {
    .ncoin-stats {
        grid-template-columns: 1fr;
    }
}

/* 網站與模版頁 */
.admin-body--template .admin-main {
    position: relative;
}

.admin-body--template .admin-main::before {
    content: "";
    position: absolute;
    inset: -1rem -0.5rem auto;
    height: 12rem;
    background:
        radial-gradient(ellipse 68% 55% at 10% 0%, rgba(167, 139, 250, 0.1), transparent 70%),
        radial-gradient(ellipse 50% 45% at 88% 5%, rgba(121, 192, 255, 0.08), transparent 65%);
    pointer-events: none;
    z-index: 0;
}

.template-admin {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.template-hero {
    position: relative;
    overflow: hidden;
    border-radius: calc(var(--radius) + 4px);
    border: 1px solid rgba(167, 139, 250, 0.24);
    background: linear-gradient(135deg, rgba(22, 25, 34, 0.98), rgba(15, 17, 21, 0.99) 58%, rgba(24, 20, 34, 0.94));
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 10px 28px rgba(0, 0, 0, 0.24);
}

.template-hero__glow {
    position: absolute;
    top: -45%;
    right: -6%;
    width: 46%;
    height: 150%;
    background: radial-gradient(circle, rgba(167, 139, 250, 0.12), transparent 68%);
    pointer-events: none;
}

.template-hero__inner {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    padding: 1rem 1.15rem;
}

.template-hero__lead {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex: 1 1 14rem;
    min-width: 0;
}

.template-hero__icon {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 12px;
    color: #c4b5fd;
    background: rgba(167, 139, 250, 0.12);
    border: 1px solid rgba(167, 139, 250, 0.28);
    flex-shrink: 0;
}

.template-hero__title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.template-hero__sub {
    margin: 0.3rem 0 0;
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.45;
}

.template-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1.25rem;
    padding: 0.65rem 0.85rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.02);
    font-size: 0.82rem;
}

.template-meta__item {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.35rem;
}

.template-meta__label {
    color: var(--muted);
    font-weight: 600;
}

.template-meta__value {
    color: var(--fg);
}

.template-tabs-col {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.template-tabs-col.sync-panel {
    padding: 0;
}

.template-form {
    display: flex;
    flex-direction: column;
}

.template-tab-panel {
    display: none;
    padding: 0.85rem 1rem 0.25rem;
}

.template-tab-panel.is-active {
    display: block;
}

.template-section-hint {
    margin: 0 0 0.75rem;
    font-size: 0.8rem;
    color: var(--muted);
    line-height: 1.45;
}

.template-key-group + .template-key-group {
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--line);
}

.template-key-group__title {
    margin: 0 0 0.55rem;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.template-tpl-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.template-tpl-option {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.02);
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}

.template-tpl-option:hover {
    border-color: rgba(167, 139, 250, 0.35);
    background: rgba(167, 139, 250, 0.05);
}

.template-tpl-option input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.template-tpl-option__box {
    width: 1.1rem;
    height: 1.1rem;
    margin-top: 0.12rem;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--bg-elevated);
    flex-shrink: 0;
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.template-tpl-option input:checked + .template-tpl-option__box {
    background: rgba(167, 139, 250, 0.2);
    border-color: rgba(167, 139, 250, 0.55);
    box-shadow: inset 0 0 0 3px #c4b5fd;
}

.template-tpl-option__text {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    font-size: 0.88rem;
}

.template-tpl-option__text strong {
    color: var(--fg);
}

.template-tpl-option__text span {
    font-size: 0.8rem;
    color: var(--muted);
}

.template-tpl-option__id {
    font-size: 0.76rem;
    font-weight: 500;
    margin-left: 0.35rem;
    color: var(--muted);
}

.template-tpl-pages {
    display: flex;
    flex-wrap: wrap;
    gap: 0.28rem 0.45rem;
    margin-top: 0.15rem;
}

.template-tpl-page {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    font-size: 0.72rem;
    padding: 0.08rem 0.38rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.03);
}

.template-tpl-page--ok {
    border-color: rgba(74, 222, 128, 0.35);
    color: #86efac;
}

.template-tpl-page--fallback {
    border-color: rgba(251, 191, 36, 0.35);
    color: #fcd34d;
}

.template-tpl-page--miss {
    border-color: rgba(248, 113, 113, 0.35);
    color: #fca5a5;
}

.template-tpl-meta {
    font-size: 0.74rem !important;
    color: var(--muted) !important;
}

.template-install-guide {
    margin-bottom: 0.85rem;
    padding: 0.75rem 0.85rem;
    border: 1px dashed rgba(167, 139, 250, 0.35);
    border-radius: var(--radius);
    background: rgba(167, 139, 250, 0.04);
}

.template-install-guide__title {
    margin: 0 0 0.45rem;
    font-size: 0.92rem;
    font-weight: 600;
}

.template-install-guide__steps {
    margin: 0 0 0.55rem 1.1rem;
    padding: 0;
    font-size: 0.84rem;
    color: var(--muted);
    line-height: 1.55;
}

.template-install-guide__steps li + li {
    margin-top: 0.25rem;
}

.template-form-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.85rem 1rem 1rem;
    border-top: 1px solid var(--line);
    margin-top: 0.5rem;
}

.template-tab-panel .sync-banner {
    margin-bottom: 0.75rem;
}

/* 外掛管理 */
.admin-body--plugins .plugin-summary {
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
}
.admin-body--plugins .plugin-summary__line {
    margin: 0;
    font-size: 0.9rem;
    color: var(--muted);
}
.admin-body--plugins .plugin-list {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}
.admin-body--plugins .plugin-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem 1.25rem;
    align-items: start;
    padding: 1rem 1.05rem;
}
.admin-body--plugins .plugin-card--missing {
    opacity: 0.82;
}
.admin-body--plugins .plugin-card__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.45rem 0.65rem;
    margin-bottom: 0.35rem;
}
.admin-body--plugins .plugin-card__title {
    margin: 0;
    font-size: 1.02rem;
}
.admin-body--plugins .plugin-card__id {
    font-size: 0.78rem;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--line);
    border-radius: 6px;
    padding: 0.1rem 0.4rem;
}
.admin-body--plugins .plugin-card__desc {
    margin: 0 0 0.55rem;
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.55;
}
.admin-body--plugins .plugin-card__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.admin-body--plugins .plugin-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 600;
    border: 1px solid var(--line);
}
.admin-body--plugins .plugin-badge--ok {
    color: #9bdc9f;
    border-color: rgba(126, 231, 135, 0.35);
    background: rgba(126, 231, 135, 0.08);
}
.admin-body--plugins .plugin-badge--on {
    color: #9ec8ff;
    border-color: rgba(122, 184, 255, 0.35);
    background: rgba(122, 184, 255, 0.1);
}
.admin-body--plugins .plugin-badge--off {
    color: var(--muted);
}
.admin-body--plugins .plugin-badge--missing {
    color: #ffcc8a;
    border-color: rgba(255, 180, 120, 0.35);
    background: rgba(255, 180, 120, 0.08);
}
.admin-body--plugins .plugin-card__side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.55rem;
    min-width: 10rem;
}
.admin-body--plugins .plugin-toggle {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 600;
    white-space: nowrap;
}
.admin-body--plugins .plugin-card__links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: flex-end;
}
.admin-body--plugins .plugin-card__hint {
    margin: 0;
    font-size: 0.82rem;
    color: var(--muted);
    text-align: right;
    max-width: 14rem;
    line-height: 1.45;
}
.admin-body--plugins .plugin-card__path {
    margin: 0.35rem 0 0;
    font-size: 0.78rem;
    color: var(--muted);
}
.admin-body--plugins .plugin-card__path code {
    font-size: 0.76rem;
}
.admin-body--plugins .plugin-badge--builtin {
    color: #c8b8ff;
    border-color: rgba(180, 160, 255, 0.35);
    background: rgba(180, 160, 255, 0.08);
}
.admin-body--plugins .plugin-discover {
    margin-bottom: 1rem;
}
.admin-body--plugins .plugin-discover__list {
    list-style: none;
    margin: 0.75rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}
.admin-body--plugins .plugin-discover__item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: rgba(122, 184, 255, 0.05);
}
.admin-body--plugins .plugin-discover__path {
    display: block;
    margin-top: 0.2rem;
    font-size: 0.78rem;
    color: var(--muted);
}
.admin-body--plugins .plugin-registry {
    margin-bottom: 1rem;
}
.admin-body--plugins .plugin-registry__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
    margin-bottom: 0.65rem;
}
.admin-body--plugins .plugin-registry-form .field-hint {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.78rem;
    color: var(--muted);
}
.admin-body--plugins .plugin-registry-delete {
    margin-top: 0.85rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--line);
}
.admin-body--plugins .plugin-help__steps {
    margin: 0 0 0.75rem;
    padding-left: 1.2rem;
    color: var(--muted);
    line-height: 1.65;
    font-size: 0.9rem;
}
.admin-body--plugins .plugin-form__foot {
    margin-bottom: 1rem;
}
.admin-body--plugins .plugin-help .sub code {
    font-size: 0.82rem;
}
@media (max-width: 720px) {
    .admin-body--plugins .plugin-card {
        grid-template-columns: 1fr;
    }
    .admin-body--plugins .plugin-card__side {
        align-items: flex-start;
    }
    .admin-body--plugins .plugin-card__hint {
        text-align: left;
        max-width: none;
    }
}

/* ── 功能快速設定 ── */
.admin-body--site-modes .site-mode-status {
    margin-bottom: 1rem;
    padding: 1rem 1.05rem;
}
.admin-body--site-modes .site-mode-status__warn {
    color: var(--warn);
}
.admin-body--site-modes .site-mode-status__list {
    margin: 0.65rem 0 0;
    padding-left: 1.2rem;
    color: var(--muted);
    font-size: 0.9rem;
}
.admin-body--site-modes .site-mode-list {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.admin-body--site-modes .site-mode-card {
    margin: 0;
    padding: 0;
    overflow: hidden;
}
.admin-body--site-modes .site-mode-card--current {
    border-color: rgba(121, 192, 255, 0.45);
    box-shadow: 0 0 0 1px rgba(121, 192, 255, 0.12);
}
.admin-body--site-modes .site-mode-card__label {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.85rem 1rem;
    align-items: start;
    padding: 1rem 1.05rem;
    cursor: pointer;
}
.admin-body--site-modes .site-mode-card__label input {
    margin-top: 0.25rem;
    accent-color: var(--accent);
}
.admin-body--site-modes .site-mode-card__title {
    display: block;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}
.admin-body--site-modes .site-mode-card__summary {
    display: block;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.55;
    margin-bottom: 0.55rem;
}
.admin-body--site-modes .site-mode-card__features {
    margin: 0;
    padding-left: 1.1rem;
    font-size: 0.84rem;
    color: var(--muted);
    line-height: 1.55;
}
.admin-body--site-modes .site-mode-card__badge {
    align-self: start;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--accent);
    background: var(--accent-dim);
    border: 1px solid rgba(121, 192, 255, 0.25);
    border-radius: 999px;
    padding: 0.15rem 0.55rem;
    white-space: nowrap;
}
.admin-body--site-modes .site-mode-form__foot {
    margin-bottom: 1rem;
}
.admin-body--site-modes .site-mode-help {
    padding: 1rem 1.05rem;
}
.admin-body--site-modes .site-mode-help__list {
    margin: 0.5rem 0 0;
    padding-left: 1.2rem;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.65;
}
.admin-body--site-modes .site-mode-help__list a {
    color: var(--accent);
}
@media (max-width: 640px) {
    .admin-body--site-modes .site-mode-card__label {
        grid-template-columns: auto minmax(0, 1fr);
    }
    .admin-body--site-modes .site-mode-card__badge {
        grid-column: 2;
        justify-self: start;
    }
}
