﻿:root {
	--ink: #172b4d;
	--muted: #64748b;
	--paper: #f7f8f5;
	--panel: #ffffff;
	--line: #d9e0e5;
	--accent: #e06b4d;
	--accent-soft: #fff0eb;
	--teal: #1f7a78;
}

* { box-sizing: border-box; }

body {
	margin: 0;
	min-width: 320px;
	color: var(--ink);
	background: var(--paper);
	font-family: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}

body::before {
	position: fixed;
	inset: 0;
	z-index: -1;
	content: "";
	opacity: .38;
	background-image: linear-gradient(135deg, rgba(31, 122, 120, .08) 25%, transparent 25%), linear-gradient(315deg, rgba(224, 107, 77, .06) 25%, transparent 25%);
	background-position: 0 0, 28px 28px;
	background-size: 56px 56px;
}

.notice-app { width: min(1080px, calc(100% - 40px)); margin: 0 auto; padding: 52px 0 28px; }
.page-header { display: flex; align-items: center; gap: 18px; margin-bottom: 34px; }
.brand-mark { display: grid; width: 50px; height: 50px; place-items: center; color: #fff; background: var(--teal); font: 700 24px Georgia, serif; box-shadow: 6px 6px 0 var(--accent); }
.eyebrow { margin: 0 0 4px; color: var(--accent); font-size: 11px; font-weight: 700; letter-spacing: 2px; }
h1 { margin: 0; font: 700 clamp(30px, 5vw, 46px)/1.05 Georgia, "Times New Roman", serif; letter-spacing: 0; }
.subtitle { margin: 7px 0 0; color: var(--muted); font-size: 14px; }
.header-actions { display: flex; align-items: center; gap: 22px; margin-left: auto; }
.dashboard-link { display: inline-flex; align-items: center; gap: 8px; padding: 10px 13px; color: var(--ink); border: 1px solid var(--line); background: #fff; font-size: 12px; font-weight: 700; text-decoration: none; transition: border-color .2s, color .2s, transform .2s; }
.dashboard-link span:first-child { color: var(--accent); font-size: 18px; line-height: 11px; }
.dashboard-link:hover, .dashboard-link:focus-visible { color: var(--teal); border-color: var(--teal); transform: translateX(-2px); }
.header-status { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #4f9f7a; box-shadow: 0 0 0 4px rgba(79, 159, 122, .14); }
.status-dot.is-error { background: #c74444; box-shadow: 0 0 0 4px rgba(199, 68, 68, .14); }
.notice-shell { overflow: hidden; background: var(--panel); border: 1px solid var(--line); box-shadow: 12px 14px 0 rgba(23, 43, 77, .08); }
.tabs { display: flex; gap: 4px; padding: 14px 18px 0; background: #f1f4f2; border-bottom: 1px solid var(--line); }
.tab { display: flex; align-items: center; gap: 12px; padding: 16px 22px; border: 0; border-bottom: 3px solid transparent; color: var(--muted); background: transparent; font: 700 15px/1 "Noto Sans TC", "Microsoft JhengHei", sans-serif; cursor: pointer; }
.tab:hover { color: var(--ink); background: rgba(255, 255, 255, .7); }
.tab.is-active { color: var(--ink); background: #fff; border-bottom-color: var(--accent); }
.tab-index { color: var(--accent); font: 700 11px Georgia, serif; }
.sync-tab { margin-left: auto; }
.rfid-tab { white-space: nowrap; }
.notice-meta { display: flex; align-items: center; gap: 10px; padding: 22px 34px 0; color: var(--teal); font-size: 12px; font-weight: 700; letter-spacing: .5px; }
.meta-divider { width: 22px; height: 1px; background: var(--line); }
.notice-panel { min-height: 450px; padding: 28px 34px 38px; outline: none; }
.notice-content { white-space: pre-wrap; word-break: break-word; color: #263952; font-size: 16px; line-height: 1.85; }
.sync-table { width: 100%; border-collapse: collapse; color: #263952; font-size: 14px; }
.sync-table th, .sync-table td { padding: 16px 18px; border-bottom: 1px solid var(--line); text-align: left; }
.sync-table thead th { color: var(--muted); background: #f5f7f5; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; }
.sync-table tbody th { color: var(--ink); font-weight: 700; }
.sync-table tbody tr:hover { background: var(--accent-soft); }
.sync-status { display: inline-flex; align-items: center; gap: 8px; color: var(--teal); font-size: 12px; font-weight: 700; }
.sync-status .status-dot { width: 7px; height: 7px; }
.sync-status.is-stale { color: var(--accent); }
.sync-status.is-stale .status-dot { background: var(--accent); box-shadow: 0 0 0 4px rgba(224, 107, 77, .14); }
.rfid-summary { display: grid; grid-template-columns: minmax(180px, .7fr) 1.3fr; gap: 30px; align-items: center; padding: 22px 24px; margin-bottom: 28px; background: #f5f7f5; border-left: 4px solid var(--teal); }
.rfid-total { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 12px; }
.rfid-total strong { width: 100%; color: var(--ink); font: 700 34px/1 Georgia, serif; }
.summary-label { width: 100%; color: var(--teal); font-weight: 700; }
.ratio-heading, .ratio-legend, .shop-card-heading, .shop-card-footer { display: flex; justify-content: space-between; gap: 12px; }
.ratio-heading { margin-bottom: 10px; color: var(--ink); font-size: 14px; font-weight: 700; }
.ratio-heading strong { color: var(--teal); }
.ratio-track, .shop-ratio { overflow: hidden; height: 12px; background: #dce7e4; }
.ratio-track span, .shop-ratio span { display: block; height: 100%; background: var(--teal); }
.ratio-legend, .shop-card-footer { margin-top: 8px; color: var(--muted); font-size: 11px; }
.rfid-shop-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.rfid-shop-card { padding: 18px; border: 1px solid var(--line); background: #fff; }
.shop-card-heading { align-items: baseline; margin-bottom: 14px; color: var(--ink); }
.shop-card-heading strong { font: 700 18px Georgia, serif; }
.shop-card-heading span { color: var(--muted); font-size: 11px; }
.shop-ratio { height: 8px; }
.loading-state, .empty-state { display: grid; min-height: 380px; place-content: center; justify-items: center; color: var(--muted); text-align: center; }
.loading-state p, .empty-state p { margin: 10px 0 0; font-size: 14px; }
.empty-state strong { color: var(--ink); font: 700 20px Georgia, serif; }
.loader { width: 28px; height: 28px; border: 3px solid #dce7e4; border-top-color: var(--teal); border-radius: 50%; animation: spin .8s linear infinite; }
.page-footer { display: flex; justify-content: space-between; padding: 25px 2px 0; color: var(--muted); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; }

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 600px) {
	.notice-app { width: min(100% - 24px, 1080px); padding-top: 28px; }
	.page-header { align-items: flex-start; margin-bottom: 25px; }
	.brand-mark { width: 40px; height: 40px; font-size: 20px; box-shadow: 4px 4px 0 var(--accent); }
	.header-actions { align-items: flex-end; flex-direction: column-reverse; gap: 10px; }
	.header-status { align-self: flex-end; font-size: 0; }
	.tabs { padding: 10px 10px 0; }
	.tab { flex: 1; justify-content: center; padding: 15px 8px; font-size: 13px; }
	.tab-index { display: none; }
	.sync-tab { margin-left: 0; }
	.notice-meta, .notice-panel { padding-left: 20px; padding-right: 20px; }
	.notice-panel { min-height: 500px; }
	.notice-content { font-size: 15px; line-height: 1.75; }
	.sync-table th, .sync-table td { padding: 14px 8px; }
	.sync-table th:last-child, .sync-table td:last-child { display: none; }
	.rfid-summary { grid-template-columns: 1fr; gap: 18px; margin-bottom: 20px; }
	.rfid-shop-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
	.rfid-shop-card { padding: 14px 12px; }
	.shop-card-heading strong { font-size: 16px; }
}
