/* =====================================================================
   에이전트 김팀장 — 서비스 앱 셸 (재구성)
   styles.css 의 디자인 토큰/컴포넌트를 재사용하고, 프로토타입의 가짜 폰
   목업 프레임(.stage/.phone/.notch/.statusbar) 대신 실제 반응형 앱 셸을
   제공한다. 데스크톱에서는 가운데 정렬된 단일 컬럼, 모바일에서는 전체 폭.
   ===================================================================== */

.app {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  background: var(--surface);
  box-shadow: var(--sh);
}

/* Top app bar */
.app-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  height: 56px;
  padding: 0 var(--sp-4);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.app-bar .back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  margin-left: -6px;
  font-size: 22px;
  color: var(--text-2);
  border-radius: var(--r-sm);
}
.app-bar .back:hover { background: var(--surface-3); }
.app-bar .title { font-size: 17px; font-weight: 700; }
.app-bar .app-bar-right { margin-left: auto; display: flex; align-items: center; gap: var(--sp-2); }

/* Scrollable content */
.app-body {
  flex: 1;
  padding: var(--sp-4);
  padding-bottom: calc(64px + var(--sp-6));
}

/* Bottom tab bar */
.app-tabbar {
  position: sticky;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  height: 64px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.06);
}
.app-tabbar a {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-2);
  text-decoration: none;
}
.app-tabbar .tab-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 14px;
  border-radius: 999px;
  transition: background 0.15s;
}
.app-tabbar .tab-label {
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}
.app-tabbar a.active { color: var(--brand); }
.app-tabbar a.active .tab-inner {
  background: rgba(81, 69, 230, 0.10);
}

/* Section heading */
.section-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
  margin: var(--sp-5) 0 var(--sp-2);
}
.section-title:first-child { margin-top: 0; }

/* Centered auth screen (login). NOTE: named .auth-hero, NOT .hero — styles.css
   already defines a purple .hero used by marketing screens. */
.auth-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  margin: 0 auto;
  padding: var(--sp-6);
  text-align: center;
  background: var(--bg);
}
.auth-card {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-4);
  padding: var(--sp-8) var(--sp-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-lg);
}
.auth-card .logo {
  width: 64px;
  height: 64px;
  border-radius: var(--r-lg);
  background: var(--grad-brand);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  box-shadow: var(--sh-lg);
}

/* Tag input (escalation keywords) */
.tags { display: flex; flex-wrap: wrap; gap: var(--sp-2); }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 6px 0 11px;
  border-radius: var(--r-pill);
  background: var(--brand-50);
  color: var(--brand-700);
  font-size: 13px;
  font-weight: 600;
}
.tag button {
  border: 0;
  background: transparent;
  color: var(--brand-700);
  font-size: 15px;
  line-height: 1;
  padding: 2px 4px;
}
