:root {
    color-scheme: light;
    font-family: Pretendard, "Noto Sans KR", system-ui, sans-serif;
    color: #18211b;
    background: #f4f7f4;
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: #176b3a; }
button, input, select { font: inherit; }
.shell { width: min(1180px, calc(100% - 32px)); margin: 40px auto; }
.wide-shell { width: min(1440px, calc(100% - 32px)); }
.login-shell { width: min(420px, calc(100% - 32px)); min-height: 100vh; margin: 0 auto; display: grid; place-items: center; }
.login-shell .card { width: 100%; }
.card { background: #fff; border: 1px solid #dce5de; border-radius: 14px; padding: 24px; box-shadow: 0 12px 32px rgba(25, 65, 40, .07); }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
h1 { margin: 0 0 8px; font-size: 26px; }
h2 { margin: 0 0 16px; font-size: 20px; }
p { line-height: 1.6; }
.muted { color: #65726a; }
.field { display: grid; gap: 7px; margin: 14px 0; }
input, select { min-height: 40px; border: 1px solid #bcc9bf; border-radius: 8px; padding: 8px 10px; background: #fff; }
button, .button { min-height: 40px; border: 0; border-radius: 8px; padding: 9px 14px; background: #176b3a; color: #fff; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
button.secondary, .button.secondary { background: #e7eee9; color: #1f3828; }
button.danger { background: #a83232; }
.notice { border-radius: 8px; padding: 11px 13px; margin: 14px 0; }
.notice.error { background: #fdeaea; color: #8a2020; }
.notice.success { background: #e5f5e9; color: #195d2c; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.account-list { margin-top: 18px; }
.search-form { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.search-form .field { margin: 0; }
.search-field { flex: 1 1 320px; }
.status-field { flex: 0 0 150px; }
.result-count { margin: 16px 0 0; color: #526059; }
.pagination { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 18px; }
.empty { padding: 36px; text-align: center; color: #65726a; }
.row-actions { display: flex; gap: 6px; align-items: center; }
.row-actions form { margin: 0; }
dialog { width: min(520px, calc(100% - 32px)); border: 1px solid #dce5de; border-radius: 14px; padding: 24px; color: inherit; }
dialog::backdrop { background: rgba(12, 24, 16, .48); }
.dialog-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.dialog-header h2 { margin: 0; }
.template-links { margin: 12px 0; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
.subscriber-table { width: 100%; max-width: 100%; table-layout: fixed; }
.subscriber-table th:nth-child(1) { width: 5.5%; }
.subscriber-table th:nth-child(2) { width: 19%; }
.subscriber-table th:nth-child(3) { width: 12%; }
.subscriber-table th:nth-child(4) { width: 7%; }
.subscriber-table th:nth-child(5) { width: 17%; }
.subscriber-table th:nth-child(6) { width: 11%; }
.subscriber-table th:nth-child(7) { width: 16%; }
.subscriber-table th:nth-child(8) { width: 12.5%; }
.subscriber-table th, .subscriber-table td { white-space: normal; overflow-wrap: anywhere; }
.subscriber-table .row-actions { flex-wrap: wrap; }
th, td { text-align: left; border-bottom: 1px solid #e2e8e3; padding: 12px 8px; vertical-align: top; white-space: nowrap; }
th { color: #526059; font-size: 13px; }
.inline-form { display: inline-flex; gap: 6px; align-items: center; margin: 2px; }
.inline-form input, .inline-form select, .inline-form button { min-height: 34px; padding: 6px 9px; }
.badge { display: inline-block; border-radius: 999px; padding: 4px 8px; font-size: 12px; background: #e7eee9; }
.badge.off { background: #f3dddd; color: #7d2525; }
@media (max-width: 720px) { .topbar { align-items: flex-start; flex-direction: column; } }
