    /* OD-LAYOUT-PRIMITIVES v1 — structure only: display, flex/grid, overflow, wrapping, ratio, geometry.
       Put this @layer first; product CSS outside the layer wins ordinary layout rules.
       Native hidden and closed-dialog states take precedence over component display rules. */
    @layer od-layout {
      [hidden]:not([hidden="until-found" i]) { display: none !important; }
      dialog:not([open]) { display: none !important; }

      :where(.od-stack,.od-row,.od-row-top,.od-cluster,.od-grid,.od-field,.od-stat,.od-cell,.od-tile) > :where(*) { min-width: 0; }

      /* containers */
      .od-stack   { display: flex; flex-direction: column; gap: var(--od-gap, 8px); }
      .od-row     { display: flex; align-items: center; gap: var(--od-gap, 8px); }
      .od-row-top { display: flex; align-items: flex-start; gap: var(--od-gap, 8px); }
      .od-cluster { display: flex; flex-wrap: wrap; align-items: center; gap: var(--od-gap, 8px); }
      .od-fill    { flex: 1 1 0; min-width: 0; }
      .od-fixed   { flex: none; }
      .od-grid    { display: grid; gap: var(--od-gap, 12px); grid-template-columns: repeat(var(--od-cols, 3), minmax(0, 1fr)); }

      /* stacked information: each piece is its own line — never sibling inline spans */
      .od-stat, .od-field, .od-cell { display: grid; gap: var(--od-gap, 2px); }
      :where(.od-stat,.od-field,.od-cell) > :where(*) { display: block; }
      .od-tile { display: grid; grid-template-rows: auto 1fr; }
      :where(.od-tile) > :where(*) { display: block; }

      .od-media { display: block; width: 100%; height: auto; aspect-ratio: var(--od-ratio, auto); }
      .od-media-cover { object-fit: cover; }

      .od-icon { display: inline-block; inline-size: var(--od-icon-size, 1em); block-size: var(--od-icon-size, 1em); flex: none; }

      .od-truncate { display: block; max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
      .od-clamp-2, .od-clamp-3 { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
      .od-clamp-2 { -webkit-line-clamp: 2; }
      .od-clamp-3 { -webkit-line-clamp: 3; }
      .od-lines-2 { min-height: calc(2 * 1.4em); }
      .od-nowrap  { white-space: nowrap; }
      .od-keep    { word-break: keep-all; overflow-wrap: anywhere; }

      .od-screen { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: 100%; }
      .od-scroll { overflow-y: auto; overscroll-behavior: contain; min-height: 0; }

      .od-rail { display: flex; gap: var(--od-gap, 8px); overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none;
                 padding-inline: var(--od-rail-pad, 16px); scroll-padding-inline: var(--od-rail-pad, 16px); }
      .od-rail::-webkit-scrollbar { display: none; }
      :where(.od-rail) > :where(*) { flex: none; scroll-snap-align: start; }
      :where(.od-rail) > :where(:last-child) { margin-inline-end: var(--od-rail-pad, 16px); }

      .od-spacer { flex: none; visibility: hidden; pointer-events: none; }
      .od-touch  { min-width: 44px; min-height: 44px; }
    }
    :root [hidden]:where(:not([hidden="until-found" i])) { display: none; }
    /* /OD-LAYOUT-PRIMITIVES v1 */

    /* Shell tokens & presentation */
    :root {
      --phone-screen-width: 390px;
      --phone-screen-height: 844px;
      --phone-bezel: 10px;
      --phone-outer-radius: 52px;
      --phone-screen-radius: 42px;
      --phone-safe-top: 50px;
      --phone-safe-bottom: 29px;
      --phone-system-fg: #0f172a;
      --phone-screen-bg: #f8fafc;
      --phone-stage-bg: #e2e8f0;

      /* Product Design Tokens */
      --primary: #1d4ed8;
      --primary-hover: #1e40af;
      --primary-light: #eff6ff;
      --primary-ring: rgba(29, 78, 216, 0.16);

      --cyan-600: #0891b2;
      --cyan-50: #ecfeff;

      --emerald-600: #059669;
      --emerald-500: #10b981;
      --emerald-50: #ecfdf5;

      --amber-600: #d97706;
      --amber-50: #fffbeb;

      --rose-600: #dc2626;
      --rose-50: #fef2f2;

      --slate-900: #0f172a;
      --slate-800: #1e293b;
      --slate-700: #334155;
      --slate-600: #475569;
      --slate-500: #64748b;
      --slate-400: #94a3b8;
      --slate-300: #cbd5e1;
      --slate-200: #e2e8f0;
      --slate-100: #f1f5f9;
      --slate-50: #f8fafc;
      --white: #ffffff;

      --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
      --radius-sm: 8px;
      --radius-md: 12px;
      --radius-lg: 16px;
      --radius-full: 9999px;

      --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
      --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, 0.08);
      --shadow-lg: 0 12px 28px -4px rgba(15, 23, 42, 0.12);
      --shadow-modal: 0 24px 48px -12px rgba(15, 23, 42, 0.22);
    }

    * { box-sizing: border-box; }
    html, body { margin: 0; min-height: 100%; }
    body {
      min-height: 100dvh;
      display: grid;
      place-items: center;
      padding: 24px;
      background:
        radial-gradient(circle at 50% 12%, rgba(255,255,255,0.92), transparent 32%),
        var(--phone-stage-bg, #e2e8f0);
      color: var(--slate-900);
      font-family: var(--font-family);
      -webkit-font-smoothing: antialiased;
    }

    /* Outer Handset Frame */
    .phone-frame {
      position: relative;
      width: calc(var(--phone-screen-width, 390px) + var(--phone-bezel, 10px) * 2);
      height: calc(var(--phone-screen-height, 844px) + var(--phone-bezel, 10px) * 2);
      padding: var(--phone-bezel, 10px);
      border-radius: var(--phone-outer-radius, 52px);
      background:
        linear-gradient(145deg, rgba(255,255,255,.22), transparent 18%),
        linear-gradient(160deg, #383c44 0%, #1e2025 48%, #0d0e12 100%);
      box-shadow:
        inset 0 0 0 1px rgba(255,255,255,.14),
        inset 0 0 0 2px rgba(0,0,0,.85),
        0 32px 64px -18px rgba(15,23,42,.45),
        0 12px 24px -8px rgba(15,23,42,.28);
      isolation: isolate;
    }

    .phone-frame::before,
    .phone-frame::after {
      content: "";
      position: absolute;
      z-index: -1;
      top: 96px;
      bottom: 96px;
      width: 2px;
      background: linear-gradient(to bottom, transparent, rgba(255,255,255,.14) 16%, transparent 30%, transparent 72%, rgba(255,255,255,.08) 88%, transparent);
    }
    .phone-frame::before { left: 0; }
    .phone-frame::after { right: 0; }

    .hardware-button {
      position: absolute;
      width: 4px;
      border-radius: 3px;
      background: linear-gradient(90deg, #090a0d, #2f323a 60%, #090a0d);
      box-shadow: inset 0 1px rgba(255,255,255,.08);
    }
    .hardware-button.volume { left: -3px; top: 220px; height: 84px; }
    .hardware-button.power { right: -3px; top: 268px; height: 80px; }

    /* Phone Screen container */
    .phone-screen {
      position: relative;
      width: var(--phone-screen-width, 390px);
      height: var(--phone-screen-height, 844px);
      overflow: hidden;
      border-radius: var(--phone-screen-radius, 42px);
      background: var(--phone-screen-bg, #f8fafc);
      box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
    }

    /* System Status Bar */
    .status-bar {
      position: absolute;
      z-index: 40;
      inset: 0 0 auto;
      height: var(--phone-safe-top, 50px);
      display: grid;
      grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr);
      align-items: start;
      padding: 14px 22px 0;
      color: var(--phone-system-fg, #0f172a);
      pointer-events: none;
    }
    .status-time {
      justify-self: start;
      display: flex;
      align-items: center;
      height: 15px;
      font-size: 14px;
      font-weight: 600;
      line-height: 1;
      letter-spacing: -0.01em;
    }
    .status-cutout-zone { width: 56px; }
    .status-icons {
      justify-self: end;
      display: inline-flex;
      align-items: center;
      height: 15px;
      gap: 6px;
    }
    .status-icons svg {
      display: block;
      flex: none;
      fill: none;
      stroke: currentColor;
      stroke-width: 1.4;
      stroke-linecap: round;
      stroke-linejoin: round;
    }
    .status-icons .connectivity { width: 15px; height: 12px; }
    .status-icons .wifi { width: 15px; height: 12px; }
    .status-icons .battery { width: 19px; height: 11px; }

    .camera-dot {
      position: absolute;
      z-index: 45;
      top: 13px;
      left: 50%;
      width: 10px;
      height: 10px;
      transform: translateX(-50%);
      border-radius: 50%;
      background: radial-gradient(circle at 38% 35%, #344154 0 12%, #0a0c10 34%, #000 76%);
      box-shadow: 0 0 0 1px rgba(255,255,255,.06);
      pointer-events: none;
    }

    .gesture-indicator {
      position: absolute;
      z-index: 45;
      left: 50%;
      bottom: 8px;
      width: 96px;
      height: 4px;
      transform: translateX(-50%);
      border-radius: 99px;
      background: var(--slate-900);
      opacity: 0.85;
      pointer-events: none;
    }

    /* App Shell Root inside Phone */
    .phone-content {
      position: absolute;
      inset: 0;
      display: flex;
      flex-direction: column;
      overflow: hidden;
      background: var(--slate-50);
      padding-top: var(--phone-safe-top, 50px);
    }

    /* Mini Program Header & Capsule */
    .wx-header {
      flex: none;
      height: 46px;
      padding: 0 16px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      background: rgba(255, 255, 255, 0.95);
      backdrop-filter: blur(12px);
      border-bottom: 1px solid rgba(226, 232, 240, 0.7);
      z-index: 20;
    }
    .wx-title-wrap {
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .wx-brand-logo {
      width: 22px;
      height: 22px;
      border-radius: 6px;
      background: linear-gradient(135deg, var(--primary) 0%, #3b82f6 100%);
      display: flex;
      align-items: center;
      justify-content: center;
      color: #fff;
    }
    .wx-brand-logo svg {
      width: 14px;
      height: 14px;
      fill: none;
      stroke: currentColor;
      stroke-width: 2;
    }
    .wx-header-title {
      font-size: 15px;
      font-weight: 700;
      color: var(--slate-900);
      letter-spacing: -0.01em;
    }
    .wx-header-badge {
      font-size: 10px;
      font-weight: 600;
      color: var(--primary);
      background: var(--primary-light);
      padding: 2px 6px;
      border-radius: 4px;
      line-height: 1.2;
    }

    /* Official WeChat Capsule Button */
    .wx-capsule {
      display: flex;
      align-items: center;
      height: 30px;
      padding: 0 4px;
      background: rgba(255, 255, 255, 0.9);
      border: 1px solid rgba(203, 213, 225, 0.9);
      border-radius: 15px;
      box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    }
    .wx-capsule-btn {
      background: none;
      border: none;
      padding: 0 8px;
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--slate-800);
      cursor: pointer;
      border-radius: 12px;
      transition: background-color 0.15s;
    }
    .wx-capsule-btn:active {
      background: var(--slate-100);
    }
    .wx-capsule-divider {
      width: 1px;
      height: 14px;
      background: var(--slate-300);
    }

    /* Views Main Scrollable Container */
    .app-main {
      flex: 1;
      overflow-y: auto;
      overflow-x: hidden;
      overscroll-behavior: contain;
      -webkit-overflow-scrolling: touch;
      scrollbar-width: none;
      padding-bottom: 24px;
    }
    .app-main::-webkit-scrollbar { display: none; }

    /* Bottom Tab Bar */
    .wx-tabbar {
      flex: none;
      height: calc(52px + var(--phone-safe-bottom, 29px));
      padding-bottom: var(--phone-safe-bottom, 29px);
      background: rgba(255, 255, 255, 0.96);
      backdrop-filter: blur(16px);
      border-top: 1px solid var(--slate-200);
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      z-index: 25;
    }
    .wx-tab-item {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 3px;
      border: none;
      background: none;
      cursor: pointer;
      color: var(--slate-500);
      transition: color 0.15s;
      padding-top: 6px;
      position: relative;
    }
    .wx-tab-item.active {
      color: var(--primary);
    }
    .wx-tab-icon {
      width: 22px;
      height: 22px;
      position: relative;
    }
    .wx-tab-icon svg {
      width: 100%;
      height: 100%;
      fill: none;
      stroke: currentColor;
      stroke-width: 1.8;
      stroke-linecap: round;
      stroke-linejoin: round;
    }
    .wx-tab-label {
      font-size: 11px;
      font-weight: 500;
      line-height: 1;
    }
    .wx-tab-badge {
      position: absolute;
      top: -3px;
      right: -8px;
      background: var(--rose-600);
      color: #fff;
      font-size: 10px;
      font-weight: 700;
      min-width: 16px;
      height: 16px;
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 0 4px;
      border: 1.5px solid #fff;
    }

    /* Screen Tab Panels */
    .tab-panel {
      display: none;
      animation: fadeIn 0.2s ease-out;
    }
    .tab-panel.active {
      display: block;
    }
    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(3px); }
      to { opacity: 1; transform: translateY(0); }
    }

    /* Section: Search & Quick Banner */
    .search-bar-wrap {
      padding: 12px 16px 8px;
    }
    .search-input-box {
      display: flex;
      align-items: center;
      gap: 8px;
      background: var(--white);
      border: 1px solid var(--slate-200);
      border-radius: var(--radius-md);
      padding: 8px 12px;
      box-shadow: var(--shadow-sm);
      transition: border-color 0.15s, box-shadow 0.15s;
    }
    .search-input-box:focus-within {
      border-color: var(--primary);
      box-shadow: 0 0 0 3px var(--primary-ring);
    }
    .search-icon {
      color: var(--slate-400);
      width: 18px;
      height: 18px;
      flex-shrink: 0;
    }
    .search-input {
      border: none;
      background: transparent;
      outline: none;
      font-size: 13px;
      color: var(--slate-900);
      width: 100%;
    }
    .search-input::placeholder {
      color: var(--slate-400);
    }
    .search-clear-btn {
      background: none;
      border: none;
      padding: 2px;
      color: var(--slate-400);
      cursor: pointer;
      display: none;
    }

    /* Quick Tip Ticker */
    .notice-ticker {
      margin: 0 16px 10px;
      padding: 6px 12px;
      border-radius: var(--radius-sm);
      background: #eff6ff;
      border: 1px solid #dbeafe;
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 11px;
      color: #1e40af;
    }
    .notice-ticker svg {
      width: 14px;
      height: 14px;
      flex-shrink: 0;
      color: var(--primary);
    }

    /* 7-Day Date Picker Strip */
    .date-strip-section {
      margin-bottom: 12px;
    }
    .date-strip-header {
      padding: 0 16px 6px;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    .date-strip-title {
      font-size: 12px;
      font-weight: 700;
      color: var(--slate-700);
      letter-spacing: 0.02em;
      text-transform: uppercase;
    }
    .date-strip-today-badge {
      font-size: 11px;
      color: var(--primary);
      font-weight: 600;
    }

    .date-scroll-row {
      display: flex;
      gap: 8px;
      overflow-x: auto;
      padding: 2px 16px 6px;
      scrollbar-width: none;
      -webkit-overflow-scrolling: touch;
    }
    .date-scroll-row::-webkit-scrollbar { display: none; }

    .date-card-btn {
      flex: 0 0 54px;
      padding: 8px 4px 6px;
      background: var(--white);
      border: 1px solid var(--slate-200);
      border-radius: var(--radius-md);
      display: flex;
      flex-direction: column;
      align-items: center;
      cursor: pointer;
      transition: all 0.15s ease;
      box-shadow: var(--shadow-sm);
    }
    .date-card-btn .date-day {
      font-size: 11px;
      color: var(--slate-500);
      margin-bottom: 2px;
      font-weight: 500;
    }
    .date-card-btn .date-num {
      font-size: 16px;
      font-weight: 700;
      color: var(--slate-900);
      line-height: 1.2;
    }
    .date-card-btn .date-tag {
      font-size: 9px;
      color: var(--emerald-600);
      background: var(--emerald-50);
      padding: 1px 4px;
      border-radius: 4px;
      margin-top: 4px;
      transform: scale(0.9);
    }
    .date-card-btn.active {
      background: var(--primary);
      border-color: var(--primary);
      box-shadow: 0 4px 10px rgba(29, 78, 216, 0.3);
    }
    .date-card-btn.active .date-day { color: rgba(255, 255, 255, 0.85); }
    .date-card-btn.active .date-num { color: #ffffff; }
    .date-card-btn.active .date-tag {
      background: rgba(255, 255, 255, 0.25);
      color: #ffffff;
    }

    /* Filter Chips Bar */
    .filter-section {
      padding: 0 16px 12px;
    }
    .filter-chips-row {
      display: flex;
      gap: 6px;
      overflow-x: auto;
      scrollbar-width: none;
      padding-bottom: 2px;
    }
    .filter-chips-row::-webkit-scrollbar { display: none; }
    .filter-chip {
      flex: none;
      padding: 6px 12px;
      background: var(--white);
      border: 1px solid var(--slate-200);
      border-radius: var(--radius-full);
      font-size: 12px;
      font-weight: 500;
      color: var(--slate-700);
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 4px;
      transition: all 0.15s;
    }
    .filter-chip.active {
      background: #eff6ff;
      border-color: var(--primary);
      color: var(--primary);
      font-weight: 600;
    }
    .filter-chip svg {
      width: 12px;
      height: 12px;
    }

    /* Secondary Filter Selector Row */
    .filter-meta-bar {
      padding: 0 16px 8px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 12px;
      color: var(--slate-500);
    }
    .filter-meta-count strong {
      color: var(--slate-900);
      font-weight: 700;
    }
    .filter-meta-reset {
      background: none;
      border: none;
      color: var(--primary);
      font-size: 12px;
      cursor: pointer;
      padding: 0;
    }

    /* Meeting Room Card List */
    .room-list-container {
      padding: 0 16px;
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .room-card {
      background: var(--white);
      border: 1px solid var(--slate-200);
      border-radius: var(--radius-lg);
      padding: 14px;
      box-shadow: var(--shadow-sm);
      transition: border-color 0.15s, box-shadow 0.15s;
    }
    .room-card:active {
      border-color: var(--slate-300);
    }

    .room-card-top {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      margin-bottom: 8px;
    }
    .room-name-group {
      display: flex;
      flex-direction: column;
      gap: 2px;
    }
    .room-title-row {
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .room-title {
      font-size: 16px;
      font-weight: 700;
      color: var(--slate-900);
    }
    .room-floor-badge {
      font-size: 11px;
      font-weight: 600;
      color: var(--slate-600);
      background: var(--slate-100);
      padding: 2px 6px;
      border-radius: 4px;
    }
    .room-cap-info {
      font-size: 12px;
      color: var(--slate-500);
      display: flex;
      align-items: center;
      gap: 4px;
    }

    /* Status Pills */
    .status-pill {
      display: inline-flex;
      align-items: center;
      gap: 4px;
      font-size: 11px;
      font-weight: 600;
      padding: 3px 8px;
      border-radius: var(--radius-full);
      line-height: 1.2;
    }
    .status-pill.free {
      background: var(--emerald-50);
      color: var(--emerald-600);
    }
    .status-pill.busy {
      background: var(--amber-50);
      color: var(--amber-600);
    }
    .status-pill.full {
      background: var(--rose-50);
      color: var(--rose-600);
    }
    .status-dot {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: currentColor;
    }

    /* Device tags */
    .room-devices-row {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-bottom: 12px;
    }
    .device-tag {
      font-size: 11px;
      color: var(--slate-600);
      background: #f8fafc;
      border: 1px solid var(--slate-200);
      padding: 2px 7px;
      border-radius: 4px;
      display: flex;
      align-items: center;
      gap: 4px;
    }
    .device-tag svg {
      width: 12px;
      height: 12px;
      color: var(--slate-500);
    }

    /* Availability Timeline Heatmap */
    .timeline-widget {
      background: var(--slate-50);
      border: 1px solid var(--slate-200);
      border-radius: var(--radius-sm);
      padding: 8px 10px;
      margin-bottom: 12px;
    }
    .timeline-header {
      display: flex;
      justify-content: space-between;
      font-size: 11px;
      color: var(--slate-500);
      margin-bottom: 6px;
    }
    .timeline-bar {
      display: flex;
      height: 12px;
      border-radius: 6px;
      overflow: hidden;
      background: #e2e8f0;
      gap: 1.5px;
    }
    .timeline-segment {
      flex: 1;
      height: 100%;
      transition: opacity 0.15s;
      position: relative;
    }
    .timeline-segment.free {
      background: #10b981;
    }
    .timeline-segment.booked {
      background: #64748b;
    }
    .timeline-segment.partial {
      background: #f59e0b;
    }
    .timeline-scale {
      display: flex;
      justify-content: space-between;
      font-size: 9px;
      color: var(--slate-400);
      margin-top: 4px;
      font-family: monospace;
    }

    /* Card Actions */
    .room-card-actions {
      display: flex;
      gap: 8px;
    }
    .btn-secondary {
      flex: 1;
      height: 36px;
      border: 1px solid var(--slate-200);
      background: var(--white);
      color: var(--slate-700);
      font-size: 13px;
      font-weight: 600;
      border-radius: var(--radius-md);
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 4px;
      cursor: pointer;
      transition: background 0.15s;
    }
    .btn-secondary:active {
      background: var(--slate-100);
    }
    .btn-primary {
      flex: 1.4;
      height: 36px;
      border: none;
      background: var(--primary);
      color: var(--white);
      font-size: 13px;
      font-weight: 600;
      border-radius: var(--radius-md);
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 4px;
      cursor: pointer;
      box-shadow: 0 2px 6px rgba(29, 78, 216, 0.25);
      transition: background 0.15s, transform 0.05s;
    }
    .btn-primary:active {
      background: var(--primary-hover);
      transform: scale(0.99);
    }
    .btn-primary.disabled,
    .btn-primary:disabled {
      background: var(--slate-300);
      box-shadow: none;
      cursor: not-allowed;
    }

    /* TAB 2: SCHEDULE / MY BOOKINGS */
    .schedule-header-tabs {
      display: flex;
      padding: 12px 16px 8px;
      background: var(--white);
      border-bottom: 1px solid var(--slate-200);
      gap: 8px;
    }
    .subtab-btn {
      flex: 1;
      padding: 7px 0;
      border: none;
      background: none;
      font-size: 13px;
      font-weight: 500;
      color: var(--slate-500);
      cursor: pointer;
      position: relative;
      border-radius: var(--radius-sm);
      transition: all 0.15s;
    }
    .subtab-btn.active {
      font-weight: 700;
      color: var(--primary);
      background: #eff6ff;
    }
    .subtab-btn .badge-num {
      display: inline-block;
      font-size: 10px;
      padding: 0 5px;
      border-radius: 9px;
      background: var(--slate-200);
      color: var(--slate-600);
      margin-left: 4px;
    }
    .subtab-btn.active .badge-num {
      background: var(--primary);
      color: #fff;
    }

    .booking-cards-list {
      padding: 16px;
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .booking-card {
      background: var(--white);
      border: 1px solid var(--slate-200);
      border-radius: var(--radius-lg);
      padding: 14px;
      box-shadow: var(--shadow-sm);
      position: relative;
    }
    .booking-card.ongoing {
      border-left: 4px solid var(--emerald-500);
    }
    .booking-card.upcoming {
      border-left: 4px solid var(--primary);
    }
    .booking-card.completed {
      border-left: 4px solid var(--slate-400);
      opacity: 0.85;
    }

    .booking-time-row {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 8px;
    }
    .booking-time-badge {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 13px;
      font-weight: 700;
      color: var(--slate-900);
    }
    .booking-time-badge svg {
      width: 14px;
      height: 14px;
      color: var(--primary);
    }
    .booking-status-tag {
      font-size: 11px;
      font-weight: 600;
      padding: 2px 7px;
      border-radius: 4px;
    }
    .booking-status-tag.wait-sign {
      background: var(--amber-50);
      color: var(--amber-600);
    }
    .booking-status-tag.active {
      background: var(--emerald-50);
      color: var(--emerald-600);
    }
    .booking-status-tag.done {
      background: var(--slate-100);
      color: var(--slate-500);
    }

    .booking-title {
      font-size: 15px;
      font-weight: 700;
      color: var(--slate-900);
      margin-bottom: 6px;
      line-height: 1.3;
    }
    .booking-room-info {
      font-size: 12px;
      color: var(--slate-600);
      margin-bottom: 10px;
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .booking-room-info strong {
      color: var(--slate-800);
    }

    .booking-attendees-strip {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 11px;
      color: var(--slate-500);
      background: var(--slate-50);
      padding: 6px 10px;
      border-radius: var(--radius-sm);
      margin-bottom: 12px;
    }
    .avatar-stack {
      display: flex;
      margin-right: 4px;
    }
    .mini-avatar {
      width: 20px;
      height: 20px;
      border-radius: 50%;
      background: #cbd5e1;
      border: 1.5px solid #fff;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 9px;
      font-weight: 700;
      color: var(--slate-700);
      margin-left: -5px;
    }
    .mini-avatar:first-child { margin-left: 0; }

    .booking-card-footer {
      display: flex;
      justify-content: space-between;
      align-items: center;
      border-top: 1px solid var(--slate-100);
      padding-top: 10px;
      gap: 8px;
    }
    .btn-text-danger {
      background: none;
      border: none;
      color: var(--rose-600);
      font-size: 12px;
      font-weight: 500;
      cursor: pointer;
      padding: 4px 6px;
    }
    .btn-group-right {
      display: flex;
      gap: 6px;
    }
    .btn-sm-action {
      height: 30px;
      padding: 0 12px;
      font-size: 12px;
      font-weight: 600;
      border-radius: var(--radius-md);
      display: flex;
      align-items: center;
      gap: 4px;
      cursor: pointer;
      border: none;
    }
    .btn-sm-action.primary {
      background: var(--primary);
      color: #fff;
    }
    .btn-sm-action.outline {
      background: #fff;
      border: 1px solid var(--slate-200);
      color: var(--slate-700);
    }

    /* TAB 3: MY SPACE */
    .space-container {
      padding: 16px;
      display: flex;
      flex-direction: column;
      gap: 14px;
    }

    .user-profile-card {
      background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 100%);
      border-radius: var(--radius-lg);
      padding: 16px;
      color: #fff;
      box-shadow: 0 6px 16px rgba(29, 78, 216, 0.28);
      display: flex;
      align-items: center;
      gap: 12px;
    }
    .user-avatar-circle {
      width: 48px;
      height: 48px;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.2);
      border: 2px solid rgba(255, 255, 255, 0.4);
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 18px;
      font-weight: 700;
    }
    .user-details {
      flex: 1;
    }
    .user-name-row {
      display: flex;
      align-items: center;
      gap: 6px;
      margin-bottom: 2px;
    }
    .user-name {
      font-size: 16px;
      font-weight: 700;
    }
    .user-tag {
      font-size: 10px;
      background: rgba(255, 255, 255, 0.2);
      padding: 2px 6px;
      border-radius: 4px;
    }
    .user-dept {
      font-size: 12px;
      color: rgba(255, 255, 255, 0.85);
    }

    .quota-card {
      background: var(--white);
      border: 1px solid var(--slate-200);
      border-radius: var(--radius-lg);
      padding: 16px;
      box-shadow: var(--shadow-sm);
    }
    .quota-card-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 12px;
    }
    .quota-title {
      font-size: 13px;
      font-weight: 700;
      color: var(--slate-900);
    }
    .quota-status-badge {
      font-size: 11px;
      font-weight: 600;
      color: var(--emerald-600);
      background: var(--emerald-50);
      padding: 2px 7px;
      border-radius: 4px;
    }
    .quota-stats-row {
      display: flex;
      justify-content: space-between;
      margin-bottom: 10px;
    }
    .quota-stat-box {
      display: flex;
      flex-direction: column;
    }
    .quota-stat-label {
      font-size: 11px;
      color: var(--slate-500);
      margin-bottom: 2px;
    }
    .quota-stat-value {
      font-size: 18px;
      font-weight: 800;
      color: var(--slate-900);
    }
    .quota-stat-value small {
      font-size: 12px;
      font-weight: 500;
      color: var(--slate-500);
    }
    .quota-progress-track {
      height: 8px;
      background: var(--slate-100);
      border-radius: 4px;
      overflow: hidden;
      margin-bottom: 6px;
    }
    .quota-progress-fill {
      height: 100%;
      background: linear-gradient(90deg, #3b82f6, var(--primary));
      border-radius: 4px;
      transition: width 0.3s ease;
    }
    .quota-hint {
      font-size: 10px;
      color: var(--slate-400);
    }

    /* Space Quick Tools Grid */
    .tools-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 10px;
    }
    .tool-tile {
      background: var(--white);
      border: 1px solid var(--slate-200);
      border-radius: var(--radius-md);
      padding: 12px;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 10px;
      box-shadow: var(--shadow-sm);
      transition: all 0.15s;
    }
    .tool-tile:active {
      transform: scale(0.98);
      background: var(--slate-50);
    }
    .tool-icon-box {
      width: 36px;
      height: 36px;
      border-radius: var(--radius-sm);
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }
    .tool-icon-box.blue { background: #eff6ff; color: var(--primary); }
    .tool-icon-box.green { background: #ecfdf5; color: var(--emerald-600); }
    .tool-icon-box.cyan { background: #ecfeff; color: var(--cyan-600); }
    .tool-icon-box.amber { background: #fffbeb; color: var(--amber-600); }
    .tool-icon-box svg { width: 18px; height: 18px; }
    .tool-info h4 { margin: 0 0 2px; font-size: 13px; font-weight: 700; color: var(--slate-900); }
    .tool-info p { margin: 0; font-size: 10px; color: var(--slate-500); }

    /* Preference List Group */
    .pref-group {
      background: var(--white);
      border: 1px solid var(--slate-200);
      border-radius: var(--radius-lg);
      overflow: hidden;
      box-shadow: var(--shadow-sm);
    }
    .pref-item {
      padding: 12px 14px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      border-bottom: 1px solid var(--slate-100);
      font-size: 13px;
      color: var(--slate-800);
    }
    .pref-item:last-child { border-bottom: none; }
    .switch-toggle {
      position: relative;
      width: 40px;
      height: 22px;
      background: #cbd5e1;
      border-radius: 11px;
      cursor: pointer;
      transition: background 0.2s;
    }
    .switch-toggle.on {
      background: var(--primary);
    }
    .switch-knob {
      position: absolute;
      top: 2px;
      left: 2px;
      width: 18px;
      height: 18px;
      background: #fff;
      border-radius: 50%;
      box-shadow: 0 1px 3px rgba(0,0,0,0.2);
      transition: transform 0.2s;
    }
    .switch-toggle.on .switch-knob {
      transform: translateX(18px);
    }

    /* MODALS & BOTTOM SHEETS (Inside phone-screen) */
    .sheet-overlay {
      position: absolute;
      inset: 0;
      background: rgba(15, 23, 42, 0.6);
      backdrop-filter: blur(4px);
      z-index: 50;
      display: flex;
      flex-direction: column;
      justify-content: flex-end;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.25s ease;
    }
    .sheet-overlay.active {
      opacity: 1;
      pointer-events: auto;
    }
    .sheet-modal {
      background: var(--white);
      border-radius: 20px 20px 0 0;
      padding: 16px 18px calc(16px + var(--phone-safe-bottom, 29px));
      max-height: 85%;
      display: flex;
      flex-direction: column;
      transform: translateY(100%);
      transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
      box-shadow: var(--shadow-modal);
    }
    .sheet-overlay.active .sheet-modal {
      transform: translateY(0);
    }

    .sheet-handle {
      width: 36px;
      height: 4px;
      background: var(--slate-300);
      border-radius: 2px;
      margin: 0 auto 12px;
    }
    .sheet-header {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      margin-bottom: 14px;
    }
    .sheet-title-box h3 {
      margin: 0 0 2px;
      font-size: 17px;
      font-weight: 700;
      color: var(--slate-900);
    }
    .sheet-title-box p {
      margin: 0;
      font-size: 12px;
      color: var(--slate-500);
    }
    .sheet-close-btn {
      width: 28px;
      height: 28px;
      border-radius: 50%;
      background: var(--slate-100);
      border: none;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      color: var(--slate-600);
    }
    .sheet-body {
      overflow-y: auto;
      scrollbar-width: none;
      display: flex;
      flex-direction: column;
      gap: 14px;
      padding-bottom: 12px;
    }
    .sheet-body::-webkit-scrollbar { display: none; }

    /* Time Slot Interactive Selector */
    .form-group-label {
      font-size: 13px;
      font-weight: 700;
      color: var(--slate-900);
      margin-bottom: 6px;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    .form-group-label small {
      font-size: 11px;
      font-weight: normal;
      color: var(--primary);
    }

    .slot-picker-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 6px;
    }
    .slot-pill-btn {
      height: 32px;
      border: 1px solid var(--slate-200);
      background: var(--white);
      border-radius: var(--radius-sm);
      font-size: 11px;
      font-weight: 500;
      color: var(--slate-800);
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.12s;
    }
    .slot-pill-btn:hover:not(:disabled) {
      border-color: var(--primary);
      color: var(--primary);
    }
    .slot-pill-btn.selected {
      background: var(--primary);
      border-color: var(--primary);
      color: #fff;
      font-weight: 700;
      box-shadow: 0 2px 6px rgba(29, 78, 216, 0.3);
    }
    .slot-pill-btn:disabled,
    .slot-pill-btn.occupied {
      background: var(--slate-100);
      border-color: var(--slate-200);
      color: var(--slate-400);
      cursor: not-allowed;
      text-decoration: line-through;
    }

    .slot-summary-box {
      background: #eff6ff;
      border: 1px solid #bfdbfe;
      border-radius: var(--radius-sm);
      padding: 8px 12px;
      font-size: 12px;
      color: #1e40af;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .form-input-text {
      width: 100%;
      height: 38px;
      border: 1px solid var(--slate-300);
      border-radius: var(--radius-md);
      padding: 0 12px;
      font-size: 13px;
      color: var(--slate-900);
      outline: none;
      transition: border-color 0.15s;
    }
    .form-input-text:focus {
      border-color: var(--primary);
      box-shadow: 0 0 0 3px var(--primary-ring);
    }

    /* Preset Chips */
    .preset-chips-row {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-top: 6px;
    }
    .preset-chip {
      font-size: 11px;
      background: var(--slate-100);
      border: 1px solid var(--slate-200);
      padding: 3px 8px;
      border-radius: 4px;
      color: var(--slate-700);
      cursor: pointer;
    }
    .preset-chip:active {
      background: var(--slate-200);
    }

    /* Radio Group */
    .radio-card-group {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 6px;
    }
    .radio-card {
      border: 1px solid var(--slate-200);
      border-radius: var(--radius-sm);
      padding: 8px 6px;
      text-align: center;
      cursor: pointer;
      font-size: 11px;
      color: var(--slate-700);
      font-weight: 500;
      transition: all 0.15s;
    }
    .radio-card.active {
      border-color: var(--primary);
      background: var(--primary-light);
      color: var(--primary);
      font-weight: 700;
    }

    /* Attendees Selection */
    .attendee-tag-cloud {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      align-items: center;
    }
    .attendee-pill {
      font-size: 11px;
      background: var(--slate-100);
      border: 1px solid var(--slate-200);
      padding: 3px 8px;
      border-radius: var(--radius-full);
      display: flex;
      align-items: center;
      gap: 4px;
      color: var(--slate-800);
    }
    .attendee-pill.self {
      background: #eff6ff;
      border-color: #bfdbfe;
      color: var(--primary);
      font-weight: 600;
    }
    .attendee-add-btn {
      font-size: 11px;
      background: #fff;
      border: 1px dashed var(--slate-300);
      padding: 3px 8px;
      border-radius: var(--radius-full);
      color: var(--primary);
      cursor: pointer;
    }

    /* Conflict Alert */
    .conflict-banner {
      background: var(--rose-50);
      border: 1px solid #fecaca;
      border-radius: var(--radius-sm);
      padding: 8px 12px;
      font-size: 11px;
      color: var(--rose-600);
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .sheet-footer-btn {
      margin-top: 4px;
      width: 100%;
      height: 44px;
      background: var(--primary);
      color: #fff;
      border: none;
      border-radius: var(--radius-md);
      font-size: 15px;
      font-weight: 700;
      cursor: pointer;
      box-shadow: 0 4px 12px rgba(29, 78, 216, 0.3);
      transition: background 0.15s;
    }
    .sheet-footer-btn:active {
      background: var(--primary-hover);
    }

    /* QR Code Check-in Dialog */
    .center-dialog-overlay {
      position: absolute;
      inset: 0;
      background: rgba(15, 23, 42, 0.65);
      backdrop-filter: blur(4px);
      z-index: 55;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 24px;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.2s ease;
    }
    .center-dialog-overlay.active {
      opacity: 1;
      pointer-events: auto;
    }
    .center-dialog-card {
      width: 100%;
      max-width: 320px;
      background: var(--white);
      border-radius: var(--radius-lg);
      padding: 22px 18px 18px;
      box-shadow: var(--shadow-modal);
      text-align: center;
      position: relative;
    }
    .qr-box-wrap {
      width: 180px;
      height: 180px;
      margin: 12px auto;
      background: #f8fafc;
      border: 1px solid var(--slate-200);
      border-radius: var(--radius-md);
      padding: 12px;
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .qr-laser-line {
      position: absolute;
      top: 12px;
      left: 12px;
      right: 12px;
      height: 2px;
      background: linear-gradient(90deg, transparent, #3b82f6, transparent);
      box-shadow: 0 0 8px #3b82f6;
      animation: scanLaser 2s infinite ease-in-out;
    }
    @keyframes scanLaser {
      0%, 100% { top: 12px; }
      50% { top: 166px; }
    }
    .pin-code-display {
      font-size: 20px;
      font-weight: 800;
      letter-spacing: 4px;
      color: var(--slate-900);
      margin: 8px 0;
      font-family: monospace;
    }

    /* Toast Notification (Top floating) */
    .wx-toast {
      position: absolute;
      top: calc(var(--phone-safe-top, 50px) + 56px);
      left: 50%;
      transform: translateX(-50%) translateY(-20px);
      background: rgba(15, 23, 42, 0.92);
      color: #fff;
      font-size: 12px;
      font-weight: 600;
      padding: 8px 16px;
      border-radius: var(--radius-full);
      box-shadow: var(--shadow-lg);
      z-index: 60;
      opacity: 0;
      pointer-events: none;
      transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
      display: flex;
      align-items: center;
      gap: 6px;
      max-width: 90%;
      white-space: nowrap;
    }
    .wx-toast.active {
      transform: translateX(-50%) translateY(0);
      opacity: 1;
    }

    /* Presentation scaling */
    @media (max-height: 927px) { .phone-frame { zoom: 0.9; } }
    @media (max-height: 840px) { .phone-frame { zoom: 0.82; } }
    @media (max-height: 771px) { .phone-frame { zoom: 0.74; } }
    @media (max-height: 702px) { .phone-frame { zoom: 0.66; } }

    @media (max-width: 480px) {
      body { padding: 0; display: block; }
      .phone-frame { width: 100%; height: 100dvh; padding: 0; border-radius: 0; background: none; box-shadow: none; zoom: 1; }
      .phone-frame::before, .phone-frame::after, .hardware-button { display: none; }
      .phone-screen { width: 100%; height: 100%; border-radius: 0; }
    }

/* Multi-Page Extensions & Helpers */
a.wx-tab-item {
  text-decoration: none;
}

.wx-back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  margin-left: -6px;
  margin-right: 4px;
  border-radius: var(--radius-full);
  color: var(--slate-800);
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s;
}
.wx-back-btn:hover, .wx-back-btn:active {
  background: var(--slate-100);
}
.wx-back-btn svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
}

/* Booking Page Specifics */
.booking-page-body {
  padding: 14px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.room-hero-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--slate-200);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.booking-section-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--slate-200);
  padding: 14px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.booking-section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--slate-900);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.booking-bottom-bar {
  flex: none;
  padding: 10px 16px calc(10px + var(--phone-safe-bottom, 29px));
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--slate-200);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 25;
}
.booking-bottom-bar .btn-cancel {
  flex: 0 0 96px;
  height: 42px;
  border-radius: var(--radius-md);
  border: 1px solid var(--slate-300);
  background: #ffffff;
  color: var(--slate-700);
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s;
}
.booking-bottom-bar .btn-cancel:hover {
  background: var(--slate-50);
}
.booking-bottom-bar .btn-submit {
  flex: 1;
  height: 42px;
  border-radius: var(--radius-md);
  border: none;
  background: linear-gradient(135deg, var(--primary) 0%, #2563eb 100%);
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(29, 78, 216, 0.3);
  transition: opacity 0.15s;
}
.booking-bottom-bar .btn-submit:active {
  opacity: 0.9;
}

/* Checkin Page Specifics */
.checkin-page-body {
  padding: 14px 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.meeting-brief-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--slate-200);
  padding: 14px;
  box-shadow: var(--shadow-sm);
}
.iot-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.iot-card {
  background: #ffffff;
  border-radius: var(--radius-md);
  border: 1px solid var(--slate-200);
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.iot-icon-box {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.iot-icon-box svg {
  width: 16px;
  height: 16px;
}
.iot-icon-box.green { background: var(--emerald-50); color: var(--emerald-600); }
.iot-icon-box.blue { background: var(--primary-light); color: var(--primary); }
.iot-icon-box.amber { background: var(--amber-50); color: var(--amber-600); }
.iot-icon-box.cyan { background: var(--cyan-50); color: var(--cyan-600); }
.iot-info h5 { margin: 0; font-size: 11px; font-weight: 600; color: var(--slate-800); }
.iot-info p { margin: 2px 0 0; font-size: 10px; color: var(--slate-500); }
.iot-status-tag {
  display: inline-block;
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 600;
  line-height: 1.2;
}
.iot-status-tag.on { background: var(--emerald-50); color: var(--emerald-600); }
.iot-status-tag.standby { background: var(--slate-100); color: var(--slate-600); }
