:root{--bg:#f8f6fb;--surface:#fff;--surface-soft:#fbf9fd;--text:#2f2936;--muted:#7b7184;--line:#e8e1ec;--primary:#8f6aa8;--primary-dark:#77558f;--primary-soft:#f1e9f6;--rose:#c78398;--danger:#b95766;--danger-soft:#fff2f4;--shadow:0 12px 34px rgba(74,55,86,.08);--shadow-sm:0 5px 18px rgba(74,55,86,.07)}
*{box-sizing:border-box}html{background:var(--bg)}body{margin:0;background:linear-gradient(180deg,#faf8fc 0,#f7f5f9 100%);color:var(--text);font-family:-apple-system,BlinkMacSystemFont,"Noto Sans KR","Apple SD Gothic Neo",sans-serif;min-height:100vh}header{min-height:70px;background:rgba(255,255,255,.94);border-bottom:1px solid var(--line);box-shadow:0 2px 12px rgba(67,48,78,.04);display:flex;align-items:center;justify-content:space-between;padding:0 28px;position:sticky;top:0;z-index:30;backdrop-filter:blur(10px)}.brand{display:flex;align-items:center;gap:11px;font-size:18px;font-weight:800;letter-spacing:-.4px}.brandmark{width:34px;height:34px;border-radius:11px;background:linear-gradient(135deg,#b48ac5,#d9a5b4);box-shadow:0 5px 14px rgba(143,106,168,.22);display:grid;place-items:center;color:#fff;font-size:16px}nav{display:flex;gap:8px;align-items:center}nav a{color:#665c6d;text-decoration:none;font-weight:700;padding:10px 13px;border-radius:10px;transition:.18s}nav a:hover{background:var(--primary-soft);color:var(--primary-dark)}nav form{margin:0 0 0 5px}main{padding:30px 28px 44px;max-width:100%;margin:auto}h1{margin:0 0 18px;font-size:28px;letter-spacing:-.8px}p{line-height:1.6}.card{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:22px;margin-bottom:20px;box-shadow:var(--shadow-sm)}.narrow{max-width:500px;margin:58px auto}.narrow h1{text-align:center}.narrow label{display:block;margin:17px 0 0;font-weight:750;color:#514858}.narrow input,.rowform input,.search input{width:100%;padding:12px 14px;border:1px solid #dcd4e1;border-radius:10px;margin-top:7px;background:#fff;color:var(--text);font:inherit;outline:none;transition:border-color .18s,box-shadow .18s}.narrow input:focus,.rowform input:focus,.search input:focus{border-color:#aa86bf;box-shadow:0 0 0 4px rgba(143,106,168,.10)}button,.btn{border:1px solid #ddd4e2;background:#fff;border-radius:10px;padding:10px 16px;min-height:40px;cursor:pointer;text-decoration:none;color:#514858;display:inline-flex;align-items:center;justify-content:center;font:inherit;font-weight:750;transition:.18s;box-shadow:0 2px 7px rgba(67,48,78,.03)}button:hover,.btn:hover{transform:translateY(-1px);border-color:#cbbbd4;background:#fcfafd}.primary{background:linear-gradient(135deg,#9570ad,#86619f);color:#fff;border-color:#8c68a4;box-shadow:0 7px 16px rgba(143,106,168,.20)}.primary:hover{background:linear-gradient(135deg,#8964a2,#76518f);color:#fff}.danger{color:var(--danger);border-color:#efcbd1;background:var(--danger-soft)}.danger:hover{background:#fde8ec;border-color:#e8b9c2}.titlebar{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:16px}.titlebar h1{margin-bottom:0}.titlebar p{margin:6px 0 0;color:var(--muted)}.search{display:flex;align-items:center;gap:12px;max-width:620px;margin:0 0 20px}.search input{margin:0;min-height:42px}.search button{flex:0 0 auto;padding-left:20px;padding-right:20px}.tablewrap{overflow:auto;background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow-sm)}table{border-collapse:separate;border-spacing:0;width:100%;min-width:700px}th,td{border-right:1px solid #e5dfe8;border-bottom:1px solid #e5dfe8;padding:10px 11px;text-align:center;white-space:nowrap}th:last-child,td:last-child{border-right:0}tbody tr:last-child td,tbody tr:last-child th{border-bottom:0}thead th{background:#f3eef6;color:#55475f;font-weight:800}tbody tr:hover td,tbody tr:hover th{background:#fcfafd}.sheet{width:max-content;min-width:100%}.sheet input{width:78px;border:1px solid transparent;border-radius:7px;background:transparent;text-align:center;font:inherit;padding:6px}.sheet input:hover{background:#fff;border-color:#e1d9e6}.sheet input:focus{outline:none;border-color:#a883bd;box-shadow:0 0 0 3px rgba(143,106,168,.10);background:#fff}.auto{font-weight:850;color:#73518b;background:#f5eef9!important}#total th,#total td{background:#eee6f2!important;font-weight:850}.inline{display:inline-flex;margin-left:8px}.table-actions{display:flex;align-items:center;justify-content:center;gap:10px}.actions{display:flex;justify-content:flex-end;align-items:center;gap:12px;margin-top:20px}.sticky{position:sticky;bottom:12px;padding:10px 0}.cards{display:flex;gap:18px;flex-wrap:wrap}.cards .card{min-width:240px}.cards strong{display:block;font-size:34px;margin-top:10px;color:var(--primary-dark)}.rowform{display:flex;align-items:center;gap:12px}.rowform input{margin:0}.empty{padding:28px!important;color:var(--muted)}
/* login */
.login-page{min-height:calc(100vh - 70px);display:grid;place-items:center;padding:28px 16px}.login-shell{width:min(920px,100%);display:grid;grid-template-columns:1.05fr .95fr;background:#fff;border:1px solid var(--line);border-radius:24px;overflow:hidden;box-shadow:0 24px 65px rgba(74,55,86,.12)}.login-visual{padding:56px 48px;background:linear-gradient(145deg,#eee3f4 0%,#f7e9ee 54%,#faf7fb 100%);display:flex;flex-direction:column;justify-content:center;min-height:500px}.login-symbol{width:62px;height:62px;border-radius:20px;background:linear-gradient(135deg,#9d76b3,#d09aaa);display:grid;place-items:center;color:#fff;font-size:28px;box-shadow:0 12px 25px rgba(143,106,168,.24);margin-bottom:26px}.login-visual h2{font-size:32px;line-height:1.25;margin:0 0 13px;letter-spacing:-1px}.login-visual p{margin:0;color:#74687b;font-size:15px}.login-form{padding:54px 48px;display:flex;flex-direction:column;justify-content:center}.login-form h1{text-align:left;margin-bottom:8px}.login-sub{color:var(--muted);margin:0 0 24px}.login-form label{display:block;margin:16px 0 0;font-weight:750;color:#514858}.login-form input{width:100%;padding:13px 14px;border:1px solid #dcd4e1;border-radius:11px;margin-top:7px;font:inherit;outline:none}.login-form input:focus{border-color:#a883bd;box-shadow:0 0 0 4px rgba(143,106,168,.10)}.login-form .primary{width:100%;margin-top:24px;min-height:46px;font-size:15px}.login-foot{margin-top:18px;text-align:center;color:#9a909f;font-size:12px}
@media(max-width:800px){header{height:auto;align-items:flex-start;gap:12px;padding:14px 16px;flex-direction:column}nav{width:100%;flex-wrap:wrap;gap:6px}nav a{padding:9px 10px}nav form{margin-left:auto}main{padding:18px 12px 34px}.narrow{margin:20px auto}.rowform{flex-direction:column;align-items:stretch}.titlebar{align-items:flex-start}.search{max-width:none}.login-page{padding:16px 10px}.login-shell{grid-template-columns:1fr;border-radius:18px}.login-visual{display:none}.login-form{padding:36px 24px}.table-actions{gap:8px}.cards{gap:10px}}
@media(max-width:520px){h1{font-size:24px}.titlebar{gap:12px}.search{gap:8px}.search button{padding-left:15px;padding-right:15px}.actions{gap:10px}.btn,button{padding:9px 13px}.inline{margin-left:6px}}

/* v1.2 attendance list */
.attendance-search{max-width:none;gap:10px}.attendance-search input{flex:0 1 310px;width:310px}.attendance-search .btn,.attendance-search button{flex:0 0 auto}.attendance-list-wrap{max-width:100%}.attendance-list{min-width:560px}.attendance-list th,.attendance-list td{padding:13px 16px}.clickable-row{cursor:pointer;transition:background .16s,box-shadow .16s}.clickable-row:hover td{background:#faf5fc}.clickable-row:focus{outline:3px solid rgba(143,106,168,.18);outline-offset:-3px}
/* v1.2 compact sheet - reference spreadsheet palette */
.sheet-wrap{border-radius:8px}.compact-sheet{font-size:13px}.compact-sheet th,.compact-sheet td{padding:3px 4px;height:31px;border-color:#a9a9a9}.compact-sheet thead th{background:#f1f1f1;color:#171717;line-height:1.15}.compact-sheet .col-dept{min-width:58px}.compact-sheet .col-roster{min-width:82px}.compact-sheet th:not(.col-dept):not(.col-roster){min-width:54px}.compact-sheet .header-ratio{min-width:76px!important;background:#fff2cc!important}.compact-sheet .header-orange,.compact-sheet .header-orange-sub{background:#f4b183!important;color:#171717}.compact-sheet .header-attendance{background:#a9d18e!important;color:#171717}.compact-sheet .header-attendance-sub{background:#e2f0d9!important;color:#171717}.compact-sheet input{width:48px;min-width:48px;padding:3px 2px;border-radius:4px}.compact-sheet .roster-input{width:72px;min-width:72px}.compact-sheet .roster-cell{min-width:82px}.compact-sheet .auto{padding-left:4px;padding-right:4px;color:#0047ff;background:#fff!important;font-weight:800}.compact-sheet #total th,.compact-sheet #total td{background:#e7e7e7!important;color:#0047ff;font-weight:850}.compact-sheet #total th{color:#111}.edit-actions{gap:10px}.edit-actions .danger{margin-left:0}
@media(max-width:800px){.attendance-search{flex-wrap:wrap}.attendance-search input{flex:1 1 260px;width:auto}.compact-sheet{font-size:12px}}


/* v1.3 attendance list / modal / sorting */
.attendance-list{min-width:760px}.attendance-list th,.attendance-list td{font-size:inherit}
.sort-link{display:flex;align-items:center;justify-content:center;gap:6px;color:inherit;text-decoration:none;width:100%;height:100%}.sort-link:hover{color:var(--primary-dark)}.sort-mark{font-size:10px;color:var(--primary)}
.modal-backdrop{position:fixed;inset:0;background:rgba(43,34,49,.38);display:none;align-items:center;justify-content:center;padding:20px;z-index:100;backdrop-filter:blur(3px)}.modal-backdrop.show{display:flex}.modal-card{width:min(520px,100%);max-height:calc(100vh - 40px);overflow:auto;background:#fff;border:1px solid var(--line);border-radius:22px;box-shadow:0 28px 80px rgba(55,39,65,.22);padding:26px}.modal-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:18px}.modal-head h2{margin:0;font-size:23px;letter-spacing:-.6px}.modal-head p{margin:6px 0 0;color:var(--muted);font-size:14px}.modal-close{border:0;box-shadow:none;background:#f7f3f8;width:38px;height:38px;min-height:38px;padding:0;border-radius:12px;font-size:24px;color:#766b7d}.modal-form{display:grid;grid-template-columns:1fr 1fr;gap:15px 14px}.modal-form label{display:block;font-weight:750;color:#514858}.modal-form input{width:100%;padding:12px 13px;border:1px solid #dcd4e1;border-radius:10px;margin-top:7px;background:#fff;color:var(--text);font:inherit;outline:none}.modal-form input:focus{border-color:#aa86bf;box-shadow:0 0 0 4px rgba(143,106,168,.10)}.modal-form .actions{grid-column:1/-1;margin-top:5px}
@media(max-width:600px){.modal-card{padding:21px;border-radius:18px}.modal-form{grid-template-columns:1fr}.modal-form .actions{grid-column:1}.attendance-list{min-width:680px}}

/* v1.4 attendance summary / info edit */
.title-actions{display:flex;align-items:center;gap:10px}.summary-sheet{min-width:1450px;font-size:13px}.summary-sheet th,.summary-sheet td{padding:8px 7px}.summary-sheet thead th{background:#e7edf1;color:#111;border-color:#aeb6bb}.summary-sheet thead .h-ratio{background:#d9e4ec}.summary-sheet thead .h-orange{background:#f4b183}.summary-sheet thead .h-yellow{background:#fff200}.summary-sheet thead .h-attendance{background:#ffe699}.summary-sheet .sort-link{color:inherit;text-decoration:none;display:block}.summary-sheet .sort-mark{font-size:10px;margin-left:3px}.summary-sheet .grouped{padding:0}.summary-sheet .grouped>div{display:grid;grid-template-columns:1fr 1fr;border-top:1px solid #aeb6bb;margin-top:6px}.summary-sheet .grouped>div a{color:inherit;text-decoration:none;padding:5px 8px}.summary-sheet .grouped>div a+a{border-left:1px solid #aeb6bb}.summary-sheet .split-cell{padding:0;display:grid;grid-template-columns:1fr 1fr}.summary-sheet .split-cell span{padding:8px 7px}.summary-sheet .split-cell span+span{border-left:1px solid #e5dfe8}.summary-sheet .rate-val{font-weight:800;color:#0047ff}.summary-sheet tbody tr:hover td{background:#fffaf2}.summary-sheet th:nth-child(4),.summary-sheet td:nth-child(4){min-width:76px}
/* v1.5 compact year/month filters */
.filter-search{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.filter-search select{width:92px;flex:0 0 92px;padding:10px 30px 10px 10px;border:1px solid #dcd4e1;border-radius:10px;background:#fff;color:var(--text);font:inherit;min-height:42px}
.filter-search #filterMonth{width:76px;flex-basis:76px}
.filter-search .attendance-keyword{width:170px;flex:0 0 170px}
@media(max-width:800px){.filter-search select,.filter-search #filterMonth{flex:0 0 auto}.filter-search .attendance-keyword{width:160px;flex:1 1 160px}}

/* v1.6 compact attendance list */
.filter-search #filterYear{width:86px;flex:0 0 86px;min-width:86px}
.filter-search #filterMonth{width:68px;flex:0 0 68px;min-width:68px}
.attendance-list-wrap .summary-sheet{min-width:1120px;width:max-content;font-size:12px}
.attendance-list-wrap .summary-sheet th,.attendance-list-wrap .summary-sheet td{padding:6px 5px;min-width:52px}
.attendance-list-wrap .summary-sheet th:nth-child(1),.attendance-list-wrap .summary-sheet td:nth-child(1){min-width:72px}
.attendance-list-wrap .summary-sheet th:nth-child(2),.attendance-list-wrap .summary-sheet td:nth-child(2){min-width:58px}
.attendance-list-wrap .summary-sheet th:nth-child(3),.attendance-list-wrap .summary-sheet td:nth-child(3){min-width:58px}
.attendance-list-wrap .summary-sheet th:nth-child(4),.attendance-list-wrap .summary-sheet td:nth-child(4){min-width:72px}
.attendance-list-wrap .summary-sheet th:nth-child(8),.attendance-list-wrap .summary-sheet td:nth-child(8),
.attendance-list-wrap .summary-sheet th:nth-child(10),.attendance-list-wrap .summary-sheet td:nth-child(10),
.attendance-list-wrap .summary-sheet th:nth-child(13),.attendance-list-wrap .summary-sheet td:nth-child(13){min-width:82px}
.attendance-list-wrap .summary-sheet .grouped{min-width:88px}
.attendance-list-wrap .summary-sheet .grouped>div a{padding:4px 5px}
.attendance-list-wrap .summary-sheet .split-cell span{padding:6px 5px}

/* v1.6 compact attendance list */
.filter-search #filterYear{width:86px;flex:0 0 86px;min-width:86px}
.filter-search #filterMonth{width:68px;flex:0 0 68px;min-width:68px}
.attendance-list-wrap .summary-sheet{min-width:1120px;width:max-content;font-size:12px}
.attendance-list-wrap .summary-sheet th,.attendance-list-wrap .summary-sheet td{padding:6px 5px;min-width:52px}
.attendance-list-wrap .summary-sheet th:nth-child(1),.attendance-list-wrap .summary-sheet td:nth-child(1){min-width:72px}
.attendance-list-wrap .summary-sheet th:nth-child(2),.attendance-list-wrap .summary-sheet td:nth-child(2){min-width:58px}
.attendance-list-wrap .summary-sheet th:nth-child(3),.attendance-list-wrap .summary-sheet td:nth-child(3){min-width:58px}
.attendance-list-wrap .summary-sheet th:nth-child(4),.attendance-list-wrap .summary-sheet td:nth-child(4){min-width:72px}
.attendance-list-wrap .summary-sheet th:nth-child(8),.attendance-list-wrap .summary-sheet td:nth-child(8),.attendance-list-wrap .summary-sheet th:nth-child(10),.attendance-list-wrap .summary-sheet td:nth-child(10),.attendance-list-wrap .summary-sheet th:nth-child(13),.attendance-list-wrap .summary-sheet td:nth-child(13){min-width:82px}
.attendance-list-wrap .summary-sheet .grouped{min-width:88px}
.attendance-list-wrap .summary-sheet .grouped>div a{padding:4px 5px}
.attendance-list-wrap .summary-sheet .split-cell span{padding:6px 5px}

/* v1.6 compact attendance list */
.filter-search #filterYear{width:86px;flex:0 0 86px;min-width:86px}
.filter-search #filterMonth{width:68px;flex:0 0 68px;min-width:68px}
.attendance-list-wrap .summary-sheet{min-width:1120px;width:max-content;font-size:12px}
.attendance-list-wrap .summary-sheet th,.attendance-list-wrap .summary-sheet td{padding:6px 5px;min-width:52px}
.attendance-list-wrap .summary-sheet th:nth-child(1),.attendance-list-wrap .summary-sheet td:nth-child(1){min-width:72px}
.attendance-list-wrap .summary-sheet th:nth-child(2),.attendance-list-wrap .summary-sheet td:nth-child(2){min-width:58px}
.attendance-list-wrap .summary-sheet th:nth-child(3),.attendance-list-wrap .summary-sheet td:nth-child(3){min-width:58px}
.attendance-list-wrap .summary-sheet th:nth-child(4),.attendance-list-wrap .summary-sheet td:nth-child(4){min-width:72px}
.attendance-list-wrap .summary-sheet th:nth-child(8),.attendance-list-wrap .summary-sheet td:nth-child(8),.attendance-list-wrap .summary-sheet th:nth-child(10),.attendance-list-wrap .summary-sheet td:nth-child(10),.attendance-list-wrap .summary-sheet th:nth-child(13),.attendance-list-wrap .summary-sheet td:nth-child(13){min-width:82px}
.attendance-list-wrap .summary-sheet .grouped{min-width:88px}
.attendance-list-wrap .summary-sheet .grouped>div a{padding:4px 5px}
.attendance-list-wrap .summary-sheet .split-cell span{padding:6px 5px}

/* v1.7 attendance list layout fix */
.filter-search #filterYear{width:112px;flex:0 0 112px;min-width:112px}
.filter-search #filterMonth{width:88px;flex:0 0 88px;min-width:88px}
.attendance-list-wrap .summary-sheet{width:100%;min-width:1120px;table-layout:auto}
.attendance-list-wrap .summary-sheet th,.attendance-list-wrap .summary-sheet td{padding:6px 5px}

/* v1.8 year display management */
.year-name-wrap{max-width:760px}.year-name-table{min-width:0}.year-name-table th,.year-name-table td{padding:13px 16px}.year-modal{width:min(500px,100%)}.year-modal-form{grid-template-columns:150px 1fr}.year-edit-actions{grid-column:1/-1;display:flex;align-items:center;justify-content:space-between;gap:16px;margin-top:8px}.year-edit-actions-right{display:flex;align-items:center;gap:10px}
@media(max-width:600px){.year-modal-form{grid-template-columns:1fr}.year-edit-actions{grid-column:1;align-items:stretch}.year-edit-actions-right{margin-left:auto}}

/* v1.9 settings search / linked accounts */
.year-search{max-width:none;width:auto;display:flex;gap:8px;align-items:center}.year-search input{width:210px;flex:0 0 210px}.year-search button{flex:0 0 auto}.account-link-wrap{max-width:900px}.account-link-table{min-width:620px}.access-form{margin:0}.access-form button{min-width:82px}.access-form .access-on{background:#f1e9f6;border-color:#bda5cb;color:#77558f}
