/* 공통 버튼 */
.btn {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--new-theme-radius-sm);
    background: var(--color-bg-surface);
    color: var(--color-text-secondary);
    font: inherit;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn:hover {
    background: var(--color-bg-subtle);
}

.btn-primary {
    background: var(--color-accent-fill);
    border-color: var(--color-accent-fill);
    color: var(--color-accent-contrast);
}

.btn-primary:visited {
    color: var(--color-accent-contrast);
}

.btn-primary:hover {
    background: var(--color-accent-fill-hover);
    border-color: var(--color-accent-fill-hover);
}

.btn-secondary {
    background: var(--color-bg-surface-alt);
}

.btn-danger {
    background: var(--color-danger-soft);
    border-color: color-mix(in srgb, var(--color-danger-text) 22%, var(--color-border-default));
    color: var(--color-danger-text);
}

.btn-warning {
    background: var(--color-status-warning-bg);
    border-color: color-mix(in srgb, var(--color-status-warning-text) 28%, var(--color-border-default));
    color: var(--color-status-warning-text);
}

.btn-warning:hover {
    background: color-mix(in srgb, var(--color-status-warning-bg) 78%, var(--color-status-warning-text));
}

.btn-sm {
    min-height: 30px;
    padding: 0 10px;
    font-size: 12px;
}

.btn-mini {
    min-height: 24px;
    padding: 0 8px;
    font-size: 11px;
}

/* 작은 표와 모달 작업에 사용하는 최소 크기 버튼 */
.btn-xs {
    min-height: 28px;
    padding: 0 8px;
    font-size: 11px;
}

/* 저장과 적용 작업에 사용하는 성공 상태 버튼 */
.btn-success {
    background: var(--color-status-success-text);
    border-color: var(--color-status-success-text);
    color: var(--color-accent-contrast);
}

.btn-success:hover {
    background: color-mix(in srgb, var(--color-status-success-text) 86%, black);
    border-color: color-mix(in srgb, var(--color-status-success-text) 86%, black);
}

/* 테두리만 사용하는 보조 작업 버튼 */
.btn-outline-secondary {
    background: transparent;
    border-color: var(--color-border-strong);
    color: var(--color-text-secondary);
}

.btn-outline-secondary:hover {
    background: var(--color-bg-hover);
    color: var(--color-text-primary);
}

/* 공통 JS가 작업 처리 중 버튼에 부여하는 임시 상태 */
.btn-loading,
.btn:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.btn-success-temp {
    background: var(--color-status-success-text) !important;
    border-color: var(--color-status-success-text) !important;
    color: var(--color-accent-contrast) !important;
}

.btn-error-temp {
    background: var(--color-status-danger-text) !important;
    border-color: var(--color-status-danger-text) !important;
    color: var(--color-accent-contrast) !important;
}

.btn .fa-spinner {
    animation: new-component-spin 1s linear infinite;
}

/* 여러 작업 버튼의 간격과 정렬을 통일하는 공통 버튼 묶음 */
.button-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--new-theme-space-1);
}

.button-group-centered {
    justify-content: center;
}

.button-group-label {
    color: var(--color-text-muted);
    font-size: 12px;
}

/* 공통 콘텐츠 카드 */
.content-card {
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border-default);
    border-radius: var(--new-theme-radius-md);
    box-shadow: var(--new-theme-shadow-sm);
}

/* 공통 입력 요소 */
.input-control,
.form-control,
.filter-input,
.filter-select,
.input-sm,
textarea,
select,
input[type="text"],
input[type="password"],
input[type="date"] {
    width: 100%;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--new-theme-radius-sm);
    background: var(--color-bg-surface);
    color: var(--color-text-primary);
    font: inherit;
}

textarea,
textarea.input-control,
textarea.form-control {
    min-height: 120px;
    padding-top: 10px;
    padding-bottom: 10px;
    resize: vertical;
}

.input-control:focus,
.form-control:focus,
.filter-input:focus,
.filter-select:focus,
.input-sm:focus,
textarea:focus,
select:focus,
input:focus {
    outline: none;
    border-color: var(--color-accent-fill);
    box-shadow: 0 0 0 2px var(--color-focus-ring);
}

.input-control::placeholder,
.form-control::placeholder,
.filter-input::placeholder,
.input-sm::placeholder,
textarea::placeholder,
input::placeholder {
    color: var(--color-text-muted);
}

/* 아이콘이 포함된 공통 입력 요소 */
.input-icon-control {
    position: relative;
    display: block;
    width: 100%;
    min-width: 0;
}

.input-icon-control > i {
    position: absolute;
    top: 50%;
    left: 12px;
    z-index: 1;
    color: var(--color-text-muted);
    transform: translateY(-50%);
    pointer-events: none;
}

.input-icon-control > .input-control {
    width: 100%;
    min-width: 0;
    padding-left: 34px;
}

/* 체크박스와 라디오 버튼을 설명 문구와 함께 배치하는 선택 입력 요소 */
.choice-group {
    display: flex;
    flex-wrap: wrap;
    gap: var(--new-theme-space-2);
}

.choice-control {
    display: inline-flex;
    align-items: flex-start;
    gap: var(--new-theme-space-2);
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid var(--color-border-default);
    border-radius: var(--new-theme-radius-sm);
    background: var(--color-bg-surface);
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.choice-control:hover {
    background: var(--color-bg-hover);
}

.choice-control:has(input:checked) {
    border-color: var(--color-accent-border-strong);
    background: var(--color-accent-surface);
}

.choice-control:has(input:disabled) {
    opacity: 0.6;
    cursor: not-allowed;
}

.choice-control input[type="checkbox"],
.choice-control input[type="radio"] {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin: 2px 0 0;
    accent-color: var(--color-accent-fill);
    cursor: inherit;
}

.choice-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.choice-label {
    color: var(--color-text-primary);
    font-size: 12px;
    font-weight: 600;
}

.choice-description {
    color: var(--color-text-muted);
    font-size: 11px;
}

/* 가이드에서 실제 컴포넌트 코드를 바로 복사할 수 있음을 표시한다. */
.copyable-component {
    position: relative;
    cursor: copy;
    border-radius: var(--new-theme-radius-sm);
    transition: outline-color 0.15s ease, background-color 0.15s ease;
}

.copyable-component:hover {
    outline: 1px dashed var(--color-accent-border-strong);
    outline-offset: 3px;
}

.copyable-component::after {
    content: "클릭하여 복사";
    position: absolute;
    right: 0;
    bottom: calc(100% + 6px);
    z-index: 20;
    padding: 4px 7px;
    border-radius: var(--new-theme-radius-sm);
    background: var(--color-text-primary);
    color: var(--color-bg-surface);
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transform: translateY(3px);
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.copyable-component:hover::after,
.copyable-component.is-copied::after {
    opacity: 1;
    transform: translateY(0);
}

.copyable-component.is-copied::after {
    content: "복사됨";
    background: var(--color-status-success-text);
    color: var(--color-accent-contrast);
}

.copyable-component > :disabled {
    pointer-events: none;
}

/* 공통 배지 및 상태 표시 */
.badge,
.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.badge-success,
.status-badge.is-success {
    background: var(--color-status-success-bg);
    border: 1px solid var(--color-status-success-border);
    color: var(--color-status-success-text);
}

.badge-warning,
.status-badge.is-warning {
    background: var(--color-status-warning-bg);
    color: var(--color-status-warning-text);
}

.badge-danger,
.status-badge.is-danger {
    background: var(--color-status-danger-bg);
    border: 1px solid var(--color-status-danger-border);
    color: var(--color-status-danger-text);
}

.badge-secondary,
.status-badge.is-neutral {
    background: var(--color-status-neutral-bg);
    color: var(--color-status-neutral-text);
}

/* 기존 화면에서 생성하는 상태 클래스도 공통 상태 토큰으로 표시한다. */
.status-badge.status-active {
    background: var(--color-status-success-bg);
    border: 1px solid var(--color-status-success-border);
    color: var(--color-status-success-text);
}

.status-badge.status-inactive {
    background: var(--color-status-danger-bg);
    border: 1px solid var(--color-status-danger-border);
    color: var(--color-status-danger-text);
}

.summary-card {
    display: flex;
    flex-direction: column;
    gap: var(--new-theme-space-2);
    padding: var(--new-theme-space-4);
    background: var(--color-bg-surface);
    border: 1px solid var(--color-border-default);
    border-radius: var(--new-theme-radius-md);
    box-shadow: var(--new-theme-shadow-sm);
}

/* 요약 카드 수에 따라 너비를 자동 조정하는 공통 그리드 */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--new-theme-space-3);
}

/* 요약 카드 안에서 사용하는 항목명과 핵심 값 */
.summary-label {
    display: block;
    color: var(--color-text-muted);
    font-size: 12px;
}

.summary-value {
    display: block;
    color: var(--color-text-primary);
    font-size: 18px;
    font-weight: 700;
}

/* 차트 카드 안에서 사용하는 제목과 차트 표시 영역 */
.chart-card-title {
    margin: 0;
    color: var(--color-text-secondary);
    font-size: 13px;
    font-weight: 700;
}

.chart-frame {
    position: relative;
    width: 100%;
    min-width: 0;
}

.chart-frame > canvas {
    width: 100% !important;
    height: 100% !important;
}

/* 차트 데이터가 없을 때 차트 영역 위에 표시하는 공통 상태 */
.chart-empty-state {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--new-theme-space-3);
    border-radius: var(--new-theme-radius-sm);
    font-size: 12px;
    text-align: center;
}

.chart-empty-state.show {
    display: flex;
}

/* 공통 빈 상태 */
.empty-state {
    background: var(--color-empty-state-bg);
    color: var(--color-empty-state-text);
}

.empty-state-icon {
    color: inherit;
}

.empty-state p {
    color: inherit;
}

/* 공통 비동기 작업 로딩 표시 */
.loading-spinner {
    width: 32px;
    height: 32px;
    margin: 0 auto 10px;
    border: 3px solid var(--color-border-default);
    border-top-color: var(--color-accent-fill);
    border-radius: 50%;
    animation: new-component-spin 1s linear infinite;
}

/* 공통 JS가 콘텐츠 위에 표시하는 로딩 오버레이 */
.loading-overlay {
    position: absolute;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--theme-loading-overlay);
    backdrop-filter: blur(1px);
}

.loading-content {
    color: var(--color-text-secondary);
    text-align: center;
}

.loading-message {
    margin-top: 10px;
    font-size: 12px;
    font-weight: 600;
}

/* 공통 페이지네이션 컨테이너 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--new-theme-space-2);
    flex-wrap: wrap;
}

/* 공통 페이지네이션 */
.page-link,
.page-num,
.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--new-theme-radius-sm);
    background: var(--color-bg-surface);
    color: var(--color-text-secondary);
    text-decoration: none;
    cursor: pointer;
}

.page-link:hover,
.page-num:hover,
.page-btn:hover {
    background: var(--color-bg-subtle);
}

.page-link.is-active,
.page-num.active {
    background: var(--color-accent-fill);
    border-color: var(--color-accent-fill);
    color: var(--color-accent-contrast);
    cursor: default;
}

.page-link.is-disabled,
.page-btn.disabled {
    pointer-events: none;
    border-color: var(--color-border-default);
    background: var(--color-bg-surface-alt);
    color: var(--color-text-muted);
}

.page-arrow {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* 공통 트리의 하위 목록을 접고 펼치는 화살표 */
.tree-arrow {
    display: inline-flex;
    flex: 0 0 16px;
    width: 16px;
    height: 16px;
    align-items: center;
    justify-content: center;
    margin-right: 4px;
    color: var(--color-text-muted);
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
}

.tree-arrow::after {
    content: "▶";
    display: block;
    font-family: sans-serif;
    font-size: 10px;
    line-height: 1;
}

.tree-arrow.expanded {
    transform: rotate(90deg);
}

/* 공통 댓글 목록과 말풍선 */
.comment-list,
.comment-list-scroll-area {
    display: flex;
    flex-direction: column;
    min-height: 0;
    gap: 10px;
}

.comment-list {
    padding: 10px 4px;
}

.comment-list-scroll-area {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
}

.comment-list-scroll-area::-webkit-scrollbar {
    width: 6px;
}

.comment-list-scroll-area::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: var(--color-border-strong);
}

.comment-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.comment-item.deleted {
    opacity: 0.6;
}

.comment-content-wrapper {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
    gap: 3px;
}

.comment-header {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 2px 2px;
    color: var(--color-text-muted);
    font-size: 11px;
}

.comment-author {
    color: var(--color-text-secondary);
    font-size: 12px;
    font-weight: 600;
}

.comment-item.mine .comment-author {
    color: var(--color-accent-text);
    font-weight: 700;
}

.comment-time,
.comment-edited {
    color: var(--color-text-muted);
    font-size: 11px;
}

.comment-edited {
    font-style: italic;
}

.comment-bubble {
    display: inline-block;
    width: fit-content;
    max-width: 78%;
    padding: 10px 12px;
    border: 1px solid var(--color-border-default);
    border-radius: var(--new-theme-radius-md);
    background: var(--color-bg-surface);
    box-shadow: var(--new-theme-shadow-sm);
    word-break: break-word;
}

.comment-item.mine .comment-bubble {
    border-color: var(--color-accent-border-strong);
    background: var(--color-accent-surface);
}

.comment-body {
    color: var(--color-text-primary);
    font-size: 12px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.deleted-text,
.comment-empty {
    color: var(--color-text-muted);
}

.deleted-text {
    font-style: italic;
}

.comment-empty {
    margin-top: 12px;
}

.comment-footer {
    display: flex;
    gap: 12px;
    margin-left: 2px;
}

.comment-actions {
    opacity: 0;
    transition: opacity 0.15s ease;
}

.comment-item:hover .comment-actions,
.comment-item:focus-within .comment-actions {
    opacity: 1;
}

.comment-actions button,
.toggle-replies-btn {
    border: 0;
    padding: 0;
    background: transparent;
    color: var(--color-text-muted);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
}

.comment-actions button:hover,
.toggle-replies-btn:hover {
    color: var(--color-accent-text);
    text-decoration: underline;
}

.comment-children {
    margin-top: 10px;
    padding-left: 18px;
    border-left: 2px solid var(--color-border-default);
}

.comment-children .comment-bubble {
    max-width: 72%;
}

.comment-children-wrapper.collapsed .comment-children {
    display: none;
}

.toggle-replies-btn {
    margin-left: 20px;
}

/* 공통 댓글 멘션 표시 */
.comment-mentions,
.mention-chip-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.comment-mentions {
    margin-top: 8px;
}

.mention-chip-container {
    min-height: 0;
    margin-bottom: 8px;
    font-size: 11px;
}

.mention-badge,
.mention-chip {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--color-accent-border);
    background: var(--color-accent-surface);
    color: var(--color-accent-text);
}

.mention-badge {
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}

.mention-chip {
    gap: 4px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
}

.mention-chip-meta,
.mention-placeholder {
    color: var(--color-text-muted);
}

.mention-chip button {
    border: 0;
    padding: 0 2px;
    background: transparent;
    color: var(--color-text-muted);
    font-size: 14px;
    cursor: pointer;
}

.mention-chip button:hover {
    color: var(--color-status-danger-text);
}

.mention-suggestion-list {
    position: absolute;
    right: 10px;
    bottom: calc(100% - 2px);
    left: 10px;
    z-index: 9999;
    max-height: 220px;
    overflow-y: auto;
    border: 1px solid var(--color-border-default);
    border-radius: var(--new-theme-radius-md);
    background: var(--color-bg-surface);
    box-shadow: var(--new-theme-shadow-lg);
}

.mention-suggestion-item {
    padding: 8px 12px;
    border-bottom: 1px solid var(--color-border-default);
    cursor: pointer;
}

.mention-suggestion-item:last-child {
    border-bottom: 0;
}

.mention-suggestion-item:hover {
    background: var(--color-bg-hover);
}

.mention-suggestion-name {
    color: var(--color-text-primary);
    font-size: 13px;
    font-weight: 600;
}

.mention-suggestion-meta {
    color: var(--color-text-muted);
    font-size: 11px;
}

/* 공통 댓글 입력 영역 */
.messenger-input-deck {
    position: relative;
    flex: 0 0 auto;
    padding: 10px;
    border-top: 1px solid var(--color-border-default);
    background: var(--color-bg-surface);
    box-shadow: 0 -4px 12px rgba(15, 23, 42, 0.06);
}

.input-mode-indicator {
    display: none;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 6px 12px;
    border-radius: var(--new-theme-radius-sm);
    background: var(--color-accent-surface);
    color: var(--color-accent-text);
    font-size: 12px;
    font-weight: 600;
}

.input-mode-indicator.active {
    display: flex;
}

.input-mode-close {
    color: var(--color-accent-text);
    font-size: 14px;
    cursor: pointer;
}

.messenger-input-row {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.messenger-textarea {
    flex: 1;
    width: auto;
    height: 36px;
    min-width: 0;
    min-height: 36px;
    max-height: 120px;
    padding: 8px 10px;
    border: 1px solid var(--color-border-strong);
    border-radius: var(--new-theme-radius-md);
    background: var(--color-bg-surface-alt);
    color: var(--color-text-primary);
    font-size: 12px;
    line-height: 1.5;
    resize: none !important;
    outline: none;
    transition: height 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.messenger-textarea:focus {
    height: 80px;
    border-color: var(--color-accent-fill);
    background: var(--color-bg-surface);
    box-shadow: 0 0 0 2px var(--color-focus-ring);
}

.messenger-send-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: auto;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 0;
    border-radius: 999px;
    background: var(--color-accent-fill);
    color: var(--color-accent-contrast);
    font-size: 14px;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.messenger-send-btn:hover {
    background: var(--color-accent-fill-hover);
    transform: scale(1.05);
}

.messenger-send-btn:disabled {
    background: var(--color-status-neutral-bg);
    color: var(--color-status-neutral-text);
    cursor: not-allowed;
    transform: none;
}

/* 공통 모달 레이어 */
.unified-modal {
    position: fixed !important;
    inset: 0 !important;
    z-index: 9999 !important;
    display: none;
    align-items: center;
    justify-content: center;
    background: var(--color-overlay-default);
}

.unified-modal.show {
    display: flex;
    animation: new-modal-fade-in 0.2s ease;
}

.unified-modal.modal-inline,
.unified-modal.modal-without-backdrop {
    background: transparent !important;
    pointer-events: none;
}

.unified-modal.modal-inline.show,
.unified-modal.modal-without-backdrop.show {
    animation: none;
}

.unified-modal-content {
    position: relative;
    z-index: 10000 !important;
    display: flex;
    flex-direction: column;
    width: 600px;
    max-width: 90vw;
    max-height: 90vh;
    overflow: hidden;
    border: 1px solid var(--color-border-strong);
    border-radius: 8px;
    background: var(--color-bg-surface);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    animation: new-modal-slide-in 0.2s ease;
}

.unified-modal.modal-inline .unified-modal-content,
.unified-modal.modal-without-backdrop .unified-modal-content {
    pointer-events: auto;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.18);
}

.unified-modal-content.size-sm { width: 400px; }
.unified-modal-content.size-md { width: 600px; }
.unified-modal-content.size-lg { width: 800px; }
.unified-modal-content.size-xl { width: 1000px; }
.unified-modal-content.size-full { width: 95vw; height: 90vh; }

.common-modal-resizable {
    position: relative;
    box-sizing: border-box;
    min-width: min(320px, calc(100dvw - 24px));
    min-height: min(180px, calc(100dvh - 24px));
    max-width: calc(100dvw - 24px) !important;
    max-height: calc(100dvh - 24px) !important;
}

.common-modal-user-sized {
    position: fixed !important;
    margin: 0 !important;
    transform: none !important;
}

.common-modal-resizable > :is(
    .unified-modal-body,
    .export-modal-body,
    .evaluation-modal-body,
    .journal-modal-body
) {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow: auto;
}

.common-modal-resize-edge {
    position: absolute;
    z-index: 20;
    background: transparent;
    touch-action: none;
}

.common-modal-resize-edge.is-e {
    top: 10px;
    right: 0;
    bottom: 10px;
    width: 5px;
    cursor: ew-resize;
}

.common-modal-resize-edge.is-s {
    right: 10px;
    bottom: 0;
    left: 10px;
    height: 5px;
    cursor: ns-resize;
}

.common-modal-resize-edge.is-se {
    right: 0;
    bottom: 0;
    width: 10px;
    height: 10px;
    cursor: nwse-resize;
}

.common-modal-resize-active {
    outline: 1px solid var(--color-accent-border-strong);
    outline-offset: -1px;
}

body.common-modal-resizing,
body.common-modal-resizing * {
    user-select: none !important;
}

body.common-modal-resizing-e,
body.common-modal-resizing-e * {
    cursor: ew-resize !important;
}

body.common-modal-resizing-s,
body.common-modal-resizing-s * {
    cursor: ns-resize !important;
}

body.common-modal-resizing-se,
body.common-modal-resizing-se * {
    cursor: nwse-resize !important;
}

.unified-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    border-bottom: 1px solid var(--color-border-default);
    background: var(--color-bg-surface-alt);
}

.unified-modal-title {
    margin: 0;
    color: var(--color-text-primary);
    font-size: 14px;
    font-weight: 700;
}

.unified-modal-close,
.export-modal-close,
.evaluation-modal-close,
.journal-modal-close {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: none;
    color: var(--color-text-muted);
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.unified-modal-close:hover,
.export-modal-close:hover,
.evaluation-modal-close:hover,
.journal-modal-close:hover {
    background: var(--color-bg-hover);
    color: var(--color-text-primary);
}

.unified-modal-body {
    max-height: 60vh;
    overflow-y: auto;
    padding: 20px;
}

.unified-modal-body.no-padding {
    padding: 0;
}

.unified-modal-body.compact {
    padding: 15px;
}

.unified-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 15px 20px;
    border-top: 1px solid var(--color-border-default);
    background: var(--color-bg-surface-alt);
}

.unified-modal-footer .footer-left {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-right: auto;
}

/* 공통 모달 애니메이션 */
@keyframes new-modal-fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes new-modal-slide-in {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes new-component-spin {
    to {
        transform: rotate(360deg);
    }
}
