.dog-detail-modal #dogRecords .dog-album-grid .album-media-wrap > button.album-media-preview {
  display: block !important;
  width: 100% !important;
  height: 200px !important;
  min-height: 200px !important;
  max-height: none !important;
  padding: 0 !important;
}

/* all popups: mobile viewport and internal scrolling safety */
@media (max-width: 760px) {
  .modal-back,
  .site-dialog-layer,
  .crop-layer,
  .album-viewer-layer {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    padding-top: max(8px, env(safe-area-inset-top)) !important;
    padding-right: 0 !important;
    padding-bottom: 0 !important;
    padding-left: 0 !important;
    overflow: hidden;
  }

  .modal-card,
  .modal-card.large {
    width: 100% !important;
    max-width: 100vw !important;
    height: auto;
    max-height: calc(100dvh - max(8px, env(safe-area-inset-top))) !important;
    min-height: 0;
    overflow: hidden !important;
    border-radius: 16px 16px 0 0 !important;
  }

  .modal-card > .modal-head {
    min-width: 0;
    flex: 0 0 auto;
  }

  .modal-card > .modal-head > :first-child,
  .modal-card > .modal-head h2 {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .modal-card > form,
  .modal-card > form > .form-grid,
  .modal-scroll-body,
  .modal-scroll-body > *,
  .employee-detail-body,
  .resource-detail-body {
    min-width: 0;
    min-height: 0;
    max-width: 100%;
  }

  .modal-card > form > .form-grid,
  .modal-scroll-body,
  .employee-detail-body,
  .resource-detail-body {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .modal-card .modal-actions,
  .modal-card > .modal-actions {
    flex: 0 0 auto;
    max-width: 100%;
    padding-bottom: max(14px, calc(env(safe-area-inset-bottom) + 8px)) !important;
  }

  .modal-card input,
  .modal-card select,
  .modal-card textarea,
  .modal-card button,
  .modal-card img,
  .modal-card video,
  .modal-card canvas {
    max-width: 100%;
  }

  .site-dialog-layer { align-items: end; }

  .site-dialog-card {
    width: 100%;
    max-width: 100vw;
    max-height: calc(100dvh - max(8px, env(safe-area-inset-top)));
    padding-bottom: max(20px, calc(env(safe-area-inset-bottom) + 12px));
    overflow-x: hidden;
    overflow-y: auto;
    border-radius: 22px 22px 0 0;
  }

  .crop-layer,
  .album-viewer-layer {
    align-items: center;
    padding-right: 8px !important;
    padding-bottom: max(8px, env(safe-area-inset-bottom)) !important;
    padding-left: 8px !important;
  }

  .crop-card {
    display: flex;
    width: 100%;
    max-width: 440px;
    max-height: calc(100dvh - max(16px, env(safe-area-inset-top)) - max(16px, env(safe-area-inset-bottom)));
    min-height: 0;
    flex-direction: column;
  }

  .crop-stage {
    min-height: 0;
    flex: 1 1 auto;
  }

  .crop-stage canvas {
    width: auto;
    max-width: 100%;
    max-height: min(48dvh, 360px);
  }

  .album-viewer {
    display: flex;
    width: 100%;
    max-width: 100%;
    max-height: calc(100dvh - max(16px, env(safe-area-inset-top)) - max(16px, env(safe-area-inset-bottom)));
    min-height: 0;
    flex-direction: column;
  }

  .album-viewer-head {
    min-width: 0;
    flex: 0 0 auto;
  }

  .album-viewer-head > div,
  .album-viewer-head h2,
  .album-viewer-head p {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .album-viewer-media {
    min-width: 0;
    min-height: 0;
    max-height: none;
    flex: 1 1 auto;
    overflow: hidden;
  }

  .album-viewer-media img,
  .album-viewer-media video {
    max-width: 100%;
    max-height: 100%;
  }
}

.incentive-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.incentive-month-filter { display: flex; align-items: center; gap: 9px; }
.incentive-month-filter span { color: var(--muted); font-weight: 700; white-space: nowrap; }
.incentive-month-filter select { min-width: 150px; padding: 0 38px 0 13px; border: 1px solid var(--line); border-radius: 9px; background-color: #fff; }
.incentive-stats article {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
}
.incentive-stats span,
.incentive-stats small { display: block; color: var(--muted); }
.incentive-stats strong { display: block; margin: 8px 0 3px; font-size: 24pt; }
.incentive-month-section { margin-bottom: 16px; }
.incentive-month-list { display: grid; gap: 8px; }
.incentive-month-list article {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 13px 15px;
  border: 1px solid #e6e8eb;
  border-radius: 10px;
  cursor: pointer;
}
.incentive-month-list article:hover { border-color: #bdc8c1; background: #f8faf9; }
.incentive-month-list article.active { border-color: #769080; background: #eef4f0; box-shadow: inset 3px 0 #426d54; }
.incentive-month-list article > div:first-child { display: grid; gap: 3px; }
.incentive-month-list small { color: var(--muted); }
.incentive-month-list em { color: #315c42; font-size: 16pt; font-style: normal; font-weight: 800; }
.incentive-trainer-list { display: flex; flex-wrap: wrap; gap: 6px; }
.incentive-trainer-list span { padding: 5px 8px; border-radius: 999px; background: #eef3f0; color: #536159; }
.incentive-trainer-list b { color: #315c42; }
.incentive-table table { min-width: 780px; }
.incentive-table th,
.incentive-table td { padding-top: 11px; padding-bottom: 11px; }
.incentive-table td small { color: var(--muted); }
.incentive-amount { color: #315c42; }
.payments-page .payment-table tbody tr[hidden] { display: none !important; }
.payment-table:not(.contract-table) .invoice-contract-shortcut-column {
  width: 66px !important;
  min-width: 66px !important;
  padding-right: 6px !important;
  padding-left: 6px !important;
  text-align: center;
}
.invoice-contract-shortcut {
  display: inline-grid !important;
  width: 34px !important;
  min-width: 34px !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 !important;
  border: 0;
  border-radius: 8px;
  background: #eef1f4;
  color: #53616d;
  place-items: center;
}
.invoice-contract-shortcut:hover { background: #dde5eb; color: var(--ink); }
.invoice-contract-shortcut i { font-size: 15px; }
.contract-table tbody tr.payment-contract-focused {
  position: relative;
  z-index: 1;
  background: #fff5cd !important;
  box-shadow: inset 0 0 0 2px #d2a846;
  transition: background .35s, box-shadow .35s;
}

@media (max-width: 760px) {
  #content.payments-page .payment-table:not(.contract-table) tbody tr[data-payment-search] > .invoice-contract-shortcut-column,
  #content.payments-page .payment-table:not(.contract-table) thead .invoice-contract-shortcut-column { display: none !important; }
  .incentive-month-filter { width: 100%; justify-content: space-between; }
  .incentive-month-filter select { min-width: 0; width: 150px; }
  .incentive-stats { gap: 8px; }
  .incentive-stats article { padding: 14px; }
  .incentive-stats strong { font-size: 18pt; }
  .incentive-month-section { padding: 14px; }
  .incentive-month-list article {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 9px;
    padding: 11px;
  }
  .incentive-trainer-list { grid-column: 1 / -1; order: 3; }
  .incentive-month-list em { font-size: 14pt; }
  .incentive-table { margin: 0; }
}

/* 보호자 상세 팝업: 모바일 화면 안에 고정하고 내용만 스크롤 */
@media (max-width: 760px) {
  .guardian-detail-modal {
    width: 100% !important;
    max-width: 100vw !important;
    height: min(820px, 94dvh) !important;
    max-height: 94dvh !important;
    overflow: hidden !important;
  }

  .guardian-detail-modal > form {
    min-width: 0;
    min-height: 0;
    overflow: hidden !important;
  }

  .guardian-detail-modal > form > .form-grid {
    min-width: 0;
    min-height: 0;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .guardian-detail-modal .guardian-detail {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
  }

  .guardian-detail-modal .guardian-detail p,
  .guardian-detail-modal .guardian-detail dd,
  .guardian-detail-modal .detail-link {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .guardian-detail-modal .modal-actions {
    flex: 0 0 auto;
    padding-bottom: max(12px, calc(env(safe-area-inset-bottom) + 8px)) !important;
  }
}

.mobile-invoice-menu-cell { display: none; }

@media (max-width: 760px) {
  #content.payments-page .payment-table:not(.contract-table) tbody tr[data-payment-search] {
    position: relative;
    overflow: visible;
  }

  #content.payments-page .payment-table:not(.contract-table) tbody tr[data-payment-search] > .mobile-payment-heading {
    padding-right: 42px !important;
  }

  #content.payments-page .payment-table:not(.contract-table) .mobile-invoice-menu-cell {
    position: absolute;
    z-index: 8;
    top: 4px;
    right: 5px;
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    overflow: visible;
  }

  #content.payments-page .payment-table:not(.contract-table) .mobile-invoice-menu-trigger {
    display: grid !important;
    width: 30px !important;
    min-width: 30px !important;
    height: 30px !important;
    min-height: 30px !important;
    padding: 0 !important;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #68727d;
    place-items: center;
  }

  #content.payments-page .payment-table:not(.contract-table) .mobile-invoice-menu-trigger i {
    font-size: 16px;
  }

  #content.payments-page .payment-table:not(.contract-table) .mobile-invoice-menu {
    position: absolute;
    z-index: 20;
    top: 32px;
    right: 0;
    display: grid;
    width: 110px;
    padding: 5px;
    border: 1px solid #dfe3e7;
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 8px 24px #2021242e;
  }

  #content.payments-page .payment-table:not(.contract-table) .mobile-invoice-menu[hidden] {
    display: none !important;
  }

  #content.payments-page .payment-table:not(.contract-table) .mobile-invoice-menu button {
    display: flex !important;
    width: 100% !important;
    height: 34px !important;
    min-height: 34px !important;
    align-items: center;
    justify-content: flex-start;
    margin: 0 !important;
    padding: 0 10px !important;
    border: 0;
    border-radius: 6px !important;
    background: #fff;
    color: var(--danger) !important;
    font-size: 10.5pt !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    text-align: left;
  }

  #content.payments-page .payment-table:not(.contract-table) tbody tr[data-payment-search] > .mobile-payment-actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-column: 1 / -1 !important;
    width: 100%;
    align-items: stretch !important;
    justify-items: stretch !important;
    gap: 4px;
    overflow: visible;
  }

  #content.payments-page .payment-table:not(.contract-table) .mobile-payment-actions > button,
  #content.payments-page .payment-table:not(.contract-table) .mobile-payment-actions .invoice-renewal-actions,
  #content.payments-page .payment-table:not(.contract-table) .mobile-payment-actions .invoice-renewal-actions > button {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: none !important;
    align-self: stretch !important;
    justify-self: stretch !important;
  }

  #content.payments-page .payment-table:not(.contract-table) .mobile-payment-actions .invoice-renewal-actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 4px;
  }
}

@media (max-width: 760px) {
  .dog-detail-modal {
    height: min(820px, 94dvh) !important;
    max-height: 94dvh !important;
    overflow: hidden !important;
  }

  .dog-detail-modal #dogRecords {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .dog-detail-modal > .dog-detail-actions {
    position: relative !important;
    bottom: auto !important;
    z-index: 6;
    display: flex;
    flex: 0 0 auto;
    min-height: 0;
    padding-top: 10px !important;
    padding-right: 15px !important;
    padding-bottom: max(12px, calc(env(safe-area-inset-bottom) + 8px)) !important;
    padding-left: 15px !important;
    background: #fff;
  }
}
.dog-detail-modal #dogRecords .album-media-preview > img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}
@media (max-width: 760px) {
  .dog-detail-modal #dogRecords .dog-album-grid .album-media-wrap > button.album-media-preview {
    height: 200px !important;
    min-height: 200px !important;
  }
}

@media (max-width: 760px) {
  .payments-page > .page-head { margin-bottom: 12px; }
  .payments-page > .page-head p { display: none; }
  .payments-page .payment-list-toolbar { margin-bottom: 12px; }
  .payments-page .payment-table { margin: 0; overflow: visible; border: 0; background: transparent; }
  .payments-page .payment-table table { min-width: 0; border-collapse: separate; }
  .payments-page .payment-table tbody { gap: 8px; }
  .payments-page .payment-table tbody tr[data-payment-search] {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid #dfe3e7;
    border-radius: 12px;
    box-shadow: 0 2px 7px #2021240a;
  }
  .payments-page .payment-table tbody tr[data-payment-search] > td {
    display: grid;
    min-width: 0 !important;
    min-height: 48px;
    align-content: center;
    justify-content: stretch;
    gap: 3px;
    margin: 0;
    padding: 7px 10px;
    border: 0 !important;
    border-top: 1px solid #edf0f2 !important;
    text-align: left;
    white-space: normal;
  }
  .payments-page .payment-table tbody tr[data-payment-search] > td:nth-child(even) { border-right: 1px solid #edf0f2 !important; }
  .payments-page .payment-table tbody tr[data-payment-search] > td::before {
    display: block;
    color: #89919a;
    font-size: 9.5pt;
    font-weight: 700;
    line-height: 1.15;
  }
  .payments-page .payment-table tbody tr[data-payment-search] > td:first-child {
    grid-column: 1 / -1;
    min-height: 53px;
    padding: 7px 11px;
    border-top: 0 !important;
    border-right: 0 !important;
    background: #f5f7f9;
  }
  .payments-page .payment-table tbody tr[data-payment-search] > td:first-child::before { display: none; }
  .payments-page .payment-owner-dog-stack { display: grid !important; height: 38px !important; min-height: 38px !important; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr !important; align-items: center !important; }
  .payments-page .payment-owner-dog-stack br { display: none !important; }
  .payments-page .payment-owner-dog-stack .payment-entity-link { height: auto !important; line-height: 1.25 !important; text-align: left; }
  .payments-page .payment-owner-dog-stack .payment-entity-link:last-child { padding-left: 10px; border-left: 1px solid #d9dee3; color: #64707b; }
  .payments-page .payment-owner-dog-stack .payment-entity-link { display: grid !important; gap: 2px; }
  .payments-page .payment-owner-dog-stack .payment-entity-link::before { color: #89919a; font-size: 9.5pt; font-weight: 700; line-height: 1; text-decoration: none; }
  .payments-page .payment-owner-dog-stack .payment-entity-link:first-child::before { content: '보호자'; }
  .payments-page .payment-owner-dog-stack .payment-entity-link:last-child::before { content: '교육견'; }
  .payments-page .payment-table td small { margin-top: 1px; font-size: 10pt; line-height: 1.25; }
  .payments-page .payment-table td strong,
  .payments-page .payment-table td > span:not(.payment-owner-dog-stack) { font-size: 11pt; }
  .payments-page .payment-info-lines { gap: 1px; justify-items: start; }
  .payments-page .payment-table tbody tr[data-payment-search] > td:nth-child(n+8) {
    display: flex;
    min-height: 39px;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 5px 7px;
  }
  .payments-page .payment-table tbody tr[data-payment-search] > td:nth-child(n+8)::before { display: none; }
  .payments-page .payment-table tbody tr[data-payment-search] > td:nth-child(10) { grid-column: 1 / -1; min-height: 0; padding: 3px 7px 6px; }
  .payments-page .payment-table tbody tr[data-payment-search] > td:nth-child(10):empty { display: none; }
  .payments-page .payment-table button.small,
  .payments-page .payment-table .contract-invoice-count,
  .payments-page .payment-table .payment-status-button {
    height: 30px !important;
    min-height: 30px !important;
    padding: 0 9px !important;
    font-size: 10.5pt !important;
  }
  .payments-page .payment-table .payment-delete-icon { width: 32px; height: 30px; min-height: 30px; }
  .payments-page .payment-table .status { width: max-content; padding: 3px 8px; font-size: 10pt; }
  .payments-page .payment-pagination { margin-top: 10px; }
}

.dogs-page .dog-card { min-height: 0; padding-right: 22px; padding-bottom: 12px; }
.dog-education-total { position: absolute; z-index: 0; right: 8px; bottom: 3px; margin: 0; color: #d5d9dd; font-size: 40pt; font-weight: 800; line-height: 1; letter-spacing: -.06em; text-align: right; pointer-events: none; }
.dogs-page .dog-avatar-column { display: flex; flex: 0 0 auto; flex-direction: column; align-items: center; gap: 7px; }
.dogs-page .dog-card .dog-training-status { display: inline-flex; height: 26px; min-height: 26px; align-items: center; margin: 0; padding: 0 8px; line-height: 1; white-space: nowrap; }
.dogs-page .dog-card .eyebrow { overflow-wrap: normal; word-break: keep-all; white-space: nowrap; }
.payment-detail-row { cursor: pointer; }
.payment-detail-row:hover { background: #faf9f6; }
.invoice-paid-note { margin: -4px 0 0; padding: 11px 13px; border-radius: 7px; background: #f0f1f2; color: var(--muted); font-size: 11pt; }
.payment-date-short { display: none; }
.payments-page .payment-entity-link,
.payments-page .payment-entity-link:hover,
.payments-page .payment-entity-link:focus,
.payments-page .payment-entity-link:active,
.payments-page .payment-entity-link * {
  text-decoration: none !important;
}
.mobile-contract-menu-cell { display: none; }
.invoice-contract-ended { display: block; margin-top: 4px; color: var(--danger); font-size: 10.5pt; font-weight: 700; }
.payment-owner-dog-cell { min-width: 125px; line-height: 1.25; }
.payment-owner-dog-stack { display: inline-grid !important; grid-template-rows: 20px 20px !important; gap: 0 !important; height: 40px !important; min-height: 40px !important; align-items: center !important; align-content: center !important; margin: 0 !important; padding: 0 !important; line-height: 20px !important; vertical-align: middle; }
.payment-owner-dog-stack br { display: none !important; }
.payment-owner-dog-stack .payment-entity-link { display: inline !important; height: 20px !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important; line-height: 20px !important; }
.payment-owner-dog-stack br + .payment-entity-link { color: var(--muted); font-weight: 600; }
.payment-refund-button { color: var(--danger); }
.invoice-history { margin-top: 4px; padding-top: 18px; border-top: 1px solid var(--line); }
.invoice-history h3 { margin: 0 0 12px; font-size: 14pt; }
.invoice-history > p { margin: 0; color: var(--muted); }
.invoice-history article { padding: 14px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.invoice-history article + article { margin-top: 9px; }
.invoice-history article.is-refund { background: #fff8f7; }
.invoice-history article > strong { display: block; margin-bottom: 9px; }
.invoice-history dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 18px; margin: 0; }
.invoice-history dl div { display: flex; min-width: 0; gap: 8px; }
.invoice-history dt { flex: 0 0 auto; color: var(--muted); }
.invoice-history dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
@media (max-width: 760px) { .invoice-history dl { grid-template-columns: 1fr; } }
.contract-table td:last-child { white-space: nowrap; }
.contract-table td:last-child button + button { margin-left: 6px; }
.payments-page .payment-table { overflow-x: auto; overflow-y: hidden; }
.shell nav.payment-pagination { grid-column: 1 / -1; display: flex; width: 100%; flex-direction: row; align-items: center; justify-content: center; gap: 12px; margin-top: 14px; }
.payment-pagination[hidden] { display: none; }
.payment-pagination strong { min-width: 64px; color: #59616b; text-align: center; }
.shell nav.payment-pagination button { display: inline-flex; width: auto; min-width: 76px; flex: 0 0 auto; align-items: center; justify-content: center; text-align: center; }
.shell nav.payment-pagination button span,
.shell nav.payment-pagination button i { display: inline-flex; height: 16px; align-items: center; justify-content: center; line-height: 16px; }
.shell nav.payment-pagination button i,
.shell nav.payment-pagination button i::before { width: 12px; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent !important; box-shadow: none; font-family: "Font Awesome 6 Free"; font-size: 11px; font-style: normal; font-weight: 900; }
@media (max-width: 760px) {
  .dogs-page .dog-card { min-height: 0; padding-right: 18px; padding-bottom: 10px; }
  .dog-education-total { right: 6px; bottom: 2px; font-size: 34pt; }
}
.date-input-group {
  position: relative;
  display: grid;
  grid-template-columns: minmax(88px, 1.35fr) minmax(68px, .8fr) minmax(68px, .8fr) 38px;
  align-items: end;
  gap: 10px;
}
.date-part-wrap {
  display: flex;
  min-width: 0;
  height: 48px;
  align-items: center;
  border-bottom: 1px solid #8f98a3;
}
.date-part-wrap:focus-within { border-bottom-color: var(--ink); border-bottom-width: 2px; }
.date-input-group .date-part {
  width: 100% !important;
  min-width: 0 !important;
  height: 47px !important;
  min-height: 47px !important;
  padding: 0 3px !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  text-align: center;
  font-size: 12pt !important;
}
.date-part-wrap b { flex: 0 0 auto; padding-right: 4px; color: var(--muted); font-size: 12pt; font-weight: 700; }
.task-title-priority-row { grid-template-columns: minmax(0, 7fr) minmax(120px, 3fr); }
.task-date-row { grid-template-columns: minmax(0, 1fr); }
.task-date-time-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: end; }
.task-date-time-row .task-time-field { min-width: 0; }
.routine-title-priority-row { grid-template-columns: minmax(0, 7fr) minmax(120px, 3fr) !important; }
.routine-modal[data-compact-layout="1"] .routine-timing-row { grid-template-columns: minmax(0, 1fr); }
.routine-date-time-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important; align-items: end; }
.routine-date-time-row .task-time-field { min-width: 0; }
.payment-status-button { cursor: pointer; white-space: nowrap; }
.payment-status-button.is-waiting { background: #dff3ff; color: #28759b; }
.payment-status-button.is-waiting:hover { background: #cbeaff; }
.payment-entity-link { display: inline; height: auto !important; min-height: 0 !important; padding: 0; border: 0; background: transparent; color: var(--ink); font-weight: 700; text-decoration: underline; text-decoration-color: #aeb5bc; text-underline-offset: 3px; }
.payment-entity-link:hover { color: #28759b; text-decoration-color: currentColor; }
.payment-usage-link { font-weight: 600; }
.dashboard-page [data-dashboard-task] { cursor: pointer; }
select[name="priority"] option[value="none"] { color: var(--ink); }
select[name="priority"] option[value="low"] { color: #2474c6; }
select[name="priority"] option[value="medium"] { color: #d97706; }
select[name="priority"] option[value="high"] { color: #d43c32; }
select[name="priority"][data-priority-value="none"] { color: var(--ink) !important; }
select[name="priority"][data-priority-value="low"] { color: #2474c6 !important; }
select[name="priority"][data-priority-value="medium"] { color: #d97706 !important; }
select[name="priority"][data-priority-value="high"] { color: #d43c32 !important; }
.payments-page > .page-head { gap: 8px; }
.payment-trainer-filter { min-width: 190px; max-width: 260px; }
.payment-info-lines { display: grid; gap: 4px; justify-items: center; }
.payment-delete-icon { display: inline-grid; width: 32px; height: 32px; padding: 0; border: 0; place-items: center; background: transparent; color: var(--danger); }
.payment-delete-icon:hover { background: transparent; color: #7f211c; }
.payment-status-button.is-overdue { border-color: #c94f45 !important; background: #d85b50 !important; color: #fff !important; box-shadow: 0 2px 7px #a83c3538; }
.payment-status-button.is-overdue:hover { background: #c94f45 !important; }
.contract-table .contract-delete-head,
.contract-table .contract-delete-cell { width: 40px; min-width: 40px; padding-right: 4px; padding-left: 4px; text-align: center; }
.contract-table .contract-delete-cell .payment-delete-icon { margin: 0; }
.contract-invoice-count { height: 28px !important; min-height: 28px !important; padding: 0 9px; border: 0; border-radius: 6px; background: #e8edf1; color: #425466; font-weight: 700; line-height: 1; }
.contract-invoice-count:hover { background: #dce5ec; color: #273746; }
.contract-table tbody tr.contract-row-ended,
.contract-table tbody tr.contract-row-ended:hover { background: #eef0f2 !important; color: #858b92; }
.contract-table tbody tr.contract-row-ended .payment-entity-link,
.contract-table tbody tr.contract-row-ended small { color: #858b92 !important; }
.contract-table tbody tr.contract-row-ended button { opacity: .7; }
.payment-table tbody tr.invoice-row-inactive,
.payment-table tbody tr.invoice-row-inactive:hover { background: #eef0f2 !important; color: #858b92; }
.payment-table tbody tr.invoice-row-inactive .payment-entity-link,
.payment-table tbody tr.invoice-row-inactive small { color: #858b92 !important; }
.payment-table tbody tr.invoice-row-inactive button { opacity: .7; }
.payment-table tbody tr.invoice-row-renewal-needed,
.payment-table tbody tr.invoice-row-renewal-needed:hover { background: #fff3bf !important; color: #5f4b12; }
.payment-table tbody tr.invoice-row-renewal-needed .payment-entity-link { color: #5f4b12 !important; }
.contract-table tbody tr:nth-child(even):not(.contract-row-ended),
.payment-table:not(.contract-table) tbody tr:nth-child(even):not(.invoice-row-inactive):not(.invoice-row-renewal-needed) { background: #f7f9fb; }
.contract-table tbody tr:nth-child(even):not(.contract-row-ended):hover,
.payment-table:not(.contract-table) tbody tr:nth-child(even):not(.invoice-row-inactive):not(.invoice-row-renewal-needed):hover { background: #f1f5f8; }
.payment-table button[aria-disabled="true"] { cursor: not-allowed; filter: grayscale(.35); opacity: .38 !important; }
.audit-log-table table { min-width: 820px; }
.audit-log-table th, .audit-log-table td { padding-top: 10px; padding-bottom: 10px; }
.audit-log-table code { color: #68727d; font-size: 10.5pt; }
.audit-action { display: inline-flex; min-width: 46px; justify-content: center; padding: 4px 8px; border-radius: 999px; font-size: 10.5pt; font-weight: 700; }
.audit-create { background: #dcefe3; color: #356146; }
.audit-update { background: #dfeaf4; color: #365e7c; }
.audit-delete { background: #f4dfdc; color: #963c35; }
html.page-scroll-locked { overflow: hidden; overscroll-behavior: none; }
body.page-scroll-locked { position: fixed; right: 0; left: 0; width: 100%; overflow: hidden; overscroll-behavior: none; }
.modal-back, .site-dialog-layer, .crop-layer, .album-viewer-layer { overscroll-behavior: contain; }
.modal-card, .site-dialog-card, .crop-card, .album-viewer { overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
@media (max-width: 760px) {
  .payments-page .payment-table .mobile-payment-info-cell::before {
    content: attr(data-mobile-label) !important;
  }
  .payments-page .payment-owner-dog-stack .payment-entity-link {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 3px;
    overflow: hidden;
  }
  .payments-page .payment-owner-dog-stack .payment-entity-link::before {
    display: block;
    line-height: 1;
  }
  .payments-page .payment-owner-dog-stack .mobile-entity-value {
    display: block;
    min-width: 0;
    overflow: hidden;
    color: inherit;
    font-size: 11pt;
    font-weight: 700;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}
@media (max-width: 760px) {
  .payments-page .payment-table { overflow: visible; }
  .payments-page .payment-table tbody tr[data-payment-search] > td { border-right: 0 !important; }
  .payments-page .payment-table tbody tr[data-payment-search] > .mobile-payment-info-cell:nth-of-type(odd) { border-left: 1px solid #edf0f2 !important; }
  .payments-page .payment-table .mobile-original-action-cell { display: none !important; }
  .payments-page .payment-table .mobile-payment-actions {
    display: flex !important;
    grid-column: 1 / -1;
    min-height: 43px;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    padding: 6px 9px !important;
    border-top: 1px solid #dfe3e7 !important;
    background: #fafbfc;
  }
  .payments-page .payment-table .mobile-payment-actions::before { display: none !important; }
  .payments-page .payment-table .mobile-payment-actions button { margin: 0 !important; }
  .payments-page .contract-table tbody tr[data-payment-search] { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .payments-page .contract-table .mobile-payment-heading { grid-column: 1 / -1; min-height: 61px; }
  .payments-page .contract-table .payment-owner-dog-stack { height: 46px !important; min-height: 46px !important; }
  .payments-page .contract-table .mobile-payment-info-cell { grid-column: span 3; border-left: 0 !important; }
  .payments-page .contract-table tbody tr[data-payment-search] > td:nth-child(3) { border-left: 1px solid #edf0f2 !important; }
  .payments-page .contract-table tbody tr[data-payment-search] > td:nth-child(4),
  .payments-page .contract-table tbody tr[data-payment-search] > td:nth-child(5),
  .payments-page .contract-table tbody tr[data-payment-search] > td:nth-child(6) { grid-column: span 2; }
  .payments-page .contract-table tbody tr[data-payment-search] > td:nth-child(5),
  .payments-page .contract-table tbody tr[data-payment-search] > td:nth-child(6) { border-left: 1px solid #edf0f2 !important; }
  .payments-page .contract-table .mobile-payment-actions { grid-column: 1 / -1; flex-wrap: nowrap; justify-content: flex-end; overflow: hidden; }
  .payments-page .contract-table .mobile-payment-actions button { flex: 0 1 auto; min-width: 0; padding-right: 7px !important; padding-left: 7px !important; font-size: 10pt !important; }
  .payments-page .contract-table .mobile-payment-actions .payment-delete-icon { flex: 0 0 30px; padding: 0 !important; }
}
@media (max-width: 760px) {
  .shell aside {
    top: 0;
    bottom: auto;
    height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
  }
  .shell aside .aside-top { flex: 0 0 auto; }
  .shell aside nav {
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }
  .shell aside .aside-foot {
    position: relative;
    z-index: 2;
    flex: 0 0 auto;
    margin-top: 8px;
    padding-bottom: max(4px, env(safe-area-inset-bottom));
    background: #222427;
  }
}
@media (max-width: 760px) {
  .dashboard-page .stats {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 10px;
  }
  .dashboard-page .stats article {
    grid-column: span 2;
    min-height: 60px;
    padding: 7px 9px;
    border-radius: 9px;
  }
  .dashboard-page .stats article:nth-child(4),
  .dashboard-page .stats article:nth-child(5),
  .dashboard-page .stats article:last-child {
    grid-column: span 3;
    min-height: 56px;
  }
  .dashboard-page .stats span {
    overflow: hidden;
    font-size: 10pt;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .dashboard-page .stats strong {
    margin-top: 3px;
    font-size: 17px;
    line-height: 1.1;
  }
  .dashboard-page .stats em { font-size: 9.5pt; }
  .dashboard-page .stats .progress { height: 3px; margin-top: 5px; }
}
@media (max-width: 760px) {
  .payments-page .payment-table tbody tr[data-payment-search] {
    border-color: #d9dee3;
    border-radius: 10px;
    box-shadow: none;
  }
  .payments-page .payment-table tbody tr[data-payment-search] > td {
    min-height: 36px;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    align-content: center;
    column-gap: 7px;
    row-gap: 1px;
    padding: 5px 9px;
    border-top: 1px solid #edf0f2 !important;
    border-right: 0 !important;
    border-left: 0 !important;
  }
  .payments-page .payment-table tbody tr[data-payment-search] > td::before {
    grid-column: 1;
    grid-row: 1 / span 2;
    align-self: center;
    font-size: 9pt;
    white-space: nowrap;
  }
  .payments-page .payment-table tbody tr[data-payment-search] > td > *:not(.payment-owner-dog-stack) {
    grid-column: 2;
    min-width: 0;
    justify-self: end;
    text-align: right;
  }
  .payments-page .payment-table tbody tr[data-payment-search] > td:first-child {
    min-height: 43px;
    padding: 5px 9px;
    background: #f7f8fa;
  }
  .payments-page .payment-owner-dog-stack,
  .payments-page .contract-table .payment-owner-dog-stack {
    width: 100%;
    height: 32px !important;
    min-height: 32px !important;
  }
  .payments-page .payment-owner-dog-stack .payment-entity-link {
    display: flex !important;
    min-width: 0;
    align-items: center;
    gap: 6px;
    overflow: hidden;
    font-size: 10.5pt;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .payments-page .payment-owner-dog-stack .payment-entity-link::before { flex: 0 0 auto; font-size: 9pt; }
  .payments-page .payment-table td small { font-size: 9.5pt; }
  .payments-page .payment-table td strong,
  .payments-page .payment-table td > span:not(.payment-owner-dog-stack) { font-size: 10.5pt; }
  .payments-page .contract-table .mobile-payment-heading { min-height: 43px; }
  .payments-page .contract-table tbody tr[data-payment-search] > td:nth-child(4),
  .payments-page .contract-table tbody tr[data-payment-search] > td:nth-child(5),
  .payments-page .contract-table tbody tr[data-payment-search] > td:nth-child(6) {
    min-height: 41px;
    grid-template-columns: 1fr;
    align-content: center;
    gap: 2px;
    padding-right: 6px;
    padding-left: 6px;
  }
  .payments-page .contract-table tbody tr[data-payment-search] > td:nth-child(4)::before,
  .payments-page .contract-table tbody tr[data-payment-search] > td:nth-child(5)::before,
  .payments-page .contract-table tbody tr[data-payment-search] > td:nth-child(6)::before {
    grid-column: 1;
    grid-row: auto;
    justify-self: center;
  }
  .payments-page .contract-table tbody tr[data-payment-search] > td:nth-child(4) > *,
  .payments-page .contract-table tbody tr[data-payment-search] > td:nth-child(5) > *,
  .payments-page .contract-table tbody tr[data-payment-search] > td:nth-child(6) > * {
    grid-column: 1;
    justify-self: center;
    text-align: center;
  }
  .payments-page .payment-table .mobile-payment-actions {
    min-height: 36px;
    padding: 4px 7px !important;
    background: #f7f8fa;
  }
  .payments-page .payment-table .mobile-payment-actions button,
  .payments-page .payment-table button.small,
  .payments-page .payment-table .contract-invoice-count,
  .payments-page .payment-table .payment-status-button {
    height: 27px !important;
    min-height: 27px !important;
    padding: 0 7px !important;
    font-size: 9.5pt !important;
  }
  .payments-page .payment-table .mobile-payment-actions .payment-delete-icon { width: 27px; flex-basis: 27px; padding: 0 !important; }
}
@media (min-width: 761px) {
  .payments-page .payment-table .mobile-payment-actions { display: none !important; }
}
@media (max-width: 760px) {
  .employees-page > .page-head { margin-bottom: 14px; }
  .employees-page > .page-head p { display: none; }
  .employee-table { margin: 0; border: 0; overflow: visible; background: transparent; }
  .employee-table table { min-width: 0; border-collapse: separate; }
  .employee-table thead { display: none; }
  .employee-table tbody { display: grid; gap: 7px; }
  .employee-table tbody tr[data-employee] {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    grid-template-rows: 25px 25px;
    align-items: center;
    align-content: center;
    column-gap: 9px;
    row-gap: 0;
    min-height: 64px;
    padding: 6px 11px;
    border: 1px solid #e0e4e7;
    border-radius: 10px;
    background: #fff;
  }
  .employee-table tbody tr[data-employee]:active { background: #f3f5f7; }
  .employee-table tbody tr[data-employee] > td {
    height: 25px;
    min-height: 25px;
    align-self: center;
    padding: 0;
    border: 0;
    line-height: 25px;
    text-align: left;
    white-space: nowrap;
  }
  .employee-table tbody tr[data-employee] > td:nth-child(1),
  .employee-table tbody tr[data-employee] > td:nth-child(2) {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
  }
  .employee-table tbody tr[data-employee] > td:nth-child(1)::before,
  .employee-table tbody tr[data-employee] > td:nth-child(2)::before {
    flex: 0 0 auto;
    color: #89919a;
    font-size: 9.5pt;
    font-weight: 700;
  }
  .employee-table tbody tr[data-employee] > td:nth-child(3),
  .employee-table tbody tr[data-employee] > td:nth-child(4),
  .employee-table tbody tr[data-employee] > td:nth-child(5) {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
  }
  .employee-table tbody tr[data-employee] > td:nth-child(5) { justify-content: flex-end; }
  .employee-table tbody tr[data-employee] > td::before { line-height: 1; }
  .employee-table tbody tr[data-employee] > td:nth-child(1) { grid-column: 1; grid-row: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .employee-table tbody tr[data-employee] > td:nth-child(1) { line-height: 1.15; }
  .employee-table tbody tr[data-employee] > td:nth-child(1) strong { font-size: 13pt; }
  .employee-table tbody tr[data-employee] > td:nth-child(2) { grid-column: 1; grid-row: 2; min-width: 0; overflow: hidden; color: var(--muted); font-size: 10.5pt; text-overflow: ellipsis; }
  .employee-table tbody tr[data-employee] > td:nth-child(3) { grid-column: 2; grid-row: 1; color: #4f5964; font-size: 11pt; font-weight: 700; }
  .employee-table tbody tr[data-employee] > td:nth-child(4) { grid-column: 3; grid-row: 1; padding-left: 9px; border-left: 1px solid #dfe3e7; color: #65717d; font-size: 10.5pt; font-weight: 700; }
  .employee-table tbody tr[data-employee] > td:nth-child(5) { grid-column: 2 / 4; grid-row: 2; justify-self: end; font-size: 10.5pt; }
  .employee-table tbody tr[data-employee] > td:nth-child(5) .status { display: inline-flex; height: 23px; align-items: center; padding: 0 7px; font-size: 10pt; line-height: 1; }
  .employee-table tbody tr[data-employee] > td:nth-child(5) button { height: 25px !important; min-height: 25px !important; padding: 0 9px !important; font-size: 10.5pt !important; }

  .employee-detail-modal .modal-head { padding: 14px 16px; }
  .employee-detail-modal .employee-detail-title { gap: 7px; }
  .employee-detail-modal .employee-detail-title span { font-size: 18pt; }
  .employee-detail-modal .employee-detail-title small { font-size: 10.5pt; }
  .employee-detail-body { padding: 0 14px 22px; }
  .employee-detail-summary { grid-template-columns: 70px minmax(0, 1fr); gap: 10px 12px; padding: 7px 0 16px; }
  .employee-detail-photo { width: 68px; height: 68px; font-size: 10pt; }
  .employee-detail-summary dl { grid-template-columns: 1fr 1fr; gap: 5px 12px; }
  .employee-detail-summary dl div { display: grid; gap: 1px; }
  .employee-detail-summary dt { font-size: 9.5pt; }
  .employee-detail-summary dd { overflow: hidden; font-size: 10.5pt; text-overflow: ellipsis; white-space: nowrap; }
  .employee-detail-actions { gap: 7px; }
  .employee-detail-actions button { height: 36px !important; min-height: 36px !important; padding: 0 10px !important; }
  .employee-detail-section { padding: 17px 0; }
  .employee-detail-section-head { margin-bottom: 9px; }
  .employee-detail-section-head h3 { font-size: 15pt; }
  .employee-detail-section-head button { height: 32px !important; min-height: 32px !important; }
  .employee-salary-table, .employee-history-table { overflow: visible; border: 0; border-radius: 0; }
  .employee-salary-row.is-head, .employee-history-row.is-head { display: none; }
  .employee-salary-row:not(.is-head) {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    min-width: 0;
    margin-bottom: 7px;
    padding: 10px 11px;
    border: 1px solid #e0e4e7;
    border-radius: 10px;
    background: #fff;
  }
  .employee-salary-row:not(.is-head):last-child { margin-bottom: 0; border-bottom: 1px solid #e0e4e7; }
  .employee-salary-row:not(.is-head) > span { padding: 0; }
  .employee-salary-row:not(.is-head) > span:nth-child(1) { grid-column: 1; grid-row: 1; font-weight: 700; }
  .employee-salary-row:not(.is-head) > span:nth-child(2) { grid-column: 2; grid-row: 1; color: #334e63; font-weight: 700; }
  .employee-salary-row:not(.is-head) > span:nth-child(3) { grid-column: 1; grid-row: 2; margin-top: 5px; color: var(--muted); font-size: 10.5pt; }
  .employee-salary-row:not(.is-head) > span:nth-child(4) { grid-column: 2; grid-row: 2; margin-top: 5px; }
  .employee-salary-row:not(.is-head) > span:nth-child(4) button { height: 29px !important; min-height: 29px !important; padding: 0 8px !important; font-size: 10pt !important; }
  .employee-history-grid { gap: 14px; }
  .employee-history-block h3 { margin-bottom: 7px; font-size: 12.5pt; }
  .employee-history-row:not(.is-head) { display: grid; min-width: 0; margin-bottom: 7px; padding: 7px 10px; border: 1px solid #e0e4e7; border-radius: 10px; background: #fff; }
  .employee-history-row:not(.is-head):last-child { margin-bottom: 0; border-bottom: 1px solid #e0e4e7; }
  .employee-history-row:not(.is-head) > span { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 7px; padding: 4px 0; font-size: 10.5pt; }
  .employee-history-row:not(.is-head) > span::before { content: attr(data-label); color: var(--muted); font-size: 10pt; font-weight: 700; }
  .employee-history-table > p, .employee-detail-empty { padding: 18px 10px; border: 1px solid #e3e6e9; border-radius: 10px; background: #fff; font-size: 10.5pt; }
}
.invoice-renewal-actions { display: inline-flex; align-items: center; justify-content: center; gap: 5px; white-space: nowrap; }
.hotel-renewal-months-control { position: relative; display: block; }
.hotel-renewal-months-control input { padding-right: 48px !important; text-align: center; }
.hotel-renewal-months-control span { position: absolute; top: 50%; right: 14px; color: var(--muted); font-weight: 700; pointer-events: none; transform: translateY(-50%); }
.contract-auto-renew-help { grid-column: 1 / -1; display: flex; min-height: 46px; align-items: flex-start; gap: 9px; margin: -16px 0 2px; padding: 12px 14px; border: 1px solid #d8dde3; border-radius: 10px; background: #f4f6f8; color: #626b75; font-size: 11pt; line-height: 1.5; }
.contract-auto-renew-help.is-two-line { min-height: 66px; }
.contract-auto-renew-help i { flex: 0 0 auto; margin-top: 2px; color: #77818c; font-size: 15px; }
.contract-auto-renew-help span { min-width: 0; }
.contract-service-field > select { display: none !important; }
.contract-service-field > label { display: block !important; }
.contract-service-field { grid-column: auto; }
.contract-service-radios { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.contract-service-radios label { display: block; cursor: pointer; }
.contract-service-radios input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.contract-service-radios span { display: flex; height: 48px; align-items: center; justify-content: center; border: 1px solid #d7dce1; border-radius: 9px; background: #eceff2; color: #8a929c; font-weight: 700; transition: .15s; }
.contract-service-radios input:checked + span { border-color: var(--steel); background: var(--steel); color: #fff; box-shadow: 0 3px 10px #20212424; }
.contract-service-radios label:hover span { border-color: #9da4ac; }
.contract-lesson-type { grid-column: 1 / -1; }
.contract-lesson-radios { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.contract-lesson-radios label { display: block; cursor: pointer; }
.contract-lesson-radios input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.contract-lesson-radios span { display: flex; height: 44px; align-items: center; justify-content: center; border: 1px solid #d7dce1; border-radius: 9px; background: #eceff2; color: #8a929c; font-weight: 700; transition: .15s; }
.contract-lesson-radios input:checked + span { border-color: var(--steel); background: var(--steel); color: #fff; box-shadow: 0 3px 10px #20212424; }
.contract-lesson-radios label:hover span { border-color: #9da4ac; }
.contract-lesson-type + .field input[readonly] { color: #59636d; background: #f1f3f5; cursor: default; }
.new-contract-modal { width: min(780px, calc(100vw - 32px)); max-height: 94vh; overflow-x: hidden; overflow-y: auto; background: #f8f9fa; }
.new-contract-modal .modal-head { padding: 18px 24px; align-items: flex-start; }
.new-contract-title h2 { margin: 0; font-size: 21pt; letter-spacing: -.04em; }
.new-contract-title p { margin: 5px 0 0; color: var(--muted); font-size: 11pt; }
.new-contract-modal #modalForm > .form-grid { display: grid; grid-template-columns: 1fr; gap: 12px; padding: 14px; }
.new-contract-section { min-width: 0; height: auto; overflow: visible; border: 1px solid #dfe3e7; border-radius: 13px; background: #fff; }
.new-contract-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 13px 17px 11px; border-bottom: 1px solid #cfd6dd; border-radius: 12px 12px 0 0; background: #e6ebf0; }
.new-contract-section-head h3 { margin: 0; color: #343b43; font-size: 14pt; letter-spacing: -.02em; }
.new-contract-section-head span { color: #68727d; font-size: 10.5pt; }
.new-contract-section-body { display: grid; grid-template-columns: 1fr 1fr; gap: 13px 14px; min-width: 0; height: auto; overflow: visible; padding: 15px 17px 17px; }
.new-contract-modal .field { gap: 5px; min-width: 0; }
.new-contract-modal .field > label { font-size: 11pt; }
.new-contract-modal input:not([type="hidden"]):not([type="radio"]),
.new-contract-modal select { height: 44px !important; min-height: 44px !important; }
.new-contract-modal .contract-service-radios span { height: 44px; }
.new-contract-modal .payment-training-fields,
.new-contract-modal .payment-hotel-fields { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 14px; padding: 0; background: transparent; }
.new-contract-modal .payment-training-fields[hidden],
.new-contract-modal .payment-hotel-fields[hidden] { display: none; }
.new-contract-modal .contract-renewal-section .new-contract-section-body { grid-template-columns: 1fr; gap: 0; padding-top: 5px; padding-bottom: 11px; }
.new-contract-modal .contract-memo-section .new-contract-section-body { grid-template-columns: 1fr; }
.new-contract-modal .contract-memo-section textarea { min-height: 82px; }
.new-contract-modal .payment-auto-renew { grid-column: 1 / -1; min-height: 0; margin: 0; padding: 0 4px; border-top: 0; line-height: 1.35; }
.new-contract-modal .payment-auto-renew span { font-size: 11pt; line-height: 1.35; }
.new-contract-modal .payment-auto-renew button { height: 26px; min-height: 26px; padding: 0; line-height: 26px; }
.new-contract-modal .contract-auto-renew-help { min-height: 0; margin: -2px 0 0; padding: 3px 4px 0; border: 0; border-radius: 0; background: transparent; color: #526b82; }
.new-contract-modal .contract-auto-renew-help.is-two-line { min-height: 0; }
.new-contract-modal .contract-auto-renew-help i { color: #c17d20; }
.new-contract-modal .payment-amount-row { grid-column: auto; align-self: end; }
.new-contract-modal .payment-amount-row { grid-template-columns: 1fr; }
.new-contract-modal .payment-amount-row #paymentFree { display: none !important; }
.new-contract-modal .contract-date-field .date-part-wrap { border-bottom: 1px solid #77828e !important; }
.new-contract-modal .contract-date-field .date-input-group { padding-bottom: 1px; }
.new-contract-modal .field:has(textarea) { grid-column: 1 / -1; }
.new-contract-modal .field textarea { min-height: 68px; }
.new-contract-modal .modal-actions { align-items: flex-end; padding: 13px 18px; }
.new-contract-modal .contract-footer-date { display: grid; grid-template-columns: auto minmax(0, 1fr); width: min(390px, calc(100% - 110px)); margin-right: auto; align-items: center; gap: 12px; }
.new-contract-modal .contract-footer-date > label { margin: 0; font-size: 11pt; white-space: nowrap; }
.new-contract-modal .contract-footer-date .date-input-group { min-width: 0; }
.dog-registration-modal .dog-registration-photo-section .new-contract-section-body { grid-template-columns: 1fr; padding-top: 12px; padding-bottom: 12px; }
.dog-registration-modal .dog-profile-picker { margin: 0; padding: 0; border: 0; }
.dog-registration-modal .dog-profile-select { min-height: 112px; border-color: #c9d0d7; background: #f6f7f8; }
.dog-registration-modal .dog-profile-preview { width: 88px; height: 88px; }
.dog-registration-modal .dog-registration-target-section .new-contract-section-body { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dog-registration-modal .dog-registration-body-section .new-contract-section-body { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.dog-registration-modal .dog-registration-body-section .field { grid-column: span 2; }
.dog-registration-modal .dog-registration-body-section .field:has([name="microchipNo"]) { grid-column: span 4; }
.dog-registration-modal .dog-registration-note-section .new-contract-section-body { grid-template-columns: 1fr 1fr; }
.dog-registration-modal .dog-registration-note-section .field { grid-column: auto; }
.dog-registration-modal .dog-registration-note-section textarea { min-height: 82px; }
.dog-registration-modal .new-contract-section-body > .field:not(.dog-profile-picker):not(:has(textarea)) { display: grid; grid-template-rows: 20px 44px; align-content: start; gap: 5px; }
.dog-registration-modal .new-contract-section-body > .field:not(.dog-profile-picker):not(:has(textarea)) > label:first-child { display: flex; height: 20px; align-items: center; margin: 0; line-height: 20px; }
.dog-registration-modal .new-contract-section-body > .field:not(.dog-profile-picker):not(:has(textarea)) > input:not([type="hidden"]),
.dog-registration-modal .new-contract-section-body > .field:not(.dog-profile-picker):not(:has(textarea)) > select,
.dog-registration-modal .new-contract-section-body > .field:not(.dog-profile-picker):not(:has(textarea)) > .date-input-group { align-self: end; height: 44px !important; min-height: 44px !important; margin: 0; }
.dog-registration-modal .date-input-group { position: relative; align-items: end; }
.dog-registration-modal .date-input-group::after { position: absolute; right: 38px; bottom: 0; left: 0; height: 1px; background: #c8cdd3; content: ""; pointer-events: none; }
.dog-registration-modal .date-input-group:focus-within::after { height: 2px; background: var(--ink); }
.dog-registration-modal .date-part-wrap { height: 44px; border-bottom: 0; }
.dog-registration-modal .date-part-wrap:focus-within { border-bottom: 0; }
.dog-registration-modal .date-input-group .date-part { height: 43px !important; min-height: 43px !important; }
.dog-registration-modal .date-picker-button { height: 44px !important; min-height: 44px !important; }
.entry-registration-modal { width: min(780px, calc(100vw - 32px)); max-height: 94vh; overflow-x: hidden; overflow-y: auto; background: #f8f9fa; }
.entry-registration-modal .modal-head { padding: 18px 24px; align-items: flex-start; }
.entry-registration-title h2 { margin: 0; font-size: 21pt; letter-spacing: -.04em; }
.entry-registration-title p { margin: 5px 0 0; color: var(--muted); font-size: 11pt; }
.entry-registration-modal #modalForm > .form-grid { display: grid; grid-template-columns: 1fr; gap: 12px; padding: 14px; }
.entry-registration-modal .entry-form-section > .new-contract-section-body { grid-template-columns: 1fr; }
.entry-registration-modal .entry-form-section .task-modal-row,
.entry-registration-modal .entry-form-section .routine-row { grid-column: 1; width: 100%; }
.entry-registration-modal .field { gap: 5px; min-width: 0; }
.entry-registration-modal .field > label { font-size: 11pt; }
.entry-registration-modal input:not([type="hidden"]):not([type="radio"]),
.entry-registration-modal select { height: 44px !important; min-height: 44px !important; }
.entry-registration-modal textarea { min-height: 78px; }
.entry-registration-modal .repeat-type button { min-height: 38px; padding-top: 7px; padding-bottom: 7px; }
.entry-registration-modal .modal-actions { padding: 13px 18px; }
@media (min-width: 761px) {
  .entry-registration-modal .task-modal-row,
  .entry-registration-modal .routine-title-row,
  .entry-registration-modal .routine-timing-row,
  .entry-registration-modal .routine-people-row {
    column-gap: 28px;
    background-image: linear-gradient(#d9dfe5, #d9dfe5);
    background-position: center;
    background-repeat: no-repeat;
    background-size: 1px 100%;
    background-origin: content-box;
    background-clip: content-box;
  }
  .entry-registration-modal .task-title-priority-row,
  .entry-registration-modal .routine-title-priority-row,
  .entry-registration-modal .routine-timing-row {
    background-image: none;
  }
  .entry-registration-modal .task-title-priority-row > :nth-child(2),
  .entry-registration-modal .routine-title-priority-row > :nth-child(2) {
    box-sizing: border-box;
    border-left: 1px solid #d9dfe5;
    padding-left: 14px;
  }
  .entry-registration-modal .routine-date-time-row > :first-child { padding-right: 14px; }
  .entry-registration-modal .routine-date-time-row > :nth-child(2) {
    box-sizing: border-box;
    border-left: 1px solid #d9dfe5;
    padding-left: 14px;
  }
}
@media (min-width: 761px) {
  .new-contract-modal .contract-target-section .new-contract-section-body,
  .new-contract-modal .contract-payment-section .new-contract-section-body,
  .new-contract-modal .payment-hotel-fields {
    column-gap: 28px;
    background-image: linear-gradient(#d9dfe5, #d9dfe5);
    background-position: center;
    background-repeat: no-repeat;
    background-size: 1px 100%;
    background-origin: content-box;
    background-clip: content-box;
  }
  .new-contract-modal .payment-training-fields > .contract-lesson-type + .field { padding-right: 0; }
  .new-contract-modal .payment-training-fields > .contract-lesson-type + .field + .field { box-sizing: border-box; width: calc(100% + 7px); margin-left: -7px; padding-left: 21px; border-left: 1px solid #d9dfe5; }
  .contract-edit-modal .contract-condition-section .contract-lesson-type + .field { padding-right: 0; }
  .contract-edit-modal .contract-condition-section .contract-lesson-type + .field + .field { box-sizing: border-box; width: calc(100% + 7px); margin-left: -7px; padding-left: 21px; border-left: 1px solid #d9dfe5; }
}
.contract-edit-modal .contract-target-section .field:not(.contract-edit-note) { display: grid; grid-template-rows: 20px 44px; align-content: start; gap: 5px; }
.contract-edit-modal .contract-target-section .field:not(.contract-edit-note) > label:first-child { display: flex; height: 20px; align-items: center; margin: 0; line-height: 20px; }
.contract-edit-modal .contract-target-section .field:not(.contract-edit-note) > input:not([type="hidden"]),
.contract-edit-modal .contract-target-section .field:not(.contract-edit-note) > select { box-sizing: border-box; width: 100%; height: 44px !important; min-height: 44px !important; margin: 0; align-self: end; }
.contract-edit-modal .contract-edit-note { display: block !important; grid-column: 1 / -1; min-height: 0 !important; height: auto !important; margin: 2px 0 0; padding: 10px 13px; color: #b45d20; font-size: 10.5pt; line-height: 1.45; }
@media (max-width: 760px) {
  .entry-registration-modal { width: 100%; }
  .entry-registration-modal .modal-head { padding: 16px 18px; }
  .entry-registration-title p,
  .entry-registration-modal .new-contract-section-head span { display: none; }
  .entry-registration-modal #modalForm > .form-grid { padding: 10px; gap: 10px; }
  .entry-registration-modal .new-contract-section-head { padding: 12px 14px 10px; }
  .entry-registration-modal .new-contract-section-body { padding: 13px 14px 15px; }
  .new-contract-modal { width: 100%; }
  .new-contract-modal .modal-head { padding: 16px 18px; }
  .new-contract-title p, .new-contract-section-head span { display: none; }
  .new-contract-modal #modalForm > .form-grid { padding: 10px; gap: 10px; }
  .new-contract-section-head { padding: 12px 14px 10px; }
  .new-contract-section-body { grid-template-columns: 1fr; padding: 13px 14px 15px; }
  .new-contract-modal .payment-training-fields,
  .new-contract-modal .payment-hotel-fields { grid-template-columns: 1fr; }
  .new-contract-modal .payment-amount-row { grid-column: 1; }
  .new-contract-modal .modal-actions { flex-wrap: wrap; }
  .new-contract-modal .contract-footer-date { grid-template-columns: auto minmax(0, 1fr); width: 100%; margin: 0 0 5px; gap: 8px; }
  .dog-registration-modal .dog-registration-target-section .new-contract-section-body,
  .dog-registration-modal .dog-registration-body-section .new-contract-section-body,
  .dog-registration-modal .dog-registration-note-section .new-contract-section-body { grid-template-columns: 1fr; }
  .dog-registration-modal .dog-registration-body-section .field,
  .dog-registration-modal .dog-registration-body-section .field:has([name="microchipNo"]) { grid-column: 1; }
  .dog-registration-modal .dog-registration-note-section .field { grid-column: 1; }
  .dog-registration-modal .dog-profile-select { min-height: 98px; }
  .dog-registration-modal .dog-profile-preview { width: 76px; height: 76px; }
}
@media (min-width: 761px) {
  .payments-page .payment-table table { width: 100%; table-layout: auto; }
  .payments-page .payment-table th,
  .payments-page .payment-table td { width: auto !important; min-width: 0 !important; }
  .payments-page .payment-table th:last-child,
  .payments-page .payment-table td:last-child,
  .payments-page .contract-table .contract-delete-head,
  .payments-page .contract-table .contract-delete-cell { width: 40px !important; min-width: 40px !important; }
  .payments-page .payment-table th,
  .payments-page .payment-table td { padding: 7px 8px; }
  .payments-page .payment-table td small { margin-top: 2px; line-height: 1.3; }
  .payments-page .payment-table .small,
  .payments-page .payment-table .primary.small,
  .payments-page .payment-table .secondary.small,
  .payments-page .payment-table .danger-button.small { height: 24px !important; min-height: 24px !important; padding: 0 12px !important; border-radius: 5px !important; font-size: 12pt !important; line-height: 1 !important; }
  .payments-page .payment-table td button.small { margin: 0 1px !important; vertical-align: middle; }
  .payments-page .payment-table td:has(button.small) { padding-top: 1px !important; padding-bottom: 1px !important; }
  #content .payment-table button[data-edit-contract],
  #content .payment-table button[data-delete-contract],
  #content .payment-table button[data-end-contract],
  #content .payment-table button[data-contract-manual-invoice],
  #content .payment-table button[data-edit-payment],
  #content .payment-table button[data-delete-payment],
  #content .payment-table button[data-payment-status],
  #content .payment-table button.payment-status-button.is-refunded,
  #content .payment-table button[data-payment-schedule],
  #content .payment-table button[data-payment-refund],
  #content .payment-table button[data-invoice-end-contract],
  #content .payment-table button[data-contract-invoices],
  #content .payment-table button[data-manual-invoice] {
    height: 28px !important;
    min-height: 28px !important;
    padding-top: 0 !important;
    padding-right: 12px !important;
    padding-bottom: 0 !important;
    padding-left: 12px !important;
    line-height: 1 !important;
  }
  .payments-page .payment-table td .status { padding-top: 3px; padding-bottom: 3px; }
  .contract-table table { table-layout: auto; }
  .contract-table th,
  .contract-table td { padding: 4px 8px; }
  .contract-table th:nth-child(1),
  .contract-table td:nth-child(1),
  .contract-table th:nth-child(2),
  .contract-table td:nth-child(2),
  .contract-table th:nth-child(5),
  .contract-table td:nth-child(5),
  .contract-table th:nth-child(6),
  .contract-table td:nth-child(6),
  .contract-table th:nth-child(7),
  .contract-table td:nth-child(7) { width: 1%; white-space: nowrap; }
  .contract-table th:nth-child(3),
  .contract-table td:nth-child(3),
  .contract-table th:nth-child(4),
  .contract-table td:nth-child(4) { width: auto; }
  .contract-table td:nth-child(4) small { margin-top: 2px; }
  .contract-table th:nth-child(8),
  .contract-table td:nth-child(8),
  .contract-table th:nth-child(9),
  .contract-table td:nth-child(9),
  .contract-table th:nth-child(10),
  .contract-table td:nth-child(10) { width: 1%; padding-right: 5px; padding-left: 5px; white-space: nowrap; }
  .payment-table:not(.contract-table) th:last-child,
  .payment-table:not(.contract-table) td:last-child { width: 40px !important; min-width: 40px !important; padding-right: 4px; padding-left: 4px; }
}
.dog-detail-modal #dogRecords .album-media-preview span {
  top: 50% !important;
  right: auto !important;
  bottom: auto !important;
  left: 50% !important;
  padding: 0 !important;
  background: transparent !important;
  font-size: 0 !important;
  transform: translate(-50%, -50%);
}
.dog-detail-modal #dogRecords .album-media-preview span i {
  display: grid;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  place-items: center;
  background: #111b;
  color: #fff;
  font-size: 18px;
}
.dog-detail-modal #dogRecords .album-thumb-actions { top: 10px; bottom: auto; }
.dog-detail-modal #dogRecords .album-thumb-meta {
  right: auto;
  bottom: 12px;
  left: 12px;
  max-width: calc(100% - 24px);
  text-align: left;
}
.date-input-group .date-picker-input {
  position: absolute !important;
  right: 0;
  bottom: 0;
  width: 1px !important;
  min-width: 1px !important;
  height: 1px !important;
  min-height: 1px !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0;
  pointer-events: none;
}
.date-picker-button {
  display: grid !important;
  width: 38px;
  min-width: 38px;
  height: 48px !important;
  min-height: 48px !important;
  padding: 0 !important;
  border: 0;
  background: transparent;
  color: var(--steel);
  place-items: center;
  margin-left: -10px;
}
.date-picker-button:hover { color: var(--ink); }
.date-picker-button i { font-size: 20px; }
@media (max-width: 760px) {
  .task-title-priority-row { grid-template-columns: minmax(0, 7fr) minmax(105px, 3fr); gap: 10px; }
  .task-date-time-row, .routine-date-time-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important; gap: 8px; }
  .routine-title-priority-row { grid-template-columns: minmax(0, 7fr) minmax(105px, 3fr) !important; gap: 10px; }
  .task-date-time-row .date-input-group, .routine-date-time-row .date-input-group { grid-template-columns: minmax(0, 1.2fr) minmax(0, .72fr) minmax(0, .72fr) 30px; gap: 3px; }
  .task-date-time-row .date-picker-button, .routine-date-time-row .date-picker-button { width: 30px; min-width: 30px; }
  .task-date-time-row .task-time-control, .routine-date-time-row .task-time-control { grid-template-columns: 58px minmax(0, 1fr) minmax(0, 1fr); gap: 4px; }
  .payment-table:not(.contract-table) td:nth-child(3):before { content: '담당 훈련사'; }
  .payment-table:not(.contract-table) td:nth-child(4):before { content: '항목'; }
  .payment-table:not(.contract-table) td:nth-child(5):before { content: '이용 현황'; }
  .payment-table:not(.contract-table) td:nth-child(6):before { content: '결제정보'; }
  .payment-table:not(.contract-table) td:nth-child(7):before { content: '상태'; }
  .payment-table:not(.contract-table) td:nth-child(8):before { content: '일정 등록'; }
  .payment-table:not(.contract-table) td:nth-child(9):before { content: '비고'; }
  .payment-table:not(.contract-table) td:nth-child(10):before { content: none; }
  .contract-table td:nth-child(1):before { content: '보호자/견'; }
  .contract-table td:nth-child(2):before { content: '담당 훈련사'; }
  .contract-table td:nth-child(3):before { content: '교육 종류'; }
  .contract-table td:nth-child(4):before { content: '이용 현황'; }
  .contract-table td:nth-child(5):before { content: '계약 금액'; }
  .contract-table td:nth-child(6):before { content: '자동 갱신'; }
  .contract-table td:nth-child(7):before { content: '청구 목록'; }
  .contract-table td:nth-child(8):before { content: '발행'; }
  .contract-table td:nth-child(9):before { content: none; }
  .contract-table td:nth-child(10):before { content: none; }
  .payment-info-lines { justify-items: end; }
  .payment-trainer-filter { min-width: 150px; max-width: calc(100vw - 30px); }
  .date-input-group { grid-template-columns: minmax(76px, 1.25fr) minmax(57px, .8fr) minmax(57px, .8fr) 34px; gap: 6px; }
  .date-picker-button { width: 34px; min-width: 34px; margin-left: -6px; }
}
.contract-edit-note { margin: -4px 0 0; padding: 11px 13px; border-radius: 9px; background: #f3f4f5; color: var(--muted); font-size: 11pt; }
.shell .brand[role="button"] { cursor: pointer; border-radius: 10px; outline: none; }
.remember-login-option { display: flex; align-items: center; margin: -3px 0 14px; color: #4e5968; cursor: pointer; font-size: 11pt; font-weight: 700; }
.remember-login-option input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.remember-login-option span { display: inline-flex; align-items: center; gap: 9px; }
.remember-login-option i { display: grid; width: 20px; height: 20px; place-items: center; border: 1px solid #cbd2d9; border-radius: 5px; background: #fff; color: #fff; font-size: 12px; font-style: normal; }
.remember-login-option input:checked + span i { border-color: var(--form-primary); background: var(--form-primary); }
.remember-login-option input:checked + span i::before { content: '\2713'; }
.remember-login-option input:focus-visible + span i { box-shadow: 0 0 0 3px #35383c1c; }
.shell .brand[role="button"]:focus-visible { box-shadow: 0 0 0 3px #c69b5840; }
.shell > aside > nav { display: flex; flex-direction: column; gap: 12px; }
.shell .sidebar-section { display: grid; gap: 1px; }
.shell .sidebar-section h3 { margin: 0 0 2px; padding: 0 13px; color: #92979d; font-size: 9.5pt; font-weight: 700; letter-spacing: .06em; line-height: 1.4; }
.shell .sidebar-section button { width: 100%; height: 32px !important; min-height: 32px !important; max-height: 32px; padding: 0 12px !important; line-height: 32px; }
@media (max-width: 760px) {
  .shell > aside > nav { gap: 10px; }
  .shell .sidebar-section h3 { padding-right: 13px; padding-left: 13px; }
  .shell .sidebar-section button { height: 30px !important; min-height: 30px !important; max-height: 30px; padding-top: 0 !important; padding-bottom: 0 !important; line-height: 30px; }
}
.contract-table td:last-child { gap: 6px; }
.aside-foot,
.aside-foot .aside-account {
  align-items: center !important;
}
.aside-foot .aside-account span,
.aside-foot .aside-account small {
  display: inline-flex;
  align-items: center;
  height: 42px;
  line-height: 42px;
}
.resource-list { display: grid; gap: 11px; }
.resource-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  cursor: pointer;
  transition: .15s;
}
.resource-card:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.resource-card h3 { margin: 0 0 7px; font-size: 16pt; }
.resource-card p { max-width: 850px; margin: 0; overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.resource-card-meta { display: grid; justify-items: end; gap: 7px; color: var(--muted); font-size: 11pt; }
.resource-card-meta strong { color: var(--steel); }
.resource-form-modal .field:first-child { grid-column: 1 / -1; }
.resource-file-picker { display: flex; min-height: 82px; align-items: center; justify-content: center; gap: 9px; padding: 15px; border: 1px dashed #9da2a8; border-radius: 13px; background: #f5f6f7; cursor: pointer; }
.resource-file-picker:hover { border-color: var(--steel); background: #eceeef; }
.resource-file-picker span { color: var(--muted); font-size: 11pt; }
.resource-file-names { display: grid; gap: 5px; padding: 11px 13px; border-radius: 9px; background: #eef0f2; color: var(--muted); }
.resource-file-names span { display: flex; justify-content: space-between; gap: 12px; color: var(--ink); }
.resource-file-names small { color: var(--muted); }
.resource-detail-modal { width: min(980px, calc(100vw - 32px)); }
.resource-detail-body { padding: 24px 28px 32px; }
.resource-detail-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); }
.resource-detail-meta > div { display: flex; gap: 7px; }
.resource-detail-content { min-height: 90px; margin: 24px 0; line-height: 1.75; white-space: pre-wrap; }
.resource-attachments { padding-top: 22px; border-top: 1px solid var(--line); }
.resource-attachments h3 { margin: 0 0 14px; }
.resource-attachments > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.resource-media { position: relative; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 12px; background: #202124; }
.resource-media-preview { position: relative; display: block; width: 100%; padding: 0; border: 0; background: #161719; cursor: pointer; }
.resource-media img,
.resource-media video { display: block; width: 100%; height: 280px; object-fit: contain; background: #161719; }
.resource-media span { display: block; overflow: hidden; padding: 10px 12px; color: #fff; text-overflow: ellipsis; white-space: nowrap; }
.resource-media-download { position: absolute; top: 10px; right: 10px; z-index: 3; display: grid; width: 38px; height: 38px; border-radius: 50%; place-items: center; background: #111c; color: #fff; text-decoration: none; box-shadow: 0 3px 12px #0005; }
.resource-media-download:hover { background: #fff; color: var(--ink); }
.resource-video-play { position: absolute; top: 50%; left: 50%; display: grid; width: 52px; height: 52px; border-radius: 50%; place-items: center; background: #111b; color: #fff; font-size: 19px; transform: translate(-50%, -50%); }
.resource-download { display: flex; min-width: 0; min-height: 72px; align-items: center; gap: 13px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 11px; background: #f5f6f7; color: var(--ink); text-decoration: none; }
.resource-download:hover { background: #eceeef; }
.resource-download > i { font-size: 24px; color: var(--steel); }
.resource-download span { display: grid; min-width: 0; gap: 4px; }
.resource-download strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resource-download small { color: var(--muted); }
@media (max-width: 760px) {
  .resource-card { grid-template-columns: 1fr; padding: 16px; }
  .resource-card-meta { display: flex; justify-content: space-between; }
  .resource-file-picker { flex-wrap: wrap; text-align: center; }
  .resource-file-picker span { width: 100%; }
  .resource-detail-modal { width: 100%; }
  .resource-detail-body { padding: 18px 16px 25px; }
  .resource-detail-meta { align-items: flex-start; }
  .resource-attachments > div { grid-template-columns: 1fr; }
  .resource-media img,
  .resource-media video { height: auto; max-height: 60vh; }
  .resource-detail-content { min-height: 60px; }
}

/* Final mobile payment alignment: semantic labels, independent of table column removal. */
@media (max-width: 760px) {
  .payments-page .payment-table .mobile-payment-info-cell::before { content: attr(data-mobile-label) !important; }
  .payments-page .payment-owner-dog-stack .payment-entity-link {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    align-content: center;
    gap: 3px;
    min-width: 0;
    overflow: hidden;
  }
  .payments-page .payment-owner-dog-stack .payment-entity-link::before { display: block; line-height: 1; }
  .payments-page .payment-owner-dog-stack .mobile-entity-value {
    display: block;
    min-width: 0;
    overflow: hidden;
    font-size: 11pt;
    font-weight: 700;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* Unified mobile payment cells: every label/value starts at the same top inset. */
@media (max-width: 760px) {
  .payments-page .payment-table tbody tr[data-payment-search] > .mobile-payment-heading,
  .payments-page .payment-table tbody tr[data-payment-search] > .mobile-payment-info-cell {
    min-height: 0;
    align-self: stretch;
    align-items: start;
    align-content: start;
    justify-content: stretch;
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: max-content;
    gap: 4px;
    padding: 8px 9px;
    text-align: left;
  }
  .payments-page .payment-table tbody tr[data-payment-search] > .mobile-payment-info-cell::before {
    grid-column: 1;
    grid-row: auto;
    align-self: start;
    justify-self: start;
    margin: 0;
    font-size: 9pt;
    line-height: 1.1;
    text-align: left;
  }
  .payments-page .payment-table tbody tr[data-payment-search] > .mobile-payment-info-cell > * {
    grid-column: 1;
    grid-row: auto;
    align-self: start;
    justify-self: start;
    margin: 0;
    text-align: left;
  }
  .payments-page .payment-table tbody tr[data-payment-search] > .mobile-payment-info-cell .payment-info-lines {
    justify-items: start;
  }
  .payments-page .payment-table tbody tr[data-payment-search] > .mobile-payment-info-cell small {
    margin-top: 0;
  }
  .payments-page .contract-table tbody tr[data-payment-search] > td:nth-child(4),
  .payments-page .contract-table tbody tr[data-payment-search] > td:nth-child(5),
  .payments-page .contract-table tbody tr[data-payment-search] > td:nth-child(6) {
    min-height: 0;
    align-content: start;
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
    padding: 8px 9px;
  }
  .payments-page .contract-table tbody tr[data-payment-search] > td:nth-child(4)::before,
  .payments-page .contract-table tbody tr[data-payment-search] > td:nth-child(5)::before,
  .payments-page .contract-table tbody tr[data-payment-search] > td:nth-child(6)::before,
  .payments-page .contract-table tbody tr[data-payment-search] > td:nth-child(4) > *,
  .payments-page .contract-table tbody tr[data-payment-search] > td:nth-child(5) > *,
  .payments-page .contract-table tbody tr[data-payment-search] > td:nth-child(6) > * {
    grid-column: 1;
    grid-row: auto;
    align-self: start;
    justify-self: start;
    margin: 0;
    text-align: left;
  }
  .payments-page .payment-owner-dog-stack {
    align-items: stretch !important;
    align-content: stretch !important;
  }
  .payments-page .payment-owner-dog-stack .payment-entity-link {
    align-content: start;
    justify-content: stretch;
    padding-top: 0;
    padding-bottom: 0;
    text-align: left;
  }
}

/* Keep every mobile payment info cell to the same compact two-line rhythm. */
@media (max-width: 760px) {
  .payments-page .payment-table tbody tr[data-payment-search] > .mobile-payment-info-cell {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-rows: max-content max-content;
    align-items: start !important;
    align-content: start !important;
    gap: 3px !important;
  }
  .payments-page .payment-table tbody tr[data-payment-search] > .mobile-payment-info-cell::before {
    display: block !important;
    grid-column: 1 !important;
    grid-row: 1 !important;
    width: 100%;
  }
  .payments-page .payment-table tbody tr[data-payment-search] > .mobile-payment-info-cell > * {
    display: block;
    grid-column: 1 !important;
    grid-row: 2 !important;
    justify-self: start !important;
    text-align: left !important;
  }
  .payments-page .payment-table tbody tr[data-payment-search] > .mobile-payment-info-cell .payment-info-lines {
    display: flex !important;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
  }
  .payments-page .payment-table tbody tr[data-payment-search] > .mobile-payment-info-cell .payment-info-lines > * {
    margin: 0;
  }
  .payments-page .contract-table tbody tr[data-payment-search] > td:nth-child(4) {
    grid-template-columns: auto minmax(0, 1fr) !important;
    grid-template-rows: max-content max-content;
  }
  .payments-page .contract-table tbody tr[data-payment-search] > td:nth-child(4)::before {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
  }
  .payments-page .contract-table tbody tr[data-payment-search] > td:nth-child(4) > strong {
    grid-column: 1 !important;
    grid-row: 2 !important;
  }
  .payments-page .contract-table tbody tr[data-payment-search] > td:nth-child(4) > small {
    grid-column: 2 !important;
    grid-row: 2 !important;
    align-self: center;
    margin: 0 0 0 5px;
    white-space: nowrap;
  }
  .payments-page .contract-table .mobile-payment-info-cell .contract-renew-button {
    width: auto;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    line-height: 1.2 !important;
    vertical-align: top;
  }
  .payments-page .payment-table .mobile-payment-info-cell button.small,
  .payments-page .payment-table .mobile-payment-info-cell .payment-status-button {
    height: 25px !important;
    min-height: 25px !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    line-height: 1 !important;
  }
  .payments-page .payment-owner-dog-stack .payment-entity-link:first-child {
    padding-right: 9px !important;
  }
  .payments-page .payment-owner-dog-stack .payment-entity-link:last-child {
    padding-left: 9px !important;
  }
}

/* Mobile invoices: usage, payment and status share one compact row. */
@media (max-width: 760px) {
  .payments-page .payment-table:not(.contract-table) tbody tr[data-payment-search] {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
  .payments-page .payment-table:not(.contract-table) .mobile-payment-heading,
  .payments-page .payment-table:not(.contract-table) .mobile-payment-actions {
    grid-column: 1 / -1;
  }
  .payments-page .payment-table:not(.contract-table) .mobile-payment-info-cell {
    grid-column: span 3;
  }
  .payments-page .payment-table:not(.contract-table) tbody tr[data-payment-search] > .mobile-payment-info-cell:nth-of-type(4),
  .payments-page .payment-table:not(.contract-table) tbody tr[data-payment-search] > .mobile-payment-info-cell:nth-of-type(5),
  .payments-page .payment-table:not(.contract-table) tbody tr[data-payment-search] > .mobile-payment-info-cell:nth-of-type(6) {
    grid-column: span 2;
  }
  .payments-page .payment-table:not(.contract-table) tbody tr[data-payment-search] > .mobile-payment-info-cell:nth-of-type(5),
  .payments-page .payment-table:not(.contract-table) tbody tr[data-payment-search] > .mobile-payment-info-cell:nth-of-type(6) {
    border-left: 1px solid #edf0f2 !important;
  }
}

/* Contract list renewal is text, so the global 48px button control must not size its row. */
#content.payments-page .contract-table .contract-renew-button,
#content.payments-page .contract-table button.contract-renew-button,
#content.payments-page .contract-table tbody tr[data-payment-search] > td:nth-child(6) > button {
  display: inline-flex !important;
  width: auto !important;
  height: 18px !important;
  min-width: 0 !important;
  min-height: 18px !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  line-height: 1.2 !important;
  vertical-align: top !important;
}

@media (max-width: 760px) {
  #content.payments-page .contract-table tbody tr[data-payment-search] > td:nth-child(4),
  #content.payments-page .contract-table tbody tr[data-payment-search] > td:nth-child(5),
  #content.payments-page .contract-table tbody tr[data-payment-search] > td:nth-child(6) {
    min-height: 0 !important;
    padding-top: 4px !important;
    padding-bottom: 4px !important;
    row-gap: 2px !important;
  }

  #content.payments-page .payment-table:not(.contract-table) tbody tr[data-payment-search] > td:nth-child(4),
  #content.payments-page .payment-table:not(.contract-table) tbody tr[data-payment-search] > td:nth-child(5),
  #content.payments-page .payment-table:not(.contract-table) tbody tr[data-payment-search] > td:nth-child(6) {
    min-height: 0 !important;
    padding-top: 4px !important;
    padding-bottom: 4px !important;
    row-gap: 2px !important;
  }

  #content.payments-page .payment-table:not(.contract-table) tbody tr[data-payment-search] > td:nth-child(6) > button,
  #content.payments-page .payment-table:not(.contract-table) tbody tr[data-payment-search] > td:nth-child(6) .payment-status-button {
    width: auto !important;
    height: 25px !important;
    min-width: 0 !important;
    min-height: 25px !important;
    margin: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    line-height: 1 !important;
  }

  #content.payments-page .payment-table:not(.contract-table) tbody tr[data-payment-search] > .mobile-invoice-summary-cell {
    grid-column: span 2 !important;
    min-height: 0 !important;
    padding: 4px 7px !important;
    row-gap: 2px !important;
    align-content: start !important;
    overflow: hidden;
  }

  #content.payments-page .payment-table:not(.contract-table) .mobile-invoice-payment-cell .payment-info-lines {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: baseline !important;
    gap: 5px !important;
    white-space: nowrap !important;
  }

  #content.payments-page .payment-table:not(.contract-table) .mobile-invoice-payment-cell .payment-info-lines > * {
    display: inline !important;
    min-width: 0;
    overflow: hidden;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #content.payments-page .payment-table:not(.contract-table) .mobile-invoice-payment-cell .payment-date-full {
    display: none !important;
  }

  #content.payments-page .payment-table:not(.contract-table) .mobile-invoice-payment-cell .payment-date-short {
    display: inline !important;
    flex: 0 0 auto;
  }

  #content.payments-page .payment-table:not(.contract-table) .mobile-invoice-status-cell .payment-status-button {
    display: inline-flex !important;
    width: auto !important;
    height: 25px !important;
    min-width: 0 !important;
    min-height: 25px !important;
    align-items: center !important;
    margin: 0 !important;
    padding: 0 7px !important;
    line-height: 1 !important;
  }

  #content.payments-page .payment-table:not(.contract-table) tbody tr[data-payment-search] > .mobile-invoice-status-cell {
    grid-template-rows: minmax(25px, max-content) !important;
    align-content: center !important;
  }

  #content.payments-page .payment-table:not(.contract-table) .mobile-invoice-status-cell::before {
    display: none !important;
  }

  #content.payments-page .payment-table:not(.contract-table) .mobile-invoice-status-cell > .payment-status-button {
    grid-row: 1 !important;
    align-self: center !important;
    justify-self: center !important;
  }

  #content.payments-page .payment-table:not(.contract-table) tbody tr[data-payment-search] > .mobile-invoice-schedule-cell {
    grid-column: 1 / -1 !important;
    grid-template-columns: auto minmax(0, 1fr) !important;
    grid-template-rows: max-content !important;
    min-height: 0 !important;
    align-items: center !important;
    padding: 4px 7px !important;
  }

  #content.payments-page .payment-table:not(.contract-table) .mobile-invoice-schedule-cell::before {
    grid-column: 1 !important;
    grid-row: 1 !important;
    align-self: center !important;
  }

  #content.payments-page .payment-table:not(.contract-table) .mobile-invoice-schedule-cell > * {
    grid-column: 2 !important;
    grid-row: 1 !important;
    justify-self: end !important;
  }

  #content.payments-page .payment-table:not(.contract-table) .mobile-invoice-schedule-cell button {
    height: 25px !important;
    min-height: 25px !important;
    margin: 0 !important;
    padding: 0 8px !important;
    line-height: 1 !important;
  }

  #content.payments-page .payment-table:not(.contract-table) tbody tr[data-payment-search] {
    grid-template-columns: repeat(20, minmax(0, 1fr));
  }

  #content.payments-page .payment-table:not(.contract-table) .mobile-payment-heading {
    grid-column: 1 / -1 !important;
  }

  #content.payments-page .payment-table:not(.contract-table) .mobile-payment-info-cell:not(.mobile-invoice-summary-cell):not(.mobile-invoice-schedule-cell) {
    grid-column: span 10 !important;
  }

  #content.payments-page .payment-table:not(.contract-table) tbody tr[data-payment-search] > .mobile-invoice-usage-cell {
    grid-column: span 5 !important;
  }

  #content.payments-page .payment-table:not(.contract-table) tbody tr[data-payment-search] > .mobile-invoice-payment-cell {
    grid-column: span 9 !important;
  }

  #content.payments-page .payment-table:not(.contract-table) tbody tr[data-payment-search] > .mobile-invoice-status-cell {
    grid-column: span 6 !important;
  }

  #content.payments-page .payment-table:not(.contract-table) tbody tr[data-payment-search] > .mobile-payment-actions {
    grid-column: 1 / -1 !important;
    min-height: 0 !important;
    justify-content: flex-end !important;
    padding: 4px 7px !important;
  }
}

/* Compact owner/dog heading on mobile payment cards. */
@media (max-width: 760px) {
  #content.payments-page .payment-table tbody tr[data-payment-search] > .mobile-payment-heading {
    display: grid !important;
    min-height: 0 !important;
    align-items: center !important;
    align-content: center !important;
    grid-template-columns: minmax(0, 1fr) !important;
    padding-top: 5px !important;
    padding-bottom: 5px !important;
    overflow: hidden;
  }

  #content.payments-page .payment-owner-dog-stack,
  #content.payments-page .contract-table .payment-owner-dog-stack {
    height: 24px !important;
    min-height: 24px !important;
    width: 100% !important;
    align-items: center !important;
    align-content: center !important;
    overflow: hidden;
  }

  #content.payments-page .payment-owner-dog-stack .payment-entity-link {
    display: flex !important;
    min-width: 0;
    height: 24px !important;
    align-items: center !important;
    align-content: center !important;
    align-self: center !important;
    justify-content: flex-start !important;
    gap: 6px !important;
    overflow: hidden;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    line-height: 1 !important;
  }

  #content.payments-page .payment-owner-dog-stack .payment-entity-link::before {
    display: inline-block !important;
    flex: 0 0 auto;
    width: 15px;
    color: #7f8993;
    font-family: "Font Awesome 6 Free" !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    text-align: center;
  }

  #content.payments-page .payment-owner-dog-stack .payment-entity-link:first-child::before {
    content: "\f007" !important;
  }

  #content.payments-page .payment-owner-dog-stack .payment-entity-link:last-child::before {
    content: "\f6d3" !important;
  }

  #content.payments-page .payment-owner-dog-stack .mobile-entity-value {
    display: block;
    min-width: 0;
    overflow: hidden;
    line-height: 1.1;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #content.payments-page .payment-table:not(.contract-table) .mobile-invoice-usage-cell .payment-usage-link {
    display: inline-flex !important;
    width: auto !important;
    height: 18px !important;
    min-width: 0 !important;
    min-height: 18px !important;
    align-items: flex-start !important;
    align-content: flex-start !important;
    justify-content: flex-start !important;
    gap: 3px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    line-height: 1.2 !important;
  }

  #content.payments-page .contract-table tbody tr[data-payment-search] {
    grid-template-columns: repeat(10, minmax(0, 1fr));
  }

  #content.payments-page .contract-table tbody tr[data-payment-search] > .mobile-payment-heading,
  #content.payments-page .contract-table tbody tr[data-payment-search] > .mobile-payment-actions {
    grid-column: 1 / -1 !important;
  }

  #content.payments-page .contract-table tbody tr[data-payment-search] > td:nth-child(2),
  #content.payments-page .contract-table tbody tr[data-payment-search] > td:nth-child(3) {
    grid-column: span 5 !important;
  }

  #content.payments-page .contract-table tbody tr[data-payment-search] > td:nth-child(4),
  #content.payments-page .contract-table tbody tr[data-payment-search] > td:nth-child(5) {
    grid-column: span 4 !important;
  }

  #content.payments-page .contract-table tbody tr[data-payment-search] > td:nth-child(6) {
    grid-column: span 2 !important;
  }

  #content.payments-page .contract-table tbody tr[data-payment-search] {
    position: relative;
    overflow: visible;
  }

  #content.payments-page .contract-table tbody tr[data-payment-search] > .mobile-payment-heading {
    padding-right: 42px !important;
  }

  #content.payments-page .contract-table .mobile-contract-menu-cell {
    position: absolute;
    z-index: 8;
    top: 4px;
    right: 5px;
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
    min-height: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    overflow: visible;
  }

  #content.payments-page .contract-table .mobile-contract-menu-trigger {
    display: grid !important;
    width: 30px !important;
    min-width: 30px !important;
    height: 30px !important;
    min-height: 30px !important;
    padding: 0 !important;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #68727d;
    place-items: center;
  }

  #content.payments-page .contract-table .mobile-contract-menu-trigger i {
    font-size: 16px;
  }

  #content.payments-page .contract-table .mobile-contract-menu {
    position: absolute;
    z-index: 20;
    top: 32px;
    right: 0;
    display: grid;
    width: 128px;
    padding: 5px;
    border: 1px solid #dfe3e7;
    border-radius: 9px;
    background: #fff;
    box-shadow: 0 8px 24px #2021242e;
  }

  #content.payments-page .contract-table .mobile-contract-menu[hidden] {
    display: none !important;
  }

  #content.payments-page .contract-table .mobile-contract-menu button {
    display: flex !important;
    width: 100% !important;
    height: 34px !important;
    min-height: 34px !important;
    align-items: center;
    justify-content: flex-start;
    gap: 7px;
    margin: 0 !important;
    padding: 0 10px !important;
    border: 0;
    border-radius: 6px !important;
    background: #fff;
    color: var(--ink);
    font-size: 10.5pt !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    text-align: left;
  }

  #content.payments-page .contract-table .mobile-contract-menu button:hover {
    background: #f1f3f5;
  }

  #content.payments-page .contract-table .mobile-contract-menu button[data-force-delete-contract],
  #content.payments-page .contract-table .mobile-contract-menu button[data-delete-contract] {
    color: var(--danger) !important;
    font-size: 10.5pt !important;
    font-weight: 700 !important;
  }

  #content.payments-page .contract-table tbody tr[data-payment-search] > .mobile-payment-actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100%;
    align-items: stretch !important;
    justify-items: stretch !important;
    gap: 4px;
    overflow: visible;
  }

  #content.payments-page .contract-table .mobile-payment-actions .contract-invoice-count,
  #content.payments-page .contract-table .mobile-payment-actions button[data-contract-manual-invoice] {
    display: flex !important;
    grid-column: 1 / -1 !important;
    width: 100% !important;
    min-width: 100% !important;
    max-width: none !important;
    align-self: stretch !important;
    justify-self: stretch !important;
  }
}

@media (max-width: 760px) {
  .modal-back,
  .site-dialog-layer,
  .crop-layer,
  .album-viewer-layer {
    height: 100dvh !important;
    max-height: 100dvh !important;
    overflow: hidden !important;
  }

  .modal-card,
  .modal-card.large {
    max-width: 100vw !important;
    max-height: calc(100dvh - max(8px, env(safe-area-inset-top))) !important;
    overflow: hidden !important;
  }

  .modal-card > form > .form-grid,
  .modal-scroll-body,
  .employee-detail-body,
  .resource-detail-body {
    min-width: 0 !important;
    min-height: 0 !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  .site-dialog-card,
  .crop-card,
  .album-viewer {
    max-height: calc(100dvh - max(16px, env(safe-area-inset-top)) - max(16px, env(safe-area-inset-bottom))) !important;
    overflow-x: hidden !important;
  }
}
