:root { font: 16px/1.6 system-ui, sans-serif; background: #f4f7f8; color: #182d3b; }
* { box-sizing: border-box; }
body { margin: 0; }
a { color: #14584f; }
header { background: #102c36; color: #fff; padding: 12px 18px; display: flex; gap: 12px; flex-wrap: wrap; justify-content: space-between; align-items: center; }
header a { color: #fff; font-weight: 700; text-decoration: none; }
header form { display: flex; align-items: center; gap: 10px; }
main { max-width: 950px; margin: auto; padding: 18px; }
h1 { margin: 0 0 12px; font-size: clamp(22px, 5vw, 34px); }
h2 { font-size: 18px; margin: 0 0 10px; }
.panel { margin: 0 0 14px; padding: 16px; border: 1px solid #dce5e8; background: #fff; border-radius: 10px; }
.sign-in { max-width: 420px; margin: 32px auto; }
label { display: block; margin-bottom: 13px; font-weight: 650; }
input, button, select, textarea { font: inherit; min-height: 44px; padding: 7px 10px; border: 1px solid #a9bfc5; border-radius: 7px; background: #fff; }
input, select, textarea { display: block; width: 100%; min-width: 0; }
input[type="date"] {
    -webkit-appearance: none;
    appearance: none;
    max-width: 100%;
    text-align: left;
}
input[type="date"]::-webkit-date-and-time-value { min-width: 0; text-align: left; }
button { cursor: pointer; color: #163c43; }
.primary { background: #17695f; color: #fff; border-color: #17695f; }
.heading { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.badge { color: #22594f; background: #e4f2ed; border-radius: 20px; padding: 2px 9px; font-size: 14px; white-space: nowrap; }
.cases, .summary { margin: 0; padding: 0; list-style: none; }
.cases li { border-top: 1px solid #e4ebed; }
.cases a { display: grid; gap: 2px; padding: 10px 0; overflow-wrap: anywhere; text-decoration: none; }
.cases a:hover { background: #eff8f5; }
.muted, .empty { color: #536972; }
.summary { display: flex; gap: 10px 20px; flex-wrap: wrap; }
.error { color: #972c26; }
.task { margin-top: 14px; }
.case-task button { min-height: 48px; padding: 9px 16px; font-weight: 750; }
.case-task .case-task-primary { background: #12594d; color: #fff; border-color: #12594d; }
.case-task .case-task-primary:hover { background: #0d493e; }
.case-task .case-task-secondary { background: #fff; color: #324b56; border-color: #9eb7bf; }
.case-task .case-task-cancel { background: #fff; color: #8c302d; border-color: #d5aaa8; }
.case-task-compact label { max-width: 360px; font-size: 14px; margin-bottom: 8px; }
.case-task-compact input { padding-block: 5px; }
.case-task-compact .case-task-cancel { min-height: 44px; padding: 6px 11px; font-size: 14px; }
.case-task-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.case-task-back {
    display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
    margin-inline-start: auto;
    padding: 6px 11px; background: #fff; color: #12594d; border: 1px solid #80ab9e;
    border-radius: 7px; font-size: 14px; font-weight: 750; text-decoration: none;
}
.case-task-back:hover { background: #eaf5f1; }
.case-task-back:focus-visible { outline: 3px solid #519e92; outline-offset: 2px; }
.case-task button:focus-visible { outline: 3px solid #519e92; outline-offset: 2px; }
.task-links { display: flex; gap: 16px; flex-wrap: wrap; margin: 0 0 14px; }
.filters { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 8px; align-items: end; margin: 0 0 14px; }
.filters label { margin: 0; }
.dashboard-heading { margin-bottom: 14px; align-items: center; }
.dashboard-heading h1 { margin: 0; }
.notice-link, .dashboard-links a {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; padding: 8px 12px; border: 1px solid #c6d9d6; border-radius: 8px;
    background: #fff; color: #155c52; text-decoration: none; font-weight: 700;
}
.notice-link span { background: #e4f2ed; padding: 1px 7px; border-radius: 14px; font-size: 14px; }
.my-queue { background: #eaf5f1; border-color: #acd1c4; padding: 14px; }
.queue-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.queue-heading h2 { margin: 0; }
.my-queue h2 { font-size: 20px; color: #164f47; }
.queue-count { color: #164f47; font-weight: 750; font-size: 31px; line-height: 1.1; white-space: nowrap; }
.queue-count small, .dashboard-totals small { font-size: 14px; }
.my-queue .empty { margin: 10px 0 0; }
.dashboard-queues { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.dashboard-queues .panel { min-width: 0; }
.dashboard-links { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.dashboard-links .dashboard-new { background: #17695f; color: #fff; border-color: #17695f; }
.case-link { grid-template-columns: minmax(0,1fr); justify-items: start; }
.case-title { color: #183640; font-size: 17px; }
.case-status { display: inline-block; border-radius: 14px; background: #eef2f4; color: #36515d; padding: 2px 9px; font-size: 13px; font-weight: 700; }
.status-review, .status-revise { background: #fff0d9; color: #763b10; }
.status-send, .status-sent { background: #dff1e8; color: #155345; }
.status-drafting, .status-queued { background: #e4effb; color: #1f4b75; }
.case-action { margin-top: 4px; font-weight: 730; background: #17695f; color: #fff; padding: 8px 12px; border-radius: 7px; min-height: 44px; display: flex; align-items: center; gap: 7px; }
.my-queue .cases { display: grid; gap: 8px; }
.my-queue .cases li { border: 1px solid #c8dfd7; border-radius: 8px; background: #fff; }
.my-queue .cases a { padding: 10px 12px; border-radius: 8px; }
.dashboard-totals { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin: 0; }
.dashboard-totals div { display: flex; flex-direction: column; justify-content: space-between; border: 1px solid #dce5e8; background: #fff; border-radius: 8px; padding: 10px; }
.dashboard-totals dt { color: #526873; font-size: 13px; }
.dashboard-totals dd { margin: 0; font-size: 23px; font-weight: 750; }
.notice-link:focus-visible, .dashboard-links a:focus-visible, .case-link:focus-visible { outline: 3px solid #519e92; outline-offset: 2px; }
@media (max-width: 600px) {
    main { padding: 14px; }
    .dashboard-queues { display: block; }
    .dashboard-links a { flex: 1 1 auto; text-align: center; }
    .case-task:not(.case-task-compact) button { width: 100%; }
}

#push-settings { display: grid; grid-template-columns: repeat(2, minmax(0, max-content)); gap: 6px; margin-top: 16px; }
#push-settings button { min-height: 36px; padding: 4px 8px; font-size: 13px; min-width: 0; overflow-wrap: anywhere; }
#push-settings p { grid-column: 1 / -1; margin: 0; font-size: 14px; }
.registration-return { margin-top: 16px; }
.notice-actions { justify-content: space-between; margin-top: 16px; }
input[name=confirm_delete] { display: inline-block; width: auto; margin-inline-end: 6px; }

.dashboard-totals + .dashboard-links { margin-top: 14px; }
.dashboard-totals + .dashboard-links a { min-width: 0; overflow-wrap: anywhere; }

.notice-state { justify-self: start; padding: 1px 8px; border-radius: 12px; background: #eef2f4; color: #36515d; font-size: 13px; font-weight: 700; }
.notice-state-pending { background: #17695f; color: #fff; }
.notice-state-shared { background: #e4effb; color: #1f4b75; }
