:root {
  color-scheme: light;
  font-family: Arial, "Noto Sans KR", sans-serif;
  color: #1f2937;
  background: #fff;
}

* {
  box-sizing: border-box;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 2000;
  padding: 10px 14px;
  border-radius: 6px;
  color: #fff;
  background: #1f2937;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

body {
  margin: 0;
  min-width: 320px;
}

a {
  color: #1f2937;
  font-size: 15px;
}

button,
input {
  font: inherit;
}

button {
  padding: 8px 14px;
  border: 1px solid #9ca3af;
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}

button:hover:not(:disabled) {
  background: #f3f4f6;
}

button:disabled {
  cursor: wait;
  opacity: 0.9;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 64px;
  padding: 12px 24px;
  border-bottom: 1px solid #eaeaea;
  background: #fafafa;
}

.site-logo {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  text-decoration: none;
}

.site-logo img {
  display: block;
  width: auto;
  height: 30px;
}

.navigation {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  flex-wrap: wrap;
}

.navigation .logout-button {
  border: none;
  padding: 6px 12px;
  color: #fff;
  background: #cf5a49;
}

.navigation .logout-button:hover:not(:disabled) {
  color: #fff;
  background: #dc2626;
}

.navigation a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 7px;
  background: #e8e8e8;
  text-decoration: none;
}

.navigation a:hover {
  background: #ddd;
  text-decoration: none;
}

.navigation .active-navigation-link {
  color: #fff;
  background: #444;
  font-weight: 500;
  text-decoration: none;
}

.navigation .active-navigation-link:hover {
  background: #333;
}

.current-user {
  margin-left: auto;
  color: #4b5563;
  font-size: 15px;
}

.page-container {
  width: min(1100px, calc(100% - 32px));
  margin: 24px auto;
}

.app-page {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

.app-page .page-container {
  flex: 1 0 auto;
  margin-bottom: 0;
}

.site-footer {
  width: min(1100px, calc(100% - 32px));
  flex-shrink: 0;
  margin: 48px auto 0;
  padding: 20px 0;
  border-top: 1px solid #e5e7eb;
  color: #6b7280;
  font-size: 13px;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

.panel {
  margin-bottom: 20px;
  padding: 20px;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  background: #fff;
}

.panel h1,
.panel h2,
.panel h3 {
  margin-top: 0;
}

.artifact-deprecation-notice {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0 0;
  color: #4b5563;
  font-size: 13px;
}

.artifact-deprecation-notice img {
  display: block;
  flex: 0 0 auto;
  width: 62px;
  height: 18px;
}

details {
  margin-top: 12px;
}

summary {
  padding: 8px 0;
  cursor: pointer;
  font-size: 22px;
  font-weight: 700;
}

.file-list {
  min-height: 24px;
  margin: 0 0 24px;
  padding: 0;
  border: 1px solid #e5e7eb;
  border-top: 0;
  border-radius: 0 0 8px 8px;
  list-style: none;
}

.artifact-list-header,
.artifact-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 100px 190px 31px;
  align-items: center;
  gap: 16px;
}

.artifact-list-header {
  margin-top: 12px;
  padding: 9px 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px 8px 0 0;
  color: #4b5563;
  background: #f8fafc;
  font-size: 14px;
  font-weight: 700;
}

.artifact-list-header span {
  text-align: center;
}

.artifact-file-size,
.artifact-file-date {
  text-align: center;
}

.artifact-row {
  min-height: 44px;
  padding: 8px 12px;
  border-bottom: 1px solid #e5e7eb;
}

.artifact-row:last-child {
  border-bottom: 0;
}

.artifact-deprecated .artifact-file-name {
  text-decoration-line: line-through;
  text-decoration-color: #cf5a49;
  text-decoration-thickness: 2px;
}

.artifact-file-cell {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
}

.artifact-status-badge {
  display: block;
  flex: 0 0 auto;
  width: auto;
  height: 18px;
}

.artifact-deprecated-badge,
.artifact-deprecated .artifact-active-badge {
  display: none;
}

.artifact-deprecated .artifact-deprecated-badge {
  display: block;
}

.artifact-file-name {
  min-width: 0;
  overflow-wrap: anywhere;
}

.artifact-file-size,
.artifact-file-date {
  color: #4b5563;
  font-size: 14px;
  white-space: nowrap;
}

.artifact-release-note {
  display: contents;
  min-width: 0;
}

.release-note-actions {
  display: flex;
  justify-content: center;
}

.release-note-actions button,
.release-note-form-actions button {
  padding: 3px 7px;
  border-color: #d1d5db;
  color: #374151;
  background: #f9fafb;
  font-size: 12px;
}

.release-note-actions .release-note-toggle-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border: 0;
  color: #4b5563;
  background: transparent;
}

.release-note-actions .release-note-toggle-button:hover:not(:disabled) {
  color: #111827;
  background: transparent;
}

.release-note-toggle-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.release-note-panel {
  grid-column: 1 / -1;
  margin: 8px -12px -8px;
  padding: 14px;
  border: 0;
  border-top: 1px solid #dbe3ea;
  border-radius: 0;
  background: transparent;
}

.release-note-panel[hidden] {
  display: none;
}

.release-note-status {
  margin: 0;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.release-note-status {
  color: #4b5563;
  font-size: 14px;
}

.release-note-status.error {
  color: #b91c1c;
}

.release-note-form {
  display: grid;
  gap: 12px;
}

.release-note-readonly-fields {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
}

.release-note-field {
  display: grid;
  gap: 6px;
  color: #374151;
  font-size: 14px;
  font-weight: 700;
}

.release-note-title-field,
.release-note-content-field {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
}

.release-note-title-field > span:first-child,
.release-note-content-field > span:first-child {
  padding-top: 8px;
}

.release-note-field input,
.release-note-field textarea,
.release-note-content {
  box-sizing: border-box;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #9ca3af;
  border-radius: 6px;
  color: #1f2937;
  background: #fff;
  font: inherit;
  font-weight: 400;
}

.release-note-field textarea {
  resize: vertical;
  min-height: calc(5lh + 18px);
  overflow: auto;
}

.release-note-deprecated-field {
  margin-right: auto;
  grid-template-columns: auto auto;
  justify-content: start;
  align-items: center;
  gap: 10px;
}

.release-note-deprecated-field input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  accent-color: #cf5a49;
  cursor: pointer;
}

.release-note-readonly-fields input,
.release-note-content {
  color: #374151;
  background: #fbfcfd;
  cursor: default;
}

.release-note-content {
  min-height: calc(5lh + 18px);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.release-note-character-count {
  grid-column: 2;
  justify-self: end;
  color: #6b7280;
  font-size: 12px;
  font-weight: 400;
}

.release-note-form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.release-note-form-actions .release-note-cancel-button {
  border: 1px solid #cf5a49;
  color: #fff;
  background: #cf5a49;
}

.release-note-form-actions .release-note-cancel-button:hover:not(:disabled) {
  border-color: #dc2626;
  color: #fff;
  background: #dc2626;
}

.empty-artifact-item {
  padding: 10px 12px;
}

.artifact-list-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 38px;
  margin: 8px 0 36px;
}

.artifact-list-controls[hidden] {
  display: none;
}

.load-more-button {
  padding: 6px 14px;
  border: 0px;
}

.load-more-button:disabled {
  opacity: 1;
  color: #8c8e91;
  -webkit-text-fill-color: #8c8e91;
}

.artifact-list-status {
  color: #4b5563;
  font-size: 14px;
}

.artifact-list-status.error {
  color: #b91c1c;
}

.status-message {
  min-height: 24px;
  margin: 0 0 16px;
  color: #4b5563;
}

.status-message.error,
.form-error {
  color: #b91c1c;
}

.login-page {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  padding: 24px;
}

.login-card {
  width: min(380px, 100%);
  margin: auto;
  padding: 28px;
  border-radius: 12px;
  background: #fcf6f5;
  box-shadow: 2px 2px 5px rgb(15 23 42 / 25%);
}

.login-page .site-footer {
  width: 100%;
  margin: 24px auto 0;
  padding: 16px 0 0;
  border-top: 0;
}

.login-logo {
  display: flex;
  justify-content: center;
  margin: 0 0 24px;
}

.login-logo img {
  display: block;
  width: min(220px, 100%);
  height: auto;
}

.form-field {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: stretch;
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid #ddd;
  border-radius: 6px;
  color: #8a8f98;
  background: #fff;
}

.form-field.password-field {
  grid-template-columns: 44px minmax(0, 1fr) 42px;
}

.form-field:focus-within {
  border-color: #6b8da6;
  box-shadow: 0 0 0 2px rgb(44 94 132 / 12%);
}

.form-field svg {
  align-self: center;
  justify-self: center;
  width: 19px;
  height: 19px;
}

.form-field input {
  width: 100%;
  min-height: 46px;
  padding: 8px 12px;
  border: 0;
  border-left: 1px solid #ddd;
  border-radius: 0;
  outline: 0;
  color: #1f2937;
  background: #fff;
}

.form-field input::placeholder {
  color: #6b7280;
  opacity: 1;
}

.form-field input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 1000px #fff inset;
  -webkit-text-fill-color: #1f2937;
}

.login-card button {
  display: block;
  width: 120px;
  margin: 0 auto;
  background: #154e78;
  color: #fff;
}

.login-card button:hover:not(:disabled) {
  background: #2c5e84;
  color: #fff;
}

.login-card .toggle-password-button {
  display: inline-flex;
  width: 42px;
  height: auto;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #8a8f98;
  background: #fff;
}

.login-card .toggle-password-button:hover:not(:disabled) {
  color: #4b5563;
  background: #fff;
}

.toggle-password-button svg {
  fill: currentcolor;
}

.policy-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.policy-actions button {
  padding: 8px 14px;
  border: 0px solid #ddd;
  border-radius: 6px;
  background: #eee;
}

.policy-actions button:hover:not(:disabled) {
  background: #ddd;
}

.policy-actions button[data-policy-readonly]:disabled {
  cursor: default;
  opacity: 1;
}

.policy-actions button.current-policy-action {
  color: #fff;
  background: #2c5e84;
  cursor: default;
}

.policy-actions button.current-policy-action:hover:not(:disabled) {
  background: #2c5e84;
}

.policy-comment {
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 1px solid #dbe3ea;
  border-radius: 8px;
  background: #fff;
  line-height: 1.6;
}

.policy-comment p:first-child {
  margin-top: 0;
  color: #b4234d;
}

.policy-description-table-wrapper {
  overflow-x: auto;
}

.policy-description-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  font-size: 14px;
}

.policy-description-table th,
.policy-description-table td {
  padding: 7px 12px;
  border: 1px solid #dbe3ea;
  font-weight: 400;
  text-align: left;
  vertical-align: top;
}

.policy-description-table thead th {
  background: #eee;
  text-align: center;
}

.policy-description-table tbody th {
  width: 190px;
  white-space: nowrap;
}

.policy-result-wrapper {
  overflow: hidden;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  background: #fff;
}

.policy-result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 8px 12px 8px 15px;
  border-bottom: 1px solid #d1d5db;
  background: #eee;
  font-size: 14px;
}

.copy-policy-button {
  display: inline-flex;
  width: 32px;
  height: 30px;
  align-items: center;
  justify-content: center;
  padding: 5px;
  border: 0;
  color: #666;
  background: transparent;
  box-shadow: none;
}

.copy-policy-button:hover:not(:disabled) {
  background: transparent;
}

.copy-policy-icon {
  display: none;
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentcolor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.4;
}

.copy-policy-icon-copy rect:last-child {
  fill: #eee;
}

.copy-policy-button[data-state="copy"] .copy-policy-icon-copy,
.copy-policy-button[data-state="success"] .copy-policy-icon-success,
.copy-policy-button[data-state="error"] .copy-policy-icon-error {
  display: block;
}

.copy-policy-button[data-state="success"] {
  color: #666;
}

.copy-policy-button[data-state="error"] {
  color: #b4234d;
}

.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 1100;
  max-width: calc(100% - 32px);
  padding: 12px 18px;
  border-radius: 8px;
  color: #fff;
  background:#cf5a49;
  box-shadow: 0 8px 24px rgb(0 0 0 / 20%);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, calc(-50% + 6px)) scale(0.98);
  transition:
    opacity 600ms ease-out,
    transform 600ms ease-out;
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.toast[hidden] {
  display: none;
}

.policy-result {
  min-height: 220px;
  margin: 0;
  overflow: auto;
  padding: 15px;
  border: 0;
  font-size: 14px;
  white-space: pre-wrap;
  word-break: break-word;
  background: transparent;
}

.confirmation-dialog {
  width: min(520px, calc(100% - 32px));
  padding: 24px;
  border: 1px solid #d1d5db;
  border-radius: 12px;
  color: #1f2937;
  background: #fff;
  box-shadow: 0 18px 45px rgb(15 23 42 / 22%);
}

.confirmation-dialog::backdrop {
  background: rgb(15 23 42 / 55%);
}

.confirmation-dialog h2 {
  margin: 0 0 18px;
}

.policy-change-summary {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 8px;
  background: #f3f4f6;
}

.policy-change-summary p,
.confirmation-warning {
  margin: 0;
}

.policy-change-summary p {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.confirmation-warning {
  margin-top: 16px;
  color: #b91c1c;
  line-height: 1.5;
}

.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

.danger-button {
  border-color: #b91c1c;
  color: #fff;
  background: #b91c1c;
}

.danger-button:hover:not(:disabled) {
  background: #991b1b;
}

@media (max-width: 680px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .navigation {
    width: 100%;
    justify-content: flex-start;
  }

  .artifact-list-header {
    display: none;
  }

  .file-list {
    margin-top: 12px;
    border-top: 1px solid #e5e7eb;
    border-radius: 8px;
  }

  .artifact-row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 12px;
  }

  .artifact-file-date {
    grid-column: 1;
    text-align: center;
  }

  .release-note-actions {
    grid-column: 2;
    grid-row: 2;
  }
}
