/* 로그인 화면 모양은 LM index.html의 auth-gate 스타일을 옮겼다. */
body { font-family: "Noto Sans KR", system-ui, sans-serif; font-size: 13px; }
.hidden { display: none !important; }
.brand-dot { display: inline-block; width: 12px; height: 12px; border-radius: 4px; background: #315fc5; margin-right: 8px; }

.auth-gate { position: fixed; inset: 0; background: #f2f4f7; display: flex; align-items: center; justify-content: center; z-index: 100; padding: 16px; }
.auth-gate-card { width: 100%; max-width: 380px; background: #fff; border-radius: 16px; padding: 28px; box-shadow: 0 10px 30px rgba(16, 24, 40, .08); }
.auth-gate-brand { display: flex; align-items: center; font-weight: 900; font-size: 18px; margin-bottom: 18px; color: #111827; }
.auth-gate-form h2 { font-size: 16px; font-weight: 800; color: #111827; margin-bottom: 16px; }
.auth-gate-form label { display: block; font-size: 11px; font-weight: 700; color: #475467; margin-top: 12px; }
.auth-gate-form input { display: block; width: 100%; margin-top: 4px; padding: 9px 11px; border: 1px solid #d0d5dd; border-radius: 8px; font-size: 13px; }
.auth-gate-form input:focus { outline: 2px solid #315fc5; outline-offset: 1px; border-color: #315fc5; }
.auth-gate-submit { width: 100%; margin-top: 16px; padding: 10px; border-radius: 8px; background: #315fc5; color: #fff; font-weight: 800; }
.auth-gate-switch { margin-top: 14px; font-size: 11px; color: #667085; text-align: center; }
.auth-gate-switch a { color: #315fc5; font-weight: 700; }
.auth-gate-error { margin-top: 4px; padding: 8px 10px; border-radius: 8px; background: #fef3f2; color: #b42318; font-size: 11px; font-weight: 700; }
.auth-google-divider { display: flex; align-items: center; gap: 8px; margin: 16px 0 10px; color: #98a2b3; font-size: 11px; }
.auth-google-divider::before, .auth-google-divider::after { content: ""; flex: 1; height: 1px; background: #eaecf0; }
.auth-google-button { display: flex; justify-content: center; }
.auth-signup-tabs { display: flex; gap: 6px; margin-top: 12px; }
.auth-signup-tabs button { flex: 1; padding: 8px; border: 1px solid #d0d5dd; border-radius: 8px; font-size: 11px; font-weight: 700; }
.auth-signup-tabs button.active { background: #eef4ff; border-color: #315fc5; color: #315fc5; }
.auth-signup-state .box { margin-top: 10px; padding: 10px; border-radius: 8px; background: #f9fafb; font-size: 12px; }
.auth-signup-state .actions { display: flex; gap: 6px; margin-top: 8px; }
.auth-signup-state .actions button { flex: 1; padding: 8px; border: 1px solid #d0d5dd; border-radius: 8px; font-weight: 700; }
.auth-signup-state .actions button.primary { background: #315fc5; color: #fff; border-color: #315fc5; }

.sidebar { width: 220px; flex-shrink: 0; background: #fff; border-right: 1px solid #eaecf0; display: flex; flex-direction: column; min-height: 100vh; position: sticky; top: 0; height: 100vh; }
.sidebar-brand { display: flex; align-items: center; font-weight: 900; font-size: 17px; padding: 20px 20px 12px; }
.sidebar-company { margin: 0 14px 6px; padding: 8px 10px; border: 1px solid #eaecf0; border-radius: 8px; font-weight: 700; color: #344054; }
#menu { flex: 1; padding: 0 10px; }
#menu .menu-group { font-size: 11px; color: #98a2b3; font-weight: 700; margin: 16px 10px 6px; }
#menu a { display: block; padding: 9px 12px; border-radius: 8px; color: #344054; font-weight: 500; }
#menu a:hover { background: #f2f4f7; }
#menu a.active { background: #eef4ff; color: #315fc5; font-weight: 700; }
.sidebar-user { border-top: 1px solid #eaecf0; padding: 14px 20px; display: flex; flex-direction: column; gap: 6px; }
.sidebar-user a, .sidebar-user button { color: #667085; text-align: left; }

.import-warning { background: #fef3f2; color: #b42318; font-weight: 700; padding: 10px 24px; border-bottom: 1px solid #fecdca; }
.page-title { font-size: 20px; font-weight: 900; color: #101828; margin-bottom: 14px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: #fff; border: 1px solid #eaecf0; border-radius: 12px; padding: 12px; margin-bottom: 12px; }
.toolbar input, .toolbar select { border: 1px solid #d0d5dd; border-radius: 8px; padding: 6px 9px; }
.btn { border: 1px solid #d0d5dd; background: #fff; border-radius: 8px; padding: 6px 12px; font-weight: 700; }
.btn-primary { background: #315fc5; border-color: #315fc5; color: #fff; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.tabs { display: flex; gap: 4px; }
.tabs button { padding: 6px 14px; border-radius: 8px; font-weight: 700; color: #667085; }
.tabs button.active { background: #101828; color: #fff; }

.table-wrap { background: #fff; border: 1px solid #eaecf0; border-radius: 12px; overflow: auto; max-height: calc(100vh - 210px); }
table.data-table { width: 100%; border-collapse: collapse; white-space: nowrap; }
table.data-table th { position: sticky; top: 0; background: #f9fafb; font-size: 12px; color: #475467; text-align: left; padding: 9px 10px; border-bottom: 1px solid #eaecf0; z-index: 1; }
table.data-table td { padding: 8px 10px; border-bottom: 1px solid #f2f4f7; }
table.data-table td.num, table.data-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data-table tfoot td { position: sticky; bottom: 0; background: #f9fafb; font-weight: 800; border-top: 1px solid #eaecf0; }
table.data-table tr.muted td { color: #98a2b3; text-decoration: line-through; }
.site-chip { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; cursor: pointer; border: 1px solid transparent; }
.site-MANUAL { background: #eef4ff; color: #315fc5; }
.site-RULE { background: #ecfdf3; color: #067647; }
.site-UNASSIGNED { background: #f2f4f7; color: #667085; }
.site-CONFLICT { background: #fffaeb; color: #b54708; }
.site-RECHECK { background: #fef3f2; color: #b42318; }
.memo-input { width: 160px; border: 1px solid transparent; border-radius: 6px; padding: 3px 6px; }
.memo-input:hover, .memo-input:focus { border-color: #d0d5dd; }
.memo-input.dirty { background: #fffaeb; }

.dialog-backdrop { position: fixed; inset: 0; background: rgba(16, 24, 40, .4); display: flex; align-items: center; justify-content: center; z-index: 200; padding: 16px; }
.dialog { background: #fff; border-radius: 14px; padding: 20px; width: 100%; max-width: 460px; max-height: 90vh; overflow: auto; }
.dialog h3 { font-size: 15px; font-weight: 800; margin-bottom: 10px; }
.dialog .actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 16px; }
.dialog input, .dialog select { border: 1px solid #d0d5dd; border-radius: 8px; padding: 6px 9px; }
.toast-root { position: fixed; right: 16px; bottom: 16px; display: flex; flex-direction: column; gap: 6px; z-index: 300; }
.toast { background: #101828; color: #fff; padding: 10px 14px; border-radius: 10px; font-weight: 700; }
.summary-bar { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; background: #fff; border: 1px solid #eaecf0; border-top: 0; border-radius: 0 0 12px 12px; font-size: 12px; color: #475467; }
.summary-totals { display: flex; gap: 16px; flex-wrap: wrap; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.page-head .page-title { margin: 0 6px 0 0; }
.unit-group { display: inline-flex; background: #f2f4f7; border-radius: 8px; padding: 2px; }
.unit-group button { padding: 4px 10px; border-radius: 6px; font-weight: 700; color: #667085; }
.unit-group button.active { background: #fff; color: #101828; box-shadow: 0 1px 2px rgba(16,24,40,.08); }
.amount-in { color: #067647; font-weight: 700; }
.sub-line { display: block; font-size: 11px; color: #98a2b3; }
.stat-boxes { display: flex; gap: 12px; margin-bottom: 12px; }
.stat-box { flex: 1; background: #fff; border: 1px solid #eaecf0; border-radius: 12px; padding: 14px 16px; }
.stat-box p { font-size: 12px; color: #667085; }
.stat-box b { font-size: 20px; font-weight: 900; color: #101828; }
.card { background: #fff; border: 1px solid #eaecf0; border-radius: 12px; padding: 16px; margin-bottom: 12px; }
