/* ===== 목록 페이지 툴바 ===== */
.lr-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}

.lr-toolbar-filters {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.lr-status-filter-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lr-search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.lr-search-control {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lr-keyword-input {
  width: 240px;
  height: 46px;
  border-radius: 10px;
}

.lr-mine-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 46px;
  padding: 0 12px;
  border: 1px solid #d6deea;
  border-radius: 10px;
  background: #ffffff;
  color: #334155;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.lr-mine-toggle input {
  width: 16px;
  height: 16px;
}

.lr-label {
  font-size: 14px;
  font-weight: 700;
  color: #334155;
}

.lr-form-help {
  margin-top: 6px;
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
}

.lr-status-filter {
  width: 180px;
  height: 46px;
  border-radius: 10px;
}

.lr-modal-dialog--worksheet {
  max-width: min(1760px, calc(100vw - 24px));
}

.lr-item__actions .button {
  text-align: center;
}

.lr-create-btn {
  border-radius: 10px;
  padding: 0 20px;
}

/* ===== 카드 ===== */
.lr-card {
  border: 1px solid #e6ebf3;
  border-radius: 14px;
  background: #ffffff;
  padding: 14px;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.lr-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  border-color: #d8e0ee;
}

.lr-card:focus-visible {
  outline: 2px solid #6d28d9;
  outline-offset: 2px;
}

.lr-card__badges {
  gap: 6px;
}

.lr-card__head,
.lr-card__foot,
.lr-item__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

/* ===== 뱃지 ===== */
.lr-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  border-radius: 999px;
  padding: 0 10px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #334155;
  background: #e2e8f0;
}

.lr-badge.open        { color: #065f46; background: #d1fae5; }
.lr-badge.in_progress { color: #7c2d12; background: #ffedd5; }
.lr-badge.completed   { color: #1e3a8a; background: #dbeafe; }
.lr-badge.cancelled   { color: #6b7280; background: #f3f4f6; }

.lr-badge.pending,
.lr-badge.submitted   { color: #7c2d12; background: #ffedd5; }

.lr-badge.approved,
.lr-badge.confirmed   { color: #065f46; background: #d1fae5; }

.lr-badge.rejected,
.lr-badge.needs_revision { color: #991b1b; background: #fee2e2; }

.lr-badge.public  { color: #1e3a8a; background: #dbeafe; }
.lr-badge.private { color: #7c2d12; background: #ffedd5; }

/* ===== 타이포 ===== */
.lr-card__title,
.lr-page-title {
  margin: 0;
  font-size: 24px;
  line-height: 1.35;
  font-weight: 800;
  color: #0f172a;
  display: block;
}

.lr-card__title { font-size: 18px; line-height: 1.45; }

.lr-page-subtitle {
  margin: 8px 0 0;
  color: #64748b;
}

.lr-meta,
.lr-detail-meta,
.lr-item__meta {
  color: #64748b;
  font-size: 13px;
}

.lr-card__target,
.lr-detail-section p,
.lr-item p {
  margin: 0;
  color: #334155;
  line-height: 1.55;
  white-space: pre-wrap;
}

/* ===== KV 그리드 ===== */
.lr-card__stats,
.lr-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.lr-detail-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-top: 18px;
}

.lr-stat,
.lr-kv {
  border: 1px solid #edf2f7;
  border-radius: 10px;
  background: #f8fafc;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.lr-stat span,
.lr-kv span { font-size: 12px; color: #64748b; }

.lr-stat strong,
.lr-kv strong { font-size: 14px; color: #0f172a; }

.lr-apply-count {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #374151;
  font-size: 12px;
  font-weight: 700;
}

.lr-apply-count span {
  font-size: 11px;
  color: #6b7280;
}

.lr-apply-count strong {
  color: #111827;
  font-size: 14px;
  margin-left: 4px;
}

/* ===== 패널 ===== */
.lr-panel {
  border: 1px solid #e7ecf4;
  border-radius: 14px;
  background: #ffffff;
  padding: 22px;
}

/* ===== 폼 ===== */
.lr-form .form-control,
.lr-form .form-select {
  border-radius: 10px;
  border-color: #d6deea;
}

.lr-form textarea.form-control { min-height: 110px; }

.lr-form-actions {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* ===== 메시지 ===== */
.lr-message {
  margin-top: 16px;
  min-height: 20px;
  font-size: 14px;
}

.lr-message.is-error   { color: #b91c1c; }
.lr-message.is-success { color: #047857; }

.lr-loading,
.lr-empty {
  text-align: center;
  color: #64748b;
  padding: 50px 0;
}

/* ===== 상세 페이지 2단 레이아웃 ===== */
.lr-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr);
  gap: 18px;
  align-items: stretch;
}

.lr-detail-main { min-width: 0; }

/* 상세 헤더 */
.lr-detail-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding-bottom: 18px;
  border-bottom: 1px solid #e7ecf4;
  margin-bottom: 4px;
}

/* 사이드 sticky */
.lr-detail-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-self: stretch;
  height: 100%;
}

.lr-side-stretch-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.lr-side-stretch-panel .lr-list {
  flex: 1;
}

.lr-side-stretch-panel .lr-empty {
  min-height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

/* ===== CTA 패널 ===== */
.lr-cta-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.lr-cta-kv {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.lr-cta-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lr-cta-login-hint {
  margin: 0;
  font-size: 13px;
  color: #64748b;
  text-align: center;
  line-height: 1.6;
}

.lr-cta-help {
  margin: 0;
  font-size: 12px;
  color: #64748b;
  text-align: center;
  line-height: 1.6;
}

/* ===== 섹션 헤더 ===== */
.lr-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.lr-section-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #0f172a;
}

.lr-detail-section {
  margin-top: 18px;
}

.lr-detail-section h3 {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
}

.lr-detail-global-actions {
  margin-top: 18px;
  display: flex;
  justify-content: center;
  gap: 12px;
}

.lr-detail-global-actions .button {
  min-width: 220px;
  text-align: center;
  color: #6d28d9 !important;
  border-color: #6d28d9 !important;
}

#lrCompleteBtn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.lr-detail-global-actions .button:hover {
  background-color: rgba(109, 40, 217, 0.08);
}

/* ===== 목록/아이템 ===== */
.lr-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lr-item {
  border: 1px solid #e7ecf4;
  border-radius: 12px;
  padding: 12px;
  background: #ffffff;
}

.lr-item__actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
}

.js-submission-worksheet-actions {
  justify-content: flex-end;
}

.js-submission-worksheet-actions .button {
  min-width: 132px;
  padding: 0 14px;
  height: 38px;
  font-size: 14px;
}

.lr-help {
  margin: 0 0 12px;
  color: #475569;
}

/* ===== 첨부파일 ===== */
.lr-attachment-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lr-attachment-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border: 1px solid #e7ecf4;
  border-radius: 10px;
  background: #f8fafc;
  padding: 8px 10px;
  color: #0f172a;
  text-decoration: none;
}

.lr-attachment-item em {
  font-style: normal;
  font-size: 12px;
  color: #64748b;
}

.lr-attachment-item--removable { padding-right: 6px; }

.lr-attachment-item--removable a {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  color: #0f172a;
  text-decoration: none;
  min-width: 0;
}

.lr-attachment-remove {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border: none;
  background: #fee2e2;
  color: #b91c1c;
  border-radius: 6px;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lr-attachment-remove:hover { background: #fecaca; }

.lr-empty-sm {
  color: #64748b;
  font-size: 13px;
}

/* ===== 수정 페이지 ===== */
.lr-edit-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.lr-edit-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  border-top: 1px solid #e7ecf4;
  padding-top: 18px;
}

.lr-edit-actions__left,
.lr-edit-actions__right {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* 의뢰 삭제 버튼 강조 */
#lrEditDeleteBtn {
  color: #dc2626 !important;
  border-color: #dc2626 !important;
}

#lrEditDeleteBtn:hover {
  background-color: rgba(220, 38, 38, 0.08) !important;
}

/* ===== 지원하기 페이지 ===== */
.lr-apply-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 20px;
  align-items: start;
}

.lr-apply-summary {
  position: sticky;
  top: 80px;
}

.lr-apply-summary__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.lr-apply-back {
  font-size: 13px;
  color: #64748b;
  text-decoration: none;
}

.lr-apply-back:hover { color: #7c3aed; }

.lr-apply-title {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.4;
}

.lr-apply-summary__kv {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 14px 0;
}

.lr-apply-summary__desc {
  border-top: 1px solid #e7ecf4;
  padding-top: 14px;
}

.lr-apply-desc-label {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 6px;
}

.lr-apply-form-title {
  margin: 0 0 20px;
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
}

.lr-apply-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  border-top: 1px solid #e7ecf4;
  padding-top: 18px;
}

/* ===== 반응형 ===== */
@media (max-width: 1199px) {
  .lr-toolbar {
    align-items: stretch;
  }

  .lr-toolbar-filters {
    width: 100%;
  }

  .lr-search-wrap,
  .lr-search-control {
    width: 100%;
  }

  .lr-keyword-input {
    width: 100%;
  }

  #lrKeywordSearchBtn {
    min-width: 88px;
  }

  .lr-detail-layout {
    grid-template-columns: 1fr;
  }
  .lr-detail-side {
    position: static;
    top: auto;
  }
  .lr-detail-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

@media (max-width: 991px) {
  .lr-apply-layout {
    grid-template-columns: 1fr;
  }
  .lr-apply-summary { position: static; }
}

@media (max-width: 767px) {
  .lr-panel { padding: 16px; }

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

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

  .js-submission-worksheet-actions {
    justify-content: stretch;
  }

  .js-submission-worksheet-actions .button {
    width: 100%;
    min-width: 0;
  }

  .lr-form-actions {
    justify-content: stretch;
    flex-direction: column;
  }

  .lr-form-actions .button { width: 100%; }

  .lr-apply-actions {
    justify-content: stretch;
    flex-direction: column;
  }

  .lr-apply-actions .button { width: 100%; text-align: center; }
}

@media (max-width: 575px) {
  .lr-edit-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .lr-edit-actions__left,
  .lr-edit-actions__right { flex-direction: column; }
  .lr-edit-actions .button { width: 100%; text-align: center; }
}

/* ===== 지원서 작성 전역 버튼 ===== */
.lr-apply-global-actions {
  margin-top: 28px;
  display: flex;
  justify-content: center;
  gap: 12px;
}

.lr-apply-global-actions .button {
  min-width: 200px;
  text-align: center;
}

/* ===== 파일 업로드 ===== */
.lr-file-upload-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lr-file-upload-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border: 1px solid #e7ecf4;
  border-radius: 8px;
  background: #f8fafc;
}

.lr-file-upload-item input[type="file"] {
  flex: 1;
  font-size: 13px;
}

.lr-file-upload-item button {
  padding: 4px 12px;
  font-size: 12px;
}

@media (max-width: 1199px) {
  .lr-apply-global-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .lr-apply-global-actions .button {
    width: 100%;
  }
}

/* ===== 지원서 아이템 (클릭 가능) ===== */
.lr-item--clickable {
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.lr-item--clickable:hover {
  background-color: #f1f5f9;
  border-color: #cbd5e1;
}

.lr-item--clickable:focus-visible {
  outline: 2px solid #6d28d9;
  outline-offset: 2px;
}

/* ===== 모달 ===== */
.lr-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.lr-modal.d-none {
  display: none;
}

.lr-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: -1;
}

.lr-modal-dialog {
  position: relative;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.15);
  max-width: 600px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.lr-modal-dialog--apply {
  max-width: 860px;
}

.lr-worksheet-hero {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 20px;
  margin-bottom: 14px;
}

.lr-worksheet-hero__thumb-wrap {
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  padding: 8px;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lr-worksheet-thumbnail {
  width: 100%;
  max-height: 170px;
  object-fit: contain;
  border-radius: 6px;
}

.lr-worksheet-hero__main {
  min-width: 0;
}

.lr-worksheet-title {
  margin: 0;
  font-size: 24px;
  line-height: 1.4;
  font-weight: 800;
  color: #0f172a;
}

.lr-worksheet-summary {
  margin: 8px 0 0;
  color: #475569;
  line-height: 1.6;
  white-space: pre-wrap;
}

.lr-worksheet-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.lr-worksheet-meta-grid .lr-modal-kv {
  border: 1px solid #e7ecf4;
  border-radius: 10px;
  background: #f8fafc;
  padding: 10px;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.lr-modal-tabs {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 10px;
  margin-bottom: 14px;
  overflow-x: auto;
}

.lr-modal-tab {
  border: 1px solid #d7deea;
  border-radius: 999px;
  background: #ffffff;
  color: #334155;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.lr-modal-tab.is-active {
  color: #6d28d9;
  border-color: #6d28d9;
  background: #f5f3ff;
}

.lr-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px;
  border-bottom: 1px solid #e7ecf4;
}

.lr-modal-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
}

.lr-modal-close {
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: none;
  font-size: 24px;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.lr-modal-close:hover {
  color: #334155;
}

.lr-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

.lr-modal-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.lr-modal-content--worksheet {
  gap: 14px;
}

.lr-modal-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.js-worksheet-tab-panel {
  display: none;
}

.js-worksheet-tab-panel.is-active {
  display: flex;
}

.lr-modal-section-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.lr-modal-section p {
  margin: 0;
  color: #334155;
  line-height: 1.6;
  white-space: pre-wrap;
  font-size: 13px;
}

.lr-modal-kv {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

.lr-modal-kv .label {
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
  flex-shrink: 0;
  white-space: nowrap;
}

.lr-modal-kv strong {
  font-size: 14px;
  color: #0f172a;
  min-width: 0;
  text-align: right;
}

.js-worksheet-levels {
  white-space: normal;
  word-break: keep-all;
  text-align: left;
}

.lr-worksheet-video-link {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 8px 12px;
  border: 1px solid #d7deea;
  border-radius: 8px;
  color: #6d28d9;
  text-decoration: none;
  font-weight: 700;
  font-size: 13px;
}

.lr-worksheet-video-link:hover {
  background: #f5f3ff;
}

.lr-worksheet-video-embed-wrap {
  width: 100%;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  background: #0f172a;
}

.lr-worksheet-video-embed {
  display: block;
  width: 100%;
  height: 420px;
  border: 0;
}

.lr-modal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.lr-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid #e7ecf4;
  background: #f8fafc;
}

.lr-modal-footer .button {
  min-width: 120px;
}

.lr-dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
  padding: 16px;
  text-align: center;
  margin-bottom: 12px;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.lr-dropzone.is-dragover {
  border-color: #6d28d9;
  background: #f5f3ff;
}

.lr-dropzone__title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.lr-dropzone__hint {
  margin: 6px 0 12px;
  font-size: 12px;
  color: #64748b;
}

.lr-modal-attachment-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.lr-apply-file-label {
  font-size: 12px;
  color: #64748b;
  font-weight: 700;
}

.lr-file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  font-size: 12px;
  color: #334155;
}

.lr-file-remove {
  border: none;
  background: transparent;
  color: #dc2626;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 767px) {
  .lr-modal-grid {
    grid-template-columns: 1fr;
  }

  .lr-worksheet-hero {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .lr-worksheet-meta-grid {
    grid-template-columns: 1fr;
  }

  .lr-worksheet-title {
    font-size: 20px;
  }

  .lr-worksheet-video-embed {
    height: 240px;
  }

  .lr-modal-dialog--apply {
    max-width: 100%;
  }

  .lr-modal-attachment-columns {
    grid-template-columns: 1fr;
  }

  .lr-modal-footer {
    flex-direction: column;
  }

  .lr-modal-footer .button {
    width: 100%;
  }
}
