﻿/**
 * ============================================================================
 * GEO 前端雛形系統 — geo-layout.css
 * 系統全域版面外殼與導覽骨架樣式 (App Layout Shell, AppBar, Sidebar, Breadcrumb)
 * 供全系統所有業務頁面 (MPA 模式) 引入共用，達成單點修改、全站同步連動
 * ============================================================================
 */

/* 1. 系統版面外殼 (App Layout Shell) */
.app-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: var(--geo-background);
}

/* 2. 頂部導覽列 (AppBar) */
.app-bar {
  height: var(--geo-appbar-height);
  background-color: var(--geo-secondary);
  color: var(--geo-text-white);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--geo-elevation-1);
  transition: background-color 0.25s ease;
}

.app-bar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.app-bar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--geo-fs-appbar, 25px);
  font-weight: 700;
  letter-spacing: 0.5px;
  user-select: none;
}

.app-bar-logo svg {
  width: 28px;
  height: 28px;
  fill: var(--geo-nav-active);
  transition: fill 0.25s ease;
}

/* 系統名稱旁的前台／後台標示（geo-app-shell 的 zone-badge 屬性） */
.app-bar-zone-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background-color: rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.app-bar-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.app-bar-icon-btn {
  background: transparent;
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 50%;
  transition: background-color 0.2s, transform 0.15s;
}

.app-bar-icon-btn:hover {
  background-color: rgba(255, 255, 255, 0.18);
}

.app-bar-icon-btn:active {
  transform: scale(0.92);
}

.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  background-color: rgba(255, 255, 255, 0.15);
  border: none;
  border-radius: 20px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s;
}

.user-pill:hover {
  background-color: rgba(255, 255, 255, 0.25);
}

/* 使用者選單（geo-app-shell 的 userMenu 設定，例如個人資料設定、登出） */
.user-menu {
  position: relative;
}

.user-menu-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 160px;
  padding: 4px 0;
  background-color: var(--geo-surface);
  border: 1px solid var(--geo-border);
  border-radius: var(--geo-rounded-sm);
  box-shadow: var(--geo-elevation-2);
  z-index: 1000;
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.user-menu.is-open .user-menu-dropdown {
  display: flex;
}

.user-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  color: var(--geo-text-primary);
  font-size: 14px;
  text-decoration: none;
  white-space: nowrap;
}

.user-menu-item:hover {
  background-color: rgba(2, 62, 138, 0.06);
}

/* 3. 主體容器 (Body Container) */
.app-body {
  display: flex;
  flex: 1;
  position: relative;
}

/* 4. 左側主導覽列 (Sidebar) */
.app-sidebar {
  width: var(--geo-sidebar-width);
  background-color: var(--geo-primary);
  color: #fff;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 12px 0;
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.25s ease, left 0.25s ease;
  overflow-x: hidden;
  overflow-y: auto;
  white-space: nowrap;
}

/* 側邊欄收闔模式 (Rail Mode: 64px) */
.app-sidebar.is-rail {
  width: var(--geo-sidebar-rail-width);
}

.app-sidebar.is-rail .nav-section-title,
.app-sidebar.is-rail .nav-chevron,
.app-sidebar.is-rail .nav-tag,
.app-sidebar.is-rail .nav-group-children {
  display: none !important;
}

.app-sidebar.is-rail .nav-item,
.app-sidebar.is-rail .nav-group-header {
  padding: 12px 0;
  justify-content: center;
  border-left: none !important;
}

.app-sidebar.is-rail .nav-item-left span {
  display: none;
}

.nav-section-title {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.15s, color 0.15s, border-left-color 0.15s;
}

.nav-item:hover:not(.is-disabled) {
  background-color: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.nav-item.is-active {
  background-color: rgba(255, 255, 255, 0.12);
  color: var(--geo-nav-active);
  border-left: 4px solid var(--geo-nav-active);
  padding-left: 12px;
}

.nav-item.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.nav-item-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-tag {
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.7);
}

/* 樹狀折疊選單群組 */
.nav-group {
  display: flex;
  flex-direction: column;
}

.nav-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  cursor: pointer;
  user-select: none;
  font-size: 15px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  transition: background-color 0.15s ease;
}

.nav-group-header:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

.nav-chevron {
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0.7;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-group.is-open > .nav-group-header .nav-chevron {
  transform: rotate(180deg);
}

.nav-group-children {
  display: flex;
  flex-direction: column;
  background-color: rgba(0, 0, 0, 0.12);
}

.nav-sub-item {
  padding-left: 36px !important;
  font-size: 15px !important;
}

.nav-sub-sub-item {
  padding-left: 48px !important;
  font-size: 15px !important;
}

.nav-group-children .nav-group-children {
  background-color: rgba(0, 0, 0, 0.08);
}

/* 5. 右側主工作區 (Main Canvas) */
.app-main {
  flex: 1;
  padding: 20px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
}

/* 麵包屑導航 (Breadcrumb — 位於畫面右上方與標題對齊) */
.breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--geo-fs-breadcrumb, 16px);
  color: var(--geo-text-secondary);
  padding: 4px 0;
  margin-top: 1px;
}

.breadcrumb a {
  color: var(--geo-text-secondary);
  text-decoration: none;
}

.breadcrumb a:hover {
  color: var(--geo-primary);
  text-decoration: underline;
}

.breadcrumb-sep {
  color: var(--geo-text-disabled);
  font-size: 12px;
}

.breadcrumb-current {
  color: var(--geo-text-primary);
  font-weight: 600;
}

/* 標題與麵包屑橫向對齊列 */
.page-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 4px;
}

.page-title {
  font-size: 25px;
  font-weight: 700;
  color: var(--geo-text-primary);
  margin: 0;
  line-height: 1.2;
}

.page-subtitle {
  font-size: 14.5px;
  color: var(--geo-text-secondary);
  margin-top: 4px;
}

/* 6. 內容白色卡片與通用區塊 */
.showcase-card {
  background-color: var(--geo-surface);
  border: 1px solid var(--geo-border);
  border-radius: var(--geo-radius-base);
  box-shadow: var(--geo-elevation-1);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 22px;
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-bottom: 1px solid var(--geo-border);
  padding-bottom: 8px;
  flex-wrap: wrap;
  gap: 8px;
}

.section-title {
  font-size: 19px;
  font-weight: 700;
  color: var(--geo-tertiary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-desc {
  font-size: 14.5px;
  color: var(--geo-text-secondary);
}

/* 展示頁：元件名稱列（使用者可用這些名稱指定元件） */
.showcase-names {
  margin: 0;
  padding: 8px 12px;
  background-color: var(--geo-background);
  border-radius: var(--geo-radius-base);
  font-size: 14.5px;
  line-height: 1.9;
  color: var(--geo-text-secondary);
}

.showcase-names code {
  margin: 0 2px;
  padding: 1px 6px;
  border: 1px solid var(--geo-border);
  border-radius: 4px;
  background-color: var(--geo-surface);
  font-family: Consolas, Monaco, monospace;
  font-size: 13.5px;
  color: var(--geo-primary);
}

/* 分隔線範例、上下排列的示範區、補充說明（展示頁專用） */
.showcase-divider-caption {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--geo-text-secondary);
}

.showcase-note {
  margin: 8px 0 0;
  font-size: 14.5px;
  line-height: 1.7;
  color: var(--geo-text-secondary);
}

.showcase-divider-title {
  font-weight: 700;
}

.showcase-divider-demo,
.showcase-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.showcase-stack {
  gap: 16px;
}

.showcase-divider-box {
  padding: 16px 20px;
  background-color: var(--geo-surface);
  border-radius: var(--geo-radius-base);
  box-shadow: var(--geo-elevation-2);
}

.demo-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.code-preview {
  background-color: #1e1e1e;
  color: #d4d4d4;
  padding: 12px 16px;
  border-radius: 4px;
  font-family: Consolas, Monaco, monospace;
  font-size: 13px;
  overflow-x: auto;
  margin-top: 4px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
}

/* 主題色塊選擇器清單樣式 */
.theme-preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.theme-card {
  border: 2px solid var(--geo-border);
  border-radius: var(--geo-radius-base);
  padding: 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background-color: var(--geo-surface);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.theme-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--geo-elevation-2);
  border-color: var(--geo-secondary);
}

.theme-card.is-active {
  border-color: var(--geo-primary);
  box-shadow: 0 0 0 2px var(--geo-primary);
}

.theme-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--geo-text-primary);
}

.theme-swatches {
  display: flex;
  height: 26px;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1);
}

.theme-swatch-item {
  flex: 1;
  height: 100%;
}

/* 調色盤微調清單樣式 */
.color-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.color-picker-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--geo-background);
  border: 1px solid var(--geo-border);
  border-radius: var(--geo-radius-base);
}

.color-picker-card input[type="color"] {
  -webkit-appearance: none;
  appearance: none;
  border: none;
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  max-width: 38px;
  max-height: 38px;
  flex-shrink: 0;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  cursor: pointer;
  background: none;
  padding: 0;
  overflow: hidden;
}

.color-picker-card input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
  border-radius: 50%;
}

.color-picker-card input[type="color"]::-webkit-color-swatch {
  border: 2px solid #ffffff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.2);
}

.color-picker-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.color-picker-label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--geo-text-primary);
}

.color-picker-val {
  font-family: Consolas, monospace;
  font-size: 13px;
  color: var(--geo-text-secondary);
}

/* 圓角切換按鈕群組 */
.rounded-toggle-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.rounded-toggle-btn {
  padding: 7px 14px;
  background: var(--geo-background);
  border: 1px solid var(--geo-border);
  border-radius: 4px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--geo-text-primary);
  transition: all 0.15s ease;
}

.rounded-toggle-btn:hover {
  border-color: var(--geo-primary);
}

.rounded-toggle-btn.is-active {
  background: var(--geo-primary);
  color: #fff;
  border-color: var(--geo-primary);
}

/* 7. 視圖切換管理 */
.app-page-view {
  display: none;
  flex-direction: column;
  gap: 18px;
}

.app-page-view.is-visible {
  display: flex;
}

.section-block {
  background-color: var(--geo-surface);
  border: 1px solid var(--geo-border);
  border-radius: var(--geo-radius-base);
  box-shadow: var(--geo-elevation-1);
  padding: 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scroll-margin-top: 80px;
  transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.section-block:hover {
  box-shadow: var(--geo-elevation-2);
  border-color: rgba(0, 0, 0, 0.2);
}

.section-header {
  border-bottom: 1px solid var(--geo-border);
  padding-bottom: 12px;
  margin-bottom: 4px;
}

.showcase-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* 展示頁：每個畫面自有白色區塊，外殼的內容區塊不加框 */
.app-content:has(> .app-page-view) {
  padding: 0;
  background-color: transparent;
  border: 0;
  box-shadow: none;
}

@media (min-width: 961px) {
  .app-main:has(> .app-content > .app-page-view) {
    padding-left: 28px;
    padding-right: 28px;
  }
}

.code-preview-wrapper {
  margin-top: 14px;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #333333;
}

.code-preview-header {
  background-color: #2b2b2b;
  color: #9cdcfe;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid #3c3c3c;
  user-select: none;
}

/* 8. 展示頁：參考工具與設計指南 */
.guide-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  line-height: 1.7;
  font-size: 14.5px;
  color: var(--geo-text-primary);
}

.guide-card {
  padding: 18px;
  background: var(--geo-background);
  border: 1px solid var(--geo-border);
  border-radius: var(--geo-radius-base);
}

.guide-card-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 16px;
  font-weight: 700;
}

.guide-card-desc {
  font-size: 14px;
  color: var(--geo-text-secondary);
}

.guide-link {
  color: var(--geo-primary);
  text-decoration: underline;
  font-weight: 700;
}

.template-open-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  padding: 0 16px;
  height: 36px;
  border-radius: var(--geo-radius-base);
  background-color: var(--geo-primary);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.guide-figure {
  margin: 12px 0 0;
  text-align: center;
}

.guide-figure-img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  border: 1px solid var(--geo-border);
  box-shadow: var(--geo-elevation-1);
}

.guide-figure-caption {
  margin-top: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--geo-text-secondary);
}

/* 9. 展示頁：設定區塊 */
.showcase-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.showcase-label {
  margin-bottom: 8px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--geo-text-secondary);
}

.showcase-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-card-key {
  font-size: 11px;
  opacity: 0.7;
}

/* 未登入頁面（geo-app-shell bare）：隱藏側邊選單、使用者資訊、頁面標題與麵包屑，內容置中；頁尾（footer 屬性）固定在頁面最下方 */
.app-layout.is-bare .app-sidebar,
.app-layout.is-bare .app-drawer-backdrop,
.app-layout.is-bare .app-bar-icon-btn[data-action="toggle-menu"],
.app-layout.is-bare .app-bar-right .user-menu,
.app-layout.is-bare .app-bar-right .user-pill,
.app-layout.is-bare .page-title-row {
  display: none;
}

.app-layout.is-bare .app-main {
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}

.app-layout.is-bare .app-content {
  width: 100%;
  max-width: 640px;
}

/* 滿版頁面（geo-app-shell full）：完整圖台這類整頁一張畫面的頁面，保留頂列與側邊選單，
   隱藏頁面標題與麵包屑，內容區沒有內距與白色區塊，內容緊貼四邊 */
.app-layout.is-full .page-title-row {
  display: none;
}

.app-layout.is-full .app-main {
  gap: 0;
  padding: 0;
}

.app-layout.is-full .app-content {
  flex: 1;
  padding: 0;
  border: 0;
  border-radius: 0;
  background-color: transparent;
  box-shadow: none;
}

/* bg-image：登入類頁面的裝飾背景，純 Token 色階與 SVG 線條、色塊組成，不是外部圖片檔，file:// 環境也能顯示；
   由上而下：品牌色漸層 + 細線紋理 + 底部簡化城市剪影（比照政府入口網頁常見的等角城市插畫風格，純幾何色塊，非真實圖片） */
.app-layout.is-bare.has-bg-image .app-main {
  background-color: var(--geo-background);
  background-image:
    linear-gradient(160deg, color-mix(in srgb, var(--geo-primary) 90%, transparent) 0%, color-mix(in srgb, var(--geo-primary) 45%, transparent) 42%, transparent 72%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cpath d='M0 60h120M60 0v120M0 0l120 120M120 0L0 120' stroke='%23ffffff' stroke-opacity='0.08' stroke-width='1'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='170'%3E%3Crect x='0' y='95' width='40' height='75' fill='white' fill-opacity='0.10'/%3E%3Crect x='45' y='65' width='30' height='105' fill='white' fill-opacity='0.08'/%3E%3Crect x='80' y='105' width='50' height='65' fill='white' fill-opacity='0.10'/%3E%3Crect x='135' y='45' width='35' height='125' fill='white' fill-opacity='0.07'/%3E%3Crect x='175' y='85' width='45' height='85' fill='white' fill-opacity='0.09'/%3E%3Crect x='225' y='60' width='30' height='110' fill='white' fill-opacity='0.08'/%3E%3Crect x='260' y='100' width='55' height='70' fill='white' fill-opacity='0.10'/%3E%3Crect x='320' y='75' width='35' height='95' fill='white' fill-opacity='0.08'/%3E%3Crect x='360' y='110' width='40' height='60' fill='white' fill-opacity='0.10'/%3E%3C/svg%3E");
  background-size: cover, 120px 120px, 400px 170px;
  background-position: center, center, bottom center;
  background-repeat: no-repeat, repeat, repeat-x;
}

/* 頁尾（geo-app-shell footer 屬性或 GEO_APP.footer）：整頁最下方橫條，底色為獨立 Token --geo-footer-bg（白字）；
   舊專案的 geo-tokens.css 沒有這個 Token 時退回主色；每一段文字一個項目，窄螢幕自動換行 */
.app-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: 24px;
  row-gap: 4px;
  padding: 16px;
  background-color: var(--geo-footer-bg, var(--geo-primary));
  color: var(--geo-text-white);
  text-align: center;
  font-size: var(--geo-fs-body);
}

/* split：整頁左右兩欄（比照公務入口網登入頁常見版面：左側大面積說明區、右側窄欄表單），601px 以上才並排；
   左側 slot="visual" 放系統名稱、系統維護團隊等說明內容，右側維持原本內容（頁籤、表單） */
.app-layout.is-split .app-main {
  align-items: stretch;
  justify-content: flex-start;
  padding: 0;
}

.app-layout.is-split.has-bg-image .app-main {
  background: none;
}

.app-layout.is-split .app-content {
  max-width: none;
  width: 100%;
  padding: 32px 16px;
}

/* 窄寬度：visual 面板堆疊在表單上方，字級與留白縮小，裝飾背景仍在（矮版） */
.app-visual {
  padding: 24px 16px;
  color: var(--geo-text-primary);
}

.app-layout.is-split.has-bg-image .app-visual {
  color: var(--geo-text-white);
  background-color: var(--geo-background);
  background-image: linear-gradient(160deg, color-mix(in srgb, var(--geo-primary) 92%, transparent) 0%, color-mix(in srgb, var(--geo-primary) 55%, transparent) 100%);
}

.app-visual-title {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.4;
}

/* 深色背景（split + bg-image）：左側區塊內容若用 <geo-detail> 等會自帶深色文字的元件，強制改回白色才看得清楚（各種寬度皆適用） */
.app-layout.is-split.has-bg-image .app-visual .geo-form-title,
.app-layout.is-split.has-bg-image .app-visual .geo-form-content {
  color: var(--geo-text-white);
}

@media (min-width: 601px) {
  .app-layout.is-split .app-main {
    flex-direction: row;
  }

  .app-visual {
    flex: 1.3 1 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 56px;
    color: var(--geo-text-primary);
    min-width: 0;
  }

  .app-layout.is-split.has-bg-image .app-visual {
    color: var(--geo-text-white);
    background-color: var(--geo-background);
    background-image:
      linear-gradient(160deg, color-mix(in srgb, var(--geo-primary) 92%, transparent) 0%, color-mix(in srgb, var(--geo-primary) 50%, transparent) 45%, transparent 78%),
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cpath d='M0 60h120M60 0v120M0 0l120 120M120 0L0 120' stroke='%23ffffff' stroke-opacity='0.08' stroke-width='1'/%3E%3C/svg%3E"),
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='170'%3E%3Crect x='0' y='95' width='40' height='75' fill='white' fill-opacity='0.10'/%3E%3Crect x='45' y='65' width='30' height='105' fill='white' fill-opacity='0.08'/%3E%3Crect x='80' y='105' width='50' height='65' fill='white' fill-opacity='0.10'/%3E%3Crect x='135' y='45' width='35' height='125' fill='white' fill-opacity='0.07'/%3E%3Crect x='175' y='85' width='45' height='85' fill='white' fill-opacity='0.09'/%3E%3Crect x='225' y='60' width='30' height='110' fill='white' fill-opacity='0.08'/%3E%3Crect x='260' y='100' width='55' height='70' fill='white' fill-opacity='0.10'/%3E%3Crect x='320' y='75' width='35' height='95' fill='white' fill-opacity='0.08'/%3E%3Crect x='360' y='110' width='40' height='60' fill='white' fill-opacity='0.10'/%3E%3C/svg%3E");
    background-size: cover, 120px 120px, 400px 170px;
    background-position: center, center, bottom center;
    background-repeat: no-repeat, repeat, repeat-x;
  }

  .app-visual-title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.4;
    max-width: 480px;
  }

  .app-layout.is-split .app-content {
    flex: 1 1 420px;
    max-width: 480px;
    width: auto;
    display: flex;
    align-items: center;
    padding: 56px 48px;
    background-color: var(--geo-surface);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.06);
  }

  .app-layout.is-split .app-content > .content-title-row {
    display: none;
  }

  .app-layout.is-split .app-content > :not(.content-title-row) {
    width: 100%;
  }
}

/* 閒置自動登出倒數（geo-app-shell idle-timeout）：頂列右側，窄螢幕只留倒數時間 */
.app-bar-idle {
  color: #fff;
  font-size: 13px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 768px) {
  .app-bar-idle .idle-long {
    display: none;
  }
}

/* 詳細資料頁：隱藏功能名稱（由 content-title 顯示資料名稱） */
.page-title[hidden] {
  display: none;
}

/* 展示頁：元件範例兩兩一排，窄螢幕改單排 */
.demo-pair-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 24px;
  align-items: start;
}
@media (max-width: 720px) {
  .demo-pair-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

.demo-pair-grid .geo-date-roc-container {
  max-width: none;
}
