/* HK-WEB theme adaptation for existing URP markup.
   Base values come from hk/inc/i_head.jsp and contract/manage.jsp.
   Keep this file after hk-common.css so legacy page rules cannot reintroduce the old theme. */
body { background: #f4f7fa; color: #1d2630; }
/* Separate the sidebar logo from the menu below it. */
body .pc-sidebar .m-header,
body .app-sidebar .main-sidebar-header {
  border-bottom: 1px solid #dbe0e5;
}
body .card { border-radius: 0 !important; box-shadow: none; }
body :is(.form-control, .form-select, .mx-input) {
  height: 27px !important; min-height: 27px !important; padding: 3px 6px;
  border: 1px solid #ccc; border-radius: 0 !important; font-size: 12px !important; line-height: 19px;
}
body textarea.form-control { height: auto !important; min-height: 60px !important; padding: 4px 6px; line-height: 1.5; }
body :is(input, select, textarea)[required] { border: 2px solid var(--bs-primary, #4680ff); }
body .page-header { min-height: 32px; padding-top: 2px; padding-bottom: 2px; margin-bottom: 8px; }
body .page-header-title :is(h2, h4) { font-size: 1rem; line-height: 24px; margin: 0; }
body .pc-content { padding: 12px; }
body .pc-sidebar .pc-tab-label {
  display: block; width: 100%; color: currentColor; font-size: 10px; font-weight: 600;
  line-height: 1.15; text-align: center; word-break: keep-all; overflow-wrap: break-word;
}
/* Existing search bindings use these containers; fields retain their original widths. */
body .hk-search-box {
  min-width: 0; padding: 8px !important; margin-bottom: 8px !important;
  border: 3px solid var(--bs-border-color, #dbe0e5) !important; border-radius: 0 !important;
  background: #fff; box-shadow: none !important;
}
body .hk-search-box > .card-body { padding: 0 !important; }
body .hk-search-box > .card-header { padding: 0 0 8px !important; border: 0; }
body .hk-search-box .row { --bs-gutter-x: 0; --bs-gutter-y: 0; align-items: center; margin-bottom: 4px !important; }
body .hk-search-box label { padding: 4px 8px 4px 0; margin: 0; font-size: 12px; font-weight: 700; text-align: right; }
body .hk-search-box :is(.form-control, .form-select, .mx-input) { height: 27px !important; min-height: 27px !important; border-radius: 0 !important; }
body .hk-search-box .mx-datepicker.form-control { padding: 0; border: 0; background: transparent; }
body .hk-search-box .mx-datepicker { min-width: 0; max-width: 100%; }
body .hk-search-box :is(.date-range, .sr-date-range) { display: flex; align-items: center; gap: 8px; }
body .hk-search-box :is(.date-range, .sr-date-range) > .mx-datepicker { flex: 1 1 0; width: 0 !important; min-width: 0; }
body .hk-search-box div:has(> .hk-search-action) { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 4px !important; margin-left: auto; }
body .hk-search-action.btn-icon { width: 32px; padding: 0 !important; }
body .card-body:has(> .hk-search-box) { padding: 0 !important; }
body .card:has(> .card-body > .hk-search-box) { border: 0; box-shadow: none; margin-bottom: 0; }
/* Weekly-report table specification, also used throughout HK-WEB. */
body .table { width: 100%; border-collapse: collapse; border: 1px solid #bdc3c7; font-size: .713rem; }
body .table :is(th, td) { box-sizing: border-box; height: 31px; padding: 0 8px; line-height: 30px; vertical-align: middle; border: 1px solid #d9d9d9; }
body .table thead th { background: #f5f7f7; --bs-table-bg: #f5f7f7; font-size: .713rem; font-weight: 800; border-bottom-color: #bdc3c7; }
body .table :is(td, th):has(textarea) { padding-top: 4px; padding-bottom: 4px; }
body :is(.ag-theme-quartz, .ag-theme-alpine, .ag-theme-balham) {
  --ag-font-family: NotoSansKR, 'Malgun Gothic', sans-serif; --ag-font-size: .713rem;
  --ag-row-height: 31px; --ag-header-height: 31px; --ag-header-background-color: #f5f7f7;
  --ag-border-color: #bdc3c7; --ag-row-border-color: #d9d9d9; --ag-cell-horizontal-padding: 8px;
}
/* HK contract-management tabs, reused without changing tab events or ARIA state. */
body .nav-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 8px 0 16px; border: 0; border-bottom: 2px solid #294b73; border-radius: 0; background: transparent; }
body .nav-tabs .nav-item { flex: 0 0 160px; }
body .nav-tabs .nav-link { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: auto !important; min-height: 42px !important; margin: 0; padding: 8px 24px !important; border: 1px solid #d3dce8; border-bottom: 0; border-radius: 6px 6px 0 0 !important; background: #f4f6f9; color: #526176; font-size: .938rem !important; font-weight: 700; line-height: 24px !important; }
body .nav-tabs .nav-link:hover { color: #243f64; background: #e9eef5; }
body .nav-tabs .nav-link.active { color: #fff; border-color: #294b73; background: #294b73; }
body .nav-tabs .nav-link.active::after { content: '✓'; font-size: .875rem; }
body .nav-tabs .nav-link:focus-visible { outline: 2px solid #4680ff; outline-offset: 3px; }
@media (max-width: 767px) {
  body .nav-tabs .nav-item { flex: 1 1 0; }
  body .nav-tabs .nav-link { padding: 8px 12px !important; }
}
@media (max-width: 575px) {
  body .hk-search-box label { text-align: left !important; }
  body .hk-search-box .row > div { margin-bottom: 4px; }
}
/* Older URP shells use different class names. Give them the HK sidebar/header geometry. */
.app-sidebar { position: fixed; inset: 0 auto 0 0; width: 260px; background: #fff; border-right: 1px solid #dbe0e5; z-index: 1025; }
.app-sidebar .main-sidebar-header { height: 70px; display: flex; align-items: center; justify-content: center; }
.app-sidebar .main-sidebar { height: calc(100vh - 70px); overflow-y: auto; padding: 12px; }
.app-sidebar :is(.main-menu, .slide-menu) { list-style: none; padding: 0; margin: 0; }
.app-sidebar .side-menu__item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; color: #39465f; font-size: 13px; font-weight: 700; text-decoration: none; }
.app-sidebar .side-menu__item:is(:hover, .active) { background: #e9f0ff; color: #4680ff; }
.app-sidebar .slide-menu { padding-left: 16px; }
.app-sidebar .slide-menu:not(.active):not(.double-menu-active) { display: none; }
.app-sidebar .slide-menu[style*="display: block"] { display: block; }
.app-sidebar .slide__category { padding: 12px; color: #758296; font-size: 11px; }
.app-sidebar :is(.slide-left, .slide-right, .toggle-logo, .toggle-dark, .toggle-white, .desktop-dark, .desktop-white) { display: none; }
.app-sidebar .desktop-logo { max-width: 160px; max-height: 40px; }
.app-header { position: fixed; top: 0; right: 0; left: 260px; height: 70px; background: #fff; border-bottom: 1px solid #dbe0e5; z-index: 1020; }
.app-header .main-header-container { display: flex; align-items: center; justify-content: space-between; height: 100%; padding: 0 24px; }
.app-header :is(.header-content-left, .header-content-right) { display: flex; align-items: center; gap: 8px; }
.app-header :is(.horizontal-logo, .toggle-logo, .toggle-dark, .toggle-white, .desktop-dark, .desktop-white) { display: none; }
.app-header .header-link { display: inline-flex; align-items: center; padding: 8px; color: #39465f; }
.app-content { margin-left: 260px; padding: 82px 12px 12px; min-height: calc(100vh - 40px); }
@media (min-width: 992px) {
  [data-toggled="icon-overlay-close"] .app-sidebar { width: 80px; }
  [data-toggled="icon-overlay-close"] .app-header { left: 80px; }
  [data-toggled="icon-overlay-close"] .app-content { margin-left: 80px; }
  [data-toggled="icon-overlay-close"] .app-sidebar :is(.side-menu__label, .side-menu__angle, .slide__category, .slide-menu, .header-logo) { display: none; }
}
@media (max-width: 991.98px) {
  .app-sidebar { transform: translateX(-100%); }
  [data-toggled="open"] .app-sidebar { transform: translateX(0); }
  .app-header { left: 0; }
  .app-content { margin-left: 0; }
}
