/* AI 비서 앱 모양 (밝은 화면 / 어두운 화면 자동 전환) */

:root {
  --bg: #f4f6fb;
  --card: #ffffff;
  --text: #1d2433;
  --muted: #7a8396;
  --line: #e6e9f0;
  --primary: #3b6cf6;
  --primary-soft: #eaf0ff;
  --warn-soft: #fff4e5;
  --ok-soft: #eaf8ef;
  --focus-soft: #f1ecff;
  --error: #d64545;
  --shadow: 0 1px 2px rgba(20, 30, 60, .06), 0 4px 16px rgba(20, 30, 60, .05);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11141b;
    --card: #1b2029;
    --text: #e8ebf2;
    --muted: #8d96a8;
    --line: #2a303b;
    --primary: #6b8eff;
    --primary-soft: #1f2a46;
    --warn-soft: #3a2e1c;
    --ok-soft: #1c3326;
    --focus-soft: #2a2442;
    --shadow: none;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* 아이폰 노치·홈 바 영역을 피해서 여백 */
.view {
  max-width: 520px;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 16px) 16px calc(env(safe-area-inset-bottom) + 24px);
}
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.error { color: var(--error); min-height: 1.5em; }

h1 { font-size: 24px; margin: 0; letter-spacing: -0.02em; }

/* 버튼·입력칸 */
button { font: inherit; cursor: pointer; }
input {
  width: 100%;
  font: inherit;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
}
input:focus { outline: 2px solid var(--primary); border-color: transparent; }
.primary {
  width: 100%;
  margin-top: 10px;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}
.primary:active { opacity: .85; }
.link { background: none; border: none; color: var(--muted); padding: 8px; }
.icon-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--card);
  color: var(--text);
  font-size: 20px;
  box-shadow: var(--shadow);
}

/* 로그인 화면 */
.login { text-align: center; padding-top: calc(env(safe-area-inset-top) + 80px); }
.login-icon { width: 72px; height: 72px; border-radius: 18px; }
.login h1 { margin-top: 12px; }
.login form { margin-top: 28px; text-align: left; }

/* 상단 */
.topbar { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 16px; }

/* 탭 */
.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 14px;
  background: var(--line);
  border-radius: 12px;
}
.tab {
  flex: 1;
  padding: 8px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-weight: 600;
}
.tab.active { background: var(--card); color: var(--text); box-shadow: var(--shadow); }

/* 카드 */
.card {
  background: var(--card);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.hint { background: var(--primary-soft); box-shadow: none; }
.hint p { margin: 6px 0 0; font-size: 14px; }

/* 브리핑 한 줄씩 */
.briefing .title { font-size: 18px; font-weight: 700; margin-bottom: 10px; }
.briefing .meta { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.line { padding: 7px 10px; border-radius: 10px; margin: 4px 0; }
.line.event { padding-left: 0; }
.line.warn { background: var(--warn-soft); }
.line.focus { background: var(--focus-soft); }
.line.todo { background: var(--ok-soft); }

/* 지난 브리핑 목록 */
.history-item { cursor: pointer; }
.history-item .head { display: flex; justify-content: space-between; align-items: center; }
.history-item .date { font-weight: 600; }
.history-item .preview { color: var(--muted); font-size: 14px; margin-top: 2px; }
.history-item .full { margin-top: 10px; }

/* 알림 설정 카드 */
.push-card { margin-top: 20px; }
.push-head { display: flex; justify-content: space-between; align-items: center; }
.push-card p { margin: 6px 0 0; }
.push-actions .primary { margin-top: 12px; }
.secondary {
  width: 100%;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}

.footer { text-align: center; margin-top: 24px; }
