/* 기본 설정 */
#dbhb-erp-content {
    min-width: 0;
}

#ptnt-lst {
    --ptnt-primary: #2c6732;
    --ptnt-primary-dark: #235429;
    --ptnt-border: #e3e9e5;
    --ptnt-text: #24332b;
    --ptnt-muted: #66756d;

    display: flex;
    width: 100%;
    min-width: 0;
    flex-direction: column;
    gap: 24px;
    color: var(--ptnt-text);
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
}

#ptnt-lst,
#ptnt-lst *,
#ptnt-lst *::before,
#ptnt-lst *::after {
    box-sizing: border-box;
}

#ptnt-lst > * {
    min-width: 0;
    margin: 0;
}

#ptnt-lst h2,
#ptnt-lst h3,
#ptnt-lst h4,
#ptnt-lst p {
    margin: 0;
}

#ptnt-lst button,
#ptnt-lst input,
#ptnt-lst select {
    font-family: inherit;
}

/* 제목 */
#ptnt-lst .ptnt-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

#ptnt-lst .ptnt-eyebrow {
    margin-bottom: 7px;
    color: var(--ptnt-primary);
    font-size: 13px;
    font-weight: 700;
}

#ptnt-lst .ptnt-heading h2 {
    color: #1d2d22;
    font-size: 27px;
    font-weight: 750;
    line-height: 1.35;
    letter-spacing: -0.045em;
}

#ptnt-lst .ptnt-description {
    margin-top: 8px;
    color: var(--ptnt-muted);
    font-size: 14px;
    line-height: 1.7;
}

#ptnt-lst .ptnt-sample-label {
    padding: 6px 11px;
    border: 1px solid var(--ptnt-border);
    border-radius: 7px;
    background: #fff;
    color: var(--ptnt-muted);
    font-size: 12px;
    white-space: nowrap;
}

/* 안내 */
#ptnt-lst .ptnt-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 16px 20px;
    border: 1px solid #dbe8dd;
    border-radius: 10px;
    background: #edf5ee;
    color: #496650;
    font-size: 13px;
    line-height: 1.7;
}

#ptnt-lst .ptnt-notice-icon {
    display: inline-flex;
    width: 19px;
    height: 19px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
    border: 1px solid #789d7f;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    font-style: normal;
}

/* 패널 및 검색 */
#ptnt-lst .ptnt-panel {
    width: 100%;
    min-width: 0;
    padding: 24px;
    border: 1px solid var(--ptnt-border);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 2px 6px rgb(24 49 32 / 2%);
}

#ptnt-lst form {
    margin: 0;
}

#ptnt-lst .ptnt-search-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr)
        minmax(0, 0.8fr)
        minmax(0, 1.7fr);
    gap: 20px;
}

#ptnt-lst .ptnt-search-grid > div,
#ptnt-lst .ptnt-detail-grid > div {
    min-width: 0;
}

#ptnt-lst .ptnt-label {
    display: block;
    margin-bottom: 9px;
    color: #405347;
    font-size: 13px;
    font-weight: 650;
}

#ptnt-lst .ptnt-label em {
    margin-left: 4px;
    color: #a04545;
    font-size: 11px;
    font-weight: 400;
    font-style: normal;
}

#ptnt-lst .ptnt-input {
    display: block;
    width: 100%;
    min-width: 0;
    height: 46px;
    margin: 0;
    padding: 0 13px;
    border: 1px solid #dce4de;
    border-radius: 8px;
    background-color: #fff;
    color: #293c30;
    font-size: 14px;
    line-height: normal;
    box-shadow: none;
}

#ptnt-lst .ptnt-input:hover {
    border-color: #b6c9ba;
}

#ptnt-lst .ptnt-input:focus {
    border-color: #608f67;
    outline: none;
    box-shadow: 0 0 0 3px rgb(44 103 50 / 10%);
}

#ptnt-lst .ptnt-input::placeholder {
    color: #758178;
    font-size: 13px;
    opacity: 1;
}

#ptnt-lst input[type="date"] {
    color-scheme: light;
}

#ptnt-lst select.ptnt-input {
    padding-right: 34px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2366756d' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 11px center;
    background-size: 16px;
    cursor: pointer;
}

#ptnt-lst .ptnt-search-footer,
#ptnt-lst .ptnt-dialog-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #edf1ee;
}

#ptnt-lst .ptnt-actions {
    display: flex;
    flex-shrink: 0;
    gap: 8px;
    margin-left: auto;
}

#ptnt-lst .ptnt-error {
    flex: 1 1 240px;
    color: #b43e3e;
    font-size: 13px;
}

#ptnt-lst .ptnt-error:empty,
#ptnt-lst .ptnt-message:empty {
    display: none;
}

/* 버튼 */
#ptnt-lst .ptnt-button {
    display: inline-flex;
    min-width: 86px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 10px 18px;
    border: 1px solid #dce4de;
    border-radius: 8px;
    background: #fff;
    color: #4d6153;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
    white-space: nowrap;
    cursor: pointer;
}

#ptnt-lst .ptnt-button:hover {
    border-color: #b8cdbd;
    background: #f5f9f6;
    color: var(--ptnt-primary);
}

#ptnt-lst .ptnt-button-primary {
    min-width: 108px;
    border-color: var(--ptnt-primary);
    background: var(--ptnt-primary);
    color: #fff;
}

#ptnt-lst .ptnt-button-primary:hover {
    border-color: var(--ptnt-primary-dark);
    background: var(--ptnt-primary-dark);
    color: #fff;
}

#ptnt-lst button:focus-visible,
#ptnt-lst [tabindex]:focus-visible {
    outline: 3px solid #477b4e;
    outline-offset: 3px;
}

/* 목록 상단 */
#ptnt-lst .ptnt-list-panel {
    padding: 0;
}

#ptnt-lst .ptnt-list-heading,
#ptnt-lst .ptnt-list-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 21px 24px;
}

#ptnt-lst .ptnt-list-title,
#ptnt-lst .ptnt-list-options {
    display: flex;
    align-items: center;
    gap: 12px;
}

#ptnt-lst .ptnt-list-title h3 {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.025em;
}

#ptnt-lst .ptnt-list-title span,
#ptnt-lst .ptnt-list-options label {
    color: var(--ptnt-muted);
    font-size: 13px;
    white-space: nowrap;
}

#ptnt-lst #ptnt-result-count {
    color: var(--ptnt-primary);
}

#ptnt-lst #ptnt-page-size {
    width: 106px;
    height: 40px;
    font-size: 13px;
}

/* 표 */
#ptnt-lst .ptnt-table-wrap {
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    scrollbar-color: #bfcfc3 #f3f6f4;
}

#ptnt-lst .ptnt-table {
    width: 100%;
    min-width: 1100px;
    margin: 0;
    border-collapse: collapse;
    background: #fff;
    font-size: 14px;
    text-align: left;
}

#ptnt-lst .ptnt-table th {
    padding: 15px 20px;
    border-top: 1px solid var(--ptnt-border);
    border-bottom: 1px solid var(--ptnt-border);
    background: #f5f8f6;
    color: #607166;
    font-size: 12px;
    font-weight: 650;
    text-align: left;
    white-space: nowrap;
}

#ptnt-lst .ptnt-table td {
    padding: 20px;
    border-bottom: 1px solid #edf1ee;
    vertical-align: middle;
}

#ptnt-lst .ptnt-table th:first-child,
#ptnt-lst .ptnt-table td:first-child {
    padding-left: 24px;
}

#ptnt-lst .ptnt-table th:last-child,
#ptnt-lst .ptnt-table td:last-child {
    padding-right: 24px;
    text-align: right;
}

#ptnt-lst .ptnt-table tbody tr:last-child td {
    border-bottom: 0;
}

#ptnt-lst .ptnt-table tbody tr:hover {
    background: #f9fcf9;
}

#ptnt-lst .ptnt-cell-title {
    display: block;
    color: #2a3c30;
    font-weight: 600;
    white-space: nowrap;
}

#ptnt-lst .ptnt-cell-sub {
    display: block;
    margin-top: 5px;
    color: #718077;
    font-size: 12px;
    white-space: nowrap;
}

#ptnt-lst .ptnt-table td:nth-child(4) .ptnt-cell-title,
#ptnt-lst .ptnt-table td:nth-child(4) .ptnt-cell-sub {
    max-width: 230px;
    overflow: hidden;
    text-overflow: ellipsis;
}

#ptnt-lst .ptnt-table td:nth-child(5) .ptnt-cell-title {
    color: var(--ptnt-primary);
}

#ptnt-lst .ptnt-table .ptnt-button {
    min-width: 78px;
    min-height: 40px;
    padding: 8px 12px;
    color: #44684b;
    font-size: 12px;
}

#ptnt-lst .ptnt-table .ptnt-empty {
    height: 220px;
    color: #718077;
    text-align: center;
}

/* 페이지 */
#ptnt-lst .ptnt-list-footer {
    padding-top: 18px;
    padding-bottom: 18px;
    border-top: 1px solid var(--ptnt-border);
}

#ptnt-lst #ptnt-page-info {
    color: #718077;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}

#ptnt-lst #ptnt-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

#ptnt-lst .ptnt-page-button {
    min-width: 38px;
    min-height: 38px;
    padding: 7px 11px;
    border: 1px solid #e1e8e3;
    border-radius: 7px;
    background: #fff;
    color: #617067;
    font-size: 13px;
    cursor: pointer;
}

#ptnt-lst .ptnt-page-button:hover:not(:disabled) {
    background: #f2f7f3;
}

#ptnt-lst .ptnt-page-button[aria-current="page"] {
    border-color: var(--ptnt-primary);
    background: var(--ptnt-primary);
    color: #fff;
}

#ptnt-lst .ptnt-page-button:disabled {
    background: #fafcfb;
    color: #89968e;
    cursor: default;
}

#ptnt-lst .ptnt-message {
    padding: 14px 18px;
    border: 1px solid #dbe8dd;
    border-radius: 8px;
    background: #edf5ee;
    color: var(--ptnt-primary);
    font-size: 13px;
}

/* 상세 모달 */
#ptnt-lst .ptnt-dialog {
    position: fixed;
    inset: 0;
    width: min(740px, calc(100% - 32px));
    max-width: calc(100% - 32px);
    max-height: calc(100vh - 48px);
    max-height: calc(100dvh - 48px);
    margin: auto;
    padding: 0;
    overflow-y: auto;
    border: 1px solid #e1e8e3;
    border-radius: 16px;
    background: #fff;
    color: var(--ptnt-text);
    box-shadow: 0 24px 80px rgb(18 39 25 / 20%);
}

#ptnt-lst .ptnt-dialog:not([open]) {
    display: none;
}

#ptnt-lst .ptnt-dialog::backdrop {
    background: rgb(20 35 26 / 44%);
}

#ptnt-lst .ptnt-dialog-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 24px;
    border-bottom: 1px solid var(--ptnt-border);
    background: #f8fbf8;
}

#ptnt-lst .ptnt-dialog-heading h3 {
    font-size: 23px;
    font-weight: 700;
    letter-spacing: -0.035em;
}

#ptnt-lst .ptnt-dialog-heading .ptnt-description {
    margin-top: 5px;
    font-size: 12px;
}

#ptnt-lst .ptnt-dialog-body {
    padding: 24px;
}

#ptnt-lst .ptnt-section-heading {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 20px;
}

#ptnt-lst .ptnt-section-heading span {
    display: inline-flex;
    width: 27px;
    height: 27px;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    background: #edf5ee;
    color: var(--ptnt-primary);
    font-size: 11px;
    font-weight: 700;
}

#ptnt-lst .ptnt-section-heading h4 {
    font-size: 15px;
    font-weight: 700;
}

#ptnt-lst .ptnt-section-divider {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid #edf1ee;
}

#ptnt-lst .ptnt-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

#ptnt-lst .ptnt-full {
    grid-column: 1 / -1;
}

#ptnt-lst .ptnt-dialog-footer {
    margin: 0;
    padding: 18px 24px;
    background: #fafcfb;
}

#ptnt-lst .ptnt-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
    border: 0;
    white-space: nowrap;
}

/* 반응형 */
@media (max-width: 1280px) {
    #ptnt-lst .ptnt-search-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    #ptnt-lst {
        gap: 18px;
    }

    #ptnt-lst .ptnt-heading h2 {
        font-size: 23px;
    }

    #ptnt-lst .ptnt-panel,
    #ptnt-lst .ptnt-dialog-heading,
    #ptnt-lst .ptnt-dialog-body {
        padding: 18px;
    }

    #ptnt-lst .ptnt-list-panel {
        padding: 0;
    }

    #ptnt-lst .ptnt-search-grid,
    #ptnt-lst .ptnt-detail-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    #ptnt-lst .ptnt-actions {
        width: 100%;
    }

    #ptnt-lst .ptnt-actions .ptnt-button {
        flex: 1;
    }

    #ptnt-lst .ptnt-list-heading,
    #ptnt-lst .ptnt-list-footer,
    #ptnt-lst .ptnt-dialog-footer {
        padding: 18px;
    }

    #ptnt-lst .ptnt-list-options label {
        display: none;
    }

    #ptnt-lst .ptnt-list-footer {
        flex-direction: column;
    }

    #ptnt-lst .ptnt-notice {
        padding: 14px 16px;
    }
}
