/* gscreport 前台：手機優先，與 XOOPS 預設佈景相容 */
.gsc-front { --b: #dadce0; --muted: #5f6368; --up: #188038; --down: #d93025; --bg: #fff; --soft: #f8f9fa; --accent: #1a73e8;
  color: #202124; font-size: 15px; line-height: 1.5; max-width: 1200px; margin: 0 auto; box-sizing: border-box; }
.gsc-front *, .gsc-front *::before, .gsc-front *::after { box-sizing: border-box; }
.gsc-front h2.gsc-h { font-size: 1.4em; margin: 0 0 4px; }
.gsc-front h3 { font-size: 1.05em; margin: 0 0 10px; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.gsc-front h3 small { color: var(--muted); font-weight: normal; }
.gsc-front h3 a { margin-left: auto; font-size: .85em; font-weight: normal; }
.gsc-muted, .gsc-front .gsc-sub { color: var(--muted); font-size: .9em; }
.gsc-note { color: var(--muted); font-size: .85em; margin: 8px 0; }
.gsc-note.warn { color: #8a4b00; background: #fef4e8; border-left: 4px solid #e37400; padding: 8px 10px; border-radius: 4px; }
.gsc-note-small { color: var(--muted); font-size: .8em; margin-top: 12px; }
.gsc-empty { padding: 32px 16px; text-align: center; color: var(--muted); }
.gsc-loading { padding: 32px; text-align: center; color: var(--muted); }

.gsc-head { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: flex-end; margin-bottom: 12px; }
.gsc-switch, .gsc-controls label { display: inline-flex; flex-direction: column; font-size: .85em; color: var(--muted); gap: 2px; }
.gsc-switch select, .gsc-controls select, .gsc-controls input { font-size: 15px; padding: 6px 8px; border: 1px solid var(--b); border-radius: 6px; background: #fff; color: #202124; min-height: 38px; max-width: 100%; }
.gsc-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; padding: 10px; background: var(--soft); border: 1px solid var(--b); border-radius: 8px; }
.gsc-custom { display: inline-flex; gap: 10px; flex-wrap: wrap; }
.gsc-custom[hidden] { display: none; }
.gsc-btn { font-size: 14px; padding: 7px 14px; min-height: 38px; border: 1px solid var(--accent); background: var(--accent); color: #fff; border-radius: 6px; cursor: pointer; }
.gsc-btn-alt { background: #fff; color: var(--accent); text-decoration: none; display: inline-flex; align-items: center; }
.gsc-btn-alt:hover { background: #f1f6fe; color: var(--accent); }
.gsc-btn[disabled] { opacity: .45; cursor: default; }
.gsc-pager .gsc-btn { background: #fff; color: var(--accent); }
.gsc-period { margin: 10px 2px; font-weight: 600; color: #3c4043; }

.gsc-tabs { display: flex; gap: 2px; overflow-x: auto; border-bottom: 1px solid var(--b); margin: 8px 0 14px; -webkit-overflow-scrolling: touch; }
.gsc-tabs button { flex: 0 0 auto; background: none; border: 0; border-bottom: 3px solid transparent; padding: 10px 14px; font-size: 15px; color: var(--muted); cursor: pointer; }
.gsc-tabs button.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }

.gsc-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
.gsc-card { position: relative; display: flex; flex-direction: column; padding: 12px; border-radius: 8px; border: 1px solid var(--b); background: #fff; cursor: pointer; border-top: 4px solid var(--c); }
.gsc-card input { position: absolute; top: 10px; right: 10px; accent-color: var(--c); }
.gsc-card .lbl { font-size: .85em; color: var(--muted); padding-right: 22px; }
.gsc-card .val { font-size: 1.6em; font-weight: 600; line-height: 1.2; margin-top: 4px; }
.gsc-card .cmp { font-size: .85em; margin-top: 2px; }
.chg { white-space: nowrap; color: var(--muted); }
.chg.up { color: var(--up); }
.chg.down { color: var(--down); }

.gsc-box { border: 1px solid var(--b); border-radius: 8px; padding: 12px; margin-bottom: 14px; background: #fff; min-width: 0; }
.gsc-grid2 { display: grid; grid-template-columns: 1fr; gap: 14px; }
.gsc-grid2 > .gsc-box { margin-bottom: 0; }
.gsc-grid2 { margin-bottom: 14px; }
.gsc-chart { position: relative; height: 280px; }
.gsc-chart-sm { height: 230px; }

.gsc-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 6px 0 10px; }
.gsc-toolbar input[type=search] { flex: 1 1 220px; font-size: 15px; padding: 7px 10px; border: 1px solid var(--b); border-radius: 6px; min-height: 38px; }
.gsc-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.gsc-tbl { width: 100%; border-collapse: collapse; font-size: .92em; }
.gsc-tbl th, .gsc-tbl td { padding: 8px 8px; border-bottom: 1px solid #ececec; text-align: left; vertical-align: top; }
.gsc-tbl th { color: var(--muted) !important; background: var(--soft) !important; font-weight: 600; white-space: nowrap; }
.gsc-tbl th.sortable { cursor: pointer; user-select: none; }
.gsc-tbl .num { text-align: right; white-space: nowrap; }
.gsc-tbl td.txt { word-break: break-word; min-width: 140px; }
.gsc-tbl a.gsc-ext { text-decoration: none; color: var(--muted); }
.gsc-pager { display: flex; gap: 10px; align-items: center; justify-content: center; margin: 12px 0; }
.gsc-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.gsc-dot.green { background: #188038; } .gsc-dot.red { background: #d93025; } .gsc-dot.orange { background: #e37400; } .gsc-dot.blue { background: #1a73e8; } .gsc-dot.grey { background: #9aa0a6; }
.gsc-alert-mark { display: inline-block; width: 18px; height: 18px; line-height: 18px; text-align: center; border-radius: 50%; background: #d93025; color: #fff; font-size: 12px; font-weight: 700; margin-left: 4px; }

.gsc-help { display: inline-block; position: relative; width: 16px; height: 16px; line-height: 16px; text-align: center; border-radius: 50%; border: 1px solid var(--muted); color: var(--muted); font-size: 11px; cursor: help; vertical-align: middle; }
.gsc-help:hover::after, .gsc-help:focus::after { content: attr(data-tip); position: absolute; left: 50%; top: 22px; transform: translateX(-50%); width: 220px; padding: 8px 10px; background: #3c4043; color: #fff; border-radius: 6px; font-size: 12px; line-height: 1.4; z-index: 20; text-align: left; white-space: normal; font-weight: normal; }

.gsc-site-cards { display: grid; grid-template-columns: 1fr; gap: 12px; }
.gsc-site-card { display: block; padding: 14px; border: 1px solid var(--b); border-radius: 8px; color: inherit !important; text-decoration: none !important; background: #fff; }
.gsc-site-card:hover { border-color: var(--accent); box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.gsc-site-name { font-weight: 600; font-size: 1.1em; }
.gsc-site-sub { color: var(--muted); font-size: .85em; }
.gsc-site-metrics { display: flex; gap: 24px; margin: 8px 0; }
.gsc-site-metrics .lbl { display: block; color: var(--muted); font-size: .8em; }
.gsc-site-metrics .val { font-size: 1.4em; font-weight: 600; margin-right: 6px; }

.gsc-modal { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 12px; }
.gsc-modal[hidden] { display: none; }
.gsc-modal-box { background: #fff; border-radius: 10px; width: 100%; max-width: 760px; max-height: 92vh; overflow: auto; padding: 14px; }
.gsc-modal-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.gsc-modal-head h3 { margin: 0; word-break: break-word; }
.gsc-modal-close { border: 0; background: none; font-size: 26px; line-height: 1; cursor: pointer; color: var(--muted); padding: 0 4px; }

@media (min-width: 640px) {
  .gsc-site-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .gsc-cards { grid-template-columns: repeat(4, 1fr); }
  .gsc-grid2 { grid-template-columns: 1fr 1fr; }
  .gsc-chart { height: 320px; }
  .gsc-site-cards { grid-template-columns: repeat(3, 1fr); }
}

/* 公開展示（第 5 階段） */
.gsc-sc-intro { margin: 6px 0 14px; line-height: 1.7; }
.gsc-sc-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 14px; }
.gsc-sc-filter a { padding: 5px 12px; border: 1px solid var(--b); border-radius: 16px; text-decoration: none; color: inherit; font-size: .92em; min-height: 32px; display: inline-flex; align-items: center; }
.gsc-sc-filter a.active, .gsc-sc-filter a:hover { border-color: var(--accent); color: var(--accent); }
.gsc-sc-filter a.active { background: var(--accent); color: #fff; }
.gsc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.gsc-sc-block .gsc-tbl { font-size: .9em; }
.gsc-sc-more { text-align: right; margin: 6px 0 0; font-size: .9em; }
