:root {
  color-scheme: light;
  font-family: "Pretendard Variable", "Pretendard", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --background: #f7f9fc;
  --foreground: #121826;
  --action: #1f5fbf;
  --action-hover: #174a9c;
  --action-fg: #ffffff;
  --surface: #ffffff;
  --surface-muted: #f8fafc;
  --canvas: #f5f7fb;
  --border: #dbe4f0;
  --border-strong: #b7c5d8;
  --muted: #68758a;
  --muted-strong: #3c485d;
  --success: #10b981;
  --success-soft: #ecfdf5;
  --warning: #eab308;
  --warning-soft: #fefce8;
  --danger: #ef4444;
  --danger-soft: #fef2f2;
  --info: #3b82f6;
  --info-soft: #eff6ff;
  --ring: rgb(31 95 191 / 28%);
  --shadow-sm: 0 8px 24px rgb(15 23 42 / 7%);
  --shadow-md: 0 18px 48px rgb(15 23 42 / 12%);
  --card-radius: 20px;
  --notice-radius: 14px;
  --control-radius: 13px;
  --control-border: 1px solid var(--border-strong);
  --control-bg: #ffffff;
  --control-hover-bg: #ffffff;
  --control-focus-shadow: 0 0 0 4px rgb(31 95 191 / 10%);
  --button-border: 1px solid var(--action);
  --button-shadow: 0 12px 22px rgb(31 95 191 / 16%);
  --button-font-weight: 700;
  --animate-fade-in: fade-in 320ms ease-out both;
  --animate-fade-in-up: fade-in-up 420ms ease-out both;
  --animate-pop-in: pop-in 220ms cubic-bezier(0.16, 1, 0.3, 1) both;
  --animate-shimmer: shimmer 1.6s linear infinite;
  --animate-soft-pulse: soft-pulse 2s ease-in-out infinite;
  background: var(--background);
  color: var(--foreground);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--background);
  color: var(--foreground);
  font-family: inherit;
}

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes fade-in-up {
  from { opacity: 0; transform: translate3d(0, 8px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes pop-in {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes shimmer {
  from { background-position: -200% 0; }
  to { background-position: 200% 0; }
}

@keyframes soft-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.78; transform: scale(1.04); }
}

.shell {
  max-width: 920px;
  margin: 0 auto;
  padding: 40px 24px;
}

.card,
.record-card {
  border: 1px solid var(--border);
  border-radius: var(--card-radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.card {
  margin-top: 24px;
  padding: 20px;
}

.warning-shell {
  max-width: 760px;
}

.danger-card {
  border-color: #fecaca;
  background: var(--danger-soft);
}

.danger-card h1 {
  color: #991b1b;
}

.eyebrow,
.card-kicker {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.eyebrow.danger {
  color: var(--danger);
}

h1 {
  margin: 0 0 16px;
  color: var(--foreground);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}

h2,
h3,
h4 {
  color: var(--foreground);
}

.notice,
.empty-state {
  padding: 12px 14px;
  border-radius: var(--notice-radius);
  font-size: 0.875rem;
  font-weight: 500;
}

.notice {
  border: 1px solid #bbf7d0;
  background: var(--success-soft);
  color: #047857;
}

.notice.error {
  border-color: #fecaca;
  background: var(--danger-soft);
  color: #b91c1c;
}

.notice.subtle {
  border-color: var(--border);
  background: var(--surface-muted);
  color: var(--muted-strong);
}

.empty-state {
  border: 1px dashed var(--border-strong);
  background: var(--surface-muted);
  color: var(--muted);
  text-align: center;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin: 18px 0 0;
}

.form-grid label,
.checkbox-label {
  display: grid;
  gap: 6px;
  color: #3f3f46;
  font-size: 0.75rem;
  font-weight: 500;
}

.checkbox-label {
  display: flex;
  align-items: center;
  min-height: 42px;
}

.checkbox-label input {
  width: auto;
  min-height: auto;
}

input,
select,
textarea,
button,
code {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: var(--control-border);
  border-radius: var(--control-radius);
  background: var(--control-bg);
  color: #18181b;
  padding: 0 12px;
  font-size: 0.875rem;
  transition: box-shadow 150ms ease, background 150ms ease;
}

textarea {
  min-height: 88px;
  padding: 10px 12px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #a1a1aa;
}

input:hover,
select:hover,
textarea:hover {
  background: var(--control-hover-bg);
}

input:focus,
select:focus,
textarea:focus {
  outline: 0;
  box-shadow: var(--control-focus-shadow);
}

code {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: calc(var(--control-radius) - 4px);
  background: var(--surface-muted);
  color: #3f3f46;
  padding: 0 6px;
  font-size: 0.8125rem;
}

button,
.button-link,
.secondary-button,
.danger-button,
.icon-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--control-radius);
  padding: 0 16px;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: var(--button-font-weight);
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

button,
.button-link {
  border: var(--button-border);
  background: var(--action);
  color: var(--action-fg);
  box-shadow: var(--button-shadow);
}

button:hover,
.button-link:hover {
  background: var(--action-hover);
  transform: translateY(-1px);
}

.secondary-button,
.button-link.secondary,
.icon-button {
  border: 1px solid var(--border);
  background: var(--surface);
  color: #27272a;
}

.secondary-button:hover,
.button-link.secondary:hover,
.icon-button:hover {
  background: #fafafa;
  transform: translateY(-1px);
}

.danger-button {
  border: 1px solid #fecaca;
  background: var(--danger-soft);
  color: #dc2626;
}

.danger-button:hover {
  background: #fee2e2;
  transform: translateY(-1px);
}

button:disabled,
.button-link[aria-disabled="true"],
.secondary-button:disabled,
.danger-button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.badge {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  background: #f4f4f5;
  color: #3f3f46;
  padding: 0 10px;
  font-size: 0.6875rem;
  font-weight: 500;
}

.badge-info {
  background: #eff6ff;
  color: #1d4ed8;
}

.badge-success {
  background: #ecfdf5;
  color: #047857;
}

.badge-warning {
  background: #fefce8;
  color: #a16207;
}

.badge-danger {
  background: #fef2f2;
  color: #b91c1c;
}

.form-grid .wide,
.wide {
  grid-column: 1 / -1;
}

.form-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.record-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.record-card {
  padding: 16px;
}

.record-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.record-summary h3 {
  margin: 10px 0 0;
  font-size: 0.9375rem;
}

.record-summary .muted {
  margin: 5px 0 0;
}

.record-details {
  margin-top: 14px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.record-details summary {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  border-radius: 10px;
  background: var(--surface-muted);
  color: #27272a;
  padding: 0 10px;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
}

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

.detail-grid form {
  align-content: start;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fafafa;
  padding: 16px;
}

.detail-grid h4,
.wide-panel h4 {
  margin: 0;
}

.wide-panel {
  grid-column: 1 / -1;
}

.upload-status {
  align-self: center;
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 500;
}

.upload-status[data-mode="success"] {
  color: #047857;
}

.upload-status[data-mode="error"] {
  color: #dc2626;
}

.employee-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
  margin-top: 14px;
}

.data-list,
.link-list,
.timeline {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  padding: 0;
  list-style: none;
  box-shadow: var(--shadow-sm);
}

.data-list li,
.link-list li,
.timeline li {
  border-bottom: 1px solid #f4f4f5;
  padding: 14px 20px;
}

.data-list li:last-child,
.link-list li:last-child,
.timeline li:last-child {
  border-bottom: 0;
}

.data-list li {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) repeat(3, minmax(120px, auto));
  gap: 12px;
  align-items: center;
  font-size: 0.8125rem;
}

.link-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.link-list span,
.timeline span,
.data-list span {
  color: var(--muted);
  font-size: 0.8125rem;
}

.alert-summary-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
  border: 1px solid #fed7aa;
  border-radius: 12px;
  background: #fff7ed;
  padding: 16px;
}

.alert-summary-card span {
  color: var(--muted);
  font-size: 0.75rem;
}

.alert-summary-card strong {
  display: block;
  margin-top: 6px;
  font-size: 1.5rem;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.meta-grid div {
  border-radius: 10px;
  background: var(--surface-muted);
  padding: 12px;
}

.meta-grid dt {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
}

.meta-grid dd {
  margin: 4px 0 0;
  font-weight: 600;
}

.muted {
  color: var(--muted);
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.product-image {
  display: block;
  width: 100%;
  max-height: 320px;
  margin: 16px 0;
  border-radius: 12px;
  object-fit: cover;
  background: #e4e4e7;
}

.preline {
  white-space: pre-line;
}

@media (max-width: 760px) {
  .shell {
    padding: 28px 14px;
  }

  .record-summary,
  .alert-summary-card {
    display: grid;
    grid-template-columns: 1fr;
  }

  .detail-grid,
  .data-list li,
  .employee-actions,
  .inline-actions,
  .link-list li,
  .action-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  input,
  select,
  textarea,
  button,
  .button-link,
  .secondary-button,
  .danger-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
