/*
 * ENAHUB application UI kit: client zone and back office.
 * Quiet, dense and neutral on purpose. The public site sells; this works.
 * Class prefix: eh-
 */

:root {
  --eh-primary: #2e3192;
  --eh-primary-hover: #3d41ad;
  --eh-primary-active: #232676;
  --eh-primary-bg: #eef0fb;
  --eh-primary-border: #c5c8ee;

  --eh-text: #1c1f33;
  --eh-text-secondary: #585d75;
  --eh-text-disabled: #9ea2b5;
  --eh-heading: #14162e;

  --eh-bg-layout: #f3f4f8;
  --eh-bg-container: #ffffff;
  --eh-bg-subtle: #fafafc;
  --eh-bg-hover: #f5f6fa;
  --eh-border: #d9dbe6;
  --eh-border-light: #ebedf3;

  --eh-success: #1f7a4d;
  --eh-success-bg: #e8f5ee;
  --eh-success-border: #b5dcc6;
  --eh-warning: #96580a;
  --eh-warning-bg: #fdf3e1;
  --eh-warning-border: #ecd09a;
  --eh-danger: #b3261e;
  --eh-danger-bg: #fdecea;
  --eh-danger-border: #f0b9b4;
  --eh-info: #1d5a8a;
  --eh-info-bg: #e7f2fa;
  --eh-info-border: #b4d3ea;

  --eh-sider: #14162e;
  --eh-sider-hover: #23264a;
  --eh-sider-text: #c5c8dd;

  --eh-radius: 6px;
  --eh-radius-lg: 8px;
  --eh-control-h: 34px;
  --eh-shadow: 0 1px 2px rgba(20, 22, 46, 0.06), 0 1px 6px rgba(20, 22, 46, 0.04);
  --eh-shadow-pop: 0 6px 24px rgba(20, 22, 46, 0.16), 0 2px 6px rgba(20, 22, 46, 0.08);
  --eh-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --eh-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --eh-z-sider: 100;
  --eh-z-header: 90;
  --eh-z-backdrop: 900;
  --eh-z-drawer: 910;
  --eh-z-modal: 920;
  --eh-z-toast: 1000;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body.eh-app {
  margin: 0;
  font-family: var(--eh-font);
  font-size: 14px;
  line-height: 1.5715;
  color: var(--eh-text);
  background: var(--eh-bg-layout);
  -webkit-font-smoothing: antialiased;
}

.eh-app a { color: var(--eh-primary); text-decoration: none; }
.eh-app a:hover { color: var(--eh-primary-hover); text-decoration: underline; }
.eh-app h1, .eh-app h2, .eh-app h3, .eh-app h4 { margin: 0; color: var(--eh-heading); font-weight: 600; }
.eh-app p { margin: 0; }
.eh-app :focus-visible { outline: 2px solid var(--eh-primary); outline-offset: 2px; }

/* ---------- Layout ---------- */

.eh-layout { display: flex; min-height: 100vh; }

.eh-sider {
  flex: 0 0 232px;
  width: 232px;
  background: var(--eh-sider);
  color: var(--eh-sider-text);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: var(--eh-z-sider);
}

.eh-sider--light { background: var(--eh-bg-container); color: var(--eh-text); border-right: 1px solid var(--eh-border-light); }

.eh-brand { display: flex; align-items: center; gap: 10px; padding: 16px 20px; min-height: 56px; color: #fff; font-size: 16px; font-weight: 600; }
.eh-sider--light .eh-brand { color: var(--eh-heading); }
.eh-brand__mark { flex: none; width: 26px; height: 26px; }
.eh-brand small { display: block; font-size: 12px; font-weight: 400; color: var(--eh-sider-text); }
.eh-sider--light .eh-brand small { color: var(--eh-text-secondary); }

.eh-menu { list-style: none; margin: 0; padding: 4px 8px 16px; display: flex; flex-direction: column; gap: 2px; }
.eh-menu__group { padding: 14px 12px 4px; font-size: 12px; color: #8b8fb0; }
.eh-sider--light .eh-menu__group { color: var(--eh-text-secondary); }

.eh-app .eh-menu__item {
  display: flex; align-items: center; gap: 10px;
  min-height: 38px; padding: 0 12px;
  border-radius: var(--eh-radius);
  color: var(--eh-sider-text);
  cursor: pointer;
  text-decoration: none !important;
  border: 0; background: none; width: 100%; text-align: left; font: inherit;
}
.eh-app .eh-menu__item:hover { background: var(--eh-sider-hover); color: #fff; }
.eh-app .eh-menu__item.is-active { background: var(--eh-primary); color: #fff; font-weight: 600; }
.eh-menu__item svg { flex: none; width: 16px; height: 16px; }
.eh-menu__label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.eh-app .eh-sider--light .eh-menu__item { color: var(--eh-text); }
.eh-app .eh-sider--light .eh-menu__item:hover { background: var(--eh-bg-hover); color: var(--eh-text); }
.eh-app .eh-sider--light .eh-menu__item.is-active { background: var(--eh-primary-bg); color: var(--eh-primary); }

.eh-menu__count { flex: none; min-width: 20px; padding: 0 6px; border-radius: 10px; background: rgba(255, 255, 255, 0.16); color: #fff; font-size: 12px; line-height: 20px; text-align: center; font-weight: 600; }
.eh-menu__count--alert { background: #d9482b; }
.eh-sider--light .eh-menu__count { background: var(--eh-primary-bg); color: var(--eh-primary); }
.eh-sider--light .eh-menu__count--alert { background: var(--eh-danger); color: #fff; }

.eh-sider__foot { margin-top: auto; padding: 12px 20px 16px; border-top: 1px solid rgba(255, 255, 255, 0.1); font-size: 13px; }
.eh-sider--light .eh-sider__foot { border-top-color: var(--eh-border-light); }
.eh-sider:not(.eh-sider--light) .eh-sider__foot a { color: var(--eh-sider-text); }
.eh-sider:not(.eh-sider--light) .eh-sider__foot a:hover { color: #fff; }

.eh-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.eh-header {
  display: flex; align-items: center; gap: 16px;
  min-height: 56px; padding: 8px 24px;
  background: var(--eh-bg-container);
  border-bottom: 1px solid var(--eh-border-light);
  position: sticky; top: 0; z-index: var(--eh-z-header);
}
.eh-header__title { font-size: 15px; font-weight: 600; color: var(--eh-heading); }
.eh-header__spacer { flex: 1; }
.eh-header__user { display: flex; align-items: center; gap: 10px; }

.eh-avatar { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--eh-primary-bg); color: var(--eh-primary); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; }

.eh-banner { display: flex; align-items: center; gap: 10px; padding: 8px 24px; background: var(--eh-warning-bg); border-bottom: 1px solid var(--eh-warning-border); color: #5c3605; font-size: 13px; }
.eh-banner strong { font-weight: 600; }

.eh-content { flex: 1; padding: 20px 24px 48px; max-width: 1480px; width: 100%; }

.eh-page-header { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px 24px; margin-bottom: 16px; }
.eh-page-header h1 { font-size: 20px; line-height: 28px; }
.eh-page-header__sub { color: var(--eh-text-secondary); margin-top: 2px; }
.eh-page-header__actions { display: flex; flex-wrap: wrap; gap: 8px; }

.eh-breadcrumb { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--eh-text-secondary); margin-bottom: 6px; }
.eh-breadcrumb a { color: var(--eh-text-secondary); }
.eh-breadcrumb span[aria-hidden] { color: var(--eh-text-disabled); }

.eh-row { display: grid; gap: 16px; }
.eh-row--2 { grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); }
.eh-row--3 { grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); }
.eh-row--4 { grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr)); }
.eh-stack { display: flex; flex-direction: column; gap: 16px; }
.eh-space { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.eh-space--between { justify-content: space-between; }
.eh-muted { color: var(--eh-text-secondary); }
.eh-small { font-size: 12px; }
.eh-mono { font-family: var(--eh-mono); font-size: 13px; }
.eh-nowrap { white-space: nowrap; }
.eh-right { text-align: right; }
.eh-hide { display: none !important; }

/* ---------- Card ---------- */

.eh-card { background: var(--eh-bg-container); border: 1px solid var(--eh-border-light); border-radius: var(--eh-radius-lg); box-shadow: var(--eh-shadow); min-width: 0; }
.eh-card__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 12px 20px; border-bottom: 1px solid var(--eh-border-light); min-height: 52px; }
.eh-card__title { font-size: 15px; font-weight: 600; color: var(--eh-heading); }
.eh-card__body { padding: 16px 20px; }
.eh-card__body--flush { padding: 0; }
.eh-card__foot { padding: 10px 20px; border-top: 1px solid var(--eh-border-light); color: var(--eh-text-secondary); font-size: 13px; }

/* ---------- Statistic ---------- */

.eh-stat { padding: 16px 20px; }
.eh-stat__label { color: var(--eh-text-secondary); font-size: 13px; }
.eh-stat__value { font-size: 26px; line-height: 34px; font-weight: 600; color: var(--eh-heading); font-variant-numeric: tabular-nums; }
.eh-stat__hint { font-size: 12px; color: var(--eh-text-secondary); }
.eh-stat--alert .eh-stat__value { color: var(--eh-danger); }

/* ---------- Buttons ---------- */

.eh-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: var(--eh-control-h); padding: 0 14px;
  border: 1px solid var(--eh-border); border-radius: var(--eh-radius);
  background: var(--eh-bg-container); color: var(--eh-text);
  font: inherit; font-weight: 500; line-height: 1; white-space: nowrap;
  cursor: pointer; text-decoration: none !important;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.eh-btn:hover { border-color: var(--eh-primary); color: var(--eh-primary); }
.eh-btn svg { width: 14px; height: 14px; }
.eh-btn--primary { background: var(--eh-primary); border-color: var(--eh-primary); color: #fff !important; }
.eh-btn--primary:hover { background: var(--eh-primary-hover); border-color: var(--eh-primary-hover); color: #fff; }
.eh-btn--primary:active { background: var(--eh-primary-active); }
.eh-btn--danger { color: var(--eh-danger); border-color: var(--eh-danger-border); }
.eh-btn--danger:hover { color: #fff; background: var(--eh-danger); border-color: var(--eh-danger); }
.eh-btn--text { border-color: transparent; background: none; color: var(--eh-primary); padding: 0 8px; }
.eh-btn--text:hover { background: var(--eh-primary-bg); border-color: transparent; }
.eh-btn--sm { height: 28px; padding: 0 10px; font-size: 13px; }
.eh-btn--lg { height: 42px; padding: 0 20px; font-size: 15px; }
.eh-btn--block { width: 100%; }
.eh-btn[disabled] { opacity: 0.5; cursor: not-allowed; }

/* ---------- Forms ---------- */

.eh-form { display: flex; flex-direction: column; gap: 16px; }
.eh-form-item { display: flex; flex-direction: column; gap: 6px; }
.eh-form-item > label, .eh-label { font-weight: 500; color: var(--eh-heading); }
.eh-form-item__help { font-size: 13px; color: var(--eh-text-secondary); }
.eh-form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 16px; }

.eh-input, .eh-select, .eh-textarea {
  width: 100%; height: var(--eh-control-h); padding: 0 11px;
  border: 1px solid var(--eh-border); border-radius: var(--eh-radius);
  background: var(--eh-bg-container); color: var(--eh-text); font: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.eh-textarea { height: auto; min-height: 84px; padding: 8px 11px; resize: vertical; }
.eh-input:hover, .eh-select:hover, .eh-textarea:hover { border-color: var(--eh-primary); }
.eh-input:focus, .eh-select:focus, .eh-textarea:focus { outline: none; border-color: var(--eh-primary); box-shadow: 0 0 0 3px rgba(46, 49, 146, 0.14); }
.eh-input::placeholder, .eh-textarea::placeholder { color: #6f748c; opacity: 1; }
.eh-input--search { max-width: 320px; }
.eh-input-group { display: flex; align-items: center; }
.eh-input-group .eh-input { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.eh-input-group__addon { height: var(--eh-control-h); padding: 0 11px; display: inline-flex; align-items: center; border: 1px solid var(--eh-border); border-left: 0; border-radius: 0 var(--eh-radius) var(--eh-radius) 0; background: var(--eh-bg-subtle); color: var(--eh-text-secondary); white-space: nowrap; }

.eh-check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.eh-check input { width: 16px; height: 16px; accent-color: var(--eh-primary); margin: 0; }

.eh-switch { position: relative; display: inline-block; width: 40px; height: 22px; flex: none; }
.eh-switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; width: 100%; height: 100%; }
.eh-switch__track { position: absolute; inset: 0; border-radius: 11px; background: #a9adc0; transition: background 0.15s; pointer-events: none; }
.eh-switch__track::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25); transition: transform 0.15s; }
.eh-switch input:checked + .eh-switch__track { background: var(--eh-primary); }
.eh-switch input:checked + .eh-switch__track::after { transform: translateX(18px); }
.eh-switch input:focus-visible + .eh-switch__track { outline: 2px solid var(--eh-primary); outline-offset: 2px; }

.eh-segmented { display: inline-flex; padding: 2px; border-radius: var(--eh-radius); background: #e9ebf2; gap: 2px; }
.eh-segmented button { height: 30px; padding: 0 12px; border: 0; border-radius: 4px; background: none; font: inherit; color: var(--eh-text-secondary); cursor: pointer; }
.eh-segmented button.is-active { background: #fff; color: var(--eh-heading); font-weight: 600; box-shadow: var(--eh-shadow); }

/* ---------- Table ---------- */

.eh-table-wrap { overflow-x: auto; }
.eh-table { width: 100%; border-collapse: collapse; text-align: left; }
.eh-table th { padding: 10px 16px; background: var(--eh-bg-subtle); border-bottom: 1px solid var(--eh-border-light); color: var(--eh-heading); font-weight: 600; font-size: 13px; white-space: nowrap; }
.eh-table th.is-sortable { cursor: pointer; user-select: none; }
.eh-table th.is-sortable:hover { background: #f0f1f6; }
.eh-table th .eh-sort { margin-left: 4px; color: var(--eh-text-disabled); font-size: 11px; }
.eh-table th.is-sorted .eh-sort { color: var(--eh-primary); }
.eh-table td { padding: 10px 16px; border-bottom: 1px solid var(--eh-border-light); vertical-align: middle; }
.eh-table tbody tr:last-child td { border-bottom: 0; }
.eh-table tbody tr:hover td { background: var(--eh-bg-hover); }
.eh-table tr.is-clickable { cursor: pointer; }
.eh-table .eh-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.eh-table--compact th, .eh-table--compact td { padding: 7px 12px; }
.eh-table__actions { display: flex; gap: 4px; justify-content: flex-end; white-space: nowrap; }
.eh-table__primary { font-weight: 600; color: var(--eh-heading); }
.eh-table__sub { display: block; font-size: 12px; color: var(--eh-text-secondary); }

.eh-table-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 20px; border-bottom: 1px solid var(--eh-border-light); }
.eh-table-toolbar__spacer { flex: 1; }

.eh-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; padding: 10px 16px; border-top: 1px solid var(--eh-border-light); font-size: 13px; color: var(--eh-text-secondary); }
.eh-pagination button { min-width: 30px; height: 30px; padding: 0 8px; border: 1px solid var(--eh-border); border-radius: var(--eh-radius); background: #fff; font: inherit; cursor: pointer; }
.eh-pagination button.is-active { border-color: var(--eh-primary); color: var(--eh-primary); font-weight: 600; }
.eh-pagination button[disabled] { opacity: 0.4; cursor: not-allowed; }

.eh-empty { padding: 40px 20px; text-align: center; color: var(--eh-text-secondary); }
.eh-empty strong { display: block; color: var(--eh-heading); margin-bottom: 4px; }

/* ---------- Tag, badge, progress ---------- */

.eh-tag { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border: 1px solid var(--eh-border); border-radius: 4px; background: var(--eh-bg-subtle); color: var(--eh-text); font-size: 12px; line-height: 20px; white-space: nowrap; }
.eh-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.eh-tag--plain::before { display: none; }
.eh-tag--success { background: var(--eh-success-bg); border-color: var(--eh-success-border); color: var(--eh-success); }
.eh-tag--warning { background: var(--eh-warning-bg); border-color: var(--eh-warning-border); color: var(--eh-warning); }
.eh-tag--danger { background: var(--eh-danger-bg); border-color: var(--eh-danger-border); color: var(--eh-danger); }
.eh-tag--info { background: var(--eh-info-bg); border-color: var(--eh-info-border); color: var(--eh-info); }
.eh-tag--primary { background: var(--eh-primary-bg); border-color: var(--eh-primary-border); color: var(--eh-primary); }
.eh-tag--muted { color: var(--eh-text-secondary); }

.eh-progress { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.eh-progress__bar { flex: 1; height: 6px; border-radius: 3px; background: #e6e8f0; overflow: hidden; }
.eh-progress__fill { height: 100%; border-radius: 3px; background: var(--eh-primary); }
.eh-progress__fill--warn { background: #c7790f; }
.eh-progress__text { flex: none; font-size: 12px; color: var(--eh-text-secondary); font-variant-numeric: tabular-nums; }

/* ---------- Descriptions ---------- */

.eh-desc { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 0; margin: 0; }
.eh-desc__item { display: flex; gap: 12px; padding: 10px 20px; border-bottom: 1px solid var(--eh-border-light); min-width: 0; }
.eh-desc__item dt { flex: 0 0 132px; color: var(--eh-text-secondary); }
.eh-desc__item dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.eh-desc--single { grid-template-columns: 1fr; }

/* ---------- Tabs ---------- */

.eh-tabs__nav { display: flex; gap: 4px; padding: 0 20px; border-bottom: 1px solid var(--eh-border-light); overflow-x: auto; }
.eh-tabs__tab { height: 44px; padding: 0 12px; border: 0; border-bottom: 2px solid transparent; background: none; font: inherit; color: var(--eh-text-secondary); cursor: pointer; white-space: nowrap; }
.eh-tabs__tab:hover { color: var(--eh-primary); }
.eh-tabs__tab.is-active { color: var(--eh-primary); border-bottom-color: var(--eh-primary); font-weight: 600; }
.eh-tabs__panel { padding: 0; }

/* ---------- Steps ---------- */

.eh-steps { display: flex; flex-wrap: wrap; gap: 8px 0; list-style: none; margin: 0; padding: 0; }
.eh-steps__item { flex: 1 1 140px; display: flex; align-items: flex-start; gap: 10px; min-width: 0; padding-right: 16px; position: relative; }
.eh-steps__dot { flex: none; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--eh-border); background: #fff; color: var(--eh-text-secondary); display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; }
.eh-steps__item.is-done .eh-steps__dot { background: var(--eh-primary-bg); border-color: var(--eh-primary); color: var(--eh-primary); }
.eh-steps__item.is-current .eh-steps__dot { background: var(--eh-primary); border-color: var(--eh-primary); color: #fff; }
.eh-steps__title { font-weight: 600; color: var(--eh-heading); }
.eh-steps__item:not(.is-done):not(.is-current) .eh-steps__title { color: var(--eh-text-secondary); font-weight: 500; }
.eh-steps__desc { font-size: 12px; color: var(--eh-text-secondary); }

/* ---------- Timeline ---------- */

.eh-timeline { list-style: none; margin: 0; padding: 0; }
.eh-timeline__item { position: relative; padding: 0 0 16px 22px; }
.eh-timeline__item::before { content: ""; position: absolute; left: 4px; top: 6px; width: 9px; height: 9px; border-radius: 50%; border: 2px solid var(--eh-primary); background: #fff; }
.eh-timeline__item::after { content: ""; position: absolute; left: 8px; top: 18px; bottom: 0; width: 1px; background: var(--eh-border); }
.eh-timeline__item:last-child { padding-bottom: 0; }
.eh-timeline__item:last-child::after { display: none; }
.eh-timeline__time { font-size: 12px; color: var(--eh-text-secondary); }

/* ---------- Alert ---------- */

.eh-alert { display: flex; gap: 10px; padding: 10px 14px; border: 1px solid var(--eh-info-border); border-radius: var(--eh-radius); background: var(--eh-info-bg); color: #123c5c; }
.eh-alert--warning { border-color: var(--eh-warning-border); background: var(--eh-warning-bg); color: #5c3605; }
.eh-alert--danger { border-color: var(--eh-danger-border); background: var(--eh-danger-bg); color: #7a1a15; }
.eh-alert--success { border-color: var(--eh-success-border); background: var(--eh-success-bg); color: #14543a; }
.eh-alert__body { flex: 1; min-width: 0; }
.eh-alert__title { font-weight: 600; }
.eh-alert__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }

/* ---------- Modal and drawer ---------- */

.eh-backdrop { position: fixed; inset: 0; background: rgba(20, 22, 46, 0.45); z-index: var(--eh-z-backdrop); }

.eh-modal { position: fixed; inset: 0; z-index: var(--eh-z-modal); display: flex; align-items: flex-start; justify-content: center; padding: 8vh 16px 16px; overflow-y: auto; }
.eh-modal__box { width: 100%; max-width: 520px; background: #fff; border-radius: var(--eh-radius-lg); box-shadow: var(--eh-shadow-pop); }
.eh-modal__box--wide { max-width: 720px; }
.eh-modal__head, .eh-drawer__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--eh-border-light); }
.eh-modal__title, .eh-drawer__title { font-size: 16px; font-weight: 600; color: var(--eh-heading); }
.eh-modal__body { padding: 20px; }
.eh-modal__foot, .eh-drawer__foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--eh-border-light); }
.eh-close { width: 30px; height: 30px; border: 0; border-radius: var(--eh-radius); background: none; color: var(--eh-text-secondary); font-size: 20px; line-height: 1; cursor: pointer; }
.eh-close:hover { background: var(--eh-bg-hover); color: var(--eh-text); }

.eh-drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: var(--eh-z-drawer); width: min(560px, 100vw); background: #fff; box-shadow: var(--eh-shadow-pop); display: flex; flex-direction: column; }
.eh-drawer__body { flex: 1; overflow-y: auto; padding: 20px; }

/* ---------- Toast ---------- */

.eh-toasts { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: var(--eh-z-toast); display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.eh-toast { padding: 9px 16px; border-radius: var(--eh-radius-lg); background: #fff; box-shadow: var(--eh-shadow-pop); border: 1px solid var(--eh-border-light); display: flex; align-items: center; gap: 8px; }
.eh-toast::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--eh-success); }
.eh-toast--error::before { background: var(--eh-danger); }
.eh-toast--info::before { background: var(--eh-info); }

/* ---------- List ---------- */

.eh-list { list-style: none; margin: 0; padding: 0; }
.eh-list__item { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 12px 20px; border-bottom: 1px solid var(--eh-border-light); }
.eh-list__item:last-child { border-bottom: 0; }
.eh-list__main { flex: 1 1 260px; min-width: 0; }
.eh-list__title { font-weight: 600; color: var(--eh-heading); }

/* ---------- Matrix (permissions, notifications) ---------- */

.eh-matrix th:not(:first-child), .eh-matrix td:not(:first-child) { text-align: center; }
.eh-matrix input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--eh-primary); }
.eh-yes { color: var(--eh-success); font-weight: 600; }
.eh-no { color: var(--eh-text-disabled); }

/* ---------- Sparkline bars ---------- */

.eh-bars { display: flex; align-items: flex-end; gap: 2px; height: 44px; }
.eh-bars span { flex: 1 1 0; min-width: 0; border-radius: 2px; background: var(--eh-primary); }
.eh-bars span.is-bad { background: #c7790f; }

/* ---------- Sign-in page ---------- */

.eh-auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.eh-auth__box { width: 100%; max-width: 400px; }
.eh-auth__brand { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 20px; font-size: 20px; font-weight: 600; color: var(--eh-heading); }
.eh-auth__foot { margin-top: 16px; text-align: center; font-size: 13px; color: var(--eh-text-secondary); }

/* ---------- Mobile ---------- */

.eh-tabbar { display: none; }

@media (max-width: 900px) {
  .eh-layout { flex-direction: column; }
  .eh-sider { position: static; flex: none; width: 100%; height: auto; }
  .eh-sider .eh-menu { flex-direction: row; overflow-x: auto; padding: 4px 8px 8px; }
  .eh-sider .eh-menu__item { width: auto; flex: none; }
  .eh-sider .eh-menu__group, .eh-sider__foot { display: none; }
  .eh-header { padding: 8px 16px; position: static; }
  .eh-content { padding: 16px 16px 48px; }
  .eh-banner { padding: 8px 16px; }
  .eh-desc__item dt { flex-basis: 110px; }
  .eh-drawer { width: 100vw; }
}

@media (prefers-reduced-motion: reduce) {
  .eh-app * { transition: none !important; }
}
