:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #eef4f8;
  --text: #17202a;
  --muted: #637083;
  --line: #dce5ed;
  --field-bg: #fafade;
  --primary: #0f766e;
  --primary-strong: #115e59;
  --danger: #dc2626;
  --warning: #b45309;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, "Noto Sans KR", sans-serif;
  font-size: 15px;
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.login-view {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(380px, 0.85fr);
}

.login-visual {
  display: flex;
  flex-direction: column;
  justify-content: end;
  padding: 72px;
  background: linear-gradient(120deg, rgba(9, 63, 78, 0.96), rgba(17, 94, 89, 0.78)), url("../../images/main/main.jpg") center / cover;
  color: #fff;
}

.user-login-visual {
  background: linear-gradient(120deg, rgba(20, 83, 45, 0.96), rgba(15, 118, 110, 0.74)), url("../../images/main/main.jpg") center / cover;
}

.brand-mark {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  margin-bottom: 28px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 8px;
  font-weight: 800;
}

.login-visual h1 {
  max-width: 720px;
  margin: 0 0 18px;
  font-size: 42px;
  line-height: 1.18;
}

.login-visual p {
  max-width: 720px;
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 17px;
  line-height: 1.65;
}

.login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
  padding: 56px;
  background: var(--surface);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}

h1,
h2 {
  margin: 0;
}

label {
  display: grid;
  gap: 8px;
  color: #303b49;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--field-bg);
  color: var(--text);
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #64748b;
  cursor: pointer;
}

.password-toggle:hover {
  background: #eef4f8;
  color: var(--primary);
}

.password-toggle svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.password-toggle .eye-closed {
  display: none;
}

.password-toggle[aria-pressed="true"] .eye-open {
  display: none;
}

.password-toggle[aria-pressed="true"] .eye-closed {
  display: block;
}

.wysiwyg-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: #f8fafc;
}

.wysiwyg-toolbar button {
  min-width: 40px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}

.wysiwyg-editor {
  min-height: 280px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 0 0 8px 8px;
  background: #fff;
  line-height: 1.7;
  outline: none;
}

.wysiwyg-editor:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13, 132, 120, 0.12);
}

textarea {
  resize: vertical;
}

.phone-grid,
.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

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

.phone-parts,
.zip-search-row {
  display: grid;
}

.phone-parts {
  grid-template-columns: repeat(3, 76px);
  gap: 8px;
  width: max-content;
  max-width: 100%;
}

.phone-parts input {
  text-align: center;
  padding-left: 8px;
  padding-right: 8px;
}

.zip-search-row {
  grid-template-columns: 150px auto;
  gap: 0;
  width: max-content;
  max-width: 100%;
}

.zip-search-row input {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.zip-search-row .ghost-button {
  border-left: 0;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  min-height: 42px;
  white-space: nowrap;
}

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

.count-inline {
  color: var(--muted);
  font-size: 0.92em;
  font-weight: 800;
  white-space: nowrap;
}

.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 6px;
  font-weight: 800;
  cursor: pointer;
}

.primary-button {
  border: 0;
  background: var(--primary);
  color: #fff;
}

.ghost-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
}

.compact {
  min-height: 38px;
}

.hint,
.body-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.alert {
  padding: 12px;
  border: 1px solid #fecaca;
  border-radius: 6px;
  background: #fff1f2;
  color: var(--danger);
  font-weight: 700;
}

.alert.success {
  border-color: #b7e4d5;
  background: #ecfdf5;
  color: var(--accent);
}

.admin-view {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  background: #10222b;
  color: #dce9ef;
}

.user-sidebar {
  background: #143322;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.sidebar-brand span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--primary);
  color: #fff;
  font-weight: 900;
}

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

.nav-group {
  display: grid;
  gap: 4px;
}

.nav-link {
  display: block;
  padding: 12px 14px;
  border-radius: 6px;
  color: #b9c8d0;
  font-weight: 700;
}

.nav-link:hover,
.nav-link.is-active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.nav-sub-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  margin-left: 18px;
  padding-left: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.14);
}

.nav-sub-link {
  display: block;
  width: 100%;
  padding: 9px 12px;
  border-radius: 6px;
  color: #8ea3ae;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.nav-sub-link:hover,
.nav-sub-link.is-active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(244, 247, 251, 0.94);
}

.topbar h1 {
  font-size: 26px;
}

.topbar-title-row {
  display: flex;
  align-items: center;
  gap: 20px;
}

.topbar-title-meta {
  color: var(--primary);
  font-size: 16px;
  font-weight: 800;
  white-space: nowrap;
}

.topbar-actions,
.button-row,
.table-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.mobile-menu-button,
.mobile-nav-backdrop {
  display: none;
}

.mobile-menu-button {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}

.mobile-menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 99px;
  background: var(--text);
}

.mobile-menu-button span + span {
  margin-top: 4px;
}

.table-actions form {
  margin: 0;
}

.email-pick-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-name {
  color: var(--muted);
  font-weight: 700;
}

.content-view {
  padding: 28px 32px 48px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.metric-card,
.panel,
.sns-card,
.board-card,
.form-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(23, 32, 42, 0.05);
}

.metric-card {
  display: grid;
  gap: 8px;
  padding: 20px;
}

.metric-card-link {
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.metric-card-link:hover {
  border-color: var(--primary);
  box-shadow: 0 10px 26px rgba(23, 32, 42, 0.1);
  transform: translateY(-2px);
}

.metric-card-link:focus-visible {
  outline: 3px solid rgba(13, 130, 123, 0.25);
  outline-offset: 2px;
}

.metric-card span,
.metric-card em {
  color: var(--muted);
  font-style: normal;
}

.metric-card strong {
  font-size: 32px;
  line-height: 1;
}

.dashboard-grid,
.composer,
.settings-grid,
.split-layout,
.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.75fr);
  gap: 18px;
}

.panel,
.form-panel {
  padding: 20px;
}

.form-panel {
  display: grid;
  gap: 16px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.panel h2 {
  font-size: 18px;
}

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

.action-grid a {
  min-height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
  font-weight: 800;
}

.activity-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.activity-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.activity-list li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.activity-list span {
  display: block;
  color: var(--muted);
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 180px auto;
  gap: 10px;
  margin-bottom: 16px;
}

.table-actions {
  margin-bottom: 12px;
}

.email-target-bottom {
  justify-content: flex-end;
  margin-top: 12px;
}

.email-recipient-actions {
  justify-content: flex-end;
  margin-top: 18px;
}

.email-recipient-table {
  margin-top: 8px;
}

.page-size-form {
  margin-left: auto;
}

.page-size-form select {
  min-height: 44px;
  min-width: 120px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--field-bg);
  color: var(--text);
  font-weight: 800;
}

.inline-select {
  min-height: 44px;
  width: 200px;
  min-width: 200px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--field-bg);
  color: var(--text);
  font-weight: 800;
}

#memberDeleteSubmit {
  min-width: 108px;
  padding-left: 20px;
  padding-right: 20px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.agent-list-table-wrap {
  overflow-x: hidden;
}

.agent-list-table {
  min-width: 0;
  table-layout: fixed;
}

.agent-list-table th,
.agent-list-table td {
  overflow: hidden;
  padding-left: 10px;
  padding-right: 10px;
  text-overflow: ellipsis;
}

.agent-list-table th:nth-child(1),
.agent-list-table td:nth-child(1) {
  width: 48px;
}

.agent-list-table th:nth-child(2),
.agent-list-table td:nth-child(2) {
  width: 23%;
}

.agent-list-table th:nth-child(3),
.agent-list-table td:nth-child(3),
.agent-list-table th:nth-child(9),
.agent-list-table td:nth-child(9),
.agent-list-table th:nth-child(10),
.agent-list-table td:nth-child(10),
.agent-list-table th:nth-child(11),
.agent-list-table td:nth-child(11) {
  width: 68px;
}

.agent-list-table th:nth-child(4),
.agent-list-table td:nth-child(4) {
  width: 12%;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

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

.page-link.disabled {
  color: var(--muted);
  background: #f2f5f8;
}

.test-history-detail-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

.test-history-delete-actions {
  justify-content: center;
  margin-top: 18px;
}

.page-summary {
  margin-left: 8px;
  color: var(--muted);
  font-weight: 800;
}

.commission-summary {
  display: flex !important;
  align-items: center;
  flex-wrap: nowrap !important;
  gap: 10px;
  overflow-x: auto;
  white-space: nowrap;
  margin-bottom: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(23, 32, 42, 0.05);
}

.commission-summary span {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: baseline;
  gap: 3px;
  width: auto !important;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid #e4edf4;
  border-radius: 6px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
  white-space: nowrap;
}

.commission-summary strong {
  color: var(--text);
  font-size: 16px;
  line-height: 1.2;
}

.send-detail-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 22px rgba(23, 32, 42, 0.05);
}

.send-detail-summary span {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  min-height: 32px;
  padding: 6px 9px;
  border: 1px solid #e4edf4;
  border-radius: 6px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  white-space: nowrap;
}

.send-detail-summary strong {
  color: var(--text);
  font-size: 15px;
  line-height: 1.2;
}

.commission-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.commission-tabs,
.commission-links {
  margin-bottom: 0;
}

.commission-links {
  justify-content: flex-end;
  margin-left: auto;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.check-cell {
  width: 44px;
  min-width: 44px;
  padding-left: 14px;
  padding-right: 10px;
  text-align: center;
}

.check-cell input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.error-cell {
  max-width: 320px;
  white-space: normal;
  color: var(--danger);
  font-size: 12px;
  line-height: 1.5;
}

th {
  background: #f8fafc;
  color: #3e4a59;
  font-size: 13px;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #e8f7f2;
  color: var(--primary-strong);
  font-size: 12px;
  font-weight: 800;
}

.status.paused {
  background: #fff1f2;
  color: var(--danger);
}

.status-toggle {
  display: inline-flex;
  text-decoration: none;
}

.status.new {
  background: #fff7ed;
  color: var(--warning);
}

.group-list,
.card-grid,
.board-grid {
  display: grid;
  gap: 12px;
}

.group-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
}

.group-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.group-item strong {
  display: block;
  margin-bottom: 4px;
}

.group-actions strong {
  margin-bottom: 0;
}

.danger-link {
  color: var(--danger);
}

.text-danger {
  color: var(--danger);
}

.row-inactive td,
.row-inactive a {
  color: var(--danger);
}

.danger-button {
  background: var(--danger);
}

.group-item span,
.sns-card span,
.board-card span {
  color: var(--muted);
}

.card-grid,
.board-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sns-card,
.board-card {
  padding: 18px;
}

.sns-card h2,
.board-card h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.sns-meta,
.board-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.chip {
  min-height: 28px;
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: #405163;
  font-size: 12px;
  font-weight: 800;
}

.chip.warn {
  background: #fff7ed;
  color: var(--warning);
}

.chip.muted {
  background: #f1f5f9;
  color: #64748b;
}

.composer .panel:first-child {
  display: grid;
  gap: 16px;
}

.ordered-list {
  margin: 0;
  padding-left: 20px;
  line-height: 1.8;
}

.permission-grid {
  display: grid;
  gap: 12px;
}

.permission-row {
  display: grid;
  grid-template-columns: 180px repeat(5, minmax(90px, 1fr));
  align-items: center;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.permission-head {
  background: #f8fafc;
}

.permission-row label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
}

.permission-row input {
  width: auto;
  min-height: auto;
}

code {
  display: block;
  padding: 12px;
  border-radius: 6px;
  background: #10222b;
  color: #e2f7f4;
}

.detail-list {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px 16px;
  margin: 0;
}

.detail-list dt {
  color: var(--muted);
  font-weight: 800;
}

.detail-list dd {
  margin: 0;
}

.board-detail {
  gap: 22px;
}

.board-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.board-detail-head h2 {
  margin-top: 6px;
  font-size: 24px;
}

.board-detail-body {
  min-height: 260px;
  line-height: 1.8;
  white-space: normal;
  overflow-wrap: anywhere;
}

.board-detail-body img {
  max-width: 100%;
  height: auto;
}

@media (max-width: 1050px) {
  .login-view,
  .dashboard-grid,
  .composer,
  .settings-grid,
  .split-layout,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .metric-grid,
  .card-grid,
  .board-grid,
  .action-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .admin-view,
  .metric-grid,
  .card-grid,
  .board-grid,
  .action-grid,
  .toolbar,
  .form-grid,
  .permission-row {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

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

  .group-item,
  .group-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .commission-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .commission-links {
    justify-content: flex-start;
    margin-left: 0;
  }

  .content-view,
  .topbar,
  .login-panel,
  .login-visual {
    padding-left: 20px;
    padding-right: 20px;
  }

  .login-visual {
    min-height: 360px;
  }

  .login-visual h1 {
    font-size: 32px;
  }

  body.mobile-nav-lock {
    overflow: hidden;
  }

  .agent-view {
    display: block;
    min-width: 0;
  }

  .agent-view .workspace {
    min-width: 0;
  }

  .agent-view .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 30;
    width: min(82vw, 310px);
    height: 100dvh;
    max-height: 100dvh;
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: 16px 0 36px rgba(15, 23, 42, 0.28);
  }

  .agent-view.nav-open .sidebar {
    transform: translateX(0);
  }

  .agent-view .mobile-nav-backdrop {
    position: fixed;
    inset: 0;
    z-index: 25;
    display: none;
    width: 100%;
    height: 100%;
    border: 0;
    background: rgba(15, 23, 42, 0.46);
  }

  .agent-view.nav-open .mobile-nav-backdrop {
    display: block;
  }

  .agent-view .mobile-menu-button {
    display: flex;
  }

  .agent-view .sidebar-brand {
    margin-bottom: 18px;
  }

  .agent-view .nav-list {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .agent-view .nav-sub-list {
    margin-left: 10px;
    padding-left: 10px;
  }

  .agent-view .nav-link {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  .agent-view .topbar {
    align-items: stretch;
    gap: 12px;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  .agent-view .topbar-title {
    width: 100%;
    align-items: center;
  }

  .agent-view .topbar-title h1 {
    font-size: 22px;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  .agent-view .topbar-actions {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .agent-view .topbar-actions .compact {
    flex: 0 0 auto;
    min-height: 36px;
    padding-left: 12px;
    padding-right: 12px;
    white-space: nowrap;
  }

  .agent-view .admin-name {
    flex: 0 0 auto;
    max-width: 42vw;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .agent-view .content-view {
    padding-top: 18px;
    padding-bottom: 32px;
  }

  .agent-view .form-panel,
  .agent-view .panel,
  .agent-view .metric-card,
  .agent-view .sns-card,
  .agent-view .board-card {
    padding: 16px;
  }

  .agent-view .topbar-actions,
  .agent-view .button-row,
  .agent-view .table-actions,
  .agent-view .email-pick-actions {
    flex-wrap: wrap;
  }

  .agent-view .button-row .primary-button,
  .agent-view .button-row .ghost-button,
  .agent-view .table-actions .primary-button,
  .agent-view .table-actions .ghost-button,
  .agent-view .email-pick-actions .primary-button,
  .agent-view .email-pick-actions .ghost-button {
    flex: 1 1 160px;
  }

  .agent-view .page-size-form {
    flex: 1 1 100%;
    margin-left: 0;
  }

  .agent-view .page-size-form select,
  .agent-view .inline-select {
    width: 100%;
    min-width: 0;
  }

  .agent-view .toolbar {
    gap: 8px;
  }

  .agent-view .phone-grid,
  .agent-view .phone-parts {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .agent-view .zip-search-row {
    grid-template-columns: minmax(0, 1fr) auto;
    width: 100%;
  }

  .agent-view textarea {
    min-height: 140px;
  }

  .agent-view .table-wrap {
    margin-left: -20px;
    margin-right: -20px;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }

  .agent-view table {
    min-width: 680px;
  }

  .agent-view th,
  .agent-view td {
    padding: 12px 14px;
  }

  .agent-view .detail-list {
    grid-template-columns: 1fr;
    gap: 4px 0;
  }

  .agent-view .detail-list dd {
    margin-bottom: 10px;
  }

  .agent-view .commission-summary {
    margin-left: -20px;
    margin-right: -20px;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
    padding: 12px 20px;
  }

  .agent-view .commission-actions,
  .agent-view .board-detail-head,
  .agent-view .panel-head,
  .agent-view .activity-list li {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .agent-view .content-view,
  .agent-view .topbar {
    padding-left: 14px;
    padding-right: 14px;
  }

  .agent-view .topbar-title h1 {
    font-size: 20px;
  }

  .agent-view .form-panel,
  .agent-view .panel,
  .agent-view .metric-card,
  .agent-view .sns-card,
  .agent-view .board-card {
    padding: 14px;
  }

  .agent-view .table-wrap,
  .agent-view .commission-summary {
    margin-left: -14px;
    margin-right: -14px;
  }

  .agent-view .commission-summary {
    padding-left: 14px;
    padding-right: 14px;
  }

  .agent-view .button-row .primary-button,
  .agent-view .button-row .ghost-button,
  .agent-view .table-actions .primary-button,
  .agent-view .table-actions .ghost-button,
  .agent-view .email-pick-actions .primary-button,
  .agent-view .email-pick-actions .ghost-button {
    flex-basis: 100%;
  }

  .agent-view .zip-search-row {
    grid-template-columns: 1fr;
  }

  .agent-view .zip-search-row input,
  .agent-view .zip-search-row .ghost-button {
    border-radius: 6px;
    border-left: 1px solid var(--line);
  }

  .agent-view .zip-search-row .ghost-button {
    margin-top: 8px;
  }
}
