/* ==========================================================================
   LumAPP
   Components: buttons / cards / metrics / forms / tables / overlays / charts
   ========================================================================== */

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
  transition: background var(--dur-2), border-color var(--dur-2), color var(--dur-2), box-shadow var(--dur-2), transform var(--dur-2) var(--ease);
}
.btn .ico { width: 14px; height: 14px; flex: 0 0 14px; }
.btn:hover { background: var(--brand-2); color: #fff; box-shadow: var(--shadow-brand); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.985); }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; }
.btn.ghost { background: #fff; border-color: var(--line); color: var(--ink-2); }
.btn.ghost:hover { background: var(--surface-2); border-color: var(--line-strong); color: var(--ink); box-shadow: var(--shadow-1); }
.btn.soft { background: var(--brand-soft); color: var(--brand); }
.btn.soft:hover { background: var(--brand-line); color: var(--brand-deep); box-shadow: none; }
.btn.outline { background: transparent; border-color: var(--brand-line); color: var(--brand); }
.btn.outline:hover { background: var(--brand-soft); }
.btn.danger { background: var(--danger-soft); border-color: var(--danger-line); color: var(--danger); }
.btn.danger:hover { background: var(--danger); color: #fff; box-shadow: none; }
.btn.plain { background: transparent; color: var(--ink-3); padding: 0 6px; }
.btn.plain:hover { background: var(--surface-3); color: var(--ink); box-shadow: none; }
.btn.sm { height: 28px; padding: 0 9px; font-size: 10px; border-radius: 6px; gap: 4px; }
.btn.sm .ico { width: 12px; height: 12px; flex-basis: 12px; }
.btn.lg { height: 40px; padding: 0 18px; font-size: 12.5px; border-radius: 9px; }
.btn.block { width: 100%; }
.btn.icon-only { width: 34px; padding: 0; }
.btn.icon-only.sm { width: 28px; }
.btn.is-loading { color: transparent !important; pointer-events: none; position: relative; }
.btn.is-loading::after {
  content: "";
  position: absolute;
  width: 14px; height: 14px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
.btn.ghost.is-loading::after, .btn.soft.is-loading::after, .btn.danger.is-loading::after { border-color: rgba(37, 99, 235, .2); border-top-color: var(--brand); }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-group { display: inline-flex; gap: 6px; flex-wrap: wrap; }

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
.card {
  position: relative;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-1);
  transition: border-color var(--dur-3), box-shadow var(--dur-3), transform var(--dur-3) var(--ease);
}
.card.hoverable:hover { border-color: var(--line-strong); box-shadow: var(--shadow-2); transform: translateY(-2px); }
.card.flat { box-shadow: none; }
.card.inset { background: var(--surface-2); box-shadow: none; }
.card.tint { background: linear-gradient(160deg, #fff, var(--surface-2)); }
.card.dark {
  background: linear-gradient(130deg, #08162f 0%, #0d2350 58%, #102a5c 100%);
  border-color: rgba(126, 150, 255, .18);
  color: #dbe6ff;
  box-shadow: 0 26px 60px -38px rgba(7, 22, 47, .75);
}
.card.pad-sm { padding: 14px; }
.card.pad-lg { padding: 22px; }
.card.no-pad { padding: 0; overflow: hidden; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.panel-head.compact { margin-bottom: 10px; }
.panel-title { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
.panel-title .ico { width: 15px; height: 15px; color: var(--brand); }
.panel-sub { margin-top: 2px; font-size: 10.5px; color: var(--ink-4); line-height: 1.5; }
.panel-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; flex: 0 0 auto; }
.panel-link { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 600; color: var(--ink-3); }
.panel-link:hover { color: var(--brand); gap: 6px; }
.panel-link .ico { width: 12px; height: 12px; }
.card-divider { height: 1px; margin: 14px -18px; background: var(--line-soft); }

/* KPI metrics */
.metric-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 0; overflow: hidden; }
.metric { position: relative; padding: 16px 18px; min-width: 0; }
.metric + .metric { border-left: 1px solid var(--line-soft); }
.metric-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.metric-label { font-size: 11px; font-weight: 500; color: var(--ink-3); }
.metric-ico { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; color: var(--ink-3); background: var(--surface-3); }
.metric-ico .ico { width: 13px; height: 13px; }
.metric-value { margin-top: 7px; font-size: 24px; font-weight: 600; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.metric-value small { font-size: 10px; font-weight: 500; color: var(--ink-4); margin-left: 2px; }
.metric-foot { display: flex; align-items: center; gap: 7px; margin-top: 7px; font-size: 10px; color: var(--ink-4); }
.metric-foot .up { color: var(--ok); font-weight: 600; }
.metric-foot .down { color: var(--danger); font-weight: 600; }
.metric-spark { position: absolute; right: 16px; bottom: 14px; width: 62px; height: 22px; opacity: .8; }

/* KPI cards */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; }
.kpi { display: flex; flex-direction: column; gap: 9px; padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-1); height: 100%; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; }
.kpi-label { font-size: 11px; color: var(--ink-3); }
.kpi-icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--brand-soft); color: var(--brand); }
.kpi-icon .ico { width: 14px; height: 14px; }
.kpi-value { font-size: 26px; font-weight: 600; letter-spacing: -.02em; line-height: 1; }
.kpi-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 20px; }
.kpi-delta { display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 6px; border-radius: 4px; background: var(--surface-3); font-size: 9.5px; font-weight: 600; color: var(--ink-3); }
.kpi-delta.up { background: var(--ok-soft); color: var(--ok); }
.kpi-delta.down { background: var(--danger-soft); color: var(--danger); }
.kpi-delta .ico { width: 10px; height: 10px; }
.kpi-spark { width: 76px; height: 24px; }

/* --------------------------------------------------------------------------
   Badges / chips / avatars
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 20px;
  padding: 0 6px;
  border-radius: 4px;
  background: var(--surface-3);
  color: var(--ink-2);
  font-size: 9.5px;
  font-weight: 600;
  white-space: nowrap;
  line-height: 1;
}
.badge .dot { width: 5px; height: 5px; }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.danger { background: var(--danger-soft); color: var(--danger); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.brand { background: var(--brand-soft); color: var(--brand); }
.badge.violet { background: var(--violet-soft); color: var(--violet); }
.badge.plain { background: transparent; border: 1px solid var(--line); color: var(--ink-3); }
.badge.sm { height: 18px; font-size: 8px; }
.badge.lg { height: 24px; padding: 0 8px; font-size: 10px; }
.badge .ico { width: 10px; height: 10px; }
.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.dot.ok { color: var(--ok); } .dot.warn { color: var(--warn); } .dot.danger { color: var(--danger); }
.dot.brand { color: var(--brand); } .dot.pulse { animation: dotPulse 2s infinite; }
@keyframes dotPulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink-3);
  font-size: 11px;
  font-weight: 500;
  transition: all var(--dur-2);
}
.chip:hover { border-color: var(--line-strong); color: var(--ink); }
.chip.is-active { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand); font-weight: 600; }
.chip .ico { width: 12px; height: 12px; }
.chip .chip-count { font-size: 8.5px; opacity: .7; }
.chip-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.tag { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 7px; border-radius: 4px; background: var(--surface-3); color: var(--ink-2); font-size: 10px; white-space: nowrap; }
.tag button { display: grid; place-items: center; width: 12px; height: 12px; margin-right: -3px; color: var(--ink-4); }
.tag button:hover { color: var(--danger); }
.tag .ico { width: 10px; height: 10px; }
.tag.brand { background: var(--brand-soft); color: var(--brand); }

.avatar {
  display: inline-grid;
  place-items: center;
  width: 30px; height: 30px;
  flex: 0 0 30px;
  border-radius: 50%;
  background: linear-gradient(140deg, #60a5fa, #2563eb);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  user-select: none;
}
.avatar.sm { width: 25px; height: 25px; flex-basis: 25px; font-size: 8.5px; }
.avatar.xs { width: 21px; height: 21px; flex-basis: 21px; font-size: 7.5px; }
.avatar.lg { width: 38px; height: 38px; flex-basis: 38px; font-size: 13px; }
.avatar.xl { width: 50px; height: 50px; flex-basis: 50px; font-size: 17px; }
.avatar.teal { background: linear-gradient(140deg, #14b8a6, #0f766e); }
.avatar.violet { background: linear-gradient(140deg, #64748b, #334155); }
.avatar.amber { background: linear-gradient(140deg, #fbbf24, #d97706); color: #3b2400; }
.avatar.ink { background: linear-gradient(140deg, #475569, #1e293b); }
.avatar-stack { display: flex; align-items: center; }
.avatar-stack .avatar { margin-left: -7px; border: 2px solid #fff; }
.avatar-stack .avatar:first-child { margin-left: 0; }
.user-cell { display: flex; align-items: center; gap: 8px; min-width: 0; }
.user-cell-name { font-size: 12px; font-weight: 600; line-height: 1.25; }
.user-cell-sub { font-size: 9.5px; color: var(--ink-4); line-height: 1.3; }

/* --------------------------------------------------------------------------
   Forms
   -------------------------------------------------------------------------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .span-full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.label { display: flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 500; color: var(--ink-2); }
.label .req { color: var(--danger); }
.label-hint { margin-left: auto; font-size: 9.5px; color: var(--ink-4); font-weight: 400; }
.input, .select, .textarea {
  width: 100%;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  transition: border-color var(--dur-2), box-shadow var(--dur-2);
}
.input::placeholder, .textarea::placeholder { color: var(--ink-4); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--line-strong); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.textarea { min-height: 78px; resize: vertical; line-height: 1.6; }
.select {
  appearance: none;
  padding-right: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='11' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  cursor: pointer;
}
.input.sm, .select.sm { min-height: 28px; font-size: 11px; padding: 4px 8px; border-radius: 6px; }
.select.sm { padding-right: 26px; background-position: right 8px center; }
.input-group { position: relative; display: flex; align-items: center; }
.input-group > .ico { position: absolute; left: 9px; width: 13px; height: 13px; color: var(--ink-4); pointer-events: none; }
.input-group .input { padding-left: 28px; }
.input-group .input-suffix { position: absolute; right: 9px; font-size: 9.5px; color: var(--ink-4); }
.field-help { font-size: 9.5px; color: var(--ink-4); line-height: 1.5; }
.field-error { display: none; align-items: center; gap: 4px; font-size: 9.5px; color: var(--danger); }
.field-error .ico { width: 11px; height: 11px; }
.field.has-error .input, .field.has-error .select, .field.has-error .textarea { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(217, 45, 32, .1); }
.field.has-error .field-error { display: flex; }
.shake { animation: shakeX .38s var(--ease-soft); }
@keyframes shakeX { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 50% { transform: translateX(3px); } 75% { transform: translateX(-2px); } }

.check { display: inline-flex; align-items: flex-start; gap: 7px; cursor: pointer; font-size: 11.5px; color: var(--ink-2); line-height: 1.45; }
.check input { appearance: none; width: 15px; height: 15px; flex: 0 0 15px; margin: 1px 0 0; border: 1px solid var(--line-strong); border-radius: 4px; background: #fff; position: relative; cursor: pointer; transition: all var(--dur-2); }
.check input:checked { background: var(--brand); border-color: var(--brand); }
.check input:checked::after { content: ""; position: absolute; left: 4px; top: 1px; width: 5px; height: 8px; border: solid #fff; border-width: 0 1.5px 1.5px 0; transform: rotate(42deg); }
.check input[type="radio"] { border-radius: 50%; }
.check input[type="radio"]:checked { background: #fff; border: 4px solid var(--brand); }
.check input[type="radio"]:checked::after { display: none; }
.check input:indeterminate { background: var(--brand); border-color: var(--brand); }
.check input:indeterminate::after { content: ""; position: absolute; left: 3px; top: 6px; width: 7px; height: 1.5px; background: #fff; border: 0; transform: none; }
.check .check-text small { display: block; font-size: 9.5px; color: var(--ink-4); }

.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 11.5px; }
.switch input { appearance: none; position: relative; width: 36px; height: 20px; flex: 0 0 36px; border: 1px solid var(--line-strong); border-radius: 99px; background: var(--surface-3); cursor: pointer; transition: background var(--dur-3), border-color var(--dur-3); }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, .2); transition: transform var(--dur-3) var(--ease); }
.switch input:checked { background: var(--brand); border-color: var(--brand); }
.switch input:checked::after { transform: translateX(16px); }
.switch.sm input { width: 30px; height: 17px; flex-basis: 30px; }
.switch.sm input::after { width: 11px; height: 11px; }
.switch.sm input:checked::after { transform: translateX(13px); }

.range { appearance: none; width: 100%; height: 22px; background: transparent; cursor: pointer; }
.range::-webkit-slider-runnable-track { height: 5px; border-radius: 99px; background: linear-gradient(90deg, var(--brand) var(--val, 50%), var(--surface-3) var(--val, 50%)); }
.range::-webkit-slider-thumb { appearance: none; width: 16px; height: 16px; margin-top: -5.5px; border-radius: 50%; background: #fff; border: 2px solid var(--brand); box-shadow: 0 1px 3px rgba(15, 23, 42, .2); transition: transform var(--dur-2); }
.range::-webkit-slider-thumb:hover { transform: scale(1.12); }
.range::-moz-range-track { height: 5px; border-radius: 99px; background: var(--surface-3); }
.range::-moz-range-progress { height: 5px; border-radius: 99px; background: var(--brand); }
.range::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 2px solid var(--brand); }
.range-wrap { display: flex; align-items: center; gap: 12px; }
.range-out { min-width: 48px; text-align: right; font-size: 10px; font-family: var(--mono); color: var(--ink-2); }

.seg { display: inline-flex; padding: 2px; gap: 1px; border: 1px solid var(--line); border-radius: 7px; background: var(--surface-2); }
.seg button { padding: 4px 10px; border-radius: 5px; font-size: 10px; font-weight: 500; color: var(--ink-3); transition: all var(--dur-2); white-space: nowrap; }
.seg button:hover { color: var(--ink); }
.seg button.is-active { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(15, 23, 42, .1); font-weight: 600; }
.seg.sm button { padding: 2px 7px; font-size: 10px; }
.seg.full { display: flex; width: 100%; }
.seg.full button { flex: 1; }

.radio-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.radio-card { position: relative; padding: 11px; border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; transition: all var(--dur-2); }
.radio-card:hover { border-color: var(--line-strong); }
.radio-card input { position: absolute; opacity: 0; }
.radio-card .rc-title { display: flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; }
.radio-card .rc-title .ico { width: 13px; height: 13px; color: var(--ink-3); }
.radio-card .rc-desc { margin-top: 3px; font-size: 10px; color: var(--ink-4); line-height: 1.45; }
.radio-card:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px rgba(37, 99, 235, .08); }
.radio-card:has(input:checked) .rc-title .ico { color: var(--brand); }

.setting-list { display: flex; flex-direction: column; }
.setting-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); }
.setting-row:last-child { border-bottom: 0; }
.setting-copy { min-width: 0; }
.setting-title { font-size: 12px; font-weight: 600; color: var(--ink); }
.setting-desc { margin-top: 2px; font-size: 10px; color: var(--ink-4); line-height: 1.55; max-width: 64ch; }
.setting-control { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; }

.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 22px 16px; border: 1px dashed var(--line-strong); border-radius: 9px; background: var(--surface-2); text-align: center; cursor: pointer; transition: all var(--dur-2); }
.dropzone:hover, .dropzone.is-over { border-color: var(--brand); background: var(--brand-soft); }
.dropzone .upload-ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: #fff; border: 1px solid var(--line); color: var(--brand); }
.dropzone .upload-ico .ico { width: 16px; height: 16px; }
.dropzone-title { font-size: 11.5px; font-weight: 600; }
.dropzone-sub { font-size: 9.5px; color: var(--ink-4); }
.dropzone input[type="file"] { display: none; }

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */
.table-card { padding: 0; overflow: hidden; }
.table-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); }
.table-toolbar .input-group { width: 210px; }
.table-toolbar .input, .table-toolbar .select { min-height: 30px; font-size: 11px; border-radius: 6px; }
.table-toolbar .select { width: auto; min-width: 100px; }
.toolbar-spacer { flex: 1; }
.toolbar-count { font-size: 10px; color: var(--ink-4); white-space: nowrap; }
.toolbar-count b { color: var(--ink-2); font-weight: 600; }
.table-wrap { overflow-x: auto; }
.data-table { min-width: 600px; font-size: 12px; }
.data-table thead th { padding: 9px 12px; text-align: left; white-space: nowrap; background: var(--surface-2); border-bottom: 1px solid var(--line); color: var(--ink-3); font-size: 10.5px; font-weight: 600; letter-spacing: .01em; }
.data-table thead th[data-sort] { cursor: pointer; user-select: none; }
.data-table thead th[data-sort]:hover { color: var(--brand); }
.data-table thead th .sort-ico { margin-left: 3px; font-size: 8px; opacity: .4; }
.data-table thead th.is-sort-asc .sort-ico, .data-table thead th.is-sort-desc .sort-ico { opacity: 1; color: var(--brand); }
.data-table thead th.is-sort-desc .sort-ico { transform: rotate(180deg); display: inline-block; }
.data-table tbody td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); color: var(--ink-2); vertical-align: middle; }
.data-table tbody tr { transition: background var(--dur-1); }
.data-table tbody tr:hover { background: var(--surface-2); }
.data-table tbody tr.is-selected { background: var(--brand-soft); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table .cell-check { width: 34px; }
.data-table .cell-check .check input { width: 14px; height: 14px; flex-basis: 14px; }
.data-table .cell-strong { color: var(--ink); font-weight: 600; }
.data-table .cell-mono { font-family: var(--mono); font-size: 10px; color: var(--ink-3); }
.data-table .cell-num { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); }
.data-table .cell-actions { display: flex; align-items: center; justify-content: flex-end; gap: 2px; }
.data-table .row-title { display: flex; align-items: center; gap: 9px; min-width: 0; }
.data-table .row-title-text { min-width: 0; }
.data-table .row-title-text strong { display: block; font-size: 11.5px; font-weight: 600; color: var(--ink); max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.data-table .row-title-text small { display: block; font-size: 9.5px; color: var(--ink-4); }
.thumb { position: relative; width: 38px; height: 48px; flex: 0 0 38px; border-radius: 5px; overflow: hidden; background: linear-gradient(145deg, #dbe7ff, #9fb7ff); border: 1px solid var(--line); }
.thumb::after { content: attr(data-initial); position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: rgba(255, 255, 255, .92); text-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.thumb.wide { width: 64px; height: 40px; }
.thumb.square { width: 36px; height: 36px; border-radius: 6px; }
.table-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-top: 1px solid var(--line-soft); }
.tf-info { font-size: 10px; color: var(--ink-4); }
.pager { display: flex; align-items: center; gap: 2px; }
.pager button { display: grid; place-items: center; min-width: 25px; height: 25px; padding: 0 5px; border: 1px solid transparent; border-radius: 5px; font-size: 10px; color: var(--ink-3); }
.pager button:hover { background: var(--surface-2); border-color: var(--line); color: var(--ink); }
.pager button.is-active { background: var(--brand); border-color: var(--brand); color: #fff; }
.pager .pager-dots { padding: 0 2px; color: var(--ink-4); font-size: 10px; }
.bulk-bar {
  position: fixed;
  left: 50%;
  bottom: 22px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 9px 8px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 18px 40px -20px rgba(15, 23, 42, .7);
  transform: translate(-50%, 120%);
  opacity: 0;
  transition: transform var(--dur-3) var(--ease), opacity var(--dur-3);
  white-space: nowrap;
}
.bulk-bar.is-open { transform: translate(-50%, 0); opacity: 1; }
.bulk-bar strong { color: #fff; font-weight: 700; }
.bulk-bar .btn { height: 27px; }
.bulk-bar .btn.ghost { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .18); color: #fff; }
.bulk-bar .bulk-close { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 5px; color: rgba(255, 255, 255, .6); }
.bulk-bar .bulk-close:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.bulk-bar .ico { width: 13px; height: 13px; }

/* --------------------------------------------------------------------------
   Tabs / accordion
   -------------------------------------------------------------------------- */
.tabs { display: flex; align-items: center; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { position: relative; padding: 9px 11px 10px; font-size: 12px; font-weight: 450; color: var(--ink-3); white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; transition: color var(--dur-2), border-color var(--dur-2); }
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 550; }
.tab .tab-count { margin-left: 4px; font-size: 8.5px; opacity: .7; }
.tab-panel { display: none; animation: panelIn var(--dur-3) var(--ease); }
.tab-panel.is-active { display: block; }
@keyframes panelIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.tabs.pill { border-bottom: 0; gap: 4px; }
.tabs.pill .tab { border: 1px solid var(--line); border-radius: 6px; padding: 6px 10px; margin: 0; background: #fff; }
.tabs.pill .tab.is-active { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand); }

.accordion { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: #fff; }
.accordion-item + .accordion-item { border-top: 1px solid var(--line-soft); }
.acc-head { display: flex; align-items: center; gap: 9px; width: 100%; padding: 12px 14px; text-align: left; font-size: 12px; font-weight: 600; transition: background var(--dur-2); }
.acc-head:hover { background: var(--surface-2); }
.acc-head .ico { margin-left: auto; width: 14px; height: 14px; color: var(--ink-4); transition: transform var(--dur-3) var(--ease); }
.acc-head[aria-expanded="true"] .ico { transform: rotate(180deg); }
.acc-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--dur-3) var(--ease); }
.acc-body > div { overflow: hidden; }
.acc-item.is-open .acc-body { grid-template-rows: 1fr; }
.acc-inner { padding: 0 14px 13px; font-size: 11px; color: var(--ink-3); line-height: 1.65; }

/* --------------------------------------------------------------------------
   Overlays
   -------------------------------------------------------------------------- */
.overlay-layer { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 22px; opacity: 0; visibility: hidden; transition: opacity var(--dur-3), visibility var(--dur-3); }
.overlay-layer.is-open { opacity: 1; visibility: visible; }
.overlay-layer::before { content: ""; position: absolute; inset: 0; background: rgba(15, 23, 42, .4); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.modal { position: relative; display: flex; flex-direction: column; width: min(540px, 100%); max-height: min(86vh, 860px); background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 40px 90px -36px rgba(15, 23, 42, .5); transform: translateY(12px) scale(.985); opacity: 0; transition: transform var(--dur-4) var(--ease), opacity var(--dur-3); overflow: hidden; }
.overlay-layer.is-open .modal { transform: translateY(0) scale(1); opacity: 1; }
.modal.lg { width: min(780px, 100%); }
.modal.xl { width: min(1020px, 100%); }
.modal.sm { width: min(400px, 100%); }
.modal-head { display: flex; align-items: flex-start; gap: 12px; padding: 17px 19px 13px; border-bottom: 1px solid var(--line-soft); }
.modal-head-copy { min-width: 0; }
.modal-title { font-size: 15px; font-weight: 700; letter-spacing: -.02em; }
.modal-sub { margin-top: 2px; font-size: 10px; color: var(--ink-4); }
.modal-close { margin-left: auto; flex: 0 0 auto; }
.modal-body { padding: 18px 19px; overflow-y: auto; }
.modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 7px; padding: 12px 19px; border-top: 1px solid var(--line-soft); background: var(--surface-2); }
.modal-foot .foot-left { margin-right: auto; }
.confirm-illustration { display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px; border-radius: 11px; background: var(--danger-soft); color: var(--danger); }
.confirm-illustration .ico { width: 20px; height: 20px; }
.confirm-illustration.brand { background: var(--brand-soft); color: var(--brand); }

.drawer-layer { position: fixed; inset: 0; z-index: 200; visibility: hidden; }
.drawer-layer.is-open { visibility: visible; }
.drawer-layer::before { content: ""; position: absolute; inset: 0; background: rgba(15, 23, 42, .36); opacity: 0; transition: opacity var(--dur-3); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.drawer-layer.is-open::before { opacity: 1; }
.drawer { position: absolute; top: 10px; right: 10px; bottom: 10px; display: flex; flex-direction: column; width: min(460px, calc(100vw - 20px)); background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-3); transform: translateX(calc(100% + 20px)); transition: transform var(--dur-4) var(--ease); overflow: hidden; }
.drawer-layer.is-open .drawer { transform: translateX(0); }
.drawer.wide { width: min(620px, calc(100vw - 20px)); }
.drawer-head { display: flex; align-items: flex-start; gap: 12px; padding: 17px 18px 13px; border-bottom: 1px solid var(--line-soft); }
.drawer-body { flex: 1; overflow-y: auto; padding: 16px 18px; }
.drawer-foot { display: flex; justify-content: flex-end; gap: 7px; padding: 12px 18px; border-top: 1px solid var(--line-soft); background: var(--surface-2); }

.toast-stack { position: fixed; top: 14px; right: 14px; z-index: 300; display: flex; flex-direction: column; gap: 8px; width: min(340px, calc(100vw - 28px)); pointer-events: none; }
.toast { position: relative; display: flex; align-items: flex-start; gap: 9px; padding: 11px 12px; background: #fff; border: 1px solid var(--line); border-radius: 9px; box-shadow: var(--shadow-2); pointer-events: auto; overflow: hidden; animation: toastIn var(--dur-4) var(--ease); }
.toast.is-out { animation: toastOut var(--dur-3) var(--ease-soft) forwards; }
@keyframes toastIn { from { transform: translateX(20px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes toastOut { to { transform: translateX(16px); opacity: 0; } }
.toast-ico { display: grid; place-items: center; width: 24px; height: 24px; flex: 0 0 24px; border-radius: 6px; background: var(--brand-soft); color: var(--brand); }
.toast-ico .ico { width: 13px; height: 13px; }
.toast.ok .toast-ico { background: var(--ok-soft); color: var(--ok); }
.toast.warn .toast-ico { background: var(--warn-soft); color: var(--warn); }
.toast.danger .toast-ico { background: var(--danger-soft); color: var(--danger); }
.toast.info .toast-ico { background: var(--info-soft); color: var(--info); }
.toast-copy { min-width: 0; flex: 1; }
.toast-title { font-size: 11.5px; font-weight: 650; }
.toast-desc { margin-top: 1px; font-size: 10px; color: var(--ink-3); line-height: 1.5; }
.toast-close { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 4px; color: var(--ink-4); }
.toast-close:hover { background: var(--surface-3); color: var(--ink); }
.toast-close .ico { width: 11px; height: 11px; }
.toast-progress { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--brand); animation: toastBar linear forwards; }
.toast.ok .toast-progress { background: var(--ok); }
.toast.warn .toast-progress { background: var(--warn); }
.toast.danger .toast-progress { background: var(--danger); }
@keyframes toastBar { from { width: 100%; } to { width: 0; } }

/* Menus and popovers */
.menu-wrap { position: relative; display: inline-flex; }
.menu-pop { position: absolute; top: calc(100% + 7px); right: 0; z-index: 90; min-width: 180px; padding: 5px; background: #fff; border: 1px solid var(--line); border-radius: 9px; box-shadow: var(--shadow-2); opacity: 0; visibility: hidden; transform: translateY(-4px) scale(.98); transform-origin: top right; transition: opacity var(--dur-2), transform var(--dur-2) var(--ease), visibility var(--dur-2); }
.menu-pop.is-open { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.menu-pop.left { right: auto; left: 0; transform-origin: top left; }
.menu-pop.wide { min-width: 280px; }
.menu-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 8px; border-radius: 6px; font-size: 11.5px; color: var(--ink-2); text-align: left; transition: background var(--dur-1), color var(--dur-1); }
.menu-item:hover { background: var(--surface-2); color: var(--ink); }
.menu-item .ico { width: 13px; height: 13px; color: var(--ink-3); }
.menu-item .menu-hint { margin-left: auto; font-size: 9.5px; color: var(--ink-4); }
.menu-item.danger { color: var(--danger); }
.menu-item.danger .ico { color: var(--danger); }
.menu-item.danger:hover { background: var(--danger-soft); }
.menu-sep { height: 1px; margin: 4px 3px; background: var(--line-soft); }
.menu-label { padding: 5px 8px 3px; font-size: 8px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-4); }

.notice-pop { width: 320px; padding: 0; overflow: hidden; }
.notice-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 13px 8px; }
.notice-head strong { font-size: 12px; }
.notice-list { max-height: 300px; overflow-y: auto; }
.notice-item { display: flex; gap: 8px; padding: 9px 13px; border-top: 1px solid var(--line-soft); transition: background var(--dur-2); }
.notice-item:hover { background: var(--surface-2); }
.notice-item .notice-dot { width: 6px; height: 6px; margin-top: 5px; border-radius: 50%; background: var(--brand); flex: 0 0 6px; }
.notice-item.is-read .notice-dot { background: var(--line-strong); }
.notice-item-copy { min-width: 0; }
.notice-item-title { display: block; font-size: 11px; font-weight: 600; }
.notice-item-desc { display: block; margin-top: 1px; font-size: 10px; color: var(--ink-3); line-height: 1.5; }
.notice-item-time { display: block; margin-top: 2px; font-size: 8.5px; color: var(--ink-4); }
.notice-foot { padding: 7px; border-top: 1px solid var(--line-soft); }

/* Command palette */
.palette-layer { position: fixed; inset: 0; z-index: 300; display: flex; align-items: flex-start; justify-content: center; padding: 12vh 18px 18px; background: rgba(15, 23, 42, .38); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); opacity: 0; visibility: hidden; transition: opacity var(--dur-3), visibility var(--dur-3); }
.palette-layer.is-open { opacity: 1; visibility: visible; }
.palette { width: min(580px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 13px; box-shadow: var(--shadow-3); overflow: hidden; transform: translateY(-8px) scale(.99); transition: transform var(--dur-4) var(--ease); }
.palette-layer.is-open .palette { transform: translateY(0) scale(1); }
.palette-input { display: flex; align-items: center; gap: 9px; padding: 13px 15px; border-bottom: 1px solid var(--line-soft); }
.palette-input .ico { width: 16px; height: 16px; color: var(--ink-4); }
.palette-input input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 13px; }
.palette-results { max-height: 50vh; overflow-y: auto; padding: 6px; }
.palette-group-label { padding: 7px 9px 3px; font-size: 8px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-4); }
.palette-item { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 9px; border-radius: 6px; color: var(--ink-2); text-align: left; font-size: 12px; }
.palette-item .ico { width: 14px; height: 14px; color: var(--ink-3); }
.palette-item .pi-group { margin-left: auto; font-size: 9.5px; color: var(--ink-4); }
.palette-item.is-active, .palette-item:hover { background: var(--brand-soft); color: var(--brand); }
.palette-item.is-active .ico, .palette-item:hover .ico { color: var(--brand); }
.palette-empty { padding: 22px; text-align: center; font-size: 11.5px; color: var(--ink-4); }
.palette-foot { display: flex; align-items: center; gap: 10px; padding: 8px 13px; border-top: 1px solid var(--line-soft); background: var(--surface-2); font-size: 9.5px; color: var(--ink-4); }
.palette-foot .kbd { height: 16px; font-size: 8px; }
.palette-foot .pf-item { display: flex; align-items: center; gap: 4px; }

/* Tooltip */
[data-tip] { position: relative; }
[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 7px);
  transform: translate(-50%, 3px);
  padding: 4px 7px;
  border-radius: 5px;
  background: var(--ink);
  color: #fff;
  font-size: 9.5px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-2), transform var(--dur-2);
  z-index: 100;
}
[data-tip]:hover::after { opacity: 1; transform: translate(-50%, 0); }

/* --------------------------------------------------------------------------
   Charts
   -------------------------------------------------------------------------- */
.chart-box { position: relative; width: 100%; }
.chart-box canvas { width: 100% !important; display: block; }
.chart-box .chart-tip { position: absolute; z-index: 5; min-width: 98px; padding: 6px 8px; border-radius: 6px; background: var(--ink); color: #fff; font-size: 9.5px; line-height: 1.45; pointer-events: none; opacity: 0; transform: translate(-50%, -108%); transition: opacity var(--dur-1); white-space: nowrap; box-shadow: var(--shadow-2); }
.chart-box .chart-tip .tip-label { font-size: 8.5px; color: rgba(255, 255, 255, .5); }
.chart-box .chart-tip .tip-val { font-size: 12px; color: #fff; font-weight: 600; }
.chart-box .chart-tip .tip-row { display: flex; align-items: center; gap: 4px; }
.chart-box .chart-tip .tip-swatch { width: 5px; height: 5px; border-radius: 50%; }
.chart-box .chart-tip.is-on { opacity: 1; }
.chart-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.chart-legend { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; font-size: 10px; color: var(--ink-3); }
.chart-legend .cl-item { display: flex; align-items: center; gap: 4px; }
.chart-legend .cl-swatch { width: 6px; height: 6px; border-radius: 2px; }
.chart-legend .cl-val { font-weight: 600; color: var(--ink-2); }
.chart-empty { display: grid; place-items: center; min-height: 140px; font-size: 11px; color: var(--ink-4); }

/* --------------------------------------------------------------------------
   Progress / skeleton / empty / timeline
   -------------------------------------------------------------------------- */
.progress { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: var(--brand); width: 0; transition: width .9s var(--ease); }
.progress.sun > span { background: var(--amber); }
.progress.ok > span { background: var(--teal); }
.progress.sm { height: 4px; }
.progress-label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; font-size: 10px; color: var(--ink-3); }
.meter { display: flex; align-items: center; gap: 8px; }
.meter-track { flex: 1; height: 5px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.meter-fill { height: 100%; border-radius: inherit; background: var(--tone, var(--brand)); transition: width .9s var(--ease); }
.meter-val { min-width: 34px; text-align: right; font-size: 9.5px; color: var(--ink-3); }
.skeleton { position: relative; overflow: hidden; background: var(--surface-3); border-radius: 5px; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .7), transparent); animation: shimmer 1.4s infinite; }
@keyframes shimmer { 100% { transform: translateX(100%); } }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 40px 18px; text-align: center; }
.empty-art { width: 96px; height: 76px; color: var(--line-strong); margin-bottom: 4px; }
.empty-title { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.empty-desc { max-width: 34ch; font-size: 11px; line-height: 1.6; color: var(--ink-4); }
.empty-state .btn { margin-top: 7px; }
.empty-mini { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 16px; border: 1px dashed var(--line); border-radius: 7px; font-size: 11px; color: var(--ink-4); }

.timeline { position: relative; }
.timeline::before { content: ""; position: absolute; left: 14px; top: 5px; bottom: 5px; width: 1px; background: var(--line); }
.tl-item { position: relative; display: flex; gap: 10px; padding-bottom: 15px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-node { position: relative; z-index: 1; display: grid; place-items: center; width: 29px; height: 29px; flex: 0 0 29px; border-radius: 50%; background: #fff; border: 1px solid var(--line); color: var(--ink-3); }
.tl-node .ico { width: 12px; height: 12px; }
.tl-node.ok { background: var(--ok-soft); color: var(--ok); border-color: var(--ok-line); }
.tl-node.warn { background: var(--warn-soft); color: var(--warn); border-color: var(--warn-line); }
.tl-node.brand { background: var(--brand-soft); color: var(--brand); border-color: var(--brand-line); }
.tl-copy { padding-top: 3px; min-width: 0; }
.tl-title { font-size: 11.5px; font-weight: 600; }
.tl-desc { margin-top: 1px; font-size: 10px; color: var(--ink-3); line-height: 1.5; }
.tl-time { margin-top: 3px; font-size: 9.5px; color: var(--ink-4); display: flex; align-items: center; gap: 4px; }

.steps { display: flex; align-items: center; gap: 0; }
.step { display: flex; align-items: center; gap: 7px; flex: 1; min-width: 0; }
.step-node { display: grid; place-items: center; width: 26px; height: 26px; flex: 0 0 26px; border: 1px solid var(--line-strong); border-radius: 50%; background: #fff; font-size: 9.5px; font-weight: 700; color: var(--ink-3); transition: all var(--dur-3); }
.step-title { font-size: 11px; font-weight: 600; color: var(--ink-3); white-space: nowrap; }
.step-desc { font-size: 9.5px; color: var(--ink-4); white-space: nowrap; }
.step-line { flex: 1; height: 1px; margin: 0 8px; background: var(--line); }
.step.is-active .step-node { border-color: var(--brand); background: var(--brand); color: #fff; }
.step.is-active .step-title { color: var(--ink); }
.step.is-done .step-node { border-color: var(--brand-line); background: var(--brand-soft); color: var(--brand); }
.step.is-done .step-line { background: var(--brand-line); }

/* --------------------------------------------------------------------------
   Lists / misc
   -------------------------------------------------------------------------- */
.list-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); min-width: 0; }
.list-row:last-child { border-bottom: 0; }
.list-copy { flex: 1; min-width: 0; }
.list-title { font-size: 11.5px; font-weight: 600; color: var(--ink); display: flex; align-items: center; gap: 5px; }
.list-desc { margin-top: 1px; font-size: 10px; line-height: 1.5; color: var(--ink-4); }
.list-side { margin-left: auto; flex: 0 0 auto; text-align: right; }
.kv { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line-soft); font-size: 11px; }
.kv:last-child { border-bottom: 0; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; text-align: right; font-weight: 500; color: var(--ink-2); }
.quote { padding: 12px 14px; border-left: 2px solid var(--brand); border-radius: 0 7px 7px 0; background: var(--brand-soft); font-size: 11px; line-height: 1.65; color: var(--ink-2); }
.dashed-note { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border: 1px dashed var(--line-strong); border-radius: 7px; background: var(--surface-2); font-size: 10px; line-height: 1.6; color: var(--ink-3); }
.dashed-note .ico { width: 14px; height: 14px; flex: 0 0 14px; color: var(--brand); margin-top: 1px; }
.stat-row { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.stat-block { display: grid; gap: 1px; }
.stat-block .sb-label { font-size: 9.5px; color: var(--ink-4); }
.stat-block .sb-value { font-size: 18px; font-weight: 650; letter-spacing: -.02em; color: var(--ink); }
.stat-block .sb-value small { font-size: 9.5px; color: var(--ink-4); font-weight: 400; }
.rank-list { display: flex; flex-direction: column; }
.rank-row { display: flex; align-items: center; gap: 9px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.rank-row:last-child { border-bottom: 0; }
.rank-no { display: grid; place-items: center; width: 19px; height: 19px; flex: 0 0 19px; border-radius: 4px; background: var(--surface-3); font-size: 9.5px; font-weight: 700; color: var(--ink-3); }
.rank-row:nth-child(1) .rank-no { background: var(--brand); color: #fff; }
.rank-row:nth-child(2) .rank-no { background: var(--brand-soft); color: var(--brand); }
.rank-row:nth-child(3) .rank-no { background: var(--amber-soft); color: var(--amber); }
.media-copy { min-width: 0; flex: 1; }
.media-name { font-size: 11.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-sub { margin-top: 1px; font-size: 9.5px; color: var(--ink-4); display: flex; align-items: center; gap: 4px; }
.media-side { text-align: right; flex: 0 0 auto; }
.media-side .num { font-size: 12px; font-weight: 600; }
.media-side small { display: block; font-size: 8px; color: var(--ink-4); }
.quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.quick-item { display: flex; align-items: center; gap: 8px; padding: 9px; border: 1px solid var(--line); border-radius: 7px; font-size: 11px; font-weight: 500; color: var(--ink-2); transition: all var(--dur-2); }
.quick-item:hover { border-color: var(--brand-line); background: var(--brand-soft); color: var(--brand); }
.quick-item .qi { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; background: var(--surface-3); color: var(--ink-3); }
.quick-item .qi .ico { width: 13px; height: 13px; }
.quick-item:hover .qi { background: #fff; color: var(--brand); }
.quick-item .arrow { margin-left: auto; width: 11px; height: 11px; opacity: .4; }

/* Skeleton page-load */
.page-loading { pointer-events: none; }
.page-loading .skeleton-line { height: 10px; margin: 7px 0; }
.page-loading .skeleton-line.w60 { width: 60%; }
.page-loading .skeleton-line.w40 { width: 40%; }

@media (max-width: 860px) {
  .metric-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric:nth-child(3) { border-left: 0; border-top: 1px solid var(--line-soft); }
  .metric:nth-child(4) { border-top: 1px solid var(--line-soft); }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .quick-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .metric-row { grid-template-columns: minmax(0, 1fr); }
  .metric + .metric { border-left: 0; border-top: 1px solid var(--line-soft); }
  .modal-foot, .drawer-foot { flex-wrap: wrap; }
  .card { padding: 14px; }
}
