* { box-sizing: border-box; }
body { margin: 0; font-family: 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif;
       background: #f4f6f9; color: #222; font-size: 14px; }
main { max-width: 1400px; margin: 0 auto; padding: 16px 20px 60px; }
a { color: #1a5dc8; text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 10px 0 16px; }
h2 { font-size: 15px; margin: 22px 0 8px; color: #333; }

.topnav { display: flex; align-items: center; gap: 18px; background: #1e2a3a;
          color: #fff; padding: 0 22px; height: 48px; }
.topnav .brand { font-weight: bold; margin-right: 8px; }
.topnav a { color: #b9c6d8; padding: 14px 2px; }
.topnav a.on { color: #fff; border-bottom: 2px solid #5aa2ff; }
.topnav .spacer { flex: 1; }
.topnav .who { color: #8fa3bb; }

.login-box { max-width: 340px; margin: 90px auto; background: #fff; padding: 30px;
             border-radius: 10px; box-shadow: 0 2px 12px rgba(0,0,0,.08); }
.login-box h1 { margin: 0; }
.login-box .sub { color: #888; margin-top: 4px; }
.login-box label { display: block; margin: 14px 0 4px; color: #555; }
.login-box input, .login-box select { width: 100%; padding: 9px; border: 1px solid #ccd;
                                      border-radius: 6px; font-size: 14px; }
.login-box button { width: 100%; margin-top: 18px; }
.err { color: #c0392b; }

button { background: #2563c4; color: #fff; border: 0; padding: 8px 16px;
         border-radius: 6px; cursor: pointer; font-size: 13px; }
button:hover { background: #1a4fa5; }
button.x { background: none; color: #b55; padding: 0 6px; font-size: 12px; }
input, select, textarea { padding: 7px 9px; border: 1px solid #ccd; border-radius: 6px;
                          font-size: 13px; font-family: inherit; }
textarea { width: 100%; }

.cards { display: flex; gap: 14px; flex-wrap: wrap; }
.card { background: #fff; border-radius: 10px; padding: 16px 22px; min-width: 150px;
        box-shadow: 0 1px 4px rgba(0,0,0,.06); color: inherit; }
.card:hover { text-decoration: none; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.card .num { font-size: 28px; font-weight: bold; color: #1e2a3a; }
.card .lbl { color: #777; margin-top: 2px; }

.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
        gap: 22px; align-items: start; }
section { background: #fff; border-radius: 10px; padding: 6px 18px 18px;
          box-shadow: 0 1px 4px rgba(0,0,0,.06); }

.tbl { border-collapse: collapse; width: 100%; }
.tbl td, .tbl th { padding: 6px 8px; border-bottom: 1px solid #eef1f5; text-align: left; }
.tbl th { background: #f7f9fc; color: #555; font-weight: 600; white-space: nowrap; }
.tbl.wide { background: #fff; border-radius: 10px; overflow: hidden;
            box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.tbl.kv td:first-child { color: #777; white-space: nowrap; width: 110px; }
.tbl .r { text-align: right; }
.tbl .c { text-align: center; }
.tbl tr.dim td { opacity: .55; }
.tbl.small td { padding: 3px 8px; }
.mono { font-family: Consolas, monospace; }
.small { font-size: 12px; }
.muted { color: #999; }
.pre { white-space: pre-wrap; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px;
         background: #eee; color: #555; }
.badge.ok { background: #e2f4e5; color: #1d7a35; }
.badge.info { background: #e4edfb; color: #1a5dc8; }
.badge.warn { background: #fdf0d8; color: #a06a00; }
.badge.bad { background: #fbe2e0; color: #b33a2e; }
.badge.muted { background: #eee; color: #777; }
.badge.owner-김익 { background: #e4edfb; color: #1a5dc8; }
.badge.owner-김은혜 { background: #f4e4fb; color: #8a2ec0; }
.badge.owner-법인 { background: #e2f4e5; color: #1d7a35; }

.filters { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chip { background: #fff; border: 1px solid #dde3ea; border-radius: 16px;
        padding: 5px 13px; color: #445; font-size: 13px; }
.chip.on { border-color: #2563c4; color: #2563c4; font-weight: bold; }
.chip:hover { text-decoration: none; border-color: #2563c4; }

.bar-td { width: 40%; }
.bar { height: 10px; background: #5aa2ff; border-radius: 5px; min-width: 2px; }

.banner { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; }
.banner.warn { background: #fdf0d8; color: #7a5200; }

.memo { border-top: 1px solid #eef1f5; padding: 9px 0; }
.memo-head { display: flex; gap: 10px; align-items: baseline; margin-bottom: 3px; }
.memo-head form.inline { margin-left: auto; }
.issue-list { padding-left: 4px; list-style: none; margin: 6px 0; }
.issue-list li { margin: 5px 0; }

.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
               margin: 8px 0; }
.mk-card { border: 1px solid #e6eaf0; border-radius: 8px; margin: 10px 0;
           overflow: hidden; }
.mk-head { display: flex; gap: 10px; align-items: baseline; padding: 8px 12px;
           background: #f7f9fc; }

.scroll-x { overflow-x: auto; background: #fff; border-radius: 10px;
            box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.matrix th, .matrix td { white-space: nowrap; }
.matrix .sticky { position: sticky; left: 0; background: #fff; z-index: 1; }
.matrix thead .sticky { background: #f7f9fc; }
.cell-in { background: #e2f4e5; }
.cell-hold { background: #fdf0d8; }
.cell-bad { background: #fbe2e0; }
.mk-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0 14px; }

.master th { white-space: nowrap; }
.master td { vertical-align: top; }
.master .sticky { position: sticky; left: 0; background: #fff; z-index: 2;
                  width: 28px; white-space: nowrap; }
.master .sticky2 { position: sticky; left: 28px; background: #fff; z-index: 2;
                   white-space: nowrap; }
.master thead .sticky, .master thead .sticky2 { background: #f7f9fc; z-index: 3; }
.master tbody tr:hover td { background: #f4f8ff; }
.master tbody tr:hover .sticky, .master tbody tr:hover .sticky2 { background: #f4f8ff; }
.master .addr { max-width: 220px; white-space: normal; }
.acct-cell { min-width: 150px; border-left: 1px solid #eef1f5; }
.acct-cell .fld { padding: 1px 0; line-height: 1.5; }
.acct-cell .fld.bad { color: #b33a2e; }
.acct-cell .fl { color: #999; font-size: 11px; }
.acct-cell .fv { font-size: 12px; word-break: break-all; }
.editable { cursor: text; border-bottom: 1px dashed #cbd5e1; padding: 0 2px;
            border-radius: 2px; }
.editable:hover { background: #fff8e1; }
.editable:focus { outline: none; background: #fffbe6; border-bottom: 1px solid #f0b429; }
.editable.saving { background: #e4edfb; }
.editable.saved { background: #d6f5dd; }
.editable.err { background: #fbe2e0; }
