:root{font-family:Segoe UI,Arial,sans-serif;color:#233047;background:#f5f7fb;font-size:14px}*{box-sizing:border-box}body{margin:0}a{color:#3b58ce;text-decoration:none}a:hover{text-decoration:underline}header{background:#fff;border-bottom:1px solid #e3e8f0;padding:22px 4%;display:flex;justify-content:space-between;align-items:center}.brand{display:flex;align-items:center;gap:12px;font-size:19px;font-weight:700;letter-spacing:-.4px}.brand small{font-weight:400;font-size:12px;letter-spacing:0;margin-top:3px;color:#758198}.logo{display:grid;place-items:center;width:40px;height:40px;background:#435cda;color:white;border-radius:12px}.local{font-size:12px;color:#65816c;background:#eef7f1;border-radius:20px;padding:8px 12px}main{max-width:1450px;margin:auto;padding:26px 4% 70px;min-height:calc(100vh - 157px)}nav{display:flex;gap:12px;font-size:12px;color:#8590a3;margin-bottom:32px}.heading{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:26px}h1{font-size:30px;letter-spacing:-.8px;margin:8px 0 12px}h2{font-size:17px;margin:0}p{line-height:1.6}.muted,dt{color:#768298}.eyebrow{font-size:10px;font-weight:700;letter-spacing:1.7px;color:#7987a0;margin:0}.count{font-size:15px;background:#e8edf8;padding:4px 9px;border-radius:7px;vertical-align:middle;color:#576781;letter-spacing:0}.button{display:inline-flex;align-items:center;justify-content:center;gap:6px;background:#435cda;color:#fff;border:1px solid transparent;border-radius:8px;padding:12px 18px;font:600 14px Segoe UI,Arial;cursor:pointer;white-space:nowrap}.button:hover{background:#344bbf;text-decoration:none}.button:disabled{opacity:.6;cursor:wait}.secondary{background:white;color:#46536c;border-color:#dbe1ec}.secondary:hover{background:#f0f3f8}.panel{background:#fff;border:1px solid #e1e6ef;border-radius:12px;box-shadow:0 4px 15px #263c6b04;overflow:hidden}.panel-title{padding:22px 24px;display:flex;justify-content:space-between;border-bottom:1px solid #e8ecf3}.panel-title .muted{font-size:12px}.table-wrap{overflow:auto}table{border-collapse:collapse;width:100%;text-align:left;font-size:13px}th{background:#fafbfd;color:#7d889c;font-size:11px;font-weight:600;white-space:nowrap}th,td{padding:17px 18px;border-bottom:1px solid #edf0f5}tbody tr:last-child td{border:0}tbody tr:hover{background:#fcfdff}small{display:block;font-size:11px;margin-top:6px;color:#8590a4}td.client{min-width:160px;max-width:270px;overflow-wrap:anywhere}.number{font-weight:700}td small{white-space:nowrap}.badge{padding:6px 9px;border-radius:6px;font-size:11px;white-space:nowrap;background:#edf1ff;color:#4c65c4}.status-1{background:#fff2db;color:#a16b17}.status-2{background:#f3eafd;color:#8c52b8}.status-3{background:#e7f5ed;color:#39825a}.priority{white-space:nowrap;font-size:12px}.priority:before{content:'●';margin-right:6px;color:#8190a6}.priority-1:before{color:#e6ad45}.priority-2:before{color:#df6570}.actions{display:flex;flex-wrap:wrap;gap:8px;font-size:11px;min-width:145px}.danger-text{color:#c44d5b}.empty{text-align:center;padding:65px 20px 75px}.empty-icon{margin:0 auto 20px;background:#eef1ff;color:#6075cf;border-radius:16px;width:62px;height:62px;display:grid;place-items:center;font-size:30px}.empty .button{margin-top:12px}.form-panel{max-width:920px;padding:30px}.grid{display:grid;grid-template-columns:1fr 1fr;gap:24px;margin-top:24px}.wide{grid-column:1/-1}label{display:flex;flex-direction:column;gap:9px;font-size:13px;font-weight:600}input,textarea,select{width:100%;border:1px solid #d9dfeb;border-radius:7px;background:#fff;padding:11px 12px;font:14px Segoe UI,Arial;color:#263349}textarea{resize:vertical;min-height:100px}input:focus,textarea:focus,select:focus{outline:2px solid #aebcff;outline-offset:1px}.section-title{padding-top:28px;margin-top:28px;border-top:1px solid #e9edf4}.form-actions{display:flex;align-items:center;flex-wrap:wrap;gap:14px;margin-top:30px;padding-top:24px;border-top:1px solid #e9edf4}.notice{padding:14px 20px;background:#eaf6ee;border:1px solid #cee7d7;color:#34754e;border-radius:8px;margin-bottom:22px}.error-box{padding:18px 22px;border:1px solid #edc4c9;background:#fff0f2;color:#a33445;border-radius:8px;max-width:920px;margin-bottom:22px}.error-box li{margin:7px 0}.details dt{font-size:12px;margin-bottom:10px}.details dd{margin:0;line-height:1.7;overflow-wrap:anywhere}.user-text{white-space:pre-wrap;overflow-wrap:anywhere}.confirm{max-width:720px;padding:36px}.danger{background:#bf4758}.danger:hover{background:#a73949}footer{border-top:1px solid #e3e8f0;padding:20px 4%;font-size:11px;color:#8c97aa;display:flex;justify-content:space-between}a:focus-visible,button:focus-visible{outline:3px solid #9baeff;outline-offset:4px}@media(max-width:700px){.heading{align-items:flex-start;flex-direction:column}.grid{grid-template-columns:1fr}.wide{grid-column:auto}.local{display:none}.form-panel,.confirm{padding:22px}h1{font-size:25px}footer span{display:none}.heading .button{width:100%}}

/* Stage 2: deadline text accompanies color; filters also work without JavaScript. */
.filters{display:flex;align-items:flex-end;flex-wrap:wrap;gap:18px;padding:22px 24px;margin-bottom:22px;overflow:visible}
.filters label{flex:1;min-width:180px}.filter-actions{display:flex;gap:10px;flex-wrap:wrap}
.deadline-overdue{background:#fde8ec;color:#a52f46;font-weight:700}
.deadline-on_time{background:#e7f5ed;color:#34754e}.deadline-missing{background:#eef1f6;color:#627087}
.deadline-closed{background:#e8edf5;color:#53647e}.deadline-invalid{background:#fff0d9;color:#8c5a13}
@media(max-width:700px){.filters{padding:20px}.filters label{flex-basis:100%;min-width:0}.filter-actions{width:100%}.filter-actions .button{flex:1}}

/* Manager directory: preserve legacy spelling and visible inactive state. */
.manager-name{white-space:pre-wrap;overflow-wrap:anywhere}.manager-actions{display:flex;gap:16px;align-items:center;flex-wrap:wrap}.manager-actions form{margin:0}

/* Tasks within a ticket. */
.task-section{margin-top:24px}.task-card{border:1px solid #e1e6ef;border-radius:9px;padding:20px;margin:16px 0}.task-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}.task-heading h3{margin:0;overflow-wrap:anywhere;white-space:pre-wrap}.task-actions{display:flex;flex-wrap:wrap;gap:16px;border-top:1px solid #e9edf4;margin-top:20px;padding-top:16px}.deadline-finished{background:#eef1f6;color:#53647e}@media(max-width:700px){.task-heading{flex-direction:column}}

/* Ticket activity: plain text history and read-only snapshots. */
.activity-summary{max-width:920px;padding:22px 30px;margin-bottom:22px}.activity-summary p{margin-bottom:0}.history-section{margin-top:24px}.action-form{display:grid;gap:16px;margin-bottom:28px}.action-form .button{justify-self:start}.history-event{border-top:1px solid #e1e6ef;padding:22px 0}.history-event .details dt{margin-top:12px}.history-event .task-heading small{white-space:nowrap}

.status-4{background:#eee7ff;color:#7050a8}.confirmation{display:flex;flex-direction:row;align-items:center;margin-top:22px}.confirmation input{width:auto}fieldset{border:0;padding:0}fieldset label{margin-top:18px}fieldset legend{font-weight:600}

.control-tags{display:flex;flex-wrap:wrap;gap:6px;min-width:160px;max-width:380px}.control-tag{display:inline-block;border:1px solid;padding:4px 8px;border-radius:8px;white-space:normal;overflow-wrap:anywhere;font-size:12px}.confirmed-problem{color:#983727;background:#fff1ed;border-color:#efb5a7}.data-warning{color:#765300;background:#fff9df;border-color:#d5bd66}

/* Stage 5A: cards wrap, the table scrolls within its own panel. */
.metric-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:16px;margin:24px 0}.metric-card{display:flex;flex-direction:column;gap:12px;padding:20px;color:#33445f;min-width:0;overflow-wrap:anywhere}.metric-card:hover{border-color:#9baeff;text-decoration:none;background:#fafbff}.metric-card strong{font-size:32px;color:#435cda}.metric-card small{color:#768298}.dashboard-table{max-width:100%}.dashboard-table table{min-width:1080px}.dashboard-table td{max-width:310px;overflow-wrap:anywhere}.dashboard-table .number{white-space:normal}nav{flex-wrap:wrap}@media(max-width:700px){.metric-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.metric-card{padding:14px}.metric-card strong{font-size:28px}.panel-title{gap:10px;flex-wrap:wrap}}

/* Saved summaries retain readable ISO dates on small screens. */
.notice{overflow-wrap:anywhere}.dashboard-table small{overflow-wrap:anywhere}

.login-panel{max-width:520px}.login-panel label{margin-bottom:20px}.logout-form{display:flex;justify-content:flex-end;margin-bottom:20px}
