/* 로그인·설정 화면 공통 스타일. 라이트/다크 모드는 기기 설정을 따른다. */
:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #eceef2;
  --text: #16181d;
  --text-2: #5d6370;
  --line: #dcdfe5;
  --accent: #2f6fec;
  --accent-text: #ffffff;
  --accent-soft: rgba(47, 111, 236, .12);
  --danger: #d33a2c;
  --ok: #1f9d55;
  --shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 4px 16px rgba(0, 0, 0, .06);
  --radius: 12px;
  --font: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Segoe UI", "Malgun Gothic", "Noto Sans KR", Roboto, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101114;
    --surface: #1a1c21;
    --surface-2: #24272e;
    --text: #eceef2;
    --text-2: #9aa1ae;
    --line: #2e323a;
    --accent: #5b8cff;
    --accent-text: #0b1020;
    --accent-soft: rgba(91, 140, 255, .18);
    --danger: #ff6b5e;
    --ok: #4ccb82;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 16px rgba(0, 0, 0, .3);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }
a { color: var(--accent); }
button, input, select { font: inherit; color: inherit; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}
.btn > * + * { margin-left: 6px; }
.btn:hover { background: var(--surface-2); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:focus-visible, .tile:focus-visible, select:focus-visible, input:focus-visible, .folder-row:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

input[type=password], input[type=text], input[type=time], select {
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
select { padding-right: 32px; }

/* ---- 로그인 ---- */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}
.login-card {
  width: 100%;
  max-width: 360px;
  padding: 32px 28px 28px;
  background: var(--surface);
  border-radius: 18px;
  box-shadow: var(--shadow);
  text-align: center;
}
.login-card img { width: 64px; height: 64px; border-radius: 14px; }
.login-card h1 { margin: 12px 0 4px; font-size: 22px; }
.login-card p { margin: 0 0 20px; color: var(--text-2); }
.login-card form { display: flex; flex-direction: column; }
.login-card input { background: var(--bg); width: 100%; font-size: 17px; margin-bottom: 12px; text-align: center; }
.login-card .btn { width: 100%; min-height: 46px; font-size: 16px; }
.login-error { margin: -4px 0 12px; color: var(--danger); font-size: 14px; }
.login-note { margin: 16px 0 0 !important; font-size: 13px; }
