:root{--navy:#14213d;--blue:#2563eb;--sky:#eff6ff;--ink:#172033;--muted:#667085;--line:#e4e7ec;--surface:#fff;--bg:#f6f7fb;--danger:#b42318;--success:#067647;--shadow:0 10px 30px rgba(20,33,61,.07)}
.finance-delete-form{padding-top:0}.finance-delete-form .danger-zone{margin-top:0}
.shell .sidebar{display:flex;flex-direction:column;overflow-y:auto}.sidebar .nav{margin-bottom:20px}.sidebar .user{position:static;margin-top:auto;flex-shrink:0}
.schedule-toolbar{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:14px;margin-bottom:20px}.schedule-month-picker,.schedule-navigation{display:flex;align-items:center;gap:8px}.schedule-month-picker label{margin:0;white-space:nowrap}.schedule-month-picker input{width:170px}.schedule-calendar-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.card.schedule-calendar{padding:0;overflow:hidden}.schedule-calendar-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:16px 18px}.schedule-calendar-heading h2{font-size:20px;margin:0}.schedule-weekdays,.schedule-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr))}.schedule-weekdays{border-top:1px solid var(--line);background:#f8fafc;text-align:center;color:var(--muted);font-size:12px;font-weight:700}.schedule-weekdays span{padding:9px 0}.schedule-weekdays span:first-child,.schedule-weekdays span:last-child{color:#b54708}.schedule-day{min-width:0;height:110px;border-top:1px solid var(--line);border-right:1px solid var(--line);padding:5px}.schedule-day:nth-child(7n){border-right:0}.schedule-day-blank{background:#fafbfd}.schedule-day-add{display:flex;align-items:center;justify-content:space-between;gap:2px;width:100%;padding:2px 4px;margin-bottom:4px;border:0;border-radius:6px;color:var(--ink);background:transparent;font:inherit;font-size:13px;cursor:pointer}.schedule-day-add:hover{background:var(--sky);color:var(--blue)}.schedule-day-add span{font-size:11px;color:var(--muted)}.schedule-today{background:#f5f9ff}.schedule-today time{display:inline-grid;place-items:center;min-width:24px;height:24px;background:var(--blue);color:#fff;border-radius:50%;font-weight:700}.schedule-day-events{max-height:68px;overflow-y:auto;scrollbar-width:thin;display:flex;flex-direction:column;gap:3px}.schedule-event{display:block;width:100%;flex-shrink:0;border:0;border-left:3px solid #6896ef;border-radius:4px;padding:3px 4px;font:inherit;font-size:12px;text-align:left;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;color:#174a9e;background:#edf3ff;cursor:pointer}.schedule-event:hover{background:#dbe8ff}.schedule-event:focus-visible,.schedule-day-add:focus-visible{outline:2px solid var(--blue);outline-offset:-2px}.schedule-footer{display:flex;justify-content:space-between;flex-wrap:wrap;gap:8px;margin-top:14px}.schedule-edit-actions{display:flex;justify-content:space-between;align-items:center;gap:12px}.schedule-edit-actions .modal-actions{margin:0}.schedule-detail-title,.schedule-detail-description{overflow-wrap:anywhere}
@media(max-width:1100px){.schedule-calendar-pair{grid-template-columns:1fr}.schedule-day{height:108px}}
@media(max-width:560px){.schedule-toolbar{align-items:stretch;flex-direction:column}.schedule-month-picker{flex-wrap:wrap}.schedule-month-picker input{flex:1;min-width:120px}.schedule-navigation{justify-content:space-between}.schedule-day{height:98px;padding:3px}.schedule-day-events{max-height:60px}.schedule-event{font-size:11px;padding:3px 2px}.schedule-calendar-heading{padding:13px}.schedule-calendar-heading h2{font-size:18px}.schedule-edit-actions{align-items:stretch;flex-direction:column}.schedule-edit-actions .modal-actions{justify-content:flex-end}}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:Inter,"Noto Sans TC","Microsoft JhengHei",sans-serif;line-height:1.55}a{color:inherit;text-decoration:none}
.shell{display:grid;grid-template-columns:240px 1fr;min-height:100vh}.sidebar{background:var(--navy);color:#fff;padding:28px 18px;position:sticky;top:0;height:100vh}.brand{font-size:19px;font-weight:800;padding:0 12px 25px}.brand small{display:block;color:#9fb0cf;font-size:12px;font-weight:500;margin-top:3px}.nav a{display:block;padding:11px 13px;margin:5px 0;border-radius:9px;color:#cbd5e1}.nav a:hover,.nav a.active{background:#243556;color:#fff}.user{position:absolute;left:18px;right:18px;bottom:22px;border-top:1px solid #334563;padding-top:18px;font-size:14px}.user small{color:#9fb0cf}.logout{background:none;border:0;color:#cbd5e1;padding:8px 0;cursor:pointer}
main{padding:34px 42px;min-width:0}.top,.spread,.actions{display:flex;justify-content:space-between;gap:16px;align-items:center}.top{margin-bottom:26px}.top h1{font-size:27px;margin:0}.muted{color:var(--muted)}.grid{display:grid;gap:18px}.grid-3{grid-template-columns:repeat(3,1fr)}.grid-2{grid-template-columns:repeat(2,1fr)}.card{background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:20px;box-shadow:var(--shadow)}.card-stack{margin-bottom:14px}.stat strong{display:block;font-size:29px;margin-top:5px}.dashboard-stats{display:grid;grid-template-columns:repeat(3,1fr);padding:0;margin-bottom:8px}.dashboard-stat{display:flex;justify-content:space-between;align-items:center;gap:16px;min-width:0;padding:14px 20px;border-right:1px solid var(--line)}.dashboard-stat:last-child{border-right:0}.dashboard-stat strong{font-size:24px;line-height:1}.section-title{display:flex;justify-content:space-between;align-items:center;margin:30px 0 13px}.section-title h2{font-size:18px;margin:0}.btn{display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:9px;background:var(--blue);color:#fff;padding:10px 15px;font-weight:700;cursor:pointer}.btn.light{background:var(--sky);color:#1d4ed8}.btn.danger{background:#fff1f0;color:var(--danger)}.btn.small{font-size:12px;padding:7px 10px}
input,textarea,select{width:100%;border:1px solid #d0d5dd;border-radius:9px;background:#fff;padding:10px 12px;font:inherit;color:inherit}textarea{min-height:100px;resize:vertical}label{display:block;font-size:13px;font-weight:700;margin-bottom:6px}.field{margin-bottom:14px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.badge{display:inline-block;padding:3px 9px;border-radius:999px;background:#f2f4f7;color:#475467;font-size:12px}.badge.high,.badge.overdue{background:#fef3f2;color:#b42318}.badge.active,.badge.completed{background:#ecfdf3;color:#067647}.badge.in_progress,.badge.review{background:#eff6ff;color:#1d4ed8}.progress{width:100%;height:7px;border:0;border-radius:99px;overflow:hidden;background:#eaecf0}.progress::-webkit-progress-bar{background:#eaecf0}.progress::-webkit-progress-value{background:var(--blue)}.progress::-moz-progress-bar{background:var(--blue)}
.list{display:flex;flex-direction:column}.item{display:flex;justify-content:space-between;align-items:center;gap:18px;padding:14px 0;border-bottom:1px solid var(--line)}.item:last-child{border:0}.item h3{font-size:15px;margin:0 0 3px}.item-button{width:100%;background:transparent;border-left:0;border-right:0;border-top:0;color:inherit;font:inherit;text-align:left;cursor:pointer}.item-button:hover{background:#f8fafc}.empty{text-align:center;color:var(--muted);padding:30px}.alert{padding:12px 15px;border-radius:9px;margin-bottom:18px;background:#ecfdf3;color:#067647}.errors{background:#fef3f2;color:#b42318}.errors ul{margin:0;padding-left:20px}.project-card h3{margin:0 0 6px}.project-meta{display:flex;gap:7px;flex-wrap:wrap;margin:13px 0}.project-footer{display:flex;justify-content:space-between;margin-top:10px;font-size:12px;color:var(--muted)}.task-list{padding:0 20px}.task-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:24px;padding:20px 0;border-bottom:1px solid var(--line)}.task-row:last-child{border-bottom:0}.task-summary h3{font-size:16px;margin:0 0 4px}.task-meta{display:flex;align-items:center;gap:8px 16px;flex-wrap:wrap;margin-top:12px}.task-meta-item{font-size:13px;color:var(--muted)}.task-controls{display:flex;align-items:center;gap:10px;padding:10px;background:#f8fafc;border:1px solid var(--line);border-radius:11px}.task-status-form{display:flex;align-items:center;gap:8px}.task-status-form select{width:128px;min-width:128px;padding:7px 30px 7px 10px}.task-delete-form{padding-left:10px;border-left:1px solid var(--line)}.task-detail-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}.task-detail-grid>div{padding:14px;border:1px solid var(--line);border-radius:10px;background:#f8fafc}.task-detail-label{display:block;font-size:12px;color:var(--muted);margin-bottom:4px}.task-detail-description{margin-top:18px}.task-detail-description p{margin:5px 0 0}
.mt-0{margin-top:0}.mt-8{margin-top:8px}.mt-18{margin-top:18px}.mb-0{margin-bottom:0}.pre-line{white-space:pre-line}.text-danger{color:var(--danger)!important}.text-lg{font-size:20px!important}.text-sm{font-size:13px}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.member-option{font-weight:400;margin:8px 0}.member-option input{width:auto}.announcement-title{font-size:18px;margin:0 0 5px}
.actions form{display:flex;gap:7px;align-items:center}
.danger-zone{border-top:1px solid var(--line);margin-top:20px;padding-top:16px}.table-wrap{overflow:auto}.data-table{width:100%;border-collapse:collapse}.data-table th,.data-table td{text-align:left;padding:12px;border-bottom:1px solid var(--line);white-space:nowrap}.data-table th{font-size:12px;color:var(--muted)}
.narrow-card{max-width:680px}.initial-password{background:#fffaeb;color:#7a2e0e}.initial-password code{font-size:18px;font-weight:800;user-select:all}.profile-link{display:inline-block;color:#cbd5e1;font-size:12px;margin-top:8px}.profile-settings-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.api-token-reveal{margin-bottom:18px;background:#fffaeb;border-color:#fedf89;color:#7a2e0e}.api-token-reveal code{display:block;padding:12px;border-radius:8px;background:#fff;border:1px solid #fedf89;font-size:14px;overflow-wrap:anywhere;user-select:all}.api-token-list{padding-top:6px;padding-bottom:6px}.api-token-row{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:14px 0;border-bottom:1px solid var(--line)}.api-token-row:last-child{border-bottom:0}.api-token-row code{font-size:12px}
.comment{padding:14px 0;border-bottom:1px solid var(--line)}.comment:last-child{border:0}.comment textarea{min-height:80px;margin:10px 0 6px}
.filter-card{padding:16px 20px}.filter-bar{display:grid;grid-template-columns:minmax(240px,1fr) 220px auto;gap:12px;align-items:end}.filter-bar.announcement-filter{grid-template-columns:minmax(240px,1fr) auto}.filter-bar.task-filter{display:flex;align-items:flex-end;gap:12px;flex-wrap:wrap}.task-filter .filter-search{flex:1 1 320px}.task-filter .filter-select{flex:0 1 180px}.filter-bar input,.filter-bar select{height:44px}.filter-actions,.modal-actions{display:flex;gap:8px;align-items:center}.filter-actions{min-height:44px}.modal{width:min(720px,calc(100% - 32px));max-height:calc(100vh - 48px);border:0;border-radius:16px;padding:0;box-shadow:0 24px 70px rgba(20,33,61,.24);color:var(--ink)}.modal::backdrop{background:rgba(20,33,61,.52)}.modal-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;padding:20px 24px;border-bottom:1px solid var(--line)}.modal-head h2{margin:0}.modal-body{padding:24px}.modal-close{border:0;background:transparent;color:var(--muted);font-size:28px;line-height:1;cursor:pointer;padding:0 4px}.modal-actions{justify-content:flex-end;margin-top:6px}
.top-actions{display:flex;gap:8px;align-items:center}.finance-summary{display:grid;grid-template-columns:repeat(3,1fr);padding:0;margin-bottom:18px}.finance-summary-item{display:flex;flex-direction:column;gap:4px;padding:16px 20px;border-right:1px solid var(--line)}.finance-summary-item:last-child{border-right:0}.finance-summary-item span{font-size:13px;color:var(--muted)}.finance-summary-item strong{font-size:22px}.finance-summary-item.income strong,.finance-income-text{color:var(--success)}.finance-summary-item.expense strong,.finance-expense-text{color:var(--danger)}.finance-filter{display:grid;grid-template-columns:140px minmax(180px,1fr) 170px 170px auto;gap:12px;align-items:end}.finance-table-card{padding:0 20px}.finance-table .amount-column{text-align:right;font-weight:700}.finance-description{max-width:360px;white-space:normal!important}.badge.finance-income{background:#ecfdf3;color:var(--success)}.badge.finance-expense{background:#fef3f2;color:var(--danger)}.finance-category-list{display:flex;flex-wrap:wrap;gap:8px;padding-bottom:20px;margin-bottom:20px;border-bottom:1px solid var(--line)}.finance-category-form{display:grid;grid-template-columns:150px minmax(200px,1fr) auto;gap:12px;align-items:end}
.finance-transaction-row{cursor:pointer;transition:background-color .15s ease}.finance-transaction-row:hover{background:#f8fafc}.finance-transaction-row:focus-visible{outline:2px solid var(--blue);outline-offset:-2px;background:#eff6ff}
.file-summary{display:grid;grid-template-columns:repeat(3,1fr);padding:0}.file-summary>div{display:flex;flex-direction:column;gap:3px;padding:15px 20px;border-right:1px solid var(--line)}.file-summary>div:last-child{border-right:0}.file-summary strong{font-size:18px}.file-table-card{padding:0 20px}.file-name-cell{display:flex;align-items:center;gap:10px;max-width:360px;white-space:normal}.file-icon{display:inline-grid;place-items:center;width:30px;height:30px;flex:0 0 30px;border-radius:8px;background:var(--sky);color:#1d4ed8;font-weight:800}.file-visible-users{max-width:260px;margin-top:5px;color:var(--muted);font-size:12px;white-space:normal}.file-row-actions{display:flex;justify-content:flex-end;gap:7px}.file-actions-column{text-align:right!important}.modal-narrow{width:min(540px,calc(100% - 32px))}.file-visibility-fieldset{margin:0 0 14px;padding:0;border:0}.file-visibility-fieldset legend{font-size:13px;font-weight:700;margin-bottom:7px}.visibility-option{display:flex;align-items:flex-start;gap:10px;margin-bottom:8px;padding:12px;border:1px solid var(--line);border-radius:10px;cursor:pointer}.visibility-option:has(input:checked){border-color:#93b4f5;background:#f8fbff}.visibility-option input{width:auto;margin-top:4px}.visibility-option span{display:flex;flex-direction:column}.visibility-option small{color:var(--muted);font-weight:400}.file-recipient-panel{max-height:220px;overflow:auto;margin-bottom:14px;padding:12px 14px;border:1px solid var(--line);border-radius:10px;background:#f8fafc}.file-recipient-panel[hidden]{display:none}
.login-page{min-height:100vh;display:grid;place-items:center;background:linear-gradient(135deg,#14213d,#244b89)}.login-box{width:min(430px,calc(100% - 32px));background:#fff;border-radius:18px;padding:38px;box-shadow:0 24px 70px #0b173a66}.login-mark{width:48px;height:48px;background:#2563eb;border-radius:13px;margin-bottom:22px}.login-box h1{margin:0;font-size:26px}.login-box p{color:#667085;margin:7px 0 25px}.login-box .check{display:flex;gap:8px;align-items:center;color:#667085;font-size:13px}.login-box .check input{width:auto}.login-box .btn{width:100%;margin-top:20px}.login-error{color:#b42318;background:#fef3f2;padding:10px;border-radius:8px;font-size:13px}.login-hint{font-size:12px;color:#667085;margin-top:20px;padding-top:18px;border-top:1px solid #e4e7ec}
@media(max-width:1100px){.task-row{grid-template-columns:1fr}.task-controls{justify-self:start}.finance-filter{grid-template-columns:repeat(2,1fr)}.finance-filter .filter-actions{grid-column:1/-1}}
@media(max-width:900px){.shell{display:block}.sidebar{height:auto;position:static}.user{position:static;margin-top:15px}.nav{display:flex;gap:5px;overflow:auto}.nav a{white-space:nowrap}.grid-3,.grid-2,.profile-settings-grid{grid-template-columns:1fr}.dashboard-stats,.finance-summary,.file-summary{grid-template-columns:1fr}main{padding:24px 16px}.dashboard-stat,.finance-summary-item,.file-summary>div{border-right:0;border-bottom:1px solid var(--line)}.dashboard-stat:last-child,.finance-summary-item:last-child,.file-summary>div:last-child{border-bottom:0}.form-grid,.filter-bar,.filter-bar.announcement-filter{grid-template-columns:1fr}.task-filter .filter-search,.task-filter .filter-select{flex:1 1 100%}.filter-actions{justify-content:flex-start}.finance-category-form{grid-template-columns:1fr}}
@media(max-width:560px){.top{align-items:flex-start}.top-actions{align-items:stretch;flex-direction:column}.task-controls,.task-status-form{width:100%}.task-controls{align-items:stretch;flex-direction:column}.task-status-form select{width:100%}.task-delete-form{padding:10px 0 0;border-left:0;border-top:1px solid var(--line)}.task-delete-form .btn{width:100%}.task-detail-grid,.finance-filter{grid-template-columns:1fr}.finance-filter .filter-actions{grid-column:auto}.api-token-row{align-items:flex-start;flex-direction:column}}
