/* 업무통합사이트 공용 스타일 (로그인·홈·관리 화면) */
:root {
  --navy: #17233d;
  --navy-2: #24365e;
  --accent: #2a5cc7;
  --accent-dark: #24509f;
  --bg: #f4f6f9;
  --card: #ffffff;
  --border: #e6e9ef;
  --text: #1c2430;
  --muted: #6b7686;
  --danger: #c0352b;
  --ok: #1d8a4e;
  --warn: #b7791f;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Malgun Gothic", "맑은 고딕", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  font-size: 13px; color: #1f2937; background: var(--bg);
}
a { color: var(--accent); }
button, input, select { font-family: inherit; font-size: 13px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 13px; border-radius: 7px; border: 1px solid #d7dce4; font-size: 12.5px; font-weight: 600;
  background: #fff; color: var(--text); cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: #f5f7fb; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-dark); }
.btn.danger { color: var(--danger); border-color: #efc5c1; }
.btn.small { padding: 5px 10px; font-size: 12.5px; }
.btn:disabled { opacity: .55; cursor: default; }

.input {
  width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: #fff;
}
.input:focus { outline: 2px solid #c9d8fb; border-color: var(--accent); }
label.field { display: block; margin-bottom: 14px; }
label.field span { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 5px; }

.msg { font-size: 13px; margin-top: 10px; min-height: 18px; }
.msg.error { color: var(--danger); }
.msg.ok { color: var(--ok); }

/* ---------- 로그인/최초설정 ---------- */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: linear-gradient(160deg, #17233d 0%, #24365e 55%, #2e4a80 100%); }
.auth-card { width: 100%; max-width: 380px; background: #fff; border-radius: 14px; padding: 32px 28px;
  box-shadow: 0 18px 50px rgba(0,0,0,.25); }
.auth-card h1 { font-size: 19px; margin: 0 0 4px; }
.auth-card .sub { color: var(--muted); font-size: 13px; margin-bottom: 24px; }
.auth-card .btn { width: 100%; padding: 11px; font-size: 15px; }
.brand-mark { width: 44px; height: 44px; border-radius: 11px; background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 20px; margin-bottom: 16px; }

/* ---------- 상단바 ---------- */
.topbar { background: var(--navy); color: #fff; }
.topbar-inner { max-width: 1100px; margin: 0 auto; padding: 0 16px; height: 56px;
  display: flex; align-items: center; gap: 12px; }
.topbar .logo { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; font-size: 16px; }
.topbar .logo .mark { width: 30px; height: 30px; border-radius: 8px; background: #fff; color: var(--navy);
  display: flex; align-items: center; justify-content: center; font-size: 15px; }
.topbar .spacer { flex: 1; }
.topbar .who { font-size: 13px; color: #c7d2e6; }
.topbar a.top-link, .topbar button.top-link { color: #dbe4f5; background: none; border: 1px solid #3a4f7a;
  border-radius: 7px; padding: 6px 10px; font-size: 12.5px; text-decoration: none; cursor: pointer; }
.topbar a.top-link:hover, .topbar button.top-link:hover { background: #24365e; }

.page { max-width: 1100px; margin: 0; padding: 0; }
.sh-view .page h2 { font-size: 15px; }
.page h2 { font-size: 18px; margin: 0 0 6px; }
.page .lead { color: var(--muted); margin: 0 0 22px; font-size: 13.5px; }

/* ---------- 업무 카드 ---------- */
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.app-card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 18px;
  text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 10px;
  transition: box-shadow .15s, transform .15s, border-color .15s; }
.app-card:hover { box-shadow: 0 10px 26px rgba(23,35,61,.12); transform: translateY(-2px); border-color: #c4d2ee; }
.app-card .icon { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 24px; }
.app-card h3 { margin: 0; font-size: 17px; }
.app-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.app-card ul { margin: 0; padding-left: 18px; color: #3d4757; font-size: 12.5px; line-height: 1.7; }
.app-card .go { margin-top: auto; color: var(--accent); font-weight: 700; font-size: 13px; }

.notice { background: #fff8e6; border: 1px solid #f1d68c; color: #6b5313; border-radius: 10px; padding: 12px 14px; font-size: 13px; margin-bottom: 18px; }

/* ---------- 관리 화면 ---------- */
.card { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 14px 16px; margin-bottom: 14px; }
.card h3 { margin: 0 0 4px; font-size: 13px; }
.card .hint { color: var(--muted); font-size: 12.5px; margin: 0 0 14px; line-height: 1.6; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.row > * { flex: 1 1 160px; }
.row > .btn { flex: 0 0 auto; }
table.list { width: 100%; border-collapse: collapse; font-size: 13px; }
table.list th, table.list td { text-align: left; padding: 9px 8px; border-bottom: 1px solid #edf0f4; vertical-align: middle; }
table.list th { color: var(--muted); font-weight: 600; font-size: 12px; background: #f8f9fb; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 11.5px; background: #eef2f8; color: #3d4b66; }
.tag.admin { background: #e5edff; color: #2a55b8; }
.tag.off { background: #fbe9e7; color: var(--danger); }
.addr { font-family: Consolas, monospace; font-size: 15px; background: #f3f6fb; border: 1px solid var(--border);
  padding: 10px 12px; border-radius: 8px; word-break: break-all; }
.table-scroll { overflow-x: auto; }
@media (max-width: 640px) {
  .topbar .who { display: none; }
  .page { padding-top: 18px; }
}
