/* Tablet layer is opt-in; ordinary desktop pages retain their existing design.
 * Measured reference: harmonyos-app/docs/华为设计规范对照.md (supplied Sketch library).
 * 240 drawer / 56 navigation row / 20 card radius; touch controls retain a 48px target.
 */
html.harmony-tablet,
html.harmony-tablet[data-theme] {
  --sidebar: 240px;
  --radius: 20px;
  /* Keep --bg, --brand and --theme-* inherited from the saved theme. */
  --ink: rgba(0, 0, 0, .9);
  --muted: rgba(0, 0, 0, .6);
  --line: var(--theme-border, #e3e7ec);
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}
.harmony-tablet body { font-family: 'HarmonyOS Sans SC', 'HarmonyOS Sans', system-ui, 'Microsoft YaHei', sans-serif; font-size: 16px; overflow: auto; }
.harmony-tablet button, .harmony-tablet a { touch-action: manipulation; }
.harmony-tablet :is(button, a):focus-visible { outline: 3px solid var(--brand, #0a59f7); outline-offset: 3px; }
.harmony-tablet :is(.btn, .btn.small, .table-link, .page-button, .modal-head .close, .mobile-menu, .mobile-account, .top-notification) { min-height: 48px; min-width: 48px; border-radius: 12px; font-size: 14px; }
.harmony-tablet :is(.input, .field, .search-field input) { min-height: 48px; font-size: 16px; border-radius: 12px; }
.harmony-tablet :is(.field, .input, .search-field) { border-color: #c9d0d9; }
.harmony-tablet :is(.input, .field, .search-field input):focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.harmony-tablet .input:not([readonly]):not(:disabled) { background: #fff; color: var(--ink); }
.harmony-tablet .input[readonly] { background: var(--bg); color: var(--ink); }
.harmony-tablet :is(input, select, textarea):disabled { opacity: 1; color: #66717e; -webkit-text-fill-color: #66717e; }
.harmony-tablet .btn { padding: 10px 16px; }
.harmony-tablet :is(.btn.primary, .btn.secondary, .btn.danger) { border-radius: 999px; font-size: 16px; }
.harmony-tablet .btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: none; }
.harmony-tablet .btn.primary:hover { background: var(--brand-hover, var(--brand)); }
.harmony-tablet .btn:active:not(:disabled) { transform: translateY(1px); }
.harmony-tablet .btn.plain { padding: 8px 12px; }
.harmony-tablet :is(.badge, .small, .table-sub, .panel-subtitle, .kpi-foot, .chart-caption, .page-head p, .detail-note) { font-size: 14px; }
.harmony-tablet :is(.muted, .table-sub, .panel-subtitle, .kpi-foot) { color: var(--muted); }
.harmony-tablet h1 { font-size: 30px; line-height: 1.35; letter-spacing: 0; }
.harmony-tablet h2 { font-size: 18px; }
.harmony-tablet .sidebar { background: linear-gradient(165deg, var(--sidebar-start, #252650), var(--sidebar-end, #17182f)); color: #fff; border-right: 0; overflow-y: auto; overscroll-behavior: contain; padding-top: 24px; }
/* Scroll the drawer as a whole instead of squeezing the park label between fixed-height navigation rows. */
.harmony-tablet .sidebar > * { flex-shrink: 0; }
.harmony-tablet .brand { height: 84px; padding: 22px; }
.harmony-tablet .sidebar .brand { display: flex; height: 114px; padding: 0 22px 20px; background: transparent; }
.harmony-tablet .sidebar .brand-wordmark { display: block; filter: none; width: 100%; max-width: 169.2px; height: 84.6px; object-fit: contain; object-position: center; flex: 0 1 auto; }
.harmony-tablet .sidebar-park { color: #fff; margin: 0 16px 24px; padding: 16px 12px; background: #ffffff0d; border: 1px solid #ffffff24; border-radius: 14px; font-size: 15px; line-height: 1.55; }
.harmony-tablet .nav { padding: 0 12px; }
.harmony-tablet .nav a { min-height: 56px; height: auto; margin-bottom: 6px; padding: 12px; gap: 12px; color: #ffffffe6; border-radius: 16px; font-size: 16px; line-height: 1.5; }
.harmony-tablet .nav a:hover { color: #fff; background: #ffffff1a; }
.harmony-tablet .nav a.active { color: var(--brand-dark); background: #fff; box-shadow: none; font-weight: 600; }
.harmony-tablet .nav a > span:not(.nav-count) { min-width: 0; }
.harmony-tablet .nav .nav-count { display: inline-grid; place-items: center; flex: none; min-width: 26px; height: 26px; padding: 0 7px; margin-left: auto; border: 0; border-radius: 13px; background: #c53743; color: #fff; font: 600 12px/1 'HarmonyOS Sans', system-ui, sans-serif; font-variant-numeric: tabular-nums; letter-spacing: 0; box-shadow: none; opacity: 1; animation: none; transition: none; filter: none; }
.harmony-tablet .nav a.active:before { display: none; }
.harmony-tablet .nav a svg { width: 24px; height: 24px; }
.harmony-tablet .sidebar-bottom { padding: 16px; }
.harmony-tablet :is(.footer, .sidebar .platform-state, .sidebar .sidebar-note, .bi-nav-link, .login-public-board, [data-harmony-excluded="board"]) { display: none !important; }
.harmony-tablet .sidebar-version { color: #ffffffe6; border-color: #ffffff33; min-height: 48px; margin-top: 0; }
.harmony-tablet .sidebar-version strong { color: #fff; }
.harmony-tablet .topbar { min-height: 56px; height: auto; padding: 4px 24px; gap: 12px; background: #ffffffed; }
.harmony-tablet .breadcrumb > span { display: none; }
.harmony-tablet .breadcrumb b { font-size: 18px; font-weight: 600; color: var(--ink); }
.harmony-tablet .top-meta { gap: 12px; }
.harmony-tablet .profile-button { min-height: 48px; }
.harmony-tablet .profile-button small { color: #677485; }
.harmony-tablet :is(.main-shell, .content, .panel) { min-width: 0; }
.harmony-tablet .content { padding: 24px; }
.harmony-tablet .page-head { align-items: flex-start; flex-wrap: wrap; }
.harmony-tablet .head-actions { flex-wrap: wrap; }
.harmony-tablet .kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.harmony-tablet .kpi { padding: 18px; box-shadow: none; }
.harmony-tablet .kpi-label { font-size: 14px; color: #536170; }
.harmony-tablet .kpi-value { font-size: 32px; }
.harmony-tablet .dashboard-grid { grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr); gap: 20px; }
.harmony-tablet .panel { box-shadow: none; }
.harmony-tablet .panel-head { padding: 20px; flex-wrap: wrap; }
.harmony-tablet .vital-metric { min-height: 92px; border-radius: 12px; }
.harmony-tablet .vital-metric .metric-label { font-size: 13px; }
.harmony-tablet .trend-chart svg { height: 208px; }
.harmony-tablet .zone-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.harmony-tablet .zone-card { border-radius: 14px; padding: 16px; }
.harmony-tablet :is(.health-row, .alarm-item) { min-height: 56px; }
.harmony-tablet .alarm-info p { font-size: 13px; }
.harmony-tablet .alarm-panel-footer { gap: 12px; flex-wrap: wrap; }
.harmony-tablet .alarm-panel-footer a { display: inline-flex; min-height: 48px; align-items: center; }
.harmony-tablet .toolbar { gap: 12px; flex-wrap: wrap; }
.harmony-tablet .toolbar .search-field { flex: 1 1 240px; width: auto; min-width: min(200px, 100%); }
.harmony-tablet .toolbar :is(.field, input[type="date"]) { flex: 1 1 148px; min-width: 140px; max-width: 240px; }
.harmony-tablet .tabs { gap: 20px; overflow-x: auto; overscroll-behavior-x: contain; }
.harmony-tablet .tab { min-width: 64px; height: 56px; font-size: 15px; flex-shrink: 0; white-space: nowrap; }
.harmony-tablet :is(th, td) { padding: 16px; font-size: 14px; }
.harmony-tablet th { color: #546170; background: var(--bg); font-weight: 600; }
.harmony-tablet .table-link { padding: 8px 4px; }
.harmony-tablet :is(.table-scroll, .table-wrap, .help-table-wrap, .analytics-table-wrap) { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; scrollbar-width: auto; }
.harmony-tablet .pagination { flex-wrap: wrap; gap: 10px; }
.harmony-tablet .settings-layout { grid-template-columns: 172px minmax(0, 1fr); }
.harmony-tablet .settings-nav :is(button, .settings-release-link) { min-height: 48px; font-size: 14px; border-radius: 12px; }
.harmony-tablet .settings-nav :is(button, .settings-release-link).active { background: var(--theme-soft); color: var(--brand); font-weight: 600; }
.harmony-tablet .harmony-settings-notice { display: flex; align-items: flex-start; gap: 10px; margin: 0 24px 20px; padding: 14px 16px; border: 1px solid var(--theme-border); border-radius: 12px; background: var(--theme-soft); color: var(--brand); font-size: 15px; line-height: 1.7; overflow-wrap: anywhere; }
.harmony-tablet .harmony-settings-notice > .icon { width: 22px; height: 22px; flex: 0 0 22px; margin-top: 2px; }
.harmony-tablet .modal-body .harmony-settings-notice { margin: 16px 0 0; }
.harmony-tablet .harmony-theme-form .theme-options { gap: 14px; }
.harmony-tablet .harmony-theme-form .theme-card { padding: 12px 12px 16px; border-radius: 16px; }
.harmony-tablet .harmony-theme-form .theme-name { font-size: 14px; }
.harmony-tablet .harmony-theme-form .theme-mini-preview { height: 72px; border-radius: 8px; }
.harmony-tablet .harmony-setting-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin: 0 0 24px; padding: 0; }
.harmony-tablet .harmony-setting-facts > div { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.harmony-tablet .harmony-setting-facts dt { margin: 0 0 8px; color: var(--muted); font-size: 14px; }
.harmony-tablet .harmony-setting-facts dd { margin: 0; color: var(--ink); font-size: 16px; line-height: 1.6; overflow-wrap: anywhere; }
.harmony-tablet .overlay { padding: 24px; }
.harmony-tablet .modal { border-radius: 24px; width: min(680px, 100%); max-height: calc(100dvh - 48px); }
.harmony-tablet .modal.wide { width: min(960px, 100%); }
.harmony-tablet .modal-body { padding: 24px; }
.harmony-tablet .modal-footer { flex-wrap: wrap; }
.harmony-tablet .form-grid { gap: 18px; }
.harmony-tablet .form-group label { font-size: 14px; }
.harmony-tablet .form-actions { flex-wrap: wrap; }
.harmony-tablet :is(.an-view, .help-view) button { min-height: 48px; min-width: 48px; font-size: 14px; }
.harmony-tablet :is(.an-view, .help-view) input { min-height: 48px; font-size: 16px; }
.harmony-tablet :is(.an-controls, .an-kpi, .an-panel, .help-search-panel) { border-radius: 20px; }
.harmony-tablet .an-filter-form { flex-wrap: wrap; }
.harmony-tablet .an-filter-form label { white-space: nowrap; font-size: 14px; }
.harmony-tablet .an-period-nav { flex-wrap: wrap; }
.harmony-tablet :is(.an-page-head p, .an-kpi-label, .an-kpi-note, .an-range p) { font-size: 13px; }
.harmony-tablet .live-alert { gap: 12px; flex-wrap: wrap; padding: 14px 24px; }
.harmony-tablet .login-screen { min-height: 100dvh; grid-template-columns: 1fr; justify-items: center; align-content: center; gap: 8px; padding: 32px 24px; background: var(--bg); }
.harmony-tablet .login-screen .login-story { display: block; padding: 0; width: min(100%, 440px); background: none; }
.harmony-tablet .login-screen .login-story::after { display: none; }
.harmony-tablet .login-screen .login-story > :not(.brand) { display: none; }
.harmony-tablet .login-screen .login-story .brand { justify-content: center; width: 240px; height: 128px; padding: 14px 20px; margin: 0 auto 16px; border-radius: 20px; background: var(--brand-dark, #171c52); }
.harmony-tablet .login-screen .login-story .brand-wordmark { width: 180px; height: 90px; }
.harmony-tablet .login-screen .login-side { min-height: 0; padding: 0; width: min(100%, 440px); overflow-y: auto; }
.harmony-tablet :is(.login-card, .face-login-card) { width: min(100%, 440px); }
.harmony-tablet .login-card h2 { font-size: 30px; }
.harmony-tablet [data-harmony-maintenance] { user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.harmony-tablet .harmony-maintenance-hint { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.harmony-tablet .harmony-nav-scrim { position: fixed; inset: 0; border: 0; border-radius: 0; background: #16243e66; z-index: 29; }
.harmony-tablet .harmony-network { position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); transform: translateX(-50%); max-width: calc(100% - 32px); width: max-content; background: #fff3db; color: #624408; padding: 12px 20px; border: 1px solid #e3ca93; border-radius: 16px; z-index: 100; box-shadow: 0 4px 24px #14203918; font-size: 14px; }
.harmony-tablet [hidden] { display: none !important; }

/* The command board flows vertically on a tablet; it is never scaled to unreadable text. */
.harmony-tablet .bi-stage { width: 100%; height: auto; min-height: 100dvh; transform: none !important; position: relative; inset: auto; padding: 20px; }
.harmony-tablet .bi-header { margin: 0; padding: 16px; height: auto; min-height: 96px; gap: 24px; }
.harmony-tablet .bi-title { position: static; min-width: 0; gap: 12px; }
.harmony-tablet .bi-title h1 { font-size: 28px; }
.harmony-tablet .bi-title p { white-space: normal; }
.harmony-tablet .title-wing { width: 36px; }
.harmony-tablet .bi-kpis { height: auto; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.harmony-tablet .bi-kpi { min-height: 106px; height: auto; gap: 12px; }
.harmony-tablet .bi-kpi > div:last-child { min-width: 0; }
.harmony-tablet .bi-kpi-label { white-space: normal; overflow-wrap: anywhere; letter-spacing: 0; line-height: 1.4; }
.harmony-tablet :is(.bi-left, .bi-center, .bi-right) { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.harmony-tablet .bi-panel { height: auto; min-height: 240px; }
.harmony-tablet .bi-panel-title { flex-wrap: wrap; height: auto; min-height: 48px; gap: 8px; }
.harmony-tablet .bi-alerts-body { height: auto; min-height: 253px; overflow-x: auto; }
.harmony-tablet .bi-vital-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.harmony-tablet .bi-vital-foot { flex-wrap: wrap; gap: 12px; }
.harmony-tablet .bi-map-body { overflow: auto; }
.harmony-tablet .bi-map-body svg { min-width: 640px; }
.harmony-tablet .bi-grid { grid-template-columns: minmax(190px, 1fr) minmax(320px, 1.7fr); height: auto; }
.harmony-tablet .bi-right { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.harmony-tablet .bi-map-body { min-height: 360px; }
.harmony-tablet .bi-header-actions button, .harmony-tablet .bi-panel-link, .harmony-tablet #bi-retry { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; }
.harmony-tablet .bi-footer { gap: 16px; flex-wrap: wrap; }
@media (min-width: 1280px) { .harmony-tablet .bi-grid { grid-template-columns: minmax(210px, 1fr) minmax(400px, 1.65fr) minmax(230px, 1fr); } .harmony-tablet .bi-right { grid-column: auto; display: flex; } }
@media (min-width: 840px) { .harmony-tablet .harmony-nav-scrim { display: none; } .harmony-tablet .sidebar { transform: none; } }
@media (min-width: 840px) and (max-width: 1199px) {
  html.harmony-tablet { --sidebar: 240px; }
  .harmony-tablet .brand { padding: 18px; }
  .harmony-tablet .content { padding: 20px; }
  .harmony-tablet .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
  .harmony-tablet .kpi { padding: 14px; }
  .harmony-tablet .kpi-label { font-size: 13px; }
  .harmony-tablet .kpi-symbol { display: none; }
  .harmony-tablet .settings-layout { grid-template-columns: minmax(0, 1fr); }
  .harmony-tablet .settings-nav { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 8px; }
  .harmony-tablet .settings-nav :is(button, .settings-release-link) { flex: 0 0 auto; width: auto; min-width: 128px; }
}
@media (min-width: 840px) and (max-width: 1039px) {
  .harmony-tablet .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 839px) {
  html.harmony-tablet { --sidebar: 240px; }
  .harmony-tablet .sidebar { transform: translateX(-100%); transition: transform .2s ease; width: var(--sidebar); }
  .harmony-tablet .sidebar.open { transform: translateX(0); }
  .harmony-tablet .main-shell { margin-left: 0; }
  .harmony-tablet .mobile-menu { display: inline-flex; }
  .harmony-tablet .topbar { padding: 4px 16px; }
  .harmony-tablet .content { padding: 20px; }
  .harmony-tablet .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
  .harmony-tablet .kpi-grid { gap: 12px; }
  .harmony-tablet .kpi { padding: 14px; }
  .harmony-tablet .kpi-symbol { display: none; }
  .harmony-tablet .settings-layout { grid-template-columns: minmax(0, 1fr); }
  .harmony-tablet .settings-nav { display: flex; flex-wrap: nowrap; overflow-x: auto; gap: 8px; }
  .harmony-tablet .settings-nav :is(button, .settings-release-link) { flex: 0 0 auto; width: auto; min-width: 128px; }
  .harmony-tablet .login-screen { grid-template-columns: 1fr; }
  .harmony-tablet .login-story { display: none; }
  .harmony-tablet .login-side { min-height: 100dvh; padding: 24px; }
  .harmony-tablet .bi-header { flex-direction: column; gap: 16px; height: auto; }
  .harmony-tablet .bi-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .harmony-tablet .bi-grid { grid-template-columns: minmax(0, 1fr); }
  .harmony-tablet .bi-left, .harmony-tablet .bi-right { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .harmony-tablet .bi-center { grid-row: 1; }
}
@media (max-width: 599px) {
  .harmony-tablet .content { padding: 16px; }
  .harmony-tablet h1 { font-size: 24px; }
  .harmony-tablet .kpi-grid, .harmony-tablet .vital-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .harmony-tablet .head-actions { width: 100%; }
  .harmony-tablet .stats-three { grid-template-columns: 1fr; }
  .harmony-tablet .summary-card .summary-note { font-size: 12px; }
  .harmony-tablet .overlay { padding: 8px; align-items: center; }
  .harmony-tablet .modal { max-height: calc(100dvh - 16px); border-radius: 20px; }
  .harmony-tablet .modal-body, .harmony-tablet .modal-head, .harmony-tablet .modal-footer { padding: 16px; }
  .harmony-tablet .form-grid { grid-template-columns: 1fr; }
  .harmony-tablet .harmony-setting-facts { grid-template-columns: 1fr; }
  .harmony-tablet .harmony-theme-form .theme-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .harmony-tablet .toolbar :is(.field, input[type="date"]) { max-width: none; }
  .harmony-tablet .bi-stage { padding: 12px; }
  .harmony-tablet .bi-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .harmony-tablet .bi-left, .harmony-tablet .bi-right { grid-template-columns: minmax(0, 1fr); }
  .harmony-tablet .bi-title h1 { font-size: 24px; }
  .harmony-tablet .title-wing { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .harmony-tablet *, .harmony-tablet *:before, .harmony-tablet *:after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
