/* ===========================
   theme.css  (layout-free)
   - Design Tokens
   - Base Elements
   - Common Components (look only)
   - NO layout rules (.container, .grid, .stack 등 없음)
   =========================== */

/* ── DungGeunMo WebFont ── */
@font-face {
  font-family: 'DungGeunMo';
  src: url('/fonts/DungGeunMo.woff2') format('woff2'),
       url('/fonts/DungGeunMo.woff') format('woff'),
       url('/fonts/DungGeunMo.otf') format('opentype'),
       url('/fonts/DungGeunMo.eot') format('embedded-opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ── Design Tokens ───────────────── */
:root{
  /* Brand (linked with /css/theme.json) */
  --brand:#F76B1E;         /* 메인 */
  --brand-mid:#F77F1E;     /* 그라데 중간 */
  --brand-light:#F7AB1E;   /* 그라데 시작 */
  --brand-dark:#C56518;    /* hover/보조 */
  --brand-hover:#E57015;   /* 약간 어둡게 */

  /* Base colors */
  --bg:#ffffff;
  --text:#1a1a1a;
  --muted:#585f68;
  --line:#e9eef3;
  --card:#fafafa;

  /* State (optional) */
  --success:#067647;
  --warning:#F79009;
  --error:#B42318;     /* 삭제/오류용 */
  --info:#2E90FA;

  /* Typography / shape / shadow / spacing tokens (레이아웃 X) */
  --font-sans:-apple-system,BlinkMacSystemFont,"Noto Sans KR",Segoe UI,Roboto,sans-serif;
  --radius:12px;
  --shadow-sm:0 1px 2px rgba(0,0,0,.05);
  --shadow-md:0 6px 16px rgba(0,0,0,.08);

  /* 버튼·폼 내부 여백 등 컴포넌트 기본 패딩 */
  --pad-sm:8px;
  --pad-md:12px;
  --pad-lg:14px;
}

/* ── Base ────────────────────────── */
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  background:var(--bg);
  color:var(--text);
  font-family:'DungGeunMo', var(--font-sans);
}

/* 링크 기본 톤 */
a{color:var(--brand); text-decoration:none}
a:hover{text-decoration:underline}

/* ── Common Components ── */

/* 버튼 */
.btn{
  font-family: 'DungGeunMo', var(--font-sans);
  display:inline-block;
  padding:var(--pad-md) 18px;
  border-radius:10px;
  font-weight:700;
  border:1px solid var(--line);
  background:var(--brand);
  color:#fff;
  transition:background .15s ease, transform .06s ease, box-shadow .15s ease;
}
/* 이모지 보정: 이모지 포함시 폰트 강제 고정 */
.btn.emoji {
  font-family: 'DungGeunMo', var(--font-sans), 'Apple Color Emoji', 'Segoe UI Emoji';
}
.btn:hover{ background:var(--brand-hover); }
.btn:active{ transform:translateY(1px); }
.btn.ghost{
  background:#fff;
  color:var(--text);
  border:1px solid var(--line);
}
.btn.outline{
  background:transparent;
  color:var(--brand);
  border:2px solid var(--brand);
}
.btn.round{ border-radius:999px; }

/* --- 추가됨: 상태별 버튼 변형 --- */
.btn.success {
  background: var(--success);
  border-color: var(--success);
}
.btn.success:hover {
  background: #045c35;
}

.btn.warning {
  background: var(--warning);
  border-color: var(--warning);
  color:#fff;
}
.btn.warning:hover {
  background: #d97706;
}

.btn.danger {               /* 삭제/경고용 */
  background: var(--error);
  border-color: var(--error);
  color: #fff;
}
.btn.danger:hover {
  background: #8f1b13;
}

/* 히어로(어두운 배경)용 반전 버튼 */
.btn.ghost.on-dark{
  background:transparent;
  color:#fff;
  border:2px solid #fff;
}
.btn.ghost.on-dark:hover{
  background:#fff;
  color:var(--brand);
}

/* 히어로용 “화이트 기본 버튼” */
.btn.primary-hero{
  background:#fff;
  color:var(--brand);
  border:2px solid #fff;
}
.btn.primary-hero:hover{
  background:var(--brand);
  color:#fff;
}

/* 카드 룩 */
.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow-md);
}
.card .body{ padding:var(--pad-lg); }
.dashboard-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 6px 16px rgba(0,0,0,.05);
}
/* 폼 컨트롤 */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
select,
textarea{
  width:100%;
  padding:var(--pad-md) 10px;
  border:1px solid var(--line);
  border-radius:10px;
  background:#fff;
  color:var(--text);
  font-size:15px;
}
textarea{ resize:vertical; }

/* 알림 */
.alert{
  padding:10px 12px;
  border-radius:10px;
  border:1px solid var(--line);
  background:#fff;
}
.alert.success{ border-color:rgba(6,118,71,.25); background:rgba(6,118,71,.06); }
.alert.error{   border-color:rgba(180,35,24,.25); background:rgba(180,35,24,.06); }

/* Brand Surfaces */
.header-brand{ background:var(--brand); }

/* 3-스톱 그라데이션 */
.hero-grad{
  background:linear-gradient(135deg, var(--brand-light) 0%, var(--brand-mid) 45%, var(--brand) 100%);
  color:#fff;
  border-radius:16px;
  box-shadow:var(--shadow-md);
}

/* 접근성 유틸 */
.sr-only{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;
}

/* 공통 헤더 스타일 */
header.header-brand {
  text-align: center;
  padding: 8px 16px;
  background: transparent;
}
header.header-brand img {
  height: 80px;
  display: block;
  margin: 0 auto;
}
body { margin: 0; }
html { overflow-y: scroll; }

button, input, select, textarea {
  font-family: 'DungGeunMo', var(--font-sans);
}

/* --- a.btn을 button과 시각적으로 완전히 일치시킴 --- */
a.btn {
  display: inline-block;
  text-align: center;
  padding: var(--pad-md) 18px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--brand);
  color: #fff;
  font-family: 'DungGeunMo', var(--font-sans);
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  vertical-align: middle;
  transition: background .15s ease, transform .06s ease, box-shadow .15s ease;
}
a.btn:hover { background: var(--brand-hover); }

/* a.btn.ghost — 버튼형 링크용 보조색상 */
a.btn.ghost {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
}
a.btn.ghost:hover {
  background: var(--brand-light);
  color: var(--brand-dark);
}

/* 비활성화 버튼 시각 효과 */
button[disabled],
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  background: #ccc !important;
  color: #666 !important;
  border-color: #ccc !important;
  pointer-events: none; /* ← 클릭·눌림·hover 완전 차단 */
}


footer{margin:36px 0 80px; color:#7b8591; font-size:13px; text-align:center; padding-bottom: 50px;}
.logoRow{display:flex; gap:32px; justify-content:center; align-items:center; margin-bottom:8px; flex-wrap:wrap}
.footer-logo{height:50px; object-fit:contain}

.back-dashboard{
  display:inline-block;
  padding:8px 14px;
  background:var(--brand);
  color:#fff;
  border:none;
  border-radius:8px;
  text-decoration:none;
  font-weight:600;
}