:root {
  --ink: #172033;
  --muted: #687286;
  --subtle: #9aa4b5;
  --line: #e4e8ee;
  --line-strong: #d6dce5;
  --paper: #ffffff;
  --canvas: #f6f8fb;
  --navy: #223149;
  --blue: #2d6cdf;
  --blue-soft: #eaf1ff;
  --green: #1e9d6a;
  --green-soft: #e8f7f0;
  --amber: #b77612;
  --amber-soft: #fff4df;
  --red: #c74444;
  --red-soft: #fff0f0;
  --shadow: 0 12px 30px rgba(24, 40, 67, 0.07);
  --radius: 8px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--canvas);
  color: var(--ink);
  font-size: 14px;
}

button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .68; transform: none; }

.login-shell { min-height: 100vh; background: #fff; }
.public-header { position: sticky; top: 0; z-index: 20; display: flex; min-height: 68px; align-items: center; justify-content: space-between; gap: 24px; padding: 0 max(28px, calc((100vw - 1180px) / 2)); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.96); }
.public-brand { display: flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; }
.public-brand strong, .public-brand small { display: block; letter-spacing: 0; }
.public-brand strong { font-size: 17px; }
.public-brand small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.public-nav { display: flex; align-items: center; gap: 25px; }
.public-nav a { color: var(--muted); font-size: 12px; font-weight: 650; text-decoration: none; }
.public-nav a:hover { color: var(--blue); }
.public-nav .public-login-link { min-height: 36px; display: inline-flex; align-items: center; padding: 0 15px; border: 1px solid var(--blue); border-radius: 6px; color: var(--blue); }
.public-main { min-height: calc(100vh - 68px); }
.public-hero { position: relative; min-height: min(700px, calc(100vh - 68px)); display: flex; align-items: flex-end; overflow: hidden; padding: 70px max(28px, calc((100vw - 1180px) / 2)); color: #fff; background: #16243a url('/static/qishifa-dashboard-preview.png') center 16% / cover no-repeat; }
.public-hero-shade { position: absolute; inset: 0 auto 0 0; width: min(780px, 70vw); background: rgba(12,26,49,.82); }
.public-hero-copy { position: relative; z-index: 1; width: min(650px, 100%); padding-bottom: 22px; }
.public-kicker { display: inline-flex; align-items: center; min-height: 30px; padding: 0 10px; border: 1px solid rgba(255,255,255,.32); border-radius: 5px; background: rgba(19,122,75,.82); font-size: 12px; font-weight: 750; }
.public-hero h1 { margin: 18px 0 13px; font-size: 62px; line-height: 1.05; letter-spacing: 0; }
.public-hero p { max-width: 610px; margin: 0; color: rgba(255,255,255,.86); font-size: 18px; line-height: 1.75; }
.public-hero-actions { display: flex; gap: 12px; margin-top: 30px; }
.public-hero-actions a { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 20px; border-radius: 6px; font-size: 13px; font-weight: 750; text-decoration: none; }
.public-primary-action { color: #fff; background: var(--blue); }
.public-secondary-action { border: 1px solid rgba(255,255,255,.56); color: #fff; background: rgba(255,255,255,.08); }
.public-policy-band { padding: 78px 28px; background: #f1f8f4; }
.public-section-inner { width: min(1180px, 100%); margin: 0 auto; }
.public-section-heading { max-width: 760px; }
.public-section-heading > span, .public-login-intro > span { color: var(--green); font-size: 12px; font-weight: 750; }
.public-section-heading h2, .public-login-intro h2 { margin: 8px 0 12px; font-size: 32px; line-height: 1.3; letter-spacing: 0; }
.public-section-heading p, .public-login-intro p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.8; }
.public-policy-points { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: 42px; border-top: 1px solid #c9dfd1; border-bottom: 1px solid #c9dfd1; }
.public-policy-points > div { min-height: 142px; padding: 28px 30px 26px 0; }
.public-policy-points > div + div { padding-left: 30px; border-left: 1px solid #c9dfd1; }
.public-policy-points strong, .public-policy-points span { display: block; }
.public-policy-points strong { color: #135c3e; font-size: 18px; }
.public-policy-points span { margin-top: 9px; color: #486556; font-size: 13px; line-height: 1.75; }
.public-features { padding: 78px 28px; background: #fff; }
.public-section-heading.compact { max-width: none; }
.public-feature-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 38px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.public-feature-list > div { min-height: 190px; padding: 28px 25px 26px 0; }
.public-feature-list > div + div { padding-left: 25px; border-left: 1px solid var(--line); }
.public-feature-list span, .public-feature-list strong { display: block; }
.public-feature-list span { color: var(--blue); font-size: 12px; font-weight: 750; }
.public-feature-list strong { margin-top: 25px; font-size: 17px; }
.public-feature-list p { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.public-login-section { width: min(1180px, calc(100% - 56px)); display: grid; grid-template-columns: minmax(0, 1fr) 420px; align-items: center; gap: 80px; margin: 0 auto; padding: 82px 0; border-top: 1px solid var(--line); }
.public-login-intro { max-width: 540px; }
.login-panel { width: min(420px, 100%); padding: 30px; border: 1px solid var(--line-strong); border-radius: 8px; background: #fff; box-shadow: var(--shadow); }
.login-brand { display: flex; align-items: center; gap: 11px; padding-bottom: 25px; border-bottom: 1px solid var(--line); }
.login-brand strong, .login-brand span { display: block; }
.login-brand strong { font-size: 17px; }
.login-brand span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.login-heading { margin: 25px 0 20px; }
.login-heading h1 { margin: 0; font-size: 23px; letter-spacing: 0; }
.login-heading p { margin: 7px 0 0; color: var(--muted); font-size: 12px; }
.login-form { display: grid; gap: 8px; }
.login-form label { margin-top: 6px; color: var(--ink); font-size: 12px; font-weight: 650; }
.login-form input { width: 100%; height: 42px; border: 1px solid var(--line-strong); border-radius: 6px; padding: 0 11px; color: var(--ink); background: #fff; outline: 0; }
.login-form input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(45,108,223,.11); }
.login-error { min-height: 18px; margin-top: 3px; color: var(--red); font-size: 12px; }
.login-submit, .register-submit { width: 100%; min-height: 42px; margin-top: 3px; }
.login-public-links { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); text-align: center; }
.login-public-links a { color: var(--blue); font-size: 12px; font-weight: 650; text-decoration: none; }
.login-public-links a:hover { text-decoration: underline; }
.invitation-summary { display: grid; gap: 4px; margin-bottom: 7px; padding: 12px; border: 1px solid #cfdcf4; border-radius: 6px; background: #f5f8fd; }
.invitation-summary strong { color: var(--ink); }
.invitation-summary span { color: var(--muted); font-size: 11px; line-height: 1.5; }
.public-footer { display: flex; justify-content: space-between; gap: 24px; padding: 24px max(28px, calc((100vw - 1180px) / 2)); border-top: 1px solid var(--line); color: var(--muted); background: #f7f8fa; font-size: 11px; }

.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 236px;
  display: flex;
  flex-direction: column;
  padding: 28px 16px 20px;
  background: var(--navy);
  color: #fff;
}

.brand-lockup { display: flex; align-items: center; gap: 11px; padding: 0 11px 18px; }
.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  background: #3d76de;
  font-weight: 800;
  font-size: 17px;
}
.brand-lockup strong { display: block; font-size: 17px; letter-spacing: 0; }
.brand-lockup span { display: block; margin-top: 4px; color: #aebbd0; font-size: 11px; }

.workspace-picker { display: grid; gap: 6px; margin: 0 5px 18px; padding: 10px; border: 1px solid rgba(255,255,255,.1); border-radius: 7px; background: rgba(255,255,255,.04); }
.workspace-picker > span { color: #8998b0; font-size: 10px; }
.workspace-picker select { width: 100%; height: 31px; border: 0; border-radius: 5px; padding: 0 26px 0 8px; color: #fff; background: #34445e; outline: 0; font-size: 12px; }

.nav-list { display: grid; gap: 5px; }
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 42px;
  width: 100%;
  border: 0;
  border-radius: 7px;
  padding: 0 11px;
  color: #afbad0;
  background: transparent;
  text-align: left;
  transition: background .18s ease, color .18s ease;
}
.nav-item:hover { color: #fff; background: rgba(255,255,255,.08); }
.nav-item.is-active { color: #fff; background: rgba(69, 123, 224, .23); }
.nav-item.is-active::before { content: ""; position: absolute; left: 0; width: 3px; height: 19px; border-radius: 2px; background: #6fa1ff; }
.nav-icon { width: 19px; color: #91a1bb; font-size: 18px; line-height: 1; text-align: center; }
.nav-item.is-active .nav-icon { color: #fff; }
.nav-count { margin-left: auto; min-width: 20px; padding: 2px 6px; border-radius: 10px; color: #b8c8e6; background: rgba(255,255,255,.1); font-size: 11px; text-align: center; }

.sidebar-footer { margin-top: auto; padding: 18px 11px 0; border-top: 1px solid rgba(255,255,255,.1); }
.sidebar-user { display: grid; gap: 3px; margin-bottom: 13px; }
.sidebar-user strong { overflow: hidden; color: #fff; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user span { color: #8492aa; font-size: 10px; }
.service-indicator { display: flex; align-items: center; gap: 8px; color: #d3dded; font-size: 12px; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: #4bc58a; box-shadow: 0 0 0 3px rgba(75,197,138,.14); }
.sidebar-note { display: block; margin-top: 10px; color: #8492aa; font-size: 11px; }
.logout-button { width: 100%; display: flex; align-items: center; gap: 8px; min-height: 34px; margin-top: 13px; border: 0; border-radius: 5px; padding: 0; color: #aebbd0; background: transparent; font-size: 12px; text-align: left; }
.logout-button:hover { color: #fff; }

.main-content { width: calc(100% - 236px); margin-left: 236px; }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 31px 42px 26px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.84); }
.breadcrumb { color: var(--subtle); font-size: 12px; }
.breadcrumb span { color: var(--muted); }
.topbar h1 { margin: 9px 0 5px; font-size: 28px; letter-spacing: 0; font-weight: 750; }
.topbar p { margin: 0; color: var(--muted); }
.topbar-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.clock { padding-right: 8px; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; border: 1px solid transparent; border-radius: 6px; padding: 0 14px; font-weight: 650; white-space: nowrap; transition: transform .16s ease, box-shadow .16s ease, background .16s ease; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button:disabled { opacity: .52; cursor: not-allowed; transform: none; box-shadow: none; }
.button-primary { color: #fff; background: var(--blue); box-shadow: 0 4px 11px rgba(45,108,223,.2); }
.button-primary:hover { background: #255fc9; }
.button-secondary { color: var(--ink); border-color: var(--line-strong); background: #fff; }
.button-secondary:hover { border-color: #b8c3d3; background: #fbfcfe; }
.button-quiet { min-height: 32px; padding: 0 9px; color: var(--muted); background: transparent; }
.button-quiet:hover { color: var(--ink); background: #f1f4f8; }
.button-danger { color: var(--red); background: transparent; }
.button-danger:hover { background: var(--red-soft); }
.button-icon { font-size: 17px; line-height: 1; }

.content-region { max-width: 1500px; padding: 30px 42px 46px; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.section-heading h2 { margin: 0; font-size: 18px; letter-spacing: 0; }
.section-heading p { margin: 6px 0 0; color: var(--muted); }
.section-actions { display: flex; gap: 8px; align-items: center; }

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 26px; }
.stat-tile { min-height: 112px; padding: 19px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: 0 3px 12px rgba(24,40,67,.025); }
.stat-label { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 12px; }
.stat-badge { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; color: var(--blue); background: var(--blue-soft); font-size: 16px; }
.stat-value { margin-top: 13px; font-size: 27px; font-weight: 750; font-variant-numeric: tabular-nums; }
.stat-foot { margin-top: 3px; color: var(--subtle); font-size: 11px; }

.overview-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(340px, .85fr); gap: 18px; align-items: start; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); box-shadow: 0 3px 12px rgba(24,40,67,.025); }
.panel-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 61px; padding: 0 20px; border-bottom: 1px solid var(--line); }
.panel-title { font-weight: 720; }
.panel-subtitle { margin-left: 8px; color: var(--subtle); font-size: 12px; font-weight: 400; }
.panel-body { padding: 0 20px; }
.empty-state { padding: 43px 20px; color: var(--muted); text-align: center; }
.empty-state strong { display: block; margin-bottom: 8px; color: var(--ink); font-size: 15px; }
.empty-state p { margin: 0 0 16px; }

.enterprise-mini-list, .schedule-mini-list { display: grid; }
.mini-row { display: flex; align-items: center; gap: 12px; min-height: 69px; border-bottom: 1px solid #edf0f4; }
.mini-row:last-child { border-bottom: 0; }
.mini-mark { width: 33px; height: 33px; display: grid; place-items: center; flex: 0 0 33px; border-radius: 8px; color: #2c64c9; background: #edf3ff; font-weight: 750; }
.mini-main { min-width: 0; flex: 1; }
.mini-title { overflow: hidden; color: var(--ink); font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.mini-meta { overflow: hidden; margin-top: 4px; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.mini-side { color: var(--muted); font-size: 12px; text-align: right; }
.mini-side strong { display: block; color: var(--ink); font-size: 14px; font-variant-numeric: tabular-nums; }

.status-pill { display: inline-flex; align-items: center; gap: 5px; min-height: 23px; padding: 0 8px; border-radius: 12px; font-size: 11px; white-space: nowrap; }
.status-pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-active, .status-queued, .status-preview { color: var(--green); background: var(--green-soft); }
.status-partial { color: var(--amber); background: var(--amber-soft); }
.status-disabled, .status-paused, .status-completed { color: var(--subtle); background: #f0f2f5; }
.status-scheduled { color: #2d6cdf; background: #eaf1ff; }
.status-failed, .status-missed, .status-interrupted { color: var(--red); background: var(--red-soft); }
.status-running { color: var(--amber); background: var(--amber-soft); }
.notice-banner { margin-bottom: 14px; padding: 11px 14px; border: 1px solid #f2d28a; border-radius: 8px; color: #805500; background: #fff7e5; font-size: 13px; }

.activity-list { display: grid; }
.activity-row { display: flex; gap: 11px; padding: 15px 0; border-bottom: 1px solid #edf0f4; }
.activity-row:last-child { border-bottom: 0; }
.activity-marker { width: 25px; height: 25px; display: grid; place-items: center; flex: 0 0 25px; border-radius: 7px; font-size: 12px; }
.activity-marker.success { color: var(--green); background: var(--green-soft); }
.activity-marker.fail { color: var(--red); background: var(--red-soft); }
.activity-marker.pending { color: var(--amber); background: var(--amber-soft); }
.activity-copy { min-width: 0; flex: 1; }
.activity-copy strong { display: block; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.activity-copy span { display: block; overflow: hidden; margin-top: 4px; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.activity-time { color: var(--subtle); font-size: 11px; white-space: nowrap; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.toolbar-select { min-width: 180px; height: 38px; border: 1px solid var(--line-strong); border-radius: 6px; padding: 0 10px; color: var(--ink); background: #fff; }
.license-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin: 0 0 16px; }
.license-enterprise-picker { display: grid; min-width: min(360px, 100%); gap: 7px; color: var(--ink); font-size: 12px; font-weight: 650; }
.license-enterprise-picker select { width: 100%; height: 39px; border: 1px solid var(--line-strong); border-radius: 6px; padding: 0 34px 0 11px; color: var(--ink); background: #fff; outline: 0; }
.license-enterprise-picker select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(45,108,223,.11); }
.license-sync-meta { display: grid; gap: 5px; color: var(--subtle); font-size: 11px; text-align: right; }
.license-sync-meta strong { color: var(--muted); font-weight: 500; }
.license-table { min-width: 820px; }
.license-table th:first-child, .license-table td:first-child { width: 42px; text-align: center; }
.license-table input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--blue); }
.license-config-strip { margin-bottom: 20px; }
.license-directory-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); overflow: hidden; }
.license-department-list { max-height: 680px; overflow: auto; border-right: 1px solid var(--line); background: #fbfcfe; }
.license-department-button { flex: 0 0 auto; width: 100%; }
.license-member-table-wrap { min-width: 0; max-height: 680px; overflow: auto; }
.license-member-table-wrap .license-table thead { position: sticky; top: 0; z-index: 2; background: #fff; }
.provider-strip { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 66px; margin-bottom: 16px; padding: 13px 16px; border: 1px solid #cfdcf4; border-radius: 7px; background: #f6f9ff; }
.provider-strip > div { min-width: 0; }
.provider-strip strong, .provider-strip span, .provider-strip small { display: block; }
.provider-strip strong { color: var(--ink); font-size: 13px; }
.provider-strip div > span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.provider-strip small { overflow-wrap: anywhere; margin-top: 4px; color: var(--red); font-size: 11px; }
.provider-strip > .status-pill { display: inline-flex; flex: 0 0 auto; }
.search-box { position: relative; min-width: 240px; }
.search-box input { width: 100%; height: 37px; border: 1px solid var(--line-strong); border-radius: 6px; padding: 0 12px 0 33px; color: var(--ink); background: #fff; outline: 0; }
.search-box input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(45,108,223,.11); }
.search-icon { position: absolute; left: 11px; top: 9px; color: var(--subtle); font-size: 15px; }
.filter-tabs { display: flex; gap: 3px; padding: 3px; border-radius: 7px; background: #edf0f4; }
.filter-tab { min-height: 30px; border: 0; border-radius: 5px; padding: 0 12px; color: var(--muted); background: transparent; font-size: 12px; }
.filter-tab.is-active { color: var(--ink); background: #fff; box-shadow: 0 1px 3px rgba(24,40,67,.1); }
.content-tabs { display: flex; gap: 24px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.content-tab { position: relative; min-height: 42px; border: 0; padding: 0 2px; color: var(--muted); background: transparent; font-weight: 650; }
.content-tab span { display: inline-grid; min-width: 20px; min-height: 20px; place-items: center; margin-left: 5px; border-radius: 10px; color: var(--subtle); background: #edf0f4; font-size: 10px; }
.content-tab.is-active { color: var(--ink); }
.content-tab.is-active::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: var(--blue); }
.h5-url-cell { display: flex; max-width: 320px; align-items: center; gap: 4px; }
.h5-url-cell span { min-width: 0; overflow: hidden; flex: 1; text-overflow: ellipsis; white-space: nowrap; }
.admin-stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.admin-audit-heading { margin-top: 26px; }
.audit-list { padding: 0 20px; }

.data-table { width: 100%; border-collapse: collapse; }
.data-table th { height: 44px; border-bottom: 1px solid var(--line); color: var(--subtle); font-size: 11px; font-weight: 650; letter-spacing: 0; text-align: left; }
.data-table td { height: 73px; border-bottom: 1px solid #edf0f4; color: var(--muted); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table th:not(:first-child), .data-table td:not(:first-child) { padding-left: 16px; }
.data-table th:last-child, .data-table td:last-child { text-align: right; }
.table-title { display: flex; align-items: center; gap: 10px; min-width: 175px; }
.table-title strong { display: block; color: var(--ink); font-weight: 650; }
.table-title span { display: block; max-width: 230px; overflow: hidden; margin-top: 4px; color: var(--subtle); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.table-secondary { display: block; margin-top: 4px; color: var(--subtle); font-size: 10px; font-weight: 400; white-space: nowrap; }
.table-mark { width: 32px; height: 32px; display: grid; place-items: center; flex: 0 0 32px; border-radius: 7px; color: #2c64c9; background: #edf3ff; font-size: 13px; font-weight: 750; }
.table-actions { display: inline-flex; justify-content: flex-end; gap: 2px; }
.table-actions-wrap { max-width: 250px; flex-wrap: wrap; }
.row-action { min-height: 30px; border: 0; border-radius: 5px; padding: 0 8px; color: var(--muted); background: transparent; font-size: 12px; }
.row-action-link { display: inline-flex; align-items: center; text-decoration: none; }
.row-action:hover { color: var(--ink); background: #f0f3f7; }
.row-action.danger:hover { color: var(--red); background: var(--red-soft); }
.table-wrap { overflow-x: auto; padding: 0 20px; }
.table-empty { padding: 53px 20px; color: var(--muted); text-align: center; }
.enterprise-table { min-width: 1040px; }
.schedule-table { min-width: 1240px; }
.admin-table { min-width: 1130px; }
.channel-table { min-width: 1040px; }
.channel-stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tagging-stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 18px; }
.tagging-mode-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.tagging-mode-card { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 14px; min-height: 245px; border: 1px solid var(--line); border-radius: 9px; padding: 20px; background: #fff; box-shadow: var(--shadow); }
.tagging-mode-card > .button { grid-column: 1 / -1; justify-self: start; margin-top: auto; }
.tagging-mode-card h2 { margin: 1px 0 7px; color: var(--ink); font-size: 17px; }
.tagging-mode-card p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.tagging-mode-card ul { margin: 13px 0 0; padding-left: 17px; color: var(--subtle); font-size: 11px; line-height: 1.8; }
.tagging-mode-mark { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 9px; color: #fff; background: var(--blue); font-weight: 750; }
.tagging-mode-mark.duplicate { background: #52647f; }
.tagging-table { min-width: 1220px; }
.tagging-enterprise { display: block; color: var(--ink); font-size: 12px; white-space: nowrap; }
.tagging-progress { width: 82px; height: 4px; overflow: hidden; margin-top: 7px; border-radius: 3px; background: #e6ebf2; }
.tagging-progress span { display: block; height: 100%; border-radius: inherit; background: var(--blue); transition: width .25s ease; }
.tagging-confirm-action { color: var(--blue); font-weight: 700; }
.status-preview { color: #985d00; background: #fff3d6; }
.tagging-member-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.tagging-member-heading label, .tagging-member-heading span { display: block; }
.tagging-member-list { max-height: 310px; }
.tagging-directory-picker { display: grid; grid-template-columns: minmax(180px, 230px) minmax(0, 1fr); overflow: hidden; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; }
.tagging-department-list { max-height: 350px; overflow: auto; padding: 5px; border-right: 1px solid var(--line); background: #f7f8fa; }
.tagging-department-button { display: flex; width: 100%; min-height: 34px; align-items: center; gap: 7px; padding: 6px 9px 6px calc(9px + var(--tagging-department-depth, 0) * 12px); border: 0; border-radius: 5px; color: var(--ink); background: transparent; font: inherit; font-size: 11px; text-align: left; cursor: pointer; }
.tagging-department-button:hover { background: #edf2f8; }
.tagging-department-button.is-active { color: #194f9f; background: #e8f0ff; font-weight: 700; }
.tagging-department-button > .open-data-value { flex: 1; }
.tagging-department-button > span:last-child { margin-left: auto; color: var(--subtle); font-size: 10px; }
.tagging-department-members { min-width: 0; }
.tagging-directory-picker .tagging-member-list { max-height: 350px; border: 0; border-radius: 0; }
.tagging-snapshot-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.tagging-safety-note { display: grid; gap: 5px; margin-top: 18px; border: 1px solid #cbdaf5; border-radius: 7px; padding: 13px 15px; background: #f5f8ff; }
.tagging-safety-note.warning { border-color: #efd597; background: #fff9e9; }
.tagging-safety-note strong { color: var(--ink); font-size: 12px; }
.tagging-safety-note span { color: var(--muted); font-size: 11px; line-height: 1.6; }
.tagging-detail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.tagging-detail-grid > div { min-height: 78px; border: 1px solid var(--line); border-radius: 7px; padding: 12px; background: #fafbfd; }
.tagging-detail-grid span, .tagging-detail-grid strong { display: block; }
.tagging-detail-grid span { color: var(--subtle); font-size: 10px; }
.tagging-detail-grid strong { margin-top: 8px; color: var(--ink); font-size: 16px; }
.tagging-detail-section { margin-top: 17px; }
.tagging-detail-section > strong { color: var(--ink); font-size: 12px; }
.tagging-detail-section > p { margin: 7px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.tagging-failure-list { display: grid; gap: 6px; max-height: 230px; overflow: auto; margin-top: 8px; }
.tagging-failure { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 9px; border: 1px solid #f0d0d0; border-radius: 6px; padding: 9px; background: #fff8f8; }
.tagging-failure span { color: var(--red); font-size: 10px; }
.tagging-failure code { overflow: hidden; color: var(--ink); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.tagging-failure small { grid-column: 1 / -1; color: var(--muted); }
.channel-qr-thumb { width: 48px; height: 48px; flex: 0 0 48px; border: 1px solid var(--line); border-radius: 6px; background: #fff; object-fit: contain; }
.channel-count { display: block; color: var(--ink); font-size: 17px; }
.catalog-cell { max-width: 230px; }
.catalog-cell strong, .catalog-cell small { display: block; }
.catalog-cell strong { color: var(--ink); font-size: 12px; font-weight: 600; white-space: nowrap; }
.catalog-cell small { overflow: hidden; margin-top: 4px; color: var(--red); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }

.log-detail { max-width: 300px; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.material-part-list { display: flex; flex-wrap: wrap; gap: 5px; min-width: 150px; }
.material-part-list span { display: inline-flex; min-height: 24px; align-items: center; border: 1px solid #d8e2f1; border-radius: 5px; padding: 0 7px; color: #315b95; background: #f3f7fc; font-size: 10px; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
.right { text-align: right; }

.modal-backdrop { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 24px; background: rgba(16, 27, 47, .42); }
.modal { width: min(620px, 100%); max-height: min(790px, calc(100vh - 48px)); overflow: auto; overflow-anchor: none; border: 1px solid rgba(255,255,255,.25); border-radius: 9px; background: #fff; box-shadow: 0 24px 70px rgba(11,23,42,.25); }
.modal.wide { width: min(980px, 100%); }
.modal-header { position: sticky; top: 0; z-index: 2; display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 22px 24px 17px; border-bottom: 1px solid var(--line); background: #fff; }
.modal-header h2 { margin: 0; font-size: 18px; }
.modal-header p { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.close-button { width: 30px; height: 30px; border: 0; border-radius: 5px; color: var(--muted); background: transparent; font-size: 21px; line-height: 1; }
.close-button:hover { background: #f0f3f7; }
.modal-body { padding: 21px 24px 24px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-field { display: grid; gap: 7px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { color: var(--ink); font-size: 12px; font-weight: 650; }
.required { color: var(--red); }
.form-field input, .form-field select, .form-field textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: 6px; padding: 0 11px; color: var(--ink); background: #fff; outline: 0; }
.form-field input, .form-field select { height: 39px; }
.form-field textarea { min-height: 122px; padding-top: 10px; resize: vertical; line-height: 1.65; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(45,108,223,.11); }
.field-note { color: var(--subtle); font-size: 11px; line-height: 1.5; }
.form-divider { grid-column: 1 / -1; height: 1px; margin: 2px 0 1px; background: var(--line); }
.form-section-title { color: var(--ink); font-size: 13px; font-weight: 720; }
.callback-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid #cfdcf4; border-radius: 7px; background: #f4f8ff; }
.callback-box > div { min-width: 0; }
.callback-box span, .callback-box small { display: block; color: var(--muted); font-size: 11px; }
.callback-box code { display: block; overflow-wrap: anywhere; margin: 5px 0; color: #214f9f; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.modal-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 23px; }
.modal-footer .footer-right { display: flex; gap: 8px; margin-left: auto; }
.h5-editor { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 24px; }
.h5-editor-fields { display: grid; align-content: start; gap: 16px; }
.h5-live-preview { position: sticky; top: 92px; align-self: start; }
.h5-preview-label { margin-bottom: 8px; color: var(--subtle); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.h5-phone { overflow: hidden; min-height: 500px; border: 8px solid #20293a; border-radius: 24px; background: #fff; box-shadow: 0 15px 35px rgba(23,32,51,.15); }
.h5-phone > img { display: block; width: 100%; height: 150px; object-fit: cover; background: #edf0f4; }
.h5-phone > img:not([src]) { display: none; }
.h5-phone-body { padding: 21px 18px; }
.h5-phone h3 { margin: 0; font-size: 22px; line-height: 1.3; overflow-wrap: anywhere; }
.h5-phone p { margin: 8px 0 18px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.h5-preview-copy { min-height: 170px; overflow-wrap: anywhere; color: #344054; font-size: 12px; line-height: 1.7; white-space: pre-line; }
.h5-phone-body > span { display: flex; min-height: 40px; align-items: center; justify-content: center; margin-top: 20px; border-radius: 6px; color: #fff; background: var(--preview-accent, #2563eb); font-size: 12px; font-weight: 700; }
.h5-editor-footer { grid-column: 1 / -1; margin-top: 0; padding-top: 18px; border-top: 1px solid var(--line); }
.toggle-line { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; }
.toggle-line input { width: 16px; height: 16px; accent-color: var(--blue); }
.toggle-line.full { grid-column: 1 / -1; }
.channel-member-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: 7px; padding: 8px; background: #fafbfd; }
.channel-member-option { display: flex; min-width: 0; align-items: center; gap: 9px; border-radius: 5px; padding: 8px; color: var(--ink); cursor: pointer; }
.channel-member-option:hover { background: #eef4ff; }
.channel-member-option input { width: 16px; height: 16px; flex: 0 0 16px; accent-color: var(--blue); }
.channel-member-option span, .channel-member-option strong, .channel-member-option small { display: block; min-width: 0; }
.channel-member-option strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.channel-member-option small { overflow: hidden; margin-top: 2px; color: var(--subtle); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.channel-member-empty { grid-column: 1 / -1; padding: 24px; color: var(--muted); font-size: 12px; text-align: center; }
.run-result-list { display: grid; gap: 8px; max-height: 360px; overflow: auto; border: 1px solid var(--line); border-radius: 7px; padding: 8px; background: #fafbfd; }
.run-result-member { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 12px; border-radius: 5px; padding: 9px 10px; background: #fff; }
.run-result-member > div { min-width: 0; }
.run-result-member strong, .run-result-member small { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.run-result-member strong { color: var(--ink); font-size: 12px; }
.run-result-member small { margin-top: 3px; color: var(--subtle); font-size: 9px; }
.sender-alias-toolbar { display: flex; align-items: center; gap: 10px; margin: 14px 0 10px; }
.sender-alias-mode-filter { flex: 0 0 auto; }
.sender-alias-mode-filter button { min-width: 112px; }
.sender-alias-search { min-width: 220px; margin-left: auto; }
.sender-alias-directory-picker { grid-template-columns: minmax(180px, 230px) minmax(0, 1fr); }
.sender-alias-department-list { max-height: 430px; }
.sender-alias-list { display: grid; gap: 8px; max-height: 430px; overflow: auto; border: 1px solid var(--line); border-radius: 7px; padding: 8px; background: #fafbfd; }
.sender-alias-directory-picker .sender-alias-list { margin: 0; border: 0; border-radius: 0; }
.sender-alias-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(210px, .8fr); align-items: center; gap: 12px; border-radius: 5px; padding: 9px 10px; background: #fff; }
.sender-alias-identity { min-width: 0; }
.sender-alias-identity strong, .sender-alias-identity small { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sender-alias-identity strong { color: var(--ink); font-size: 12px; }
.sender-alias-identity small { margin-top: 3px; color: var(--subtle); font-size: 9px; }
.sender-alias-input { width: 100%; }
.channel-preview { display: grid; justify-items: center; text-align: center; }
.channel-preview > img { width: min(300px, 80vw); height: min(300px, 80vw); border: 1px solid var(--line); border-radius: 9px; background: #fff; object-fit: contain; }
.channel-preview > strong { margin-top: 17px; color: var(--ink); font-size: 15px; }
.channel-preview > span { margin-top: 6px; color: var(--muted); font-size: 12px; }
.channel-preview .modal-footer { width: 100%; }
.segmented { display: flex; gap: 4px; padding: 3px; border-radius: 7px; background: #edf0f4; }
.segmented button { flex: 1; height: 31px; border: 0; border-radius: 5px; color: var(--muted); background: transparent; font-size: 12px; }
.segmented button.is-active { color: var(--ink); background: #fff; box-shadow: 0 1px 3px rgba(24,40,67,.1); }
.mode-choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.mode-choice { min-height: 76px; display: grid; align-content: center; gap: 5px; border: 1px solid var(--line-strong); border-radius: 7px; padding: 10px 12px; color: var(--muted); background: #fff; text-align: left; }
.mode-choice:hover { border-color: #b6c5dd; background: #fbfcfe; }
.mode-choice.is-active { border-color: var(--blue); background: #f3f7ff; box-shadow: 0 0 0 2px rgba(45,108,223,.09); }
.mode-choice strong { color: var(--ink); font-size: 13px; }
.mode-choice span { font-size: 10px; line-height: 1.45; }
.mode-settings-note { display: flex; min-height: 54px; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 13px; border: 1px solid #cfdcf4; border-radius: 6px; background: #f5f8fd; }
.mode-settings-note strong { color: var(--ink); font-size: 12px; }
.mode-settings-note span { color: var(--muted); font-size: 11px; text-align: right; }
.recurring-settings { padding: 14px; border: 1px solid var(--line); border-radius: 7px; background: #f8f9fb; }
.recurring-range-field { gap: 8px; }
.recurring-range-presets { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); width: 100%; }
.recurring-range-presets button { min-height: 34px; height: auto; padding: 5px 7px; line-height: 1.35; white-space: normal; }
.weekday-picker { display: flex; gap: 7px; }
.weekday-picker label { cursor: pointer; }
.weekday-picker input { position: absolute; opacity: 0; pointer-events: none; }
.weekday-picker span { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid var(--line-strong); border-radius: 6px; color: var(--muted); background: #fff; font-size: 12px; }
.weekday-picker input:checked + span { border-color: var(--blue); color: #fff; background: var(--blue); }
.catalog-picker { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.button-compact { min-height: 31px; padding: 0 10px; font-size: 11px; }
.scope-field { gap: 10px; }
.scope-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.scope-heading label { color: var(--ink); font-size: 12px; font-weight: 650; }
.scope-segmented { width: min(430px, 100%); }
.scope-all-note { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 10px 13px; border: 1px solid #cfdcf4; border-radius: 6px; background: #f5f8fd; }
.scope-all-note strong { color: var(--ink); font-size: 12px; }
.scope-all-note span { color: var(--muted); font-size: 11px; }
.scope-picker { overflow: hidden; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; }
.scope-picker-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 41px; padding: 0 13px; border-bottom: 1px solid var(--line); background: #f7f8fa; }
.scope-picker-bar strong { color: var(--ink); font-size: 12px; }
.scope-picker-bar span { color: var(--subtle); font-size: 10px; }
.scope-tree { max-height: 310px; overflow: auto; padding: 5px 0; }
.scope-loading { padding: 40px 16px; color: var(--muted); font-size: 12px; text-align: center; }
.scope-row { display: flex; align-items: center; gap: 8px; min-height: 36px; padding: 5px 13px 5px calc(13px + var(--scope-depth, 0) * 22px); border-bottom: 1px solid #f2f4f7; color: var(--ink); font-size: 12px; cursor: pointer; }
.scope-row:hover { background: #f7f9fc; }
.scope-department-row { cursor: default; }
.scope-row.is-inherited { background: #f7f9fc; color: var(--muted); }
.scope-row input { flex: 0 0 auto; width: 15px; height: 15px; margin: 0; accent-color: var(--blue); }
.scope-row input:disabled { opacity: .72; }
.scope-folder, .scope-user-mark { display: grid; flex: 0 0 20px; width: 20px; height: 20px; place-items: center; border-radius: 4px; color: #4b668d; background: #edf2f8; font-size: 10px; font-weight: 700; }
.scope-folder { border: 0; padding: 0; font-family: inherit; line-height: 1; }
.scope-toggle { cursor: pointer; }
.scope-toggle:hover { color: #244d87; background: #dfe8f5; }
.scope-toggle:focus-visible { outline: 2px solid rgba(45,108,223,.35); outline-offset: 1px; }
.scope-folder-empty { background: transparent; }
.scope-user-mark { color: #27764b; background: #e9f6ef; }
.scope-name { min-width: 0; overflow: hidden; flex: 1; text-overflow: ellipsis; white-space: nowrap; }
.scope-department-row .scope-name { cursor: pointer; }
.scope-row-meta { min-width: 20px; color: var(--subtle); font-size: 10px; text-align: right; }
.scope-orphan-title { padding: 10px 13px 6px; color: var(--subtle); font-size: 10px; font-weight: 700; }
.open-data-value { display: inline-flex; min-width: 0; max-width: 100%; align-items: center; }
.open-data-value ww-open-data { display: inline; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.open-data-value.is-ready .open-data-fallback { display: none; }
.open-data-fallback { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.attachment-toggle { padding: 3px 0; }
.link-grid { padding: 15px; border: 1px solid var(--line); border-radius: 6px; background: #f8f9fb; }
.content-insert-bar { padding: 13px; border: 1px solid var(--line); border-radius: 7px; background: #f8f9fb; }
.content-insert-controls { display: grid; grid-template-columns: minmax(220px, 1fr) auto; gap: 8px; }
.content-insert-controls select { min-width: 0; }
.material-composer-section { gap: 11px; padding-top: 15px; border-top: 1px solid var(--line); }
.material-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.material-section-heading > div { display: grid; gap: 4px; }
.material-section-heading strong { color: var(--ink); font-size: 13px; }
.material-section-heading span:not(.material-section-index) { color: var(--muted); font-size: 11px; }
.material-section-index { width: 24px; height: 24px; display: grid; place-items: center; flex: 0 0 24px; border: 1px solid #cedcf1; border-radius: 50%; color: #315f9f; background: #f3f7fd; font-size: 10px; font-weight: 750; }
.material-h5-picker { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-bottom: 10px; }
.material-h5-picker select { min-width: 0; }
.attachment-composer { display: grid; gap: 11px; }
.attachment-composer-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.attachment-composer-header > div:first-child { display: grid; gap: 3px; }
.attachment-composer-header strong { color: var(--ink); font-size: 12px; }
.attachment-composer-header span { color: var(--subtle); font-size: 10px; }
.attachment-add-actions { display: flex; gap: 7px; }
.attachment-add-actions .button { min-height: 34px; padding: 0 11px; }
.h5-attachment-picker { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 10px; border: 1px solid #d7e1ef; border-radius: 6px; background: #f5f8fc; }
.h5-attachment-picker select { min-width: 0; height: 36px; }
.h5-attachment-picker .button { min-height: 36px; }
.attachment-list { display: grid; gap: 9px; }
.attachment-empty { min-height: 92px; display: grid; place-content: center; gap: 5px; border: 1px dashed #c9d3e1; border-radius: 6px; color: var(--muted); background: #fafbfd; text-align: center; }
.attachment-empty strong { color: var(--ink); font-size: 12px; }
.attachment-empty span { font-size: 10px; }
.attachment-item { overflow: hidden; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; }
.attachment-item-header { min-height: 43px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 10px 6px 12px; border-bottom: 1px solid var(--line); background: #f8f9fb; }
.attachment-item-header > div:first-child { display: flex; min-width: 0; align-items: center; gap: 8px; }
.attachment-item-header strong { overflow: hidden; color: var(--ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.attachment-type-mark { width: 25px; height: 25px; display: grid; place-items: center; flex: 0 0 25px; border-radius: 5px; color: #235cb9; background: #eaf1fd; font-size: 10px; font-weight: 750; }
.attachment-type-mark.link-mark { color: #24704a; background: #e8f5ed; }
.attachment-order-actions { display: flex; flex: 0 0 auto; gap: 3px; }
.icon-action { width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 5px; padding: 0; color: var(--muted); background: transparent; font-size: 15px; line-height: 1; }
.icon-action:hover:not(:disabled) { color: var(--ink); background: #e9edf3; }
.icon-action.danger:hover:not(:disabled) { color: var(--red); background: var(--red-soft); }
.icon-action:disabled { opacity: .3; cursor: default; }
.attachment-image-layout { display: grid; grid-template-columns: minmax(0, 1fr) 136px; align-items: start; gap: 12px; padding: 12px; }
.attachment-link-grid { gap: 12px; padding: 12px; }
.attachment-thumb { width: 136px; aspect-ratio: 3 / 2; overflow: hidden; border: 1px solid var(--line); border-radius: 5px; background: #edf0f4; }
.attachment-thumb img { width: 100%; height: 100%; display: block; object-fit: cover; }
.attachment-thumb.is-empty { display: grid; place-items: center; color: var(--subtle); font-size: 10px; }
.attachment-limit { display: flex; align-items: center; justify-content: flex-end; gap: 7px; color: var(--subtle); font-size: 10px; }
.attachment-limit span:first-child { color: var(--ink); font-weight: 700; }
.attachment-editor { display: grid; grid-template-columns: minmax(0, 1fr) 220px; align-items: start; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 6px; background: #f8f9fb; }
.compact-preview { min-height: 78px; }
.cover-field { align-content: start; }
.cover-input-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
.cover-upload-button { min-height: 39px; }
.cover-upload-button:disabled { opacity: .65; cursor: wait; transform: none; }
.cover-preview { display: flex; min-height: 72px; align-items: center; gap: 11px; padding: 7px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.cover-preview img { width: 86px; height: 64px; flex: 0 0 86px; border-radius: 4px; object-fit: cover; background: #edf0f4; }
.cover-preview > div { display: grid; min-width: 0; gap: 7px; }
.cover-preview span { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.cover-remove-button { width: max-content; border: 0; padding: 0; color: var(--red); background: transparent; font-size: 11px; }
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden !important; clip: rect(0 0 0 0) !important; clip-path: inset(50%) !important; white-space: nowrap !important; }
.settings-lines { gap: 11px; }
.schedule-preview-line { display: flex; align-items: center; gap: 12px; }
.schedule-preview-line .button { flex: 0 0 auto; }
.success-text { color: var(--green); }
.error-text { color: var(--red); }
.api-result { min-height: 19px; color: var(--muted); font-size: 12px; }
.api-result.success { color: var(--green); }
.api-result.error { color: var(--red); }

.notification-category-filter { width: max-content; max-width: 100%; margin: 0 0 14px; overflow-x: auto; }
.notification-category-filter button { white-space: nowrap; }
.notification-routing-heading { margin-top: 28px; }
.notification-route-select { width: min(320px, 100%); min-width: 220px; }

.toast-stack { position: fixed; right: 24px; bottom: 24px; z-index: 50; display: grid; gap: 8px; width: min(360px, calc(100vw - 48px)); }
.toast { display: flex; align-items: flex-start; gap: 10px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 7px; background: #fff; box-shadow: var(--shadow); animation: toast-in .2s ease; }
.toast.success { border-left: 3px solid var(--green); }
.toast.error { border-left: 3px solid var(--red); }
.toast strong { display: block; color: var(--ink); font-size: 12px; }
.toast span { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.5; }
@keyframes toast-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }

.skeleton { height: 13px; border-radius: 5px; background: linear-gradient(90deg, #f0f2f5 25%, #f8f9fb 50%, #f0f2f5 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

@media (max-width: 1060px) {
  .sidebar { width: 202px; }
  .main-content { width: calc(100% - 202px); margin-left: 202px; }
  .topbar, .content-region { padding-left: 28px; padding-right: 28px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .overview-grid { grid-template-columns: 1fr; }
  .tagging-mode-grid { grid-template-columns: 1fr; }
  .h5-editor { grid-template-columns: 1fr; }
  .h5-live-preview { position: static; width: min(330px, 100%); }
  .h5-editor-footer { grid-column: auto; }
}

@media (max-width: 720px) {
  .tagging-directory-picker { grid-template-columns: 1fr; }
  .tagging-department-list { display: flex; max-height: 132px; flex-wrap: wrap; gap: 4px; border-right: 0; border-bottom: 1px solid var(--line); }
  .tagging-department-button { width: auto; min-height: 30px; padding: 5px 8px; }
  .sender-alias-toolbar { align-items: stretch; flex-direction: column; }
  .sender-alias-search { width: 100%; min-width: 0; margin-left: 0; }
  .public-header { min-height: 60px; padding: 0 16px; }
  .public-brand small, .public-nav > a:not(.public-login-link) { display: none; }
  .public-nav { gap: 8px; }
  .public-hero { min-height: 660px; padding: 58px 18px 44px; background-position: 40% center; }
  .public-hero-shade { width: 100%; background: rgba(12,26,49,.78); }
  .public-hero-copy { padding-bottom: 0; }
  .public-hero h1 { font-size: 48px; }
  .public-hero p { font-size: 16px; }
  .public-hero-actions { align-items: stretch; flex-direction: column; }
  .public-policy-band, .public-features { padding: 52px 18px; }
  .public-section-heading h2, .public-login-intro h2 { font-size: 27px; }
  .public-policy-points, .public-feature-list { grid-template-columns: 1fr; }
  .public-policy-points > div, .public-feature-list > div { min-height: auto; padding: 22px 0; }
  .public-policy-points > div + div, .public-feature-list > div + div { padding-left: 0; border-top: 1px solid #c9dfd1; border-left: 0; }
  .public-feature-list > div + div { border-top-color: var(--line); }
  .public-feature-list strong { margin-top: 12px; }
  .public-login-section { width: calc(100% - 36px); grid-template-columns: 1fr; gap: 34px; padding: 52px 0; }
  .login-panel { padding: 23px 20px; }
  .public-footer { align-items: flex-start; flex-direction: column; gap: 7px; padding: 22px 18px; }
  .sidebar { position: static; width: 100%; min-height: auto; padding: 15px 12px 12px; }
  .app-shell { display: block; }
  .brand-lockup { padding: 0 8px 14px; }
  .workspace-picker { margin: 0 0 10px; }
  .nav-list { display: flex; overflow-x: auto; gap: 4px; }
  .nav-item { min-width: 82px; min-height: 52px; justify-content: center; flex-direction: column; gap: 4px; padding: 5px 4px; font-size: 11px; white-space: nowrap; }
  .nav-icon { width: auto; font-size: 15px; }
  .nav-item.is-active::before { left: 50%; bottom: 0; width: 18px; height: 2px; transform: translateX(-50%); }
  .nav-count { display: none; }
  .sidebar-footer { display: flex; align-items: center; margin-top: 10px; padding: 10px 8px 0; }
  .sidebar-user, .service-indicator { display: none; }
  .sidebar-note { display: none; }
  .logout-button { width: auto; min-height: 28px; margin: 0 0 0 auto; }
  .main-content { width: 100%; margin-left: 0; }
  .topbar { align-items: flex-start; flex-direction: column; padding: 22px 18px 20px; }
  .topbar h1 { font-size: 24px; }
  .topbar-actions { width: 100%; }
  .topbar-actions .clock { margin-left: auto; }
  .content-region { padding: 22px 18px 34px; }
  .stat-grid { gap: 9px; }
  .admin-stat-grid { grid-template-columns: 1fr; }
  .channel-stat-grid, .channel-member-list, .sender-alias-row { grid-template-columns: 1fr; }
  .tagging-stat-grid, .tagging-detail-grid { grid-template-columns: 1fr; }
  .tagging-snapshot-row { grid-template-columns: 1fr; }
  .stat-tile { min-height: 100px; padding: 15px; }
  .stat-value { font-size: 23px; }
  .toolbar, .section-heading, .license-toolbar { align-items: stretch; flex-direction: column; }
  .license-sync-meta { text-align: left; }
  .license-directory-layout { grid-template-columns: 1fr; }
  .license-department-list { max-height: 260px; border-right: 0; border-bottom: 1px solid var(--line); }
  .provider-strip { align-items: flex-start; }
  .search-box { min-width: 0; }
  .table-wrap { padding: 0 14px; }
  .data-table { min-width: 700px; }
  .modal-backdrop { padding: 10px; }
  .modal-body, .modal-header { padding-left: 17px; padding-right: 17px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-field.full { grid-column: auto; }
  .form-divider { grid-column: auto; }
  .catalog-picker { grid-template-columns: 1fr; }
  .mode-choice-grid { grid-template-columns: 1fr; }
  .mode-choice { min-height: 64px; }
  .mode-settings-note { align-items: flex-start; flex-direction: column; }
  .mode-settings-note span { text-align: left; }
  .weekday-picker { flex-wrap: wrap; }
  .content-insert-controls { grid-template-columns: 1fr; }
  .recurring-range-presets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .material-h5-picker, .attachment-editor { grid-template-columns: 1fr; }
  .attachment-composer-header { align-items: stretch; flex-direction: column; }
  .attachment-add-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .attachment-add-actions .button { width: 100%; }
  .h5-attachment-picker, .attachment-image-layout { grid-template-columns: 1fr; }
  .attachment-thumb { width: min(180px, 100%); }
  .attachment-item-header { align-items: center; }
  .attachment-limit { justify-content: space-between; }
  .scope-heading, .scope-all-note, .scope-picker-bar { align-items: flex-start; flex-direction: column; }
  .scope-heading { gap: 8px; }
  .scope-heading .button { width: 100%; }
  .scope-all-note, .scope-picker-bar { padding-top: 10px; padding-bottom: 10px; }
  .scope-tree { max-height: 280px; }
  .scope-row { padding-left: calc(9px + var(--scope-depth, 0) * 16px); }
  .schedule-preview-line { align-items: stretch; flex-direction: column; }
  .schedule-preview-line .button { width: 100%; }
  .cover-input-row { grid-template-columns: 1fr; }
  .cover-upload-button { width: 100%; }
  .modal-footer { align-items: stretch; flex-direction: column; }
  .modal-footer .footer-right { margin-left: 0; }
  .modal-footer .footer-right .button { flex: 1; }
  .h5-phone { min-height: 460px; }
}
