/* 임시 모듈. 삭제: docs/REMOVE.md */
.app {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
}

.hidden { display: none !important; }

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px clamp(20px, 4vw, 40px);
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.top__brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.top__brand a {
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--dark);
  text-decoration: none;
}

.top__brand span {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--muted-2);
}

.top__brand strong {
  font-size: 0.95rem;
}

.top__brand em {
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #b45309;
  background: #fff7ed;
  border: 1px solid #fdba74;
  border-radius: 999px;
  padding: 2px 8px;
}

.top__user {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--muted);
}

.top__user span:first-child {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--dark);
  color: #fff;
  font-size: 0.76rem;
}

.main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px clamp(20px, 4vw, 40px) 64px;
  display: grid;
  gap: 16px;
}

.lead {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--muted);
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--muted);
}

.field input[type="text"],
.field input[type="file"] {
  font: inherit;
  font-weight: 500;
  color: var(--text);
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 10px;
  background: #fff;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn {
  height: 36px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--dark);
  border-color: var(--dark);
  color: #fff;
}

.status {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--muted);
}

.status--warn {
  color: #b42318;
  font-weight: 700;
}

.wait {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(244, 246, 250, 0.72);
  backdrop-filter: blur(6px);
}

.wait__card {
  width: min(420px, 100%);
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 28px 24px 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-md);
  text-align: center;
}

.wait__ring {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 3px solid var(--line);
  border-top-color: var(--dark);
  animation: wait-spin 1.1s linear infinite;
}

.wait__title {
  margin: 8px 0 0;
  font-size: 1rem;
  font-weight: 800;
  color: var(--dark);
}

.wait__msg {
  margin: 0;
  min-height: 1.4em;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text);
}

.wait__hint {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--muted-2);
}

.wait__bar {
  width: 100%;
  height: 4px;
  margin-top: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--line-soft);
}

.wait__bar span {
  display: block;
  width: 38%;
  height: 100%;
  border-radius: inherit;
  background: var(--dark);
  animation: wait-slide 1.6s var(--ease) infinite;
}

@keyframes wait-spin {
  to { transform: rotate(360deg); }
}

@keyframes wait-slide {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(280%); }
}

body.is-waiting {
  overflow: hidden;
}

.kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.kpis article {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}

.kpis p {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted-2);
}

.kpis strong {
  display: block;
  margin-top: 4px;
  font-size: 1.35rem;
}

.table-card h2 {
  margin: 0;
  font-size: 0.95rem;
}

.table-wrap {
  overflow: auto;
  max-height: 62vh;
}

.muted {
  margin: 0;
  color: var(--muted-2);
  font-size: 0.84rem;
}

table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 0.76rem;
}

th, td {
  text-align: left;
  padding: 7px 8px;
  border-bottom: 1px solid var(--line-soft);
  white-space: nowrap;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
}

th {
  position: sticky;
  top: 0;
  background: #f8fafc;
}

@media (max-width: 720px) {
  .kpis { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .wait__ring,
  .wait__bar span {
    animation: none;
  }
}
