:root {
  --lte-sidebar-width: 200px; /* AdminLTE 기본 250px의 80% */
  --bs-body-font-family: "IBM Plex Sans KR", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

body {
  font-family: var(--bs-body-font-family);
  word-break: keep-all;
  overflow-wrap: anywhere;
}

/* 건너뛰기 링크: 포커스할 때만 보인다. */
.skip-links .skip-link {
  position: absolute;
  top: -100px;
  left: 8px;
  z-index: 2000;
  padding: 8px 12px;
  color: #fff;
  background: var(--bs-primary);
  border-radius: 4px;
}
.skip-links .skip-link:focus { top: 8px; }

/* 로고: workhub의 네 잎 마크와 같은 크기 체계. 글자는 워드마크와 같은 Urbanist ExtraBold. */
.csr-logo { display: inline-flex; gap: 8px; align-items: center; color: #1d1d1f; white-space: nowrap; }
.csr-logo__mark { display: block; flex: none; width: 28px; height: 28px; fill: #0066cc; }
.csr-logo__word { font-family: Urbanist, var(--bs-body-font-family); font-size: 21px; font-weight: 800; line-height: 1; letter-spacing: -.01em; }
.csr-logo--s { gap: 7px; }
.csr-logo--s .csr-logo__mark { width: 22px; height: 22px; }
.csr-logo--s .csr-logo__word { font-size: 17px; }
.csr-logo--l { gap: 11px; }
.csr-logo--l .csr-logo__mark { width: 36px; height: 36px; }
.csr-logo--l .csr-logo__word { font-size: 29px; }
.app-sidebar .brand-link { text-decoration: none; }
.app-sidebar .csr-logo { color: #fff; }
.app-sidebar .csr-logo__mark { fill: #6ea8fe; }
.app-sidebar .csr-logo__word { font-size: 19px; }

/* 로그인: workhub 로그인 화면(appr-e-auth.css)과 같은 분할 구성 */
.auth-body {
  --bs-body-color: #1d1d1f;
  color: #1d1d1f;
  background: #fff;
}
.auth-body .btn-primary {
  --bs-btn-bg: #0066cc;
  --bs-btn-border-color: #0066cc;
  --bs-btn-hover-bg: #0071e3;
  --bs-btn-hover-border-color: #0071e3;
  --bs-btn-active-bg: #005bb5;
  --bs-btn-active-border-color: #005bb5;
}
.auth-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.auth-split__main { display: flex; align-items: center; justify-content: center; min-width: 0; padding: 64px 32px 96px; }
.auth-panel { display: flex; flex-direction: column; gap: 24px; width: 100%; max-width: 400px; font-size: 14px; }
.auth-panel__brand { display: flex; }
.auth-panel__card { display: flex; flex-direction: column; gap: 20px; }
.auth-panel__title { margin: 0; font-size: 24px; font-weight: 600; line-height: 1.33; }
.auth-panel__hint { margin: -12px 0 0; color: #6e6e73; }
.auth-aside { position: relative; overflow: hidden; background: #dfe8ef url("/img/login-default.webp") center / cover no-repeat; }
.auth-aside::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background: linear-gradient(180deg, color-mix(in srgb, #0066cc 6%, transparent), color-mix(in srgb, #0066cc 14%, transparent));
}
.auth-banner { padding: 12px 16px; font-size: 14px; border-radius: 8px; }
.auth-banner--danger { color: #d70015; background: #fce8ea; }
.auth-banner--warning { color: #b25000; background: #fff3e6; }
.nw-button {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 41px;
  min-height: 41px;
  padding: 0 12px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1;
  color: #5e5e5e;
  text-decoration: none;
  background: #fff;
  border: 1px solid #8c8c8c;
}
.nw-button:hover { color: #5e5e5e; background: #f8f8f8; }
.nw-button:focus-visible { outline: 2px solid #0071e3; outline-offset: 2px; }
.admin-link { align-self: center; font-size: 13px; color: #495057; text-underline-offset: 3px; }
.admin-link:hover { color: #1d1d1f; }

@media (max-width: 899.98px) {
  .auth-body { background: #f5f5f7; }
  .auth-split { grid-template-columns: minmax(0, 1fr); }
  .auth-aside { display: none; }
  .auth-split__main { align-items: flex-start; padding: 48px 16px 96px; }
  .auth-panel { max-width: 480px; }
  .auth-panel__brand { justify-content: center; }
  .auth-panel__card { padding: 20px; background: #fff; border-radius: 12px; }
}

/* 헤더 */
.header-search { width: min(420px, 45vw); }
.app-header { flex-wrap: wrap; }
.nav-badge { font-size: .75rem; }
.sidebar-menu .nav-link p { display: flex; flex: 1; align-items: center; margin: 0; }

/* 배지 */
.badge-canceled {
  color: var(--bs-secondary-color);
  background: #fff;
  border: 1px solid var(--bs-border-color);
}

/* 목록 */
.request-row { position: relative; }
.request-row:hover { cursor: pointer; }
.reset-link { color: var(--bs-secondary-color); }
.filter-submit { min-width: 7rem; }
.request-table td, .request-table th { padding: .7rem .75rem; }
.request-table th { font-size: .875rem; white-space: nowrap; }

/* AdminLTE의 fieldset 테두리를 없앤다. */
fieldset { padding: 0; margin: 0; border: 0; }
fieldset > legend.form-label { float: none; width: auto; padding: 0; margin-bottom: .5rem; font-size: 1rem; font-weight: 400; }

/* 상세 */
.text-body-pre { white-space: pre-wrap; }
.long-text.is-collapsed { max-height: 14rem; overflow: hidden; mask-image: linear-gradient(#000 70%, transparent); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: .4rem 1rem; font-size: .875rem; }
.kv dt { font-weight: 400; color: var(--bs-secondary-color); }
.kv dd { margin: 0; font-weight: 500; text-align: right; }
.assignee-list { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; }
.csr-timeline li { padding: 0 0 .9rem .85rem; margin-left: .15rem; border-left: 2px solid var(--bs-border-color); }
.csr-timeline li:last-child { padding-bottom: 0; }

/* 접힌 사이드바의 그림자가 화면 가장자리에 비치지 않게 한다. */
@media (max-width: 991.98px) {
  body:not(.sidebar-open) .app-sidebar { box-shadow: none !important; }
}

/* 터치 화면: 누르는 대상 44px 이상 */
@media (max-width: 991.98px) {
  .form-control, .form-select, .btn, .nw-button, .app-header .nav-link { min-height: 44px; }
  .btn { display: inline-flex; align-items: center; justify-content: center; }
  .app-header .nav-link { display: flex; align-items: center; }
  .form-check { display: flex; gap: .35rem; align-items: center; min-height: 44px; padding-left: 0; margin-bottom: 0; }
  .form-check-inline { display: inline-flex; margin-right: .5rem; }
  .form-check .form-check-input { float: none; flex: none; width: 1.2rem; height: 1.2rem; margin: 0; }
  .assignee-list { gap: 0 .5rem; }
  .status-group .btn { padding-inline: .25rem; }
}

@media (max-width: 767.98px) {
  .save-button { width: 100%; }
  #description, #content { height: 5.5rem; min-height: 5.5rem; }
  form[data-activity] .assignee-help { display: none; } /* 처리 입력을 짧게 유지한다. 등록 화면에는 남긴다. */
  form[data-activity] .form-label { margin-bottom: .25rem; }
  .form-control, .form-select { font-size: 1rem; } /* iOS 입력 시 확대 방지 */
  .container-fluid { padding-right: .75rem; padding-left: .75rem; }
  .card-body { padding: .85rem; }
}
