:root {
  --bg: #f4f5f3;
  --surface: #ffffff;
  --surface-soft: #f8faf8;
  --line: #d9ddd8;
  --line-strong: #bfc7c1;
  --text: #111827;
  --muted: #6b7280;
  --accent: #1f6b57;
  --accent-strong: #134b3d;
  --accent-soft: #e4f1ec;
  --blue-soft: #eef3ff;
  --shadow: 0 20px 50px rgba(15, 23, 42, 0.06);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --content-width: 1260px;
  --header-height: 84px;
  --font: "Pretendard", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(43, 105, 86, 0.05), transparent 30%),
    linear-gradient(180deg, #f8faf9 0%, var(--bg) 30%, #eef2ef 100%);
}

img {
  max-width: 100%;
  display: block;
}

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

button,
input {
  font: inherit;
}

.page-shell {
  width: min(var(--content-width), calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 72px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(14px);
  background: rgba(248, 250, 249, 0.88);
  border-bottom: 1px solid rgba(191, 199, 193, 0.55);
}

.header-inner {
  height: var(--header-height);
  width: min(var(--content-width), calc(100% - 32px));
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-mark {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid rgba(191, 199, 193, 0.6);
  box-shadow: var(--shadow);
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 7px;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.brand-copy strong {
  font-size: 1.05rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.brand-copy span {
  font-size: 0.86rem;
  color: var(--muted);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid rgba(191, 199, 193, 0.8);
  background: var(--surface);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.2s ease, background 0.2s ease;
}

.header-action:hover {
  transform: translateY(-1px);
  border-color: rgba(31, 107, 87, 0.55);
  background: #f7fbf9;
}

.header-action.is-active {
  color: var(--accent-strong);
  border-color: rgba(31, 107, 87, 0.45);
  background: rgba(31, 107, 87, 0.08);
}

.header-logout-form {
  margin: 0;
}

.search-panel,
.partner-board,
.detail-card,
.download-hub,
.product-document-card,
.auth-card,
.empty-centered {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(191, 199, 193, 0.7);
  box-shadow: var(--shadow);
}

.search-panel {
  border-radius: 26px;
  padding: 26px 28px;
  margin-bottom: 12px;
}

.search-panel__head {
  margin-bottom: 14px;
}

.page-title {
  margin: 0;
  font-size: clamp(1.45rem, 2.3vw, 2rem);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.search-wrap {
  position: relative;
  width: 100%;
}

.search-input {
  width: 100%;
  height: 62px;
  padding: 0 58px 0 20px;
  border-radius: 999px;
  border: 1px solid rgba(191, 199, 193, 0.9);
  background: #fbfcfb;
  outline: none;
  font-size: 0.98rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-input:focus {
  border-color: rgba(31, 107, 87, 0.65);
  box-shadow: 0 0 0 5px rgba(31, 107, 87, 0.08);
}

.search-icon {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #96a09b;
  font-size: 1.2rem;
}

.partner-board {
  border-radius: 24px;
  padding: 14px;
}

.partner-table-wrap {
  overflow: auto;
  border-radius: 16px;
  border: 1px solid #aeb9af;
  background: var(--surface);
}

.partner-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1100px;
  table-layout: fixed;
}

.partner-table .col-order {
  width: 6%;
}

.partner-table .col-company {
  width: 24%;
}

.partner-table .col-product {
  width: 14%;
}

.partner-table .col-discount {
  width: 11%;
}

.partner-table .col-support {
  width: 12%;
}

.partner-table .col-note {
  width: 33%;
}

.partner-table th,
.partner-table td {
  border-right: 1px solid #d2d8d2;
  border-bottom: 1px solid #d8ddd8;
  padding: 13px 10px;
  vertical-align: middle;
  text-align: left;
  font-size: 0.9rem;
  line-height: 1.45;
  word-break: normal;
  overflow-wrap: anywhere;
}

.partner-table th:last-child,
.partner-table td:last-child {
  border-right: 0;
}

.partner-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #edf4e7;
  border-bottom-color: #c6d2c3;
  font-weight: 800;
  font-size: 0.98rem;
}

.partner-table tbody tr:nth-child(even) {
  background: rgba(246, 248, 246, 0.86);
}

.partner-table tbody tr:hover {
  background: rgba(31, 107, 87, 0.055);
}

.partner-table tbody td {
  vertical-align: top;
}

.partner-table td.sequence-cell,
.partner-table th.sequence-cell {
  text-align: center;
  white-space: nowrap;
  font-weight: 800;
}

.partner-table td.company-name-cell,
.partner-table td:last-child {
  vertical-align: top;
}

.partner-table th:last-child,
.partner-table td:last-child {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.partner-table td:last-child {
  font-size: 0.88rem;
  line-height: 1.55;
  word-break: break-word;
}

.partner-table td:nth-child(3),
.partner-table td:nth-child(4),
.partner-table td:nth-child(5) {
  font-size: 0.88rem;
  padding-left: 10px;
  padding-right: 10px;
}

.partner-table td:nth-child(6),
.partner-table th:nth-child(6) {
  word-break: break-word;
  overflow-wrap: anywhere;
}

.partner-table td:nth-child(6) {
  font-size: 0.88rem;
}

.partner-table td.company-name-cell a {
  color: var(--text);
  font-weight: 800;
}

.partner-table td.company-name-cell a:hover {
  color: var(--accent-strong);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.partner-table td.product-cell,
.partner-table td.discount-cell,
.partner-table td.support-cell {
  font-size: 0.92rem;
}

.partner-table td.note-cell,
.partner-table th.note-cell {
  font-size: 0.92rem;
  line-height: 1.58;
}

.partner-table td.note-cell {
  white-space: pre-line;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.table-status {
  font-weight: 700;
}

.table-status.is-empty {
  color: var(--text);
}

.table-status--discount.is-filled {
  color: #2454d2;
}

.table-status--support.is-filled {
  color: #c53030;
}

.preline {
  white-space: pre-line;
}

.mobile-company-list-wrap {
  border-radius: 16px;
  border: 1px solid #cfd6cf;
  background: var(--surface);
}

.mobile-company-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-company-list li + li {
  border-top: 1px solid #e3e8e3;
}

.mobile-company-link {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px 18px;
  line-height: 1.45;
  font-size: 1rem;
  font-weight: 700;
}

.mobile-company-order {
  flex: 0 0 28px;
  color: var(--muted);
  font-weight: 800;
}

.mobile-company-name {
  flex: 1;
}

.mobile-company-link:hover {
  background: rgba(31, 107, 87, 0.05);
}

.empty-state {
  margin-top: 14px;
  padding: 28px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed rgba(191, 199, 193, 0.9);
  border-radius: 18px;
  background: #fafcfb;
}

.empty-state strong {
  display: block;
  color: var(--text);
  margin-bottom: 8px;
}

.inline-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(31, 107, 87, 0.08);
  border: 1px solid rgba(31, 107, 87, 0.16);
  color: var(--accent-strong);
  font-size: 0.86rem;
  font-weight: 700;
  margin-right: 8px;
  margin-bottom: 8px;
}

.detail-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 12px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent-strong);
  font-weight: 700;
  margin-bottom: 14px;
}

.detail-page-head h1 {
  margin: 0;
  font-size: clamp(2rem, 3vw, 2.8rem);
  letter-spacing: -0.04em;
}


.detail-card {
  border-radius: 26px;
  padding: 18px;
  margin-bottom: 12px;
}

.detail-card.compact-card {
  padding: 12px;
}

.detail-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
}

.detail-table th,
.detail-table td {
  border: 1px solid #cfd5cf;
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  font-size: 0.95rem;
  line-height: 1.52;
}

.detail-table th {
  width: 180px;
  background: #f4f7f4;
  font-weight: 800;
}

.detail-table .notice-row th,
.detail-table .notice-row td {
  color: #c53030;
  font-weight: 800;
}

.detail-table .notice-row th {
  background: #fff3f1;
}

.detail-table .notice-row td {
  background: #fff8f7;
}

.matrix-table thead th {
  background: #edf4ea;
  text-align: center;
}

.matrix-table th:first-child {
  text-align: left;
}

.matrix-table td,
.matrix-table th {
  text-align: center;
}

.matrix-table tbody th {
  background: #f7faf7;
  text-align: left;
}

.matrix-table td.preline {
  white-space: pre-line;
  line-height: 1.7;
}

.matrix-table .emphasis-row th,
.matrix-table .emphasis-row td {
  color: #c53a2f;
  font-weight: 800;
}

.download-hub {
  border-radius: 32px;
  padding: 28px;
  margin-bottom: 18px;
  border: 2px solid #2a4f87;
  background: linear-gradient(180deg, #fefefe 0%, #f7fbff 100%);
}

.download-hub-title {
  text-align: center;
  font-size: clamp(1.6rem, 3vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.product-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

.product-chip {
  min-width: 128px;
  min-height: 52px;
  padding: 0 18px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #5f87da 0%, #426cbc 100%);
  color: white;
  font-weight: 800;
  font-size: 1.1rem;
  box-shadow: 0 10px 18px rgba(66, 108, 188, 0.22);
}

.product-chip:hover {
  filter: brightness(1.04);
}

.product-documents {
  display: grid;
  gap: 24px;
}

.product-document-card {
  border-radius: 28px;
  padding: 26px;
}

.product-document-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}

.product-kicker {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.product-document-head h3 {
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.03em;
}

.product-price-copy {
  margin: 0;
  color: var(--accent-strong);
  font-size: 1rem;
  font-weight: 700;
}

.product-summary-badges {
  margin-bottom: 12px;
}

.product-preview-frame {
  border-radius: 22px;
  overflow: hidden;
  background: #f7f7f7;
  border: 1px solid #d4d8d4;
}

.product-preview-frame img {
  width: 100%;
  height: auto;
}

.document-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.primary-button,
.ghost-button,
.link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  border-radius: 999px;
  padding: 0 22px;
  font-weight: 800;
  cursor: pointer;
  border: none;
}

.primary-button {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #fff;
  box-shadow: 0 12px 24px rgba(19, 75, 61, 0.22);
}

.primary-button.small {
  min-height: 46px;
}

.ghost-button {
  border: 1px solid rgba(42, 79, 135, 0.25);
  background: #f4f7ff;
  color: #213e73;
  min-height: 46px;
}

.link-button {
  text-decoration: none;
}

.empty-centered {
  border-radius: 28px;
  padding: 72px 24px;
  text-align: center;
  margin-top: 32px;
}

.empty-centered h1 {
  margin-top: 0;
  font-size: clamp(2rem, 4vw, 3rem);
}

.empty-centered p {
  color: var(--muted);
  margin-bottom: 28px;
}

.auth-page {
  min-height: 100vh;
}

.auth-layout {
  min-height: calc(100vh - 80px);
  display: grid;
  place-items: center;
  padding: 24px 0 48px;
}

.auth-stack {
  width: min(520px, 100%);
  display: grid;
  gap: 28px;
}

.auth-logo-wrap {
  display: inline-flex;
  align-items: flex-end;
  gap: 14px;
  justify-self: center;
}

.auth-logo {
  width: 112px;
  height: auto;
}

.auth-logo-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 6px;
}

.auth-logo-copy strong {
  font-size: 1rem;
}

.auth-logo-copy span {
  color: var(--muted);
  font-size: 0.92rem;
}

.auth-card {
  border-radius: 28px;
  padding: 34px 26px 26px;
}

.auth-card h1 {
  margin: 0 0 8px;
  font-size: 1.8rem;
  letter-spacing: -0.03em;
}

.auth-card p {
  margin: 0 0 22px;
  color: var(--muted);
}

.auth-card label {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
  font-weight: 800;
}

.auth-card input {
  height: 58px;
  border-radius: 18px;
  border: 1px solid rgba(191, 199, 193, 0.9);
  padding: 0 18px;
  background: #fbfcfb;
}

.auth-card input:focus {
  outline: none;
  border-color: rgba(31, 107, 87, 0.65);
  box-shadow: 0 0 0 5px rgba(31, 107, 87, 0.08);
}

.input-hint {
  display: block;
  margin-top: -2px;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--muted);
  font-weight: 600;
}

.auth-helper {
  margin: 0 0 18px;
  font-size: 0.9rem;
}

.auth-error {
  color: #c53a2f;
  font-weight: 700;
}

.desktop-only {
  display: block;
}

.mobile-only {
  display: none;
}

@media (max-width: 960px) {
  .desktop-only {
    display: none;
  }

  .mobile-only {
    display: block;
  }

  .page-shell,
  .header-inner {
    width: min(var(--content-width), calc(100% - 20px));
  }

  .site-header {
    position: relative;
  }

  .header-inner {
    height: auto;
    padding: 14px 0;
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .brand {
    flex: 1 1 100%;
  }

  .header-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .search-panel {
    padding: 22px 16px;
  }

  .page-title {
    font-size: 1.4rem;
  }

  .search-input {
    height: 58px;
    font-size: 0.98rem;
  }

  .partner-board,
  .detail-card,
  .download-hub,
  .product-document-card {
    padding: 14px;
  }

  .detail-page-head h1 {
    font-size: 1.9rem;
  }

  .detail-table {
    display: block;
    overflow-x: auto;
  }

  .detail-table th,
  .detail-table td {
    min-width: 160px;
    font-size: 0.92rem;
  }

  .matrix-table th:first-child {
    min-width: 120px;
  }

  .download-hub-title {
    font-size: 1.7rem;
  }

  .product-chip {
    min-width: calc(50% - 7px);
    font-size: 1rem;
  }

  .product-document-head {
    flex-direction: column;
  }

  .document-actions {
    justify-content: flex-start;
  }

  .auth-layout {
    padding-top: 10px;
  }

  .auth-stack {
    width: min(100%, 520px);
  }

  .auth-logo {
    width: 88px;
  }
}


@media (max-width: 760px) {
  .header-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    align-items: stretch;
    justify-content: stretch;
  }

  .header-actions > * {
    min-width: 0;
  }

  .header-action,
  .header-user-chip {
    width: 100%;
    min-height: 46px;
    padding: 0 10px;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
    word-break: keep-all;
    overflow: hidden;
    text-overflow: ellipsis;
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    font-size: 0.84rem;
    line-height: 1;
  }

  .header-logout-form {
    width: 100%;
    margin: 0;
  }

  .header-user-chip {
    padding: 0 10px;
  }
}

@media (max-width: 640px) {
  .brand-mark {
    width: 46px;
    height: 46px;
    border-radius: 15px;
  }

  .brand-copy strong {
    font-size: 0.96rem;
  }

  .brand-copy span {
    font-size: 0.78rem;
  }

  .header-actions {
    gap: 8px;
  }

  .header-action,
  .header-user-chip {
    min-height: 42px;
    padding: 0 8px;
    font-size: 0.8rem;
  }

  .page-title {
    font-size: 1.25rem;
  }

  .partner-board {
    padding: 12px;
  }

  .mobile-company-link {
    padding: 16px 14px;
  }

  .detail-page-head {
    margin-bottom: 14px;
  }

  .detail-page-head h1 {
    font-size: 1.6rem;
  }

  .detail-card {
    border-radius: 20px;
  }

  .detail-table th,
  .detail-table td {
    padding: 12px;
    font-size: 0.88rem;
  }

  .product-chip {
    min-width: 100%;
  }

  .product-document-card {
    border-radius: 22px;
    padding: 18px;
  }

  .product-document-head h3 {
    font-size: 1.35rem;
  }

  .document-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    width: 100%;
  }

  .document-actions .primary-button,
  .document-actions .ghost-button {
    width: auto;
    flex: 1 1 0;
    min-width: 0;
    min-height: 44px;
    padding: 0 10px;
    font-size: 0.84rem;
    letter-spacing: -0.02em;
    white-space: nowrap;
  }

  .auth-card {
    padding: 28px 18px 20px;
  }

  .auth-card h1 {
    font-size: 1.5rem;
  }
}

@media (max-width: 420px) {
  .document-actions {
    gap: 6px;
  }

  .document-actions .primary-button,
  .document-actions .ghost-button {
    padding: 0 8px;
    font-size: 0.76rem;
  }
}

.header-user-chip {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(31, 107, 87, 0.08);
  color: var(--accent-strong);
  font-weight: 700;
}

.card-surface {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(191, 199, 193, 0.7);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--accent);
}

.admin-page .page-shell,
.employees-page .page-shell {
  display: grid;
  gap: 20px;
}

.admin-hero,
.employee-search-panel {
  padding: 28px;
}

.admin-hero h1,
.employee-search-panel h1 {
  margin: 0 0 8px;
  font-size: clamp(2rem, 4vw, 2.8rem);
  letter-spacing: -0.03em;
}

.admin-hero p,
.employee-search-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.role-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.role-card {
  border-radius: 18px;
  padding: 16px 18px;
  background: #f5faf8;
  border: 1px solid rgba(31, 107, 87, 0.12);
}

.role-card strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1rem;
}

.role-card p {
  margin: 0;
  font-size: 0.92rem;
}

.admin-flash {
  border-radius: 16px;
  padding: 14px 18px;
  font-weight: 700;
}

.admin-flash.is-success {
  background: #edf8f3;
  color: #16624f;
  border: 1px solid rgba(31, 107, 87, 0.16);
}

.admin-flash.is-error {
  background: #fff4f2;
  color: #c53030;
  border: 1px solid rgba(197, 48, 48, 0.16);
}

.admin-tab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-tab {
  border: 1px solid rgba(31, 107, 87, 0.12);
  background: #ffffff;
  border-radius: 999px;
  min-height: 44px;
  padding: 0 18px;
  font-weight: 700;
  cursor: pointer;
}

.admin-tab.is-active {
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-strong) 100%);
  color: #fff;
}

.admin-grid {
  display: grid;
  gap: 20px;
}

.admin-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.summary-card {
  background: #fff;
  border: 1px solid rgba(191, 199, 193, 0.72);
  border-radius: 20px;
  padding: 18px 20px;
  box-shadow: var(--shadow);
}

.summary-card span {
  display: block;
  color: var(--muted);
  margin-bottom: 6px;
}

.summary-card strong {
  font-size: 1.5rem;
  letter-spacing: -0.03em;
}

.admin-panel {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(191, 199, 193, 0.74);
  border-radius: 24px;
  box-shadow: var(--shadow);
  padding: 24px;
}

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

.panel-head h2,
.panel-head h3 {
  margin: 0 0 6px;
  font-size: clamp(1.35rem, 3vw, 1.9rem);
  letter-spacing: -0.03em;
}

.panel-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.panel-head--sub {
  margin-bottom: 14px;
}

.admin-form {
  border: 1px solid rgba(191, 199, 193, 0.62);
  background: #fdfefd;
  border-radius: 20px;
  padding: 20px;
  margin-bottom: 18px;
}

.compact-form {
  background: #fafcfb;
}

.field-grid {
  display: grid;
  gap: 14px;
}

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

.field-grid--employees {
  grid-template-columns: 220px 220px minmax(0, 1fr);
}

.field-grid__wide {
  grid-column: 1 / -1;
}

.admin-form label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

.admin-form label span {
  font-size: 0.94rem;
}

.admin-form input,
.admin-form select,
.admin-form textarea,
.employee-search-form input,
.employee-search-form select {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(191, 199, 193, 0.86);
  background: #fff;
  padding: 12px 14px;
  color: var(--text);
}

.admin-form textarea {
  resize: vertical;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.ghost-button.small,
.primary-button.small {
  min-height: 42px;
  padding: 0 18px;
  font-size: 0.94rem;
}

.ghost-button.danger {
  background: #fff5f5;
  color: #c53030;
  border-color: rgba(197, 48, 48, 0.2);
}

.table-scroll-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
  table-layout: auto;
}

.admin-table th,
.admin-table td {
  padding: 12px 10px;
  border-bottom: 1px solid rgba(191, 199, 193, 0.68);
  text-align: left;
  vertical-align: top;
  font-size: 0.94rem;
  line-height: 1.55;
}

.admin-table th {
  background: #f1f6f3;
  font-size: 0.88rem;
  font-weight: 800;
  color: #1f3f34;
}

.admin-table td.preline,
.admin-table .preline {
  white-space: pre-line;
}

.row-actions {
  white-space: nowrap;
  text-align: right;
}

.row-actions .ghost-button {
  margin-left: 6px;
}

.admin-empty {
  padding: 18px;
  border-radius: 16px;
  background: #f8faf8;
  color: var(--muted);
  text-align: center;
}

.import-inspection {
  margin-top: 18px;
  display: grid;
  gap: 14px;
}

.import-inspection p {
  margin: 0;
  color: var(--muted);
}

.employee-directory-link-wrap {
  margin-top: 16px;
}

.employee-search-form {
  margin-top: 20px;
}

.employee-table {
  min-width: 1040px;
}


.employee-directory-copy {
  margin-top: 10px;
}

.employee-directory-panel {
  margin-bottom: 0;
}

.employee-directory-board {
  padding: 14px;
}

.employee-directory-table-wrap {
  background: #fff;
}

.employee-company-table {
  min-width: 0;
  table-layout: fixed;
}

.employee-company-table .col-employee-company {
  width: 100%;
}

.employee-company-table th,
.employee-company-table td {
  padding: 16px 18px;
}

.employee-company-table td.company-name-cell {
  vertical-align: middle;
}

.employee-company-table td.company-name-cell a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.employee-company-table td.company-name-cell a::after {
  content: "→";
  color: var(--muted);
  font-size: 0.92rem;
}

.employee-company-list .mobile-company-link {
  justify-content: space-between;
}

.employee-company-list .mobile-company-link::after {
  content: "→";
  color: var(--muted);
  font-size: 0.92rem;
}

.employee-search-panel--company {
  padding: 28px;
}

.employee-company-head {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
}

.employee-company-inline {
  color: var(--text);
}

.field-grid--employee-detail {
  grid-template-columns: minmax(0, 1fr) 220px;
  align-items: end;
}

.employee-fixed-company {
  display: grid;
  gap: 6px;
  border-radius: 16px;
  border: 1px solid rgba(191, 199, 193, 0.86);
  background: #fff;
  padding: 12px 14px;
  min-height: 100%;
}

.employee-fixed-company span {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--muted);
}

.employee-fixed-company strong {
  font-size: 1rem;
  line-height: 1.4;
}

.employee-result-panel h2.preline {
  margin: 0 0 6px;
}

.employee-table--single-company {
  min-width: 960px;
}

@media (max-width: 980px) {
  .role-card-grid,
  .admin-summary-grid,
  .field-grid--two,
  .field-grid--employees,
  .field-grid--employee-detail {
    grid-template-columns: 1fr;
  }

  .panel-head {
    flex-direction: column;
  }
}


@media (max-width: 960px) {
  .employee-company-head {
    flex-direction: column;
  }

  .employee-company-table th,
  .employee-company-table td {
    padding: 14px 16px;
  }
}

.extra-cost-card {
  padding: 22px 24px;
}

.extra-cost-head {
  margin-bottom: 12px;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.extra-cost-list {
  margin: 0;
  padding-left: 22px;
  display: grid;
  gap: 10px;
  line-height: 1.7;
  color: var(--text);
}

.extra-cost-list li::marker {
  font-weight: 800;
  color: var(--accent-strong);
}

.agreements-page .page-shell {
  display: grid;
  gap: 14px;
}

.agreement-copy {
  margin-top: 10px;
}

.agreement-board {
  padding: 14px;
}

.agreement-table-wrap {
  background: #fff;
}

.agreement-table {
  min-width: 2120px;
  table-layout: fixed;
}

.agreement-table th,
.agreement-table td {
  font-size: 0.87rem;
  line-height: 1.55;
  vertical-align: top;
}

.agreement-table .agreement-col-no {
  width: 64px;
}

.agreement-table .agreement-col-company {
  width: 240px;
}

.agreement-table .agreement-col-date {
  width: 112px;
}

.agreement-table .agreement-col-contact {
  width: 170px;
}

.agreement-table .agreement-col-phone {
  width: 150px;
}

.agreement-table .agreement-col-note {
  width: 120px;
}

.agreement-table .agreement-col-address {
  width: 300px;
}

.agreement-table .agreement-col-biz {
  width: 150px;
}

.agreement-table .agreement-col-rep {
  width: 120px;
}

.agreement-table .agreement-col-keyman {
  width: 160px;
}

.agreement-table .agreement-col-support {
  width: 170px;
}

.agreement-table .agreement-col-disposable {
  width: 110px;
}

.agreement-table .agreement-col-branch {
  width: 150px;
}

.agreement-table td.agreement-cell-no,
.agreement-table th:first-child {
  text-align: center;
  font-weight: 800;
}

.agreement-table td.preline {
  white-space: pre-line;
}

@media (max-width: 900px) {
  .extra-cost-card {
    padding: 18px 18px;
  }

  .extra-cost-head {
    font-size: 1.15rem;
  }

  .extra-cost-list {
    gap: 8px;
    padding-left: 20px;
    font-size: 0.94rem;
  }

  .agreement-table {
    min-width: 1680px;
  }
}

.header-action.is-warning {
  border-color: rgba(211, 69, 69, 0.35);
  color: #a92d2d;
  background: rgba(211, 69, 69, 0.08);
}

.auth-layout--with-header {
  min-height: auto;
  padding-top: 24px;
}

.security-card {
  max-width: 540px;
}

.auth-warning {
  color: #a92d2d;
  font-weight: 700;
}

.admin-empty-inline {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted-text, #667085);
  font-size: 0.94rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.resource-panel .search-panel__head {
  gap: 8px;
}

.resource-copy {
  margin: 0;
  color: var(--muted);
}

.resource-filter-bar {
  display: flex;
  align-items: stretch;
  gap: 12px;
  margin-top: 18px;
}

.resource-search-wrap {
  flex: 1;
}

.resource-category-select-wrap {
  width: 240px;
  flex-shrink: 0;
}

.resource-category-select {
  width: 100%;
  height: 64px;
  border-radius: 22px;
  border: 1px solid var(--line-color);
  background: var(--surface);
  padding: 0 20px;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text);
}

.resource-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.resource-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(19, 86, 72, 0.18);
  background: rgba(19, 86, 72, 0.04);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}

.resource-chip.is-active {
  border-color: rgba(19, 86, 72, 0.35);
  background: rgba(19, 86, 72, 0.12);
  color: var(--brand);
}

.resource-meta-row {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  color: var(--muted);
  font-weight: 700;
}

.resource-list-wrap {
  display: grid;
  gap: 16px;
}

.resource-list-card {
  border: 1px solid var(--line-color);
  border-radius: 24px;
  background: var(--card-bg);
  box-shadow: var(--soft-shadow);
  padding: 20px 22px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.resource-list-card__body {
  flex: 1;
  min-width: 0;
}

.resource-list-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.resource-index,
.resource-type-chip,
.resource-category-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(19, 86, 72, 0.08);
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.resource-category-chip {
  background: rgba(43, 84, 160, 0.08);
  color: #2b54a0;
}

.resource-list-card h3 {
  margin: 0 0 8px;
  font-size: 1.18rem;
}

.resource-description {
  margin: 0;
  color: var(--muted);
}

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

.resource-facts div {
  border: 1px solid var(--line-color);
  border-radius: 16px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.65);
}

.resource-facts dt {
  margin: 0 0 4px;
  font-size: 0.75rem;
  color: var(--muted);
}

.resource-facts dd {
  margin: 0;
  font-weight: 700;
  word-break: break-word;
}

.resource-list-card__actions {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

@media (max-width: 900px) {
  .resource-filter-bar {
    flex-direction: column;
  }

  .resource-category-select-wrap {
    width: 100%;
  }

  .resource-list-card {
    flex-direction: column;
  }

  .resource-list-card__actions {
    width: 100%;
    justify-content: flex-end;
  }
}

@media (max-width: 640px) {
  .resource-category-select {
    height: 58px;
    border-radius: 18px;
  }

  .resource-facts {
    grid-template-columns: 1fr;
  }

  .resource-list-card {
    padding: 16px;
    border-radius: 20px;
  }

  .resource-list-card__actions {
    justify-content: stretch;
  }

  .resource-list-card__actions .primary-button {
    width: 100%;
  }

  .resource-chip {
    min-height: 34px;
    padding: 0 14px;
    font-size: 0.86rem;
  }
}
