.app-page {
  box-sizing: border-box;
  width: 100%;
  max-width: 1440px;
}

.app-page-fill {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

body:has(.app-page-fill) .page-content {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  overflow: hidden;
}

body:has(.app-page-fill) .page-content > .app-page-fill {
  flex: 1 1 0;
}

.app-page-fill > .app-title-actions,
.app-page-fill > .page-title-line,
.app-page-fill > .app-search,
.app-page-fill > .button-wrapper {
  flex: 0 0 auto;
}

.app-fill-layout {
  flex: 1 1 0;
  min-height: 0;
}

.app-fill-layout > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}

.app-title-actions,
.app-inline-actions,
.app-search .field-line,
.app-grid-shell .grid-container .grid-toolbar .title-bar,
.app-grid-shell .grid-container .grid-toolbar .btn-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.app-title-actions {
  justify-content: space-between;
  gap: 16px;
}

.app-inline-actions,
.app-grid-shell .grid-container .grid-toolbar .title-bar,
.app-grid-shell .grid-container .grid-toolbar .btn-group {
  flex-wrap: wrap;
}

.app-subtitle {
  margin-top: -4px;
  margin-bottom: 12px;
  color: #667085;
  font-size: 13px;
}

.app-page-side-title {
  color: #1f2937;
  font-size: 18px;
  font-weight: 700;
}

.app-section-title {
  margin: 22px 0 8px;
  color: #333;
  font-size: 16px;
  font-weight: 700;
}

.app-search.form-table {
  margin-top: 0;
  margin-bottom: 10px;
}

.app-search.form-table th,
.app-search.form-table td {
  padding: 8px 10px;
}

.app-search input,
.app-search select {
  height: 34px;
}

.app-search .field-line {
  width: 100%;
  flex-wrap: nowrap;
}

.app-search .field-line input:not(.date-input) {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
}

.app-search .field-line .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.app-search .date-input {
  width: 190px;
  flex: 0 0 190px;
}

.app-search .keyword-input {
  min-width: 320px;
}

.app-form.form-table {
  margin-top: 8px;
}

.app-form textarea {
  min-height: 100px;
}

.app-required::after {
  content: " *";
  color: #ec193a;
  font-weight: 700;
}

.app-grid-shell {
  margin-top: 10px;
}

.app-grid-fill {
  display: flex;
  flex: 1 1 0;
  min-height: 0;
  overflow: hidden;
}

.app-grid-shell .grid-container {
  min-width: 0;
  width: 100%;
}

.app-grid-shell .grid-container .grid-toolbar {
  align-items: center;
  min-height: 36px;
  margin-bottom: 6px;
  padding: 0;
}

.app-grid-shell .grid-container .grid {
  min-height: 120px;
}

.app-grid-fill .grid-container,
.app-grid-fill .grid-container .grid {
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
}

.app-grid-fill .grid-container .grid {
  height: 100%;
}

.app-grid-fill .grid-container {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.app-grid-fill .grid-container .grid.tabulator {
  flex: 1 1 0;
  height: 100%;
}

.app-page-fill .button-wrapper {
  flex: 0 0 auto;
  margin-top: 16px;
}

.app-grid-shell .grid-container .grid-toolbar .title-bar,
.app-grid-shell .grid-container .grid-toolbar .btn-group {
  min-height: 34px;
}

.app-grid-shell .grid-container .grid-toolbar .title-bar .title {
  font-size: 16px;
  line-height: 34px;
}

.app-grid-shell .tabulator {
  border-color: #b8c0cc;
  font-size: 13px;
}

.app-grid-shell .tabulator .tabulator-header .tabulator-col {
  background: #f3f4f6;
  border-color: #c6ccd5;
  justify-content: center;
}


.app-grid-shell .tabulator-row .tabulator-cell {
  border-color: #c6ccd5;
  padding: 3px 6px;
  line-height: 24px;
}

.app-grid-shell .tabulator-row .tabulator-cell input:not([type="checkbox"]):not([type="radio"]),
.app-grid-shell .tabulator-row .tabulator-cell select,
.app-grid-shell .tabulator-row .tabulator-cell button,
.app-grid-shell .tabulator-row .tabulator-cell .btn {
  max-width: 100%;
  height: 24px;
  padding: 2px 6px;
  box-sizing: border-box;
  font-size: 13px;
  line-height: 18px;
  vertical-align: middle;
}

.app-grid-shell .tabulator-row .tabulator-cell.tabulator-editing {
  padding: 0;
}

.app-grid-shell .tabulator-row .tabulator-cell.tabulator-editing input:not([type="checkbox"]):not([type="radio"]),
.app-grid-shell .tabulator-row .tabulator-cell.tabulator-editing select,
.app-grid-shell .tabulator-row .tabulator-cell.tabulator-editing textarea {
  width: 100%;
  height: 100%;
  min-height: 30px;
  margin: 0;
  padding: 0 6px;
  border: 1px solid #1d72c9;
  border-radius: 0;
  outline: none;
  box-sizing: border-box;
  background: #fff;
  color: inherit;
  font: inherit;
  line-height: 30px;
}

.app-grid-shell .tabulator-row .tabulator-cell input[type="checkbox"],
.app-grid-shell .tabulator-row .tabulator-cell input[type="radio"] {
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
  vertical-align: middle;
}

.app-grid-shell .pagination-controls {
  align-items: center;
  gap: 14px !important;
  min-width: auto !important;
}

.app-result {
  min-width: 82px;
  color: #475467;
  font-size: 13px;
}

.app-grid-range {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.app-grid-range input {
  width: 92px;
  height: 26px;
  padding: 3px 6px;
  box-sizing: border-box;
  text-align: center;
}

.app-permission-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.app-permission-table th,
.app-permission-table td {
  height: 24px;
  padding: 2px 4px;
  border: 1px solid #d0d5dd;
  box-sizing: border-box;
  background: #fff;
  font-size: 12px;
  font-weight: 400;
  text-align: center;
}

.app-permission-table th {
  color: #344054;
  background: #f8fafc;
}

.app-permission-table td {
  width: auto;
}

.app-two-col,
.app-dashboard-metrics,
.app-dashboard-grid,
.app-code-layout,
.app-authority-layout {
  display: grid;
  gap: 16px;
}

.app-two-col {
  grid-template-columns: 1fr 1fr;
}

.app-dashboard-metrics {
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 14px;
}

.app-dashboard-grid {
  grid-template-columns: 1.2fr .8fr;
}

.app-code-layout {
  grid-template-columns: 420px 1fr;
}

.app-authority-layout {
  grid-template-columns: 400px minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
}

.app-authority-layout > div {
  min-width: 0;
}

.app-metric {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 12px;
  background: #f8f9fa;
}

.app-metric strong {
  display: block;
  color: #1976d2;
  font-size: 26px;
  line-height: 1.2;
}

.app-metric span {
  color: #667085;
  font-size: 13px;
}

.app-panel {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 14px;
  background: #fff;
}

.app-panel-title {
  margin-bottom: 10px;
  font-weight: 700;
}

.app-status-ok,
.app-status-fail {
  font-weight: 700;
}

.app-status-ok {
  color: #047857;
}

.app-status-fail {
  color: #dc2626;
}

.app-modal-medium {
  width: 980px;
  min-height: 420px;
}

.app-modal-small {
  width: 460px;
  min-height: auto;
}

.app-modal-body {
  display: block;
  height: auto;
  overflow: visible;
}

.app-login-wrap {
  position: absolute;
  top: 50%;
  left: 50%;
  box-sizing: border-box;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 90%;
  min-width: 300px;
  max-width: 600px;
}

.app-login-box {
  width: 100%;
  padding: 30px 80px;
  border: 2px solid #ccc;
  border-radius: 8px;
  background-color: #f5f5f5;
  box-sizing: border-box;
}

.app-login-logo {
  width: 90%;
  margin-bottom: 8px;
}

.app-login-title {
  width: 90%;
  margin-bottom: 12px;
}

.app-password-box {
  position: absolute;
  top: 50%;
  left: 50%;
  box-sizing: border-box;
  transform: translate(-50%, -50%);
}

.app-login-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 90%;
  min-width: 300px;
  max-width: 600px;
  padding: 30px 80px;
  border: 2px solid #ccc;
  border-radius: 8px;
  background-color: #f5f5f5;
}

.app-login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 90%;
  margin-bottom: 16px;
}

.app-login-logo img {
  max-width: 220px;
  max-height: 72px;
}

.app-login-title {
  width: 90%;
  margin-bottom: 20px;
  color: #263a4d;
  font-size: 26px;
  font-weight: 700;
  text-align: center;
}

.app-login-content {
  width: 90%;
}

.app-password-init-link {
  display: inline-block;
  margin-top: 12px;
  color: #475467;
  font-size: 13px;
}

.app-password-body {
  background: #f4f6f8;
}

.app-password-box {
  width: 460px;
  max-width: calc(100vw - 32px);
  padding: 34px 42px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(15, 23, 42, .12);
}

.app-password-logo {
  margin-bottom: 18px;
  text-align: center;
}

.app-password-logo img {
  max-width: 200px;
  max-height: 64px;
}

.app-password-title {
  margin-bottom: 24px;
  font-size: 24px;
  font-weight: 700;
  text-align: center;
}

.app-password-row {
  margin-bottom: 14px;
}

.app-password-row label {
  display: block;
  margin-bottom: 6px;
  color: #344054;
  font-size: 14px;
}

.app-password-row input,
.app-password-row select {
  width: 100%;
  box-sizing: border-box;
}

.app-password-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.app-notice-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, .45);
}

.app-notice-modal.show {
  display: flex;
}

.app-notice-box {
  width: 420px;
  max-width: 90vw;
  padding: 22px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(15, 23, 42, .28);
}

.app-notice-title {
  margin-bottom: 12px;
  font-weight: 700;
}

.app-notice-message {
  margin-bottom: 20px;
  line-height: 1.6;
  white-space: pre-line;
}

.app-notice-actions {
  text-align: right;
}

.gnb-menu {
  min-width: 0;
  flex-wrap: nowrap;
  overflow-y: visible;
}

.gnb-item {
  flex: 0 1 auto;
  min-width: 72px;
  overflow: visible;
}

.gnb-menu > .gnb-item > a {
  max-width: 150px;
  padding: 0 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .app-two-col,
  .app-dashboard-grid,
  .app-code-layout,
  .app-authority-layout {
    grid-template-columns: 1fr;
  }

  .app-dashboard-metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .app-search .field-line {
    flex-wrap: wrap;
  }
}
