/* =========================================================
   /public/assets/css/app.css
   공용 베이스 스타일 (Order 시스템 전체에서 재사용)
   - Reset + 기본 폰트/버튼/카드/테이블/폼/유틸
   - 페이지별 세부 스타일은 각 HTML 내부 <style>로 추가
   ========================================================= */

/* ---------- Reset (minimal) ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: #fff;
  color: #111;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Apple SD Gothic Neo",
    "Noto Sans KR", "Malgun Gothic", sans-serif;
  line-height: 1.4;
  -webkit-text-size-adjust: 100%;
}

img,
svg,
video {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* ---------- Common Layout ---------- */
.page {
  max-width: 980px;
  margin: 0 auto;
  padding: 16px 12px 80px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid #ddd;
  background: #fff;
  color: #111;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.btn:hover {
  background: #fafafa;
}

.btn:active {
  transform: translateY(0.5px);
}

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

.btn.primary {
  border-color: #111;
  background: #111;
  color: #fff;
}

.btn.primary:hover {
  background: #000;
}

.btn.ghost {
  border-color: transparent;
  background: transparent;
}

/* ---------- Cards ---------- */
.card {
  border: 1px solid #eee;
  border-radius: 14px;
  padding: 14px;
  background: #fff;
  margin: 12px 0;
}

.card-title {
  font-weight: 800;
  margin: 0 0 10px;
}

/* ---------- Tables ---------- */
table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 10px 8px;
  border-bottom: 1px solid #eee;
  vertical-align: top;
}

th {
  font-size: 13px;
  color: #666;
  text-align: left;
  background: #fafafa;
}

.num,
.right {
  text-align: right;
  white-space: nowrap;
}

/* ---------- Forms ---------- */
.input,
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 10px;
  background: #fff;
}

textarea {
  min-height: 110px;
  resize: vertical;
}

/* ---------- Text Utilities ---------- */
.muted {
  color: #888;
}

.hint {
  font-size: 14px;
  color: #666;
  margin: 8px 0 14px;
}

.k {
  color: #666;
  font-size: 13px;
}

.v {
  color: #111;
  font-size: 14px;
}

/* ---------- Simple Grid ---------- */
.grid2 {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 8px 12px;
  align-items: start;
}

/* ---------- Topbar ---------- */
.topbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.topbar .left {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

/* ---------- Sticky Table Header Helper ---------- */
.table-sticky thead th {
  position: sticky;
  top: 0;
  z-index: 1;
}

/* ---------- Badges (optional) ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid #eee;
  background: #fafafa;
}

.badge.good {
  border-color: #ccebd6;
  background: #ecf8f0;
}

.badge.warn {
  border-color: #ffe6b3;
  background: #fff6dd;
}

.badge.bad {
  border-color: #ffd0d0;
  background: #fff0f0;
}

/* ---------- Mobile base ---------- */
@media (max-width: 768px) {
  .page {
    padding-left: 12px;
    padding-right: 12px;
  }

  th,
  td {
    padding: 9px 6px;
  }

  .grid2 {
    grid-template-columns: 110px 1fr;
  }
}
