/* ═══════════════════════════════════════════════════════════════
   components.css — Design System Component Definitions
   Auto-extracted from preview/component-*.html
   DO NOT EDIT MANUALLY — regenerate via extract-components-css.mjs
   ═══════════════════════════════════════════════════════════════ */

/* ── Button ────────────────────────────────────────────────── */
/* @anatomy
   <span class="label">主要操作</span> <button class="btn btn-primary btn-sm" data-evidence-sample="primary-sm">跟进</button> <button class="btn btn-primary" data-evidence-sample="primary-md">提交投诉</button> <button class="btn btn-primary btn-lg">创建工单</button>
*/
/* Component definitions — extracted to components.css by deterministic script */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-1); border: none; cursor: pointer; font-family: var(--font-family-base); font-weight: 500; white-space: nowrap; overflow: hidden; transition: background .15s, border-color .15s; flex-shrink: 0; min-width: auto; }
.btn:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
/* Primary */
.btn-primary { background: var(--color-primary); color: var(--primary-foreground); border-radius: var(--radius-md); padding: 0 var(--space-5); height: var(--size-button-height); font-size: var(--font-size-body); min-width: var(--size-button-height); }
.btn-primary:hover { background: var(--color-primary-hover); }
.btn-primary.btn-sm { height: var(--size-button-height-sm); border-radius: var(--radius-sm); padding: 0 var(--space-3); font-size: var(--font-size-caption); min-width: var(--size-button-height-sm); }
.btn-primary.btn-lg { height: var(--size-button-height-lg); border-radius: var(--radius-lg); padding: 0 var(--space-6); font-size: var(--font-size-lead); min-width: var(--size-button-height-lg); }
/* Secondary */
.btn-secondary { background: var(--secondary); color: var(--secondary-foreground); border-radius: var(--radius-md); padding: 0 var(--space-5); height: var(--size-button-height); font-size: var(--font-size-body); border: 1px solid var(--color-outline-variant); min-width: var(--size-button-height); }
.btn-secondary:hover { filter: brightness(0.95); }
/* Outline */
.btn-outline { background: transparent; color: var(--color-on-surface); border-radius: var(--radius-md); padding: 0 var(--space-5); height: var(--size-button-height); font-size: var(--font-size-body); border: 1px solid var(--color-border); min-width: var(--size-button-height); }
.btn-outline:hover { background: var(--muted); }
/* Danger */
.btn-danger { background: var(--color-error); color: var(--on-error); border-radius: var(--radius-md); padding: 0 var(--space-5); height: var(--size-button-height); font-size: var(--font-size-body); min-width: var(--size-button-height); }
.btn-danger:hover { filter: brightness(0.92); }
.btn-danger.btn-sm { height: var(--size-button-height-sm); border-radius: var(--radius-sm); padding: 0 var(--space-3); font-size: var(--font-size-caption); min-width: var(--size-button-height-sm); }
/* Disabled */
.btn:disabled { opacity: 0.45; cursor: not-allowed; pointer-events: none; }

/* ── Card ──────────────────────────────────────────────────── */
/* @anatomy
   <span class="label">默认</span> <div class="card-default" data-evidence-sample="default"> <div class="card-header"> <span class="card-title">网络连接异常投诉</span> <span class="badge badge-high">高优先级</span>
*/
.card-default { background: var(--color-card); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-6); width: 100%; box-sizing: border-box; }
.card-elevated { background: var(--color-card); border: none; border-radius: var(--radius-lg); padding: var(--space-6); width: 100%; box-sizing: border-box; box-shadow: var(--shadow-3); }
.card-interactive { background: var(--color-card); border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: var(--space-6); width: 100%; box-sizing: border-box; cursor: pointer; transition: box-shadow .15s; }
.card-interactive:hover { box-shadow: var(--shadow-2); }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--space-4); gap: var(--space-2); }
.card-title { font-family: var(--font-heading); font-size: var(--type-heading-sm); font-weight: var(--font-weight-h3); color: var(--color-on-surface); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.card-body { font-size: var(--type-body-md); color: var(--color-on-surface-variant); line-height: var(--line-height-body); margin-bottom: var(--space-4); }
.card-footer { display: flex; justify-content: space-between; align-items: center; }
.card-meta { font-size: var(--type-body-sm); color: var(--color-on-surface-variant); display: flex; gap: var(--space-3); }
.card-meta-item { white-space: nowrap; }
.badge { display: inline-flex; align-items: center; font-size: var(--type-body-sm); font-weight: var(--font-weight-caption); padding: 2px var(--space-2); border-radius: var(--radius-full); white-space: nowrap; flex-shrink: 0; }
.badge-high { background: var(--color-error-container); color: var(--color-on-error-container); }
.badge-medium { background: var(--color-warning); color: var(--foreground-inverse); }
.badge-processing { background: var(--color-primary-container); color: var(--color-on-primary-container); }
.badge-pending { background: var(--color-accent-container); color: var(--color-on-accent-container); }
.card-actions { display: flex; gap: var(--space-2); flex-shrink: 0; }
.btn-ghost { font-size: var(--type-body-sm); color: var(--color-primary); background: none; border: none; cursor: pointer; padding: var(--space-1) var(--space-2); font-family: var(--font-family-base); white-space: nowrap; border-radius: var(--radius-sm); transition: background .15s; min-width: auto; }
.btn-ghost:hover { background: var(--color-primary-container); }
.stat-grid { display: flex; gap: var(--space-5); }
.stat-item { text-align: center; }
.stat-value { font-family: var(--font-heading); font-size: var(--font-size-h2); font-weight: var(--font-weight-h2); color: var(--color-on-surface); }
.stat-label { font-size: var(--type-body-sm); color: var(--color-on-surface-variant); margin-top: var(--space-1); }

/* ── Input ─────────────────────────────────────────────────── */
/* @anatomy
   <span class="label">默认</span> <div class="input-group"> <label class="input-label" for="input-default">投诉标题</label> <input class="input-field" id="input-default" type="text" placeholder="请输入投诉标题">
*/
.input-label { font-size: var(--font-size-body); font-weight: var(--font-weight-body); color: var(--color-on-surface); white-space: nowrap; }
.input-field { width: 100%; height: var(--size-input-height); padding: 0 var(--space-3); background: var(--background); border: 1px solid var(--color-border); border-radius: var(--radius-md); color: var(--color-on-surface); font-family: var(--font-body); font-size: var(--font-size-body); line-height: var(--line-height-body); outline: none; transition: border-color .15s, box-shadow .15s; }
.input-field::placeholder { color: var(--color-muted-foreground); }
.input-field:hover { border-color: var(--color-surface-container-highest); }
.input-field:focus { border-color: var(--ring); box-shadow: 0 0 0 2px var(--color-primary-container); }
.input-field.is-error { border-color: var(--color-error); }
.input-field.is-error:focus { box-shadow: 0 0 0 2px var(--color-error-container); }
.input-wrap { position: relative; }
.input-wrap .input-field { padding-left: calc(var(--size-icon-md) + var(--space-2) * 2); }
.input-wrap .icon-leading { position: absolute; left: var(--space-2); top: 50%; transform: translateY(-50%); width: var(--size-icon-md); height: var(--size-icon-md); color: var(--color-on-surface-variant); pointer-events: none; }
.textarea-field { width: 100%; min-height: 80px; padding: var(--space-2) var(--space-3); background: var(--background); border: 1px solid var(--color-border); border-radius: var(--radius-md); color: var(--color-on-surface); font-family: var(--font-body); font-size: var(--font-size-body); line-height: var(--line-height-body); outline: none; resize: vertical; transition: border-color .15s, box-shadow .15s; }
.textarea-field::placeholder { color: var(--color-muted-foreground); }
.textarea-field:hover { border-color: var(--color-surface-container-highest); }
.textarea-field:focus { border-color: var(--ring); box-shadow: 0 0 0 2px var(--color-primary-container); }
.error-msg { font-size: var(--font-size-caption); color: var(--color-error); }

/* ── Modal ─────────────────────────────────────────────────── */
/* @anatomy
   <span class="label">工单详情</span>
*/
.modal-viewport { position: relative; width: 100%; height: 400px; border-radius: var(--radius-md); overflow: hidden; background: var(--color-on-surface); }
  .modal-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; }
  .modal-dialog { background: var(--card); border-radius: var(--radius-lg); box-shadow: var(--shadow-5); width: 640px; max-width: 90%; max-height: 90%; overflow: hidden; display: flex; flex-direction: column; }
  .modal-dialog.confirm { width: 420px; }
  .modal-header { display: flex; align-items: center; justify-content: space-between; padding: var(--space-4) var(--space-5); border-bottom: 1px solid var(--color-border); }
  .modal-header-title { font-family: var(--font-heading); font-size: var(--font-size-h4); font-weight: var(--font-weight-h4); color: var(--color-on-surface); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .modal-close { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; min-width: 32px; border-radius: var(--radius-sm); border: none; background: transparent; color: var(--color-on-surface-variant); cursor: pointer; flex-shrink: 0; transition: background .15s; }
  .modal-close:hover { background: var(--color-surface-container); }
  .modal-body { padding: var(--space-5); overflow-y: auto; flex: 1; }
  .modal-footer { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-2); padding: var(--space-3) var(--space-5); border-top: 1px solid var(--color-border); }
  .modal-field { margin-bottom: var(--space-3); }
  .modal-field:last-child { margin-bottom: 0; }
  .modal-field-label { font-size: var(--font-size-caption); font-weight: var(--font-weight-caption); color: var(--color-on-surface-variant); margin-bottom: var(--space-1); }
  .modal-field-value { font-size: var(--font-size-body); font-weight: var(--font-weight-body); color: var(--color-on-surface); line-height: var(--line-height-body); overflow-wrap: break-word; word-break: break-all; white-space: normal; }
  .modal-tl { margin-top: var(--space-4); }
  .modal-tl-item { display: flex; gap: var(--space-3); padding-bottom: var(--space-3); position: relative; }
  .modal-tl-item:not(:last-child)::after { content: ''; position: absolute; left: 11px; top: 28px; bottom: 0; width: 1px; background: var(--color-border); }
  .modal-tl-dot { width: 24px; height: 24px; min-width: 24px; border-radius: var(--radius-full); background: var(--color-primary-container); color: var(--color-on-primary-container); display: flex; align-items: center; justify-content: center; font-size: var(--font-size-caption); font-weight: var(--font-weight-eyebrow); flex-shrink: 0; }
  .modal-tl-content { flex: 1; min-width: 0; }
  .modal-tl-title { font-size: var(--font-size-body); font-weight: var(--font-weight-lead); color: var(--color-on-surface); }
  .modal-tl-desc { font-size: var(--font-size-caption); color: var(--color-on-surface-variant); margin-top: 2px; line-height: var(--line-height-caption); }
  .btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-1); border: none; cursor: pointer; font-family: var(--font-family-base); font-size: var(--font-size-body); font-weight: var(--font-weight-body); white-space: nowrap; transition: background .15s, border-color .15s; }
  .btn-ghost { background: transparent; color: var(--color-on-surface); padding: var(--space-2) var(--space-4); border-radius: var(--radius-md); border: 1px solid var(--color-border); min-height: var(--size-button-height); min-width: var(--size-button-height); }
  .btn-ghost:hover { background: var(--color-surface-container); }
  .btn-primary { background: var(--color-primary); color: var(--color-on-primary); padding: var(--space-2) var(--space-4); border-radius: var(--radius-md); min-height: var(--size-button-height); min-width: var(--size-button-height); }
  .btn-primary:hover { background: var(--color-primary-hover); }
  .btn-danger { background: var(--color-error); color: var(--color-on-error); padding: var(--space-2) var(--space-4); border-radius: var(--radius-md); min-height: var(--size-button-height); min-width: var(--size-button-height); }
  .btn-danger:hover { filter: brightness(1.08); }
  .modal-confirm-body { padding: var(--space-5) var(--space-5) var(--space-3); text-align: center; }
  .modal-confirm-icon { width: 48px; height: 48px; border-radius: var(--radius-full); background: var(--color-error-container); color: var(--color-error); display: inline-flex; align-items: center; justify-content: center; margin-bottom: var(--space-3); }
  .modal-confirm-title { font-family: var(--font-heading); font-size: var(--font-size-h4); font-weight: var(--font-weight-h4); color: var(--color-on-surface); margin-bottom: var(--space-1); }
  .modal-confirm-desc { font-size: var(--font-size-body); color: var(--color-on-surface-variant); line-height: var(--line-height-body); }

/* ── Navigation ────────────────────────────────────────────── */
/* @anatomy
   <span class="label">展开侧边栏</span> <nav class="sidebar-nav expanded" style="height: 380px;" data-evidence-sample="expanded"> <div class="sidebar-nav__logo"> <div class="sidebar-nav__logo-icon"><svg viewBox="0 0 24 24"><use href="#icon-ticket"/></svg>
*/
/* Component definitions — extracted to components.css by deterministic script */
  .sidebar-nav { display: flex; flex-direction: column; background: var(--color-surface-container-low); border-right: 1px solid var(--color-border); overflow: hidden; flex-shrink: 0; }
  .sidebar-nav.expanded { width: 240px; }
  .sidebar-nav.collapsed { width: 64px; align-items: center; }
  .sidebar-nav__logo { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--color-border); flex-shrink: 0; width: 100%; box-sizing: border-box; }
  .sidebar-nav.collapsed .sidebar-nav__logo { justify-content: center; padding: var(--space-3) var(--space-2); }
  .sidebar-nav__logo-icon { width: 32px; height: 32px; background: var(--color-primary); border-radius: var(--radius-md); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
  .sidebar-nav__logo-icon svg { width: 20px; height: 20px; fill: var(--color-on-primary); }
  .sidebar-nav__logo-text { font-size: var(--font-size-body); font-weight: var(--font-weight-h4); color: var(--color-on-surface); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sidebar-nav.collapsed .sidebar-nav__logo-text { display: none; }
  .sidebar-nav__items { display: flex; flex-direction: column; gap: 2px; padding: var(--space-2) var(--space-2); flex: 1; width: 100%; box-sizing: border-box; }
  .sidebar-nav.collapsed .sidebar-nav__items { padding: var(--space-2) var(--space-1); }
  .sidebar-nav__item { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-3); border-radius: var(--radius-md); cursor: pointer; transition: background .15s, color .15s; color: var(--color-on-surface-variant); font-size: var(--font-size-body); font-weight: var(--font-weight-body); white-space: nowrap; min-width: 0; text-decoration: none; }
  .sidebar-nav.collapsed .sidebar-nav__item { padding: var(--space-2); justify-content: center; }
  .sidebar-nav__item:hover { background: var(--color-surface-container); }
  .sidebar-nav__item.active { background: var(--color-primary); color: var(--color-on-primary); font-weight: var(--font-weight-lead); }
  .sidebar-nav__item.active:hover { background: var(--color-primary-hover); }
  .sidebar-nav__item svg, .sidebar-nav__item img { width: var(--size-icon-md); height: var(--size-icon-md); flex-shrink: 0; }
  .sidebar-nav.collapsed .sidebar-nav__item span { display: none; }
  .sidebar-nav__user { display: flex; align-items: center; gap: var(--space-2); padding: var(--space-3) var(--space-4); border-top: 1px solid var(--color-border); flex-shrink: 0; width: 100%; box-sizing: border-box; }
  .sidebar-nav.collapsed .sidebar-nav__user { justify-content: center; padding: var(--space-3) var(--space-2); }
  .sidebar-nav__avatar { width: 32px; height: 32px; border-radius: var(--radius-full); background: var(--color-primary-container); color: var(--color-on-primary-container); display: flex; align-items: center; justify-content: center; font-size: var(--font-size-caption); font-weight: var(--font-weight-lead); flex-shrink: 0; }
  .sidebar-nav__user-name { font-size: var(--font-size-body); color: var(--color-on-surface); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sidebar-nav.collapsed .sidebar-nav__user-name { display: none; }

/* ── Table ─────────────────────────────────────────────────── */
/* @anatomy
   <span class="label">Default</span>
*/
/* Component definitions — extracted to components.css by deterministic script */
  .tbl { width: 100%; border-collapse: collapse; font-family: var(--font-body); font-size: var(--font-size-body); color: var(--color-on-surface); background: var(--color-card); border: 1px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; }
  .tbl thead { background: var(--color-surface-container); }
  .tbl th { font-size: var(--font-size-caption); font-weight: var(--font-weight-eyebrow); color: var(--color-on-surface-variant); text-align: left; padding: 0 var(--space-3); height: 40px; white-space: nowrap; border-bottom: 1px solid var(--color-border); text-transform: uppercase; letter-spacing: 0.04em; }
  .tbl td { padding: 0 var(--space-3); height: 48px; white-space: nowrap; border-bottom: 1px solid var(--color-outline-variant); overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .tbl tbody tr:last-child td { border-bottom: none; }
  .tbl tbody tr { transition: background .15s; }
  .tbl tbody tr:hover { background: var(--color-surface-container-low); }
  .tbl.striped tbody tr:nth-child(even) { background: var(--muted); }
  .tbl.striped tbody tr:nth-child(even):hover { background: var(--color-surface-container-low); }
  .tbl.compact td { height: 36px; font-size: var(--font-size-caption); }
  .tbl.compact th { height: 32px; }
  .tbl .action-link { color: var(--color-primary); cursor: pointer; text-decoration: none; font-size: var(--font-size-caption); white-space: nowrap; }
  .tbl .action-link:hover { text-decoration: underline; }
  .tbl .action-sep { color: var(--color-outline-variant); margin: 0 var(--space-1); }
