/* ══════════════════════════════════════════
         Design System: TDesign Starter Blue
         TDesign 标准后台蓝色系
      ══════════════════════════════════════════ */

      :root {
        --color-primary: #1677FF;
        --color-primary-hover: #4096FF;
        --color-primary-light: #E6F4FF;
        --color-primary-light-hover: #BAE0FF;
        --color-bg-page: #F5F7FA;
        --color-bg-container: #FFFFFF;
        --color-bg-container-hover: #FAFAFA;
        --color-text-primary: rgba(0, 0, 0, 0.88);
        --color-text-secondary: rgba(0, 0, 0, 0.65);
        --color-text-placeholder: rgba(0, 0, 0, 0.45);
        --color-text-disabled: rgba(0, 0, 0, 0.25);
        --color-border: #D9D9D9;
        --color-border-light: #F0F0F0;
        --color-success: #52C41A;
        --color-warning: #FAAD14;
        --color-danger: #FF4D4F;
        --border-radius-sm: 6px;
        --border-radius-md: 8px;
        --font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
        --bg: var(--color-bg-page);
        --surface: var(--color-bg-container);
        --surface-2: var(--color-bg-container-hover);
        --line: var(--color-border);
        --line-light: var(--color-border-light);
        --text: var(--color-text-primary);
        --text-2: var(--color-text-secondary);
        --muted: var(--color-text-placeholder);
        --muted-light: var(--color-text-disabled);
        --danger: var(--color-danger);
        --danger-light: #FFF1F0;
        --success: var(--color-success);
        --success-light: #F6FFED;
        --warning: var(--color-warning);
        --warning-light: #FFFBE6;
        --sidebar: var(--color-bg-container);
        --sidebar-hover: var(--color-bg-container-hover);
        --sidebar-active: var(--color-primary-light);
        --sidebar-text: var(--color-text-secondary);
        --radius: var(--border-radius-md);
        --radius-sm: var(--border-radius-sm);
        --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.03), 0 1px 6px -1px rgba(0, 0, 0, 0.02), 0 2px 4px 0 rgba(0, 0, 0, 0.02);
        --shadow: 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12), 0 9px 28px 8px rgba(0, 0, 0, 0.05);
        --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.12);
        --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.06);
        --transition: 0.2s ease;
        --font-h1: 600 20px/1.4 var(--font-family);
        --font-h2: 500 16px/1.5 var(--font-family);
        --font-body: 400 14px/1.57 var(--font-family);
        --font-caption: 400 12px/1.5 var(--font-family);
        --font-mono: 600 22px/1.3 var(--font-family);
        --space-xs: 4px;
        --space-sm: 8px;
        --space-md: 12px;
        --space-lg: 16px;
        --space-xl: 24px;
        --space-2xl: 32px;
      }

      * { box-sizing: border-box; }

      [hidden] { display: none !important; }

      html, body {
        margin: 0;
        min-width: 320px;
        font-family: var(--font-family);
        font-size: 14px;
        line-height: 1.57;
        background: var(--bg);
        color: var(--text);
        -webkit-font-smoothing: antialiased;
        letter-spacing: 0;
      }

      button, input, textarea, select { font: inherit; }
      button { cursor: pointer; }
      h1, h2, h3, p { margin: 0; }

      /* ── Layout ── */
      .app {
        display: grid;
        grid-template-columns: 248px minmax(0, 1fr);
        min-height: 100vh;
      }

      /* ── Sidebar ── */
      .sidebar {
        display: flex;
        flex-direction: column;
        background: var(--sidebar);
        color: var(--text);
        border-right: 1px solid rgba(0,0,0,0.07);
        position: sticky;
        top: 0;
        height: 100vh;
        overflow-y: auto;
      }

      .brand {
        padding: 36px 24px 24px;
        border-bottom: 1px solid rgba(0,0,0,0.06);
      }

      .brand strong {
        display: block;
        font-size: 20px;
        font-weight: 600;
        letter-spacing: -0.3px;
        color: var(--text);
      }

      .brand span {
        display: block;
        margin-top: 5px;
        color: var(--muted);
        font-size: 12px;
        line-height: 1.5;
        opacity: 1;
      }

      .nav {
        display: flex;
        flex-direction: column;
        gap: 2px;
        padding: 16px 14px;
        flex: 1;
      }

      .nav-group-label {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 16px 10px 6px;
        color: var(--muted);
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.5px;
        text-transform: uppercase;
        opacity: 0.7;
        cursor: pointer;
        user-select: none;
        transition: color var(--transition), opacity var(--transition);
      }

      .nav-group-label:hover {
        color: var(--text-2);
        opacity: 1;
      }

      .nav-group-label::after {
        content: "▾";
        font-size: 11px;
        line-height: 1.2;
        transform: rotate(0deg);
        transition: transform var(--transition);
      }

      .nav-group-label.collapsed::after {
        transform: rotate(-90deg);
      }

      .nav-group {
        display: flex;
        flex-direction: column;
        gap: 2px;
        max-height: 500px;
        opacity: 1;
        overflow: hidden;
        transition: max-height 0.22s ease, opacity 0.18s ease;
      }

      .nav-group.collapsed {
        max-height: 0;
        opacity: 0;
        pointer-events: none;
      }

      .nav-button {
        display: flex;
        align-items: center;
        gap: 10px;
        min-height: 44px;
        width: 100%;
        border: 0;
        border-radius: var(--radius-sm);
        background: transparent;
        color: var(--text-2);
        padding: 0 12px;
        text-align: left;
        font-size: 14px;
        font-weight: 600;
        transition: background var(--transition), color var(--transition);
        position: relative;
      }

      .nav-button .nav-icon {
        width: 22px;
        height: 22px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 14px;
        flex-shrink: 0;
        opacity: 0.8;
        transition: opacity var(--transition);
      }

      .nav-button:hover {
        background: var(--sidebar-hover);
        color: var(--text);
      }

      .nav-button:hover .nav-icon { opacity: 1; }

      .nav-button.active {
        background: var(--sidebar-active);
        color: #fff;
        font-weight: 700;
        box-shadow: 0 4px 14px rgba(0,0,0,0.14);
      }

      .nav-button.active .nav-icon { opacity: 1; }

      .sidebar-footer {
        padding: 16px 14px;
        border-top: 1px solid rgba(0,0,0,0.06);
        display: flex;
        flex-direction: column;
        gap: 8px;
      }

      .data-path {
        color: var(--muted);
        font-size: 11px;
        line-height: 1.5;
        opacity: 0.8;
        word-break: break-all;
      }

      .identity-card {
        display: grid;
        gap: 8px;
        padding: 10px;
        border: 1px solid rgba(0,0,0,0.07);
        border-radius: var(--radius-sm);
        background: rgba(255,255,255,0.72);
      }

      .identity-card select {
        min-height: 34px;
        border: 1px solid rgba(0,0,0,0.1);
        border-radius: 8px;
        background: var(--surface);
        color: var(--text);
        padding: 0 9px;
        font-size: 12px;
        font-weight: 700;
      }

      .identity-role {
        color: var(--muted);
        font-size: 11px;
        line-height: 1.4;
      }

      /* ── Content ── */
      .content {
        display: flex;
        flex-direction: column;
        min-width: 0;
        min-height: 100vh;
        background: var(--bg);
      }

      /* ── Topbar ── */
      .topbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        padding: 28px 40px 18px;
        background: rgba(250,250,248,0.92);
        border-bottom: 1px solid rgba(0,0,0,0.07);
        position: sticky;
        top: 0;
        z-index: 10;
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
      }

      .topbar-left {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        min-width: 0;
      }

      .global-search {
        flex: 1;
        max-width: 520px;
        min-width: 220px;
        margin: 0 auto;
      }

      .global-search input {
        width: 100%;
        height: 40px;
        border: 1px solid transparent;
        border-radius: 20px;
        background: #F2F3F5;
        color: var(--color-text-primary, var(--text));
        font-size: 14px;
        padding: 0 18px;
        outline: none;
        transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
      }

      .global-search input:focus {
        background: #fff;
        border-color: var(--color-primary);
        box-shadow: 0 0 0 2px rgba(22,119,255,0.1);
      }

      .upload-dropzone {
        min-height: 96px;
        border: 1px dashed var(--color-border, #E7E7E7);
        border-radius: 6px;
        background: var(--bg-secondary, #F5F6F7);
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: border-color .2s ease, background .2s ease;
      }

      .upload-dropzone:hover,
      .upload-dropzone.drag-over {
        border-color: var(--color-primary);
        background: var(--color-primary-light, #E6F4FF);
      }

      .upload-drop-zone {
        border: 2px dashed var(--border-color, var(--color-border));
        border-radius: 8px;
        padding: 32px;
        text-align: center;
        cursor: pointer;
        transition: all 0.2s;
        margin-bottom: 16px;
        background: var(--color-bg-page);
        color: var(--color-text-secondary);
        display: grid;
        gap: 8px;
        justify-items: center;
      }

      .upload-drop-zone:hover,
      .upload-drop-zone.dragover {
        border-color: var(--color-primary);
        background: rgba(22, 119, 255, 0.04);
      }

      .upload-drop-zone strong {
        color: var(--color-text-primary);
        font-size: 14px;
      }

      .upload-drop-zone span {
        color: var(--color-text-placeholder);
        font-size: 12px;
      }

      .upload-drop-icon {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        background: var(--color-primary-light);
        color: var(--color-primary);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
      }

      .import-method {
        display: grid;
        gap: 10px;
      }

      .import-method h3 {
        margin: 0;
        font-size: 14px;
        font-weight: 600;
        color: var(--color-text-primary);
      }

      .import-preview-summary {
        color: var(--color-text-secondary);
        font-size: 13px;
        margin-top: 4px;
      }

      .import-inline-message {
        margin: 10px 0;
        padding: 8px 10px;
        border-radius: 6px;
        font-size: 13px;
        line-height: 1.5;
      }

      .import-inline-message.error {
        border: 1px solid rgba(227,77,89,0.25);
        background: #FFF1F2;
        color: var(--color-danger);
      }

      .import-inline-message.warning {
        border: 1px solid rgba(237,123,47,0.28);
        background: #FFF7E8;
        color: var(--color-warning);
      }

      .import-error-row td {
        color: var(--color-danger);
        background: #FFF1F2;
      }

      #productImportDialog {
        min-width: 700px;
        width: min(920px, calc(100vw - 48px));
      }

      .import-preview-table-wrap {
        overflow-x: auto;
        border: 1px solid var(--color-border);
        border-radius: 8px;
        background: var(--color-bg-container);
      }

      .import-preview-table {
        min-width: 760px;
        width: 100%;
        border-collapse: separate;
        border-spacing: 0;
        table-layout: auto;
      }

      .import-preview-table th {
        position: sticky;
        top: 0;
        z-index: 1;
        white-space: nowrap;
        background: #F7F5F3;
      }

      .import-preview-table td {
        white-space: nowrap;
      }

      .import-preview-table tbody tr:nth-child(odd) td {
        background: #fff;
      }

      .import-preview-table tbody tr:nth-child(even) td {
        background: #FAFAF8;
      }

      .import-preview-table tbody tr.import-error-row td {
        color: var(--color-danger);
        background: #FFF1F2;
      }

      .upload-preview-placeholder {
        color: var(--color-text-placeholder, #8A8A8A);
        font-size: 13px;
      }

      .product-thumb {
        width: 40px;
        height: 40px;
        object-fit: cover;
        border-radius: 6px;
        border: 1px solid var(--color-border, #E7E7E7);
        background: var(--bg-secondary, #F5F6F7);
        cursor: pointer;
      }

      .product-thumb-placeholder {
        width: 40px;
        height: 40px;
        border-radius: 6px;
        border: 1px solid var(--color-border, #E7E7E7);
        background: var(--bg-secondary, #F5F6F7);
        color: var(--color-text-placeholder, #8A8A8A);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 12px;
      }

      .product-thumb-missing {
        border-style: dashed;
        color: var(--color-danger, #FF4D4F);
        background: var(--color-danger-bg, #FFF1F0);
        cursor: help;
      }

      .product-image-preview {
        width: 80px;
        height: 80px;
        object-fit: cover;
        border-radius: 6px;
        border: 1px solid var(--color-border, #E7E7E7);
      }

      .anchor-product-mobile-list {
        display: none;
      }

      .anchor-feedback-card-list,
      .anchor-stats-record-list {
        display: none;
      }

      .anchor-rule-card-list {
        display: grid;
        gap: 10px;
      }

      .anchor-product-card {
        display: grid;
        grid-template-columns: 96px minmax(0, 1fr);
        gap: 12px;
        padding: 12px;
        border: 1px solid var(--color-border, #E7E7E7);
        border-radius: 10px;
        background: #fff;
        box-shadow: var(--shadow-sm);
      }

      .anchor-product-card-image .product-thumb,
      .anchor-product-card-image .product-thumb-placeholder,
      .anchor-product-card-image .product-image-preview {
        width: 96px;
        height: 128px;
        border-radius: 8px;
      }

      .anchor-product-card-body {
        min-width: 0;
      }

      .anchor-product-card-head {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 10px;
      }

      .anchor-product-code {
        color: var(--color-primary);
        font-size: 13px;
        font-weight: 700;
      }

      .anchor-product-card h3 {
        margin: 4px 0 0;
        color: var(--color-text);
        font-size: 16px;
        line-height: 1.35;
        word-break: break-word;
      }

      .anchor-product-price {
        flex: 0 0 auto;
        color: var(--color-danger, #FF4D4F);
        font-size: 15px;
        font-weight: 800;
        white-space: nowrap;
      }

      .anchor-product-tags {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        margin-top: 8px;
      }

      .anchor-product-tags span {
        padding: 3px 7px;
        border-radius: 999px;
        background: #F3F4F6;
        color: var(--color-text-secondary);
        font-size: 12px;
      }

      .anchor-product-stock-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-top: 10px;
        color: var(--color-text-secondary);
        font-size: 12px;
      }

      .anchor-product-stock-row strong {
        color: var(--color-text);
      }

      .anchor-product-size-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
        margin-top: 8px;
      }

      .anchor-product-size-chip {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 4px;
        min-height: 30px;
        padding: 6px 8px;
        border: 1px solid #E5E7EB;
        border-radius: 8px;
        background: #F9FAFB;
        color: var(--color-text);
        font-size: 12px;
      }

      .anchor-product-size-chip b {
        font-weight: 700;
      }

      .anchor-product-size-chip strong {
        font-weight: 800;
      }

      .anchor-product-detail {
        margin-top: 10px;
        border-top: 1px solid #EEF0F3;
        padding-top: 8px;
      }

      .anchor-product-detail summary {
        color: var(--color-primary);
        cursor: pointer;
        font-size: 13px;
        font-weight: 700;
        list-style-position: inside;
      }

      .anchor-product-color-list {
        display: grid;
        gap: 8px;
        margin-top: 10px;
      }

      .anchor-product-color-row {
        display: grid;
        gap: 6px;
        padding: 8px;
        border-radius: 8px;
        background: #F9FAFB;
      }

      .anchor-product-color-row > strong {
        color: var(--color-text);
        font-size: 13px;
      }

      .anchor-product-color-row > div {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 5px;
      }

      .anchor-product-color-row span {
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 26px;
        padding: 4px 6px;
        border: 1px solid #E5E7EB;
        border-radius: 7px;
        background: #fff;
        font-size: 12px;
      }

      .anchor-product-color-row b {
        font-weight: 700;
      }

      .anchor-product-notes {
        margin: 10px 0 0;
        padding: 8px 10px;
        border-radius: 8px;
        background: #FFF7ED;
        color: #92400E;
        font-size: 12px;
        line-height: 1.5;
      }

      .anchor-product-card-action,
      .anchor-product-sheet {
        display: none;
      }

      .anchor-product-search-bar {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 10px;
      }

      .anchor-product-search-bar input {
        flex: 1 1 auto;
      }

      .anchor-product-list-wrap {
        min-width: 0;
      }

      .upload-actions {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
      }

      .recruit-photo-field {
        display: grid;
        grid-template-columns: minmax(140px, 1fr) auto auto;
        align-items: center;
        gap: 6px;
        min-width: 260px;
      }

      .upload-hint {
        color: var(--color-text-placeholder, #8A8A8A);
        font-size: 12px;
      }

      #anchorImportDialog {
        width: min(1080px, 94vw);
        max-width: 96vw;
        max-height: 92vh;
        resize: both;
        overflow: auto;
      }

      .anchor-import-toolbar {
        display: flex;
        gap: 12px;
        align-items: center;
        justify-content: space-between;
        margin: 12px 0;
        flex-wrap: wrap;
      }

      .anchor-import-summary {
        color: var(--color-text-secondary);
        font-size: 13px;
      }

      .anchor-import-table-wrap {
        max-height: min(56vh, 620px);
        overflow: auto;
        border: 1px solid var(--color-border);
        border-radius: var(--border-radius-md);
      }

      #anchorImportDialog[open] .anchor-import-table-wrap {
        height: min(52vh, 520px);
      }

      .recruit-tabs {
        display: inline-flex;
        gap: 8px;
        margin: 16px 0;
      }

      .recruit-tab {
        border: 1px solid var(--color-border);
        background: #fff;
        border-radius: 999px;
        padding: 8px 16px;
        color: var(--color-text-secondary);
        cursor: pointer;
      }

      .recruit-tab.active {
        background: var(--color-primary);
        border-color: var(--color-primary);
        color: #fff;
      }

      .recruit-toolbar {
        display: flex;
        gap: 12px;
        align-items: flex-end;
        flex-wrap: wrap;
        margin-bottom: 16px;
      }

      .recruit-toolbar .field {
        flex: 1 1 150px;
        min-width: 140px;
      }

      #recruitCandidatePanel .recruit-toolbar {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
      }

      #recruitCandidatePanel .recruit-toolbar .field {
        min-width: 0;
      }

      #recruitCandidatePanel .recruit-filter-compact {
        min-width: 128px;
      }

      #recruitCandidatePanel .recruit-filter-medium {
        min-width: 180px;
        grid-column: span 2;
      }

      #recruitCandidatePanel .recruit-filter-wide {
        min-width: 260px;
        grid-column: span 2;
      }

      .recruit-report-custom-field.is-hidden,
      .recruit-candidate-day-field.is-hidden,
      .recruit-candidate-custom-field.is-hidden,
      #recruitMonthField.is-hidden,
      #recruitReportMonthField.is-hidden {
        display: none;
      }

      .recruit-import-box {
        border: 1px dashed var(--color-border);
        border-radius: var(--border-radius-md);
        padding: 14px;
        background: var(--color-bg-page);
        margin-bottom: 16px;
      }

      .erp-sync-status {
        display: inline-flex;
        align-items: center;
        min-height: 34px;
        margin: 0 0 12px;
        padding: 6px 12px;
        border: 1px solid var(--color-border);
        border-radius: var(--radius-sm);
        background: #fff;
        color: var(--color-text-secondary);
        font-size: 13px;
      }

      .erp-sync-audit {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
        margin: -4px 0 12px;
      }

      .erp-sync-audit[hidden] {
        display: none;
      }

      .erp-sync-audit span {
        padding: 4px 8px;
        border: 1px solid #dbe7f5;
        border-radius: 999px;
        background: #f5f9ff;
        color: #315477;
        font-size: 12px;
      }

      .erp-sync-audit .is-warning {
        border-color: #f3d7a4;
        background: #fff8eb;
        color: #8a5a09;
      }

      .sku-inventory-table {
        min-width: 920px;
      }

      .sku-inventory-table th,
      .sku-inventory-table td {
        text-align: center;
        white-space: nowrap;
      }

      .anchor-product-inventory-detail {
        max-width: 100%;
        overflow-x: auto;
      }

      .recruit-bulk-toolbar {
        display: flex;
        align-items: center;
        gap: 12px;
        flex-wrap: wrap;
        margin: 0 0 12px;
        padding: 10px 12px;
        border: 1px solid var(--color-border);
        border-radius: var(--border-radius-md);
        background: #fff;
      }

      .recruit-bulk-toolbar .bulk-spacer {
        margin-left: auto;
      }

      .recruit-report-section {
        margin-top: 16px;
      }

      .recruit-report-title {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin: 18px 0 10px;
      }

      .recruit-report-title h3 {
        margin: 0;
        padding-left: 8px;
        border-left: 3px solid var(--color-primary);
        font-size: 16px;
        font-weight: 600;
      }

      .recruit-subtle {
        font-size: 12px;
        color: var(--color-text-secondary);
      }

      .recruit-dashboard-grid {
        display: grid;
        grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.85fr);
        gap: 16px;
        align-items: stretch;
        margin: 0 0 18px;
      }

      .recruit-result-kpi-row {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 12px;
        margin-bottom: 18px;
      }

      .recruit-result-kpi-card {
        min-height: 92px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 8px;
        text-align: center;
        background: #fff;
        border: 1px solid var(--color-border);
        border-radius: 8px;
        padding: 16px 20px;
        cursor: pointer;
        transition: border-color .2s, box-shadow .2s, background .2s;
      }

      button.recruit-result-kpi-card {
        font: inherit;
      }

      .recruit-result-kpi-card:hover {
        border-color: var(--color-primary);
        box-shadow: 0 2px 8px rgba(22,119,255,0.08);
        background: var(--color-primary-light);
      }

      .recruit-result-kpi-card .kpi-label {
        color: var(--color-text-secondary);
        font-size: 13px;
      }

      .recruit-result-kpi-card .kpi-value {
        color: var(--color-text-primary);
        font-size: 28px;
        font-weight: 700;
        line-height: 1.15;
      }

      .recruit-result-kpi-card small {
        color: var(--color-text-secondary);
        font-size: 12px;
        line-height: 1.4;
      }

      .recruit-output-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
        margin-bottom: 16px;
      }

      #recruitView .profile-page,
      #recruitFormPanel,
      #recruitCandidatePanel,
      #recruitMetaphysicsPanel,
      #recruitReportPanel,
      #recruitReportHost {
        width: 100%;
        min-width: 0;
      }

      .recruit-output-panel {
        min-width: 0;
        border: 1px solid var(--color-border);
        border-radius: var(--border-radius-md);
        background: #fff;
        overflow: hidden;
      }

      .recruit-output-heading,
      .recruit-card-heading {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 16px;
      }

      .recruit-output-heading {
        padding: 14px 16px 12px;
        border-bottom: 1px solid var(--color-border-light);
      }

      .recruit-output-heading h3,
      .recruit-card-heading h3 {
        margin: 0;
        font-size: 16px;
        font-weight: 600;
      }

      .recruit-output-heading p,
      .recruit-card-heading p {
        margin: 4px 0 0;
        color: var(--color-text-secondary);
        font-size: 12px;
        line-height: 1.5;
      }

      .recruit-output-heading > span,
      .recruit-card-heading > span {
        flex: 0 0 auto;
        color: var(--color-text-secondary);
        font-size: 12px;
      }

      .recruit-output-table-shell {
        max-height: 430px;
        border: 0;
        border-radius: 0;
      }

      .profile-data-table.recruit-output-table {
        min-width: 760px;
      }

      .recruit-output-table th,
      .recruit-output-table td,
      .recruit-detail-table th,
      .recruit-detail-table td {
        padding: 10px 12px;
        vertical-align: middle;
        text-align: left;
      }

      .recruit-output-table .number-cell {
        text-align: center;
        font-variant-numeric: tabular-nums;
      }

      .recruit-rank-cell {
        width: 42px;
        text-align: center !important;
      }

      .recruit-rank-cell span {
        display: inline-flex;
        width: 24px;
        height: 24px;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: var(--color-primary-light);
        color: var(--color-primary);
        font-weight: 600;
      }

      .recruit-efficiency-cell strong,
      .recruit-efficiency-cell span {
        display: block;
      }

      .recruit-efficiency-cell span {
        margin-top: 2px;
        color: var(--color-text-secondary);
        font-size: 11px;
        white-space: nowrap;
      }

      .recruit-efficiency-cell,
      .recruit-issue-cell {
        text-align: center;
      }

      .recruit-issue-text {
        color: #ad6800;
        font-size: 12px;
      }

      .recruit-process-grid.recruit-process-grid-two {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .anchor-signing-page {
        gap: 16px;
      }

      .anchor-signing-toolbar .field {
        min-width: 180px;
      }

      .anchor-signing-metrics {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 10px;
      }

      .anchor-signing-metric {
        min-height: 104px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 6px;
        text-align: center;
      }

      .anchor-signing-metric strong {
        font-size: 26px;
        line-height: 1;
      }

      .anchor-signing-metric small,
      .anchor-signing-section-head p {
        color: var(--color-text-secondary);
      }

      .anchor-signing-rankings {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
      }

      .anchor-signing-ranking,
      .anchor-signing-detail {
        min-width: 0;
        border: 1px solid var(--color-border);
        border-radius: 8px;
        overflow: hidden;
        background: #fff;
      }

      .anchor-signing-ranking-table-shell {
        overflow: hidden;
        scrollbar-gutter: auto;
        border: 0;
        border-radius: 0;
      }

      .profile-data-table.anchor-signing-ranking-table {
        width: 100%;
        min-width: 0;
        table-layout: fixed;
      }

      .anchor-signing-ranking-table .anchor-signing-rank-column {
        width: 72px;
      }

      .anchor-signing-ranking-table .anchor-signing-count-column {
        width: 112px;
      }

      .anchor-signing-ranking-table th,
      .anchor-signing-ranking-table td {
        overflow: hidden;
        text-overflow: ellipsis;
      }

      .anchor-signing-ranking-table th:last-child,
      .anchor-signing-ranking-table td:last-child {
        text-align: center;
      }

      .anchor-signing-rank-number {
        display: inline-flex;
        width: 24px;
        height: 24px;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: #eef5ff;
        color: #1677ff;
        font-weight: 650;
      }

      .anchor-signing-rank-count strong {
        color: #1677ff;
        font-size: 16px;
      }

      .profile-data-table.anchor-signing-detail-table {
        width: 100%;
        min-width: 996px;
        table-layout: fixed;
      }

      .anchor-signing-detail-table .anchor-signing-date-column {
        width: 92px;
      }

      .anchor-signing-detail-table .anchor-signing-person-column {
        width: 108px;
      }

      .anchor-signing-detail-table .anchor-signing-company-column {
        width: 112px;
      }

      .anchor-signing-detail-table .anchor-signing-team-column {
        width: 88px;
      }

      .anchor-signing-detail-table .anchor-signing-source-column {
        width: 116px;
      }

      .anchor-signing-detail-table .anchor-signing-profile-column {
        width: 88px;
      }

      .anchor-signing-detail-table .anchor-signing-action-column {
        width: 176px;
      }

      .anchor-signing-detail-table th,
      .anchor-signing-detail-table td {
        overflow: hidden;
        text-overflow: ellipsis;
      }

      .anchor-signing-section-head {
        min-height: 58px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 10px 14px;
        border-bottom: 1px solid var(--color-border);
      }

      .anchor-signing-section-head h3,
      .anchor-signing-section-head p {
        margin: 0;
      }

      .anchor-signing-section-head h3 {
        font-size: 15px;
      }

      .anchor-signing-section-head p {
        margin-top: 4px;
        font-size: 12px;
      }

      .anchor-signing-section-head > span {
        color: var(--color-text-secondary);
        white-space: nowrap;
      }

      .anchor-signing-linked {
        display: inline-flex;
        align-items: center;
        min-height: 24px;
        padding: 0 8px;
        border: 1px solid #b7dfc1;
        border-radius: 999px;
        color: #237b3f;
        background: #f2fbf4;
        font-size: 12px;
        white-space: nowrap;
      }

      .anchor-signing-dialog {
        width: min(820px, calc(100vw - 32px));
      }

      .anchor-signing-detail-dialog {
        width: min(760px, calc(100vw - 32px));
      }

      .anchor-signing-detail-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1px;
        border: 1px solid var(--color-border);
        background: var(--color-border);
      }

      .anchor-signing-detail-grid > div {
        min-width: 0;
        padding: 12px;
        background: #fff;
      }

      .anchor-signing-detail-grid span,
      .anchor-signing-history-head span,
      .anchor-signing-history-change span {
        display: block;
        color: var(--color-text-secondary);
        font-size: 12px;
      }

      .anchor-signing-detail-grid strong {
        display: block;
        margin-top: 4px;
        overflow-wrap: anywhere;
      }

      .anchor-signing-history-title {
        margin: 20px 0 8px;
        font-size: 15px;
      }

      .anchor-signing-history {
        border: 1px solid var(--color-border);
      }

      .anchor-signing-history-item + .anchor-signing-history-item {
        border-top: 1px solid var(--color-border);
      }

      .anchor-signing-history-head {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 16px;
        padding: 12px;
        background: #f7f9fc;
      }

      .anchor-signing-history-head strong {
        display: block;
        margin-bottom: 3px;
      }

      .anchor-signing-history-changes {
        padding: 4px 12px 12px;
      }

      .anchor-signing-history-change {
        display: grid;
        grid-template-columns: 110px minmax(0, 1fr);
        gap: 12px;
        padding-top: 8px;
      }

      .anchor-signing-history-change strong {
        overflow-wrap: anywhere;
        font-weight: 500;
      }

      .anchor-signing-dialog .dialog-header p {
        margin: 4px 0 0;
        color: var(--color-text-secondary);
        font-size: 12px;
      }

      .anchor-signing-form {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 14px;
      }

      .anchor-signing-form .wide {
        grid-column: 1 / -1;
      }

      @media (max-width: 960px) {
        .anchor-signing-metrics,
        .anchor-signing-rankings {
          grid-template-columns: repeat(2, minmax(0, 1fr));
        }
      }

      @media (max-width: 640px) {
        .anchor-signing-metrics,
        .anchor-signing-rankings,
        .anchor-signing-form {
          grid-template-columns: 1fr;
        }

        .anchor-signing-form .wide {
          grid-column: auto;
        }

        .anchor-signing-detail-grid {
          grid-template-columns: 1fr;
        }

        .anchor-signing-history-head,
        .anchor-signing-history-change {
          grid-template-columns: 1fr;
          flex-direction: column;
          gap: 4px;
        }

        .anchor-signing-ranking-table .anchor-signing-rank-column {
          width: 56px;
        }

        .anchor-signing-ranking-table .anchor-signing-count-column {
          width: 88px;
        }
      }

      .recruit-issue-text.is-ok {
        color: var(--color-text-secondary);
      }

      .recruit-empty-cell {
        padding: 28px 16px !important;
        text-align: center !important;
        color: var(--color-text-secondary);
      }

      .recruit-process-grid {
        display: grid;
        grid-template-columns: minmax(0, 1.6fr) minmax(300px, .7fr);
        gap: 16px;
        margin-bottom: 18px;
      }

      .recruit-process-grid .recruit-funnel-card {
        grid-column: auto;
      }

      .recruit-trend-card {
        grid-column: 1 / -1;
      }

      .recruit-dashboard-card {
        background: #fff;
        border: 1px solid var(--color-border);
        border-radius: var(--border-radius-md);
        padding: 16px;
        min-height: 160px;
      }

      .recruit-dashboard-card h3 {
        margin: 0 0 12px;
        font-size: 16px;
        font-weight: 600;
      }

      .recruit-funnel-card {
        grid-column: 1 / -1;
        min-height: auto;
      }

      .recruit-funnel {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 8px;
        margin-top: 14px;
      }

      .recruit-funnel-step {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        gap: 8px;
        min-height: 72px;
        border: 1px solid var(--color-border);
        border-radius: var(--border-radius-md);
        background: #fff;
        padding: 12px;
        text-align: left;
        cursor: pointer;
        font: inherit;
        transition: border-color .2s, box-shadow .2s, background .2s;
      }

      .recruit-funnel-step:hover {
        border-color: var(--color-primary);
        box-shadow: 0 2px 8px rgba(22,119,255,0.08);
        background: var(--color-primary-light);
      }

      .recruit-funnel-step span {
        color: var(--color-text-secondary);
        font-size: 13px;
      }

      .funnel-step-right {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        gap: 10px;
      }

      .funnel-step-right strong {
        color: var(--color-text-primary);
        font-size: 24px;
        line-height: 1.2;
      }

      .funnel-step-right em {
        color: var(--color-text-secondary);
        font-size: 12px;
        font-style: normal;
      }

      .funnel-arrow {
        display: none;
      }

      .recruit-mini-list {
        display: grid;
        gap: 10px;
      }

      .recruit-mini-row {
        display: grid;
        grid-template-columns: minmax(90px, 1fr) minmax(140px, 2fr) auto;
        gap: 12px;
        align-items: center;
      }

      .recruit-mini-row strong {
        font-size: 13px;
      }

      .recruit-mini-bar {
        height: 8px;
        border-radius: 999px;
        background: var(--color-primary-light);
        overflow: hidden;
      }

      .recruit-mini-bar i {
        display: block;
        height: 100%;
        border-radius: inherit;
        background: var(--color-primary);
      }

      .recruit-mini-row span {
        color: var(--color-text-secondary);
        font-size: 12px;
        white-space: nowrap;
      }

      .recruit-alert-list {
        display: grid;
        gap: 8px;
      }

      .recruit-process-grid-two .recruit-data-quality-card {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: minmax(190px, .28fr) minmax(0, 1fr);
        align-items: center;
        gap: 16px;
        min-height: auto;
      }

      .recruit-process-grid-two .recruit-data-quality-card .recruit-card-heading {
        margin: 0;
      }

      .recruit-process-grid-two .recruit-data-quality-card .recruit-alert-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
      }

      .recruit-alert-item {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 10px 12px;
        border: 1px solid var(--color-border-light);
        border-radius: var(--border-radius-md);
        background: var(--color-bg-page);
      }

      button.recruit-alert-item {
        width: 100%;
        font: inherit;
        text-align: left;
        cursor: pointer;
      }

      button.recruit-alert-item:hover {
        border-color: var(--color-primary);
        background: var(--color-primary-light);
      }

      .recruit-alert-item strong {
        font-size: 13px;
      }

      .recruit-alert-item span {
        color: var(--color-text-secondary);
        font-size: 12px;
      }

      .recruit-alert-item .status-badge {
        flex: 0 0 auto;
      }

      .recruit-badge-warn,
      .recruit-badge-ok {
        flex: 0 0 auto;
        border-radius: 10px;
        padding: 2px 8px;
        font-size: 12px;
        font-weight: 600;
        line-height: 1.6;
      }

      .recruit-badge-warn {
        background: #fff7e6;
        color: #d46b08;
        border: 1px solid #ffd591;
      }

      .recruit-badge-ok {
        background: #f6ffed;
        color: #389e0d;
        border: 1px solid #b7eb8f;
      }

      .recruit-report-tabs {
        display: flex;
        gap: 0;
        border-bottom: 1px solid var(--color-border);
        margin: 20px 0 0;
      }

      .recruit-report-tab {
        padding: 8px 16px;
        font-size: 13px;
        font-weight: 500;
        color: var(--color-text-secondary);
        background: none;
        border: none;
        border-bottom: 2px solid transparent;
        cursor: pointer;
        transition: all .2s;
      }

      .recruit-report-tab:hover {
        color: var(--color-text-primary);
      }

      .recruit-report-tab.active {
        color: var(--color-primary);
        border-bottom-color: var(--color-primary);
        font-weight: 600;
      }

      .recruit-report-tab-content.hidden {
        display: none;
      }

      .recruit-detail-heading {
        margin-top: 22px;
      }

      .profile-data-table.recruit-detail-table {
        min-width: 900px;
      }

      @media (max-width: 1440px) {
        .recruit-output-grid {
          grid-template-columns: 1fr;
        }
      }

      @media (max-width: 1180px) {
        .recruit-dashboard-grid {
          grid-template-columns: 1fr;
        }

        .recruit-result-kpi-row {
          grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .recruit-output-grid,
        .recruit-process-grid {
          grid-template-columns: 1fr;
        }

        .recruit-funnel {
          grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .recruit-trend-card {
          grid-column: auto;
        }
      }

      @media (max-width: 768px) {
        .recruit-process-grid-two .recruit-data-quality-card {
          grid-template-columns: 1fr;
        }

        .recruit-process-grid-two .recruit-data-quality-card .recruit-alert-list {
          grid-template-columns: 1fr;
        }
      }

      .ai-search-shell {
        width: 100%;
        max-width: 1160px;
        margin: 0 auto;
        padding: clamp(54px, 8vh, 96px) 20px 48px;
      }

      .ai-search-hero {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 0;
        transition: padding .2s ease;
      }

      .ai-search-shell.has-result {
        padding-top: 32px;
      }

      .ai-search-brand > span {
        display: block;
        margin-bottom: 14px;
        color: #6b7280;
        font-size: 12px;
        font-weight: 700;
        letter-spacing: .16em;
      }

      .ai-search-hero h2 {
        margin: 0;
        color: #111827;
        font-size: clamp(36px, 4.2vw, 54px);
        font-weight: 650;
        letter-spacing: -.04em;
        line-height: 1.14;
      }

      .ai-search-brand p {
        max-width: 620px;
        margin: 14px auto 28px;
        color: #6b7280;
        font-size: 15px;
        line-height: 1.65;
      }

      .ai-search-form {
        width: min(100%, 860px);
        margin: 0 auto;
      }

      .ai-search-querybar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 8px;
        min-height: 64px;
        padding: 6px 7px 6px 22px;
        border: 1px solid #d9dee7;
        border-radius: 34px;
        background: #fff;
        box-shadow: 0 7px 24px rgba(15, 23, 42, .08);
        transition: border-color .18s ease, box-shadow .18s ease;
      }

      .ai-search-querybar:focus-within {
        border-color: #a9c8f7;
        box-shadow: 0 10px 30px rgba(22, 119, 255, .13);
      }

      .ai-search-form input {
        min-width: 0;
        height: 50px;
        padding: 0;
        border: 0;
        background: transparent;
        color: #111827;
        font-size: 16px;
        outline: none;
      }

      .ai-search-form input:focus {
        border: 0;
        box-shadow: none;
      }

      .ai-search-querybar .btn {
        min-width: 112px;
        height: 48px;
        padding: 0 22px;
        border-radius: 24px;
      }

      .ai-search-hero-actions {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 10px;
        margin-top: 18px;
      }

      .ai-search-quiet-button {
        min-height: 38px;
        padding: 0 16px;
        border: 1px solid transparent;
        border-radius: 8px;
        background: #f3f4f6;
        color: #374151;
        cursor: pointer;
        font-size: 13px;
        font-weight: 600;
        transition: background .18s ease, border-color .18s ease, color .18s ease;
      }

      .ai-search-quiet-button:hover,
      .ai-search-quiet-button:focus-visible {
        border-color: #c7d8f2;
        background: #eef5ff;
        color: #175cd3;
      }

      .ai-search-panel,
      .ai-search-rules {
        border: 1px solid var(--border-color);
        border-radius: 8px;
        background: #fff;
        box-shadow: var(--shadow-sm);
      }

      .ai-search-panel {
        min-height: 112px;
        margin-top: 28px;
        padding: 20px;
      }

      .ai-search-panel.is-empty {
        display: none;
      }

      .ai-search-empty,
      .ai-search-loading {
        min-height: 72px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 8px;
        color: var(--text-muted);
        text-align: center;
      }

      .ai-search-empty strong {
        color: var(--text-main);
        font-size: 16px;
      }

      .ai-search-answer-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        color: var(--text-muted);
        font-size: 13px;
      }

      .ai-search-answer-head b {
        color: var(--primary);
        font-weight: 600;
      }

      .ai-search-answer p {
        margin: 14px 0 18px;
        color: var(--text-main);
        line-height: 1.7;
      }

      .ai-search-facts {
        margin: 0 0 12px;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        background: #fff;
        overflow: hidden;
      }

      .ai-search-facts > strong {
        display: block;
        padding: 12px 14px;
        border-bottom: 1px solid var(--border-color);
        color: var(--text-main);
      }

      .ai-search-facts ul {
        margin: 0;
        padding: 0;
        list-style: none;
      }

      .ai-search-facts li {
        display: grid;
        grid-template-columns: 112px minmax(0, 1fr);
        gap: 12px;
        padding: 10px 14px;
        border-bottom: 1px solid rgba(226, 232, 240, .78);
      }

      .ai-search-facts li:last-child {
        border-bottom: 0;
      }

      .ai-search-facts li span {
        color: var(--text-muted);
        font-size: 12px;
      }

      .ai-search-facts li b {
        color: var(--text-main);
        font-weight: 500;
        line-height: 1.55;
      }

      .ai-search-sources {
        margin: -6px 0 18px;
        color: var(--text-muted);
        font-size: 12px;
      }

      .ai-search-intents {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
      }

      .ai-search-intent {
        border: 1px solid var(--border-color);
        border-radius: 8px;
        padding: 14px;
        background: #fafafa;
      }

      .ai-search-intent strong,
      .ai-search-rules strong {
        display: block;
        margin-bottom: 6px;
        color: var(--text-main);
      }

      .ai-search-intent span,
      .ai-search-rules span {
        color: var(--text-muted);
        line-height: 1.6;
      }

      .ai-search-rules {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0;
        margin-top: 14px;
        overflow: hidden;
      }

      .ai-search-rules > div {
        padding: 16px;
        border-right: 1px solid var(--border-color);
      }

      .ai-search-rules > div:last-child {
        border-right: 0;
      }

      .ai-search-legacy-answer,
      .ai-search-intents {
        display: none;
      }

      .ai-search-confidence {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        color: var(--text-muted);
        font-weight: 600;
      }

      .ai-search-confidence i {
        width: 8px;
        height: 8px;
        flex: 0 0 8px;
        border-radius: 50%;
        background: #16a34a;
      }

      .ai-search-confidence.is-medium i {
        background: #d97706;
      }

      .ai-search-confidence.is-low i {
        background: #dc2626;
      }

      .ai-search-conclusion {
        margin: 10px 0;
        padding: 12px 14px;
        border-left: 3px solid var(--primary);
        background: #f6f9fd;
      }

      .ai-search-conclusion > span,
      .ai-search-stats span,
      .ai-search-facts-head span,
      .ai-search-fact-group > span,
      .ai-search-sources > span {
        color: var(--text-muted);
        font-size: 12px;
      }

      .ai-search-conclusion strong {
        display: block;
        margin-top: 4px;
        color: var(--text-main);
        font-size: 16px;
        font-weight: 650;
        line-height: 1.55;
      }

      .ai-search-scope,
      .ai-search-analysis,
      .ai-search-plan {
        margin: 0 0 10px;
        padding: 10px 12px;
        border: 1px solid var(--border-color);
        background: #fff;
      }

      .ai-search-scope > strong,
      .ai-search-analysis > strong,
      .ai-search-plan > strong {
        display: block;
        margin-bottom: 6px;
        color: var(--text-main);
        font-size: 13px;
      }

      .ai-search-scope {
        display: flex;
        align-items: center;
        gap: 16px;
        padding: 8px 12px;
        background: #f8fafc;
      }

      .ai-search-scope > strong {
        flex: 0 0 auto;
        margin: 0;
      }

      .ai-search-scope > div {
        display: flex;
        min-width: 0;
        flex-wrap: wrap;
        gap: 6px 18px;
      }

      .ai-search-scope span {
        color: var(--text-muted);
        font-size: 12px;
      }

      .ai-search-scope span b {
        margin-right: 5px;
        color: var(--text-main);
        font-weight: 600;
      }

      .ai-search-scope ol,
      .ai-search-analysis ol,
      .ai-search-plan ol {
        margin: 0;
        padding-left: 18px;
        color: var(--text-muted);
        font-size: 13px;
        line-height: 1.7;
      }

      .ai-search-guidance-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
      }

      .ai-search-guidance-grid .ai-search-analysis,
      .ai-search-guidance-grid .ai-search-plan {
        height: 100%;
      }

      .ai-search-stats {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        margin: 0 0 10px;
        border: 1px solid var(--border-color);
        background: #f8fafc;
      }

      .ai-search-stats > div {
        position: relative;
        min-width: 0;
        padding: 11px 13px;
        border-right: 1px solid var(--border-color);
        background: #fff;
      }

      .ai-search-stats > div:last-child {
        border-right: 0;
      }

      .ai-search-stats strong,
      .ai-search-stats small {
        display: block;
      }

      .ai-search-stats strong {
        margin: 3px 0 2px;
        color: var(--text-main);
        font-size: 18px;
        font-variant-numeric: tabular-nums;
      }

      .ai-search-stats small {
        color: var(--text-muted);
        font-size: 12px;
        line-height: 1.45;
      }

      .ai-search-facts-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 10px 12px;
        border-bottom: 1px solid var(--border-color);
        color: var(--text-main);
      }

      .ai-search-fact-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .ai-search-fact-group {
        min-width: 0;
        padding: 0 12px 10px;
        border-right: 1px solid rgba(226, 232, 240, .78);
      }

      .ai-search-fact-group:nth-child(2n),
      .ai-search-fact-group:last-child {
        border-right: 0;
      }

      .ai-search-fact-group:nth-child(n + 3) {
        border-top: 1px solid rgba(226, 232, 240, .78);
      }

      .ai-search-fact-group.is-alert {
        border-right: 0;
      }

      .ai-search-fact-group.is-alert:last-child:nth-child(odd) {
        grid-column: 1 / -1;
      }

      .ai-search-fact-group > span {
        display: block;
        padding: 9px 2px 4px;
        color: var(--text-main);
        font-weight: 600;
      }

      .ai-search-fact-group ol {
        margin: 0;
        padding: 0 6px 0 22px;
      }

      .ai-search-fact-group li {
        display: list-item;
        padding: 3px 0;
        border: 0;
        color: var(--text-main);
        font-size: 13px;
        font-weight: 500;
        line-height: 1.45;
      }

      .ai-search-ranking-list {
        display: grid;
        gap: 2px;
      }

      @media (min-width: 1201px) {
        .ai-search-fact-group.is-anchor-ranking .ai-search-ranking-list {
          grid-template-columns: repeat(2, minmax(0, 1fr));
          column-gap: 14px;
        }
      }

      .ai-search-ranking-row {
        display: grid;
        grid-template-columns: 26px minmax(0, 1fr);
        gap: 8px;
        padding: 6px 0;
      }

      .ai-search-rank {
        display: grid;
        width: 24px;
        height: 24px;
        place-items: center;
        border: 1px solid #d7dee8;
        border-radius: 50%;
        color: #475569;
        font-size: 12px;
        font-variant-numeric: tabular-nums;
      }

      .ai-search-ranking-row:nth-child(-n + 3) .ai-search-rank {
        border-color: #9fc2f8;
        background: #edf5ff;
        color: #175cd3;
      }

      .ai-search-ranking-main {
        min-width: 0;
      }

      .ai-search-ranking-value {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 10px;
      }

      .ai-search-ranking-value strong,
      .ai-search-ranking-value b {
        overflow: hidden;
        color: var(--text-main);
        font-size: 13px;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .ai-search-ranking-value strong {
        font-weight: 600;
      }

      .ai-search-ranking-value b {
        flex: 0 0 auto;
        font-variant-numeric: tabular-nums;
      }

      .ai-search-ranking-bar {
        height: 4px;
        margin: 4px 0;
        overflow: hidden;
        background: #e8edf3;
      }

      .ai-search-ranking-bar i {
        display: block;
        height: 100%;
        background: #4f8ee8;
      }

      .ai-search-ranking-main small {
        display: block;
        overflow: hidden;
        color: var(--text-muted);
        font-size: 11px;
        line-height: 1.4;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .ai-search-alert-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
      }

      .ai-search-alert-list p {
        margin: 0;
        padding: 8px 10px;
        border-left: 3px solid #d5a329;
        background: #fffbeb;
        color: #594612;
        font-size: 12px;
        line-height: 1.55;
      }

      .ai-search-alert-list p.is-neutral {
        border-left-color: #94a3b8;
        background: #f8fafc;
        color: #475569;
      }

      @media (max-width: 1200px) {
        .ai-search-hero {
          grid-template-columns: 1fr;
        }

        .ai-search-ranking-main small {
          white-space: normal;
        }
      }

      .ai-search-insight {
        margin: 0 0 16px;
        padding: 10px 14px;
        border: 1px solid #dce8f7;
        background: #f8fbff;
      }

      .ai-search-insight strong {
        color: var(--text-main);
        font-size: 13px;
      }

      .ai-search-insight p {
        margin: 6px 0 0;
        font-size: 13px;
      }

      .ai-search-source-tags {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 6px;
        margin: 0;
      }

      .ai-search-source-tags b {
        padding: 3px 8px;
        border: 1px solid var(--border-color);
        border-radius: 999px;
        background: #fff;
        color: var(--text-muted);
        font-weight: 500;
      }

      .ai-search-faq {
        width: min(100%, 960px);
        margin: 28px auto 0;
        padding: 24px;
        border: 1px solid #e1e6ee;
        border-radius: 18px;
        background: rgba(255, 255, 255, .96);
        box-shadow: 0 14px 36px rgba(15, 23, 42, .07);
        text-align: left;
      }

      .ai-search-faq[hidden] {
        display: none;
      }

      .ai-search-faq-head {
        display: flex;
        align-items: end;
        justify-content: space-between;
        gap: 24px;
        padding-bottom: 18px;
      }

      .ai-search-faq-head span {
        color: #175cd3;
        font-size: 12px;
        font-weight: 700;
        letter-spacing: .08em;
      }

      .ai-search-faq-head h3 {
        margin: 5px 0 0;
        color: #111827;
        font-size: 22px;
        letter-spacing: -.02em;
      }

      .ai-search-faq-head p {
        max-width: 420px;
        margin: 0;
        color: #6b7280;
        font-size: 13px;
        line-height: 1.55;
        text-align: right;
      }

      .ai-search-faq-tabs {
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 8px;
        padding: 6px;
        border-radius: 12px;
        background: #f4f6f9;
      }

      .ai-search-faq-tab {
        min-width: 0;
        padding: 11px 10px;
        border: 1px solid transparent;
        border-radius: 9px;
        background: transparent;
        color: #667085;
        cursor: pointer;
        text-align: center;
      }

      .ai-search-faq-tab strong,
      .ai-search-faq-tab span {
        display: block;
      }

      .ai-search-faq-tab strong {
        overflow: hidden;
        color: inherit;
        font-size: 13px;
        font-weight: 650;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .ai-search-faq-tab span {
        overflow: hidden;
        margin-top: 4px;
        font-size: 11px;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .ai-search-faq-tab:hover {
        color: #175cd3;
      }

      .ai-search-faq-tab.is-active {
        border-color: #dce8f8;
        background: #fff;
        color: #175cd3;
        box-shadow: 0 3px 12px rgba(15, 23, 42, .06);
      }

      .ai-search-faq-questions {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
        margin-top: 16px;
      }

      .ai-search-faq-question {
        display: flex;
        min-width: 0;
        min-height: 94px;
        flex-direction: column;
        align-items: flex-start;
        justify-content: space-between;
        gap: 14px;
        padding: 15px;
        border: 1px solid #e3e8ef;
        border-radius: 12px;
        background: #fff;
        color: #273244;
        cursor: pointer;
        text-align: left;
        transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
      }

      .ai-search-faq-question:hover,
      .ai-search-faq-question:focus-visible {
        border-color: #a9c8f7;
        box-shadow: 0 8px 20px rgba(22, 119, 255, .09);
        transform: translateY(-1px);
      }

      .ai-search-faq-question span {
        font-size: 13px;
        font-weight: 550;
        line-height: 1.55;
      }

      .ai-search-faq-question b {
        color: #175cd3;
        font-size: 12px;
        font-weight: 600;
      }

      @media (max-width: 768px) {
        .recruit-result-kpi-row {
          grid-template-columns: 1fr;
        }

        .recruit-funnel-step {
          width: auto !important;
        }

        .recruit-funnel {
          grid-template-columns: 1fr 1fr;
        }

        .recruit-mini-row {
          grid-template-columns: 1fr;
        }
      }

      .recruit-edit-table input,
      .recruit-edit-table select,
      .recruit-edit-table textarea {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
        display: block;
        border: 0;
        border-bottom: 1px solid var(--color-border);
        border-radius: 0;
        background: transparent;
        padding: 6px 2px;
      }

      .recruit-edit-table textarea {
        min-height: 34px;
        max-height: 88px;
        resize: vertical;
        white-space: normal;
      }

      .recruit-form-table-wrap {
        max-width: 100%;
        max-height: min(58vh, 620px);
        overflow: auto;
      }

      .recruit-form-table-wrap .recruit-edit-table {
        width: max-content;
        min-width: 2680px;
        table-layout: fixed;
      }

      .recruit-form-table-wrap .recruit-edit-table th,
      .recruit-form-table-wrap .recruit-edit-table td {
        vertical-align: middle;
        white-space: nowrap;
      }

      .recruit-form-table-wrap .recruit-edit-table td {
        padding: 8px 10px;
      }

      .recruit-form-table-wrap .recruit-edit-table td:nth-child(1),
      .recruit-form-table-wrap .recruit-edit-table th:nth-child(1),
      .recruit-form-table-wrap .recruit-edit-table td:nth-child(12),
      .recruit-form-table-wrap .recruit-edit-table th:nth-child(12),
      .recruit-form-table-wrap .recruit-edit-table td:nth-child(17),
      .recruit-form-table-wrap .recruit-edit-table th:nth-child(17) {
        text-align: center;
      }

      .recruit-form-table-wrap .recruit-edit-table input[type="checkbox"] {
        display: inline-block;
        width: auto;
        min-width: 0;
      }

      .recruit-form-table-wrap .recruit-edit-table select + input {
        margin-top: 6px;
      }

      .recruit-save-bar {
        position: sticky;
        bottom: 0;
        z-index: 5;
        margin-top: 0;
        padding: 12px 0 0;
        background: linear-gradient(180deg, rgba(245, 247, 250, 0), var(--color-bg-page) 34%);
        justify-content: flex-start;
      }

      .recruit-save-bar .btn {
        flex: 0 0 auto;
        order: -1;
      }

      .recruit-save-bar span {
        min-width: 0;
        flex: 1 1 auto;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .anchor-import-table input,
      .anchor-import-table select {
        width: 100%;
        min-width: 120px;
        border: 0;
        border-bottom: 1px solid var(--color-border);
        border-radius: 0;
        background: transparent;
        padding: 6px 2px;
      }

      .anchor-import-table .import-status {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        padding: 2px 8px;
        border-radius: 999px;
        font-size: 12px;
        white-space: nowrap;
      }

      .anchor-import-table .import-status.ok {
        color: var(--color-success);
        background: rgba(43,164,113,0.1);
      }

      .anchor-import-table .import-status.warn {
        color: var(--color-warning);
        background: rgba(237,123,47,0.12);
      }

      .anchor-import-table tr.row-warning td {
        background: #FFF8EE;
      }

      .company-sensitive-note {
        color: var(--color-text-placeholder);
        font-size: 12px;
        margin-top: 4px;
      }

      .attachment-list {
        display: grid;
        gap: 6px;
        margin-top: 8px;
      }

      .attachment-item {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 6px 10px;
        background: var(--bg-secondary, #F5F6F7);
        border-radius: 6px;
      }

      .attachment-thumb {
        width: 80px;
        height: 80px;
        object-fit: cover;
        border-radius: 6px;
        border: 1px solid var(--color-border, #E7E7E7);
        cursor: pointer;
      }

      .attachment-name {
        flex: 1;
        min-width: 0;
        color: var(--color-text-secondary, #5F646D);
        font-size: 13px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .rule-attachments {
        display: grid;
        gap: 8px;
        margin-top: 12px;
      }

      .image-preview-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.8);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 9999;
        padding: 32px;
      }

      .image-preview-overlay[hidden] {
        display: none;
      }

      .image-preview-overlay img {
        max-width: 92vw;
        max-height: 92vh;
        border-radius: 8px;
        box-shadow: 0 20px 60px rgba(0,0,0,0.35);
        background: #fff;
      }

      .page-title-row {
        display: flex;
        align-items: center;
        gap: 14px;
        min-width: 0;
      }

      .page-title {
        font-size: 22px;
        font-weight: 700;
        color: var(--text);
        letter-spacing: 0;
        line-height: 1.1;
        margin-bottom: 4px;
      }

      .page-description {
        color: #8A8A8A;
        font-size: 13px;
        line-height: 1.45;
        margin: 0 0 16px;
      }

      .page-description[hidden] {
        display: none;
      }

      .date-badge {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        background: rgba(22,119,255,0.1);
        border: 1px solid rgba(22,119,255,0.22);
        color: var(--color-primary);
        border-radius: var(--radius-sm);
        padding: 5px 11px;
        font-size: 12px;
        font-weight: 600;
      }

      .date-badge.historical-date {
        background: var(--warning-light);
        border-color: rgba(176,123,42,0.2);
        color: var(--warning);
      }

      .topbar-right {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 5px;
        border: 1px solid rgba(0,0,0,0.07);
        border-radius: var(--radius-sm);
        background: rgba(255,255,255,0.8);
      }

      .topbar-right[hidden] { display: none; }
      .topbar-right [hidden] { display: none; }

      .return-today-button {
        background: rgba(0,0,0,0.04);
        border-color: rgba(0,0,0,0.1);
      }

      .return-today-button[hidden] { display: none; }

      /* ── Buttons ── */
      .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        min-height: 38px;
        border-radius: var(--radius-sm);
        font-size: 14px;
        font-weight: 600;
        padding: 0 16px;
        border: 1px solid transparent;
        transition: background var(--transition), border-color var(--transition), box-shadow var(--transition), transform 0.1s;
        white-space: nowrap;
      }

      .btn:active { transform: scale(0.97); }

      .btn-primary {
        background: var(--color-primary);
        border-color: var(--color-primary);
        color: #fff;
        box-shadow: 0 2px 8px rgba(22,119,255,0.3);
      }

      .btn-primary:hover {
        background: var(--color-primary-hover);
        border-color: var(--color-primary-hover);
        box-shadow: 0 4px 14px rgba(22,119,255,0.36);
      }

      .btn-secondary {
        background: rgba(255,255,255,0.9);
        border-color: rgba(0,0,0,0.1);
        color: var(--text-2);
      }

      .btn-secondary:hover {
        background: #fff;
        border-color: rgba(0,0,0,0.18);
        color: var(--text);
      }

      .btn-danger {
        background: var(--danger);
        border-color: var(--danger);
        color: #fff;
      }

      .btn-danger:hover { background: #a93226; }

      .btn-ghost {
        background: transparent;
        border-color: transparent;
        color: var(--muted);
        padding: 0 8px;
        min-height: 32px;
      }

      .btn-ghost:hover { background: rgba(0,0,0,0.04); color: var(--text-2); }

      .btn-icon {
        width: 34px;
        min-height: 34px;
        padding: 0;
        border-radius: var(--radius-sm);
        background: rgba(255,255,255,0.9);
        border: 1px solid rgba(0,0,0,0.09);
        color: var(--text-2);
        font-size: 14px;
      }

      .btn-icon:hover { background: #fff; color: var(--text); border-color: rgba(0,0,0,0.16); }

      .btn-sm {
        min-height: 32px;
        font-size: 12px;
        padding: 0 12px;
      }

      /* ── View container ── */
      .view { display: none; }
      .view.active {
        display: flex;
        flex-direction: column;
        flex: 1;
        padding: 28px 40px 40px;
        gap: 22px;
      }

      /* ── Workbench ── */
      .workbench {
        display: grid;
        grid-template-columns: minmax(400px, 1.4fr) minmax(320px, 1fr);
        gap: 22px;
        align-items: start;
      }

      /* ── Panel ── */
      .panel {
        background: var(--surface);
        border: 1px solid rgba(0,0,0,0.08);
        border-radius: var(--radius);
        box-shadow: var(--shadow-sm);
        overflow: hidden;
      }

      .panel-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 16px 20px;
        border-bottom: 1px solid rgba(0,0,0,0.06);
        background: rgba(255,255,255,0.7);
        min-height: 58px;
      }

      .panel-header h2 {
        font-size: 15px;
        font-weight: 600;
        color: var(--text);
        letter-spacing: -0.1px;
      }

      .panel-body { padding: 20px; }
      .panel-body-flush { padding: 0; }

      /* ── Stats bar ── */
      .stats-bar {
        display: flex;
        align-items: center;
        gap: 12px;
        flex-wrap: wrap;
      }

      .stat-chip {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        font-size: 12px;
        color: var(--muted);
        font-weight: 500;
      }

      .stat-chip strong {
        font-weight: 700;
        color: var(--text-2);
      }

      .stat-chip.done strong { color: var(--success); }
      .stat-chip.doing strong { color: var(--color-primary); }

      #workspaceView.view.active {
        background: #f5f7fa;
      }

      .workspace-hero {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(280px, auto);
        gap: 16px;
        align-items: center;
        padding: 18px 20px;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        background: #fff;
      }

      .workspace-hero h2 {
        margin: 0;
        color: var(--color-text-primary, #1a1a1a);
        font-size: 20px;
        font-weight: 700;
        line-height: 1.3;
      }

      .workspace-hero p {
        margin: 6px 0 0;
        color: var(--color-text-secondary, #5f646d);
        font-size: 13px;
        line-height: 1.6;
      }

      .workspace-hero-meta {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        justify-content: flex-end;
      }

      .workspace-hero-chip {
        min-width: 0;
        padding: 8px 10px;
        border: 1px solid #eef0f3;
        border-radius: 6px;
        background: #f8fafc;
      }

      .workspace-hero-chip span {
        display: block;
        color: var(--color-text-placeholder, #8a8a8a);
        font-size: 11px;
        line-height: 1.4;
      }

      .workspace-hero-chip strong {
        display: block;
        margin-top: 3px;
        color: var(--color-text-primary, #1a1a1a);
        font-size: 15px;
        font-weight: 700;
        line-height: 1.2;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }

      .workspace-overview-grid {
        display: none !important;
      }

      .workspace-overview-card {
        display: grid;
        gap: 8px;
        min-height: 104px;
        padding: 16px;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        background: #fff;
      }

      .workspace-overview-card span {
        color: var(--color-text-placeholder, #8a8a8a);
        font-size: 12px;
        font-weight: 600;
      }

      .workspace-overview-card strong {
        color: var(--color-text-primary, #1a1a1a);
        font-size: 26px;
        font-weight: 700;
        line-height: 1.2;
      }

      .workspace-overview-card small {
        min-height: 18px;
        color: var(--color-text-secondary, #5f646d);
        font-size: 12px;
        line-height: 1.5;
      }

      .workspace-layout {
        display: grid;
        grid-template-columns: minmax(520px, 1.45fr) minmax(360px, 0.95fr);
        gap: 16px;
        align-items: stretch;
      }

      .workspace-left,
      .workspace-right,
      .workspace-secondary-grid {
        min-width: 0;
      }

      .workspace-left {
        display: flex;
        flex-direction: column;
        gap: 16px;
      }

      .workspace-right {
        display: flex;
        flex-direction: column;
        gap: 12px;
      }

      .workspace-left > .workspace-card,
      .workspace-right > .workspace-card {
        flex: 1 1 auto;
      }

      .workspace-secondary-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(260px, 1fr));
        gap: 12px;
        align-items: start;
        margin-top: 16px;
      }

      .workspace-secondary-grid .workspace-card {
        min-height: 0;
      }

      .workspace-secondary-grid .report-box {
        min-height: 128px;
      }

      .workspace-anchor-fill-card .panel-header {
        align-items: flex-start;
      }

      .workspace-anchor-fill-card .panel-header h2 {
        margin-bottom: 4px;
      }

      .workspace-anchor-fill-tools {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-bottom: 12px;
      }

      .workspace-anchor-fill-tools span {
        color: var(--color-text-secondary);
        font-size: 12px;
      }

      .workspace-anchor-fill-card .profile-table-wrap {
        max-height: 360px;
        overflow: auto;
      }

      .workspace-anchor-fill-table {
        width: 100%;
        border-collapse: collapse;
        table-layout: fixed;
      }

      .workspace-anchor-fill-table th,
      .workspace-anchor-fill-table td {
        padding: 10px 8px;
        border-bottom: 1px solid #eef0f3;
        font-size: 13px;
        vertical-align: middle;
      }

      .workspace-anchor-fill-table th {
        color: var(--color-text-placeholder);
        font-weight: 600;
        text-align: left;
        background: #f7f9fc;
      }

      .workspace-anchor-fill-table td[data-num],
      .workspace-anchor-fill-table th[data-num] {
        text-align: center;
      }

      .workspace-anchor-fill-table input {
        width: 100%;
        min-height: 34px;
        border: 1px solid #dcdfe6;
        border-radius: 4px;
        padding: 6px 8px;
        text-align: center;
      }

      .workspace-anchor-name {
        display: grid;
        gap: 3px;
        min-width: 0;
      }

      .workspace-anchor-name strong {
        color: var(--color-text-primary);
        font-size: 13px;
      }

      .workspace-anchor-name span {
        color: var(--color-text-placeholder);
        font-size: 12px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .workspace-quick-strip {
        margin-top: 16px;
        padding: 14px 16px;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        background: #fff;
      }

      .workspace-quick-header {
        display: flex;
        align-items: flex-end;
        justify-content: space-between;
        gap: 16px;
        margin-bottom: 12px;
      }

      .workspace-quick-header h2 {
        margin: 0;
        color: var(--color-text-primary);
        font-size: 16px;
        font-weight: 700;
      }

      .workspace-quick-header span {
        color: var(--color-text-secondary);
        font-size: 12px;
      }

      .workspace-card,
      .workspace-history {
        background: #fff;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        box-shadow: none;
        overflow: hidden;
      }

      .workspace-card .panel-header,
      .workspace-card .panel-body,
      .workspace-card .panel-body-flush {
        background: #fff;
      }

      .workspace-card .panel-header {
        min-height: 52px;
        padding: 14px 16px;
        border-bottom: 1px solid #eef0f3;
      }

      .workspace-card .panel-body {
        padding: 16px;
      }

      .workspace-quick-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 8px;
      }

      .workspace-quick-button {
        min-height: 64px;
        padding: 12px 14px;
        border: 1px solid #e5e7eb;
        border-radius: 6px;
        background: #fff;
        color: var(--color-text-primary, #1a1a1a);
        text-align: left;
        cursor: pointer;
        transition: border-color .2s ease, box-shadow .2s ease, transform .12s ease;
      }

      .workspace-quick-button:hover {
        border-color: var(--color-primary);
        box-shadow: 0 8px 20px rgba(22,119,255,0.08);
        transform: translateY(-1px);
      }

      .workspace-quick-button strong {
        display: block;
        font-size: 14px;
        font-weight: 700;
      }

      .workspace-quick-button span {
        display: block;
        margin-top: 4px;
        color: var(--color-text-placeholder, #8a8a8a);
        font-size: 12px;
        line-height: 1.4;
      }

      .workspace-risk-list {
        display: grid;
        gap: 8px;
      }

      #workspaceView #dailyForm .panel-body {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        padding: 14px 16px;
      }

      #workspaceView #dailyForm .field {
        margin: 0;
      }

      #workspaceView #dailyForm .field-label {
        margin-bottom: 4px;
        font-size: 12px;
      }

      #workspaceView #dailyForm input {
        min-height: 34px;
      }

      #workspaceView #dailyForm textarea {
        min-height: 44px;
        height: 48px;
        resize: vertical;
      }

      #workspaceView #dailyForm #summaryInput {
        height: 64px;
      }

      #workspaceView #dailyForm #blockersInput,
      #workspaceView #dailyForm #tomorrowInput {
        height: 56px;
      }

      #workspaceView #dailyForm .field-hint {
        display: none;
      }

      #workspaceView #dailyForm .btn[type="submit"] {
        width: auto !important;
        justify-self: start;
        min-width: 160px;
      }

      #workspaceView.workspace-role-admin #dailyForm,
      #workspaceView.workspace-role-manager #dailyForm,
      #workspaceView.workspace-role-finance #dailyForm,
      #workspaceView.workspace-role-goods #dailyForm,
      #workspaceView.workspace-role-hr #dailyForm,
      #workspaceView.workspace-role-control #dailyForm,
      #workspaceView.workspace-role-metaphysics #dailyForm {
        min-height: auto;
      }

      #workspaceView.workspace-role-admin #dailyForm .panel-body,
      #workspaceView.workspace-role-manager #dailyForm .panel-body,
      #workspaceView.workspace-role-finance #dailyForm .panel-body,
      #workspaceView.workspace-role-goods #dailyForm .panel-body,
      #workspaceView.workspace-role-hr #dailyForm .panel-body,
      #workspaceView.workspace-role-control #dailyForm .panel-body,
      #workspaceView.workspace-role-metaphysics #dailyForm .panel-body {
        gap: 8px;
        padding: 12px 14px 14px;
      }

      #workspaceView.workspace-role-admin #dailyForm #summaryInput,
      #workspaceView.workspace-role-manager #dailyForm #summaryInput,
      #workspaceView.workspace-role-finance #dailyForm #summaryInput,
      #workspaceView.workspace-role-goods #dailyForm #summaryInput,
      #workspaceView.workspace-role-hr #dailyForm #summaryInput,
      #workspaceView.workspace-role-control #dailyForm #summaryInput,
      #workspaceView.workspace-role-metaphysics #dailyForm #summaryInput,
      #workspaceView.workspace-role-admin #dailyForm #blockersInput,
      #workspaceView.workspace-role-manager #dailyForm #blockersInput,
      #workspaceView.workspace-role-finance #dailyForm #blockersInput,
      #workspaceView.workspace-role-goods #dailyForm #blockersInput,
      #workspaceView.workspace-role-hr #dailyForm #blockersInput,
      #workspaceView.workspace-role-control #dailyForm #blockersInput,
      #workspaceView.workspace-role-metaphysics #dailyForm #blockersInput,
      #workspaceView.workspace-role-admin #dailyForm #tomorrowInput,
      #workspaceView.workspace-role-manager #dailyForm #tomorrowInput,
      #workspaceView.workspace-role-finance #dailyForm #tomorrowInput,
      #workspaceView.workspace-role-goods #dailyForm #tomorrowInput,
      #workspaceView.workspace-role-hr #dailyForm #tomorrowInput,
      #workspaceView.workspace-role-control #dailyForm #tomorrowInput,
      #workspaceView.workspace-role-metaphysics #dailyForm #tomorrowInput {
        height: 44px;
        min-height: 44px;
      }

      #workspaceView.workspace-role-admin #dailyForm textarea:focus,
      #workspaceView.workspace-role-manager #dailyForm textarea:focus,
      #workspaceView.workspace-role-finance #dailyForm textarea:focus,
      #workspaceView.workspace-role-goods #dailyForm textarea:focus,
      #workspaceView.workspace-role-hr #dailyForm textarea:focus,
      #workspaceView.workspace-role-control #dailyForm textarea:focus,
      #workspaceView.workspace-role-metaphysics #dailyForm textarea:focus {
        height: 92px;
      }

      .workspace-risk-item {
        display: grid;
        grid-template-columns: 8px minmax(0, 1fr) auto;
        gap: 12px;
        align-items: center;
        min-height: 54px;
        padding: 10px 12px;
        border: 1px solid #e5e7eb;
        border-radius: 6px;
        background: #fff;
        color: var(--color-text-primary, #1a1a1a);
        text-align: left;
        cursor: pointer;
        transition: border-color .2s ease, box-shadow .2s ease, transform .12s ease;
      }

      .workspace-risk-item:hover {
        border-color: var(--color-primary);
        box-shadow: 0 8px 20px rgba(22,119,255,0.08);
        transform: translateY(-1px);
      }

      .workspace-risk-dot {
        width: 8px;
        height: 8px;
        border-radius: 999px;
        background: var(--color-primary);
      }

      .workspace-risk-item.danger .workspace-risk-dot { background: var(--danger); }
      .workspace-risk-item.warning .workspace-risk-dot { background: var(--warning); }
      .workspace-risk-item.success .workspace-risk-dot { background: var(--success); }

      .workspace-risk-main {
        min-width: 0;
      }

      .workspace-risk-main strong {
        display: block;
        color: var(--color-text-primary, #1a1a1a);
        font-size: 13px;
        font-weight: 700;
      }

      .workspace-risk-main span {
        display: block;
        overflow: hidden;
        margin-top: 4px;
        color: var(--color-text-secondary, #5f646d);
        font-size: 12px;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .workspace-risk-count {
        min-width: 34px;
        padding: 4px 8px;
        border-radius: 999px;
        background: var(--color-primary-light, #E6F4FF);
        color: var(--color-primary);
        font-size: 12px;
        font-weight: 700;
        text-align: center;
      }

      .workspace-risk-item.danger .workspace-risk-count {
        background: #fff1f0;
        color: var(--danger);
      }

      .workspace-risk-item.warning .workspace-risk-count {
        background: #fff7e6;
        color: var(--warning);
      }

      .workspace-risk-empty {
        padding: 18px 12px;
        border: 1px dashed #dcdfe6;
        border-radius: 8px;
        background: #fafafa;
        color: var(--color-text-secondary, #5f646d);
        font-size: 13px;
        text-align: center;
      }

      .workspace-activity-list {
        display: grid;
        gap: 10px;
      }

      .workspace-activity-item {
        display: grid;
        grid-template-columns: 88px minmax(0, 1fr) auto;
        gap: 12px;
        align-items: center;
        min-height: 46px;
        padding: 10px 0;
        border-bottom: 1px solid #f0f1f3;
      }

      .workspace-activity-item:last-child {
        border-bottom: 0;
      }

      .workspace-activity-date {
        color: var(--color-text-placeholder, #8a8a8a);
        font-size: 12px;
        font-weight: 600;
      }

      .workspace-activity-main {
        min-width: 0;
      }

      .workspace-activity-main strong {
        display: block;
        overflow: hidden;
        color: var(--color-text-primary, #1a1a1a);
        font-size: 13px;
        font-weight: 700;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .workspace-activity-main span {
        display: block;
        overflow: hidden;
        margin-top: 3px;
        color: var(--color-text-secondary, #5f646d);
        font-size: 12px;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .workspace-activity-link {
        color: var(--color-primary);
        border: 0;
        background: transparent;
        font-size: 12px;
        font-weight: 700;
        cursor: pointer;
      }

      .workspace-history {
        margin-top: 18px;
        background: #fafafa;
        transition: border-color .2s ease, box-shadow .2s ease;
      }

      .workspace-history[open] {
        box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
      }

      .workspace-history summary {
        cursor: pointer;
        list-style: none;
        padding: 14px 16px;
        color: var(--color-text-primary);
        font-size: 14px;
        font-weight: 700;
      }

      .workspace-history summary::-webkit-details-marker {
        display: none;
      }

      .workspace-history summary::after {
        content: "展开";
        float: right;
        color: var(--color-primary);
        font-size: 12px;
      }

      .workspace-history[open] summary::after {
        content: "收起";
      }

      .workspace-history-body {
        border-top: 1px solid #e5e7eb;
        max-height: 520px;
        overflow: auto;
        animation: workspaceHistoryIn .18s ease;
      }

      @keyframes workspaceHistoryIn {
        from { opacity: 0; transform: translateY(-4px); }
        to { opacity: 1; transform: translateY(0); }
      }
      .stat-chip.blocked strong { color: var(--warning); }

      /* ── Task list ── */
      .task-list { display: flex; flex-direction: column; }

      .task-row {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 14px 20px;
        border-bottom: 1px solid rgba(0,0,0,0.05);
        transition: background var(--transition);
        min-height: 72px;
        background: transparent;
      }

      .task-row:last-child { border-bottom: none; }
      .task-row:hover { background: rgba(22,119,255,0.03); }
      .task-row.done { opacity: 0.6; }

      .task-check {
        flex-shrink: 0;
        width: 20px;
        height: 20px;
        border-radius: 50%;
        border: 1.5px solid rgba(0,0,0,0.18);
        background: transparent;
        cursor: pointer;
        transition: border-color var(--transition), background var(--transition);
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
      }

      .task-check:hover { border-color: var(--color-primary); }
      .task-row.done .task-check {
        border-color: var(--success);
        background: var(--success);
      }

      .task-check-inner {
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: #fff;
        opacity: 0;
        transition: opacity var(--transition);
      }

      .task-row.done .task-check-inner { opacity: 1; }

      .task-main {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        gap: 4px;
      }

      .task-title {
        font-size: 14px;
        font-weight: 700;
        color: var(--text);
        overflow-wrap: anywhere;
        line-height: 1.4;
      }

      .task-row.done .task-title {
        color: var(--muted-light);
        text-decoration: line-through;
      }

      .task-note {
        font-size: 12px;
        color: var(--muted);
        line-height: 1.4;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
      }

      .task-meta {
        display: flex;
        align-items: center;
        gap: 5px;
        flex-wrap: wrap;
      }

      .task-controls {
        display: flex;
        align-items: center;
        gap: 6px;
        flex-shrink: 0;
      }

      /* ── Status select (inline) ── */
      .status-select {
        appearance: none;
        -webkit-appearance: none;
        border: 1px solid rgba(0,0,0,0.1);
        border-radius: var(--radius-sm);
        background: rgba(255,255,255,0.9);
        color: var(--text-2);
        font-size: 12px;
        font-weight: 600;
        padding: 4px 22px 4px 8px;
        cursor: pointer;
        min-height: 30px;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238A8A8A' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 6px center;
        transition: border-color var(--transition);
      }

      .status-select:hover { border-color: rgba(0,0,0,0.2); }
      .status-select:focus { outline: 2px solid rgba(22,119,255,0.3); outline-offset: 1px; border-color: var(--color-primary); }

      .status-select.s-todo { color: var(--muted); }
      .status-select.s-doing { color: var(--color-primary); border-color: rgba(22,119,255,0.28); background-color: var(--color-primary-light); }
      .status-select.s-done { color: var(--success); border-color: rgba(46,125,94,0.2); background-color: var(--success-light); }
      .status-select.s-blocked { color: var(--warning); border-color: rgba(176,123,42,0.2); background-color: var(--warning-light); }
      .status-select.s-cancelled { color: var(--muted); }

      /* ── Badge ── */
      .badge {
        display: inline-flex;
        align-items: center;
        min-height: 20px;
        border-radius: 6px;
        padding: 0 7px;
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0;
      }

      .badge-high { background: #FEF2F2; color: #B91C1C; }
      .badge-normal { background: rgba(22,119,255,0.1); color: var(--color-primary-hover); }
      .badge-low { background: var(--success-light); color: var(--success); }
      .badge-cat { background: rgba(0,0,0,0.04); color: var(--muted); border: 1px solid rgba(0,0,0,0.07); }
      .badge-tag { background: rgba(0,0,0,0.04); color: var(--text-2); border: 1px solid rgba(0,0,0,0.07); }

      /* ── Report box ── */
      .report-box {
        width: 100%;
        min-height: 430px;
        border: 1px solid rgba(0,0,0,0.1);
        border-radius: var(--radius-sm);
        background: rgba(255,255,255,0.9);
        color: var(--text);
        font-family: "SF Mono", "Cascadia Code", Consolas, "Microsoft YaHei", monospace;
        font-size: 13px;
        line-height: 1.7;
        padding: 16px;
        resize: vertical;
        white-space: pre-wrap;
        transition: border-color var(--transition);
      }

      .report-box:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 3px rgba(22,119,255,0.12); }

      /* ── Form ── */
      .form-grid { display: flex; flex-direction: column; gap: 16px; }

      .field { display: flex; flex-direction: column; gap: 6px; }

      .field-label {
        font-size: 12px;
        font-weight: 700;
        color: var(--text-2);
        letter-spacing: 0;
      }

      .field-hint {
        font-size: 12px;
        color: var(--muted);
        margin-top: 2px;
      }

      .row-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
      }

      .record-detail-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px;
      }

      .record-detail-grid > div {
        border: 1px solid var(--line);
        border-radius: var(--radius-sm);
        padding: 10px 12px;
        background: var(--surface-2);
        min-width: 0;
      }

      .record-detail-grid strong {
        display: block;
        margin-top: 4px;
        overflow-wrap: anywhere;
      }

      input[type="text"],
      input[type="date"],
      input[type="month"],
      input[type="number"],
      input[type="time"],
      input:not([type]),
      select,
      textarea {
        width: 100%;
        border: 1px solid rgba(0,0,0,0.1);
        border-radius: var(--radius-sm);
        background: rgba(255,255,255,0.9);
        color: var(--text);
        transition: border-color var(--transition), box-shadow var(--transition);
      }

      input[type="text"]:focus,
      input[type="date"]:focus,
      input[type="month"]:focus,
      input[type="number"]:focus,
      input[type="time"]:focus,
      input:not([type]):focus,
      select:focus,
      textarea:focus {
        outline: none;
        border-color: var(--color-primary);
        box-shadow: 0 0 0 3px rgba(22,119,255,0.12);
      }

      input[type="text"],
      input[type="date"],
      input[type="month"],
      input[type="number"],
      input[type="time"],
      input:not([type]),
      select {
        min-height: 40px;
        padding: 0 12px;
        font-size: 14px;
      }

      input[type="date"]#growthDate {
        width: auto;
        min-width: 150px;
        min-height: 38px;
        font-size: 14px;
        padding: 8px 12px;
        border: 1px solid #E5E5E5;
        border-radius: 6px;
        background: #fff;
        color: var(--text, #1A1A1A);
        cursor: pointer;
      }

      input[type="date"]#growthDate:focus {
        border-color: var(--color-primary);
        outline: none;
        box-shadow: 0 0 0 2px rgba(22,119,255,0.15);
      }

      .anchor-growth-date-tools {
        display: flex;
        align-items: center;
        gap: 12px;
        flex-wrap: wrap;
        justify-content: flex-end;
      }

      .rest-toggle {
        min-height: 38px;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        border: 1px solid rgba(0,0,0,0.08);
        border-radius: 6px;
        background: #fff;
        color: var(--text-2);
        font-size: 13px;
        font-weight: 700;
        padding: 0 10px;
        cursor: pointer;
      }

      .rest-toggle input {
        width: auto;
      }

      textarea {
        min-height: 90px;
        padding: 12px;
        resize: vertical;
        line-height: 1.65;
        font-size: 14px;
      }

      /* ── Message toast ── */
      .toast-container {
        position: fixed;
        top: 16px;
        right: 20px;
        z-index: 999;
        display: flex;
        flex-direction: column;
        gap: 8px;
        pointer-events: none;
      }

      .toast {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 11px 16px;
        border-radius: var(--radius-sm);
        font-size: 14px;
        font-weight: 600;
        box-shadow: var(--shadow);
        animation: toastIn 0.22s ease;
        pointer-events: auto;
        min-width: 300px;
        max-width: min(520px, calc(100vw - 48px));
        font-size: 14px;
        line-height: 1.5;
        background: rgba(255,255,255,0.94);
        border: 1px solid rgba(0,0,0,0.08);
        color: var(--text);
        backdrop-filter: saturate(180%) blur(20px);
        -webkit-backdrop-filter: saturate(180%) blur(20px);
      }

      .toast-success { background: rgba(240,250,245,0.96); border-color: rgba(46,125,94,0.18); color: #1a5c3a; }
      .toast-error { background: rgba(254,242,242,0.96); border-color: rgba(192,57,43,0.18); color: #9b1c1c; }
      .toast-info { background: rgba(22,119,255,0.08); border-color: rgba(22,119,255,0.22); color: #4096FF; }

      @keyframes toastIn {
        from { opacity: 0; transform: translateX(12px); }
        to { opacity: 1; transform: translateX(0); }
      }

      /* ── Empty state ── */
      .empty-state {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-height: 210px;
        color: var(--muted);
        text-align: center;
        padding: 24px;
        gap: 10px;
      }

      .empty-state-icon {
        display: grid;
        place-items: center;
        width: 42px;
        height: 42px;
        border-radius: 8px;
        background: rgba(0,0,0,0.04);
        color: var(--muted);
        font-size: 14px;
        font-weight: 600;
      }

      .empty-state p { font-size: 14px; }

      /* ── History / Search cards ── */
      .record-list { display: flex; flex-direction: column; }

      .record-card {
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 16px 20px;
        border-bottom: 1px solid rgba(0,0,0,0.05);
        transition: background var(--transition);
      }

      .record-card:last-child { border-bottom: none; }
      .record-card:hover { background: rgba(22,119,255,0.03); }
      .record-card.clickable { cursor: pointer; }
      .record-card.clickable:hover {
        background: rgba(255,255,255,0.96);
        box-shadow: inset 0 0 0 1px rgba(0,0,0,0.05);
      }
      .record-card.clickable:active { transform: scale(0.999); }
      .record-card.clickable:focus-visible {
        outline: 2px solid rgba(22,119,255,0.4);
        outline-offset: -2px;
      }

      .record-card-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
      }

      .record-date {
        font-size: 14px;
        font-weight: 700;
        color: var(--text);
        display: flex;
        align-items: center;
        gap: 6px;
      }

      .record-today-tag {
        font-size: 11px;
        font-weight: 700;
        background: var(--color-primary);
        color: #fff;
        border-radius: 6px;
        padding: 2px 7px;
      }

      .record-snippet {
        font-size: 13px;
        color: var(--text-2);
        line-height: 1.55;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
      }

      .record-meta {
        display: flex;
        align-items: center;
        gap: 6px;
        flex-wrap: wrap;
      }

      .record-progress {
        font-size: 12px;
        color: var(--muted);
        font-weight: 600;
      }

      .record-open-label {
        display: inline-flex;
        align-items: center;
        min-height: 28px;
        border: 1px solid rgba(0,0,0,0.08);
        border-radius: var(--radius-sm);
        background: var(--surface);
        color: var(--text-2);
        padding: 0 10px;
        font-size: 12px;
        font-weight: 700;
      }

      .record-actions {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        flex-shrink: 0;
      }

      .record-action-btn {
        min-height: 30px;
        border: 1px solid rgba(0,0,0,0.08);
        border-radius: var(--radius-sm);
        background: var(--surface);
        color: var(--text-2);
        padding: 0 10px;
        font-size: 12px;
        font-weight: 700;
        cursor: pointer;
        transition: background var(--transition), border-color var(--transition), color var(--transition);
      }

      .record-actions,
      .table-actions,
      .platform-account-actions,
      .broker-actions,
      .live-session-actions,
      .anchor-profile-actions {
        display: inline-flex;
        align-items: center;
        gap: 0;
        flex-wrap: nowrap;
        white-space: nowrap;
      }

      .user-action-cell {
        text-align: center !important;
        width: 180px;
      }

      .user-table-actions {
        width: 100%;
        justify-content: center;
      }

      .record-action-btn,
      .table-actions .btn,
      .platform-account-actions button {
        padding: 4px 8px;
      }

      .record-action-btn + .record-action-btn,
      .table-actions > * + *,
      .platform-account-actions button + button {
        margin-left: 12px;
        padding-left: 20px;
        border-left: 1px solid var(--color-border);
      }

      .record-action-btn:hover {
        background: #fff;
        border-color: rgba(0,0,0,0.16);
        color: var(--text);
      }

      .record-action-btn.danger { color: var(--color-text-secondary); }

      .record-action-btn.danger:hover {
        background: transparent;
        border-color: transparent;
        color: var(--color-danger);
      }

      /* ── Company management ── */
      .company-shell {
        display: grid;
        gap: 24px;
      }

      .company-hero {
        position: relative;
        display: grid;
        grid-template-columns: minmax(360px, 0.9fr) minmax(420px, 1.1fr);
        min-height: 300px;
        border: 0;
        background: transparent;
        box-shadow: none;
        padding: 0;
        overflow: visible;
      }

      .company-hero::before {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: var(--radius);
        background: linear-gradient(135deg, #FDFCFB 0%, #F8F5F1 100%);
        box-shadow: var(--shadow);
        border: 1px solid rgba(22,119,255,0.12);
      }

      .company-hero::after {
        content: "";
        position: absolute;
        inset: 0;
        border-radius: var(--radius);
        border: 1px solid rgba(22,119,255,0.1);
        pointer-events: none;
      }

      .company-hero > div {
        position: relative;
        z-index: 1;
      }

      .company-hero > div:first-child {
        align-self: end;
        padding: 34px;
      }

      .company-hero h2 {
        max-width: 360px;
        font-size: 36px;
        line-height: 1.05;
        letter-spacing: -0.5px;
        margin-bottom: 10px;
        font-weight: 600;
      }

      .company-hero p {
        max-width: 390px;
        color: var(--text-2);
        font-size: 14px;
        line-height: 1.75;
      }

      .company-maintenance-hero {
        grid-template-columns: 1fr;
        min-height: auto;
      }

      .company-maintenance-hero > div:first-child {
        align-self: auto;
      }

      .company-entity-tools {
        display: grid;
        grid-template-columns: minmax(180px, 220px) minmax(240px, 1fr) auto;
        gap: 12px;
        align-items: end;
        margin-top: 24px;
        max-width: 760px;
      }

      .company-entity-form {
        display: grid;
        grid-template-columns: minmax(180px, 1fr) auto;
        gap: 8px;
      }

      .company-delete-button {
        white-space: nowrap;
      }

      .company-kpi-board {
        align-self: end;
        display: grid;
        gap: 12px;
        padding: 0 22px 22px 0;
        min-width: 0;
      }

      .analysis-company-overview {
        margin-bottom: 16px;
        padding: 0;
      }

      .company-kpi-title {
        color: #8A8A8A;
        font-size: 12px;
        font-weight: 600;
        margin-bottom: 8px;
      }

      .company-kpi-section + .company-kpi-section .company-kpi-title {
        margin-top: 12px;
      }

      .company-kpi-row {
        display: grid;
        gap: 12px;
      }

      .company-kpi-row.all {
        grid-template-columns: repeat(7, minmax(110px, 1fr));
      }

      .company-kpi-card {
        appearance: none;
        position: relative;
        border: 1px solid #F0EDE8;
        border-radius: 8px;
        background: #fff;
        color: inherit;
        font: inherit;
        min-height: 80px;
        overflow: hidden;
        padding: 10px 12px;
        text-align: left;
        cursor: pointer;
        transition: all 0.2s ease;
      }

      .company-kpi-card span {
        display: block;
        color: #8A8A8A;
        font-size: 12px;
        font-weight: 600;
        margin-bottom: 4px;
      }

      .company-kpi-card strong {
        color: var(--text, #1A1A1A);
        display: block;
        font-size: 18px;
        font-weight: 600;
        letter-spacing: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .company-kpi-card strong.kpi-value-sm {
        font-size: 16px;
      }

      .company-kpi-card.zero strong {
        color: #BFBFBF;
      }

      .company-kpi-card.warning strong {
        color: #E85D5D;
      }

      .company-kpi-card.safe strong {
        color: #5DAF5D;
      }

      .company-kpi-card em {
        color: #BFBFBF;
        display: block;
        font-size: 11px;
        font-style: normal;
        margin-top: 4px;
      }

      .company-kpi-card i {
        color: #BFBFBF;
        font-style: normal;
        position: absolute;
        right: 14px;
        top: 12px;
        transition: color 0.2s ease;
      }

      .company-kpi-card:hover {
        border-color: var(--color-primary);
        box-shadow: 0 2px 8px rgba(22,119,255,0.1);
      }

      .company-kpi-card:hover i {
        color: var(--color-primary);
      }

      .inactive-anchor-tag {
        background: #FEF0F0;
        border-radius: 4px;
        color: #E85D5D;
        display: inline-flex;
        font-size: 11px;
        font-weight: 600;
        margin-left: 6px;
        padding: 2px 6px;
        vertical-align: middle;
      }

      .platform-account-module {
        display: grid;
        gap: 8px;
      }

      .platform-account-list {
        display: grid;
        gap: 6px;
      }

      .platform-account-row {
        display: flex;
        align-items: center;
        gap: 12px;
        min-height: 36px;
        padding: 8px 12px;
        border-radius: var(--border-radius-sm);
        background: var(--color-bg-page);
        cursor: pointer;
      }

      .platform-account-name {
        width: 60px;
        flex: 0 0 60px;
        color: var(--color-text-primary);
        font-weight: 500;
      }

      .platform-account-meta {
        color: var(--color-text-secondary);
        font-size: 13px;
        line-height: 18px;
      }

      .platform-account-actions {
        display: inline-flex;
        gap: 8px;
        margin-left: auto;
      }

      .platform-account-actions button,
      .platform-copy-tag {
        border: 0;
        background: transparent;
        color: var(--color-primary);
        cursor: pointer;
        font-size: 12px;
        padding: 0;
      }

      .platform-account-actions button:hover,
      .platform-copy-tag:hover {
        text-decoration: underline;
      }

      .platform-account-form {
        display: grid;
        grid-template-columns: minmax(108px, 0.7fr) minmax(150px, 1fr) minmax(150px, 1fr) auto auto;
        gap: 8px;
        align-items: center;
        padding: 8px;
        border: 1px solid var(--color-border);
        border-radius: var(--border-radius-sm);
        background: #fff;
      }

      .platform-account-empty {
        color: var(--color-text-placeholder);
        font-size: 13px;
        padding: 8px 0;
      }

      .platform-dot {
        display: inline-block;
        width: 8px;
        height: 8px;
        border-radius: 50%;
        margin-right: 6px;
        vertical-align: middle;
        background: var(--platform-color, var(--color-text-disabled));
      }

      .platform-tag-list {
        display: flex;
        align-items: center;
        gap: 4px;
        flex-wrap: wrap;
      }

      .platform-mini-tag {
        display: inline-flex;
        align-items: center;
        min-height: 20px;
        border-radius: 2px;
        padding: 1px 4px;
        font-size: 11px;
        line-height: 16px;
        color: #fff;
        background: var(--platform-color, #8A8A8A);
      }

      .platform-copy-tag {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        min-height: 22px;
        border-radius: 2px;
        padding: 2px 6px;
        background: var(--color-bg-page);
        color: var(--color-text-primary);
        text-decoration: none;
      }

      .platform-copy-tag .platform-mini-tag {
        margin-right: 2px;
      }

      .platform-douyin { --platform-color: #000000; }
      .platform-shipinhao { --platform-color: #07C160; }
      .platform-xiaohongshu { --platform-color: #FE2C55; }
      .platform-kuaishou { --platform-color: #FF4906; }

      .boss-expire-alerts {
        display: grid;
        gap: 6px;
        margin-top: 8px;
      }

      .boss-expire-alert {
        appearance: none;
        background: #FEF6F0;
        border: 1px solid #F0D4B8;
        border-radius: 6px;
        color: var(--text-2);
        cursor: pointer;
        font-size: 12px;
        font-weight: 700;
        padding: 8px 14px;
        text-align: left;
      }

      .company-grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
        align-items: start;
      }

      .company-growth-layout {
        display: flex;
        gap: 24px;
        align-items: flex-start;
      }

      .company-directory-layout {
        display: grid;
        grid-template-columns: minmax(360px, 0.9fr) minmax(0, 1.6fr);
        gap: 24px;
        align-items: start;
      }

      .company-entity-profile-panel,
      .company-entity-overview-panel {
        background: var(--bg-primary, var(--color-bg-container));
        border: 1px solid var(--border-color, var(--color-border));
        border-radius: 8px;
        padding: 20px;
      }

      .company-entity-profile-panel .panel-header,
      .company-entity-overview-panel .panel-header {
        padding: 0 0 14px;
      }

      .company-entity-profile-panel .panel-body,
      .company-entity-overview-panel .panel-body {
        padding: 14px 0 0;
      }

      .company-entity-profile-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
      }

      .entity-info-card {
        min-height: 82px;
        border: 1px solid var(--color-border, #E7E7E7);
        border-radius: 8px;
        background: #fff;
        padding: 14px 16px;
      }

      .entity-info-card span {
        display: block;
        color: var(--color-text-secondary, #8A8A8A);
        font-size: 12px;
        margin-bottom: 8px;
      }

      .entity-info-card strong {
        color: var(--color-text-primary, #1A1A1A);
        display: block;
        font-size: 16px;
        font-weight: 700;
        line-height: 1.45;
        word-break: break-all;
      }

      .entity-info-card.sensitive strong {
        color: var(--color-primary, #0052D9);
      }

      .company-entity-note {
        color: var(--color-text-secondary, #8A8A8A);
        font-size: 13px;
        line-height: 1.7;
        margin-top: 14px;
        padding: 12px 14px;
        border-radius: 8px;
        background: var(--color-bg-page, #F5F6F7);
      }

      .company-drilldown-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        margin: 14px 0 16px;
      }

      .company-relation-grid {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 12px;
      }

      .company-relation-card {
        border: 1px solid var(--color-border, #E7E7E7);
        border-radius: 8px;
        background: #fff;
        padding: 14px 16px;
      }

      .company-relation-card span {
        color: var(--color-text-secondary, #8A8A8A);
        display: block;
        font-size: 12px;
      }

      .company-relation-card strong {
        color: var(--color-text-primary, #1A1A1A);
        display: block;
        font-size: 22px;
        font-weight: 700;
        margin-top: 8px;
      }

      .company-relation-card button {
        margin-top: 10px;
      }

      .legacy-growth-layout[hidden] {
        display: none !important;
      }

      .company-growth-form-column {
        flex: 0 0 calc(40% - 12px);
        min-width: 0;
      }

      .company-growth-report-column {
        flex: 1 1 calc(60% - 12px);
        min-width: 0;
      }

      .company-growth-form-panel,
      .company-growth-report-panel {
        background: var(--bg-primary, var(--color-bg-container));
        border: 1px solid var(--border-color, var(--color-border));
        border-radius: 8px;
        padding: 20px;
      }

      .company-growth-form-panel {
        position: sticky;
        top: 20px;
      }

      .company-growth-form-panel .panel-header,
      .company-growth-report-panel .panel-header {
        padding: 0 0 14px;
      }

      .company-growth-form-panel .panel-body,
      .company-growth-report-panel .panel-body {
        padding: 14px 0 0;
      }

      .compact-growth-form {
        gap: 0;
      }

      .compact-growth-form .field {
        margin-bottom: 12px;
      }

      .compact-growth-form .field-label {
        margin-bottom: 4px;
        font-size: 13px;
      }

      .growth-inline-row {
        display: flex;
        gap: 12px;
      }

      .growth-inline-row .field {
        flex: 1 1 50%;
        min-width: 0;
      }

      .growth-gmv-field {
        width: 50%;
      }

      .growth-compact-textarea {
        min-height: 48px;
        height: 48px;
        transition: height 0.2s ease;
      }

      .growth-compact-textarea:focus {
        height: 96px;
      }

      .growth-notes-textarea:focus {
        height: 120px;
      }

      .compact-growth-form > .btn-primary {
        width: auto;
        justify-self: flex-start;
        align-self: flex-start;
        padding: 10px 32px;
      }

      .company-growth-form-panel.is-rest-day .growth-active-field {
        display: none;
      }

      .company-growth-form-panel.is-rest-day #anchorGrowthAgentDisplay {
        display: none;
      }

      .company-growth-report-panel .company-table-wrap {
        max-height: 400px;
        overflow-y: auto;
      }

      .company-stack {
        display: grid;
        gap: 24px;
      }

      .cn-date-picker {
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 38px;
        min-width: 150px;
        border: 1px solid rgba(0,0,0,0.1);
        border-radius: var(--radius-sm);
        background: rgba(255,255,255,0.9);
        color: var(--text);
        padding: 0 12px;
        font-size: 13px;
        font-weight: 700;
        cursor: pointer;
        overflow: hidden;
      }

      .cn-date-picker button {
        position: relative;
        z-index: 1;
        width: 100%;
        min-height: 36px;
        border: 0;
        background: transparent;
        color: inherit;
        font: inherit;
        font-weight: 700;
        cursor: pointer;
        padding: 0;
      }

      .cn-date-picker:hover {
        border-color: rgba(0,0,0,0.2);
        background: #fff;
      }

      .cn-date-picker .native-picker {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        opacity: 0;
        cursor: pointer;
        pointer-events: auto;
        z-index: 2;
      }

      .company-month-label {
        color: var(--muted);
        font-size: 12px;
        font-weight: 700;
      }

      .monthly-summary-grid {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 12px;
      }

      .monthly-summary-grid div {
        display: grid;
        gap: 8px;
        border: 1px solid rgba(255,255,255,0.6);
        border-radius: var(--radius);
        background: rgba(255,255,255,0.78);
        padding: 16px;
        box-shadow: 0 1px 2px rgba(0,0,0,0.04), 0 8px 24px rgba(0,0,0,0.06);
        backdrop-filter: saturate(160%) blur(16px);
        -webkit-backdrop-filter: saturate(160%) blur(16px);
      }

      .monthly-summary-grid span {
        color: var(--muted);
        font-size: 12px;
        font-weight: 700;
        letter-spacing: 0;
      }

      .monthly-summary-grid strong {
        color: var(--text);
        font-size: 19px;
        font-weight: 600;
        letter-spacing: -0.2px;
      }

      .monthly-summary-grid .compare-line {
        color: var(--muted);
        font-size: 11px;
        font-weight: 700;
        line-height: 1.35;
      }

      .monthly-summary-grid .compare-mom,
      .monthly-summary-grid .compare-yoy {
        color: var(--muted);
        font-style: normal;
      }

      .company-panel .panel-header input {
        width: auto;
        min-width: 156px;
      }

      .company-inline-form {
        display: grid;
        gap: 14px;
      }

      .management-subgrid {
        display: grid;
        grid-template-columns: minmax(280px, 0.95fr) minmax(320px, 1.05fr);
        gap: 16px;
        align-items: start;
      }

      .management-card {
        display: grid;
        gap: 14px;
        border: 1px solid rgba(0,0,0,0.07);
        border-radius: var(--radius);
        background: var(--surface);
        padding: 18px;
      }

      .management-card-title {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
        border-bottom: 1px solid rgba(0,0,0,0.06);
        padding-bottom: 12px;
      }

      .management-card-title h3 {
        font-size: 16px;
        font-weight: 600;
        margin: 0 0 4px;
        color: var(--text);
      }

      .management-card-title p {
        margin: 0;
        color: var(--muted);
        font-size: 12px;
        line-height: 1.5;
      }

      .profile-edit-toggle {
        display: none;
      }

      .profile-edit-toggle.visible {
        display: inline-flex;
      }

      .anchor-readonly-summary {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
      }

      .readonly-box {
        min-height: 56px;
        border: 1px solid rgba(0,0,0,0.07);
        border-radius: var(--radius-sm);
        background: var(--surface-2);
        padding: 10px 12px;
      }

      .readonly-box span {
        display: block;
        color: var(--muted);
        font-size: 12px;
        font-weight: 700;
        margin-bottom: 5px;
      }

      .readonly-box strong {
        color: var(--text);
        font-size: 14px;
        overflow-wrap: anywhere;
      }

      .review-context {
        border: 1px solid rgba(22,119,255,0.25);
        border-radius: var(--radius-sm);
        background: rgba(22,119,255,0.06);
        color: #4096FF;
        font-size: 13px;
        font-weight: 700;
        line-height: 1.5;
        padding: 10px 12px;
      }

      .review-context.ready {
        border-color: rgba(46,125,94,0.2);
        background: var(--success-light);
        color: #1a5c3a;
      }

      .tag-input-box {
        display: flex;
        align-items: center;
        gap: 6px;
        flex-wrap: wrap;
        min-height: 42px;
        border: 1px solid rgba(0,0,0,0.1);
        border-radius: var(--radius-sm);
        background: rgba(255,255,255,0.9);
        padding: 6px;
        transition: border-color var(--transition), box-shadow var(--transition);
      }

      .tag-input-box:focus-within {
        border-color: var(--color-primary);
        box-shadow: 0 0 0 3px rgba(22,119,255,0.12);
      }

      .tag-input-box input {
        flex: 1;
        min-width: 140px;
        min-height: 28px;
        border: 0;
        padding: 0 4px;
        box-shadow: none;
        background: transparent;
      }

      .tag-input-box input:focus {
        outline: none;
        box-shadow: none;
      }

      .tag-remove {
        border: 0;
        background: transparent;
        color: var(--muted);
        cursor: pointer;
        font-weight: 600;
        padding: 0 0 0 3px;
      }

      .profile-drawer-overlay {
        position: fixed;
        inset: 0;
        z-index: 950;
        display: none;
        justify-content: flex-end;
        background: rgba(0,0,0,0.22);
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
      }

      .profile-drawer-overlay.visible {
        display: flex;
      }

      .profile-drawer {
        width: min(720px, calc(100vw - 24px));
        height: 100%;
        background: var(--surface);
        border-left: 1px solid rgba(0,0,0,0.08);
        box-shadow: -24px 0 72px rgba(0,0,0,0.14);
        display: grid;
        grid-template-rows: auto 1fr auto;
      }

      .profile-drawer-header,
      .profile-drawer-footer {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 20px 22px;
        border-bottom: 1px solid rgba(0,0,0,0.07);
        background: rgba(255,255,255,0.7);
      }

      .profile-drawer-footer {
        border-top: 1px solid rgba(0,0,0,0.07);
        border-bottom: 0;
        justify-content: flex-end;
      }

      .profile-drawer-header h2 {
        margin: 0;
        font-size: 20px;
        font-weight: 600;
        letter-spacing: -0.3px;
      }

      .profile-drawer-header p {
        margin: 4px 0 0;
        color: var(--muted);
        font-size: 12px;
      }

      .profile-drawer-body {
        overflow: auto;
        padding: 20px 22px 28px;
        display: grid;
        gap: 16px;
      }

      .drawer-tabs {
        display: flex;
        gap: 6px;
        padding: 0 22px 16px;
        border-bottom: 1px solid rgba(0,0,0,0.07);
      }

      .drawer-tab {
        min-height: 34px;
        border: 1px solid rgba(0,0,0,0.1);
        border-radius: var(--radius-sm);
        background: var(--surface);
        color: var(--text-2);
        padding: 0 14px;
        font-weight: 700;
        font-size: 13px;
        transition: background var(--transition), color var(--transition), border-color var(--transition);
      }

      .drawer-tab:hover {
        background: rgba(0,0,0,0.04);
        color: var(--text);
      }

      .drawer-tab.active {
        background: var(--color-primary);
        color: #fff;
        border-color: var(--color-primary);
        box-shadow: 0 2px 8px rgba(22,119,255,0.28);
      }

      .drawer-panel[hidden] {
        display: none;
      }

      .profile-card-section {
        border: 1px solid rgba(0,0,0,0.07);
        border-radius: var(--radius);
        background: var(--surface);
        padding: 16px;
      }

      .profile-card-section summary {
        cursor: pointer;
        font-weight: 600;
        color: var(--text);
        margin-bottom: 12px;
      }

      .profile-card-section h3 {
        margin: 0 0 14px;
        font-size: 14px;
        font-weight: 600;
        color: var(--text);
        letter-spacing: 0;
      }

      .profile-card-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
      }

      .profile-card-grid .wide {
        grid-column: 1 / -1;
      }

      .employee-form-section-title {
        grid-column: 1 / -1;
        margin-top: 4px;
        padding: 10px 0 7px;
        border-bottom: 1px solid var(--color-border, #e5e7eb);
        color: var(--color-text-primary, #222);
        font-size: 14px;
        font-weight: 600;
      }

      .employee-form-section-title:first-child {
        margin-top: 0;
        padding-top: 0;
      }

      .phone-field {
        display: grid;
        grid-template-columns: 1fr auto;
        gap: 8px;
      }

      .score-row {
        display: grid;
        grid-template-columns: 1fr 58px;
        align-items: center;
        gap: 10px;
      }

      .drawer-monthly-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        flex-wrap: wrap;
        margin-bottom: 14px;
      }

      .drawer-month-switcher {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        border: 1px solid rgba(0,0,0,0.09);
        border-radius: var(--radius-sm);
        background: var(--surface-2);
        padding: 4px;
      }

      .drawer-month-switcher button {
        min-height: 30px;
        border: 0;
        border-radius: 6px;
        background: transparent;
        color: var(--text-2);
        padding: 0 10px;
        font-weight: 700;
        cursor: pointer;
        transition: background var(--transition), color var(--transition);
      }

      .drawer-month-switcher button:hover {
        background: var(--surface);
        color: var(--text);
      }

      .drawer-month-label {
        min-width: 96px;
        text-align: center;
        color: var(--text);
        font-size: 13px;
        font-weight: 700;
      }

      .drawer-month-input {
        position: absolute;
        opacity: 0;
        pointer-events: none;
        width: 1px;
        height: 1px;
      }

      .drawer-session-list {
        display: grid;
        border: 1px solid rgba(0,0,0,0.07);
        border-radius: var(--radius);
        overflow: hidden;
      }

      .drawer-session-row {
        display: grid;
        grid-template-columns: minmax(110px, 0.9fr) minmax(86px, 0.65fr) minmax(80px, 0.55fr) minmax(110px, 0.75fr) minmax(140px, 1fr) 92px;
        gap: 10px;
        align-items: center;
        padding: 14px 16px;
        border-bottom: 1px solid rgba(0,0,0,0.05);
        transition: background var(--transition);
      }

      .drawer-session-row:last-child { border-bottom: 0; }
      .drawer-session-row:hover { background: rgba(22,119,255,0.03); }

      .drawer-session-cell {
        display: grid;
        gap: 4px;
        min-width: 0;
      }

      .drawer-session-cell span {
        color: var(--muted);
        font-size: 12px;
        font-weight: 700;
      }

      .drawer-session-cell strong {
        color: var(--text);
        font-size: 14px;
        overflow-wrap: anywhere;
      }

      .drawer-session-review {
        grid-column: 1 / -1;
        border: 1px solid rgba(0,0,0,0.07);
        border-radius: var(--radius-sm);
        background: var(--surface-2);
        color: var(--text-2);
        font-size: 12px;
        line-height: 1.65;
        padding: 10px 12px;
      }

      .drawer-session-review[hidden] { display: none; }

      .anchor-toolbar {
        display: flex;
        align-items: end;
        justify-content: space-between;
        gap: 12px;
        flex-wrap: wrap;
      }

      .profile-page {
        display: grid;
        gap: 16px;
        align-content: start;
      }

      .personnel-profile-page {
        gap: 0;
      }

      .personnel-profile-workspace {
        display: grid;
        min-width: 0;
        overflow: hidden;
        border: 1px solid var(--color-border, #e5e7eb);
        border-radius: 8px;
        background: #fff;
      }

      .personnel-profile-summary {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        border-bottom: 1px solid var(--color-border, #e5e7eb);
      }

      .personnel-profile-metric {
        display: grid;
        gap: 5px;
        min-width: 0;
        min-height: 72px;
        align-content: center;
        padding: 12px 14px;
        border-right: 1px solid var(--color-border, #e5e7eb);
        background: #fff;
      }

      .personnel-profile-metric:last-child {
        border-right: 0;
      }

      .personnel-profile-metric span,
      .personnel-profile-metric small {
        overflow: hidden;
        color: var(--muted, #6b7280);
        font-size: 12px;
        line-height: 1.35;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .personnel-profile-metric strong {
        overflow: hidden;
        color: var(--text, #111827);
        font-size: 20px;
        line-height: 1.2;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .profile-list-toolbar {
        display: flex;
        flex-direction: row;
        align-items: flex-end;
        gap: 12px;
        flex-wrap: wrap;
      }

      .profile-list-toolbar .field {
        width: 140px;
        flex: 0 0 140px;
      }

      .profile-list-toolbar .field-label {
        font-size: 12px;
        color: #8A8A8A;
      }

      .profile-list-toolbar .btn {
        flex: 0 0 auto;
        margin-left: 0;
      }

      .profile-list-toolbar .field + .btn {
        margin-left: auto;
      }

      .employee-roster-entry-toolbar {
        justify-content: flex-end;
        align-items: center;
        margin-bottom: -4px;
      }

      .employee-roster-entry-actions {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: wrap;
      }

      .personnel-profile-toolbar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: end;
        gap: 12px;
        padding: 12px;
        border-bottom: 1px solid var(--color-border, #e5e7eb);
        background: var(--surface-2, #f8fafc);
      }

      .personnel-profile-filters,
      .personnel-profile-actions {
        display: flex;
        align-items: flex-end;
        gap: 10px;
        min-width: 0;
      }

      .personnel-profile-actions {
        justify-content: flex-end;
      }

      .personnel-profile-toolbar .field {
        width: min(170px, 18vw);
        min-width: 128px;
        flex: 0 1 170px;
      }

      .personnel-profile-toolbar .btn {
        margin: 0;
      }

      .personnel-profile-table {
        min-width: 1120px;
        table-layout: fixed;
      }

      .personnel-profile-table th,
      .personnel-profile-table td {
        overflow: hidden;
        padding: 9px 12px;
        text-overflow: ellipsis;
      }

      .personnel-profile-table-wrap {
        border: 0;
        border-radius: 0;
        box-shadow: none;
      }

      .personnel-profile-meta {
        min-height: 36px;
        padding: 9px 12px;
        border-top: 1px solid var(--color-border, #e5e7eb);
        background: #fff;
      }

      .user-management-filter-toolbar {
        padding: 12px;
        border: 1px solid var(--color-border, #e5e7eb);
        border-radius: 8px;
        background: #fff;
      }

      .personnel-profile-table td > strong + small,
      .personnel-profile-table .table-progress-cell small {
        display: block;
        margin-top: 3px;
        color: var(--muted, #6b7280);
        font-size: 11px;
        font-weight: 500;
        line-height: 1.35;
      }

      .personnel-ownership-cell {
        display: grid;
        gap: 4px;
        min-width: 0;
      }

      .personnel-ownership-cell strong,
      .personnel-ownership-cell span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .personnel-ownership-cell span {
        color: var(--muted, #6b7280);
        font-size: 12px;
      }

      .personnel-profile-table .personnel-anchor-name-column { width: 148px; }
      .personnel-profile-table .personnel-anchor-platform-column { width: 168px; }
      .personnel-profile-table .personnel-anchor-ownership-column { width: 156px; }
      .personnel-profile-table .personnel-anchor-status-column { width: 116px; }
      .personnel-profile-table .personnel-anchor-session-column { width: 116px; }
      .personnel-profile-table .personnel-anchor-gmv-column,
      .personnel-profile-table .personnel-anchor-average-column { width: 132px; }
      .personnel-profile-table .personnel-anchor-action-column { width: 152px; }

      .personnel-profile-table .personnel-agent-name-column { width: 128px; }
      .personnel-profile-table .personnel-agent-company-column { width: 132px; }
      .personnel-profile-table .personnel-agent-status-column { width: 100px; }
      .personnel-profile-table .personnel-agent-coverage-column { width: 132px; }
      .personnel-profile-table .personnel-agent-gmv-column { width: 132px; }
      .personnel-profile-table .personnel-agent-efficiency-column { width: 142px; }
      .personnel-profile-table .personnel-agent-progress-column { width: 160px; }
      .personnel-profile-table .personnel-agent-attention-column { width: 126px; }
      .personnel-profile-table .personnel-agent-action-column { width: 112px; }

      .monthly-snapshot-toolbar {
        justify-content: flex-start;
      }

      .monthly-snapshot-toolbar .btn {
        margin-left: 0;
      }

      .monthly-snapshot-table input,
      .monthly-snapshot-table select {
        width: 100%;
        min-width: 96px;
        min-height: 32px;
      }

      .snapshot-diff-warning {
        color: var(--color-warning);
        font-weight: 600;
      }

      .snapshot-diff-ok {
        color: var(--color-text-secondary);
      }

      .anchor-filter-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(150px, 190px));
        gap: 12px;
        justify-content: end;
      }

      .profile-table-wrap {
        overflow: auto;
        border: 1px solid #EBEBEB;
        border-radius: 8px;
        background: var(--surface);
        min-height: 0;
      }

      .issue-feedback-layout {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
        align-items: stretch;
      }

      .issue-feedback-form,
      .issue-feedback-list-panel,
      .issue-feedback-card {
        border: 1px solid var(--color-border);
        border-radius: 8px;
        background: var(--surface);
      }

      .issue-feedback-form,
      .issue-feedback-list-panel {
        padding: 16px;
        min-height: 360px;
        display: flex;
        flex-direction: column;
      }

      .issue-feedback-header,
      .issue-feedback-list-head,
      .issue-feedback-card-head,
      .issue-feedback-actions,
      .issue-feedback-upload-row,
      .issue-feedback-submit-row {
        display: flex;
        align-items: center;
        gap: 10px;
      }

      .issue-feedback-header,
      .issue-feedback-list-head,
      .issue-feedback-card-head {
        justify-content: space-between;
      }

      .issue-feedback-header h3,
      .issue-feedback-list-head h3 {
        margin: 0;
        font-size: 16px;
      }

      .issue-feedback-header p,
      .issue-feedback-list-head span,
      .issue-feedback-card-head span,
      .issue-feedback-upload-row span {
        color: var(--muted);
        font-size: 12px;
      }

      .issue-feedback-form textarea,
      .issue-feedback-admin textarea {
        width: 100%;
        resize: vertical;
        border: 1px solid var(--color-border);
        border-radius: 8px;
        padding: 10px 12px;
        font: inherit;
        line-height: 1.5;
        background: #fff;
      }

      .issue-feedback-form textarea {
        min-height: 132px;
        margin-top: 14px;
        flex: 1 1 132px;
      }

      .issue-feedback-upload-row {
        flex-wrap: wrap;
        margin-top: 12px;
      }

      .issue-feedback-submit-row {
        justify-content: flex-end;
        margin-top: 14px;
      }

      .issue-feedback-list {
        display: grid;
        gap: 12px;
        margin-top: 14px;
        flex: 1 1 auto;
        min-height: 0;
      }

      .issue-feedback-list.is-empty {
        place-items: center;
      }

      .issue-feedback-list.is-empty .empty-state {
        width: 100%;
        min-height: 0;
        padding: 36px 20px;
      }

      .issue-feedback-card {
        display: grid;
        gap: 12px;
        padding: 14px;
      }

      .issue-feedback-card.pending {
        border-left: 3px solid var(--color-warning);
      }

      .issue-feedback-card.done {
        border-left: 3px solid var(--color-success);
      }

      .issue-feedback-card.withdrawn {
        border-left: 3px solid var(--color-border-strong);
        background: #FAFAFA;
      }

      .issue-feedback-card-head strong {
        display: block;
        font-size: 14px;
      }

      .issue-feedback-card p {
        margin: 0;
        white-space: pre-wrap;
        line-height: 1.55;
      }

      .issue-feedback-status {
        display: inline-flex;
        align-items: center;
        height: 24px;
        padding: 0 9px;
        border-radius: 999px;
        font-size: 12px;
        font-weight: 600;
      }

      .issue-feedback-status.pending {
        background: rgba(245, 158, 11, 0.12);
        color: #B45309;
      }

      .issue-feedback-status.done {
        background: rgba(34, 197, 94, 0.12);
        color: #15803D;
      }

      .issue-feedback-status.withdrawn {
        background: rgba(100, 116, 139, 0.12);
        color: #475569;
      }

      .issue-feedback-image,
      .issue-feedback-draft-image {
        display: grid;
        gap: 8px;
        width: 100%;
        padding: 0;
        border: 0;
        background: transparent;
        text-align: left;
        cursor: pointer;
      }

      .issue-feedback-image img,
      .issue-feedback-draft-image img {
        width: 100%;
        max-height: 220px;
        object-fit: contain;
        border: 1px solid var(--color-border);
        border-radius: 8px;
        background: #F8FAFC;
      }

      .issue-feedback-image span,
      .issue-feedback-note {
        color: var(--color-text-secondary);
        font-size: 12px;
      }

      .issue-feedback-note {
        padding: 10px 12px;
        border-radius: 8px;
        background: #F8FAFC;
        white-space: pre-wrap;
      }

      .issue-feedback-admin {
        display: grid;
        gap: 10px;
      }

      .issue-feedback-actions {
        justify-content: flex-end;
        flex-wrap: wrap;
      }

      .issue-feedback-user-actions {
        display: flex;
        justify-content: flex-end;
      }

      .control-anonymous-option {
        grid-column: 1 / -1;
        display: flex;
        align-items: flex-start;
        gap: 10px;
        padding: 12px 14px;
        border: 1px solid #BFDBFE;
        border-radius: 8px;
        background: #EFF6FF;
        cursor: pointer;
      }

      .control-anonymous-option input {
        width: 16px;
        height: 16px;
        margin: 2px 0 0;
        flex: 0 0 auto;
      }

      .control-anonymous-option span,
      .control-reporter-cell {
        display: grid;
        gap: 3px;
      }

      .control-anonymous-option strong {
        color: var(--color-text-primary);
        font-size: 13px;
      }

      .control-anonymous-option small {
        color: var(--color-text-secondary);
        font-size: 12px;
        line-height: 1.5;
      }

      .control-reporter-cell {
        justify-items: start;
      }

      .control-anonymous-badge {
        display: inline-flex;
        align-items: center;
        min-height: 20px;
        padding: 0 7px;
        border-radius: 999px;
        background: #EFF6FF;
        color: #1D4ED8;
        font-size: 11px;
        font-weight: 600;
        white-space: nowrap;
      }

      .asset-equipment-room-actions {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
        white-space: nowrap;
      }

      .asset-copy-live-room-dialog {
        width: min(560px, calc(100vw - 32px));
      }

      .asset-copy-live-room-card {
        max-width: none;
      }

      .asset-copy-live-room-card .modal-body {
        display: grid;
        gap: 14px;
        padding: 18px 22px;
      }

      .asset-copy-live-room-source {
        padding: 10px 12px;
        border: 1px solid #E6EBF0;
        background: #F8FAFC;
        color: #475569;
        font-size: 13px;
      }

      .asset-copy-live-room-target {
        padding: 10px 12px;
        border-left: 3px solid var(--primary);
        background: #F5F9FF;
        color: #475569;
        font-size: 13px;
        line-height: 1.55;
      }

      .asset-copy-live-room-option {
        display: flex;
        align-items: flex-start;
        gap: 10px;
        padding: 12px;
        border: 1px solid #DCE7F3;
        background: #F8FBFF;
        cursor: pointer;
      }

      .asset-copy-live-room-option input {
        margin: 3px 0 0;
      }

      .asset-copy-live-room-option span {
        display: grid;
        gap: 4px;
      }

      .asset-copy-live-room-option small {
        color: #64748B;
        line-height: 1.5;
      }

      @media (max-width: 860px) {
        .issue-feedback-layout {
          grid-template-columns: 1fr;
        }

        .issue-feedback-form,
        .issue-feedback-list-panel {
          min-height: 0;
        }

        .issue-feedback-header,
        .issue-feedback-list-head,
        .issue-feedback-card-head {
          align-items: flex-start;
          flex-direction: column;
        }
      }

      #recruitCandidateHost,
      #recruitMetaphysicsHost {
        max-height: calc(100vh - 330px);
        overflow: auto;
      }

      #recruitMetaphysicsHost {
        max-height: calc(100vh - 220px);
      }

      .recruit-metaphysics-actionbar {
        position: sticky;
        bottom: 0;
        z-index: 4;
        display: flex;
        align-items: center;
        gap: 12px;
        justify-content: flex-start;
        margin-top: 10px;
        padding: 12px 16px;
        border: 1px solid var(--color-border);
        border-radius: var(--border-radius-md);
        background: #fff;
        box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.04);
      }

      .metaphysics-summary-strip {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 10px 12px;
        border-bottom: 1px solid var(--color-border);
        background: #fff;
      }

      .metaphysics-summary-left,
      .metaphysics-summary-right {
        display: flex;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
      }

      .metaphysics-count-pill {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        padding: 3px 8px;
        border-radius: 999px;
        background: var(--color-bg-page);
        color: var(--color-text-secondary);
        font-size: 12px;
        font-weight: 500;
      }

      .metaphysics-count-pill strong {
        color: var(--color-primary);
      }

      .metaphysics-table {
        min-width: 1120px;
        table-layout: fixed;
      }

      .metaphysics-table th:nth-child(1),
      .metaphysics-table td:nth-child(1) {
        width: 230px;
      }

      .metaphysics-table th:nth-child(2),
      .metaphysics-table td:nth-child(2) {
        width: 300px;
      }

      .metaphysics-table th:nth-child(3),
      .metaphysics-table td:nth-child(3) {
        width: 130px;
      }

      .metaphysics-table th:nth-child(4),
      .metaphysics-table td:nth-child(4) {
        width: auto;
      }

      .metaphysics-table th:nth-child(5),
      .metaphysics-table td:nth-child(5) {
        width: 110px;
      }

      .metaphysics-candidate {
        display: flex;
        flex-direction: column;
        gap: 4px;
        min-width: 0;
      }

      .metaphysics-candidate strong {
        font-size: 14px;
        color: var(--color-text-primary);
      }

      .metaphysics-candidate span {
        color: var(--color-text-secondary);
        font-size: 12px;
        line-height: 1.45;
        white-space: normal;
      }

      .metaphysics-birth {
        display: block;
        min-height: 34px;
        padding: 8px 10px;
        border-radius: var(--border-radius-sm);
        background: var(--color-bg-page);
        color: var(--color-text-primary);
        line-height: 1.6;
        white-space: normal;
        word-break: break-word;
      }

      .metaphysics-table input[data-meta-field="metaphysicsScore"] {
        width: 96px;
        text-align: center;
      }

      .metaphysics-table textarea[data-meta-field="metaphysicsNote"] {
        min-height: 44px;
        height: 44px;
        resize: vertical;
      }

      .metaphysics-table textarea[data-meta-field="metaphysicsNote"]:focus {
        min-height: 88px;
      }

      .recruit-score-cell {
        text-align: center;
      }

      .recruit-candidate-priority-row > td {
        background: #fffdf5;
      }

      .recruit-candidate-priority-row > td:first-child {
        box-shadow: inset 3px 0 0 #d97706;
      }

      .recruit-score-badge {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 4px 8px;
        border: 1px solid #f2c66d;
        border-radius: 999px;
        background: #fff7dc;
        color: #92400e;
        white-space: nowrap;
      }

      .recruit-score-badge strong {
        font-size: 13px;
      }

      .recruit-score-badge small {
        font-size: 11px;
        font-weight: 700;
      }

      .profile-data-table {
        width: 100%;
        min-width: 1080px;
        border-collapse: separate;
        border-spacing: 0;
      }

      .employee-roster-table {
        min-width: 3200px;
      }

      .employee-roster-table th,
      .employee-roster-table td {
        max-width: 220px;
        overflow: hidden;
        text-overflow: ellipsis;
      }

      #employeeView .employee-roster-table th {
        position: static;
        top: auto;
      }

      #employeeView .employee-roster-table th.employee-sticky-col {
        position: sticky;
        top: auto;
      }

      #employeeView .employee-roster-table th.table-action-column {
        position: sticky;
        right: 0;
        top: auto;
      }

      .employee-roster-table .employee-sticky-col {
        position: sticky;
        background: #fff;
        z-index: 3;
      }

      .employee-roster-table th.employee-sticky-col {
        background: #F7F5F3;
        z-index: 6;
      }

      .employee-roster-table .employee-sticky-index {
        left: 0;
        width: 48px;
        min-width: 48px;
        max-width: 48px;
        color: var(--color-text-tertiary, #999);
      }

      .employee-roster-table .employee-sticky-select {
        left: 48px;
        width: 56px;
        min-width: 56px;
        max-width: 56px;
      }

      .employee-roster-table .employee-sticky-status {
        left: 104px;
        width: 120px;
        min-width: 120px;
        max-width: 120px;
      }

      .employee-roster-table .employee-sticky-company {
        left: 224px;
        width: 160px;
        min-width: 160px;
        max-width: 160px;
      }

      .employee-roster-table .employee-sticky-name {
        left: 384px;
        width: 140px;
        min-width: 140px;
        max-width: 140px;
        box-shadow: 8px 0 12px rgba(15, 23, 42, 0.06);
      }

      .employee-roster-table th:last-child,
      .employee-roster-table td:last-child,
      #anchorTableHost .profile-data-table th:last-child,
      #anchorTableHost .profile-data-table td:last-child,
      #agentTableHost .profile-data-table th:last-child,
      #agentTableHost .profile-data-table td:last-child,
      #assetTableHost .profile-data-table th:last-child,
      #assetTableHost .profile-data-table td:last-child,
      #snapshotTableHost .profile-data-table th:last-child,
      #snapshotTableHost .profile-data-table td:last-child,
      #recruitCandidateHost .profile-data-table th:last-child,
      #recruitCandidateHost .profile-data-table td:last-child,
      #recruitMetaphysicsHost .profile-data-table th:last-child,
      #recruitMetaphysicsHost .profile-data-table td:last-child,
      #adminRuleTableHost .profile-data-table th:last-child,
      #adminRuleTableHost .profile-data-table td:last-child,
      #goods-productsView .profile-data-table th:last-child,
      #goods-productsView .profile-data-table td:last-child,
      #userView .profile-data-table th:last-child,
      #userView .profile-data-table td:last-child,
      #errorLogTableHost .profile-data-table th:last-child,
      #errorLogTableHost .profile-data-table td:last-child,
      #operationLogTableHost .profile-data-table th:last-child,
      #operationLogTableHost .profile-data-table td:last-child,
      #trashTableHost .profile-data-table th:last-child,
      #trashTableHost .profile-data-table td:last-child {
        position: sticky;
        right: 0;
        z-index: 3;
        background: #fff;
        box-shadow: -8px 0 14px rgba(15, 23, 42, 0.06);
      }

      .employee-roster-table th:last-child,
      #anchorTableHost .profile-data-table th:last-child,
      #agentTableHost .profile-data-table th:last-child,
      #assetTableHost .profile-data-table th:last-child,
      #snapshotTableHost .profile-data-table th:last-child,
      #recruitCandidateHost .profile-data-table th:last-child,
      #recruitMetaphysicsHost .profile-data-table th:last-child,
      #adminRuleTableHost .profile-data-table th:last-child,
      #goods-productsView .profile-data-table th:last-child,
      #userView .profile-data-table th:last-child,
      #errorLogTableHost .profile-data-table th:last-child,
      #operationLogTableHost .profile-data-table th:last-child,
      #trashTableHost .profile-data-table th:last-child {
        z-index: 7;
        background: #F7F5F3;
      }

      .employee-roster-table tbody tr:nth-child(even) td:last-child,
      #anchorTableHost .profile-data-table tbody tr:nth-child(even) td:last-child,
      #agentTableHost .profile-data-table tbody tr:nth-child(even) td:last-child,
      #assetTableHost .profile-data-table tbody tr:nth-child(even) td:last-child,
      #snapshotTableHost .profile-data-table tbody tr:nth-child(even) td:last-child,
      #recruitCandidateHost .profile-data-table tbody tr:nth-child(even) td:last-child,
      #recruitMetaphysicsHost .profile-data-table tbody tr:nth-child(even) td:last-child,
      #adminRuleTableHost .profile-data-table tbody tr:nth-child(even) td:last-child,
      #goods-productsView .profile-data-table tbody tr:nth-child(even) td:last-child,
      #userView .profile-data-table tbody tr:nth-child(even) td:last-child,
      #errorLogTableHost .profile-data-table tbody tr:nth-child(even) td:last-child,
      #operationLogTableHost .profile-data-table tbody tr:nth-child(even) td:last-child,
      #trashTableHost .profile-data-table tbody tr:nth-child(even) td:last-child {
        background: #FAFAF8;
      }

      .employee-roster-table tbody tr:hover td:last-child,
      #anchorTableHost .profile-data-table tbody tr:hover td:last-child,
      #agentTableHost .profile-data-table tbody tr:hover td:last-child,
      #assetTableHost .profile-data-table tbody tr:hover td:last-child,
      #snapshotTableHost .profile-data-table tbody tr:hover td:last-child,
      #recruitCandidateHost .profile-data-table tbody tr:hover td:last-child,
      #recruitMetaphysicsHost .profile-data-table tbody tr:hover td:last-child,
      #adminRuleTableHost .profile-data-table tbody tr:hover td:last-child,
      #goods-productsView .profile-data-table tbody tr:hover td:last-child,
      #userView .profile-data-table tbody tr:hover td:last-child,
      #errorLogTableHost .profile-data-table tbody tr:hover td:last-child,
      #operationLogTableHost .profile-data-table tbody tr:hover td:last-child,
      #trashTableHost .profile-data-table tbody tr:hover td:last-child {
        background: #FDFCFB;
      }

      #anchorTableHost .profile-data-table th:last-child,
      #anchorTableHost .profile-data-table td:last-child,
      #agentTableHost .profile-data-table th:last-child,
      #agentTableHost .profile-data-table td:last-child,
      #assetTableHost .profile-data-table th:last-child,
      #assetTableHost .profile-data-table td:last-child,
      #snapshotTableHost .profile-data-table th:last-child,
      #snapshotTableHost .profile-data-table td:last-child,
      #recruitCandidateHost .profile-data-table th:last-child,
      #recruitCandidateHost .profile-data-table td:last-child,
      #recruitMetaphysicsHost .profile-data-table th:last-child,
      #recruitMetaphysicsHost .profile-data-table td:last-child,
      #adminRuleTableHost .profile-data-table th:last-child,
      #adminRuleTableHost .profile-data-table td:last-child {
        min-width: 132px;
        width: 132px;
      }

      .employee-roster-table .employee-roster-row-left .employee-sticky-col {
        background: #fafafa;
      }

      .employee-column-title {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        min-width: 0;
      }

      .employee-column-hide-button {
        margin-left: 6px;
        width: 18px;
        height: 18px;
        border: 0;
        border-radius: 999px;
        background: transparent;
        color: var(--color-text-tertiary, #999);
        cursor: pointer;
        font-size: 14px;
        line-height: 18px;
        vertical-align: middle;
      }

      .employee-column-hide-button:hover {
        background: var(--danger-light);
        color: var(--color-danger);
      }

      .employee-import-sheet-bar {
        display: grid;
        grid-template-columns: minmax(260px, 420px) minmax(0, 1fr);
        align-items: end;
        gap: 12px;
        padding: 12px;
        margin-bottom: 12px;
        border: 1px solid var(--color-border, #dcdfe6);
        background: var(--color-bg-subtle, #f7f8fa);
      }

      .employee-import-sheet-bar .field-hint {
        margin: 0 0 8px;
      }

      .employee-import-preview-table {
        min-width: 1120px;
      }

      .employee-roster-actions {
        display: flex;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
        margin: 12px 0;
      }

      .employee-roster-field-views {
        display: inline-flex;
        align-items: center;
        gap: 2px;
        padding: 3px;
        border: 1px solid var(--color-border, #dcdfe6);
        border-radius: 6px;
        background: var(--color-bg-subtle, #f7f8fa);
      }

      .employee-roster-field-view {
        min-height: 30px;
        border: 0;
        border-radius: 4px;
        background: transparent;
        color: var(--color-text-secondary, #666);
        padding: 0 12px;
        cursor: pointer;
        white-space: nowrap;
      }

      .employee-roster-field-view.active {
        background: #fff;
        color: var(--color-primary, #1677ff);
        box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
        font-weight: 600;
      }

      .employee-roster-status-tabs {
        display: flex;
        align-items: center;
        gap: 8px;
        margin: 0;
        padding: 4px 0 10px;
        flex-wrap: wrap;
      }

      .employee-roster-scope-summary {
        margin-left: auto;
        color: var(--color-text-tertiary, #8a8a8a);
        font-size: 12px;
        white-space: nowrap;
      }

      .employee-roster-status-tab {
        border: 1px solid var(--color-border, #dcdfe6);
        border-radius: 999px;
        background: #fff;
        color: var(--color-text-secondary, #666);
        min-height: 32px;
        padding: 0 12px;
        cursor: pointer;
      }

      .employee-roster-status-tab span {
        margin-left: 5px;
        color: var(--color-text-tertiary, #999);
      }

      .employee-roster-status-tab.active {
        border-color: var(--color-primary);
        background: rgba(22, 119, 255, 0.08);
        color: var(--color-primary);
        font-weight: 600;
      }

      .employee-roster-status-tab.danger {
        border-color: rgba(255, 77, 79, 0.35);
        color: var(--color-danger);
      }

      .employee-roster-admin-note {
        color: var(--color-text-tertiary, #999);
        font-size: 12px;
      }

      .employee-roster-filter-shell {
        padding: 10px 0;
        border-top: 1px solid var(--color-border-light, #edf0f5);
        border-bottom: 1px solid var(--color-border-light, #edf0f5);
      }

      .employee-roster-filter-bar {
        display: grid;
        grid-template-columns: repeat(5, minmax(130px, 1fr)) auto;
        align-items: flex-end;
        gap: 10px;
        margin: 0;
      }

      .employee-roster-filter-field {
        width: 100%;
        margin: 0;
        min-width: 0;
      }

      .employee-roster-filter-field select {
        width: 100%;
      }

      .employee-roster-company-filter {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: end;
        gap: 6px;
        min-width: 0;
      }

      .employee-roster-company-scope-button {
        min-height: 38px;
        border: 0;
        background: transparent;
        color: var(--color-primary, #1677ff);
        padding: 0 4px;
        cursor: pointer;
        white-space: nowrap;
      }

      .employee-roster-company-scope-button span {
        display: block;
        color: var(--color-text-tertiary, #8a8a8a);
        font-size: 11px;
      }

      .employee-roster-company-scope-panel {
        margin-top: 10px;
        padding: 14px;
        border: 1px solid var(--color-border, #dcdfe6);
        border-radius: 10px;
        background: var(--color-bg-page, #f7f9fc);
      }

      .employee-roster-company-scope-head,
      .employee-roster-company-scope-footer {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
      }

      .employee-roster-company-scope-head p {
        margin: 4px 0 0;
        color: var(--color-text-tertiary, #8a8a8a);
        font-size: 12px;
      }

      .employee-roster-company-scope-shortcuts {
        display: flex;
        gap: 8px;
      }

      .employee-roster-company-scope-shortcuts button {
        border: 0;
        background: transparent;
        color: var(--color-primary, #1677ff);
        cursor: pointer;
      }

      .employee-roster-company-scope-options {
        display: grid;
        grid-template-columns: repeat(4, minmax(170px, 1fr));
        gap: 8px;
        margin: 12px 0;
      }

      .employee-roster-company-scope-options label {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr);
        gap: 2px 8px;
        align-items: center;
        padding: 9px 10px;
        border: 1px solid var(--color-border-light, #edf0f5);
        border-radius: 8px;
        background: #fff;
        cursor: pointer;
      }

      .employee-roster-company-scope-options input {
        grid-row: 1 / span 2;
      }

      .employee-roster-company-scope-options small {
        color: var(--color-text-tertiary, #8a8a8a);
      }

      .employee-roster-company-scope-footer {
        justify-content: flex-end;
      }

      .employee-roster-company-scope-footer > span {
        margin-right: auto;
        color: var(--color-text-secondary, #666);
        font-size: 12px;
      }

      .employee-roster-more-filter-button {
        min-width: 118px;
        white-space: nowrap;
      }

      .employee-roster-more-filter-button span {
        margin-left: 6px;
        color: var(--color-text-tertiary, #8a8a8a);
        font-size: 12px;
      }

      .employee-roster-secondary-filters {
        display: grid;
        grid-template-columns: repeat(8, minmax(120px, 1fr));
        gap: 10px;
        margin-top: 10px;
        padding-top: 10px;
        border-top: 1px dashed var(--color-border, #dcdfe6);
      }

      @media (max-width: 1360px) {
        .employee-roster-filter-bar {
          grid-template-columns: repeat(3, minmax(150px, 1fr));
        }

        .employee-roster-secondary-filters {
          grid-template-columns: repeat(4, minmax(140px, 1fr));
        }

        .employee-roster-company-scope-options {
          grid-template-columns: repeat(2, minmax(170px, 1fr));
        }
      }

      .employee-roster-row-left {
        background: rgba(0, 0, 0, 0.018);
        color: var(--color-text-tertiary, #999);
      }

      .employee-contract-badge {
        display: inline-flex;
        align-items: center;
        min-height: 22px;
        border-radius: 999px;
        padding: 2px 8px;
        background: rgba(0, 0, 0, 0.04);
        color: var(--color-text-secondary, #666);
        white-space: nowrap;
      }

      .employee-contract-badge.danger {
        background: var(--danger-light);
        color: var(--color-danger);
        font-weight: 600;
      }

      .employee-roster-create-row td {
        border-top: 2px solid rgba(22, 119, 255, 0.28);
        background: #f8fbff;
      }

      .employee-roster-create-row .employee-sticky-col,
      .employee-roster-create-row .table-action-column {
        background: #f8fbff;
      }

      .employee-create-input {
        width: 100%;
        min-width: 108px;
        height: 32px;
        border: 1px solid #c8d8ee;
        border-radius: 4px;
        background: #fff;
        padding: 0 8px;
        color: var(--color-text-primary, #222);
        font-size: 12px;
      }

      .employee-create-input:focus {
        border-color: var(--color-primary, #1677ff);
        outline: 2px solid rgba(22, 119, 255, 0.12);
      }

      .employee-create-empty {
        color: #b5b5b5;
        font-size: 12px;
      }

      .employee-roster-pagination {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        padding: 12px 0 4px;
        color: var(--color-text-secondary, #666);
        font-size: 13px;
      }

      .employee-roster-pagination-controls,
      .employee-roster-pagination-controls label {
        display: flex;
        align-items: center;
        gap: 8px;
      }

      .employee-roster-pagination-controls select {
        width: 64px;
        height: 32px;
      }

      .employee-roster-pagination-controls .btn {
        min-height: 32px;
        padding: 0 12px;
      }

      @media (max-width: 768px) {
        .employee-roster-pagination {
          align-items: stretch;
          flex-direction: column;
        }

        .employee-roster-pagination-controls {
          justify-content: space-between;
        }
      }

      .employee-quick-select {
        width: 100%;
        min-width: 84px;
        height: 30px;
        padding: 0 26px 0 9px;
        border: 1px solid var(--color-border, #dcdfe6);
        border-radius: 6px;
        background-color: #fff;
        color: var(--color-text-secondary, #666);
        font-size: 12px;
        font-weight: 600;
        cursor: pointer;
      }

      .employee-quick-select.success {
        border-color: rgba(82, 196, 26, 0.35);
        background-color: rgba(82, 196, 26, 0.08);
        color: #389e0d;
      }

      .employee-quick-select.danger {
        border-color: rgba(255, 77, 79, 0.32);
        background-color: rgba(255, 77, 79, 0.07);
        color: var(--color-danger, #ff4d4f);
      }

      .employee-quick-select.muted {
        background-color: var(--color-bg-subtle, #f7f8fa);
        color: var(--color-text-tertiary, #999);
      }

      .employee-quick-select:focus-visible {
        outline: 2px solid rgba(22, 119, 255, 0.2);
        border-color: var(--color-primary, #1677ff);
      }

      .employee-quick-select:disabled {
        cursor: wait;
        opacity: 0.65;
      }

      .employee-archive-badge {
        display: inline-flex;
        align-items: center;
        min-height: 22px;
        border-radius: 4px;
        padding: 2px 7px;
        background: var(--success-light, #ecfdf3);
        color: var(--color-success, #16803c);
        white-space: nowrap;
      }

      .employee-archive-badge.danger {
        background: var(--warning-light, #fff7e6);
        color: var(--color-warning, #b36200);
      }

      .employee-archive-badge.muted {
        background: rgba(0, 0, 0, 0.04);
        color: var(--color-text-tertiary, #999);
      }

      .profile-data-table th {
        height: 44px;
        background: #F7F5F3;
        color: #8A8A8A;
        font-size: 13px;
        font-weight: 600;
        text-align: left;
        padding: 0 14px;
        border-bottom: 1px solid #EBEBEB;
        white-space: nowrap;
        position: sticky;
        top: 0;
        z-index: 2;
      }

      .profile-data-table th.sortable {
        cursor: pointer;
        user-select: none;
      }

      .profile-data-table th.sortable:hover .sort-icon,
      .profile-data-table th.sorted {
        color: #1677FF;
      }

      .sort-icon {
        margin-left: 4px;
        color: #B7B1AA;
        font-size: 11px;
        transition: color var(--transition);
      }

      .profile-data-table td {
        height: 52px;
        padding: 0 14px;
        border-bottom: 1px solid rgba(0,0,0,0.05);
        color: var(--text);
        font-size: 13px;
        vertical-align: middle;
        white-space: nowrap;
      }

      .profile-data-table tbody tr:nth-child(odd) {
        background: var(--surface);
      }

      .profile-data-table tbody tr:nth-child(even) {
        background: #FAFAF8;
      }

      .profile-data-table tbody tr:hover {
        background: rgba(22,119,255,0.06);
      }

      .profile-data-table tbody tr:last-child td {
        border-bottom: 0;
      }

      .table-link-button {
        border: 0;
        background: transparent;
        color: #1677FF;
        font: inherit;
        font-weight: 600;
        padding: 0;
        cursor: pointer;
      }

      .table-link-button:hover {
        text-decoration: underline;
      }

      .company-warning-icon {
        color: var(--warning);
        font-size: 13px;
        font-weight: 700;
        margin-left: 5px;
      }

      .table-money {
        color: #1677FF;
        font-weight: 600;
      }

      .table-result-meta {
        margin-top: 10px;
        color: var(--muted);
        font-size: 12px;
        text-align: right;
      }

      .data-safety-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 12px;
        margin-bottom: 16px;
      }

      .data-safety-card small {
        color: var(--muted);
        display: block;
        margin-top: 6px;
      }

      .data-safety-panel {
        align-items: flex-start;
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: var(--radius-lg);
        display: flex;
        justify-content: space-between;
        gap: 16px;
        padding: 18px;
      }

      .data-safety-panel h3 {
        font-size: 16px;
        margin: 0 0 8px;
      }

      .data-safety-panel p {
        color: var(--muted);
        font-size: 13px;
        margin: 4px 0;
        word-break: break-all;
      }

      .governance-hero,
      .governance-section {
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: 8px;
        box-shadow: var(--shadow);
      }

      .governance-hero {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(260px, 360px);
        gap: 24px;
        padding: 22px;
        align-items: center;
      }

      .governance-eyebrow {
        color: var(--color-primary);
        font-size: 12px;
        font-weight: 700;
      }

      .governance-hero h2,
      .governance-section h3,
      .governance-step-card h4 {
        margin: 0;
      }

      .governance-hero h2 {
        font-size: 24px;
        margin-top: 6px;
      }

      .governance-hero p,
      .governance-section p,
      .governance-step-card p,
      .governance-mobile-list p {
        color: var(--muted);
        font-size: 13px;
        line-height: 1.6;
        margin: 6px 0 0;
      }

      .governance-hero-meta,
      .governance-step-list,
      .governance-mobile-list {
        display: grid;
        gap: 10px;
      }

      .governance-source-pill {
        display: inline-flex;
        width: fit-content;
        max-width: 100%;
        border-radius: 999px;
        background: #F4F6F8;
        color: var(--color-text-secondary);
        padding: 5px 10px;
        font-size: 12px;
        white-space: nowrap;
      }

      .governance-source-pill.success {
        background: rgba(43, 164, 113, 0.12);
        color: #1F8A5B;
      }

      .governance-section {
        display: grid;
        gap: 16px;
        padding: 18px;
      }

      .governance-section-title {
        display: flex;
        align-items: flex-start;
        gap: 12px;
      }

      .governance-section-title > b,
      .governance-step-card > b {
        display: inline-grid;
        place-items: center;
        width: 34px;
        height: 34px;
        border-radius: 8px;
        background: #E8F2FF;
        color: var(--color-primary);
        flex: 0 0 auto;
      }

      .governance-step-card,
      .governance-action-card,
      .governance-mobile-list article {
        border: 1px solid var(--line);
        border-radius: 8px;
        background: #fff;
      }

      .governance-step-card {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 12px;
        align-items: center;
        padding: 14px;
      }

      .governance-summary {
        grid-template-columns: repeat(6, minmax(0, 1fr));
      }

      .governance-metric small {
        color: var(--muted);
        display: block;
        margin-top: 4px;
      }

      .governance-action-grid {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 12px;
      }

      .governance-action-card {
        cursor: pointer;
        display: grid;
        gap: 6px;
        padding: 14px;
        text-align: left;
      }

      .governance-action-card:hover {
        border-color: var(--color-primary);
        box-shadow: 0 8px 24px rgba(22, 119, 255, 0.08);
      }

      .governance-action-card span,
      .governance-mobile-list span {
        color: var(--muted);
        font-size: 13px;
      }

      .governance-mobile-list {
        grid-template-columns: repeat(4, minmax(0, 1fr));
      }

      .governance-mobile-list article {
        padding: 14px;
      }

      .governance-subsection-title h4 {
        font-size: 15px;
        margin: 0;
      }

      .governance-subsection-title p {
        margin-top: 4px;
      }

      .governance-config-table .profile-data-table {
        min-width: 760px;
      }

      .governance-config-manager {
        display: grid;
        gap: 12px;
      }

      .governance-config-form {
        align-items: end;
        background: #F8FAFC;
        border: 1px solid var(--line);
        border-radius: 8px;
        display: grid;
        gap: 12px;
        grid-template-columns: minmax(140px, 180px) minmax(180px, 1fr) minmax(120px, 160px) minmax(220px, 1.4fr) auto;
        padding: 12px;
      }

      .governance-config-notes {
        min-width: 0;
      }

      .status-pill.status-active {
        background: rgba(43, 164, 113, 0.12);
        color: #1F8A5B;
      }

      .status-pill.status-off {
        background: rgba(100, 116, 139, 0.12);
        color: #64748B;
      }

      .worklog-action-dock {
        align-items: center;
        background: rgba(255, 255, 255, 0.96);
        border: 1px solid var(--line);
        border-radius: 8px;
        bottom: 12px;
        box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
        display: flex;
        gap: 10px;
        justify-content: flex-end;
        padding: 10px;
        position: sticky;
        z-index: 18;
      }

      .table-progress-cell {
        display: grid;
        gap: 6px;
        min-width: 116px;
      }

      .control-tabs {
        display: flex;
        gap: 6px;
        padding: 0 22px 16px;
        border-bottom: 1px solid rgba(0,0,0,0.07);
      }

      .control-tab {
        min-height: 34px;
        border: 1px solid rgba(0,0,0,0.1);
        border-radius: var(--radius-sm);
        background: var(--surface);
        color: var(--text-2);
        padding: 0 14px;
        font-weight: 600;
        cursor: pointer;
      }

      .control-tab.active {
        background: var(--color-primary);
        color: #fff;
        border-color: var(--color-primary);
        box-shadow: 0 2px 8px rgba(22,119,255,0.28);
      }

      .control-three-grid {
        display: grid;
        grid-template-columns: minmax(220px, 1fr) minmax(180px, 0.8fr) minmax(180px, 0.8fr);
        gap: 12px;
        grid-column: 1 / -1;
      }

      .control-agent-display {
        min-height: 38px;
        display: flex;
        align-items: center;
        border: 1px solid rgba(0,0,0,0.1);
        border-radius: var(--radius-sm);
        background: var(--surface-2);
        color: #8A8A8A;
        padding: 0 12px;
        font-size: 13px;
        font-weight: 700;
      }

      .control-agent-display.assigned {
        color: var(--text);
      }

      .control-agent-display.unassigned {
        color: var(--warning);
      }

      .control-history-filterbar {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 12px;
        margin-bottom: 16px;
        flex-wrap: wrap;
      }

      .control-history-filterbar .field {
        width: 140px;
        flex: 0 0 auto;
      }

      .control-history-filterbar .field.short {
        width: 120px;
      }

      .control-history-filterbar .field.xshort {
        width: 100px;
      }

      .control-history-filterbar .range-separator {
        color: #8A8A8A;
        font-weight: 600;
        padding-top: 18px;
      }

      .control-association-note {
        grid-column: 1 / -1;
        margin: -4px 0 0;
        color: var(--muted);
        font-size: 12px;
      }

      .control-knowledge-head {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 16px;
        margin-bottom: 14px;
      }

      .control-knowledge-head h3,
      .control-knowledge-item h4 {
        margin: 0;
      }

      .control-knowledge-list-section {
        margin-top: 14px;
      }

      .control-knowledge-list-section .control-history-filterbar .field.wide {
        width: auto;
        min-width: min(320px, 100%);
        flex: 1 1 320px;
      }

      .control-knowledge-list {
        border: 1px solid var(--color-border);
        border-radius: 8px;
        overflow: hidden;
        background: #fff;
      }

      .control-knowledge-item {
        border-bottom: 1px solid var(--color-border-light);
      }

      .control-knowledge-item:last-child {
        border-bottom: 0;
      }

      .control-knowledge-item summary {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 14px;
        min-height: 64px;
        padding: 12px 16px;
        cursor: pointer;
        list-style: none;
      }

      .control-knowledge-item summary::-webkit-details-marker {
        display: none;
      }

      .control-knowledge-item[open] summary {
        background: var(--surface-2);
      }

      .control-knowledge-summary-main {
        display: grid;
        gap: 4px;
        min-width: 0;
      }

      .control-knowledge-summary-main strong {
        overflow: hidden;
        color: var(--text);
        font-size: 14px;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .control-knowledge-summary-main span {
        color: var(--muted);
        font-size: 12px;
      }

      .control-knowledge-status {
        border: 1px solid #b7ebc6;
        border-radius: 999px;
        background: #f0fff4;
        color: #138a45;
        font-size: 12px;
        padding: 3px 8px;
      }

      .control-knowledge-status.is-draft {
        border-color: var(--color-border);
        background: var(--surface-2);
        color: var(--muted);
      }

      .control-knowledge-content {
        display: grid;
        gap: 14px;
        padding: 16px;
        border-top: 1px solid var(--color-border-light);
      }

      .control-knowledge-content section {
        display: grid;
        gap: 6px;
      }

      .control-knowledge-content h4 {
        font-size: 13px;
      }

      .control-knowledge-content p {
        margin: 0;
        color: var(--text-2);
        line-height: 1.7;
        white-space: pre-line;
      }

      .control-knowledge-tags,
      .control-knowledge-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
      }

      .control-knowledge-tags span {
        border: 1px solid var(--color-border-light);
        border-radius: 4px;
        background: var(--surface-2);
        color: var(--muted);
        font-size: 12px;
        padding: 3px 7px;
      }

      .control-knowledge-actions {
        justify-content: flex-end;
      }

      .control-knowledge-actions .danger {
        color: var(--danger);
      }

      .control-room-toolbar {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 16px;
        margin-bottom: 14px;
        padding: 10px 0 12px;
        background: var(--surface);
      }

      .control-room-toolbar h3 {
        margin: 0;
        font-size: 16px;
      }

      .control-room-actions {
        display: flex;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
      }

      .control-room-toolbar .control-room-actions {
        margin-top: 0;
        padding: 10px;
        border: 1px solid rgba(229, 231, 235, 0.9);
        border-radius: 8px;
        background: #fff;
      }

      #controlSchedulePanel .control-room-toolbar {
        position: relative;
        z-index: 1;
      }

      .control-room-note {
        margin: 6px 0 0;
        color: var(--muted);
        font-size: 12px;
      }

      .control-room-site-tabs {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
        margin-bottom: 12px;
      }

      .control-room-site-tab {
        border: 1px solid var(--color-border);
        border-radius: 999px;
        background: #fff;
        color: var(--text-2);
        cursor: pointer;
        font-size: 13px;
        padding: 7px 14px;
        transition: all 0.2s;
      }

      .control-room-site-tab.active,
      .control-room-site-tab:hover {
        border-color: var(--color-primary);
        background: var(--color-primary-light);
        color: var(--color-primary);
      }

      .control-room-host {
        display: flex;
        flex-direction: column;
        gap: 18px;
      }

      .control-room-sheet {
        overflow: hidden;
        border: 1px solid var(--color-border);
        border-radius: 8px;
        background: #fff;
      }

      .control-room-table-scroll {
        max-height: clamp(360px, calc(100vh - 430px), 660px);
        overflow: auto;
        overscroll-behavior: contain;
        scrollbar-gutter: stable both-edges;
      }

      .control-room-table-scroll::before {
        content: "";
        position: sticky;
        top: 0;
        z-index: 7;
        display: block;
        height: 0;
        box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
      }

      .control-schedule-board {
        overflow: hidden;
        border: 1px solid var(--color-border);
        border-radius: 8px;
        background: #fff;
        box-shadow: var(--shadow-sm);
      }

      .control-schedule-board-head {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
        border-bottom: 1px solid var(--color-border-light);
        background: #f7f9fc;
        color: var(--color-text-primary);
        padding: 12px 14px;
      }

      .control-schedule-board-head strong {
        display: block;
        color: var(--color-text-primary);
        font-size: 16px;
        font-weight: 650;
      }

      .control-schedule-board-head span {
        display: block;
        margin-top: 3px;
        color: #555;
        font-size: 12px;
        line-height: 1.55;
      }

      .control-schedule-board-head b {
        white-space: nowrap;
        color: var(--color-primary);
        font-size: 14px;
      }

      .control-schedule-board-actions {
        display: flex;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
        justify-content: flex-end;
        flex: 0 0 auto;
      }

      .control-schedule-company-filter {
        display: flex;
        align-items: center;
        gap: 7px;
        color: var(--color-text-secondary);
        font-size: 12px;
        white-space: nowrap;
      }

      .control-schedule-company-filter span {
        margin: 0;
        color: inherit;
        font-size: inherit;
      }

      .control-schedule-company-filter select {
        width: 148px;
        min-height: 32px;
        border: 1px solid var(--color-border);
        border-radius: 6px;
        background: #fff;
        color: var(--color-text-primary);
        padding: 4px 28px 4px 9px;
      }

      .control-schedule-conflicts {
        display: grid;
        gap: 6px;
        border-bottom: 1px solid #FFD8D8;
        background: #FFF1F0;
        padding: 10px 14px;
      }

      .control-schedule-conflicts p {
        margin: 0;
        color: var(--danger);
        font-size: 13px;
        font-weight: 700;
      }

      .control-schedule-issues {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px;
        border-bottom: 1px solid #FEDF89;
        background: #FFFAEB;
        padding: 10px 14px;
      }

      .control-schedule-issues strong {
        color: #B54708;
        font-size: 13px;
      }

      .control-schedule-issue {
        border: 1px solid #FEDF89;
        border-radius: 999px;
        background: #fff;
        color: #B54708;
        cursor: pointer;
        font-size: 12px;
        font-weight: 700;
        padding: 5px 10px;
      }

      .control-schedule-issue:hover {
        border-color: #F79009;
        background: #FEF0C7;
      }

      .control-schedule-scroll {
        overflow-x: auto;
        max-height: clamp(220px, 36vh, 520px);
        overscroll-behavior: contain;
        scrollbar-gutter: stable both-edges;
      }

      @media (min-width: 901px) {
        #controlSchedulePanel.is-timeline .control-schedule-scroll {
          height: clamp(420px, calc(100vh - 350px), 820px);
          max-height: none;
        }
      }

      .control-schedule-table {
        width: 100%;
        min-width: 1950px;
        border-collapse: collapse;
        table-layout: fixed;
      }

      .control-schedule-table th,
      .control-schedule-table td {
        border: 1px solid #fff;
        padding: 6px;
        text-align: center;
        vertical-align: top;
      }

      .control-schedule-table thead th {
        position: sticky;
        top: 0;
        z-index: 6;
        background: #eef3f9;
        color: var(--text);
        font-size: 12px;
        font-weight: 800;
      }

      .control-schedule-table thead th:first-child,
      .control-schedule-table tbody th {
        position: sticky;
        left: 0;
        z-index: 5;
        width: 132px;
        background: #f3f6fb;
        color: #111;
        font-size: 12px;
        font-weight: 800;
        box-shadow: 6px 0 12px rgba(15, 23, 42, 0.08);
      }

      .control-schedule-room-name,
      .control-schedule-room-company {
        display: block;
        overflow-wrap: anywhere;
      }

      .control-schedule-room-company {
        margin-top: 4px;
        color: var(--color-text-secondary);
        font-size: 11px;
        font-weight: 500;
        line-height: 1.35;
      }

      .control-schedule-table thead th:first-child {
        z-index: 8;
        background: #eef3f9;
      }

      .control-schedule-table td {
        height: 52px;
        background: #fbfcfe;
      }

      .control-schedule-table tbody tr:nth-child(even) td {
        background: #f6f8fb;
      }

      .control-schedule-chip {
        display: grid;
        gap: 2px;
        width: 100%;
        border: 1px solid transparent;
        border-left-width: 4px;
        border-radius: 6px;
        background: #e8f1ff;
        color: #174ea6;
        padding: 5px;
        cursor: pointer;
        font-size: 11px;
        line-height: 1.25;
        text-align: center;
        box-shadow: 0 3px 8px rgba(15, 23, 42, 0.1);
      }

      .control-schedule-chip:hover {
        filter: brightness(0.97);
      }

      .control-schedule-chip.anchor-tone-0 { background: #e8f1ff; border-color: #bfd5ff; border-left-color: #2563eb; color: #174ea6; }
      .control-schedule-chip.anchor-tone-1 { background: #e6f7f5; border-color: #b7e5df; border-left-color: #0f766e; color: #115e59; }
      .control-schedule-chip.anchor-tone-2 { background: #f1ecff; border-color: #d8c9ff; border-left-color: #7c3aed; color: #5b21b6; }
      .control-schedule-chip.anchor-tone-3 { background: #ecf8ee; border-color: #c4e7ca; border-left-color: #15803d; color: #166534; }
      .control-schedule-chip.anchor-tone-4 { background: #e7f6fb; border-color: #b9e3ef; border-left-color: #0891b2; color: #0e7490; }
      .control-schedule-chip.anchor-tone-5 { background: #fcecf4; border-color: #f3c6da; border-left-color: #be185d; color: #9d174d; }
      .control-schedule-chip.anchor-tone-6 { background: #edf0ff; border-color: #cbd2ff; border-left-color: #4f46e5; color: #3730a3; }
      .control-schedule-chip.anchor-tone-7 { background: #f1f5f9; border-color: #d7e0e9; border-left-color: #475569; color: #334155;
      }

      .control-schedule-chip.has-conflict {
        background: #D92D20;
        border-color: #B42318;
        color: #fff;
        box-shadow: 0 4px 12px rgba(217,45,32,0.22);
      }

      .control-schedule-chip.has-conflict:hover {
        background: #B42318;
      }

      .control-schedule-chip.is-incomplete {
        background: #F79009;
        border-color: #DC6803;
        color: #fff;
        box-shadow: 0 4px 12px rgba(247,144,9,0.2);
      }

      .control-schedule-chip.is-incomplete:hover {
        background: #DC6803;
      }

      .control-schedule-chip.is-dragging {
        opacity: 0.55;
      }

      .control-schedule-chip + .control-schedule-chip {
        margin-top: 6px;
      }

      .control-schedule-chip em {
        color: currentColor;
        opacity: 0.78;
        font-style: normal;
        font-size: 11px;
      }

      .control-schedule-table .empty-cell {
        color: var(--muted);
        padding: 24px;
      }

      .control-schedule-slot {
        width: 100%;
        min-height: 20px;
        padding: 0 4px;
        border: 1px dashed rgba(29,124,255,0.2);
        border-radius: 6px;
        background: rgba(29,124,255,0.035);
        color: #1D7CFF;
        cursor: pointer;
        font-weight: 700;
      }

      .control-schedule-slot-grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
        gap: 4px;
      }

      .control-schedule-chip + .control-schedule-slot-grid {
        margin-top: 6px;
      }

      .control-schedule-slot:hover,
      .control-schedule-slot.is-drop-target {
        border-color: #1D7CFF;
        background: rgba(29,124,255,0.14);
      }

      .control-time-select {
        min-width: 92px;
        font-variant-numeric: tabular-nums;
      }

      .control-room-title {
        display: flex;
        align-items: baseline;
        justify-content: space-between;
        gap: 16px;
        border-bottom: 1px solid var(--color-border-light);
        background: #f7f9fc;
        color: var(--color-text-primary);
        padding: 12px 14px;
        text-align: left;
        font-size: 15px;
        font-weight: 650;
        letter-spacing: 0;
      }

      .control-room-title strong {
        font-size: 15px;
      }

      .control-room-title span {
        color: var(--muted);
        font-size: 12px;
        font-weight: 400;
      }

      .control-room-schedule-row {
        display: grid;
        grid-template-columns: 190px minmax(0, 1fr);
        min-width: 920px;
        border-bottom: 1px solid var(--color-border-light);
        background: #fff;
      }

      .control-room-schedule-row:last-child {
        border-bottom: 0;
      }

      .control-room-fixed-name {
        position: sticky;
        left: 0;
        z-index: 5;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        min-height: 148px;
        border-right: 1px solid var(--color-border);
        background: #f6f9fd;
        padding: 18px;
        box-shadow: 8px 0 14px rgba(15, 23, 42, 0.05);
      }

      .control-room-fixed-name span,
      .control-room-fixed-name em {
        color: var(--muted);
        font-size: 12px;
        font-style: normal;
      }

      .control-room-fixed-name strong {
        color: var(--text);
        font-size: 16px;
        line-height: 1.4;
      }

      .control-room-company-label {
        color: var(--color-text-secondary);
        font-size: 12px;
        font-weight: 500;
        line-height: 1.4;
      }

      .control-room-name-actions {
        display: grid;
        gap: 6px;
        margin-top: 3px;
      }

      .control-room-name-actions .table-link-button {
        justify-self: start;
      }

      .control-room-name-actions select {
        width: 100%;
        min-width: 0;
        border: 1px solid var(--color-border);
        border-radius: 4px;
        background: #fff;
        color: var(--text);
        font-size: 12px;
        padding: 6px 8px;
      }

      .control-room-name-actions select[hidden] {
        display: none;
      }

      .control-room-slot-workspace {
        min-width: 0;
        padding: 10px 14px 14px;
      }

      .control-room-slot-tabs {
        display: flex;
        align-items: stretch;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 9px;
        scrollbar-width: thin;
      }

      .control-room-slot-tab {
        display: grid;
        grid-template-columns: auto auto;
        gap: 2px 8px;
        flex: 0 0 168px;
        min-height: 52px;
        border: 1px solid var(--color-border);
        border-radius: 6px;
        background: #fff;
        color: var(--text-2);
        cursor: pointer;
        padding: 8px 10px;
        text-align: left;
      }

      .control-room-slot-tab span,
      .control-room-slot-tab em {
        overflow: hidden;
        color: var(--muted);
        font-size: 11px;
        font-style: normal;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .control-room-slot-tab strong {
        color: var(--text);
        font-size: 12px;
        text-align: right;
      }

      .control-room-slot-tab em {
        grid-column: 1 / -1;
        color: var(--text-2);
      }

      .control-room-slot-tab:hover,
      .control-room-slot-tab.is-active {
        border-color: var(--color-primary);
        background: var(--color-primary-light);
      }

      .control-room-slot-add {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-basis: 112px;
        border-style: dashed;
        color: var(--color-primary);
        font-weight: 700;
        text-align: center;
      }

      .control-room-slot-panel {
        display: grid;
        grid-template-columns: minmax(200px, 1.4fr) repeat(2, minmax(110px, 0.7fr)) minmax(130px, 0.8fr) minmax(160px, 1fr) minmax(140px, 0.9fr);
        gap: 10px;
        align-items: end;
        border: 1px solid var(--color-border-light);
        border-radius: 6px;
        background: #fff;
        padding: 14px;
      }

      .control-room-slot-panel[hidden] {
        display: none;
      }

      .control-room-slot-panel.control-room-row-active {
        border-color: rgba(29, 124, 255, 0.45);
        box-shadow: 0 0 0 2px rgba(29, 124, 255, 0.08);
      }

      .control-room-slot-field {
        display: grid;
        gap: 5px;
        min-width: 0;
      }

      .control-room-slot-field label {
        color: var(--color-text-secondary);
        font-size: 12px;
        font-weight: 600;
      }

      .control-room-slot-field select,
      .control-room-slot-field input,
      .control-room-derived-field output {
        width: 100%;
        min-width: 0;
        min-height: 36px;
        border: 1px solid var(--color-border);
        border-radius: 4px;
        background: #fff;
        color: var(--text);
        font-size: 13px;
        padding: 7px 9px;
      }

      .control-room-derived-field output {
        display: flex;
        align-items: center;
        overflow: hidden;
        border-color: #e3e8ef;
        background: #f6f8fb;
        color: var(--text-2);
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .control-room-slot-actions {
        display: flex;
        align-items: center;
        justify-content: space-between;
        grid-column: 1 / -1;
        gap: 16px;
        min-height: 44px;
        margin-top: 2px;
        border-top: 1px solid var(--color-border-light);
        padding-top: 10px;
      }

      .control-room-command-actions,
      .control-room-reference-actions {
        display: flex;
        align-items: center;
        gap: 9px;
        min-width: 0;
        flex-wrap: wrap;
      }

      .control-room-reference-actions {
        justify-content: flex-end;
        white-space: nowrap;
      }

      .control-room-no-slot {
        display: flex;
        align-items: center;
        min-height: 52px;
        color: var(--muted);
        font-size: 13px;
      }

      .control-room-table {
        width: 100%;
        min-width: 1360px;
        table-layout: fixed;
        border-collapse: collapse;
      }

      .control-room-table th,
      .control-room-table td {
        border: 1px solid var(--color-border-light);
        padding: 8px;
        text-align: center;
        vertical-align: middle;
      }

      .control-room-table th {
        position: sticky;
        top: 0;
        z-index: 8;
        background: #BDD7EE;
        color: var(--text);
        font-size: 14px;
        font-weight: 700;
      }

      .control-room-table th:first-child,
      .control-room-table td:first-child {
        position: sticky;
        left: 0;
        z-index: 5;
        background: #F8FBFF;
        box-shadow: 8px 0 14px rgba(15, 23, 42, 0.06);
      }

      .control-room-table th:first-child {
        z-index: 10;
        background: #BDD7EE;
      }

      .control-room-table td {
        font-size: 13px;
      }

      .control-room-table select,
      .control-room-table input {
        width: 100%;
        min-width: 0;
        border: 1px solid var(--color-border);
        border-radius: 4px;
        background: #fff;
        color: var(--text);
        font-size: 13px;
        padding: 6px 8px;
      }

      .control-room-table select:focus,
      .control-room-table input:focus {
        border-color: var(--color-primary);
        box-shadow: 0 0 0 2px rgba(0,82,217,0.1);
        outline: none;
      }

      .control-room-table .narrow-col {
        width: 92px;
      }

      .control-room-table .action-col {
        width: 180px;
        min-width: 180px;
        position: sticky;
        right: 0;
        z-index: 7;
        background: #fff;
        box-shadow: -8px 0 14px rgba(15, 23, 42, 0.06);
      }

      .control-room-table th.action-col {
        z-index: 12;
        background: #BDD7EE;
      }

      .control-room-table tbody tr:nth-child(even) {
        background: #FAFAF8;
      }

      .control-room-table tbody tr.control-room-row-active {
        background: #EAF3FF;
        box-shadow: inset 3px 0 0 #1D7CFF;
      }

      .control-room-table tbody tr.control-room-row-saved {
        animation: controlRowSavedPulse 2.2s ease-out;
      }

      .control-room-row-issue {
        display: block;
        margin: 4px auto 0;
        max-width: 150px;
        border-radius: 999px;
        background: #FFF4E5;
        color: #B54708;
        font-size: 11px;
        line-height: 1.35;
        padding: 2px 8px;
        white-space: nowrap;
      }

      @keyframes controlRowSavedPulse {
        0%, 35% {
          background: #E8F8EF;
          box-shadow: inset 4px 0 0 #12B76A;
        }
        100% {
          background: transparent;
          box-shadow: none;
        }
      }

      .control-room-empty {
        border: 1px dashed var(--color-border);
        border-radius: 8px;
        background: #fff;
        color: var(--muted);
        padding: 36px;
        text-align: center;
      }

      .issue-badge,
      .attention-badge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 22px;
        border-radius: 999px;
        border: 1px solid rgba(0,0,0,0.08);
        padding: 2px 8px;
        font-size: 11px;
        font-weight: 600;
        white-space: nowrap;
      }

      .issue-badge { background: var(--surface-2); color: var(--text-2); }
      .urgency-normal { background: rgba(0,0,0,0.04); color: var(--muted); }
      .urgency-watch { background: var(--warning-light); color: var(--warning); border-color: rgba(176,123,42,0.22); }
      .urgency-urgent { background: rgba(211,47,47,0.1); color: var(--danger); border-color: rgba(211,47,47,0.2); }
      .control-row-urgent { background: rgba(211,47,47,0.06) !important; }
      .attention-badge { background: var(--warning-light); color: var(--warning); border-color: rgba(176,123,42,0.22); }

      .ellipsis-cell {
        max-width: 260px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .status-badge {
        border: 1px solid rgba(0,0,0,0.08);
        border-radius: 999px;
        padding: 3px 9px;
        font-size: 11px;
        font-weight: 700;
        white-space: nowrap;
      }

      .status-signed { background: var(--success-light); color: var(--success); border-color: rgba(46,125,94,0.2); }
      .status-trial { background: var(--warning-light); color: var(--warning); border-color: rgba(176,123,42,0.2); }
      .status-active { background: var(--success-light); color: var(--success); border-color: rgba(46,125,94,0.2); }
      .status-left { background: rgba(0,0,0,0.04); color: var(--muted); border-color: rgba(0,0,0,0.08); }
      .status-disabled { background: rgba(0,0,0,0.04); color: var(--color-text-tertiary, #999); border-color: rgba(0,0,0,0.08); }

      #agentDrawerOverlay .profile-drawer {
        position: fixed;
        top: 0;
        right: 0;
        width: clamp(480px, 40vw, 640px);
        max-width: calc(100vw - 24px);
        height: 100vh;
        grid-template-rows: auto 40px minmax(0, 1fr) auto;
      }

      #agentDrawerOverlay .profile-drawer-header {
        position: relative;
        padding: 24px 28px 16px;
        background: var(--surface);
      }

      #agentDrawerOverlay .profile-drawer-header h2 {
        font-size: 20px;
        letter-spacing: 0;
      }

      #agentDrawerOverlay .profile-drawer-header p {
        color: #8A8A8A;
        font-size: 13px;
      }

      #agentDrawerOverlay #closeAgentDrawerTopButton {
        position: absolute;
        top: 18px;
        right: 28px;
        z-index: 2;
      }

      #agentDrawerOverlay .drawer-tabs {
        display: flex;
        flex-direction: row;
        align-items: center;
        height: 40px;
        gap: 6px;
        padding: 0 28px;
        border-bottom: 1px solid rgba(0,0,0,0.07);
        background: var(--surface);
      }

      #agentDrawerOverlay .drawer-tab {
        min-height: 32px;
        flex: 0 0 auto;
        border: 1px solid rgba(0,0,0,0.1);
        border-radius: var(--radius-sm);
        background: var(--surface);
        color: var(--text-2);
        padding: 0 14px;
      }

      #agentDrawerOverlay .drawer-tab.active {
        background: var(--color-primary);
        color: #fff;
        border-color: var(--color-primary);
      }

      #agentDrawerOverlay .profile-drawer-body {
        overflow-y: auto;
        padding: 24px 28px 28px;
        gap: 14px;
      }

      #agentDrawerOverlay .profile-drawer-footer {
        padding: 16px 28px;
        background: var(--surface);
      }

      .asset-section {
        border-bottom: 1px solid #F0EDE8;
        display: grid;
        gap: 12px;
        padding-bottom: 20px;
      }

      .asset-section + .asset-section {
        margin-top: 20px;
      }

      .asset-section:last-child {
        border-bottom: 0;
      }

      .asset-section-header {
        align-items: center;
        display: flex;
        gap: 12px;
        justify-content: space-between;
      }

      .asset-section-header h3 {
        color: var(--text);
        font-size: 14px;
        font-weight: 600;
        margin: 0;
      }

      .asset-table {
        border: 1px solid #F0EDE8;
        border-radius: 8px;
        overflow: hidden;
      }

      .asset-table table {
        border-collapse: collapse;
        width: 100%;
      }

      .asset-table th,
      .asset-table td {
        border-bottom: 1px solid rgba(0,0,0,0.06);
        font-size: 12px;
        padding: 9px 10px;
        text-align: left;
      }

      .asset-table th {
        background: #F7F5F3;
        color: #8A8A8A;
        font-weight: 600;
        position: sticky;
        top: 0;
        z-index: 2;
      }

      .asset-table tr:last-child td {
        border-bottom: 0;
      }

      .asset-inline-form {
        background: #FAFAF8;
        border: 1px solid #F0EDE8;
        border-radius: 8px;
        display: grid;
        gap: 12px;
        padding: 12px;
      }

      .asset-days.safe { color: #5DAF5D; font-weight: 600; }
      .asset-days.warn { color: #E8A84D; font-weight: 600; }
      .asset-days.danger { color: #E85D5D; font-weight: 700; }
      .asset-days.neutral { color: #8A8A8A; }

      .asset-status-pending {
        background: #F3F3F1;
        border-color: rgba(138,138,138,0.2);
        color: #8A8A8A;
      }

      .asset-status-stopped {
        background: #FEF0F0;
        border-color: rgba(232,93,93,0.24);
        color: #E85D5D;
      }

      .asset-count-line {
        display: inline-flex;
        gap: 6px;
        white-space: nowrap;
      }

      .asset-count-line .muted {
        color: #BFBFBF;
      }

      .asset-expire-dot {
        background: #E85D5D;
        border-radius: 999px;
        display: inline-block;
        height: 7px;
        margin-left: 3px;
        vertical-align: middle;
        width: 7px;
      }

      .asset-summary-grid {
        display: grid;
        gap: 12px;
        grid-template-columns: repeat(5, minmax(0, 1fr));
      }

      .asset-equipment-view-toolbar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 14px;
        margin: 10px 0;
        padding: 10px 12px;
        border: 1px solid #E6EBF0;
        background: #F8FAFC;
      }

      .asset-equipment-view-tabs {
        flex: 0 0 auto;
      }

      .asset-equipment-view-context {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 8px;
        color: #64748B;
        font-size: 13px;
        text-align: right;
      }

      #assetTableHost .asset-equipment-room-summary-table {
        min-width: 1040px;
      }

      .asset-equipment-exception {
        color: #C2410C;
        font-weight: 600;
      }

      .permission-role-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        margin-bottom: 16px;
      }

      .permission-matrix-table th,
      .permission-matrix-table td {
        min-width: 132px;
        vertical-align: top;
      }

      .permission-matrix-table th:first-child,
      .permission-matrix-table td:first-child {
        left: 0;
        min-width: 150px;
        position: sticky;
        z-index: 2;
      }

      .permission-chip {
        background: #F2F7FF;
        border: 1px solid #D6E6FF;
        border-radius: 999px;
        color: #1456B8;
        display: inline-flex;
        font-size: 12px;
        line-height: 20px;
        margin: 2px 4px 2px 0;
        padding: 0 8px;
        white-space: nowrap;
      }

      .permission-empty {
        color: var(--color-text-disabled);
      }

      .asset-type-picker {
        display: grid;
        gap: 12px;
        grid-template-columns: repeat(4, minmax(0, 1fr));
      }

      .asset-type-card {
        background: #fff;
        border: 1px solid #F0EDE8;
        border-radius: 8px;
        color: var(--text);
        cursor: pointer;
        display: grid;
        gap: 8px;
        min-height: 96px;
        padding: 16px;
        text-align: left;
        transition: all 0.2s ease;
      }

      .asset-type-card:hover {
        border-color: var(--color-primary);
        box-shadow: 0 2px 8px rgba(22,119,255,0.1);
      }

      .asset-type-card strong {
        font-size: 16px;
      }

      .asset-type-card span {
        color: #8A8A8A;
        font-size: 12px;
        line-height: 1.5;
      }

      .asset-type-badge {
        border-radius: 999px;
        display: inline-flex;
        font-size: 11px;
        font-weight: 600;
        padding: 3px 9px;
      }

      .asset-type-boss { background: #EEF5FF; color: #2F6FB2; }
      .asset-type-douyin_clip { background: #FFF0F5; color: #C23A70; }
      .asset-type-tiktok { background: #1A1A1A; color: #fff; }
      .asset-type-live-room { background: #EAF2FF; color: #1D5FD1; }
      .asset-type-live-equipment { background: #EDF8F4; color: #2E7D5E; }
      .asset-type-tool { background: #F3F3F1; color: #5F6470; }

      .badge-warn {
        background: rgba(198, 139, 92, 0.12);
        color: var(--color-primary);
        border-color: rgba(198, 139, 92, 0.24);
      }

      .status-active {
        background: var(--success-light);
        color: var(--success);
        border-color: rgba(46,125,94,0.2);
      }

      .agent-detail-list {
        display: grid;
        gap: 10px;
      }

      .agent-detail-item {
        display: grid;
        grid-template-columns: 120px 1fr;
        gap: 10px;
        align-items: start;
        border-bottom: 1px solid var(--line-light);
        padding-bottom: 10px;
      }

      .agent-detail-item span {
        color: var(--muted);
        font-size: 12px;
        font-weight: 700;
      }

      .agent-detail-item strong,
      .agent-detail-item p {
        margin: 0;
        color: var(--text);
        font-size: 13px;
        overflow-wrap: anywhere;
      }

      .agent-drawer-actions {
        display: flex;
        gap: 8px;
        justify-content: flex-end;
        margin-top: 12px;
      }

      .agent-anchor-row {
        display: grid;
        grid-template-columns: minmax(100px, 1fr) 96px 110px 96px auto;
        gap: 10px;
        align-items: center;
        padding: 13px 14px;
        border-bottom: 1px solid var(--line-light);
      }

      .agent-anchor-row:last-child {
        border-bottom: 0;
      }

      .agent-anchor-row span {
        color: var(--muted);
        font-size: 12px;
        font-weight: 700;
      }

      .agent-anchor-row strong {
        color: var(--text);
      }

      .company-form-actions {
        display: flex;
        justify-content: flex-end;
        gap: 8px;
      }

      .company-table-wrap {
        border-top: 1px solid rgba(0,0,0,0.06);
        background: rgba(255,255,255,0.5);
      }

      .company-table {
        display: grid;
      }

      .broker-row {
        display: grid;
        grid-template-columns: minmax(110px, 0.8fr) repeat(3, minmax(120px, 1fr)) 96px;
        gap: 10px;
        align-items: center;
        padding: 14px 18px;
        border-bottom: 1px solid rgba(0,0,0,0.05);
        transition: background var(--transition);
      }

      .anchor-profile-row {
        display: grid;
        grid-template-columns: minmax(130px, 0.9fr) minmax(120px, 0.8fr) minmax(120px, 0.8fr) minmax(160px, 1fr) 132px;
        gap: 10px;
        align-items: center;
        padding: 14px 18px;
        border-bottom: 1px solid rgba(0,0,0,0.05);
        transition: background var(--transition);
      }

      .live-session-row {
        display: grid;
        grid-template-columns: minmax(130px, 0.9fr) minmax(120px, 0.7fr) minmax(110px, 0.7fr) minmax(180px, 1fr) 82px;
        gap: 10px;
        align-items: center;
        padding: 14px 18px;
        border-bottom: 1px solid rgba(0,0,0,0.05);
        transition: background var(--transition);
      }

      .anchor-day-row {
        display: grid;
        grid-template-columns: minmax(108px, 0.7fr) minmax(180px, 1.5fr) minmax(112px, 0.7fr) minmax(112px, 0.7fr) 74px;
        gap: 10px;
        align-items: center;
        padding: 8px 12px;
        border-bottom: 1px solid rgba(0,0,0,0.05);
        cursor: pointer;
        transition: background var(--transition);
      }

      .anchor-day-row:last-child { border-bottom: 0; }
      .anchor-day-row:hover { background: rgba(22,119,255,0.03); }
      .anchor-day-row strong { color: var(--text); }
      .anchor-day-row span { color: var(--muted); font-size: 12px; }

      .anchor-day-detail {
        background: #FAFAF8;
        border-left: 3px solid var(--color-primary);
        padding: 12px 16px;
      }

      .anchor-day-detail table {
        width: 100%;
        border-collapse: collapse;
        font-size: 13px;
      }

      .anchor-day-detail th,
      .anchor-day-detail td {
        padding: 8px 10px;
        border-bottom: 1px solid rgba(0,0,0,0.06);
        text-align: left;
      }

      .anchor-day-detail tr.rest-row,
      .drawer-session-row.rest-row {
        background: #F9F9F7;
        color: #BFBFBF;
      }

      .drawer-session-row.rest-row .keyword-pill {
        background: rgba(196, 149, 106, 0.1);
        border-color: rgba(196, 149, 106, 0.24);
        color: var(--color-primary);
      }

      .anchor-day-detail tr.rest-row td,
      .rest-muted {
        color: #BFBFBF;
      }

      .status-dot {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        font-weight: 600;
      }

      .status-dot::before {
        content: "";
        width: 7px;
        height: 7px;
        border-radius: 999px;
        background: var(--success);
      }

      .status-dot.rest::before {
        background: #BFBFBF;
      }

      .broker-row:last-child { border-bottom: 0; }

      .broker-row:hover,
      .anchor-profile-row:hover,
      .live-session-row:hover {
        background: rgba(22,119,255,0.03);
      }

      .broker-name,
      .anchor-profile-name,
      .live-session-name {
        display: grid;
        gap: 4px;
        min-width: 0;
      }

      .broker-name strong,
      .anchor-profile-name strong,
      .live-session-name strong {
        color: var(--text);
        overflow-wrap: anywhere;
        font-weight: 600;
      }

      .profile-name-button {
        border: 0;
        background: transparent;
        color: var(--text);
        font: inherit;
        font-weight: 600;
        padding: 0;
        text-align: left;
        cursor: pointer;
        overflow-wrap: anywhere;
        transition: color var(--transition);
      }

      .profile-name-button:hover {
        color: var(--color-primary);
        text-decoration: underline;
        text-underline-offset: 3px;
      }

      .broker-name span,
      .broker-cell span,
      .anchor-profile-cell span,
      .live-session-cell span,
      .anchor-profile-name span,
      .live-session-name span {
        color: var(--muted);
        font-size: 12px;
      }

      .broker-cell,
      .anchor-profile-cell,
      .live-session-cell {
        display: grid;
        gap: 5px;
      }

      .broker-cell strong,
      .anchor-profile-cell strong,
      .live-session-cell strong {
        color: var(--text);
        font-size: 14px;
      }

      .keyword-line {
        display: flex;
        gap: 5px;
        flex-wrap: wrap;
      }

      .keyword-pill {
        border: 1px solid rgba(22,119,255,0.2);
        border-radius: 999px;
        background: rgba(22,119,255,0.08);
        color: var(--color-primary-hover);
        font-size: 11px;
        font-weight: 700;
        padding: 2px 8px;
      }

      .mini-progress {
        height: 4px;
        border-radius: 999px;
        background: rgba(0,0,0,0.07);
        overflow: hidden;
      }

      .mini-progress i {
        display: block;
        height: 100%;
        border-radius: 999px;
        background: linear-gradient(90deg, var(--color-primary) 0%, #5E8FF1 100%);
      }

      .broker-actions,
      .anchor-profile-actions,
      .live-session-actions {
        display: flex;
        justify-content: flex-end;
        gap: 6px;
      }

      /* ── Progress bar ── */
      .progress-bar-wrap {
        height: 4px;
        background: rgba(0,0,0,0.07);
        border-radius: 99px;
        overflow: hidden;
        flex: 1;
        max-width: 80px;
      }

      .progress-bar-fill {
        height: 100%;
        background: linear-gradient(90deg, var(--color-primary) 0%, #5E8FF1 100%);
        border-radius: 99px;
        transition: width 0.4s ease;
      }

      /* ── Dialog ── */
      dialog {
        width: min(520px, calc(100vw - 32px));
        border: 1px solid rgba(0,0,0,0.1);
        border-radius: var(--radius);
        padding: 0;
        box-shadow: var(--shadow-lg);
        background: rgba(255,255,255,0.96);
        backdrop-filter: saturate(180%) blur(24px);
        -webkit-backdrop-filter: saturate(180%) blur(24px);
      }

      #productDialog {
        max-width: 720px;
        width: 90vw;
      }

      dialog::backdrop {
        background: rgba(0,0,0,0.22);
        backdrop-filter: blur(8px);
      }

      .dialog-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 18px 20px;
        border-bottom: 1px solid rgba(0,0,0,0.07);
        background: rgba(250,250,248,0.8);
      }

      .dialog-header h2 { font-size: 15px; font-weight: 600; }

      .dialog-body { display: flex; flex-direction: column; gap: 14px; padding: 20px; }

      .dialog-footer {
        display: flex;
        justify-content: flex-end;
        gap: 8px;
        padding: 14px 20px;
        border-top: 1px solid rgba(0,0,0,0.07);
        background: rgba(250,250,248,0.8);
      }

      /* ── Confirm dialog ── */
      .confirm-dialog-msg {
        font-size: 14px;
        color: var(--text-2);
        line-height: 1.6;
        padding: 4px 0;
      }

      /* ── Keyboard shortcut hint ── */
      .kbd {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 22px;
        height: 20px;
        border: 1px solid rgba(0,0,0,0.1);
        border-radius: 5px;
        background: var(--surface-2);
        color: var(--muted);
        font-size: 11px;
        font-weight: 700;
        padding: 0 4px;
        font-family: monospace;
      }

      /* ── Loading indicator ── */
      .loading-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(250,250,248,0.6);
        z-index: 500;
        align-items: center;
        justify-content: center;
        backdrop-filter: blur(6px);
      }

      .loading-overlay.visible { display: flex; }

      .spinner {
        width: 32px;
        height: 32px;
        border: 2.5px solid rgba(0,0,0,0.08);
        border-top-color: var(--color-primary);
        border-radius: 50%;
        animation: spin 0.7s linear infinite;
      }

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

      /* ── Divider ── */
      .divider {
        height: 1px;
        background: rgba(0,0,0,0.06);
        margin: 4px 0;
      }

      /* ── UI polish refresh: calm workspace style ── */
      body {
        font: var(--font-body);
        color: var(--text-2);
      }

      .app {
        grid-template-columns: 220px minmax(0, 1fr);
      }

      .sidebar {
        width: 220px;
        background: #FAFAF8;
        border-right: 1px solid #F0EDE8;
      }

      .brand {
        padding: 28px 20px 20px;
        border-bottom: 1px solid #F0EDE8;
      }

      .brand strong {
        font: var(--font-h1);
        color: var(--text);
      }

      .brand span {
        font: var(--font-caption);
        color: var(--muted);
      }

      .nav {
        gap: 0;
        padding: 10px 0;
      }

      .nav-group-label {
        padding: 20px 16px 6px;
        color: var(--muted-light);
        font-size: 11px;
        font-weight: 500;
        letter-spacing: 0.5px;
        text-transform: uppercase;
        opacity: 1;
      }

      .nav-button {
        gap: 0;
        min-height: 36px;
        margin: 2px 8px;
        width: calc(100% - 16px);
        border-radius: 6px;
        padding: 8px 16px;
        color: #5A5A5A;
        font: var(--font-body);
        font-weight: 400;
        box-shadow: none;
      }

      .nav-button .nav-icon {
        width: 18px;
        height: 18px;
        margin-right: 10px;
        color: var(--muted);
        background: transparent;
        border-radius: 0;
        opacity: 1;
      }

      .nav-button .nav-icon svg {
        display: block;
        width: 18px;
        height: 18px;
      }

      .nav-button:hover {
        background: #F5F3F0;
        color: var(--text);
      }

      .nav-button:hover .nav-icon {
        color: var(--text);
      }

      .nav-button.active {
        background: #E6F4FF;
        color: var(--color-primary);
        font-weight: 500;
        box-shadow: none;
      }

      .nav-button.active::before {
        content: "";
        position: absolute;
        top: 8px;
        bottom: 8px;
        left: 0;
        width: 3px;
        border-radius: 999px;
        background: var(--color-primary);
      }

      .nav-button.active .nav-icon {
        color: var(--color-primary);
      }

      .content {
        background: #FAFAF8;
      }

      .topbar {
        background: rgba(250,250,248,0.94);
        border-bottom: 1px solid #F0EDE8;
      }

      .page-title {
        font: var(--font-h1);
        color: var(--text);
        margin-bottom: var(--space-xs);
      }

      .page-description {
        font: var(--font-caption);
        color: var(--muted);
        margin: 0 0 var(--space-lg);
      }

      .panel,
      .profile-card-section,
      .profile-table-wrap,
      .asset-table,
      .identity-card,
      .monthly-summary-grid > div,
      .company-kpi-card,
      .asset-type-card,
      .control-log-form,
      .control-history-panel {
        background: #fff;
        border: 1px solid #F0EDE8;
        border-radius: 8px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.02);
      }

      .btn {
        min-height: 36px;
        border-radius: 6px;
        padding: 8px 16px;
        font-size: 13px;
        font-weight: 500;
        box-shadow: none;
        transition: border-color var(--transition), background var(--transition), color var(--transition), transform var(--transition);
      }

      .btn-primary {
        background: var(--color-primary);
        border-color: var(--color-primary);
        color: #fff;
      }

      .btn-primary:hover {
        background: var(--color-primary-hover);
        border-color: var(--color-primary-hover);
        transform: translateY(-1px);
        box-shadow: none;
      }

      .btn-secondary {
        background: transparent;
        border-color: #E5E2DD;
        color: #5A5A5A;
      }

      .btn-secondary:hover {
        background: #FAFAF8;
        border-color: #BFBFBF;
        color: var(--text);
        box-shadow: none;
      }

      .record-action-btn,
      .table-link-button {
        border: 0;
        background: transparent;
        color: var(--color-primary);
        font-size: 13px;
        font-weight: 500;
        min-height: auto;
        padding: 0;
      }

      .record-action-btn:hover,
      .table-link-button:hover {
        background: transparent;
        color: var(--color-primary-hover);
        text-decoration: underline;
      }

      .table-link-button:hover {
        color: #1677FF;
        text-decoration: underline;
      }

      .record-action-btn.danger:hover {
        background: transparent;
        border-color: transparent;
        color: #E85D5D;
      }

      input,
      select,
      textarea {
        border: 1px solid #E8E5E0;
        border-radius: 6px;
        background: #fff;
        color: var(--text);
        font-size: 13px;
        padding: 8px 12px;
      }

      input:not([type="range"]):not([type="checkbox"]):not([type="radio"]),
      select,
      .identity-card select {
        min-height: 36px;
      }

      textarea {
        line-height: 1.55;
      }

      input:focus,
      select:focus,
      textarea:focus {
        border-color: var(--color-primary);
        outline: none;
        box-shadow: 0 0 0 3px rgba(22,119,255,0.08);
      }

      ::placeholder {
        color: #BFBFBF;
      }

      .field-label {
        color: var(--text-2);
        font: var(--font-caption);
        font-weight: 500;
      }

      .drawer-tabs,
      .control-tabs,
      #agentDrawerOverlay .drawer-tabs {
        display: flex;
        flex-direction: row;
        align-items: flex-end;
        gap: 0;
        min-height: 40px;
        padding: 0 22px;
        border-bottom: 1px solid #F0EDE8;
        background: transparent;
      }

      .drawer-tab,
      .control-tab,
      #agentDrawerOverlay .drawer-tab {
        min-height: 40px;
        border: 0;
        border-bottom: 2px solid transparent;
        border-radius: 0;
        background: transparent;
        color: var(--muted);
        box-shadow: none;
        padding: 0 16px;
        font: var(--font-h2);
        cursor: pointer;
      }

      .drawer-tab:hover,
      .control-tab:hover,
      #agentDrawerOverlay .drawer-tab:hover {
        background: transparent;
        color: var(--text);
      }

      .drawer-tab.active,
      .control-tab.active,
      #agentDrawerOverlay .drawer-tab.active {
        background: transparent;
        color: var(--color-primary);
        border-color: transparent;
        border-bottom-color: var(--color-primary);
        box-shadow: none;
        font-weight: 600;
      }

      .profile-table-wrap,
      .asset-table {
        overflow: auto;
        border: 1px solid #EBEBEB;
      }

      #assetTableHost {
        min-height: 0;
        max-width: 100%;
        max-height: none;
        overflow-x: auto;
        overflow-y: visible;
        scroll-behavior: auto;
      }

      #assetTableHost .profile-data-table {
        min-width: 1180px;
      }

      #assetTableHost .asset-live-room-table {
        min-width: 1320px;
      }

      #assetTableHost .asset-room-title-cell {
        display: flex;
        align-items: center;
        gap: 8px;
        min-width: 180px;
      }

      #assetTableHost .asset-room-title-cell .record-action-btn.compact {
        flex: 0 0 auto;
        padding: 4px 8px;
        font-size: 12px;
      }

      #assetTableHost .asset-room-schedule-action {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 26px;
        border: 1px solid rgba(22, 119, 255, 0.22);
        border-radius: 999px;
        background: rgba(22, 119, 255, 0.08);
        color: #1677FF;
        line-height: 1;
        text-decoration: none;
      }

      #assetTableHost .asset-room-schedule-action:hover {
        border-color: rgba(22, 119, 255, 0.42);
        background: rgba(22, 119, 255, 0.14);
        color: #0958D9;
        text-decoration: none;
      }

      #assetTableHost .asset-room-stack {
        min-width: 160px;
        max-width: 340px;
        line-height: 1.7;
      }

      #assetTableHost .asset-room-anchor-link {
        font-weight: 600;
      }

      .asset-room-detail-dialog {
        width: min(860px, calc(100vw - 32px));
      }

      .asset-room-detail-card {
        display: flex;
        flex-direction: column;
        max-height: min(82vh, 760px);
      }

      .asset-room-detail-card .modal-header,
      .asset-room-detail-card .modal-footer {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 18px 22px;
        border-bottom: 1px solid #ECEFF3;
      }

      .asset-room-detail-card .modal-footer {
        justify-content: flex-end;
        border-top: 1px solid #ECEFF3;
        border-bottom: 0;
        background: #FAFBFC;
      }

      .asset-room-detail-card h3,
      .asset-room-detail-card h4,
      .asset-room-detail-card p {
        margin: 0;
      }

      .asset-room-detail-card h3 {
        font-size: 18px;
        font-weight: 700;
      }

      .asset-room-detail-card .modal-header p {
        margin-top: 6px;
        color: #6B7280;
      }

      .asset-room-detail-card .modal-close {
        width: 32px;
        height: 32px;
        border: 0;
        border-radius: 50%;
        background: transparent;
        color: #6B7280;
        font-size: 22px;
        cursor: pointer;
      }

      .asset-room-detail-body {
        display: grid;
        gap: 16px;
        padding: 18px 22px;
        overflow: auto;
      }

      .asset-room-detail-grid {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 10px;
      }

      .asset-room-detail-grid div {
        display: grid;
        gap: 6px;
        padding: 12px;
        border: 1px solid #ECEFF3;
        border-radius: 8px;
        background: #F8FAFC;
      }

      .asset-room-detail-grid span,
      .asset-room-detail-section-head span,
      .asset-room-equipment-note {
        color: #6B7280;
        font-size: 12px;
      }

      .asset-room-detail-grid strong {
        font-size: 15px;
      }

      .asset-room-detail-section {
        border: 1px solid #ECEFF3;
        border-radius: 8px;
        overflow: hidden;
        background: #FFF;
      }

      .asset-room-detail-section-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 12px 14px;
        background: #F8FAFC;
        border-bottom: 1px solid #ECEFF3;
      }

      .asset-room-detail-table {
        width: 100%;
        border-collapse: collapse;
      }

      .asset-room-detail-table th,
      .asset-room-detail-table td {
        padding: 11px 14px;
        border-bottom: 1px solid #F1F5F9;
        text-align: left;
        white-space: nowrap;
      }

      .asset-room-detail-table tr:last-child td {
        border-bottom: 0;
      }

      .asset-room-equipment-note {
        padding: 12px 14px;
        border-bottom: 1px solid #F1F5F9;
      }

      .asset-render-fallback {
        display: grid;
        align-content: center;
        gap: 8px;
        min-height: 160px;
        padding: 24px;
        color: var(--color-text-secondary, #666);
        background: #FFF7E6;
        border-radius: var(--border-radius-md, 8px);
      }

      .asset-render-fallback strong {
        color: var(--color-text-primary, #222);
        font-size: 15px;
      }

      .asset-render-fallback p {
        margin: 0;
        line-height: 1.6;
      }

      .profile-data-table th,
      .asset-table th {
        height: 44px;
        background: #FAFAF8;
        color: var(--muted);
        font-size: 12px;
        font-weight: 600;
        padding: 12px 16px;
        border-bottom: 1px solid #F0EDE8;
        vertical-align: middle;
        position: sticky;
        top: 0;
        z-index: 2;
      }

      .profile-data-table td,
      .asset-table td {
        height: 44px;
        padding: 12px 16px;
        border-bottom: 1px solid #F8F6F3;
        color: var(--text-2);
        font-size: 13px;
        vertical-align: middle;
      }

      .profile-data-table tbody tr:nth-child(odd),
      .asset-table tbody tr:nth-child(odd) {
        background: #fff;
      }

      .profile-data-table tbody tr:nth-child(even),
      .asset-table tbody tr:nth-child(even) {
        background: #FAFAF8;
      }

      .profile-data-table tbody tr:hover,
      .asset-table tbody tr:hover {
        background: #FDFCFB;
      }

      .profile-data-table th.sortable:hover .sort-icon,
      .profile-data-table th.sorted,
      .asset-table th.sortable:hover .sort-icon,
      .asset-table th.sorted {
        color: var(--color-primary);
      }

      .table-money,
      .company-kpi-value,
      .company-kpi-card strong,
      .monthly-summary-grid strong,
      .asset-summary-value {
        font: var(--font-mono);
      }

      .table-money,
      .asset-table td[data-align="right"] {
        text-align: center;
      }

      .status-badge,
      .tag,
      .issue-badge,
      .urgency-badge {
        border-radius: 4px;
        font-size: 11px;
        font-weight: 500;
        padding: 2px 8px;
      }

      .company-hero {
        min-height: auto;
        grid-template-columns: minmax(300px, 0.85fr) minmax(420px, 1.15fr);
        background: linear-gradient(135deg, #FDFCFB 0%, #F8F5F1 100%);
        border: 1px solid #F0EDE8;
        border-radius: 8px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.02);
        overflow: hidden;
      }

      .company-hero::before,
      .company-hero::after {
        display: none;
      }

      .company-hero > div:first-child {
        padding: 28px;
      }

      .company-hero h2 {
        font: var(--font-h1);
        margin-bottom: 8px;
      }

      .company-hero p {
        font: var(--font-body);
        color: var(--text-2);
      }

      .company-entity-tools {
        display: flex;
        flex-wrap: wrap;
        align-items: flex-end;
        gap: 12px;
        max-width: 100%;
      }

      .company-entity-tools > .field {
        flex: 1 1 220px;
        min-width: 180px;
      }

      .company-entity-form {
        display: flex;
        flex: 1 1 320px;
        min-width: 260px;
        gap: 8px;
      }

      .company-entity-form input {
        min-width: 0;
      }

      .company-entity-form .btn,
      .company-delete-button {
        flex: 0 0 auto;
      }

      .company-kpi-board {
        padding: 22px;
      }

      .company-kpi-card {
        min-width: 110px;
        min-height: 76px;
        padding: 10px 12px;
      }

      .company-kpi-label {
        font: var(--font-caption);
        color: var(--muted);
      }

      .company-kpi-value {
        font-size: 18px;
        line-height: 1.25;
      }

      /* ── TDesign Starter refresh: grey page, white containers ── */
      html,
      body {
        background: var(--color-bg-page);
        font-family: var(--font-family);
        color: var(--color-text-primary);
        -webkit-font-smoothing: antialiased;
      }

      .app {
        grid-template-columns: 232px minmax(0, 1fr);
        background: var(--color-bg-page);
      }

      .sidebar {
        width: 232px;
        padding: 12px 0;
        background: var(--color-bg-container);
        border-right: 0;
      }

      .brand {
        padding: 20px 24px 28px;
        border-bottom: 0;
      }

      .brand strong {
        font-size: 18px;
        line-height: 1.4;
        font-weight: 700;
        color: var(--color-text-primary);
      }

      .brand span {
        margin-top: 4px;
        font-size: 12px;
        line-height: 1.4;
        font-weight: 400;
        color: var(--color-text-placeholder);
      }

      .nav {
        padding: 0;
      }

      .nav-group-label {
        padding: 16px 24px 4px;
        font-size: 12px;
        line-height: 1.4;
        font-weight: 400;
        color: var(--color-text-placeholder);
        text-transform: none;
        letter-spacing: 0;
      }

      .nav-button {
        min-height: 40px;
        width: 100%;
        margin: 0;
        padding: 10px 24px;
        border-radius: 0;
        color: var(--color-text-secondary);
        font-size: 14px;
        line-height: 20px;
        font-weight: 400;
        transition: all 0.2s ease;
      }

      .nav-button .nav-icon {
        width: 18px;
        height: 18px;
        margin-right: 12px;
        color: var(--color-text-secondary);
      }

      .nav-button:hover {
        background: var(--color-bg-container-hover);
        color: var(--color-text-primary);
      }

      .nav-button:hover .nav-icon {
        color: var(--color-text-primary);
      }

      .nav-button.active {
        background: var(--color-primary-light);
        color: var(--color-primary);
        font-weight: 500;
        padding-left: 21px;
        border-left: 3px solid var(--color-primary);
      }

      .nav-button.active::before {
        display: none;
      }

      .nav-button.active .nav-icon {
        color: var(--color-primary);
      }

      .sidebar-footer {
        border-top: 1px solid var(--color-border-light);
      }

      .content,
      .topbar {
        background: var(--color-bg-page);
      }

      .topbar {
        padding: 24px 24px 0;
        border-bottom: 0;
      }

      .view.active {
        padding: 24px;
      }

      .page-title {
        font-size: 20px;
        line-height: 1.3;
        font-weight: 600;
        color: var(--color-text-primary);
      }

      .page-description {
        margin-top: 4px;
        margin-bottom: 16px;
        font-size: 12px;
        line-height: 1.4;
        font-weight: 400;
        color: var(--color-text-placeholder);
      }

      .panel,
      .profile-card-section,
      .profile-table-wrap,
      .asset-table,
      .identity-card,
      .monthly-summary-grid > div,
      .company-kpi-card,
      .asset-type-card,
      .control-log-form,
      .control-history-panel,
      .company-hero,
      dialog,
      .profile-drawer,
      .agent-drawer {
        background: var(--color-bg-container);
        border: 1px solid var(--color-border);
        border-radius: var(--border-radius-md);
        box-shadow: none;
      }

      .panel,
      .profile-card-section,
      .control-log-form,
      .control-history-panel {
        padding: 24px;
      }

      .panel-header h2,
      .profile-card-section h3,
      .company-kpi-title,
      .asset-section-title,
      .control-section-title {
        font-size: 16px;
        line-height: 1.4;
        font-weight: 600;
        color: var(--color-text-primary);
      }

      .btn {
        min-height: 36px;
        border-radius: var(--border-radius-sm);
        padding: 8px 16px;
        font-size: 14px;
        line-height: 20px;
        font-weight: 400;
        box-shadow: none;
      }

      .btn-primary {
        background: var(--color-primary);
        border-color: var(--color-primary);
        color: #fff;
      }

      .btn-primary:hover {
        background: var(--color-primary-hover);
        border-color: var(--color-primary-hover);
        opacity: 1;
        transform: none;
      }

      .btn-secondary {
        background: #fff;
        border: 1px solid var(--color-border);
        color: var(--color-text-primary);
      }

      .btn-secondary:hover {
        background: #fff;
        border-color: var(--color-primary);
        color: var(--color-primary);
      }

      .table-link-button,
      .record-action-btn,
      .asset-action-button,
      .text-button {
        background: none;
        border: 0;
        color: var(--color-primary);
        font-size: 14px;
        line-height: 20px;
        font-weight: 400;
        padding: 0;
      }

      .table-link-button:hover,
      .record-action-btn:hover,
      .asset-action-button:hover,
      .text-button:hover {
        color: var(--color-primary-hover);
        text-decoration: underline;
      }

      input,
      select,
      textarea {
        border: 1px solid var(--color-border);
        border-radius: var(--border-radius-sm);
        background: #fff;
        color: var(--color-text-primary);
        font-size: 14px;
        line-height: 20px;
        padding: 8px 12px;
        box-shadow: none;
      }

      input:not([type="range"]):not([type="checkbox"]):not([type="radio"]),
      select,
      .identity-card select {
        min-height: 36px;
      }

      input:focus,
      select:focus,
      textarea:focus {
        border-color: var(--color-primary);
        outline: none;
        box-shadow: 0 0 0 2px rgba(22,119,255,0.1);
      }

      ::placeholder {
        color: var(--color-text-placeholder);
      }

      .field-label {
        font-size: 12px;
        line-height: 1.4;
        font-weight: 400;
        color: var(--color-text-placeholder);
      }

      .drawer-tabs,
      .control-tabs,
      #agentDrawerOverlay .drawer-tabs {
        min-height: 42px;
        padding: 0 24px;
        border-bottom: 1px solid var(--color-border-light);
      }

      .drawer-tab,
      .control-tab,
      #agentDrawerOverlay .drawer-tab {
        min-height: 42px;
        padding: 8px 16px 10px;
        color: var(--color-text-placeholder);
        font-size: 14px;
        line-height: 20px;
        font-weight: 400;
      }

      .drawer-tab:hover,
      .control-tab:hover,
      #agentDrawerOverlay .drawer-tab:hover {
        color: var(--color-text-primary);
      }

      .drawer-tab.active,
      .control-tab.active,
      #agentDrawerOverlay .drawer-tab.active {
        color: var(--color-primary);
        border-bottom-color: var(--color-primary);
        font-weight: 500;
      }

      #controlView.view.active {
        gap: 14px;
        padding-top: 14px;
      }

      .control-schedule-modes {
        display: inline-flex;
        gap: 3px;
        width: fit-content;
        margin-bottom: 18px;
        padding: 3px;
        border: 1px solid var(--color-border-light);
        border-radius: 8px;
        background: #f3f5f8;
      }

      .control-schedule-mode {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 7px;
        min-width: 124px;
        min-height: 34px;
        border: 0;
        border-radius: 6px;
        background: transparent;
        color: var(--color-text-secondary);
        padding: 0 16px;
        font-size: 13px;
        font-weight: 600;
      }

      .control-schedule-mode.active {
        background: #fff;
        color: var(--color-primary);
        box-shadow: 0 1px 4px rgba(15, 23, 42, 0.1);
      }

      .control-schedule-mode-count {
        display: inline-grid;
        min-width: 20px;
        height: 20px;
        place-items: center;
        padding: 0 5px;
        border-radius: 10px;
        background: #e8f2ff;
        color: var(--color-primary);
        font-size: 11px;
        font-variant-numeric: tabular-nums;
        line-height: 1;
      }

      #controlSchedulePanel.is-availability .control-room-toolbar,
      #controlSchedulePanel.is-availability #controlRoomTableHost,
      #controlSchedulePanel.is-timeline .control-availability,
      #controlSchedulePanel.is-timeline .control-room-toolbar,
      #controlSchedulePanel.is-timeline #controlRoomTableHost .control-room-sheet,
      #controlSchedulePanel.is-maintenance .control-availability,
      #controlSchedulePanel.is-maintenance #controlRoomTableHost .control-schedule-board,
      #controlSchedulePanel.is-review .control-availability,
      #controlSchedulePanel.is-review .control-room-toolbar,
      #controlSchedulePanel.is-review #controlRoomTableHost {
        display: none;
      }

      .control-availability-review {
        display: none;
        gap: 12px;
        min-width: 0;
      }

      #controlSchedulePanel.is-review .control-availability-review {
        display: grid;
      }

      .control-availability {
        display: grid;
        gap: 12px;
        min-width: 0;
        margin: 0;
        padding: 0;
        border: 0;
      }

      .control-availability-head {
        display: flex;
        align-items: flex-end;
        justify-content: space-between;
        gap: 16px;
        min-width: 0;
      }

      .control-availability-head > div:first-child {
        flex: 1 1 320px;
        min-width: 0;
      }

      .control-availability-head h3 {
        margin: 0;
        font-size: 16px;
        line-height: 1.4;
      }

      .control-availability-head .control-room-note {
        margin: 4px 0 0;
      }

      .control-availability-actions {
        display: flex;
        flex: 0 1 auto;
        align-items: flex-end;
        justify-content: flex-end;
        gap: 8px;
        flex-wrap: wrap;
        min-width: 0;
      }

      .control-availability-date-field {
        width: 150px;
      }

      .control-availability-meta {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        min-height: 28px;
        padding: 5px 10px;
        border-left: 3px solid #1677ff;
        background: #f5f9ff;
        color: var(--color-text-secondary);
        font-size: 12px;
        line-height: 18px;
        min-width: 0;
      }

      #controlAvailabilityHost {
        min-width: 0;
      }

      #controlAvailabilityReviewHost {
        display: grid;
        gap: 12px;
        min-width: 0;
      }

      .control-review-filters {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        align-items: end;
        gap: 10px;
        min-width: 0;
        padding: 12px;
        border: 1px solid var(--color-border);
        border-radius: var(--border-radius-md);
        background: var(--color-bg-container);
      }

      .control-review-filters .field {
        min-width: 0;
      }

      .control-review-metrics {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 10px;
        min-width: 0;
      }

      .control-review-metric {
        display: grid;
        align-content: start;
        gap: 4px;
        min-width: 0;
        min-height: 104px;
        margin: 0;
        padding: 15px 16px;
        border: 1px solid var(--color-border);
        border-radius: var(--border-radius-md);
        background: var(--color-bg-container);
      }

      .control-review-metric span,
      .control-review-metric small {
        color: var(--color-text-secondary);
        font-size: 12px;
        line-height: 18px;
      }

      .control-review-metric strong {
        overflow: hidden;
        color: var(--color-text-primary);
        font-size: 26px;
        font-variant-numeric: tabular-nums;
        line-height: 34px;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .control-review-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        min-width: 0;
      }

      .control-review-card {
        min-width: 0;
        overflow: hidden;
        border: 1px solid var(--color-border);
        border-radius: var(--border-radius-md);
        background: var(--color-bg-container);
      }

      .control-review-card-head {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 12px;
        min-height: 66px;
        padding: 13px 16px;
        border-bottom: 1px solid var(--color-border);
      }

      .control-review-card-head h4,
      .control-review-card-head p {
        margin: 0;
      }

      .control-review-card-head h4 {
        color: var(--color-text-primary);
        font-size: 14px;
        line-height: 22px;
      }

      .control-review-card-head p,
      .control-review-card-head > span {
        color: var(--color-text-secondary);
        font-size: 12px;
        line-height: 20px;
      }

      .control-review-card-head > span {
        white-space: nowrap;
      }

      .control-review-table-shell {
        max-height: 330px;
        border: 0;
        border-radius: 0;
      }

      .control-review-table-shell .control-review-table {
        min-width: 0;
        table-layout: fixed;
      }

      .control-review-table-shell .control-review-table th:first-child {
        width: 34%;
      }

      .control-review-detail-shell {
        max-height: 360px;
        border: 0;
        border-radius: 0;
      }

      .control-review-detail-shell .control-review-table {
        min-width: 920px;
      }

      .control-review-table th,
      .control-review-table td {
        padding: 10px 12px;
        font-size: 12px;
        font-variant-numeric: tabular-nums;
        vertical-align: middle;
      }

      .control-review-table th:not(:first-child),
      .control-review-table td:not(:first-child) {
        text-align: center;
      }

      .control-review-room-name {
        display: grid;
        gap: 2px;
      }

      .control-review-room-name small {
        color: var(--color-text-secondary);
        font-size: 11px;
        line-height: 16px;
      }

      .control-company-ownership {
        display: inline-grid;
        justify-items: start;
        gap: 2px;
        min-width: 0;
        color: var(--color-text-primary);
        line-height: 18px;
      }

      .control-company-ownership strong {
        max-width: 180px;
        overflow: hidden;
        font-size: 12px;
        font-weight: 600;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .control-company-ownership small {
        max-width: 190px;
        overflow: hidden;
        color: var(--color-text-secondary);
        font-size: 11px;
        line-height: 16px;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .control-company-ownership em {
        display: inline-flex;
        align-items: center;
        min-height: 20px;
        padding: 1px 6px;
        border: 1px solid #ffd591;
        border-radius: 5px;
        background: #fff7e6;
        color: #ad4e00;
        font-size: 11px;
        font-style: normal;
        font-weight: 600;
        white-space: nowrap;
      }

      .control-company-ownership.is-missing strong {
        color: #ad6800;
      }

      .control-review-empty {
        padding: 20px;
        color: var(--color-text-placeholder);
        text-align: center;
      }

      .control-review-notice {
        padding: 9px 12px;
        border: 1px solid #ffe7ba;
        border-radius: 8px;
        background: #fffbe6;
        color: #8c5a00;
        font-size: 12px;
        line-height: 20px;
      }

      .control-review-notice strong {
        color: #ad6800;
      }

      .control-review-detail {
        min-width: 0;
        overflow: hidden;
        border: 1px solid var(--color-border);
        border-radius: var(--border-radius-md);
        background: var(--color-bg-container);
      }

      .control-review-detail summary {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        min-height: 58px;
        padding: 10px 16px;
        cursor: pointer;
        list-style: none;
      }

      .control-review-detail summary::-webkit-details-marker {
        display: none;
      }

      .control-review-detail summary span {
        display: grid;
        gap: 2px;
      }

      .control-review-detail summary strong {
        color: var(--color-text-primary);
        font-size: 14px;
      }

      .control-review-detail summary small,
      .control-review-detail summary em {
        color: var(--color-text-secondary);
        font-size: 12px;
        font-style: normal;
      }

      .control-review-detail summary::after {
        content: "展开";
        color: var(--color-primary);
        font-size: 12px;
      }

      .control-review-detail[open] summary {
        border-bottom: 1px solid var(--color-border);
      }

      .control-review-detail[open] summary::after {
        content: "收起";
      }

      .control-availability-table-shell {
        max-height: 360px;
      }

      .control-availability-table td {
        vertical-align: middle;
      }

      .profile-data-table.control-availability-table[data-responsive-card-table] th:first-child,
      .profile-data-table.control-availability-table[data-responsive-card-table] td:first-child {
        min-width: 110px;
        white-space: nowrap;
      }

      .profile-data-table.control-availability-table[data-responsive-card-table] th:nth-child(4),
      .profile-data-table.control-availability-table[data-responsive-card-table] td:nth-child(4) {
        min-width: 150px;
      }

      .control-availability-table tr.is-expired td {
        color: var(--color-text-placeholder);
        background: #fafafa;
      }

      .control-availability-time,
      .control-availability-updater {
        display: grid;
        gap: 2px;
      }

      .control-availability-time strong {
        font-variant-numeric: tabular-nums;
        white-space: nowrap;
      }

      .control-availability-time span,
      .control-availability-updater small {
        color: var(--color-text-placeholder);
        font-size: 11px;
      }

      .control-availability-purpose {
        display: inline-flex;
        align-items: center;
        min-height: 24px;
        padding: 2px 8px;
        border: 1px solid #91caff;
        border-radius: 6px;
        background: #e6f4ff;
        color: #0958d9;
        font-size: 12px;
        font-weight: 600;
        white-space: nowrap;
      }

      .control-availability-note {
        display: block;
        max-width: 260px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .control-availability-status {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        white-space: nowrap;
      }

      .control-availability-status i {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: #bfbfbf;
      }

      .control-availability-status.is-active {
        color: #237804;
        font-weight: 600;
      }

      .control-availability-status.is-active i {
        background: #52c41a;
        box-shadow: 0 0 0 3px rgba(82, 196, 26, 0.14);
      }

      .control-availability-status.is-upcoming {
        color: #ad6800;
      }

      .control-availability-status.is-upcoming i {
        background: #faad14;
      }

      .control-availability-status.is-pending,
      .control-availability-status.is-approved,
      .control-availability-status.is-rejected,
      .control-availability-status.is-not_required {
        padding: 3px 8px;
        border-radius: 999px;
        background: #f5f7fa;
        color: #64748b;
        font-weight: 600;
      }

      .control-availability-status.is-pending {
        background: #fff7e6;
        color: #ad6800;
      }

      .control-availability-status.is-approved {
        background: #f0fdf4;
        color: #15803d;
      }

      .control-availability-status.is-rejected {
        background: #fff1f0;
        color: #cf1322;
      }

      .control-availability-empty {
        display: flex;
        align-items: center;
        gap: 12px;
        min-height: 64px;
        border: 1px dashed var(--color-border);
        border-radius: 8px;
        background: #fafafa;
        color: var(--color-text-secondary);
        padding: 12px 14px;
        text-align: left;
      }

      .control-availability-empty strong {
        color: var(--color-text-primary);
      }

      .control-availability-dialog {
        width: min(680px, calc(100vw - 32px));
      }

      .control-availability-dialog .dialog-header p {
        margin: 3px 0 0;
        color: var(--color-text-placeholder);
        font-size: 12px;
      }

      .control-availability-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .control-availability-next-day-toggle {
        min-height: 38px;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        color: var(--color-text-primary);
      }

      .control-availability-next-day-toggle input {
        width: 16px;
        height: 16px;
        margin: 0;
      }

      @media (max-width: 768px) {
        .control-schedule-modes {
          display: flex;
          width: 100%;
        }

        .control-schedule-mode {
          flex: 1 1 0;
          min-width: 0;
          padding: 0 8px;
        }

        .control-availability-head {
          align-items: stretch;
          flex-direction: column;
        }

        .control-availability-head > div:first-child {
          flex: 0 0 auto;
        }

        .control-availability-actions {
          display: grid;
          grid-template-columns: minmax(0, 1fr) auto;
          align-items: end;
        }

        .control-availability-date-field {
          grid-column: 1 / -1;
          width: auto;
        }

        .control-availability-meta {
          align-items: flex-start;
          flex-direction: column;
        }

        .control-availability-empty {
          align-items: flex-start;
          flex-direction: column;
          gap: 3px;
        }

        .control-availability-form-grid {
          grid-template-columns: 1fr;
        }

        .control-review-filters,
        .control-review-metrics,
        .control-review-grid {
          grid-template-columns: 1fr;
        }

        .control-review-filters .btn {
          width: 100%;
        }

        .control-review-metrics {
          grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .control-review-metric {
          min-height: 92px;
          padding: 12px;
        }

      }

      .profile-table-wrap,
      .asset-table {
        border-radius: var(--border-radius-md);
        border: 1px solid var(--color-border);
        background: var(--color-bg-container);
      }

      .profile-data-table,
      .asset-table table {
        width: 100%;
        border-collapse: collapse;
        border-spacing: 0;
      }

      .profile-data-table th,
      .asset-table th {
        height: auto;
        background: var(--color-bg-page);
        color: var(--color-text-secondary);
        font-size: 14px;
        line-height: 20px;
        font-weight: 500;
        padding: 12px 16px;
        border-bottom: 1px solid var(--color-border);
        text-align: left;
        vertical-align: middle;
        position: sticky;
        top: 0;
        z-index: 2;
      }

      .profile-data-table td,
      .asset-table td {
        height: 48px;
        padding: 14px 16px;
        border-bottom: 1px solid var(--color-border-light);
        color: var(--color-text-primary);
        font-size: 14px;
        line-height: 20px;
        font-weight: 400;
        vertical-align: middle;
      }

      .profile-data-table tbody tr:nth-child(odd),
      .profile-data-table tbody tr:nth-child(even),
      .asset-table tbody tr:nth-child(odd),
      .asset-table tbody tr:nth-child(even) {
        background: transparent;
      }

      .profile-data-table tbody tr:hover,
      .asset-table tbody tr:hover {
        background: var(--color-bg-container-hover);
      }

      .profile-data-table tbody tr:last-child td,
      .asset-table tr:last-child td {
        border-bottom: 0;
      }

      .sort-icon {
        color: var(--color-text-placeholder);
        display: inline-block;
        margin-left: 4px;
        width: 18px;
        text-align: left;
        vertical-align: baseline;
      }

      .profile-data-table th.sortable:hover .sort-icon,
      .profile-data-table th.sorted,
      .asset-table th.sortable:hover .sort-icon,
      .asset-table th.sorted {
        color: var(--color-primary);
      }

      .table-money {
        font-family: var(--font-family);
        font-size: 14px;
        font-weight: 400;
        text-align: center;
      }

      .profile-data-table th:last-child,
      .profile-data-table td:last-child,
      .asset-table th:last-child,
      .asset-table td:last-child {
        text-align: center;
      }

      .company-kpi-board {
        gap: 16px;
        padding: 24px;
      }

      .company-kpi-row,
      .asset-summary-grid {
        gap: 16px;
      }

      #assetView .profile-list-toolbar {
        gap: 10px;
        margin-bottom: 10px;
      }

      #assetView .asset-summary-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 12px;
        margin-bottom: 10px;
      }

      #assetView .asset-equipment-view-toolbar {
        flex-wrap: wrap;
      }

      #assetView .company-kpi-card {
        min-height: 70px;
        padding: 12px 16px;
      }

      #assetView .company-kpi-card strong {
        margin-top: 4px;
        font-size: 22px;
      }

      #assetView .company-kpi-card em,
      #assetView .company-kpi-card i {
        display: none;
      }

      .company-kpi-row.all {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
        align-items: stretch;
      }

      .company-kpi-card {
        position: relative;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        border: 1px solid var(--color-border);
        border-radius: var(--border-radius-md);
        background: var(--color-bg-container);
        min-height: 100px;
        padding: 16px 20px;
        box-shadow: none;
      }

      .company-kpi-card:hover {
        border-color: var(--color-primary);
        box-shadow: none;
      }

      .company-kpi-card span {
        color: var(--color-text-secondary);
        font-size: 14px;
        line-height: 20px;
        font-weight: 400;
        margin-bottom: 0;
        min-height: 20px;
        overflow: visible;
        text-overflow: unset;
        white-space: nowrap;
      }

      .company-kpi-card strong {
        margin-top: 8px;
        color: var(--color-text-primary);
        font-size: clamp(20px, 1.6vw, 28px);
        line-height: 1.25;
        font-weight: 700;
        font-family: var(--font-family);
        overflow: visible;
        white-space: nowrap;
      }

      .company-kpi-card strong.kpi-value-md {
        font-size: 22px;
      }

      .company-kpi-card strong.kpi-value-sm {
        font-size: 18px;
      }

      .company-kpi-card.warning strong {
        color: var(--color-danger);
      }

      .company-kpi-card.safe strong {
        color: var(--color-success);
      }

      .company-kpi-card.zero strong {
        color: var(--color-text-disabled);
      }

      .company-kpi-card em {
        margin-top: 8px;
        color: var(--color-text-placeholder);
        font-size: 12px;
        line-height: 18px;
        font-weight: 400;
        display: block;
        min-height: 18px;
        overflow: visible;
        text-overflow: unset;
        white-space: normal;
      }

      .company-kpi-card i {
        right: 16px;
        top: 50%;
        transform: translateY(-50%);
        color: var(--color-text-placeholder);
        font-size: 14px;
      }

      .company-kpi-card:hover i {
        color: var(--color-primary);
      }

      .designer-toolbar {
        align-items: end;
      }

      .designer-keyword-field {
        min-width: 220px;
      }

      .designer-primary-action {
        margin-left: auto;
        white-space: nowrap;
      }

      .designer-summary-grid {
        display: grid;
        grid-template-columns: repeat(5, minmax(120px, 1fr));
        gap: 12px;
        margin: 12px 0 14px;
      }

      .designer-summary-grid .company-kpi-card {
        min-height: 76px;
        padding: 14px 16px;
      }

      .designer-tabs {
        margin: 4px 0 14px;
      }

      .designer-board-section {
        border: 1px solid #c7cfdd;
        border-radius: 6px;
        background: #f6f8fc;
        overflow: hidden;
        box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
      }

      .designer-board-title {
        display: flex;
        align-items: baseline;
        justify-content: center;
        gap: 14px;
        min-height: 48px;
        padding: 8px 16px;
        border-bottom: 3px solid #ffffff;
        background: #3f70bd;
        color: #050505;
        text-align: center;
      }

      .designer-board-title strong {
        font-size: clamp(22px, 2vw, 34px);
        line-height: 1.2;
        font-weight: 800;
        letter-spacing: 0;
      }

      .designer-board-title span {
        color: rgba(0, 0, 0, 0.72);
        font-size: 13px;
        line-height: 20px;
      }

      .designer-board-title-with-action {
        position: relative;
        padding-right: 170px;
      }

      .designer-board-title-with-action .btn {
        position: absolute;
        right: 14px;
        top: 50%;
        transform: translateY(-50%);
        border-color: rgba(255, 255, 255, 0.8);
        background: rgba(255, 255, 255, 0.96);
      }

      .designer-board-wrap {
        overflow: auto;
      }

      .designer-board-table {
        width: 100%;
        min-width: 980px;
        border-collapse: collapse;
        table-layout: fixed;
        color: #050505;
        font-size: 16px;
        line-height: 1.35;
      }

      .designer-board-table th,
      .designer-board-table td {
        border: 2px solid #ffffff;
        padding: 12px 10px;
        text-align: center;
        vertical-align: middle;
        background: #e5e9f3;
      }

      .designer-board-table thead th {
        background: #c9d1e5;
        font-size: 17px;
        font-weight: 800;
      }

      .designer-board-table tbody tr:nth-child(even) td {
        background: #c8d1e6;
      }

      .designer-board-table tbody tr:nth-child(odd) td {
        background: #e6e9f4;
      }

      .designer-board-table tfoot th,
      .designer-board-table tfoot td {
        background: #c8d1e6;
        font-size: 17px;
        font-weight: 800;
      }

      .designer-board-owner {
        width: 110px;
        font-size: 18px;
        font-weight: 800;
      }

      .designer-board-anchor {
        color: #050505;
        font-size: 16px;
        font-weight: 700;
      }

      .designer-board-designer {
        min-width: 120px;
      }

      .designer-board-count {
        display: block;
        font-weight: 800;
      }

      .designer-board-table em {
        display: block;
        color: #596579;
        font-size: 12px;
        line-height: 18px;
        font-style: normal;
        font-weight: 600;
      }

      .designer-board-total {
        font-weight: 800;
      }

      .designer-board-table .assigned,
      .designer-board-total.assigned {
        color: #d60000;
      }

      .designer-board-table .danger {
        color: #d60000;
      }

      .designer-detail-section {
        margin-top: 0;
      }

      .designer-detail-table th,
      .designer-detail-table td {
        font-size: 14px;
        padding: 10px 8px;
      }

      .designer-detail-table .record-action-btn {
        background: transparent;
      }

      .designer-detail-table .table-link-button {
        color: #006eff;
        font-weight: 700;
      }

      .designer-board-meta {
        padding: 10px 14px;
        border-top: 2px solid #ffffff;
        background: #e6e9f4;
        color: #596579;
        font-size: 12px;
        text-align: right;
      }

      .designer-empty-map {
        margin: 14px;
        border: 1px dashed var(--color-border);
        border-radius: var(--border-radius-sm);
        color: var(--color-text-secondary);
        background: var(--color-bg-layout);
        padding: 38px 16px;
        text-align: center;
      }

      .status-badge,
      .issue-badge,
      .urgency-badge {
        gap: 6px;
        border: 0;
        border-radius: 0;
        background: transparent;
        color: var(--color-text-primary);
        padding: 0;
        font-size: 14px;
        line-height: 20px;
        font-weight: 400;
      }

      .status-badge::before,
      .issue-badge::before,
      .urgency-badge::before {
        content: "";
        display: inline-block;
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: var(--color-success);
      }

      .status-badge.warning::before,
      .issue-badge.warning::before,
      .urgency-badge.warning::before {
        background: var(--color-warning);
      }

      .status-badge.danger::before,
      .issue-badge.danger::before,
      .urgency-badge.danger::before,
      .status-badge.offline::before {
        background: var(--color-danger);
      }

      .status-badge.muted::before,
      .status-badge.gray::before {
        background: var(--color-text-disabled);
      }

      .company-hero {
        background: var(--color-bg-container);
        border: 1px solid var(--color-border);
        border-radius: var(--border-radius-md);
      }

      .company-hero.company-maintenance-hero {
        grid-template-columns: 1fr;
        min-height: auto;
      }

      .company-hero h2 {
        font-size: 20px;
        line-height: 1.3;
        font-weight: 600;
        color: var(--color-text-primary);
      }

      .company-hero p {
        font-size: 14px;
        line-height: 1.6;
        font-weight: 400;
        color: var(--color-text-secondary);
      }

      .record-actions,
      .table-actions,
      .platform-account-actions,
      .live-session-actions,
      .anchor-profile-actions {
        display: inline-flex;
        align-items: center;
        gap: 0;
      }

      .user-action-cell {
        text-align: center !important;
        width: 180px;
      }

      .user-table-actions {
        width: 100%;
        justify-content: center;
      }

      .record-action-btn,
      .table-actions .btn,
      .platform-account-actions button,
      .broker-actions .btn-icon,
      .live-session-actions .btn-icon,
      .anchor-profile-actions .btn-icon {
        min-height: 28px;
        padding: 4px 8px;
      }

      .record-action-btn + .record-action-btn,
      .table-actions > * + *,
      .platform-account-actions button + button,
      .broker-actions .btn-icon + .btn-icon,
      .live-session-actions .btn-icon + .btn-icon,
      .anchor-profile-actions .btn-icon + .btn-icon {
        margin-left: 12px;
        padding-left: 20px;
        border-left: 1px solid var(--color-border);
      }

      .record-action-btn.danger,
      .table-actions .danger,
      [data-action^="delete"] {
        color: var(--color-text-secondary) !important;
      }

      .record-action-btn.danger:hover,
      .table-actions .danger:hover,
      [data-action^="delete"]:hover {
        color: var(--color-danger) !important;
        text-decoration: underline;
      }

      #confirmDialog {
        width: 400px;
        max-width: calc(100vw - 32px);
        border: 0;
        border-radius: var(--border-radius-md);
        padding: 0;
        background: #fff;
      }

      #confirmDialog::backdrop {
        background: rgba(0,0,0,0.55);
      }

      #confirmDialog .dialog-header {
        justify-content: flex-start;
        gap: 10px;
        padding: 20px 24px 0;
        border-bottom: 0;
        background: #fff;
      }

      #confirmDialog .dialog-header h2 {
        font-size: 16px;
        font-weight: 600;
        color: var(--color-text-primary);
      }

      .confirm-warning-icon {
        width: 18px;
        height: 18px;
        color: var(--color-warning);
        flex: 0 0 auto;
      }

      #confirmDialog .dialog-body {
        padding: 12px 24px;
      }

      #confirmDialog .dialog-footer {
        padding: 16px 24px;
        border-top: 0;
        background: #fff;
      }

      #productImportDialog {
        min-width: 700px;
        width: min(920px, calc(100vw - 48px));
      }

      .btn-danger {
        background: var(--color-danger);
        border-color: var(--color-danger);
        color: #fff;
      }

      .btn-danger:hover {
        background: #C9353F;
        border-color: #C9353F;
        color: #fff;
      }

      .trash-button {
        justify-content: flex-start;
        width: 100%;
      }

      .trash-drawer-overlay {
        position: fixed;
        inset: 0;
        display: none;
        justify-content: flex-end;
        background: rgba(0,0,0,0.18);
        z-index: 360;
      }

      .trash-drawer-overlay.visible {
        display: flex;
      }

      .trash-drawer {
        width: min(640px, 92vw);
        height: 100vh;
        background: #fff;
        border-left: 1px solid var(--color-border);
        transform: translateX(100%);
        transition: transform 0.2s ease;
        display: flex;
        flex-direction: column;
      }

      .trash-drawer-overlay.visible .trash-drawer {
        transform: translateX(0);
      }

      .trash-list {
        display: grid;
        gap: 8px;
      }

      .trash-row {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto auto;
        align-items: center;
        gap: 12px;
        padding: 12px 0;
        border-bottom: 1px solid var(--color-border-light);
      }

      .trash-type-badge {
        font-size: 11px;
        padding: 2px 6px;
        border-radius: 2px;
        background: var(--color-bg-page);
        color: var(--color-text-secondary);
      }

      .trash-meta {
        color: var(--color-text-placeholder);
        font-size: 12px;
        margin-top: 2px;
      }

      .undo-toast {
        position: fixed;
        left: 50%;
        bottom: 28px;
        transform: translateX(-50%);
        z-index: 1200;
        display: inline-flex;
        align-items: center;
        gap: 16px;
        max-width: calc(100vw - 32px);
        background: #1A1A1A;
        color: #fff;
        border-radius: var(--border-radius-md);
        padding: 12px 20px;
        box-shadow: 0 8px 24px rgba(0,0,0,0.18);
      }

      .undo-toast button {
        border: 0;
        background: transparent;
        color: var(--color-primary);
        font-weight: 500;
        cursor: pointer;
        padding: 0;
      }

      /* ── Responsive ── */
      @media (max-width: 1400px) {
        .company-hero {
          grid-template-columns: minmax(330px, 0.88fr) minmax(360px, 1.12fr);
        }
      }

      @media (max-width: 1180px) {
        .workbench { grid-template-columns: 1fr; }
        .workspace-overview-grid {
          grid-template-columns: repeat(2, minmax(0, 1fr));
        }
        .workspace-secondary-grid {
          grid-template-columns: repeat(2, minmax(0, 1fr));
        }
        .company-hero,
        .company-grid,
        .company-directory-layout,
        .management-subgrid {
          grid-template-columns: 1fr;
        }
        .company-kpi-board {
          padding: 0 22px 22px;
        }
        .company-kpi-row.all {
          grid-template-columns: repeat(2, minmax(0, 1fr));
        }
        .asset-summary-grid,
        .company-relation-grid,
        .asset-type-picker {
          grid-template-columns: repeat(2, minmax(0, 1fr));
        }
        .company-kpi-card strong,
        .table-money,
        .profile-data-table td.table-money,
        .asset-table td.table-money,
        .company-kpi-value,
        .monthly-summary-grid strong,
        .asset-summary-value {
          font-size: 18px;
        }
        .company-kpi-card span {
          font-size: 11px;
          white-space: normal;
          overflow: visible;
          text-overflow: unset;
        }
      }

      @media (max-width: 1024px) {
        .workspace-hero {
          grid-template-columns: 1fr;
        }

        .workspace-hero-meta {
          justify-content: flex-start;
        }

        .workspace-layout {
          grid-template-columns: 1fr;
        }

        .workspace-anchor-fill-table {
          min-width: 640px;
        }

        .company-growth-layout {
          flex-direction: column;
        }

        .company-entity-profile-grid {
          grid-template-columns: 1fr;
        }

        .company-growth-form-column,
        .company-growth-report-column {
          flex: 1 1 auto;
          width: 100%;
        }

        .company-growth-form-panel {
          position: static;
        }
      }

      @media (max-width: 768px) {
        .app { grid-template-columns: 1fr; }

        .company-kpi-card strong,
        .table-money,
        .profile-data-table td.table-money,
        .asset-table td.table-money,
        .company-kpi-value,
        .monthly-summary-grid strong,
        .asset-summary-value {
          font-size: 16px;
        }

        .company-kpi-card {
          padding: 8px 10px;
          min-height: 68px;
        }

        .company-kpi-card span {
          font-size: 11px;
          white-space: normal;
        }

        .workspace-hero-meta {
          grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .workspace-secondary-grid {
          grid-template-columns: 1fr;
        }

        .company-relation-grid {
          grid-template-columns: 1fr;
        }

        .sidebar {
          position: sticky;
          top: 0;
          height: auto;
          z-index: 20;
          border-right: 0;
          border-bottom: 1px solid rgba(0,0,0,0.07);
        }

        .nav {
          display: grid;
          grid-template-columns: repeat(6, minmax(0, 1fr));
          gap: 6px;
          padding: 8px 10px 10px;
        }

        .nav-group-label { display: none; }

        .nav-group,
        .nav-group.collapsed {
          display: contents;
          max-height: none;
          opacity: 1;
          pointer-events: auto;
        }

        .nav-button {
          min-width: 0;
          flex-direction: column;
          justify-content: center;
          gap: 4px;
          font-size: 11px;
          min-height: 58px;
          padding: 6px 2px;
        }

        .nav-button span:last-child {
          max-width: 100%;
          white-space: nowrap;
          overflow: hidden;
          text-overflow: ellipsis;
        }

        .nav-button .nav-icon {
          width: 18px;
          height: 18px;
          margin-right: 0;
          font-size: 12px;
        }

        .nav-button .nav-icon svg {
          width: 18px;
          height: 18px;
        }

        .sidebar-footer { display: none; }
        .view.active { padding: 16px; }
        .topbar { padding: 16px; }
        .row-grid { grid-template-columns: 1fr; }
        .workspace-overview-grid,
        .workspace-quick-grid {
          grid-template-columns: 1fr;
        }

        .workspace-activity-item {
          grid-template-columns: 1fr;
          gap: 6px;
        }

        .workspace-activity-link {
          justify-self: flex-start;
        }

        .company-hero {
          min-height: auto;
          grid-template-columns: 1fr;
        }

        .company-hero::before { display: none; }

        .company-hero > div:first-child { padding: 24px; }
        .company-hero h2 { font-size: 20px; }

        .company-entity-tools,
        .company-entity-form,
        .company-kpi-board,
        .company-kpi-row.all,
        .asset-summary-grid,
        .asset-type-picker,
        .company-grid,
        .monthly-summary-grid,
        .anchor-day-row,
        .broker-row,
        .anchor-profile-row,
        .live-session-row,
        .drawer-session-row {
          grid-template-columns: 1fr;
        }

        .company-panel .panel-header {
          align-items: stretch;
          flex-direction: column;
        }

        .company-panel .panel-header input { width: 100%; }
        .broker-actions { justify-content: flex-start; }

        .topbar-left,
        .topbar-right,
        .global-search { width: 100%; max-width: none; }
        .topbar { align-items: stretch; flex-direction: column; }
        .topbar-right { display: grid; grid-template-columns: 1fr; }
        .page-title { font-size: 22px; }
      }

      .topbar-right[hidden] { display: none; }

      .login-screen {
        min-height: 100vh;
        display: grid;
        place-items: center;
        background: var(--color-bg-page);
        padding: 24px;
      }

      .login-screen[hidden] {
        display: none;
      }

      .login-card {
        width: min(420px, 100%);
        background: var(--color-bg-container);
        border: 1px solid var(--color-border);
        border-radius: var(--border-radius-lg);
        box-shadow: var(--shadow-card);
        padding: 32px;
      }

      .login-card h1 {
        margin: 0 0 6px;
        font-size: 24px;
        font-weight: 700;
        color: var(--color-text-primary);
      }

      .login-card p {
        margin: 0 0 24px;
        color: var(--color-text-secondary);
        font-size: 13px;
      }

      .login-remember-row {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-top: 12px;
        color: var(--color-text-secondary);
        font-size: 13px;
        user-select: none;
      }

      .login-remember-row input {
        width: 16px;
        height: 16px;
        margin: 0;
        accent-color: var(--color-primary);
      }

      .identity-user strong {
        display: block;
        color: var(--color-text-primary);
        font-size: 14px;
      }

      .identity-user span {
        display: block;
        margin-top: 4px;
        color: var(--color-text-secondary);
        font-size: 12px;
        line-height: 1.5;
      }

      .nav-badge {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 18px;
        height: 18px;
        border-radius: 9px;
        background: var(--danger);
        color: #fff;
        font-size: 11px;
        font-weight: 700;
        margin-left: 6px;
      }

      .sku-matrix {
        width: 100%;
        border-collapse: collapse;
        margin-top: 10px;
      }

      .sku-matrix th,
      .sku-matrix td {
        border: 1px solid var(--color-border);
        padding: 8px;
        text-align: center;
      }

      .stock-zero { background: var(--color-bg-page); color: var(--color-text-placeholder); }
      .stock-low { color: var(--color-danger); font-weight: 700; }
      .goods-stock-cell {
        cursor: pointer;
        min-width: 52px;
      }
      .goods-stock-cell:hover {
        background: var(--color-primary-light);
        color: var(--color-primary);
      }
      .sku-color-row {
        display: block;
        margin-bottom: 12px;
        padding: 14px 16px;
        border: 1px solid var(--color-border);
        border-radius: var(--border-radius-md);
        background: var(--color-bg-page);
      }
      .sku-size-field input {
        text-align: center;
      }
      .rule-unread-dot {
        display: inline-block;
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: var(--color-primary);
        margin-right: 8px;
      }

      .battle-tabs {
        display: inline-flex;
        gap: 8px;
        padding: 4px;
        margin-bottom: 16px;
        border-radius: 999px;
        background: var(--bg-secondary, var(--color-bg-page));
      }

      .battle-tab {
        border: 0;
        border-radius: 999px;
        background: transparent;
        color: var(--color-text-secondary);
        cursor: pointer;
        font-size: 14px;
        font-weight: 600;
        padding: 8px 18px;
      }

      .battle-tab.active {
        background: var(--color-primary);
        color: #fff;
      }

      .battle-toolbar,
      .battle-filterbar {
        display: flex;
        align-items: flex-end;
        gap: 12px;
        flex-wrap: wrap;
        margin-bottom: 16px;
      }

      .battle-toolbar {
        position: sticky;
        top: 0;
        z-index: 8;
        margin-bottom: 10px;
        padding: 10px 0 8px;
        background: var(--color-bg-page);
      }

      .battle-toolbar .btn-primary {
        order: 10;
      }

      .battle-toolbar-save {
        order: 1;
        margin-left: 0;
        min-width: 120px;
      }

      .battle-toolbar .field {
        order: 0;
      }

      .battle-toolbar .btn:not(.battle-toolbar-save) {
        order: 2;
      }

      .battle-sheet-stats {
        display: grid;
        grid-template-columns: repeat(4, minmax(120px, 1fr));
        gap: 10px;
        margin: 10px 0 12px;
      }

      .battle-sheet-stat {
        border: 1px solid var(--color-border);
        border-radius: 8px;
        background: #fff;
        padding: 10px 12px;
      }

      .battle-sheet-stat span {
        display: block;
        color: var(--color-text-secondary);
        font-size: 12px;
        margin-bottom: 4px;
      }

      .battle-sheet-stat strong {
        color: var(--color-text-primary);
        font-size: 20px;
        font-weight: 700;
        line-height: 1.2;
      }

      .battle-import-box {
        display: grid;
        gap: 10px;
        margin-bottom: 16px;
      }

      .battle-file-input {
        max-width: 360px;
        padding: 8px 10px;
        border: 1px solid var(--color-border);
        border-radius: 6px;
        background: #fff;
        color: var(--color-text-secondary);
        font-size: 13px;
      }

      .battle-import-option {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        width: fit-content;
        color: var(--color-text-secondary);
        font-size: 12px;
        line-height: 20px;
      }

      .battle-import-option input {
        width: 14px;
        height: 14px;
        margin: 0;
      }

      .battle-import-mode {
        max-width: 520px;
        margin: 0;
      }

      .battle-scope-hint {
        min-height: 20px;
        margin: -4px 0 10px;
        color: var(--color-text-secondary);
        font-size: 12px;
        line-height: 20px;
      }

      .battle-scope-hint strong {
        color: var(--color-primary);
        font-weight: 600;
      }

      .battle-archive-summary {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        margin-left: 10px;
        padding-left: 10px;
        border-left: 1px solid var(--color-border);
      }

      .battle-archive-link {
        padding: 0;
        border: 0;
        background: transparent;
        color: var(--color-primary);
        font: inherit;
        font-weight: 600;
        cursor: pointer;
      }

      .battle-archive-link:hover {
        text-decoration: underline;
      }

      .battle-row-actions {
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 6px;
        white-space: nowrap;
      }

      .battle-row-action-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 56px;
        min-height: 28px;
        padding: 0 3px;
        border: 1px solid transparent;
        border-radius: 5px;
        font-size: 11px;
        font-weight: 600;
        line-height: 1;
        cursor: pointer;
      }

      .battle-archive-row-btn {
        border-color: #fed7aa;
        background: #fff7ed;
        color: #c2410c;
      }

      .battle-archive-row-btn:hover {
        border-color: #fdba74;
        background: #ffedd5;
        color: #9a3412;
      }

      .battle-delete-day-btn {
        border-color: #fecaca;
        background: #fff;
        color: #b42318;
      }

      .battle-delete-day-btn:hover {
        border-color: #fca5a5;
        background: #fff1f2;
        color: #991b1b;
      }

      .battle-remove-draft-btn {
        border-color: #d9dee7;
        background: #fff;
        color: var(--color-text-secondary);
      }

      .battle-remove-draft-btn:hover {
        border-color: #b8c1ce;
        background: #f8fafc;
        color: var(--color-text-primary);
      }

      @media (max-width: 720px) {
        .battle-archive-summary {
          display: flex;
          width: fit-content;
          margin: 4px 0 0;
          padding: 0;
          border-left: 0;
        }
      }

      .battle-business-date-note {
        margin: -4px 0 12px;
        color: var(--color-text-secondary);
        font-size: 12px;
        line-height: 20px;
      }

      .battle-month-scope-note {
        display: inline-flex;
        align-items: center;
        min-height: 28px;
        margin: 0 0 10px;
        padding: 4px 10px;
        border: 1px solid #CFE1FF;
        border-radius: 6px;
        color: #315B96;
        background: #F3F7FF;
        font-size: 12px;
        line-height: 18px;
      }

      .battle-toggle-option {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        min-height: 36px;
        color: var(--color-text-secondary);
        font-size: 13px;
        white-space: nowrap;
        user-select: none;
      }

      .battle-toggle-option input {
        width: 16px;
        height: 16px;
        margin: 0;
        accent-color: var(--color-primary);
      }

      .battle-edit-table input,
      .battle-edit-table select {
        width: 100%;
        min-height: 34px;
        border: 1px solid #d9dee7;
        border-radius: 4px;
        background: #fff;
        padding: 5px 8px;
        transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
      }

      .battle-edit-table input[type="number"] {
        font-variant-numeric: tabular-nums;
      }

      .battle-edit-table input:focus,
      .battle-edit-table select:focus {
        border-color: var(--color-primary);
        background: #fff;
        box-shadow: 0 0 0 2px rgba(0,82,217,0.08);
      }

      .battle-edit-table td,
      .battle-edit-table th {
        height: 50px;
        padding: 8px 10px;
        border-right: 1px solid #e6eaf0;
        border-bottom: 1px solid #dfe4eb;
        vertical-align: middle;
        white-space: nowrap;
      }

      .battle-edit-table th:last-child,
      .battle-edit-table td:last-child {
        border-right: 0;
      }

      .battle-edit-table [data-battle-section="daily"] {
        background: #f7fbff;
      }

      .battle-edit-table [data-battle-section="monthly"] {
        background: #fafbfc;
      }

      .battle-edit-table [data-battle-month-start] {
        border-left: 2px solid #b8c8dc;
      }

      .battle-sheet-wrap {
        min-height: 0;
        max-height: none;
        overflow-x: auto;
        overflow-y: visible;
        overscroll-behavior: auto;
        scrollbar-gutter: stable;
        background: #fff;
        border: 1px solid var(--color-border);
        border-radius: 8px;
      }

      .battle-sheet-wrap .battle-edit-table {
        min-width: 1580px;
        table-layout: fixed;
        border: 0;
      }

      .battle-sheet-wrap .battle-edit-table thead th {
        position: sticky;
        top: 0;
        z-index: 3;
        background: #F7F8FA;
        box-shadow: inset 0 -1px 0 var(--color-border);
      }

      .battle-sheet-wrap .battle-edit-table th:last-child,
      .battle-sheet-wrap .battle-edit-table td:last-child {
        position: sticky;
        right: 0;
        z-index: 4;
        background: #fff;
        box-shadow: -1px 0 0 var(--color-border);
      }

      .battle-sheet-wrap .battle-edit-table th:last-child {
        z-index: 6;
        background: #F7F8FA;
      }

      .battle-sheet-wrap .battle-edit-table tbody tr:focus-within {
        background: var(--color-primary-light);
      }

      .battle-sheet-wrap .battle-edit-table tbody tr:hover td {
        box-shadow: inset 0 0 0 999px rgba(22, 119, 255, 0.025);
      }

      .battle-sheet-wrap .battle-edit-table tbody tr:not(.battle-empty-row) td {
        border-bottom: 2px solid #cbd5e1;
      }

      .battle-sheet-wrap .battle-edit-table tbody tr:last-child td {
        border-bottom: 0;
      }

      .battle-sheet-wrap .battle-edit-table tbody tr.battle-focus-row {
        background: #FFF7D6;
        box-shadow: inset 3px 0 0 var(--color-primary);
      }

      .battle-sheet-wrap .battle-edit-table tbody tr.battle-row-filled {
        background: rgba(43, 164, 113, 0.035);
      }

      .battle-sheet-wrap .battle-edit-table tbody tr.battle-row-rest {
        background: rgba(95, 100, 112, 0.05);
      }

      .battle-sheet-wrap .battle-edit-table tbody tr.battle-row-pending td {
        color: var(--color-text-secondary);
      }

      .battle-edit-table th[data-num],
      .battle-edit-table td[data-num] {
        text-align: center;
      }

      .battle-edit-table td[data-num] input {
        display: block;
        width: 110px;
        min-width: 96px;
        max-width: 120px;
        margin: 0 auto;
        text-align: center;
      }

      .battle-edit-table input:disabled {
        background: #F3F3F1;
        color: var(--color-text-secondary);
        cursor: not-allowed;
      }

      .battle-status-select {
        min-width: 104px;
      }

      .battle-stage-select {
        display: block;
        width: 126px;
        min-width: 116px;
        max-width: 100%;
        font-size: 12px;
        color: var(--color-text-primary);
        background: #fff;
        border-color: var(--color-border);
        border-radius: 6px;
        padding: 6px 28px 6px 10px;
      }

      .battle-stage-select:focus {
        background: #fff;
        border-color: var(--color-primary);
      }

      .battle-edit-table td[data-num] {
        font-variant-numeric: tabular-nums;
      }

      .battle-total-cell {
        color: var(--color-text-primary);
        font-weight: 600;
      }

      .battle-readonly-cell {
        display: flex;
        flex-direction: column;
        gap: 3px;
        min-width: 120px;
      }

      .battle-readonly-cell strong {
        color: var(--color-text-primary);
        font-size: 13px;
        font-weight: 600;
      }

      .battle-readonly-cell span {
        color: var(--color-text-secondary);
        font-size: 12px;
      }

      .battle-status-pill {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 48px;
        border-radius: 999px;
        background: #FFF4E5;
        color: var(--color-warning);
        font-size: 12px;
        font-weight: 600;
        padding: 4px 8px;
      }

      .battle-status-pill.done {
        background: rgba(43, 164, 113, 0.12);
        color: var(--color-success);
      }

      .battle-status-pill.rest {
        background: #F3F3F1;
        color: var(--color-text-secondary);
      }

      .battle-fill-status {
        display: inline-flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        width: 100%;
        min-width: 0;
      }

      .battle-fill-saved-at {
        color: var(--color-text-secondary);
        font-size: 11px;
        font-variant-numeric: tabular-nums;
        line-height: 1.2;
        white-space: normal;
      }

      .battle-manager-fill-status .battle-fill-status {
        flex-direction: row;
        justify-content: flex-start;
        gap: 6px;
        margin-top: 6px;
      }

      .battle-manager-fill-status .battle-fill-saved-at {
        text-align: left;
      }

      .battle-stage-chip {
        display: inline-flex;
        align-items: center;
        border-radius: 999px;
        background: var(--color-primary-light);
        color: var(--color-primary);
        font-size: 12px;
        font-weight: 600;
        line-height: 1.2;
        padding: 5px 9px;
        white-space: nowrap;
      }

      .battle-stage-chip.warning {
        background: #FFF4E5;
        color: var(--color-warning);
      }

      .battle-stage-help {
        display: block;
        color: var(--color-warning);
        font-size: 12px;
        line-height: 18px;
        margin-top: 4px;
      }

      .battle-stage-help.compact {
        display: inline-flex;
        margin-left: 6px;
        margin-top: 0;
        color: var(--color-text-placeholder);
        line-height: 20px;
        white-space: nowrap;
      }

      .battle-summary-line {
        position: fixed;
        right: 24px;
        bottom: 18px;
        left: 272px;
        width: auto;
        max-width: calc(100vw - 296px);
        z-index: 58;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-top: 0;
        padding: 12px 14px;
        border: 1px solid var(--color-border);
        border-top: 0;
        border-radius: 0 0 8px 8px;
        background: rgba(255, 255, 255, 0.96);
        box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.03);
        color: var(--color-text-secondary);
        font-size: 13px;
      }

      @media (max-width: 1180px) {
        .battle-summary-line {
          left: 264px;
          right: 16px;
          max-width: calc(100vw - 280px);
        }
      }

      @media (max-width: 980px) {
        .battle-summary-line {
          align-items: stretch;
          flex-direction: column;
          gap: 8px;
        }

        .battle-summary-line .btn-primary {
          align-self: flex-end;
        }
      }

      #battleView.view.active {
        padding-bottom: 104px;
      }

      #battleView:not(.active) .battle-summary-line,
      #battleFormPanel[hidden] .battle-summary-line {
        display: none;
      }

      .battle-summary-line .btn-primary {
        min-width: 156px;
      }

      .battle-save-note {
        color: var(--color-text-placeholder);
        font-size: 12px;
        margin-left: 8px;
      }

      .battle-bulk-toolbar {
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 10px;
        margin: 10px 0;
        padding: 10px 12px;
        border: 1px solid var(--color-border);
        border-radius: 6px;
        background: var(--color-bg-page);
        color: var(--color-text-secondary);
        font-size: 13px;
      }

      .battle-select-all {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        color: var(--color-text-primary);
        white-space: nowrap;
      }

      .battle-bulk-toolbar button:disabled {
        opacity: 0.5;
        cursor: not-allowed;
      }

      .battle-group-title {
        border-left: 3px solid var(--color-primary);
        font-size: 16px;
        font-weight: 600;
        margin: 24px 0 12px;
        padding-left: 8px;
      }

      .battle-link {
        appearance: none;
        border: 0;
        background: transparent;
        color: var(--color-primary);
        cursor: pointer;
        font: inherit;
        padding: 0;
      }

      .battle-link:hover {
        text-decoration: underline;
      }

      .battle-rank-table td[data-num],
      .battle-rank-table th[data-num] {
        text-align: right;
      }

      .battle-publish-card {
        background: #fff;
        border: 1px solid var(--color-border);
        border-radius: 8px;
        overflow: hidden;
      }

      .battle-publish-title {
        background: #c80000;
        color: #fff;
        font-size: 28px;
        font-weight: 600;
        letter-spacing: 1px;
        line-height: 1.35;
        padding: 8px 16px;
        text-align: center;
      }

      .battle-publish-meta {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        justify-content: space-between;
        padding: 10px 14px;
        color: var(--color-text-secondary);
        font-size: 13px;
        border-bottom: 1px solid var(--color-border);
      }

      .battle-publish-table-wrap {
        overflow-x: auto;
      }

      .battle-publish-table {
        width: 100%;
        min-width: 1120px;
        border-collapse: collapse;
        font-size: 14px;
      }

      .battle-publish-table th,
      .battle-publish-table td {
        border: 1px solid #222;
        padding: 5px 8px;
        text-align: center;
        vertical-align: middle;
      }

      .battle-publish-table th {
        background: #fff;
        font-weight: 600;
      }

      .battle-publish-table [data-day] {
        background: #fff4ec;
      }

      .battle-publish-table [data-month] {
        background: #e9f8ef;
      }

      .battle-publish-stage {
        font-size: 18px;
        font-weight: 600;
        white-space: pre-line;
        width: 88px;
      }

      .battle-publish-top td,
      .battle-publish-top .battle-link {
        color: #d70000;
        font-size: 16px;
        font-weight: 600;
      }

      .battle-publish-missing-sign {
        color: var(--color-warning);
        display: block;
        font-size: 12px;
        font-weight: 600;
        margin-top: 3px;
      }

      .battle-publish-total td {
        background: #fff;
        font-size: 16px;
        font-weight: 600;
      }

      .battle-publish-total strong {
        color: #d70000;
        font-size: 18px;
      }

      .battle-publish-empty {
        padding: 32px 16px;
        text-align: center;
        color: var(--color-text-secondary);
      }

      .analysis-page {
        display: grid;
        gap: 16px;
      }

      .analysis-filterbar {
        display: flex;
        align-items: flex-end;
        gap: 12px;
        flex-wrap: wrap;
        padding: 16px;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        background: #fff;
      }

      .analysis-filterbar .field {
        width: 160px;
        margin: 0;
      }

      .analysis-section-tabs {
        display: inline-grid;
        grid-template-columns: repeat(3, minmax(112px, 1fr));
        width: fit-content;
        padding: 4px;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        background: #f3f4f6;
      }

      .analysis-section-tabs button {
        min-height: 34px;
        padding: 0 16px;
        border: 0;
        border-radius: 6px;
        color: var(--color-text-secondary, #5f646d);
        background: transparent;
        font: inherit;
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
      }

      .analysis-section-tabs button.active {
        color: var(--color-primary, #1677ff);
        background: #fff;
        box-shadow: 0 1px 4px rgba(15, 23, 42, 0.08);
      }

      .analysis-panel[hidden] {
        display: none;
      }

      .analysis-talent {
        display: grid;
        gap: 16px;
      }

      .analysis-talent-intro,
      .analysis-talent-section,
      .analysis-talent-quality {
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        background: #fff;
      }

      .analysis-talent-intro {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 20px;
        padding: 16px 18px;
      }

      .analysis-talent-intro span {
        color: var(--color-primary, #1677ff);
        font-size: 12px;
        font-weight: 700;
      }

      .analysis-talent-intro h3,
      .analysis-talent-section-head h3,
      .analysis-talent-quality h3,
      .analysis-talent-table-head h4 {
        margin: 0;
        color: var(--color-text-primary, #1a1a1a);
      }

      .analysis-talent-intro h3 {
        margin-top: 4px;
        font-size: 18px;
      }

      .analysis-talent-intro p,
      .analysis-talent-section-head p,
      .analysis-talent-quality p,
      .analysis-talent-table-head p {
        margin: 5px 0 0;
        color: var(--color-text-secondary, #5f646d);
        font-size: 12px;
        line-height: 1.5;
      }

      .analysis-talent-actions {
        display: flex;
        flex: 0 0 auto;
        gap: 8px;
      }

      .analysis-talent-section {
        overflow: hidden;
      }

      .analysis-talent-section-head,
      .analysis-talent-table-head {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 16px;
      }

      .analysis-talent-section-head {
        padding: 15px 16px;
        border-bottom: 1px solid #edf0f4;
      }

      .analysis-talent-section-head h3 {
        font-size: 15px;
      }

      .analysis-talent-section-head > span,
      .analysis-talent-table-head > span {
        flex: 0 0 auto;
        color: var(--color-text-placeholder, #8a8a8a);
        font-size: 12px;
      }

      .analysis-talent-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .analysis-talent-table {
        min-width: 0;
        padding: 14px 16px 16px;
      }

      .analysis-talent-table + .analysis-talent-table {
        border-left: 1px solid #edf0f4;
      }

      .analysis-talent-table-head {
        min-height: 46px;
        margin-bottom: 10px;
      }

      .analysis-talent-table-head h4 {
        font-size: 14px;
      }

      .analysis-talent-table-shell {
        max-height: 352px;
      }

      .analysis-talent-table .profile-data-table th,
      .analysis-talent-table .profile-data-table td {
        padding: 10px 12px;
        vertical-align: middle;
      }

      .analysis-talent-table .number-cell {
        text-align: center;
        white-space: nowrap;
      }

      .analysis-talent-signing-summary {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        border-bottom: 1px solid #edf0f4;
        background: #f8fafc;
      }

      .analysis-talent-signing-summary span {
        padding: 12px 16px;
        color: var(--color-text-secondary, #5f646d);
        font-size: 12px;
        text-align: center;
      }

      .analysis-talent-signing-summary span + span {
        border-left: 1px solid #e5e7eb;
      }

      .analysis-talent-signing-summary strong {
        margin-left: 6px;
        color: var(--color-text-primary, #1a1a1a);
        font-size: 15px;
      }

      .analysis-talent-signing-summary small {
        display: block;
        margin-top: 4px;
      }

      .analysis-talent-quality {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        padding: 14px 16px;
      }

      .analysis-talent-quality.warning {
        border-color: #fed7aa;
        background: #fffaf3;
      }

      .analysis-talent-quality.ok {
        border-color: #bbf7d0;
        background: #f6fff8;
      }

      .analysis-talent-quality h3 {
        font-size: 14px;
      }

      .analysis-talent-quality > div:last-child {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 8px 18px;
      }

      .analysis-talent-quality > div:last-child span {
        color: var(--color-text-secondary, #5f646d);
        font-size: 12px;
        white-space: nowrap;
      }

      .analysis-talent-quality strong {
        margin-left: 4px;
        color: var(--color-text-primary, #1a1a1a);
      }

      .analysis-talent-loading {
        padding: 48px 16px;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        color: var(--color-text-secondary, #5f646d);
        background: #fff;
        text-align: center;
      }

      .battle-platform-cell {
        height: auto !important;
        min-width: 315px;
        padding: 8px 10px !important;
        white-space: normal !important;
      }

      .battle-platform-summary {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
        align-items: center;
        gap: 8px;
        min-height: 34px;
      }

      .battle-platform-summary > span {
        color: var(--color-text-secondary);
        font-size: 12px;
        white-space: nowrap;
      }

      .battle-platform-summary strong {
        color: var(--color-text-primary);
        font-variant-numeric: tabular-nums;
      }

      .battle-platform-editor {
        margin-top: 8px;
        padding-top: 8px;
        border-top: 1px solid #dce7f3;
      }

      .battle-platform-editor-head,
      .battle-platform-metric-row {
        display: grid;
        grid-template-columns: minmax(64px, 0.8fr) minmax(82px, 1fr) minmax(82px, 1fr) 28px;
        align-items: center;
        gap: 6px;
      }

      .battle-platform-editor-head {
        margin-bottom: 4px;
        color: var(--color-text-tertiary);
        font-size: 11px;
      }

      .battle-platform-metric-row + .battle-platform-metric-row {
        margin-top: 6px;
      }

      .battle-platform-metric-row strong {
        color: var(--color-text-primary);
        font-size: 12px;
        font-weight: 600;
      }

      .battle-platform-metric-row input,
      .battle-edit-table .battle-platform-metric-row input[type="number"] {
        width: 100%;
        min-width: 0;
        max-width: none;
        min-height: 30px;
        margin: 0;
        padding: 4px 6px;
        text-align: left;
      }

      .battle-platform-remove {
        width: 28px;
        height: 28px;
        min-height: 28px;
        color: var(--color-danger);
      }

      .battle-platform-editor-actions {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        margin-top: 8px;
      }

      .battle-platform-legacy-note {
        display: flex;
        align-items: center;
        width: max-content;
        max-width: 100%;
        min-height: 20px;
        margin-top: 3px;
        padding: 0 5px;
        border: 1px solid #ffd591;
        border-radius: 4px;
        background: #fff7e6;
        color: #ad6800;
        font-size: 11px;
        font-style: normal;
        font-weight: 600;
        line-height: 18px;
        white-space: nowrap;
      }

      /* 全公司战报：紧凑总表 + 单行内联编辑器 */
      #battleView .battle-only-pending {
        display: inline-flex;
        align-items: center;
        gap: 7px;
        min-height: 36px;
        color: var(--color-text-primary);
        font-size: 13px;
        cursor: pointer;
      }

      #battleView .battle-only-pending input {
        width: 16px;
        height: 16px;
        margin: 0;
        accent-color: var(--color-primary);
      }

      #battleView .battle-only-pending span {
        display: inline-grid;
        width: 16px;
        height: 16px;
        place-items: center;
        border: 1px solid var(--color-border);
        border-radius: 50%;
        color: var(--color-text-secondary);
        font-size: 11px;
      }

      #battleView .battle-toolbar-more {
        position: relative;
        margin-left: auto;
      }

      #battleView .battle-toolbar-more > summary,
      #battleView .battle-batch-panel > summary {
        color: var(--color-primary);
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
        list-style: none;
      }

      #battleView .battle-toolbar-more > summary::after {
        content: "⌄";
        margin-left: 6px;
      }

      #battleView .battle-toolbar-more > div {
        position: absolute;
        top: calc(100% + 8px);
        right: 0;
        z-index: 15;
        display: flex;
        align-items: flex-end;
        gap: 8px;
        min-width: 650px;
        padding: 12px;
        border: 1px solid var(--color-border);
        border-radius: 8px;
        background: #fff;
        box-shadow: 0 12px 32px rgba(15, 23, 42, .12);
      }

      #battleView .battle-batch-panel {
        margin: 0 0 10px;
      }

      #battleView .battle-batch-panel > summary {
        width: fit-content;
        color: var(--color-text-secondary);
        font-weight: 500;
      }

      #battleView .battle-batch-panel[open] {
        padding: 10px 12px;
        border: 1px solid var(--color-border);
        border-radius: 8px;
        background: #fff;
      }

      #battleView .battle-batch-panel .battle-bulk-toolbar {
        margin-top: 10px;
      }

      #battleView .battle-batch-panel .battle-business-date-note {
        margin: 8px 0 0;
      }

      #battleView .battle-inline-main-row td {
        height: 58px;
        border-bottom: 1px solid #e4e8ef !important;
        color: var(--color-text-primary);
      }

      #battleView .battle-inline-main-row.is-open td {
        border-bottom: 0 !important;
        background: #f7fbff;
      }

      #battleView .battle-inline-anchor {
        display: grid;
        gap: 3px;
      }

      #battleView .battle-inline-anchor small {
        padding-left: 25px;
        color: var(--color-text-secondary);
        font-size: 11px;
      }

      #battleView .battle-inline-row-toggle {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        width: fit-content;
        padding: 0;
        border: 0;
        background: transparent;
        color: var(--color-text-primary);
        cursor: pointer;
      }

      #battleView .battle-inline-row-toggle span {
        width: 14px;
        color: var(--color-primary);
        font-size: 20px;
        line-height: 1;
      }

      #battleView .battle-inline-row-toggle strong {
        font-size: 13px;
        font-weight: 650;
      }

      #battleView .battle-inline-badge {
        display: inline-flex;
        align-items: center;
        min-height: 24px;
        padding: 0 8px;
        border: 1px solid transparent;
        border-radius: 4px;
        font-size: 12px;
        font-weight: 600;
      }

      #battleView .battle-inline-badge.warning {
        border-color: #ffd591;
        background: #fff7e6;
        color: #d46b08;
      }

      #battleView .battle-inline-badge.success {
        border-color: #b7eb8f;
        background: #f6ffed;
        color: #389e0d;
      }

      #battleView .battle-inline-badge.muted {
        border-color: #d9d9d9;
        background: #fafafa;
        color: var(--color-text-secondary);
      }

      #battleView .battle-status-filters {
        display: flex;
        align-items: center;
        gap: 28px;
        min-height: 48px;
        margin: 10px 0 12px;
        padding: 0 14px;
        overflow-x: auto;
        border-bottom: 1px solid var(--color-border);
        background: #fff;
      }

      #battleView .battle-status-filter {
        position: relative;
        display: inline-flex;
        align-items: center;
        gap: 7px;
        flex: 0 0 auto;
        min-height: 48px;
        padding: 0 2px;
        border: 0;
        background: transparent;
        color: var(--color-text-secondary);
        cursor: pointer;
      }

      #battleView .battle-status-filter::after {
        position: absolute;
        right: 0;
        bottom: -1px;
        left: 0;
        height: 2px;
        background: transparent;
        content: "";
      }

      #battleView .battle-status-filter strong {
        color: inherit;
        font-size: 12px;
        font-variant-numeric: tabular-nums;
      }

      #battleView .battle-status-filter.active {
        color: var(--color-primary);
        font-weight: 650;
      }

      #battleView .battle-status-filter.active::after {
        background: var(--color-primary);
      }

      #battleView #battleFormPanel[data-battle-form-mode="manager"] .battle-only-pending {
        display: none;
      }

      #battleView .battle-day-status {
        position: relative;
        display: grid;
        justify-items: start;
        gap: 3px;
        min-width: 118px;
      }

      #battleView .battle-day-status > small,
      #battleView .battle-day-fill-state small {
        color: var(--color-text-secondary);
        font-size: 10px;
        line-height: 1.35;
      }

      #battleView .battle-day-status-menu {
        position: relative;
      }

      #battleView .battle-day-status-menu summary {
        color: var(--color-primary);
        font-size: 11px;
        cursor: pointer;
        list-style: none;
      }

      #battleView .battle-day-status-menu > div {
        position: absolute;
        top: calc(100% + 5px);
        left: 0;
        z-index: 40;
        display: grid;
        width: 218px;
        padding: 6px;
        border: 1px solid var(--color-border);
        border-radius: 8px;
        background: #fff;
        box-shadow: 0 10px 28px rgba(15, 23, 42, .16);
      }

      #battleView .battle-inline-main-row:has(.battle-day-status-menu[open]) td[data-battle-cell="day-status"] {
        z-index: 30;
      }

      #battleView .battle-day-status-menu button {
        display: grid;
        gap: 2px;
        padding: 8px 9px;
        border: 0;
        border-radius: 5px;
        background: transparent;
        color: var(--color-text-primary);
        text-align: left;
        cursor: pointer;
      }

      #battleView .battle-day-status-menu button:hover {
        background: var(--color-bg-page);
      }

      #battleView .battle-day-status-menu button:disabled {
        opacity: .46;
        cursor: default;
      }

      #battleView .battle-day-status-menu button span {
        color: var(--color-text-secondary);
        font-size: 10px;
      }

      #battleView .battle-inline-badge.preparing {
        border-color: #cbd5e1;
        background: #f1f5f9;
        color: #475569;
      }

      #battleView .battle-inline-badge.danger {
        border-color: #ffccc7;
        background: #fff2f0;
        color: #cf1322;
      }

      #battleView .battle-day-fill-state {
        display: grid;
        justify-items: start;
        gap: 3px;
      }

      #battleView .battle-inline-actions .record-action-btn:disabled {
        color: var(--color-text-tertiary);
        cursor: default;
      }

      #battleView .battle-vacancy-summary {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        margin-top: 12px;
        padding: 12px 16px;
        border: 1px solid #d7e6fb;
        border-radius: 8px;
        background: #f7fbff;
      }

      #battleView .battle-vacancy-summary > div {
        display: flex;
        align-items: center;
        gap: 28px;
        min-width: 0;
      }

      #battleView .battle-vacancy-summary span {
        color: var(--color-text-secondary);
        font-size: 12px;
      }

      #battleView .battle-vacancy-summary b {
        color: var(--color-text-primary);
        font-size: 14px;
      }

      #battleView .battle-vacancy-summary button {
        flex: 0 0 auto;
        padding: 0;
        border: 0;
        background: transparent;
        color: var(--color-primary);
        cursor: pointer;
      }

      #battleView .battle-inline-progress {
        display: grid;
        gap: 7px;
        min-width: 200px;
      }

      #battleView .battle-inline-progress span {
        color: var(--color-text-secondary);
        font-size: 12px;
      }

      #battleView .battle-inline-progress strong {
        color: var(--color-text-primary);
        font-weight: 650;
      }

      #battleView .battle-inline-progress em {
        color: var(--color-text-secondary);
        font-style: normal;
      }

      #battleView .battle-inline-progress i {
        display: block;
        height: 5px;
        overflow: hidden;
        border-radius: 999px;
        background: #e6ebf2;
      }

      #battleView .battle-inline-progress b {
        display: block;
        height: 100%;
        border-radius: inherit;
        background: var(--color-primary);
      }

      #battleView .battle-inline-actions {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 12px;
      }

      #battleView .battle-inline-actions .record-action-btn {
        min-width: 64px;
      }

      #battleView .battle-inline-actions details {
        position: relative;
      }

      #battleView .battle-inline-main-row:has(.battle-inline-actions details[open]) td[data-battle-cell="action"] {
        z-index: 20;
      }

      #battleView .battle-inline-actions summary {
        color: var(--color-text-secondary);
        font-size: 12px;
        cursor: pointer;
        list-style: none;
      }

      #battleView .battle-inline-actions details > div {
        position: absolute;
        top: calc(100% + 6px);
        right: 0;
        z-index: 12;
        display: grid;
        min-width: 110px;
        padding: 5px;
        border: 1px solid var(--color-border);
        border-radius: 6px;
        background: #fff;
        box-shadow: 0 8px 22px rgba(15, 23, 42, .12);
      }

      #battleView .battle-inline-actions details button {
        padding: 7px 9px;
        border: 0;
        border-radius: 4px;
        background: transparent;
        color: var(--color-text-primary);
        text-align: left;
        cursor: pointer;
      }

      #battleView .battle-inline-actions details button:hover {
        background: var(--color-bg-page);
      }

      #battleView .battle-inline-actions details button.danger {
        color: var(--color-danger);
      }

      #battleView .battle-inline-editor-row td {
        position: static !important;
        padding: 0 12px 12px !important;
        border-right: 0;
        border-bottom: 1px solid #c9d9ee !important;
        background: #f7fbff !important;
        box-shadow: none !important;
        white-space: normal;
      }

      #battleView .battle-inline-editor {
        display: grid;
        grid-template-columns: minmax(0, 1.5fr) minmax(230px, .7fr);
        gap: 24px;
        padding: 18px 24px 12px;
        border: 1px solid #d7e2ef;
        border-radius: 8px;
        background: #fff;
      }

      #battleView .battle-inline-editor h4 {
        margin: 0 0 14px;
        color: var(--color-text-primary);
        font-size: 13px;
        font-weight: 650;
      }

      #battleView .battle-inline-editor h4 span {
        color: var(--color-text-secondary);
        font-weight: 400;
      }

      #battleView .battle-inline-platforms {
        display: grid;
        gap: 10px;
      }

      #battleView .battle-inline-platform-row {
        display: grid;
        grid-template-columns: 108px minmax(130px, 1fr) minmax(168px, .9fr) 28px;
        align-items: end;
        gap: 12px;
      }

      #battleView .battle-inline-platform-identity {
        align-self: center;
        display: flex;
        align-items: center;
        gap: 8px;
        min-width: 0;
      }

      #battleView .battle-inline-platform-logo {
        display: inline-grid;
        place-items: center;
        flex: 0 0 24px;
        width: 24px;
        height: 24px;
        border-radius: 6px;
        box-shadow: inset 0 0 0 1px rgb(255 255 255 / 24%);
      }

      #battleView .battle-inline-platform-logo.douyin {
        background: #161823;
      }

      #battleView .battle-inline-platform-logo.wechat-channels {
        background: #ff8a1f;
      }

      #battleView .battle-inline-platform-logo img {
        display: block;
        width: 15px;
        height: 15px;
      }

      #battleView .battle-inline-platform-name {
        align-self: center;
        font-size: 13px;
      }

      #battleView .battle-inline-platform-row label,
      #battleView .battle-inline-platform-row .battle-inline-field,
      #battleView .battle-inline-reward-panel label {
        display: grid;
        gap: 5px;
      }

      #battleView .battle-inline-platform-row label > span,
      #battleView .battle-inline-platform-row .battle-inline-field > span,
      #battleView .battle-inline-reward-panel label > span {
        color: var(--color-text-secondary);
        font-size: 11px;
      }

      #battleView .battle-inline-duration-inputs {
        display: grid;
        grid-template-columns: minmax(44px, 1fr) 14px minmax(44px, 1fr) 14px;
        align-items: center;
        gap: 5px;
      }

      #battleView .battle-inline-duration-inputs input:not([type="hidden"]) {
        min-width: 0;
        padding-inline: 7px;
        text-align: center;
        font-variant-numeric: tabular-nums;
      }

      #battleView .battle-inline-duration-inputs em {
        color: var(--color-text-secondary);
        font-size: 12px;
        font-style: normal;
        text-align: center;
      }

      #battleView .battle-inline-add-platform {
        width: 275px;
        min-height: 36px;
        margin-top: 12px;
        border: 1px dashed #a8c7f0;
        border-radius: 5px;
        background: #fbfdff;
        color: var(--color-primary);
        cursor: pointer;
      }

      #battleView .battle-inline-reward-panel {
        padding-left: 24px;
        border-left: 1px solid var(--color-border);
      }

      #battleView .battle-inline-reward-panel small {
        display: block;
        margin-top: 7px;
        color: var(--color-text-secondary);
        font-size: 11px;
      }

      #battleView .battle-inline-target {
        margin-top: 14px;
      }

      #battleView .battle-inline-editor footer {
        grid-column: 1 / -1;
        display: flex;
        justify-content: flex-end;
        gap: 10px;
        padding-top: 2px;
      }

      #battleView .battle-inline-editor footer .btn {
        flex: 0 0 auto;
        min-width: 72px;
        white-space: nowrap;
      }

      #battleView .battle-inline-editor footer [data-action="save-next-battle-inline"] {
        min-width: 128px;
      }

      #battleView .battle-inline-editor input[type="number"]::-webkit-inner-spin-button,
      #battleView .battle-inline-editor input[type="number"]::-webkit-outer-spin-button {
        margin: 0;
        -webkit-appearance: none;
      }

      #battleView .battle-load-more-row td,
      #battleView .battle-empty-row td {
        padding: 18px !important;
        color: var(--color-text-secondary);
        text-align: center;
      }

      #battleView .battle-load-more-row span {
        margin-left: 10px;
      }

      @media (min-width: 761px) {
        #battleView .battle-sheet-wrap .battle-edit-table:has(.battle-inline-main-row) {
          min-width: 1120px;
        }

        #battleView .battle-mobile-mode-switch,
        #battleView #battleFormPanel[data-battle-form-mode="manager"] .mobile-sticky-actions {
          display: none;
        }
      }

      @media (max-width: 900px) {
        #battleView .battle-inline-editor {
          grid-template-columns: 1fr;
        }

        #battleView .battle-inline-reward-panel {
          padding: 0;
          border-left: 0;
        }
      }

      @media (max-width: 760px) {
        #battleView .battle-status-filters {
          gap: 20px;
          margin-inline: -4px;
          padding-inline: 8px;
        }

        #battleView .battle-vacancy-summary,
        #battleView .battle-vacancy-summary > div {
          align-items: flex-start;
          flex-direction: column;
          gap: 8px;
        }

        #battleView #battleFormPanel[data-battle-form-mode="manager"] .battle-mobile-mode-switch {
          display: none;
        }

        #battleView .battle-toolbar-more {
          width: 100%;
          margin-left: 0;
        }

        #battleView .battle-toolbar-more > div {
          position: static;
          display: grid;
          min-width: 0;
          margin-top: 8px;
        }

        #battleView .battle-inline-platform-row {
          grid-template-columns: 76px minmax(0, 1fr) 28px;
        }

        #battleView .battle-inline-platform-row label {
          grid-column: 2;
        }

        #battleView .battle-inline-platform-row .battle-inline-field {
          grid-column: 2;
        }

        #battleView .battle-inline-platform-row > span:last-child,
        #battleView .battle-inline-platform-row .battle-platform-remove {
          grid-column: 3;
          grid-row: 1 / span 3;
        }

        #battleView .battle-inline-add-platform {
          width: 100%;
        }

        #battleView .battle-inline-editor footer {
          flex-wrap: wrap;
        }
      }

      @media (min-width: 761px) {
        #battleView .battle-platform-content.is-open .battle-platform-summary {
          width: 110px;
        }
      }

      .analysis-kpi-grid {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 12px;
      }

      .analysis-kpi-card {
        display: grid;
        gap: 8px;
        min-height: 104px;
        padding: 16px;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        background: #fff;
        transition: border-color .2s ease, box-shadow .2s ease;
      }

      .analysis-kpi-card:hover {
        border-color: var(--color-primary);
        box-shadow: 0 8px 20px rgba(22,119,255,0.08);
      }

      .analysis-kpi-card span {
        color: var(--color-text-placeholder, #8a8a8a);
        font-size: 12px;
        font-weight: 600;
      }

      .analysis-kpi-card strong {
        color: var(--color-text-primary, #1a1a1a);
        font-size: 25px;
        font-weight: 700;
        line-height: 1.2;
        white-space: nowrap;
      }

      .analysis-kpi-card small {
        color: var(--color-text-secondary, #5f646d);
        font-size: 12px;
        line-height: 1.5;
      }

      .analysis-health-panel {
        display: grid;
        gap: 14px;
        padding: 16px;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        background: #fff;
        box-shadow: 0 8px 20px rgba(15, 23, 42, 0.04);
      }

      .analysis-health-header {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 16px;
      }

      .analysis-health-header h3 {
        margin: 0;
        color: var(--color-text-primary, #1a1a1a);
        font-size: 15px;
        font-weight: 700;
      }

      .analysis-health-header p {
        margin: 6px 0 0;
        color: var(--color-text-secondary, #5f646d);
        font-size: 12px;
        line-height: 1.5;
      }

      .analysis-health-badge {
        flex: 0 0 auto;
        min-width: 64px;
        padding: 6px 10px;
        border-radius: 999px;
        font-size: 12px;
        font-weight: 700;
        text-align: center;
      }

      .analysis-health-badge.ok {
        color: #15803d;
        background: #dcfce7;
      }

      .analysis-health-badge.warning {
        color: #b45309;
        background: #fef3c7;
      }

      .analysis-health-grid {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 10px;
      }

      .analysis-health-metric {
        display: grid;
        gap: 6px;
        min-width: 0;
        padding: 12px;
        border: 1px solid #edf0f4;
        border-radius: 8px;
        background: #f8fafc;
      }

      .analysis-health-metric span,
      .analysis-health-label {
        color: var(--color-text-secondary, #5f646d);
        font-size: 12px;
        font-weight: 600;
      }

      .analysis-health-metric strong {
        color: var(--color-text-primary, #1a1a1a);
        font-size: 18px;
        line-height: 1.3;
        word-break: break-word;
      }

      .analysis-health-metric small {
        color: var(--color-text-placeholder, #8a8a8a);
        font-size: 12px;
      }

      .analysis-health-metric.warning strong {
        color: #b45309;
      }

      .analysis-health-metric.ok strong {
        color: #15803d;
      }

      .analysis-health-missing {
        display: grid;
        gap: 8px;
      }

      .analysis-health-missing > div {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
      }

      .analysis-health-chip {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        max-width: 260px;
        padding: 6px 10px;
        border: 1px solid #e5e7eb;
        border-radius: 999px;
        background: #fff;
        font-size: 12px;
      }

      .analysis-health-chip strong,
      .analysis-health-chip em {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .analysis-health-chip em {
        color: var(--color-text-secondary, #5f646d);
        font-style: normal;
      }

      .analysis-health-chip.ok {
        color: #15803d;
        border-color: #bbf7d0;
        background: #f0fdf4;
      }

      .analysis-health-chip.muted {
        color: var(--color-text-secondary, #5f646d);
        background: #f8fafc;
      }

      .analysis-grid {
        display: grid;
        grid-template-columns: minmax(0, 1.25fr) minmax(360px, .85fr);
        gap: 16px;
        align-items: stretch;
      }

      .analysis-card {
        display: flex;
        flex-direction: column;
        min-width: 0;
        height: 100%;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        background: #fff;
        overflow: hidden;
      }

      .analysis-card-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        min-height: 54px;
        padding: 14px 16px;
        border-bottom: 1px solid #eef0f3;
      }

      .analysis-card-header h3 {
        margin: 0;
        color: var(--color-text-primary, #1a1a1a);
        font-size: 15px;
        font-weight: 700;
      }

      .analysis-card-header span {
        color: var(--color-text-secondary, #5f646d);
        font-size: 12px;
      }

      .analysis-card-body {
        flex: 1;
        padding: 16px;
      }

      .analysis-trend {
        display: grid;
        gap: 10px;
        min-height: 316px;
        align-content: space-between;
      }

      .analysis-trend-row {
        display: grid;
        grid-template-columns: 76px minmax(0, 1fr) 86px;
        gap: 12px;
        align-items: center;
      }

      .analysis-trend-date {
        color: var(--color-text-secondary, #5f646d);
        font-size: 12px;
        font-weight: 600;
      }

      .analysis-trend-bar {
        height: 10px;
        border-radius: 999px;
        background: #eef3ff;
        overflow: hidden;
      }

      .analysis-trend-bar i {
        display: block;
        height: 100%;
        border-radius: inherit;
        background: linear-gradient(90deg, #1677FF, #4F8CFF);
      }

      .analysis-trend-value {
        color: var(--color-text-primary, #1a1a1a);
        font-size: 12px;
        font-weight: 700;
        text-align: right;
      }

      .analysis-trend-clickable {
        width: 100%;
        border: 0;
        background: transparent;
        font: inherit;
        padding: 0;
        text-align: left;
        cursor: pointer;
      }

      .analysis-trend-clickable:hover .analysis-trend-date,
      .analysis-trend-clickable:hover .analysis-trend-value {
        color: var(--color-primary, #0052D9);
      }

      .analysis-trend-value strong,
      .analysis-trend-value small {
        display: block;
      }

      .analysis-trend-value small {
        margin-top: 2px;
        color: var(--color-text-placeholder, #8A8A8A);
        font-size: 11px;
        font-weight: 400;
        white-space: nowrap;
      }

      .analysis-rank-list,
      .analysis-risk-list {
        display: grid;
        gap: 12px;
      }

      .analysis-risk-list {
        min-height: 316px;
        align-content: space-between;
      }

      .analysis-rank-list {
        min-height: 420px;
      }

      .analysis-rank-item,
      .analysis-risk-item {
        display: grid;
        grid-template-columns: 28px minmax(0, 1fr) auto;
        gap: 12px;
        align-items: center;
        min-height: 52px;
        padding: 10px 0;
        border-bottom: 1px solid #f0f1f3;
      }

      .analysis-risk-item {
        grid-template-columns: 38px minmax(0, 1fr) auto;
        min-height: 62px;
        padding: 12px 14px;
        border: 1px solid #edf1f7;
        border-radius: 8px;
        background: linear-gradient(180deg, #fff 0%, #fbfcff 100%);
        box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
        color: inherit;
        font: inherit;
        text-align: left;
        appearance: none;
        cursor: pointer;
        transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
      }

      .analysis-risk-item:hover {
        border-color: rgba(22,119,255,0.3);
        box-shadow: 0 8px 20px rgba(22,119,255,0.08);
        transform: translateY(-1px);
      }

      .analysis-rank-item:last-child {
        border-bottom: 0;
      }

      .analysis-rank-index {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 24px;
        height: 24px;
        border-radius: 999px;
        background: var(--color-primary-light, #E6F4FF);
        color: var(--color-primary);
        font-size: 12px;
        font-weight: 700;
      }

      .analysis-rank-main,
      .analysis-risk-main {
        min-width: 0;
        overflow: hidden;
      }

      .analysis-rank-main strong,
      .analysis-risk-main strong {
        display: block;
        overflow: hidden;
        color: var(--color-text-primary, #1a1a1a);
        font-size: 13px;
        font-weight: 700;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .analysis-rank-main .table-link-button {
        display: block;
        max-width: 100%;
        overflow: hidden;
        text-align: left;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .analysis-rank-main span,
      .analysis-risk-main span {
        display: block;
        overflow: hidden;
        margin-top: 3px;
        color: var(--color-text-secondary, #5f646d);
        font-size: 12px;
        text-overflow: ellipsis;
        max-width: 220px;
        white-space: normal;
        word-break: break-all;
      }

      .analysis-risk-main span {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
      }

      .analysis-rank-value {
        color: var(--color-primary);
        font-size: 13px;
        font-weight: 600;
        text-align: right;
      }

      .analysis-rank-actions {
        display: inline-flex;
        justify-content: flex-end;
        align-items: center;
        gap: 10px;
        min-width: 118px;
        white-space: nowrap;
      }

      .analysis-rank-actions .analysis-rank-value {
        min-width: 72px;
      }

      .analysis-rank-reset {
        display: inline-flex;
        align-items: center;
        justify-content: flex-start;
        width: 100%;
        min-height: 34px;
        padding: 0;
        border: 0;
        background: transparent;
        color: var(--color-primary);
        font: inherit;
        font-size: 12px;
        font-weight: 600;
        cursor: pointer;
      }

      .analysis-rank-reset:hover {
        text-decoration: underline;
      }

      .analysis-risk-dot {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 30px;
        height: 30px;
        border-radius: 999px;
        background: var(--color-primary-light, #E6F4FF);
      }

      .analysis-risk-dot::after {
        content: "";
        width: 8px;
        height: 8px;
        border-radius: 999px;
        background: var(--color-primary);
      }

      .analysis-risk-item.warning .analysis-risk-dot { background: #fff7e6; }
      .analysis-risk-item.danger .analysis-risk-dot { background: #fff1f0; }
      .analysis-risk-item.success .analysis-risk-dot { background: #eef8f3; }
      .analysis-risk-item.warning .analysis-risk-dot::after { background: var(--warning); }
      .analysis-risk-item.danger .analysis-risk-dot::after { background: var(--danger); }
      .analysis-risk-item.success .analysis-risk-dot::after { background: var(--success); }

      .analysis-risk-value {
        min-width: 42px;
        padding: 5px 10px;
        border-radius: 999px;
        background: var(--color-primary-light, #E6F4FF);
        color: var(--color-primary);
        font-size: 12px;
        font-weight: 700;
        text-align: center;
      }

      .analysis-risk-item.warning .analysis-risk-value {
        background: #fff7e6;
        color: var(--warning);
      }

      .analysis-risk-item.danger .analysis-risk-value {
        background: #fff1f0;
        color: var(--danger);
      }

      .analysis-risk-meta {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        color: var(--color-text-placeholder, #8a8a8a);
        font-size: 12px;
        white-space: nowrap;
      }

      .analysis-return-button {
        margin-left: 10px;
        min-height: 30px;
        padding: 0 10px;
        font-size: 12px;
      }

      @media (max-width: 1180px) {
        .analysis-kpi-grid {
          grid-template-columns: repeat(2, minmax(0, 1fr));
        }
        .analysis-health-grid {
          grid-template-columns: repeat(2, minmax(0, 1fr));
        }
        .analysis-grid {
          grid-template-columns: 1fr;
        }
        .analysis-talent-grid {
          grid-template-columns: 1fr;
        }
        .analysis-talent-table + .analysis-talent-table {
          border-top: 1px solid #edf0f4;
          border-left: 0;
        }
        .analysis-trend,
        .analysis-risk-list,
        .analysis-rank-list {
          min-height: auto;
        }
        .workspace-hero,
        .workspace-layout {
          grid-template-columns: 1fr;
        }
        .workspace-secondary-grid {
          grid-template-columns: 1fr;
        }
        .workspace-hero-meta {
          grid-template-columns: repeat(4, minmax(0, 1fr));
        }
        .battle-sheet-stats {
          grid-template-columns: repeat(2, minmax(0, 1fr));
        }
      }

      @media (max-width: 720px) {
        .analysis-section-tabs {
          width: 100%;
        }
        .analysis-talent-intro,
        .analysis-talent-quality {
          align-items: stretch;
          flex-direction: column;
        }
        .analysis-talent-actions .btn {
          flex: 1;
        }
        .analysis-talent-signing-summary {
          grid-template-columns: 1fr;
        }
        .analysis-talent-signing-summary span + span {
          border-top: 1px solid #e5e7eb;
          border-left: 0;
        }
        .analysis-talent-quality > div:last-child {
          justify-content: flex-start;
        }
        .analysis-health-header {
          flex-direction: column;
        }
        .analysis-health-grid {
          grid-template-columns: 1fr;
        }
      }

      .battle-top-row {
        font-weight: 700;
      }

      .battle-top-row td[data-hot],
      .battle-top-row td[data-num] {
        color: #e53e3e;
      }

      .battle-group-total td {
        font-weight: 700;
        text-align: right;
      }

      .battle-import-textarea {
        min-height: 72px;
      }

      /* ── Layout polish: shared card rhythm for workplace/company pages ── */
      #workspaceView,
      #companyView {
        --page-card-gap: 16px;
      }

      #workspaceView .workspace-hero,
      #workspaceView .workspace-quick-strip,
      #workspaceView .workspace-card,
      #workspaceView .workspace-history,
      #companyView .panel,
      #companyView .company-hero {
        border-color: #e5e7eb;
        border-radius: 8px;
        box-shadow: none;
      }

      #workspaceView .workspace-quick-strip {
        display: block;
      }

      #workspaceView .workspace-quick-grid {
        grid-template-columns: repeat(4, minmax(160px, 1fr));
      }

      #workspaceView .workspace-quick-button {
        display: grid;
        align-content: center;
        min-height: 58px;
        padding: 10px 12px;
      }

      #workspaceView .workspace-layout,
      #workspaceView .workspace-secondary-grid,
      #companyView .company-directory-layout {
        gap: var(--page-card-gap);
      }

      #workspaceView .workspace-secondary-grid {
        grid-template-columns: repeat(3, minmax(280px, 1fr));
        align-items: start;
        overflow: hidden;
        border: 1px solid #edf0f5;
        border-radius: 8px;
        background: #fff;
      }

      #workspaceView .workspace-secondary-grid .workspace-card {
        min-height: 0;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
      }

      #workspaceView .workspace-secondary-grid .workspace-card:not(:last-child) {
        border-right: 1px solid #f0f2f5;
      }

      #workspaceView .workspace-secondary-grid .workspace-card .panel-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        flex-wrap: nowrap;
        min-height: 46px;
        padding: 12px 14px;
        border-bottom-color: #f0f2f5;
      }

      #workspaceView .workspace-secondary-grid .workspace-card .panel-header h2 {
        min-width: 0;
        white-space: nowrap;
      }

      #workspaceView .workspace-secondary-grid .workspace-card .panel-header > div {
        display: flex;
        align-items: center;
        gap: 6px;
        flex-shrink: 0;
        white-space: nowrap;
      }

      #workspaceView .workspace-secondary-grid .workspace-card .panel-header .btn {
        padding: 6px 10px;
      }

      #workspaceView .workspace-secondary-grid .workspace-card .panel-body,
      #workspaceView .workspace-secondary-grid .workspace-card .panel-body-flush {
        padding: 12px 14px;
      }

      #workspaceView .workspace-secondary-grid .task-list {
        min-height: 128px;
      }

      #workspaceView .workspace-secondary-grid .empty-state {
        min-height: 128px;
        padding: 16px;
        gap: 8px;
      }

      #workspaceView .workspace-secondary-grid .empty-state-icon {
        width: 30px;
        height: 30px;
        border-radius: 6px;
        font-size: 12px;
      }

      #workspaceView .workspace-secondary-grid .empty-state p {
        max-width: 260px;
        font-size: 13px;
        line-height: 1.5;
      }

      #workspaceView .workspace-secondary-grid .report-box {
        min-height: 128px;
        height: 128px;
        padding: 12px;
        border-color: #e8ecf2;
        resize: vertical;
      }

      #workspaceView .workspace-secondary-grid .workspace-activity-list {
        max-height: 142px;
        overflow: auto;
      }

      #workspaceView .workspace-secondary-grid .workspace-activity-item {
        min-height: 42px;
        padding: 8px 0;
        grid-template-columns: 70px minmax(0, 1fr) auto;
      }

      #workspaceView #dailyForm .panel-body {
        padding: 14px 16px 16px;
      }

      #workspaceView #dailyForm .field {
        margin-bottom: 10px;
      }

      #workspaceView #dailyForm textarea {
        min-height: 64px;
      }

      #workspaceView.workspace-role-admin #dailyForm textarea,
      #workspaceView.workspace-role-manager #dailyForm textarea,
      #workspaceView.workspace-role-finance #dailyForm textarea,
      #workspaceView.workspace-role-goods #dailyForm textarea,
      #workspaceView.workspace-role-hr #dailyForm textarea,
      #workspaceView.workspace-role-control #dailyForm textarea,
      #workspaceView.workspace-role-metaphysics #dailyForm textarea {
        min-height: 44px;
      }

      #workspaceView #dailyForm button[type="submit"] {
        width: auto;
        min-width: 180px;
        padding-left: 28px;
        padding-right: 28px;
      }

      @media (max-width: 1180px) {
        #workspaceView .workspace-secondary-grid {
          grid-template-columns: repeat(2, minmax(0, 1fr));
          border: 0;
          background: transparent;
          overflow: visible;
        }
        #workspaceView .workspace-secondary-grid .workspace-card {
          border: 1px solid #edf0f5;
          border-radius: 8px;
          background: #fff;
        }
        #workspaceView .workspace-secondary-grid .workspace-card:not(:last-child) {
          border-right: 1px solid #edf0f5;
        }
      }

      @media (max-width: 768px) {
        #workspaceView .workspace-secondary-grid {
          grid-template-columns: 1fr;
        }
        .battle-sheet-stats {
          grid-template-columns: 1fr;
        }
      }

      #companyView .company-shell {
        gap: 16px;
      }

      #companyView .company-maintenance-hero {
        display: block;
        min-height: auto;
        padding: 20px 24px;
        background: #fff;
      }

      #companyView .company-maintenance-hero::before,
      #companyView .company-maintenance-hero::after {
        display: none;
      }

      #companyView .company-maintenance-hero > div:first-child {
        padding: 0;
      }

      #companyView .company-maintenance-hero p {
        max-width: 760px;
        margin: 0;
      }

      #companyView .company-entity-tools {
        display: grid;
        grid-template-columns: minmax(180px, 260px) minmax(0, 1fr) auto;
        gap: 12px;
        align-items: end;
        max-width: none;
        margin-top: 16px;
      }

      #companyView .company-entity-form {
        display: grid;
        grid-template-columns: minmax(130px, 0.7fr) minmax(190px, 1fr) minmax(220px, 1.1fr) auto;
        gap: 8px;
        align-items: end;
      }

      #companyView .company-entity-form input,
      #companyView .company-entity-form .btn,
      #companyView .company-delete-button,
      #companyView #companyScopeSelect {
        min-height: 36px;
      }

      #companyView .company-directory-layout {
        display: grid;
        grid-template-columns: 1fr;
        align-items: start;
      }

      #companyView .company-panel .panel-header {
        min-height: 52px;
        padding: 14px 16px;
        border-bottom: 1px solid #eef0f3;
      }

      #companyView .company-panel .panel-body {
        padding: 16px;
      }

      #companyView .company-entity-profile-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
      }

      #companyView .entity-info-card {
        min-height: 76px;
      }

      #companyView #companySummaryKpiHost {
        display: none;
      }

      #companyView .company-entity-overview-panel .panel-body {
        display: grid;
        gap: 14px;
      }

      #companyView .company-drilldown-actions {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 10px;
        margin: 0;
      }

      #companyView .company-drilldown-actions .btn {
        width: 100%;
        justify-content: center;
      }

      #companyView .company-relation-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 12px;
      }

      @media (max-width: 1180px) {
        #workspaceView .workspace-quick-grid,
        #companyView .company-entity-profile-grid,
        #companyView .company-drilldown-actions,
        #companyView .company-relation-grid {
          grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        #companyView .company-entity-tools,
        #companyView .company-entity-form {
          grid-template-columns: 1fr 1fr;
        }
      }

      @media (max-width: 768px) {
        #workspaceView .workspace-quick-grid,
        #companyView .company-directory-layout,
        #companyView .company-entity-tools,
        #companyView .company-entity-form,
        #companyView .company-entity-profile-grid,
        #companyView .company-drilldown-actions,
        #companyView .company-relation-grid {
          grid-template-columns: 1fr;
        }
      }

      /* Apple-like foundation pass: calm surfaces, clear rhythm, dense but readable data UI. */
      :root {
        --apple-page-bg: #f5f7fb;
        --apple-surface: rgba(255, 255, 255, 0.96);
        --apple-border: rgba(17, 24, 39, 0.08);
        --apple-border-strong: rgba(17, 24, 39, 0.12);
        --apple-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.04);
        --apple-shadow-hover: 0 4px 10px rgba(15, 23, 42, 0.06), 0 16px 36px rgba(15, 23, 42, 0.06);
        --apple-radius: 12px;
        --apple-radius-sm: 8px;
        --apple-gap: 16px;
      }

      body {
        background: var(--apple-page-bg);
      }

      .view.active {
        gap: 18px;
      }

      .topbar {
        min-height: 64px;
        padding: 18px 24px;
      }

      .page-title {
        letter-spacing: 0;
      }

      .global-search {
        border-color: var(--apple-border);
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.82);
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
      }

      .panel,
      .workspace-hero,
      .workspace-quick-strip,
      .workspace-card,
      .workspace-history,
      .profile-table-wrap,
      .asset-table,
      .company-hero,
      .company-panel,
      .company-kpi-card,
      .company-relation-card,
      .entity-info-card,
      .analysis-kpi-card,
      .analysis-card,
      .recruit-report-card,
      .battle-sheet-card,
      .monthly-summary-grid > div,
      dialog,
      .profile-drawer,
      .agent-drawer,
      .trash-drawer {
        background: var(--apple-surface);
        border: 1px solid var(--apple-border);
        border-radius: var(--apple-radius);
        box-shadow: var(--apple-shadow);
      }

      .panel:hover,
      .workspace-card:hover,
      .company-kpi-card:hover,
      .analysis-kpi-card:hover,
      .entity-info-card:hover,
      .company-relation-card:hover {
        border-color: var(--apple-border-strong);
        box-shadow: var(--apple-shadow-hover);
      }

      .panel-header,
      .profile-drawer-header,
      .profile-drawer-footer,
      .dialog-header,
      .dialog-footer {
        border-color: rgba(17, 24, 39, 0.07);
      }

      .panel-header {
        min-height: 54px;
        padding: 14px 18px;
      }

      .panel-header h2,
      .workspace-quick-header h2,
      .analysis-card h2 {
        font-size: 15px;
        font-weight: 650;
        letter-spacing: 0;
      }

      .panel-body {
        padding: 18px;
      }

      .btn,
      .nav-button,
      .record-action-btn,
      .table-link-button {
        transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
      }

      .btn {
        border-radius: 8px;
        min-height: 36px;
      }

      .btn-primary {
        box-shadow: 0 6px 16px rgba(22, 119, 255, 0.18);
      }

      .btn-primary:hover {
        transform: translateY(-1px);
      }

      input,
      textarea,
      select {
        border-color: rgba(17, 24, 39, 0.12);
        border-radius: 8px;
      }

      input:focus,
      textarea:focus,
      select:focus {
        border-color: var(--color-primary);
        box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.12);
        outline: none;
      }

      .profile-data-table,
      .asset-table table,
      .workspace-anchor-fill-table {
        width: 100%;
        border-collapse: separate;
        border-spacing: 0;
      }

      .profile-data-table th,
      .profile-data-table td,
      .asset-table th,
      .asset-table td,
      .workspace-anchor-fill-table th,
      .workspace-anchor-fill-table td {
        vertical-align: middle;
      }

      .profile-data-table th,
      .asset-table th,
      .workspace-anchor-fill-table th {
        position: sticky;
        top: 0;
        z-index: 2;
        background: #f7f9fc;
        color: #697386;
        font-size: 12px;
        font-weight: 650;
      }

      .profile-data-table td,
      .asset-table td,
      .workspace-anchor-fill-table td {
        height: 52px;
        border-bottom-color: rgba(17, 24, 39, 0.06);
      }

      .profile-data-table tbody tr:hover,
      .asset-table tbody tr:hover,
      .workspace-anchor-fill-table tbody tr:hover {
        background: rgba(22, 119, 255, 0.035);
      }

      .profile-data-table input[type="number"],
      .asset-table input[type="number"],
      .workspace-anchor-fill-table input[type="number"],
      .battle-edit-table input[type="number"],
      .recruit-edit-table input[type="number"] {
        text-align: center;
      }

      .table-money,
      td[data-num],
      th[data-num],
      td[data-align="center"],
      th[data-align="center"] {
        text-align: center;
      }

      .record-actions,
      .table-actions,
      td:last-child:has(.record-action-btn),
      th:last-child {
        text-align: center;
      }

      .workspace-hero,
      .workspace-quick-strip,
      .workspace-layout,
      .workspace-secondary-grid,
      .company-shell,
      .company-directory-layout,
      .analysis-grid {
        gap: var(--apple-gap);
      }

      #workspaceView .workspace-quick-strip {
        padding: 14px 16px;
      }

      #workspaceView .workspace-quick-grid {
        gap: 12px;
      }

      #workspaceView .workspace-quick-button {
        min-height: 62px;
        border-color: rgba(17, 24, 39, 0.08);
        border-radius: 10px;
        background: #fff;
      }

      #workspaceView .workspace-quick-button:hover {
        border-color: rgba(22, 119, 255, 0.35);
        background: #f8fbff;
      }

      #workspaceView .workspace-layout {
        align-items: start;
        grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.65fr);
      }

      #workspaceView .workspace-secondary-grid {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: var(--apple-gap);
        border: 0;
        background: transparent;
        overflow: visible;
      }

      #workspaceView .workspace-secondary-grid .workspace-card {
        border: 1px solid var(--apple-border);
        border-radius: var(--apple-radius);
        background: var(--apple-surface);
      }

      #workspaceView .workspace-secondary-grid .workspace-card:not(:last-child) {
        border-right: 1px solid var(--apple-border);
      }

      #workspaceView .workspace-secondary-grid .workspace-card .panel-header,
      #workspaceView .workspace-secondary-grid .workspace-card .panel-body,
      #workspaceView .workspace-secondary-grid .workspace-card .panel-body-flush {
        padding-left: 16px;
        padding-right: 16px;
      }

      #workspaceView #dailyForm textarea {
        min-height: 52px;
      }

      #workspaceView #dailyForm .panel-body {
        display: grid;
        gap: 10px;
      }

      #workspaceView #dailyForm .field {
        margin-bottom: 0;
      }

      #workspaceView #dailyForm button[type="submit"] {
        width: auto !important;
        justify-self: start;
        min-width: 180px;
      }

      #companyView .company-shell {
        display: grid;
        gap: 16px;
      }

      #companyView .company-maintenance-hero {
        padding: 22px 24px;
      }

      #companyView .company-entity-tools {
        grid-template-columns: minmax(180px, 280px) minmax(0, 1fr) auto;
        gap: 12px;
        align-items: end;
      }

      #companyView .company-entity-form {
        grid-template-columns: minmax(180px, 0.75fr) minmax(260px, 1fr) minmax(260px, 1fr) auto;
        gap: 10px;
      }

      #companyView .company-directory-layout {
        display: grid;
        grid-template-columns: minmax(320px, 0.7fr) minmax(0, 1.3fr);
        align-items: start;
      }

      #companyView .company-entity-profile-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
      }

      #companyView .company-entity-overview-panel .panel-body {
        gap: 16px;
      }

      #companyView .company-drilldown-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
      }

      .analysis-grid {
        align-items: start;
      }

      .analysis-risk-list {
        display: grid;
        gap: 10px;
      }

      .analysis-risk-item,
      .workspace-risk-item {
        border: 1px solid rgba(17, 24, 39, 0.07);
        border-radius: 10px;
        background: #fff;
      }

      .analysis-rank-item {
        min-height: 58px;
        border-bottom-color: rgba(17, 24, 39, 0.06);
      }

      dialog {
        max-height: min(86vh, 900px);
        overflow: hidden;
      }

      .dialog-body {
        overflow: auto;
      }

      .dialog-footer {
        position: sticky;
        bottom: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(12px);
      }

      .profile-drawer,
      #agentDrawerOverlay .profile-drawer {
        width: min(760px, calc(100vw - 48px));
        max-width: 760px;
      }

      .sidebar .nav-button .nav-icon {
        color: #6b7280 !important;
        opacity: 1;
      }

      .sidebar .nav-button .nav-icon svg {
        display: block;
        width: 18px;
        height: 18px;
        fill: none;
        stroke: currentColor;
        stroke-width: 1.8;
        stroke-linecap: round;
        stroke-linejoin: round;
      }

      .sidebar .nav-button:hover .nav-icon,
      .sidebar .nav-button.active .nav-icon {
        color: #111827 !important;
      }

      @media (max-width: 1180px) {
        #workspaceView .workspace-layout,
        #companyView .company-directory-layout,
        .analysis-grid {
          grid-template-columns: 1fr;
        }

        #companyView .company-entity-tools,
        #companyView .company-entity-form {
          grid-template-columns: 1fr 1fr;
        }
      }

      @media (max-width: 768px) {
        .view.active {
          padding: 14px;
        }

        .topbar {
          padding: 14px;
        }

        .panel,
        .workspace-card,
        .workspace-quick-strip,
        .profile-table-wrap,
        .asset-table,
        .company-panel,
        .analysis-card {
          border-radius: 10px;
        }

        #workspaceView .workspace-secondary-grid,
        #workspaceView .workspace-quick-grid,
        #companyView .company-entity-tools,
        #companyView .company-entity-form,
        #companyView .company-entity-profile-grid {
          grid-template-columns: 1fr;
        }

        .profile-drawer,
        #agentDrawerOverlay .profile-drawer {
          width: 100vw;
          max-width: 100vw;
          border-radius: 0;
        }

        #anchor-productsView .profile-table-wrap,
        #anchor-productsView .anchor-product-list-wrap {
          overflow: visible;
        }

        #anchor-productsView .anchor-product-table {
          display: none !important;
        }

        #anchor-productsView .anchor-product-mobile-list {
          display: grid !important;
          gap: 12px;
        }

        #anchor-productsView .control-tabs {
          overflow-x: auto;
          padding-bottom: 4px;
          scrollbar-width: none;
        }

        #anchor-productsView .control-tabs::-webkit-scrollbar {
          display: none;
        }
      }

      .mobile-more-button {
        display: none;
      }

      .desktop-nav-groups {
        display: flex;
        flex-direction: column;
        gap: 2px;
      }

      .mobile-nav-shell {
        display: none;
      }

      @media (max-width: 768px) {
        html,
        body {
          overflow-x: hidden;
        }

        body {
          padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px));
        }

        .data-safety-grid {
          grid-template-columns: 1fr;
        }

        .governance-hero,
        .governance-step-card,
        .governance-action-grid,
        .governance-mobile-list,
        .governance-summary,
        .governance-config-form {
          grid-template-columns: 1fr;
        }

        .governance-step-card {
          align-items: flex-start;
        }

        .governance-source-pill {
          white-space: normal;
        }

        .data-safety-panel {
          display: grid;
        }

        .data-safety-panel .table-actions {
          justify-content: stretch;
        }

        .data-safety-panel .table-actions .btn {
          flex: 1 1 0;
        }

        .profile-table-wrap table[data-responsive-card-table],
        .asset-table table[data-responsive-card-table] {
          border-collapse: separate;
          border-spacing: 0 10px;
          min-width: 0;
        }

        .profile-table-wrap table[data-responsive-card-table] thead,
        .asset-table table[data-responsive-card-table] thead {
          display: none;
        }

        .profile-table-wrap table[data-responsive-card-table] tbody,
        .profile-table-wrap table[data-responsive-card-table] tr,
        .profile-table-wrap table[data-responsive-card-table] td,
        .asset-table table[data-responsive-card-table] tbody,
        .asset-table table[data-responsive-card-table] tr,
        .asset-table table[data-responsive-card-table] td {
          display: block;
          width: 100%;
        }

        .profile-table-wrap table[data-responsive-card-table] tr,
        .asset-table table[data-responsive-card-table] tr {
          background: var(--surface);
          border: 1px solid var(--line);
          border-radius: var(--radius-md);
          box-shadow: var(--shadow-sm);
          padding: 10px;
        }

        .profile-table-wrap table[data-responsive-card-table] td,
        .asset-table table[data-responsive-card-table] td {
          align-items: center;
          border: 0;
          display: grid;
          gap: 8px;
          grid-template-columns: minmax(86px, 34%) minmax(0, 1fr);
          min-height: 34px;
          padding: 7px 4px;
          text-align: right;
          white-space: normal;
        }

        .profile-table-wrap table[data-responsive-card-table] td::before,
        .asset-table table[data-responsive-card-table] td::before {
          color: var(--muted);
          content: attr(data-label);
          font-size: 12px;
          font-weight: 600;
          text-align: left;
        }

        body.mobile-panel-open {
          overflow: hidden;
        }

        .app {
          display: block;
          min-height: 100vh;
        }

        .content {
          min-width: 0;
          padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px));
        }

        .sidebar {
          position: static;
          width: 100%;
          min-width: 0;
          height: 0;
          max-height: none;
          overflow: visible;
          border-right: 0;
          border-top: 0;
          background: transparent;
          box-shadow: none;
        }

        body.mobile-panel-open .sidebar::before {
          content: none;
          display: none;
        }

        .brand,
        .sidebar-footer,
        .desktop-nav-groups,
        .nav > .nav-group,
        .nav-group-label {
          display: none !important;
        }

        .nav {
          display: block;
          padding: 0;
          width: 100%;
          height: 0;
          overflow: visible;
        }

        body.mobile-panel-open .nav {
          display: block;
          max-height: none;
          overflow: visible;
          padding: 0;
        }

        .mobile-nav-shell {
          position: fixed;
          right: 0;
          bottom: 0;
          left: 0;
          z-index: 80;
          display: block;
          pointer-events: none;
        }

        .mobile-primary-nav {
          display: grid;
          grid-template-columns: repeat(4, minmax(0, 1fr));
          gap: 2px;
          padding: 6px 8px calc(8px + env(safe-area-inset-bottom, 0px));
          min-height: calc(78px + env(safe-area-inset-bottom, 0px));
          border-top: 1px solid rgba(17, 24, 39, 0.1);
          border-radius: 16px 16px 0 0;
          background: #fff;
          box-shadow: 0 -8px 22px rgba(15, 23, 42, 0.1);
          pointer-events: auto;
        }

        .mobile-primary-nav-compact {
          grid-template-columns: repeat(4, minmax(0, 1fr));
        }

        .mobile-nav-backdrop {
          position: fixed;
          inset: 0;
          z-index: 79;
          display: none;
          width: 100%;
          border: 0;
          background: rgba(15, 23, 42, 0.34);
          pointer-events: auto;
        }

        body.mobile-panel-open .mobile-nav-backdrop {
          display: block;
        }

        .mobile-action-panel {
          position: fixed;
          right: 8px;
          bottom: calc(78px + env(safe-area-inset-bottom, 0px));
          left: 8px;
          z-index: 81;
          max-height: min(68vh, 580px);
          overflow-y: auto;
          border: 1px solid rgba(17, 24, 39, 0.1);
          border-radius: 16px;
          background: #fff;
          box-shadow: 0 16px 44px rgba(15, 23, 42, 0.2);
          opacity: 0;
          pointer-events: none;
          transform: translateY(18px);
          transition: opacity 150ms ease, transform 150ms ease;
        }

        body[data-mobile-panel="work"] [data-mobile-panel-content="work"],
        body[data-mobile-panel="mine"] [data-mobile-panel-content="mine"] {
          opacity: 1;
          pointer-events: auto;
          transform: translateY(0);
        }

        .mobile-panel-header {
          position: sticky;
          top: 0;
          z-index: 1;
          display: flex;
          min-height: 58px;
          align-items: center;
          justify-content: space-between;
          gap: 12px;
          padding: 10px 14px;
          border-bottom: 1px solid rgba(17, 24, 39, 0.08);
          background: #fff;
        }

        .mobile-panel-header h2 {
          margin: 0;
          color: var(--text);
          font-size: 16px;
          font-weight: 700;
        }

        .mobile-panel-close {
          display: inline-flex;
          width: 36px;
          height: 36px;
          align-items: center;
          justify-content: center;
          flex: 0 0 auto;
          padding: 0;
          border: 0;
          border-radius: 8px;
          background: #f3f4f6;
          color: #4b5563;
          cursor: pointer;
        }

        .mobile-panel-close .nav-icon,
        .mobile-panel-close svg {
          width: 18px;
          height: 18px;
        }

        .mobile-panel-close svg {
          display: block;
          fill: none;
          stroke: currentColor;
          stroke-width: 1.8;
          stroke-linecap: round;
          stroke-linejoin: round;
        }

        .mobile-account-summary {
          display: grid;
          min-width: 0;
          gap: 3px;
        }

        .mobile-account-summary strong,
        .mobile-account-summary span {
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
        }

        .mobile-account-summary strong {
          font-size: 16px;
        }

        .mobile-account-summary span {
          color: var(--muted);
          font-size: 12px;
        }

        .mobile-action-grid {
          display: grid;
          grid-template-columns: repeat(2, minmax(0, 1fr));
          gap: 8px;
          padding: 12px;
        }

        .mobile-nav-shell .nav-button {
          display: flex;
          min-width: 0;
          min-height: 58px;
          flex-direction: column;
          justify-content: center;
          gap: 4px;
          padding: 6px 2px;
          border-radius: 12px;
          color: #4b5563;
          font-size: 11px;
          line-height: 1.2;
        }

        .mobile-action-grid .nav-button {
          min-height: 52px;
          flex-direction: row;
          justify-content: flex-start;
          gap: 9px;
          padding: 9px 10px;
          background: rgba(248, 250, 252, 0.9);
          border: 1px solid rgba(17, 24, 39, 0.06);
          font-size: 13px;
          text-align: left;
        }

        .mobile-action-grid .nav-button .nav-icon,
        .mobile-action-grid .nav-button .nav-icon svg {
          width: 19px;
          height: 19px;
          flex: 0 0 auto;
        }

        .mobile-mine-primary {
          padding-bottom: 4px;
        }

        .mobile-all-functions {
          margin: 8px 12px 12px;
          border-top: 1px solid rgba(17, 24, 39, 0.08);
        }

        .mobile-all-functions summary {
          display: flex;
          min-height: 46px;
          align-items: center;
          justify-content: space-between;
          color: var(--text);
          cursor: pointer;
          font-size: 14px;
          font-weight: 700;
          list-style: none;
        }

        .mobile-all-functions summary::-webkit-details-marker {
          display: none;
        }

        .mobile-all-functions summary span {
          color: var(--muted);
          font-size: 12px;
          font-weight: 500;
        }

        .mobile-all-functions .mobile-action-grid {
          padding: 0 0 4px;
        }

        .mobile-nav-shell .nav-button.active {
          background: var(--color-primary-light);
          color: var(--color-primary);
          box-shadow: none;
        }

        .mobile-nav-shell .nav-button span:last-child {
          display: block;
          max-width: 100%;
          white-space: nowrap;
          overflow: hidden;
          text-overflow: ellipsis;
        }

        .mobile-nav-shell .nav-button .nav-icon {
          width: 20px;
          height: 20px;
          margin-right: 0;
        }

        .mobile-nav-shell .nav-button .nav-icon svg {
          width: 20px;
          height: 20px;
        }

        .topbar {
          position: static;
          z-index: auto;
          gap: 10px;
          padding: 12px 14px;
          background: rgba(245, 247, 251, 0.94);
          border-bottom: 1px solid rgba(17, 24, 39, 0.07);
          backdrop-filter: blur(14px);
        }

        .page-title {
          font-size: 19px;
          line-height: 1.28;
        }

        .page-subtitle {
          font-size: 12px;
          line-height: 1.45;
        }

        .global-search {
          min-height: 38px;
        }

        body.role-anchor {
          background: #f6f7fb;
          padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
        }

        body.role-anchor .content {
          background: #f6f7fb;
          padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px));
        }

        body.role-anchor .topbar {
          display: grid;
          grid-template-columns: 1fr;
          gap: 12px;
          padding: 18px 16px 10px;
          border-bottom: 0;
          background: #f6f7fb;
          backdrop-filter: none;
        }

        body.role-anchor .topbar-right {
          display: none !important;
        }

        body.role-anchor .topbar-left {
          min-width: 0;
        }

        body.role-anchor .page-title {
          font-size: 24px;
          line-height: 1.2;
          font-weight: 800;
          color: #111827;
        }

        body.role-anchor .page-subtitle {
          margin-top: 8px;
          font-size: 13px;
          line-height: 1.5;
          color: #6b7280;
        }

        body.role-anchor .global-search {
          width: 100%;
          max-width: none;
          min-height: 46px;
          border-radius: 14px;
          background: #fff;
          box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
        }

        body.role-anchor .global-search input {
          font-size: 14px;
        }

        body.role-anchor #anchor-productsView.view.active,
        body.role-anchor #anchor-rulesView.view.active,
        body.role-anchor #anchor-feedbacksView.view.active,
        body.role-anchor #anchor-statsView.view.active {
          padding: 0 14px 18px;
        }

        body.role-anchor #anchor-productsView .panel {
          border: 0;
          border-radius: 0;
          background: transparent;
          box-shadow: none;
        }

        body.role-anchor #anchor-productsView .panel-body {
          padding: 0;
        }

        body.role-anchor .anchor-product-search-bar {
          position: sticky;
          top: 0;
          z-index: 9;
          margin: 0 -14px 0;
          padding: 8px 14px 6px;
          background: rgba(246, 247, 251, 0.96);
          backdrop-filter: blur(12px);
        }

        body.role-anchor .anchor-product-search-bar input {
          min-height: 44px;
          border-radius: 14px;
          background: #fff;
          box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
        }

        body.role-anchor .anchor-product-search-bar .btn {
          flex: 0 0 auto;
          min-height: 44px;
          border-radius: 14px;
          padding: 0 14px;
        }

        body.role-anchor #anchor-productsView .anchor-product-table,
        body.role-anchor #anchor-productsView .anchor-product-table tbody,
        body.role-anchor #anchor-productsView .anchor-product-table tr,
        body.role-anchor #anchor-productsView .anchor-product-table td {
          display: none !important;
        }

        body.role-anchor #anchor-productsView .control-tabs {
          position: sticky;
          top: 58px;
          z-index: 8;
          margin: 0 -14px 12px;
          padding: 8px 14px 10px;
          background: rgba(246, 247, 251, 0.96);
          backdrop-filter: blur(12px);
        }

        body.role-anchor #anchor-productsView .control-tab {
          min-height: 38px;
          padding: 8px 14px;
          border-radius: 999px;
          border-bottom: 0;
          background: transparent;
          color: #6b7280;
          white-space: nowrap;
        }

        body.role-anchor #anchor-productsView .control-tab.active {
          background: #e8f1ff;
          color: #1677ff;
          font-weight: 700;
        }

        body.role-anchor #anchorProductSearchMeta {
          margin: -4px 0 10px;
          color: #64748b;
          font-size: 12px;
        }

        body.role-anchor .anchor-product-empty {
          display: grid;
          gap: 10px;
          padding: 26px 16px;
          border: 1px dashed rgba(37, 99, 235, 0.28);
          border-radius: 16px;
          background: #fff;
        }

        body.role-anchor .anchor-product-empty .btn {
          justify-self: center;
          min-height: 38px;
          border-radius: 999px;
        }

        body.role-anchor .anchor-product-mobile-list {
          gap: 10px;
          padding-bottom: calc(92px + env(safe-area-inset-bottom, 0px));
        }

        body.role-anchor .anchor-product-card {
          grid-template-columns: 112px minmax(0, 1fr);
          gap: 12px;
          padding: 10px;
          border: 1px solid rgba(17, 24, 39, 0.08);
          border-radius: 16px;
          box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
        }

        body.role-anchor .anchor-product-card-image .product-thumb,
        body.role-anchor .anchor-product-card-image .product-thumb-placeholder,
        body.role-anchor .anchor-product-card-image .product-image-preview {
          width: 112px;
          height: 148px;
          border-radius: 12px;
        }

        body.role-anchor .anchor-product-card-image .product-thumb-placeholder {
          display: grid;
          place-items: center;
          padding: 10px;
          border-style: dashed;
          background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
          color: #94a3b8;
          font-size: 13px;
          line-height: 1.4;
          text-align: center;
        }

        body.role-anchor .anchor-product-card-image .product-thumb-missing {
          background: #fff7ed;
          color: #c2410c;
        }

        body.role-anchor .anchor-product-card-head {
          display: grid;
          grid-template-columns: minmax(0, 1fr);
          gap: 4px;
        }

        body.role-anchor .anchor-product-card h3 {
          margin-top: 2px;
          font-size: 15px;
          line-height: 1.35;
        }

        body.role-anchor .anchor-product-price {
          font-size: 16px;
        }

        body.role-anchor .anchor-product-size-grid,
        body.role-anchor .anchor-product-color-row > div {
          grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        body.role-anchor .anchor-product-detail {
          margin-top: 12px;
          padding-top: 10px;
        }

        body.role-anchor .anchor-product-detail summary {
          display: flex;
          align-items: center;
          justify-content: center;
          min-height: 36px;
          border-radius: 10px;
          background: #f3f6fb;
          color: #2563eb;
          font-size: 13px;
          list-style: none;
        }

        body.role-anchor .anchor-product-detail summary::-webkit-details-marker {
          display: none;
        }

        body.role-anchor .anchor-product-detail[open] summary {
          background: #e8f1ff;
        }

        body.role-anchor .anchor-product-card-action {
          display: flex;
          align-items: center;
          justify-content: center;
          width: 100%;
          min-height: 38px;
          margin-top: 10px;
          border: 0;
          border-radius: 12px;
          background: #1677ff;
          color: #fff;
          font-size: 14px;
          font-weight: 700;
          box-shadow: 0 8px 16px rgba(22, 119, 255, 0.22);
        }

        body.role-anchor .anchor-product-sheet {
          position: fixed;
          inset: 0;
          z-index: 92;
          display: block;
          pointer-events: none;
        }

        body.role-anchor .anchor-product-sheet-backdrop {
          position: absolute;
          inset: 0;
          width: 100%;
          height: 100%;
          border: 0;
          background: rgba(15, 23, 42, 0.36);
          pointer-events: auto;
        }

        body.role-anchor .anchor-product-sheet-panel {
          position: absolute;
          right: 0;
          bottom: 0;
          left: 0;
          max-height: min(82vh, 720px);
          overflow-y: auto;
          -webkit-overflow-scrolling: touch;
          padding: 10px 14px calc(92px + env(safe-area-inset-bottom, 0px));
          border-radius: 22px 22px 0 0;
          background: #fff;
          box-shadow: 0 -20px 60px rgba(15, 23, 42, 0.24);
          pointer-events: auto;
        }

        body.role-anchor .anchor-product-sheet-handle {
          width: 42px;
          height: 4px;
          margin: 2px auto 12px;
          border-radius: 999px;
          background: #d1d5db;
        }

        body.role-anchor .anchor-product-sheet-head {
          position: sticky;
          top: -10px;
          z-index: 2;
          display: flex;
          align-items: center;
          justify-content: space-between;
          padding: 8px 0 12px;
          background: rgba(255, 255, 255, 0.96);
          backdrop-filter: blur(12px);
        }

        body.role-anchor .anchor-product-sheet-head strong {
          color: #111827;
          font-size: 17px;
          font-weight: 800;
        }

        body.role-anchor .anchor-product-sheet-head button {
          min-height: 34px;
          border: 0;
          border-radius: 999px;
          background: #f3f6fb;
          color: #2563eb;
          font-size: 13px;
          font-weight: 700;
          padding: 0 12px;
        }

        body.role-anchor .anchor-product-sheet-main {
          display: grid;
          grid-template-columns: 124px minmax(0, 1fr);
          gap: 14px;
          align-items: start;
        }

        body.role-anchor .anchor-product-sheet-image .product-thumb,
        body.role-anchor .anchor-product-sheet-image .product-thumb-placeholder,
        body.role-anchor .anchor-product-sheet-image .product-image-preview {
          width: 124px;
          height: 164px;
          border-radius: 14px;
        }

        body.role-anchor .anchor-product-sheet-title {
          min-width: 0;
        }

        body.role-anchor .anchor-product-sheet-title span {
          color: #2563eb;
          font-size: 13px;
          font-weight: 800;
        }

        body.role-anchor .anchor-product-sheet-title h3 {
          margin: 6px 0 10px;
          color: #111827;
          font-size: 20px;
          line-height: 1.25;
          font-weight: 800;
          word-break: break-word;
        }

        body.role-anchor .anchor-product-sheet-title strong {
          color: #dc2626;
          font-size: 20px;
          font-weight: 900;
        }

        body.role-anchor .anchor-product-sheet-summary {
          display: grid;
          grid-template-columns: 1fr 1fr;
          gap: 8px;
          margin: 14px 0;
        }

        body.role-anchor .anchor-product-sheet-summary div {
          display: grid;
          gap: 4px;
          padding: 12px;
          border-radius: 14px;
          background: #f8fafc;
        }

        body.role-anchor .anchor-product-sheet-summary span {
          color: #94a3b8;
          font-size: 12px;
        }

        body.role-anchor .anchor-product-sheet-summary strong {
          color: #111827;
          font-size: 20px;
          font-weight: 900;
        }

        body.role-anchor .anchor-product-sheet section {
          display: grid;
          gap: 10px;
          margin-top: 16px;
        }

        body.role-anchor .anchor-product-sheet h4 {
          margin: 0;
          color: #111827;
          font-size: 15px;
          font-weight: 800;
        }

        body.role-anchor #anchor-rulesView .anchor-rule-list-wrap,
        body.role-anchor #anchor-feedbacksView .anchor-feedback-list-wrap,
        body.role-anchor #anchor-statsView .anchor-stats-list-wrap {
          overflow: visible;
          border: 0;
          background: transparent;
          box-shadow: none;
        }

        body.role-anchor #anchor-rulesView .profile-page,
        body.role-anchor #anchor-feedbacksView .profile-page,
        body.role-anchor #anchor-statsView .profile-page {
          display: grid;
          gap: 12px;
          padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
        }

        body.role-anchor #anchorRuleUnreadHint {
          margin: 2px 0 12px !important;
          padding: 10px 12px;
          border-radius: 12px;
          background: #e8f1ff;
          color: #2563eb !important;
          font-size: 13px;
        }

        body.role-anchor #anchorRuleUnreadHint:empty {
          display: none;
        }

        body.role-anchor .anchor-rule-card {
          padding: 0;
          border: 1px solid rgba(17, 24, 39, 0.08);
          border-radius: 16px;
          background: #fff;
          box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
          overflow: hidden;
        }

        body.role-anchor .anchor-rule-card + .anchor-rule-card {
          margin-top: 0;
        }

        body.role-anchor .anchor-rule-card-title {
          display: flex;
          align-items: center;
          justify-content: space-between;
          width: 100%;
          min-height: 58px;
          padding: 14px;
          color: #111827;
          font-size: 15px;
          font-weight: 700;
          line-height: 1.4;
          text-align: left;
          text-decoration: none;
        }

        body.role-anchor .anchor-rule-card-title > span:first-child {
          min-width: 0;
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
        }

        body.role-anchor .anchor-rule-card-meta {
          display: flex;
          align-items: center;
          justify-content: space-between;
          gap: 10px;
          padding: 0 14px 12px;
          color: #94a3b8;
          font-size: 12px;
          line-height: 1.3;
        }

        body.role-anchor .anchor-rule-card.unread .anchor-rule-card-meta span:last-child {
          color: #2563eb;
          font-weight: 700;
        }

        body.role-anchor .anchor-rule-card-arrow {
          flex: 0 0 auto;
          margin-left: 12px;
          color: #2563eb;
          font-size: 12px;
          font-weight: 700;
        }

        body.role-anchor .anchor-rule-card-content {
          margin: 0;
          padding: 0 14px 14px;
          color: #4b5563;
          font-size: 14px;
          line-height: 1.7;
          white-space: pre-wrap;
        }

        body.role-anchor .rule-attachments {
          padding: 0 14px 14px;
        }

        body.role-anchor .anchor-feedback-card-list,
        body.role-anchor .anchor-stats-record-list {
          display: grid;
          gap: 10px;
        }

        body.role-anchor .anchor-feedback-table,
        body.role-anchor .anchor-stats-table {
          display: none;
        }

        body.role-anchor .anchor-feedback-card,
        body.role-anchor .anchor-stats-record-card {
          border: 1px solid rgba(17, 24, 39, 0.08);
          border-radius: 16px;
          background: #fff;
          box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
          padding: 14px;
        }

        body.role-anchor .anchor-feedback-card-head {
          display: flex;
          align-items: center;
          justify-content: space-between;
          gap: 10px;
        }

        body.role-anchor .anchor-feedback-card-head strong,
        body.role-anchor .anchor-stats-record-date {
          color: #111827;
          font-size: 15px;
          font-weight: 800;
        }

        body.role-anchor .anchor-feedback-card-head span {
          padding: 4px 8px;
          border-radius: 999px;
          background: #fef2f2;
          color: #dc2626;
          font-size: 12px;
          font-weight: 700;
        }

        body.role-anchor .anchor-feedback-card-time {
          margin-top: 6px;
          color: #94a3b8;
          font-size: 12px;
        }

        body.role-anchor .anchor-feedback-card p,
        body.role-anchor .anchor-stats-record-card p {
          margin: 10px 0 0;
          color: #4b5563;
          font-size: 14px;
          line-height: 1.6;
        }

        body.role-anchor .anchor-feedback-card-result {
          margin-top: 10px;
          padding: 10px;
          border-radius: 12px;
          background: #f8fafc;
          color: #374151;
          font-size: 13px;
          line-height: 1.5;
        }

        body.role-anchor .anchor-feedback-card dl {
          display: grid;
          grid-template-columns: repeat(2, minmax(0, 1fr));
          gap: 8px;
          margin: 12px 0 0;
        }

        body.role-anchor .anchor-feedback-card dl div,
        body.role-anchor .anchor-stats-record-metrics div {
          display: grid;
          gap: 4px;
          padding: 10px;
          border-radius: 12px;
          background: #f8fafc;
        }

        body.role-anchor .anchor-feedback-card dt,
        body.role-anchor .anchor-stats-record-metrics span {
          color: #94a3b8;
          font-size: 12px;
        }

        body.role-anchor .anchor-feedback-card dd {
          margin: 0;
          color: #111827;
          font-size: 13px;
          font-weight: 700;
        }

        body.role-anchor #anchorStatsKpi {
          display: grid;
          grid-template-columns: repeat(2, minmax(0, 1fr));
          gap: 10px;
          margin-bottom: 12px;
        }

        body.role-anchor #anchorStatsKpi .company-kpi-card {
          min-height: 92px;
          padding: 14px;
          border-radius: 16px;
          box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
        }

        body.role-anchor #anchorStatsKpi .company-kpi-card strong {
          font-size: 20px;
          white-space: normal;
        }

        body.role-anchor .anchor-stats-record-metrics {
          display: grid;
          grid-template-columns: repeat(2, minmax(0, 1fr));
          gap: 8px;
          margin-top: 12px;
        }

        body.role-anchor .anchor-stats-record-metrics strong {
          color: #111827;
          font-size: 16px;
          font-weight: 800;
        }

        body.role-anchor .mobile-primary-nav {
          grid-template-columns: repeat(4, minmax(0, 1fr));
          min-height: calc(72px + env(safe-area-inset-bottom, 0px));
          padding: 7px 10px calc(8px + env(safe-area-inset-bottom, 0px));
          border-radius: 20px 20px 0 0;
        }

        body.role-anchor .mobile-nav-shell .nav-button {
          min-height: 54px;
          border-radius: 14px;
          font-size: 11px;
        }

        .profile-list-toolbar,
        .monthly-snapshot-toolbar,
        .employee-roster-filter-bar,
        .employee-roster-actions {
          align-items: stretch;
          gap: 8px;
        }

        .profile-list-toolbar .field,
        .profile-list-toolbar .btn,
        .employee-roster-actions .btn {
          width: 100%;
        }

        .employee-roster-entry-toolbar {
          justify-content: stretch;
        }

        .employee-roster-entry-actions {
          display: grid;
          grid-template-columns: repeat(2, minmax(0, 1fr));
          width: 100%;
        }

        .employee-roster-filter-bar,
        .employee-roster-secondary-filters {
          grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .employee-roster-more-filter-button {
          width: 100%;
        }

        .employee-roster-scope-summary {
          width: 100%;
          margin-left: 0;
        }

        .employee-import-sheet-bar {
          grid-template-columns: 1fr;
          align-items: stretch;
        }

        .profile-table-wrap,
        .asset-table,
        .battle-sheet-card,
        .anchor-import-table-wrap {
          max-width: 100%;
          overflow-x: auto;
          -webkit-overflow-scrolling: touch;
        }

        .profile-data-table,
        .asset-table table,
        .battle-edit-table,
        .recruit-edit-table,
        .workspace-anchor-fill-table {
          min-width: 720px;
        }

        .battle-tabs {
          display: flex;
          width: 100%;
          overflow-x: auto;
          border-radius: 10px;
        }

        .battle-tab {
          flex: 0 0 auto;
          padding: 8px 12px;
          font-size: 13px;
          white-space: nowrap;
        }

        .battle-toolbar {
          position: static;
          display: grid;
          grid-template-columns: 1fr 1fr;
          align-items: stretch;
          gap: 8px;
          padding-top: 0;
        }

        .battle-toolbar .field,
        .battle-toolbar .btn,
        .battle-toolbar-save {
          width: 100%;
          min-width: 0;
          margin-left: 0;
        }

        .battle-business-date-note {
          display: -webkit-box;
          -webkit-line-clamp: 2;
          -webkit-box-orient: vertical;
          overflow: hidden;
          margin-bottom: 8px;
        }

        .battle-sheet-stats {
          grid-template-columns: repeat(2, minmax(0, 1fr));
          gap: 8px;
        }

        .battle-sheet-stat {
          padding: 10px;
        }

        .battle-sheet-stat strong {
          font-size: 18px;
        }

        .battle-sheet-wrap {
          max-height: none;
          min-height: 0;
          overflow: visible;
          border: 0;
          background: transparent;
        }

        .battle-sheet-wrap .battle-edit-table,
        .battle-sheet-wrap .battle-edit-table tbody,
        .battle-sheet-wrap .battle-edit-table tr,
        .battle-sheet-wrap .battle-edit-table td {
          display: block;
          width: 100%;
          min-width: 0;
        }

        .battle-sheet-wrap .battle-edit-table {
          border-spacing: 0;
          table-layout: auto;
        }

        .battle-sheet-wrap .battle-edit-table colgroup,
        .battle-sheet-wrap .battle-edit-table thead {
          display: none;
        }

        .battle-sheet-wrap .battle-edit-table tr {
          margin-bottom: 12px;
          padding: 12px;
          border: 1px solid var(--color-border);
          border-radius: 10px;
          background: #fff;
          box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
        }

        .battle-sheet-wrap .battle-edit-table td {
          display: grid;
          grid-template-columns: minmax(92px, 34%) minmax(0, 1fr);
          align-items: center;
          gap: 10px;
          height: auto;
          min-height: 42px;
          padding: 8px 0;
          border-bottom: 1px solid #eef0f3;
          text-align: left !important;
          white-space: normal;
        }

        .battle-sheet-wrap .battle-edit-table td:last-child {
          border-bottom: 0;
        }

        .battle-sheet-wrap .battle-edit-table td::before {
          content: attr(data-label);
          color: var(--color-text-secondary);
          font-size: 12px;
          font-weight: 600;
          line-height: 1.4;
        }

        .battle-sheet-wrap .battle-edit-table td[data-battle-cell="anchor"] {
          grid-template-rows: auto auto;
          align-items: stretch;
        }

        .battle-sheet-wrap .battle-edit-table td[data-battle-cell="anchor"]::before {
          grid-column: 1;
          grid-row: 1;
        }

        .battle-sheet-wrap .battle-edit-table td[data-battle-cell="anchor"] > .battle-anchor-entry {
          grid-column: 2;
          grid-row: 1 / span 2;
          align-self: center;
        }

        .battle-sheet-wrap .battle-edit-table td[data-battle-cell="anchor"] > .battle-manager-fill-status {
          grid-column: 1;
          grid-row: 2;
          align-self: start;
          min-width: 0;
        }

        .battle-manager-fill-status .battle-fill-status {
          align-items: flex-start;
          flex-direction: column;
          gap: 2px;
          margin-top: 2px;
        }

        .battle-manager-fill-status .battle-status-pill {
          min-width: 42px;
          padding: 2px 6px;
        }

        .battle-manager-fill-status .battle-fill-saved-at {
          line-height: 1.1;
        }

        .battle-sheet-wrap .battle-edit-table td[data-num],
        .battle-sheet-wrap .battle-edit-table td[data-num] input {
          text-align: left;
        }

        .battle-sheet-wrap .battle-edit-table input,
        .battle-sheet-wrap .battle-edit-table select,
        .battle-sheet-wrap .battle-edit-table td[data-num] input,
        .battle-status-select {
          width: 100%;
          min-width: 0;
          max-width: none;
          margin: 0;
        }

        .battle-readonly-cell {
          min-width: 0;
        }

        .battle-platform-cell {
          min-width: 0;
        }

        .battle-platform-summary {
          grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
        }

        .battle-platform-summary .record-action-btn {
          width: auto;
          min-height: 30px;
        }

        .battle-platform-editor-head,
        .battle-platform-metric-row {
          grid-template-columns: minmax(62px, 0.8fr) minmax(0, 1fr) minmax(0, 1fr) 28px;
        }

        .battle-platform-editor-actions {
          align-items: stretch;
          flex-direction: column;
        }

        .battle-stage-help,
        .battle-stage-help.compact {
          white-space: normal;
        }

        .battle-summary-line {
          position: sticky;
          bottom: calc(74px + env(safe-area-inset-bottom, 0px));
          align-items: stretch;
          flex-direction: column;
          padding: 10px;
          border-top: 1px solid var(--color-border);
          border-radius: 10px;
        }

        .battle-summary-line .btn-primary {
          width: 100%;
        }

        .analysis-filterbar {
          display: grid;
          grid-template-columns: 1fr 1fr;
          align-items: end;
          gap: 8px;
        }

        .analysis-filterbar .field,
        .analysis-filterbar .btn {
          width: 100%;
          min-width: 0;
        }

        .analysis-kpi-grid {
          grid-template-columns: 1fr;
        }

        .analysis-kpi-card {
          min-height: 84px;
          padding: 14px;
        }

        .analysis-kpi-card strong {
          font-size: 22px;
          white-space: normal;
        }

        .analysis-card-header {
          align-items: flex-start;
          flex-direction: column;
          gap: 4px;
        }

        .analysis-card-body {
          padding: 12px;
        }

        .analysis-trend-row {
          grid-template-columns: 58px minmax(0, 1fr);
          gap: 8px;
        }

        .analysis-trend-value {
          grid-column: 1 / -1;
          text-align: left;
        }

        .analysis-rank-item,
        .analysis-risk-item {
          grid-template-columns: 28px minmax(0, 1fr);
          gap: 10px;
        }

        .analysis-rank-value,
        .analysis-risk-value,
        .analysis-rank-actions,
        .analysis-risk-meta {
          grid-column: 2;
          justify-content: flex-start;
          min-width: 0;
          text-align: left;
          white-space: normal;
        }

        dialog {
          width: min(100vw - 20px, 760px);
          max-width: calc(100vw - 20px);
          max-height: calc(100dvh - 24px);
        }

        .dialog-body {
          padding: 14px;
        }

        .dialog-footer {
          gap: 8px;
          padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
        }

        .dialog-footer .btn {
          min-width: 0;
          flex: 1 1 0;
        }

        input,
        select,
        textarea,
        button {
          font-size: 16px;
        }

        .topbar {
          display: grid;
          grid-template-columns: minmax(0, 1fr);
          align-items: start;
        }

        .global-search {
          width: 100%;
          max-width: none;
        }

        .control-tabs,
        #agentDrawerOverlay .drawer-tabs {
          display: flex;
          flex-wrap: nowrap;
          gap: 8px;
          overflow-x: auto;
          padding-bottom: 6px;
          scrollbar-width: none;
          -webkit-overflow-scrolling: touch;
        }

        .control-tabs::-webkit-scrollbar,
        #agentDrawerOverlay .drawer-tabs::-webkit-scrollbar {
          display: none;
        }

        .control-tab,
        #agentDrawerOverlay .drawer-tab {
          flex: 0 0 auto;
          min-height: 40px;
          padding: 8px 14px;
          white-space: nowrap;
        }

        .control-three-grid {
          grid-template-columns: minmax(0, 1fr);
        }

        .control-knowledge-head {
          display: grid;
          grid-template-columns: minmax(0, 1fr);
        }

        .control-knowledge-head .btn {
          width: 100%;
        }

        .control-knowledge-item summary {
          grid-template-columns: minmax(0, 1fr);
        }

        .control-knowledge-status {
          justify-self: start;
        }

        .profile-list-toolbar,
        .monthly-snapshot-toolbar,
        .employee-roster-filter-bar,
        .battle-toolbar {
          display: grid;
          grid-template-columns: repeat(2, minmax(0, 1fr));
          align-items: stretch;
        }

        .profile-list-toolbar .field,
        .profile-list-toolbar .btn,
        .monthly-snapshot-toolbar .field,
        .monthly-snapshot-toolbar .btn,
        .battle-toolbar .field,
        .battle-toolbar .btn {
          min-width: 0;
          min-height: 42px;
        }

        .designer-toolbar .designer-keyword-field,
        .designer-toolbar .designer-primary-action {
          grid-column: 1 / -1;
          min-width: 0;
          width: 100%;
        }

        .profile-table-wrap,
        .asset-table,
        .designer-board-wrap,
        .anchor-import-table-wrap,
        .product-import-preview {
          overscroll-behavior-x: contain;
          scroll-padding-inline: 12px;
        }

        .profile-table-wrap table,
        .asset-table table,
        .designer-board-table {
          touch-action: pan-x pan-y;
        }

        .designer-summary-grid {
          gap: 8px;
          margin: 8px 0 10px;
        }

        .designer-summary-grid .company-kpi-card {
          min-height: 68px;
          padding: 10px 12px;
        }

        .designer-summary-grid .company-kpi-card span {
          font-size: 12px;
        }

        .designer-summary-grid .company-kpi-card strong {
          font-size: 20px;
        }

        .designer-board-section {
          border-radius: 8px;
        }

        .designer-board-title {
          min-height: 42px;
          flex-direction: column;
          align-items: center;
          gap: 2px;
          padding: 8px 12px;
        }

        .designer-board-title strong {
          font-size: 20px;
        }

        .designer-board-title span {
          font-size: 12px;
        }

        .designer-board-title-with-action {
          padding-right: 12px;
        }

        .designer-board-title-with-action .btn {
          position: static;
          width: 100%;
          margin-top: 6px;
          transform: none;
        }

        .designer-board-table {
          min-width: 760px;
          font-size: 13px;
        }

        .designer-board-table th,
        .designer-board-table td {
          padding: 9px 7px;
        }

        .designer-board-table thead th,
        .designer-board-table tfoot th,
        .designer-board-table tfoot td {
          font-size: 14px;
        }

        .designer-board-owner,
        .designer-board-anchor {
          font-size: 14px;
        }

        .mobile-action-panel {
          max-height: min(66vh, 560px);
        }

        .mobile-nav-shell .nav-button {
          min-height: 56px;
        }

        .dialog-footer,
        .profile-drawer-footer {
          position: sticky;
          bottom: 0;
          z-index: 4;
        }
      }

      /* Broker workspace: final role-specific layout override. */
      #workspaceView.workspace-role-broker {
        gap: 14px;
      }

      #workspaceView.workspace-role-broker .workspace-hero {
        grid-template-columns: minmax(220px, auto) minmax(520px, 1fr);
        min-height: 76px;
        padding: 14px 18px;
        align-items: center;
      }

      #workspaceView.workspace-role-broker .workspace-hero h2 {
        font-size: 18px;
      }

      #workspaceView.workspace-role-broker .workspace-hero p {
        margin-top: 3px;
        max-width: 520px;
        font-size: 12px;
        line-height: 1.4;
      }

      #workspaceView.workspace-role-broker .workspace-hero-meta {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        justify-self: stretch;
      }

      #workspaceView.workspace-role-broker .workspace-hero-chip {
        min-height: 48px;
        display: grid;
        align-content: center;
        padding: 7px 10px;
      }

      #workspaceView.workspace-role-broker .workspace-quick-strip,
      #workspaceView.workspace-role-broker .workspace-secondary-grid {
        display: none !important;
      }

      #workspaceView.workspace-role-broker .workspace-layout {
        grid-template-columns: minmax(720px, 2fr) minmax(340px, 0.95fr);
        align-items: stretch;
      }

      #workspaceView.workspace-role-broker .workspace-left > .workspace-card,
      #workspaceView.workspace-role-broker .workspace-right > .workspace-card {
        flex: 1 1 auto;
      }

      #workspaceView.workspace-role-broker .workspace-anchor-fill-card .panel-header,
      #workspaceView.workspace-role-broker #workspaceRiskCard .panel-header {
        min-height: 54px;
        align-items: center;
      }

      #workspaceView.workspace-role-broker .workspace-anchor-fill-card .panel-body,
      #workspaceView.workspace-role-broker #workspaceRiskCard .panel-body {
        padding: 14px 16px 16px;
      }

      #workspaceView.workspace-role-broker .workspace-anchor-fill-tools {
        margin-bottom: 10px;
      }

      #workspaceView.workspace-role-broker .workspace-anchor-fill-card .profile-table-wrap {
        max-height: 420px;
        border: 1px solid #edf0f5;
        border-radius: 8px;
      }

      #workspaceView.workspace-role-broker .workspace-anchor-fill-table th,
      #workspaceView.workspace-role-broker .workspace-anchor-fill-table td {
        height: 48px;
        padding: 9px 10px;
      }

      #workspaceView.workspace-role-broker .workspace-anchor-fill-table input {
        max-width: 320px;
        margin: 0 auto;
      }

      #workspaceView.workspace-role-broker .workspace-risk-list {
        gap: 10px;
      }

      #workspaceView.workspace-role-broker .workspace-risk-item {
        min-height: 64px;
      }

      @media (max-width: 1180px) {
        .designer-summary-grid {
          grid-template-columns: repeat(3, minmax(0, 1fr));
        }
      }

      @media (max-width: 1180px) {
        #workspaceView.workspace-role-broker .workspace-hero,
        #workspaceView.workspace-role-broker .workspace-layout {
          grid-template-columns: 1fr;
        }

        #workspaceView.workspace-role-broker .workspace-hero-meta {
          grid-template-columns: repeat(2, minmax(0, 1fr));
        }
      }

      @media (max-width: 768px) {
        .designer-toolbar {
          align-items: stretch;
        }

        .designer-primary-action {
          margin-left: 0;
        }

        .designer-summary-grid {
          grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        #workspaceView.workspace-role-broker .workspace-hero-meta {
          grid-template-columns: 1fr;
        }
      }

      .mobile-sticky-actions {
        position: sticky;
        bottom: 0;
        z-index: 16;
        background: var(--color-bg-container);
      }

      @media (max-width: 768px) {
        .battle-toolbar .battle-sticky-save {
          display: none;
        }

        .battle-summary-line.mobile-sticky-actions {
          left: 0;
          right: 0;
          width: auto;
          max-width: none;
          display: grid;
          grid-template-columns: 1fr;
          gap: 8px;
          margin: 0 -14px;
          padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
          border-top: 1px solid var(--color-border);
          box-shadow: 0 -10px 24px rgba(15, 23, 42, 0.08);
        }

        .battle-summary-line.mobile-sticky-actions .battle-sticky-save,
        #confirmEmployeeImportButton,
        #confirmUserImportButton,
        #confirmProductImportButton,
        #confirmAnchorImportButton {
          width: 100%;
          min-height: 42px;
        }
      }

      /* Keep action and save controls reachable on narrow desktop windows. */
      .profile-table-wrap,
      .asset-table,
      .designer-board-wrap,
      .control-room-table-scroll {
        width: 100%;
        max-width: 100%;
        position: relative;
        overflow: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
      }

      .profile-table-wrap,
      .asset-table,
      .designer-board-wrap {
        max-height: none;
      }

      /* Generic list pages should not reserve a viewport-sized blank area.
         Keep horizontal scrolling and sticky edge columns, but let the page
         height follow the actual row count. Dense editors define their own
         scroll height separately. */
      .profile-page {
        align-content: start;
      }

      .profile-page > .profile-table-wrap,
      #anchorTableHost,
      #agentTableHost,
      #assetTableHost,
      #snapshotTableHost,
      #recruitCandidateHost,
      #recruitMetaphysicsHost,
      #userView .profile-table-wrap,
      #goods-productsView .profile-table-wrap,
      #errorLogTableHost,
      #operationLogTableHost,
      #trashTableHost {
        align-self: start;
        justify-self: stretch;
        height: auto;
        min-height: 0;
        max-height: clamp(240px, calc(100vh - 320px), 760px);
        overflow-x: auto;
        overflow-y: auto;
        overscroll-behavior: auto;
      }

      .goods-pagination {
        position: sticky;
        left: 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        width: min(100%, 100vw);
        min-width: min(560px, 100%);
        padding: 12px 14px;
        border-top: 1px solid var(--color-border, #e2e8f0);
        background: #fff;
        color: var(--color-text-muted, #64748b);
      }

      .goods-pagination > div {
        display: flex;
        align-items: center;
        gap: 10px;
      }

      .goods-pagination strong {
        min-width: 64px;
        text-align: center;
        color: var(--color-text, #0f172a);
      }

      @media (max-width: 720px) {
        .goods-pagination {
          min-width: 0;
          padding: 10px;
          font-size: 12px;
        }

        .goods-pagination > div {
          gap: 6px;
        }
      }

      /* The employee roster follows page scrolling vertically and only owns
         horizontal overflow. This prevents the wide table from trapping the wheel. */
      #employeeView .profile-table-wrap {
        position: relative;
        isolation: isolate;
        height: auto;
        min-height: 0;
        max-height: none;
        overflow-x: auto;
        overflow-y: hidden;
        overscroll-behavior-x: contain;
        overscroll-behavior-y: auto;
      }

      .profile-table-wrap .empty-state:only-child,
      .asset-table .empty-state:only-child {
        min-height: clamp(120px, 20vh, 220px);
        padding: 28px 16px;
      }

      .profile-table-wrap .profile-data-table,
      .asset-table table,
      .designer-board-table {
        margin: 0;
      }

      .error-log-diagnostics {
        display: grid;
        gap: 12px;
        margin: 0 0 14px;
      }

      .error-log-summary-grid {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 12px;
      }

      .error-log-summary-card,
      .error-log-cluster-panel {
        border: 1px solid var(--border-color);
        border-radius: 10px;
        background: #fff;
        box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
      }

      .error-log-summary-card {
        display: grid;
        gap: 6px;
        min-width: 0;
        padding: 12px 14px;
      }

      .error-log-summary-card span,
      .error-log-summary-card small,
      .error-log-cluster-meta {
        color: var(--muted-color);
        font-size: 12px;
      }

      .error-log-summary-card strong {
        overflow: hidden;
        color: var(--text-color);
        font-size: 20px;
        line-height: 1.2;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .error-log-summary-card small {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .error-log-cluster-panel {
        overflow: hidden;
      }

      .error-log-cluster-title {
        padding: 12px 14px;
        border-bottom: 1px solid var(--border-color);
        color: var(--text-color);
        font-weight: 700;
      }

      .error-log-cluster {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 14px;
        align-items: center;
        padding: 12px 14px;
        border-bottom: 1px solid rgba(226, 232, 240, 0.72);
      }

      .error-log-cluster:last-child {
        border-bottom: 0;
      }

      .error-log-cluster p {
        margin: 5px 0 0;
        color: var(--color-danger);
        line-height: 1.5;
      }

      .error-log-cluster-meta {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 8px;
        max-width: 420px;
      }

      .error-log-cluster-meta span {
        border-radius: 999px;
        background: #f8fafc;
        padding: 3px 8px;
      }

      @media (max-width: 1180px) {
        .error-log-summary-grid {
          grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .error-log-cluster {
          grid-template-columns: 1fr;
        }

        .error-log-cluster-meta {
          justify-content: flex-start;
          max-width: none;
        }
      }

      .profile-table-wrap .profile-data-table th:first-child,
      .profile-table-wrap .profile-data-table td:first-child,
      .asset-table table th:first-child,
      .asset-table table td:first-child,
      .designer-board-table th:first-child,
      .designer-board-table td:first-child {
        position: sticky;
        left: 0;
        z-index: 7;
        background: #fff;
        box-shadow: 10px 0 18px rgba(15, 23, 42, 0.05);
      }

      .profile-table-wrap .profile-data-table th:first-child,
      .asset-table table th:first-child,
      .designer-board-table th:first-child {
        z-index: 15;
        background: #f7f9fc;
      }

      .employee-roster-table .employee-sticky-col {
        z-index: 16;
      }

      .employee-roster-table th.employee-sticky-col {
        z-index: 20;
      }

      .profile-table-wrap .profile-data-table tbody tr:nth-child(even) td:first-child,
      .asset-table table tbody tr:nth-child(even) td:first-child,
      .designer-board-table tbody tr:nth-child(even) td:first-child {
        background: #fff;
      }

      .profile-table-wrap .profile-data-table tbody tr:hover td:first-child,
      .asset-table table tbody tr:hover td:first-child,
      .designer-board-table tbody tr:hover td:first-child {
        background: #f8fbff;
      }

      .profile-table-wrap .profile-data-table th:last-child,
      .profile-table-wrap .profile-data-table td:last-child,
      .asset-table table th:last-child,
      .asset-table table td:last-child,
      .designer-board-table th:last-child,
      .designer-board-table td:last-child,
      .workspace-anchor-fill-table th:last-child,
      .workspace-anchor-fill-table td:last-child {
        position: sticky;
        right: 0;
        z-index: 8;
        min-width: 118px;
        background: #fff;
        box-shadow: -10px 0 18px rgba(15, 23, 42, 0.08);
        text-align: center;
        white-space: nowrap;
      }

      .profile-table-wrap .profile-data-table th:last-child,
      .asset-table table th:last-child,
      .designer-board-table th:last-child,
      .workspace-anchor-fill-table th:last-child {
        z-index: 14;
        background: #f7f9fc;
      }

      .profile-table-wrap .profile-data-table tbody tr:nth-child(even) td:last-child,
      .asset-table table tbody tr:nth-child(even) td:last-child,
      .designer-board-table tbody tr:nth-child(even) td:last-child,
      .workspace-anchor-fill-table tbody tr:nth-child(even) td:last-child {
        background: #fff;
      }

      .profile-table-wrap .profile-data-table tbody tr:hover td:last-child,
      .asset-table table tbody tr:hover td:last-child,
      .designer-board-table tbody tr:hover td:last-child,
      .workspace-anchor-fill-table tbody tr:hover td:last-child,
      .profile-table-wrap .profile-data-table tbody tr.battle-focus-row td:last-child,
      .profile-table-wrap .profile-data-table tbody tr.battle-row-filled td:last-child {
        background: #f8fbff;
      }

      .table-actions,
      .record-actions,
      .user-table-actions {
        justify-content: center;
        flex-wrap: nowrap;
        white-space: nowrap;
      }

      .profile-data-table th,
      .asset-table table th {
        line-height: 1.3;
        white-space: normal;
      }

      .profile-data-table th > *,
      .asset-table table th > * {
        min-width: 0;
      }

      .profile-data-table .table-select-column,
      .asset-table table .table-select-column {
        position: sticky;
        left: 0;
        z-index: 9;
        width: 64px;
        min-width: 64px;
        max-width: 64px;
        text-align: center;
        background: #fff;
        box-shadow: 10px 0 18px rgba(15, 23, 42, 0.05);
      }

      .profile-data-table th.table-select-column,
      .asset-table table th.table-select-column {
        z-index: 18;
        background: #f7f9fc;
      }

      .profile-data-table .table-action-column,
      .asset-table table .table-action-column {
        position: sticky;
        right: 0;
        z-index: 10;
        width: 136px;
        min-width: 136px;
        max-width: 176px;
        text-align: center;
        white-space: nowrap;
        background: #fff;
        box-shadow: -10px 0 18px rgba(15, 23, 42, 0.08);
      }

      .profile-data-table th.table-action-column,
      .asset-table table th.table-action-column {
        z-index: 19;
        background: #f7f9fc;
      }

      .profile-data-table tbody tr:nth-child(even) .table-select-column,
      .profile-data-table tbody tr:nth-child(even) .table-action-column,
      .asset-table table tbody tr:nth-child(even) .table-select-column,
      .asset-table table tbody tr:nth-child(even) .table-action-column {
        background: #fff;
      }

      .profile-data-table tbody tr:hover .table-select-column,
      .profile-data-table tbody tr:hover .table-action-column,
      .asset-table table tbody tr:hover .table-select-column,
      .asset-table table tbody tr:hover .table-action-column {
        background: #f8fbff;
      }

      .profile-data-table .table-action-column .table-actions,
      .asset-table table .table-action-column .table-actions,
      .profile-data-table .table-action-column .record-actions,
      .asset-table table .table-action-column .record-actions {
        display: inline-flex;
        justify-content: center;
        gap: 6px;
      }

      .battle-summary-line.mobile-sticky-actions,
      .recruit-save-bar,
      .recruit-metaphysics-actionbar,
      .control-room-actions,
      .company-form-actions {
        position: sticky;
        bottom: 0;
        z-index: 24;
        margin-top: 10px;
        padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
        border: 1px solid rgba(17, 24, 39, 0.08);
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.96);
        box-shadow: 0 -10px 24px rgba(15, 23, 42, 0.08);
        backdrop-filter: blur(12px);
      }

      .battle-summary-line.mobile-sticky-actions,
      .recruit-save-bar,
      .control-room-actions {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        flex-wrap: wrap;
      }

      .battle-summary-line.mobile-sticky-actions .btn,
      .recruit-save-bar .btn,
      .control-room-actions .btn,
      .company-form-actions .btn {
        flex: 0 0 auto;
      }

      .dialog-footer,
      .profile-drawer-footer {
        position: sticky;
        bottom: 0;
        z-index: 30;
        background: rgba(255, 255, 255, 0.97);
        box-shadow: 0 -10px 24px rgba(15, 23, 42, 0.08);
        backdrop-filter: blur(12px);
      }

      .profile-drawer,
      .agent-drawer,
      dialog {
        overflow: auto;
        overscroll-behavior: contain;
      }

      @media (max-width: 1180px) {
        .battle-toolbar,
        .recruit-toolbar,
        .control-room-actions,
        .company-form-actions,
        .battle-summary-line.mobile-sticky-actions,
        .recruit-save-bar {
          align-items: stretch;
        }

        .battle-summary-line.mobile-sticky-actions .btn,
        .recruit-save-bar .btn,
        .control-room-actions .btn,
        .company-form-actions .btn {
          min-width: 132px;
        }
      }

      @media (max-width: 768px) {
        .profile-table-wrap,
        .asset-table,
        .designer-board-wrap {
          max-height: none;
        }

        .profile-data-table[data-responsive-card-table] th:first-child,
        .profile-data-table[data-responsive-card-table] td:first-child,
        .profile-data-table[data-responsive-card-table] .table-select-column,
        .profile-table-wrap table[data-responsive-card-table] th:first-child,
        .profile-table-wrap table[data-responsive-card-table] td:first-child,
        .profile-table-wrap table[data-responsive-card-table] .table-select-column,
        .asset-table table[data-responsive-card-table] th:first-child,
        .asset-table table[data-responsive-card-table] td:first-child,
        .asset-table table[data-responsive-card-table] .table-select-column {
          position: static;
          left: auto;
          box-shadow: none;
          white-space: normal;
          width: auto;
          min-width: 0;
          max-width: none;
        }

        .profile-data-table[data-responsive-card-table] th:last-child,
        .profile-data-table[data-responsive-card-table] td:last-child,
        .profile-data-table[data-responsive-card-table] .table-action-column,
        .profile-table-wrap table[data-responsive-card-table] th:last-child,
        .profile-table-wrap table[data-responsive-card-table] td:last-child,
        .profile-table-wrap table[data-responsive-card-table] .table-action-column,
        .asset-table table[data-responsive-card-table] th:last-child,
        .asset-table table[data-responsive-card-table] td:last-child,
        .asset-table table[data-responsive-card-table] .table-action-column {
          position: static;
          right: auto;
          min-width: 0;
          width: auto;
          max-width: none;
          box-shadow: none;
          white-space: normal;
        }

        .battle-summary-line.mobile-sticky-actions,
        .recruit-save-bar,
        .recruit-metaphysics-actionbar,
        .control-room-actions,
        .company-form-actions,
        .dialog-footer,
        .profile-drawer-footer {
          left: 0;
          right: 0;
          border-radius: 10px 10px 0 0;
        }

        .battle-summary-line.mobile-sticky-actions .btn,
        .recruit-save-bar .btn,
        .recruit-metaphysics-actionbar .btn,
        .control-room-actions .btn,
        .company-form-actions .btn,
        .dialog-footer .btn,
        .profile-drawer-footer .btn {
          width: 100%;
          min-height: 42px;
        }

        .ai-search-shell {
          padding: 32px 0 96px;
        }

        .ai-search-hero {
          padding: 0;
          text-align: center;
        }

        .ai-search-hero h2 {
          font-size: 34px;
        }

        .ai-search-brand p {
          margin: 12px auto 22px;
          font-size: 14px;
        }

        .ai-search-querybar {
          grid-template-columns: minmax(0, 1fr);
          padding: 10px;
          border-radius: 18px;
        }

        .ai-search-form input {
          height: 46px;
          padding: 0 8px;
          font-size: 15px;
        }

        .ai-search-querybar .btn {
          width: 100%;
          border-radius: 12px;
        }

        .ai-search-hero-actions {
          margin-top: 14px;
        }

        .ai-search-faq {
          margin-top: 20px;
          padding: 18px;
          border-radius: 14px;
        }

        .ai-search-faq-head {
          display: block;
        }

        .ai-search-faq-head p {
          margin-top: 8px;
          text-align: left;
        }

        .ai-search-faq-tabs {
          grid-template-columns: repeat(2, minmax(0, 1fr));
        }

        .ai-search-faq-questions {
          grid-template-columns: 1fr;
        }

        .ai-search-faq-question {
          min-height: 0;
        }

        .ai-search-scope {
          align-items: flex-start;
          flex-direction: column;
          gap: 6px;
        }

        .ai-search-alert-list {
          grid-template-columns: 1fr;
        }

        .ai-search-intents,
        .ai-search-rules,
        .ai-search-stats,
        .ai-search-guidance-grid,
        .ai-search-fact-grid {
          grid-template-columns: 1fr;
        }

        .ai-search-fact-group,
        .ai-search-fact-group:nth-child(2n) {
          border-right: 0;
          border-top: 1px solid rgba(226, 232, 240, .78);
        }

        .ai-search-fact-group:first-child {
          border-top: 0;
        }

        .ai-search-stats > div {
          border-right: 0;
          border-bottom: 1px solid var(--border-color);
        }

        .ai-search-stats > div:last-child {
          border-bottom: 0;
        }

        .ai-search-rules > div {
          border-right: 0;
          border-bottom: 1px solid var(--border-color);
        }

        .ai-search-rules > div:last-child {
          border-bottom: 0;
        }
      }
      #personalWorkLabel,
      #personalWorkLabelGroup,
      .nav-button[data-view="workspace"] {
        display: none !important;
      }
.supply-placeholder {
  display: grid;
  gap: 16px;
}

/* Computer asset ledger */
.asset-computer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface, #fff);
}

.asset-computer-toolbar[hidden] {
  display: none !important;
}

.asset-computer-toolbar-summary,
.computer-snapshot-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  color: var(--muted);
  font-size: 13px;
}

.asset-computer-toolbar-summary strong,
.computer-snapshot-summary strong {
  color: var(--text);
  font-size: 15px;
}

.asset-computer-toolbar-actions,
.asset-computer-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  white-space: nowrap;
}

.asset-computer-table {
  min-width: 1420px;
}

.asset-computer-primary strong,
.asset-computer-primary span {
  display: block;
}

.asset-computer-primary span,
.table-subline {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.asset-computer-config,
.asset-computer-network {
  display: block;
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-computer-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 9px;
  border-radius: 999px;
  background: #e8f5ed;
  color: #237a45;
  font-size: 12px;
  font-weight: 600;
}

.asset-computer-status.warning { background: #fff3d6; color: #986400; }
.asset-computer-status.danger { background: #fde8e8; color: #b42318; }
.asset-computer-status.muted { background: #eef1f5; color: #5c6675; }

#assetDialog:has(#assetNumberInput) {
  width: min(1040px, calc(100vw - 32px));
  max-width: 1040px;
}

#assetDialog[open] {
  display: flex;
  flex-direction: column;
}

#assetDialog > .dialog-body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

#assetDialog > .dialog-footer {
  position: static;
}

.asset-form-section + .asset-form-section {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.asset-form-section-title {
  margin-bottom: 12px;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.asset-form-section .profile-card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.asset-form-section .field-span-2 { grid-column: span 2; }
.asset-form-section .field-span-full { grid-column: 1 / -1; }
.form-required { color: var(--danger); }

.computer-asset-review-dialog .computer-asset-review-card {
  width: min(1180px, calc(100vw - 32px));
  max-width: 1180px;
}

.computer-snapshot-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 16px;
  min-height: 440px;
}

.computer-snapshot-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 12px;
  border-right: 1px solid var(--border);
}

.computer-snapshot-item {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.computer-snapshot-item span { color: var(--muted); font-size: 12px; }
.computer-snapshot-item:hover,
.computer-snapshot-item:focus-visible,
.computer-snapshot-item.active { border-color: var(--primary); background: #f2f7ff; outline: none; }
.computer-snapshot-detail { min-width: 0; }
.computer-snapshot-summary { margin-bottom: 12px; }
.computer-snapshot-summary .btn { margin-left: auto; }

@media (max-width: 900px) {
  .asset-computer-toolbar { align-items: stretch; flex-direction: column; }
  .asset-computer-toolbar-actions { justify-content: flex-start; flex-wrap: wrap; }
  .asset-form-section .profile-card-grid { grid-template-columns: 1fr 1fr; }
  .computer-snapshot-layout { grid-template-columns: 1fr; }
  .computer-snapshot-list { max-height: 180px; padding-right: 0; padding-bottom: 12px; border-right: 0; border-bottom: 1px solid var(--border); overflow: auto; }
}

@media (max-width: 620px) {
  .asset-form-section .profile-card-grid { grid-template-columns: 1fr; }
  .asset-form-section .field-span-2 { grid-column: auto; }
}

.management-threshold-section { display: grid; gap: 12px; margin-top: 20px; }
.management-threshold-section .ui-section-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.management-threshold-section .ui-section-header h3, .management-threshold-section .ui-section-header p { margin: 0; }
.management-threshold-section .ui-section-header p { margin-top: 4px; color: var(--muted); font-size: 13px; }
.management-threshold-defaults { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--text-2); font-size: 13px; }
.management-threshold-table { min-width: 1120px; }
.management-threshold-table td > strong, .management-threshold-table td > small { display: block; }
.management-threshold-table td > small { margin-top: 4px; color: var(--muted); }
.management-threshold-dialog { width: min(860px, calc(100vw - 32px)); }
.management-threshold-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.management-threshold-form-grid .wide { grid-column: 1 / -1; }
@media (max-width: 720px) { .management-threshold-section .ui-section-header { align-items: stretch; flex-direction: column; } .management-threshold-form-grid { grid-template-columns: 1fr; } .management-threshold-form-grid .wide { grid-column: auto; } }

/* Weekly management review inside the data cockpit. */
#analysisWeeklyPanel {
  display: grid;
  gap: 16px;
}

#analysisWeeklyPanel[hidden] {
  display: none;
}

.weekly-review-toolbar {
  align-items: end;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--surface);
  padding: 14px 16px;
}

.weekly-review-toolbar .field {
  min-width: 190px;
}

.weekly-review-toolbar-note {
  margin-left: auto;
  color: var(--color-text-secondary);
  font-size: 12px;
  line-height: 1.5;
}

.weekly-review {
  display: grid;
  gap: 16px;
}

.weekly-review-hero,
.weekly-review-section,
.weekly-review-kpi {
  border: 1px solid var(--color-border);
  background: var(--surface);
}

.weekly-review-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 112px;
  padding: 20px 24px;
  border-radius: 16px;
  background: linear-gradient(135deg, #ffffff 0%, #f2f7ff 100%);
}

.weekly-review-hero > div:first-child > span {
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.weekly-review-hero h3,
.weekly-review-section-head h3 {
  margin: 0;
  color: var(--text);
}

.weekly-review-hero h3 {
  margin-top: 6px;
  font-size: 22px;
}

.weekly-review-hero p,
.weekly-review-section-head p {
  margin: 5px 0 0;
  color: var(--color-text-secondary);
  font-size: 12px;
  line-height: 1.6;
}

.weekly-review-hero > div:last-child {
  display: grid;
  min-width: 120px;
  text-align: center;
}

.weekly-review-hero > div:last-child strong {
  color: var(--color-danger);
  font-size: 30px;
  line-height: 1;
}

.weekly-review-hero > div:last-child span {
  margin-top: 7px;
  color: var(--color-text-secondary);
  font-size: 12px;
}

.weekly-review-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  padding: 0 16px 16px;
}

.weekly-review-kpis-compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.weekly-review-status-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 0 16px 16px;
}

.weekly-review-metric-group {
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: var(--surface);
}

.weekly-review-metric-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 12px 16px;
}

.weekly-review-metric-group-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 15px;
}

.weekly-review-metric-group-head span {
  color: var(--color-text-secondary);
  font-size: 12px;
  text-align: right;
}

.weekly-review-status-card {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 98px;
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--surface);
  color: inherit;
  font: inherit;
  text-align: center;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.weekly-review-status-card span,
.weekly-review-status-card small {
  color: var(--color-text-secondary);
  font-size: 12px;
  line-height: 1.5;
}

.weekly-review-status-card strong {
  overflow: hidden;
  margin: 6px 0 4px;
  color: var(--text);
  font-size: 22px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weekly-review-status-card em,
.weekly-review-kpi em {
  margin-top: 7px;
  color: var(--color-primary);
  font-size: 11px;
  font-style: normal;
}

.weekly-review-status-card:hover,
.weekly-review-kpi:hover {
  border-color: #8db7ff;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.1);
  transform: translateY(-1px);
}

.weekly-review-status-card:focus-visible,
.weekly-review-kpi:focus-visible,
.weekly-review-table-link:focus-visible,
.weekly-review-company-scope:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.22);
  outline-offset: 2px;
}

.weekly-review-status-card.primary {
  border-color: #b9d3ff;
  background: #f4f8ff;
}

.weekly-review-status-card.primary strong {
  color: var(--color-primary);
}

.weekly-review-status-card.warning {
  border-color: #f4d7a4;
  background: #fffaf0;
}

.weekly-review-status-card.warning strong {
  color: var(--color-warning);
}

.weekly-review-status-card.danger {
  border-color: #f4c4c4;
  background: #fff7f7;
}

.weekly-review-status-card.danger strong {
  color: var(--color-danger);
}

.weekly-review-status-card.safe {
  border-color: #bfe7cd;
  background: #f4fbf7;
}

.weekly-review-status-card.safe strong {
  color: #15803d;
}

.weekly-review-kpi {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 104px;
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  background: var(--surface);
  color: inherit;
  font: inherit;
  text-align: center;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.weekly-review-kpi > span,
.weekly-review-kpi small {
  color: var(--color-text-secondary);
  font-size: 12px;
}

.weekly-review-kpi strong {
  margin: 7px 0 5px;
  font-size: 20px;
  line-height: 1.2;
}

.weekly-review-kpi small {
  min-height: 18px;
  line-height: 1.5;
}

.weekly-review-kpi--talent {
  border-color: #f2c66d;
  background: linear-gradient(180deg, #fffdf5 0%, #fff8e8 100%);
}

.weekly-review-kpi--talent strong,
.weekly-review-kpi--talent em {
  color: #a15c06;
}

.weekly-review-score-badge {
  display: inline-flex;
  padding: 4px 8px;
  border: 1px solid #f2c66d;
  border-radius: 999px;
  background: #fff7dc;
  color: #92400e;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.weekly-review-section {
  overflow: hidden;
  border-radius: 14px;
}

.weekly-review-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
}

.weekly-review-section-head h3 {
  font-size: 15px;
}

.weekly-review-section-head > span {
  color: var(--color-text-secondary);
  font-size: 12px;
  text-align: right;
}

.weekly-review-priority-table {
  min-width: 1060px;
}

.weekly-review-priority-table td {
  vertical-align: middle;
}

.weekly-review-priority-table td strong,
.weekly-review-priority-table td small {
  display: block;
}

.weekly-review-priority-table td small {
  margin-top: 4px;
  color: var(--color-text-secondary);
  font-size: 11px;
  line-height: 1.4;
}

.weekly-review-priority {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: #f8fafc;
  color: var(--color-text-secondary);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.weekly-review-priority.warning {
  border-color: #f4d7a4;
  background: #fffaf0;
  color: #a15c06;
}

.weekly-review-priority.danger {
  border-color: #f4c4c4;
  background: #fff7f7;
  color: var(--color-danger);
}

.weekly-review-stage-loading {
  background: #f8fbff;
  color: var(--color-primary);
}

.analysis-talent-loading.weekly-review-stage-loading {
  min-height: 148px;
}

.weekly-review-load-error {
  display: grid;
  gap: 6px;
  color: var(--color-danger);
}

.weekly-review-load-error span {
  color: var(--color-text-secondary);
  font-size: 12px;
}

.weekly-review-boundary-note {
  display: flex;
  gap: 10px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--color-border);
  background: #f8fafc;
  color: var(--color-text-secondary);
  font-size: 12px;
}

.weekly-review-boundary-note strong {
  flex: 0 0 auto;
  color: var(--text);
}

.weekly-review-department-table {
  min-width: 1260px;
}

.weekly-review-department-table td strong,
.weekly-review-department-table td small {
  display: block;
}

.weekly-review-department-table td small {
  margin-top: 3px;
  color: var(--color-text-secondary);
  font-size: 11px;
}

.weekly-review-categories {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 16px 16px;
}

.weekly-review-category {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 5px 10px;
  min-height: 76px;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  text-align: center;
  cursor: pointer;
}

.weekly-review-category:hover,
.weekly-review-category.active {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 2px rgba(37, 117, 252, 0.09);
}

.weekly-review-category span {
  font-size: 13px;
  font-weight: 700;
}

.weekly-review-category strong {
  color: var(--color-primary);
  font-size: 20px;
}

.weekly-review-category small {
  grid-column: 1 / -1;
  color: var(--color-text-secondary);
  font-size: 11px;
  text-align: center;
}

.weekly-review-category.warning strong,
.weekly-review-issue-type.warning {
  color: var(--color-warning);
}

.weekly-review-category.danger strong,
.weekly-review-issue-type.danger {
  color: var(--color-danger);
}

.weekly-review-remediation-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 16px;
}

.weekly-review-remediation-card {
  display: grid;
  align-content: center;
  justify-items: center;
  min-height: 96px;
  padding: 14px 16px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--surface);
  text-align: center;
}

.weekly-review-remediation-card > span,
.weekly-review-remediation-card small {
  color: var(--color-text-secondary);
  font-size: 12px;
  line-height: 1.5;
}

.weekly-review-remediation-card strong {
  margin: 6px 0 4px;
  color: var(--text);
  font-size: 22px;
  line-height: 1.2;
}

.weekly-review-remediation-card.primary {
  border-color: #b9d3ff;
  background: #f4f8ff;
}

.weekly-review-remediation-card.primary strong {
  color: var(--color-primary);
}

.weekly-review-remediation-card.warning {
  border-color: #f4d7a4;
  background: #fffaf0;
}

.weekly-review-remediation-card.warning strong {
  color: var(--color-warning);
}

.weekly-review-remediation-card.danger {
  border-color: #f4c4c4;
  background: #fff7f7;
}

.weekly-review-remediation-card.danger strong {
  color: var(--color-danger);
}

.weekly-review-remediation-card.safe {
  border-color: #bfe7cd;
  background: #f4fbf7;
}

.weekly-review-remediation-card.safe strong {
  color: #15803d;
}

.weekly-review-owner-table th,
.weekly-review-owner-table td {
  text-align: center;
  vertical-align: middle;
}

.weekly-review-improvement-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 12px;
  padding: 14px 16px 16px;
}

.weekly-review-trend-panel,
.weekly-review-repeat-panel {
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--surface);
}

.weekly-review-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border);
  background: var(--surface-2);
}

.weekly-review-subhead strong {
  color: var(--text);
  font-size: 13px;
}

.weekly-review-subhead span {
  color: var(--color-text-secondary);
  font-size: 11px;
}

.weekly-review-trend-list {
  display: grid;
  padding: 0 12px;
}

.weekly-review-trend-row {
  display: grid;
  grid-template-columns: 72px minmax(84px, 1fr) 84px 76px 58px;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  border-bottom: 1px solid var(--color-border);
  font-size: 12px;
}

.weekly-review-trend-row:last-child {
  border-bottom: 0;
}

.weekly-review-trend-row strong,
.weekly-review-trend-row span {
  color: var(--text);
}

.weekly-review-trend-row small {
  color: var(--color-text-secondary);
}

.weekly-review-trend-row em {
  font-style: normal;
  font-weight: 700;
  text-align: right;
}

.weekly-review-trend-row em.improved {
  color: #15803d;
}

.weekly-review-trend-row em.worsened {
  color: var(--color-danger);
}

.weekly-review-trend-row em.muted {
  color: var(--color-text-secondary);
}

.weekly-review-trend-track {
  overflow: hidden;
  height: 8px;
  border-radius: 999px;
  background: #e8eef8;
}

.weekly-review-trend-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #78a9ff 0%, var(--color-primary) 100%);
}

.weekly-review-repeat-table {
  min-width: 680px;
}

.weekly-review-repeat-table th,
.weekly-review-repeat-table td {
  text-align: center;
  vertical-align: middle;
}

.weekly-review-empty {
  padding: 24px 16px;
  color: var(--color-text-secondary);
  font-size: 12px;
  text-align: center;
}

.weekly-review-list-controls {
  display: flex;
  align-items: end;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
  background: var(--surface-2);
}

.weekly-review-list-controls .field {
  min-width: 180px;
}

.weekly-review-list-controls #weeklyReviewExportButton {
  margin-left: auto;
}

.weekly-review-issue-type {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.weekly-review-problem {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-width: 230px;
  line-height: 1.5;
  text-align: center;
}

.weekly-review-problem > span {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
}

.weekly-review-repeat,
.weekly-review-source-ended,
.weekly-review-overdue,
.weekly-review-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.weekly-review-repeat {
  background: #fff3dd;
  color: #b45309;
}

.weekly-review-source-ended {
  background: var(--surface-2);
  color: var(--color-text-secondary);
}

.weekly-review-overdue {
  background: #feecec;
  color: var(--color-danger);
}

.weekly-review-status.pending {
  background: #fff3dd;
  color: #b45309;
}

.weekly-review-status.in_progress {
  background: #e8f2ff;
  color: var(--color-primary);
}

.weekly-review-status.pending_review {
  background: #f1ecff;
  color: #6d28d9;
}

.weekly-review-status.resolved {
  background: #e7f8ee;
  color: #15803d;
}

.weekly-review-resolution {
  min-width: 180px;
  max-width: 280px;
  white-space: normal;
  color: var(--color-text-secondary);
  line-height: 1.5;
  text-align: center;
}

.weekly-review-action-dialog {
  width: min(640px, calc(100vw - 32px));
}

.weekly-review-drill-dialog {
  width: min(1180px, calc(100vw - 32px));
  height: min(82dvh, 760px);
  min-width: min(720px, calc(100vw - 32px));
  min-height: 440px;
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 24px);
  resize: both;
  overflow: hidden;
}

.weekly-review-drill-dialog[open] {
  display: flex;
  flex-direction: column;
}

.weekly-review-source-dialog {
  width: min(860px, calc(100vw - 32px));
}

.weekly-review-drill-dialog .dialog-body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  padding: 0;
  overflow: auto;
}

.weekly-review-drill-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-border);
  background: #f8fafc;
}

.weekly-review-drill-toolbar > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.weekly-review-drill-toolbar strong {
  color: var(--color-text-primary);
  font-size: 14px;
}

.weekly-review-drill-toolbar span {
  color: var(--color-text-secondary);
  font-size: 12px;
  line-height: 1.45;
}

.weekly-review-ai-host {
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-border);
  background: #fff;
}

.weekly-review-ai-loading,
.weekly-review-ai-error,
.weekly-review-ai-result {
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #eff6ff;
  color: #1e3a8a;
  line-height: 1.55;
}

.weekly-review-ai-loading,
.weekly-review-ai-error {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  text-align: center;
}

.weekly-review-ai-error {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.weekly-review-ai-result {
  padding: 14px 16px;
}

.weekly-review-ai-result > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.weekly-review-ai-result > div span,
.weekly-review-ai-result small {
  color: var(--color-text-secondary);
  font-size: 12px;
}

.weekly-review-ai-result p {
  margin: 10px 0 0;
  font-weight: 600;
}

.weekly-review-ai-result ol {
  display: grid;
  gap: 5px;
  margin: 10px 0 0;
  padding-left: 22px;
}

.weekly-review-management-ai {
  margin-bottom: 16px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: linear-gradient(135deg, #eff6ff 0%, #fff 58%);
  padding: 16px;
}

.weekly-review-management-ai > [data-weekly-management-ai-host] {
  margin-top: 14px;
}

.weekly-review-management-result {
  display: grid;
  gap: 12px;
}

.weekly-review-management-summary,
.weekly-review-management-summary > div,
.weekly-review-management-claim > div,
.weekly-review-management-claim footer {
  display: flex;
  align-items: center;
  gap: 10px;
}

.weekly-review-management-summary {
  justify-content: space-between;
}

.weekly-review-management-summary > div {
  align-items: flex-start;
  flex-direction: column;
  gap: 2px;
}

.weekly-review-management-summary span,
.weekly-review-management-claim footer,
.weekly-review-management-model-note,
.weekly-review-management-quality {
  color: var(--color-text-secondary);
  font-size: 12px;
}

.weekly-review-management-summary > em,
.weekly-review-management-claim em {
  border-radius: 999px;
  font-size: 12px;
  font-style: normal;
  font-weight: 700;
  padding: 5px 9px;
  white-space: nowrap;
}

.weekly-review-management-summary > em.high,
.weekly-review-management-claim em.high { background: #dcfce7; color: #047857; }
.weekly-review-management-summary > em.medium,
.weekly-review-management-claim em.medium { background: #fef3c7; color: #a16207; }
.weekly-review-management-summary > em.low,
.weekly-review-management-claim em.low { background: #fee2e2; color: #b91c1c; }

.weekly-review-management-insight,
.weekly-review-management-model-note {
  margin: 0;
}

.weekly-review-management-insight {
  color: #1e3a8a;
  font-weight: 600;
}

.weekly-review-management-claims {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.weekly-review-management-claim {
  display: grid;
  gap: 8px;
  border: 1px solid var(--color-border);
  border-left: 4px solid #2563eb;
  border-radius: 10px;
  background: #fff;
  padding: 12px 14px;
}

.weekly-review-management-claim.inference { border-left-color: #d97706; }
.weekly-review-management-claim.action { border-left-color: #059669; }
.weekly-review-management-claim > div span { color: var(--color-text-secondary); font-size: 12px; }
.weekly-review-management-claim > div strong { flex: 1; }
.weekly-review-management-claim p { margin: 0; }
.weekly-review-management-claim footer { align-items: flex-start; flex-wrap: wrap; }
.weekly-review-management-claim footer small { flex: 1; min-width: 180px; }
.weekly-review-management-quality summary { cursor: pointer; font-weight: 600; }
.weekly-review-management-quality ul { margin-bottom: 0; }

@media (max-width: 768px) {
  .weekly-review-management-claims { grid-template-columns: 1fr; }
  .weekly-review-management-summary { align-items: flex-start; }
  .weekly-review-management-claim > div { align-items: flex-start; flex-wrap: wrap; }
}

.weekly-review-drill-table {
  width: 100%;
  max-height: min(62vh, 620px);
  overflow-x: auto;
  overflow-y: auto;
  scrollbar-gutter: stable both-edges;
  overscroll-behavior: contain;
  border: 0;
  border-radius: 0;
}

.weekly-review-drill-table .profile-data-table {
  width: max-content;
  min-width: 100%;
}

.weekly-review-drill-table th,
.weekly-review-drill-table td {
  min-width: 112px;
  text-align: center;
  white-space: nowrap;
}

.weekly-review-drill-table th:first-child,
.weekly-review-drill-table td:first-child,
.weekly-review-drill-table th:nth-child(2),
.weekly-review-drill-table td:nth-child(2) {
  min-width: 128px;
}

.weekly-review-resource-section {
  margin-top: 16px;
}

.weekly-review-resource-section .weekly-review-subhead {
  margin-bottom: 8px;
  padding: 0 2px;
  border-bottom: 0;
  background: transparent;
}

.weekly-review-resource-section .weekly-review-drill-table {
  max-height: 300px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
}

.weekly-review-delta.up {
  color: #16794a;
  font-weight: 700;
}

.weekly-review-delta.down {
  color: #c2410c;
  font-weight: 700;
}

.weekly-review-delta.muted {
  color: var(--color-text-secondary);
}

.weekly-review-source-note,
.weekly-review-source-empty {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #eff6ff;
  color: #1e3a8a;
  line-height: 1.55;
}

.weekly-review-source-note strong,
.weekly-review-source-empty strong {
  flex: 0 0 auto;
  font-size: 13px;
}

.weekly-review-source-note span,
.weekly-review-source-empty p {
  margin: 0;
  font-size: 12px;
}

.weekly-review-source-empty {
  display: grid;
  justify-items: center;
  border-color: var(--color-border);
  background: var(--surface-2);
  color: var(--color-text-secondary);
  text-align: center;
}

.weekly-review-source-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0 0;
}

.weekly-review-source-fields > div {
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--surface);
  text-align: center;
}

.weekly-review-source-fields dt {
  color: var(--color-text-secondary);
  font-size: 11px;
}

.weekly-review-source-fields dd {
  margin: 6px 0 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.weekly-review-source-table {
  max-height: min(38vh, 360px);
  margin-top: 14px;
}

.weekly-review-table-link,
.weekly-review-company-scope {
  border: 0;
  background: transparent;
  color: var(--color-primary);
  font: inherit;
  text-align: center;
  cursor: pointer;
}

.weekly-review-table-link:hover,
.weekly-review-company-scope:hover strong {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.weekly-review-company-scope {
  display: grid;
  justify-items: center;
  gap: 3px;
  width: 100%;
}

.weekly-review-company-scope strong {
  color: var(--color-primary);
}

.weekly-review-company-scope small {
  color: var(--color-text-secondary);
  font-size: 10px;
}

.weekly-review-action-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.weekly-review-action-form .wide {
  grid-column: 1 / -1;
}

.weekly-review-company-table th,
.weekly-review-company-table td,
.weekly-review-issue-shell th,
.weekly-review-issue-shell td {
  vertical-align: middle;
  text-align: center;
}

.weekly-review-company-table th,
.weekly-review-company-table td {
  text-align: center;
}

.weekly-review .profile-data-table th,
.weekly-review .profile-data-table td {
  text-align: center;
}

.weekly-review-issue-shell {
  max-height: 420px;
}

@media (max-width: 720px) {
  .weekly-review-drill-dialog {
    width: calc(100vw - 20px);
    height: calc(100dvh - 24px);
    min-width: 0;
    min-height: 0;
    resize: none;
  }

  .weekly-review-drill-toolbar,
  .weekly-review-ai-result > div {
    align-items: stretch;
    flex-direction: column;
  }

  .weekly-review-drill-toolbar .btn {
    width: 100%;
  }

  .weekly-review-source-fields {
    grid-template-columns: 1fr;
  }

  .weekly-review-source-note {
    display: grid;
    justify-items: center;
    text-align: center;
  }
}

.weekly-review-issue-shell td:nth-child(4) {
  min-width: 220px;
  white-space: normal;
  line-height: 1.5;
}

.weekly-review-details {
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: var(--surface);
}

.weekly-review-details > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 74px;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
}

.weekly-review-details > summary::-webkit-details-marker {
  display: none;
}

.weekly-review-details-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 44px;
  color: var(--color-primary);
  font-size: 12px;
  font-weight: 700;
  text-align: right;
}

.weekly-review-details-toggle .when-open,
.weekly-review-details[open] .weekly-review-details-toggle .when-closed {
  display: none;
}

.weekly-review-details[open] .weekly-review-details-toggle .when-open {
  display: inline;
}

.weekly-review-details-copy {
  display: grid;
  gap: 4px;
}

.weekly-review-details > summary strong {
  color: var(--text);
  font-size: 15px;
}

.weekly-review-details > summary small,
.weekly-review-details > summary em {
  color: var(--color-text-secondary);
  font-size: 12px;
  font-style: normal;
}

.weekly-review-details > summary em {
  margin-left: auto;
}

.weekly-review-details[open] > summary {
  border-bottom: 1px solid var(--color-border);
}

.weekly-review-details-body {
  display: grid;
  gap: 14px;
  padding: 14px;
  background: var(--surface-2);
}

@media (max-width: 1180px) {
  .weekly-review-kpis,
  .weekly-review-status-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .weekly-review-kpis-compact {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .weekly-review-categories {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .weekly-review-remediation-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .weekly-review-improvement-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .weekly-review-toolbar {
    align-items: stretch;
  }

  .weekly-review-toolbar .field,
  .weekly-review-toolbar .btn {
    width: 100%;
    min-width: 0;
  }

  .weekly-review-toolbar-note {
    margin-left: 0;
  }

  .weekly-review-hero,
  .weekly-review-section-head,
  .weekly-review-metric-group-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .weekly-review-metric-group-head span {
    text-align: left;
  }

  .weekly-review-hero > div:last-child {
    display: flex;
    align-items: baseline;
    gap: 6px;
    min-width: 0;
    text-align: left;
  }

  .weekly-review-hero h3 {
    font-size: 18px;
    overflow-wrap: anywhere;
  }

  .weekly-review-kpis,
  .weekly-review-status-summary,
  .weekly-review-categories,
  .weekly-review-remediation-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .weekly-review-kpis-compact {
    grid-template-columns: 1fr;
  }

  .weekly-review-list-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .weekly-review-list-controls .field,
  .weekly-review-list-controls .btn {
    width: 100%;
    min-width: 0;
  }

  .weekly-review-list-controls #weeklyReviewExportButton {
    margin-left: 0;
  }

  .weekly-review-details > summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .weekly-review-details-copy {
    min-width: 0;
  }

  .weekly-review-details > summary em {
    grid-column: 1;
    margin-left: 0;
  }

  .weekly-review-details-toggle {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
  }

  .weekly-review-improvement-grid {
    padding: 10px;
  }

  .weekly-review-trend-row {
    grid-template-columns: 62px minmax(64px, 1fr) 78px;
    gap: 8px;
    padding: 8px 0;
  }

  .weekly-review-trend-row small {
    display: none;
  }

  .weekly-review-trend-row em {
    grid-column: 2 / -1;
    text-align: left;
  }

  .weekly-review-section-head > span {
    text-align: left;
  }

  .weekly-review-company-table,
  .weekly-review-issue-shell table {
    min-width: 1180px;
  }

  .weekly-review-action-form {
    grid-template-columns: 1fr;
  }

  .weekly-review-action-form .wide {
    grid-column: auto;
  }
}

.battle-compliance-toolbar {
  align-items: end;
}

.battle-compliance-note {
  align-self: center;
  color: #64748b;
  font-size: 13px;
}

.battle-compliance-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.battle-compliance-kpis article {
  display: grid;
  min-height: 96px;
  place-content: center;
  gap: 8px;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  background: #fff;
  text-align: center;
}

.battle-compliance-kpis article span {
  color: #64748b;
  font-size: 13px;
}

.battle-compliance-kpis article strong {
  color: #0f172a;
  font-size: 26px;
}

.battle-compliance-kpis article.warning {
  border-color: #fed7aa;
  background: #fff7ed;
}

.battle-compliance-kpis article.warning strong {
  color: #c2410c;
}

.battle-compliance-summary,
.battle-compliance-section {
  margin-bottom: 14px;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  background: #fff;
}

.battle-compliance-summary {
  display: grid;
  gap: 7px;
  padding: 16px 18px;
}

.battle-compliance-summary span {
  color: #334155;
}

.battle-compliance-summary small,
.battle-compliance-section-head span {
  color: #64748b;
}

.battle-compliance-section-head,
.battle-compliance-section > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
}

.battle-compliance-section > summary {
  cursor: pointer;
  font-weight: 700;
}

.battle-compliance-section .profile-data-table th,
.battle-compliance-section .profile-data-table td {
  text-align: center;
  vertical-align: middle;
}

.battle-compliance-row-missing td {
  background: #fffaf5;
}

.battle-compliance-pill {
  display: inline-flex;
  padding: 3px 9px;
  border-radius: 999px;
  background: #ffedd5;
  color: #c2410c;
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 760px) {
  .battle-compliance-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .battle-compliance-note {
    width: 100%;
  }
}

.supply-placeholder__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line, #d9dee8);
  border-radius: 8px;
  background: #fff;
}

.supply-placeholder__head h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.supply-placeholder__head p {
  margin: 0;
  color: #6b7280;
  line-height: 1.6;
}

.supply-placeholder__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.supply-placeholder__flow {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line, #d9dee8);
  border-radius: 8px;
  background: #f8fafc;
}

.supply-placeholder__flow span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid #d9e3f5;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-weight: 600;
}

.supply-placeholder__flow span.is-current {
  border-color: #1677ff;
  background: #eaf3ff;
  color: #0b63ce;
}

.supply-placeholder__metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.supply-placeholder__metric {
  display: grid;
  gap: 6px;
  padding: 16px;
  border: 1px solid var(--line, #d9dee8);
  border-radius: 8px;
  background: #fff;
}

.supply-placeholder__metric span {
  color: #6b7280;
}

.supply-placeholder__metric strong {
  font-size: 28px;
  line-height: 1;
}

.supply-placeholder__metric small {
  color: #8a94a6;
}

.supply-placeholder__card {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line, #d9dee8);
  border-radius: 8px;
  background: #fff;
}

.supply-placeholder__card strong {
  font-size: 15px;
}

.supply-placeholder__card span {
  color: #6b7280;
  line-height: 1.6;
}

.supply-placeholder__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.supply-placeholder__tags em {
  padding: 3px 8px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 12px;
  font-style: normal;
}

.supply-placeholder__table {
  overflow: hidden;
  border: 1px solid var(--line, #d9dee8);
  border-radius: 8px;
  background: #fff;
}

.supply-placeholder__table-head {
  display: grid;
  grid-template-columns: repeat(8, minmax(90px, 1fr));
  background: #f3f6fb;
  border-bottom: 1px solid var(--line, #d9dee8);
}

.supply-placeholder__table-head span {
  padding: 12px;
  border-right: 1px solid #e4e9f2;
  color: #475569;
  font-weight: 600;
  text-align: center;
}

.supply-placeholder__table-head span:last-child {
  border-right: 0;
}

@media (max-width: 900px) {
  .supply-placeholder__grid,
  .supply-placeholder__flow,
  .supply-placeholder__metrics {
    grid-template-columns: 1fr;
  }

  .supply-placeholder__head {
    flex-direction: column;
  }

  .supply-placeholder__table {
    overflow-x: auto;
  }

  .supply-placeholder__table-head {
    min-width: 720px;
  }
}

@media (max-width: 900px) {
  .control-room-toolbar {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .control-room-toolbar .control-room-actions {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
  }

  .control-room-toolbar .control-room-actions .btn {
    width: 100%;
  }

  .control-room-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .control-room-table-scroll {
    max-height: none;
    overflow: visible;
  }

  .control-room-schedule-row {
    display: block;
    min-width: 0;
  }

  .control-room-fixed-name {
    position: static;
    min-height: 0;
    border-right: 0;
    border-bottom: 1px solid var(--color-border-light);
    padding: 12px 14px;
    box-shadow: none;
  }

  .control-room-fixed-name span {
    display: none;
  }

  .control-room-slot-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .control-room-slot-anchor,
  .control-room-slot-actions {
    grid-column: 1 / -1;
  }

  .control-room-slot-actions {
    align-items: flex-start;
    flex-direction: column;
    justify-content: flex-start;
  }

  .control-room-reference-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .control-room-slot-panel {
    grid-template-columns: minmax(0, 1fr);
  }

  .control-room-slot-anchor,
  .control-room-slot-actions {
    grid-column: auto;
  }
}

@media (max-width: 768px) {
  .personnel-profile-page {
    gap: 10px;
  }

  .personnel-profile-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .personnel-profile-metric {
    min-height: 76px;
    padding: 10px 12px;
  }

  .personnel-profile-metric:nth-child(2) {
    border-right: 0;
  }

  .personnel-profile-metric:nth-child(-n + 2) {
    border-bottom: 1px solid var(--color-border, #e5e7eb);
  }

  .personnel-profile-metric strong {
    font-size: 18px;
  }

  .personnel-profile-toolbar {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
    gap: 10px;
    padding: 10px;
  }

  .personnel-profile-filters,
  .personnel-profile-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    width: 100%;
  }

  .personnel-profile-toolbar .field,
  .personnel-profile-toolbar .btn {
    width: 100%;
    min-width: 0;
  }

  .personnel-profile-actions .btn-primary:last-child {
    grid-column: 1 / -1;
  }

  .personnel-profile-table {
    min-width: 0;
    table-layout: auto;
  }

  .profile-table-wrap .personnel-profile-table[data-responsive-card-table] {
    border-spacing: 0 8px;
  }

  .profile-table-wrap .personnel-profile-table[data-responsive-card-table] tr {
    border-radius: 8px;
    box-shadow: none;
  }

  .profile-table-wrap .personnel-profile-table[data-responsive-card-table] td {
    min-height: 38px;
    padding: 8px 4px;
  }

  .profile-table-wrap .personnel-profile-table[data-responsive-card-table] td:first-child {
    padding-bottom: 10px;
    border-bottom: 1px solid var(--color-border-light, #edf0f4);
    font-size: 14px;
  }

  .profile-table-wrap .personnel-profile-table[data-responsive-card-table] .table-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .profile-table-wrap .personnel-profile-table[data-responsive-card-table] .table-actions button:only-child,
  .profile-table-wrap .personnel-profile-table[data-responsive-card-table] .table-actions button:nth-last-child(3):first-child {
    min-width: 0;
  }

  .personnel-ownership-cell {
    justify-items: end;
  }
}

/* Data cockpit: keep operations and talent views on one visual system. */
.analysis-operations {
  display: grid;
  gap: 16px;
}

.analysis-operations .analysis-company-overview,
.analysis-operations .analysis-health-panel,
.analysis-operations .analysis-card {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  box-shadow: none;
}

.analysis-operations .analysis-company-overview {
  margin: 0;
  padding: 0;
  overflow: hidden;
}

.analysis-operations .analysis-company-overview .company-kpi-title {
  margin: 0;
  padding: 15px 16px;
  border-bottom: 1px solid #edf0f4;
  color: var(--color-text-primary, #1a1a1a);
  background: #fff;
  font-size: 15px;
  font-weight: 700;
}

.analysis-operations .analysis-company-overview .company-kpi-row {
  gap: 10px;
  padding: 16px;
}

.analysis-operations .analysis-company-overview .company-kpi-card {
  min-height: 96px;
  padding: 14px 16px;
  border: 1px solid #edf0f4;
  border-radius: 8px;
  box-shadow: none;
}

.analysis-operations .analysis-health-panel {
  gap: 0;
  padding: 0;
  overflow: hidden;
}

.analysis-operations .analysis-health-header {
  padding: 15px 16px;
  border-bottom: 1px solid #edf0f4;
  background: #fff;
}

.analysis-operations .analysis-health-grid {
  gap: 0;
  padding: 16px;
}

.analysis-operations .analysis-health-metric {
  min-height: 94px;
  border-radius: 0;
  background: #fff;
}

.analysis-operations .analysis-health-metric:first-child {
  border-radius: 8px 0 0 8px;
}

.analysis-operations .analysis-health-metric:last-child {
  border-radius: 0 8px 8px 0;
}

.analysis-operations .analysis-health-metric + .analysis-health-metric {
  border-left: 0;
}

.analysis-operations .analysis-health-metric.warning {
  background: #fffaf3;
}

.analysis-operations .analysis-health-metric.ok {
  background: #f6fff8;
}

.analysis-operations .analysis-health-missing {
  padding: 0 16px 16px;
}

.analysis-operations .analysis-grid {
  gap: 16px;
}

.analysis-operations .analysis-card-wide {
  grid-column: 1 / -1;
}

.analysis-operations .analysis-card.is-mobile-active {
  grid-column: 1 / -1;
}

.analysis-operations .analysis-card-header {
  min-height: 56px;
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
}

.analysis-operations .analysis-card.analysis-card-table .analysis-card-body {
  padding: 0;
}

.analysis-operations .analysis-card-table .analysis-rank-list,
.analysis-operations .analysis-card-table .analysis-risk-list {
  display: block;
  min-height: 0;
}

.analysis-operations-table-shell {
  max-height: 420px;
  border: 0;
  border-radius: 0;
}

.analysis-operations-table th,
.analysis-operations-table td {
  padding: 10px 12px;
  vertical-align: middle;
}

.analysis-operations-table th {
  background: #f8fafc;
}

.analysis-operations-table .number-cell {
  text-align: center;
  white-space: nowrap;
}

.analysis-rank-sort-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  padding: 0;
  border: 0;
  color: inherit;
  font: inherit;
  white-space: nowrap;
  background: transparent;
  cursor: pointer;
}

.analysis-rank-sortable.number-cell .analysis-rank-sort-button {
  justify-content: center;
}

.analysis-rank-sort-button i {
  color: #94a3b8;
  font-size: 12px;
  font-style: normal;
  line-height: 1;
}

.analysis-rank-sortable[aria-sort="ascending"] .analysis-rank-sort-button i,
.analysis-rank-sortable[aria-sort="descending"] .analysis-rank-sort-button i,
.analysis-rank-sort-button:hover i,
.analysis-rank-sort-button:focus-visible i {
  color: #1677ff;
}

.analysis-rank-sort-button:focus-visible {
  border-radius: 4px;
  outline: 2px solid rgba(22, 119, 255, 0.28);
  outline-offset: 3px;
}

.analysis-rank-mobile-sort {
  display: none;
}

@media (max-width: 768px) {
  #analysisView .analysis-rank-mobile-sort {
    display: flex;
    gap: 8px;
    max-width: 100%;
    padding: 2px 2px 8px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  #analysisView .analysis-rank-mobile-sort::-webkit-scrollbar {
    display: none;
  }

  #analysisView .analysis-rank-mobile-sort button {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 4px;
    min-height: 32px;
    padding: 5px 10px;
    border: 1px solid #dbe3ef;
    border-radius: 999px;
    color: #64748b;
    background: #fff;
  }

  #analysisView .analysis-rank-mobile-sort button.active {
    border-color: #9fc5ff;
    color: #1677ff;
    background: #eff6ff;
  }

  #analysisView .analysis-rank-mobile-sort i {
    font-style: normal;
  }
}

#analysisView table[data-mobile-rank-table] th.number-cell,
#analysisView table[data-mobile-rank-table] td.number-cell {
  text-align: center;
}

#analysisView table[data-mobile-rank-table] td.number-cell > * {
  justify-self: center;
}

#analysisTalentPanel .analysis-talent-kpis .analysis-kpi-card {
  justify-items: center;
  text-align: center;
}

#analysisTalentPanel .analysis-talent-kpis .analysis-kpi-card small {
  text-align: center;
}

.analysis-table-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  color: #1677ff;
  background: #eaf3ff;
  font-size: 12px;
  font-weight: 700;
}

.analysis-table-money {
  color: var(--color-primary, #1677ff);
  font-weight: 700;
}

.analysis-table-note {
  display: block;
  margin-top: 3px;
  color: var(--color-text-placeholder, #8a8a8a);
  font-size: 11px;
}

.analysis-table-warning {
  color: #b45309;
  background: #fffaf3;
  font-weight: 700;
}

.analysis-table-safe {
  color: #15803d;
  background: #f6fff8;
  font-weight: 700;
}

.analysis-risk-row.success td:first-child { border-left: 3px solid #16a34a; }
.analysis-risk-row.warning td:first-child { border-left: 3px solid #f59e0b; }
.analysis-risk-row.danger td:first-child { border-left: 3px solid #dc2626; }

.analysis-risk-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.analysis-risk-status i {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #64748b;
}

.analysis-risk-row.success .analysis-risk-status { color: #15803d; }
.analysis-risk-row.warning .analysis-risk-status { color: #b45309; }
.analysis-risk-row.danger .analysis-risk-status { color: #b91c1c; }
.analysis-risk-row.success .analysis-risk-status i { background: #16a34a; }
.analysis-risk-row.warning .analysis-risk-status i { background: #f59e0b; }
.analysis-risk-row.danger .analysis-risk-status i { background: #dc2626; }

.analysis-risk-hint {
  color: var(--color-text-secondary, #5f646d);
}

.analysis-risk-count {
  display: inline-flex;
  justify-content: center;
  min-width: 38px;
  padding: 4px 9px;
  border-radius: 999px;
  color: #475569;
  background: #eef2f7;
  font-size: 12px;
  font-weight: 700;
}

.analysis-risk-row.success .analysis-risk-count { color: #15803d; background: #eaf8ee; }
.analysis-risk-row.warning .analysis-risk-count { color: #b45309; background: #fff1cf; }
.analysis-risk-row.danger .analysis-risk-count { color: #b91c1c; background: #feeceb; }

.analysis-operations .analysis-trend {
  align-content: start;
  gap: 0;
  min-height: 316px;
}

.analysis-trend-table-head {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) 86px;
  gap: 12px;
  margin: -16px -16px 8px;
  padding: 10px 16px;
  border-bottom: 1px solid #e5e7eb;
  color: #697386;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 650;
}

.analysis-trend-table-head span:last-child {
  text-align: right;
}

.analysis-operations .analysis-trend-row {
  min-height: 40px;
  padding: 5px 0;
  border-bottom: 1px solid #f0f1f3;
}

.analysis-operations .analysis-trend-row:last-child {
  border-bottom: 0;
}

.analysis-operations .analysis-rank-reset {
  width: auto;
  min-height: 38px;
  padding: 0 16px;
  border-bottom: 1px solid #e5e7eb;
}

@media (max-width: 1180px) {
  .analysis-operations .analysis-health-metric:nth-child(2) {
    border-radius: 0 8px 8px 0;
  }

  .analysis-operations .analysis-health-metric:nth-child(3) {
    border-left: 1px solid #edf0f4;
    border-radius: 8px 0 0 8px;
  }
}

@media (max-width: 720px) {
  .analysis-operations .analysis-company-overview .company-kpi-row {
    grid-template-columns: 1fr;
  }

  .analysis-operations .analysis-health-grid {
    grid-template-columns: 1fr;
  }

  .analysis-operations .analysis-health-metric,
  .analysis-operations .analysis-health-metric:first-child,
  .analysis-operations .analysis-health-metric:last-child,
  .analysis-operations .analysis-health-metric:nth-child(2),
  .analysis-operations .analysis-health-metric:nth-child(3) {
    border-left: 1px solid #edf0f4;
    border-radius: 0;
  }

  .analysis-operations .analysis-health-metric:first-child {
    border-radius: 8px 8px 0 0;
  }

  .analysis-operations .analysis-health-metric:last-child {
    border-radius: 0 0 8px 8px;
  }

  .analysis-operations .analysis-health-metric + .analysis-health-metric {
    border-top: 0;
  }

  .analysis-trend-table-head,
  .analysis-operations .analysis-trend-row {
    grid-template-columns: 58px minmax(0, 1fr) 72px;
  }

  .analysis-operations .analysis-trend-value {
    grid-column: auto;
    text-align: right;
  }
}

@media (max-width: 768px) {
  .mobile-primary-nav .nav-button[data-view="workspace"] {
    display: flex !important;
  }

  #workspaceView.view.active {
    display: grid;
    gap: 12px;
    padding: 12px;
  }

  #workspaceView .workspace-hero,
  #workspaceView.workspace-role-broker .workspace-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    min-height: 0;
    padding: 14px;
  }

  #workspaceView .workspace-hero h2,
  #workspaceView.workspace-role-broker .workspace-hero h2 {
    font-size: 18px;
  }

  #workspaceView .workspace-hero p,
  #workspaceView.workspace-role-broker .workspace-hero p {
    margin-top: 5px;
    max-width: none;
    font-size: 12px;
    line-height: 1.5;
  }

  #workspaceView .workspace-hero-meta,
  #workspaceView.workspace-role-broker .workspace-hero-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  #workspaceView .workspace-hero-chip,
  #workspaceView.workspace-role-broker .workspace-hero-chip {
    min-width: 0;
    padding: 9px 10px;
  }

  #workspaceView .workspace-quick-strip {
    margin-top: 0;
    padding: 13px;
  }

  #workspaceView .workspace-quick-header {
    display: grid;
    gap: 4px;
    margin-bottom: 10px;
  }

  #workspaceView .workspace-quick-header h2 {
    font-size: 15px;
  }

  #workspaceView .workspace-quick-grid,
  #workspaceView.workspace-role-broker .workspace-quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  #workspaceView .workspace-quick-button,
  #workspaceView.workspace-role-broker .workspace-quick-button {
    min-height: 72px;
    padding: 10px;
  }

  #workspaceView .workspace-quick-button span {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  #workspaceView .workspace-layout,
  #workspaceView.workspace-role-broker .workspace-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  #workspaceView #dailyForm,
  #workspaceView #workspaceAnchorFillCard,
  #workspaceView #workspaceSecondaryGrid,
  #workspaceView #workspaceHistoryDetails,
  #workspaceView #workspaceActivityCard {
    display: none !important;
  }

  #workspaceView .workspace-left,
  #workspaceView .workspace-right {
    display: contents;
  }

  #workspaceView #workspaceRiskCard .panel-header {
    display: grid;
    gap: 3px;
    min-height: 0;
    padding: 12px 14px;
  }

  #workspaceView #workspaceRiskCard .panel-body {
    padding: 12px;
  }

  #workspaceView .workspace-risk-item {
    min-height: 58px;
    padding: 10px;
  }
}
