:root {
    --navy: #003b78;
    --blue: #075ca8;
    --sky: #33aee4;
    --mist: #e8f6ff;
    --panel: #ffffff;
    --button-fill: rgba(226, 246, 255, .78);
    --text: #062747;
    --muted: #627b91;
    --danger: #b42318;
    --shadow: 0 20px 60px rgba(0, 50, 99, .18);
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    color: var(--text);
    background:
        linear-gradient(155deg, rgba(0, 59, 120, .95), rgba(51, 174, 228, .7) 48%, rgba(232, 246, 255, 1) 100%);
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

button:disabled {
    cursor: default;
}

svg {
    display: block;
}

.app-page,
.app-main {
    min-height: 100vh;
}

.app-main {
    display: flex;
    justify-content: center;
}

.login-shell,
.dashboard-shell {
    width: min(100%, 30rem);
    min-height: 100vh;
    padding: clamp(1rem, 4vw, 2rem);
}

.login-shell {
    display: grid;
    place-items: center;
}

.login-panel {
    width: 100%;
    padding: clamp(1.3rem, 5vw, 2rem);
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 8px;
    background: rgba(255, 255, 255, .92);
    box-shadow: var(--shadow);
}

.login-brand {
    display: grid;
    grid-template-columns: 6.25rem 1fr;
    gap: 1.05rem;
    align-items: center;
    margin-bottom: 1.6rem;
}

.login-logo {
    width: 6.25rem;
    height: 6.25rem;
    object-fit: contain;
    filter: drop-shadow(0 12px 24px rgba(0, 59, 120, .28));
}

.icon-field-button svg,
.menu-icon svg,
.icon-actions svg {
    width: 1.6rem;
    height: 1.6rem;
    fill: currentColor;
}

.eyebrow {
    margin: 0 0 .25rem;
    color: var(--blue);
    font-size: .74rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

h1 {
    margin: 0;
    color: var(--navy);
    font-size: clamp(1.7rem, 7vw, 2.25rem);
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.05;
}

.login-brand p:last-child,
.dashboard-header p:last-child {
    margin: .3rem 0 0;
    color: var(--muted);
    font-size: .95rem;
    line-height: 1.35;
}

.login-form {
    display: grid;
    gap: 1rem;
}

.field-group {
    display: grid;
    gap: .4rem;
}

.field-group label {
    color: var(--navy);
    font-weight: 700;
}

.remember-option {
    display: inline-flex;
    align-items: center;
    gap: .48rem;
    width: fit-content;
    margin-top: .15rem;
    color: var(--blue);
    font-size: .92rem;
    font-weight: 700;
}

.remember-option input {
    width: 1.05rem;
    height: 1.05rem;
    accent-color: var(--blue);
}

.form-control {
    width: 100%;
    min-width: 0;
    min-height: 3.05rem;
    border: 1px solid #b7cadd;
    border-radius: 8px;
    padding: .72rem .85rem;
    color: var(--text);
    background: #fff;
}

.form-control:focus {
    border-color: var(--sky);
    outline: 0;
    box-shadow: 0 0 0 .22rem rgba(51, 174, 228, .22);
}

.password-field {
    position: relative;
}

.password-field .form-control {
    padding-right: 3.2rem;
}

.icon-field-button {
    position: absolute;
    top: .42rem;
    right: .45rem;
    display: grid;
    place-items: center;
    width: 2.2rem;
    aspect-ratio: 1;
    border: 0;
    border-radius: 50%;
    color: var(--blue);
    background: transparent;
}

.icon-field-button:hover {
    background: var(--mist);
}

.primary-action {
    min-height: 3.1rem;
    border: 0;
    border-radius: 8px;
    color: #fff;
    background: linear-gradient(90deg, var(--navy), var(--blue), var(--sky));
    font-weight: 800;
    box-shadow: 0 12px 24px rgba(0, 59, 120, .22);
}

.primary-action:hover {
    filter: brightness(1.04);
}

.primary-action:disabled {
    opacity: .68;
}

.login-error {
    padding: .8rem .9rem;
    border-left: .28rem solid var(--danger);
    border-radius: 8px;
    color: var(--danger);
    background: #fff4f2;
    font-weight: 700;
}

.app-message {
    padding: .8rem .9rem;
    border-radius: 8px;
    font-weight: 800;
}

.app-message.success {
    border-left: .28rem solid #0f7b4f;
    color: #0d5d3e;
    background: rgba(222, 248, 235, .94);
}

.dashboard-shell {
    display: grid;
    grid-template-rows: auto auto 1fr auto auto;
    gap: 1rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .94) 0%, rgba(232, 246, 255, .9) 48%, rgba(187, 232, 252, .72) 100%),
        linear-gradient(155deg, var(--navy), var(--blue) 48%, var(--sky) 100%);
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 5rem;
    padding-top: .25rem;
}

.dashboard-header-actions {
    display: flex;
    align-items: center;
    gap: .65rem;
}

.dashboard-header h1 {
    max-width: 19rem;
    font-size: clamp(1.25rem, 5vw, 1.65rem);
}

.jefatura-logo {
    width: 4.1rem;
    height: 4.1rem;
    object-fit: contain;
    border-radius: 8px;
}

.main-menu-logo-wrap {
    display: flex;
    justify-content: center;
    padding: .15rem 0 .25rem;
}

.main-menu-logo {
    width: clamp(5.75rem, 24vw, 7.1rem);
    height: clamp(5.75rem, 24vw, 7.1rem);
    object-fit: contain;
    filter: drop-shadow(0 14px 24px rgba(0, 59, 120, .26));
}

.mipol-menu {
    display: grid;
    align-content: center;
    gap: 1.35rem;
    justify-items: center;
    width: min(100%, 28rem);
    margin: 0 auto;
    padding: .5rem clamp(.85rem, 5vw, 1.4rem);
}

.menu-button {
    position: relative;
    display: grid;
    grid-template-columns: 3rem 1fr;
    align-items: center;
    width: min(100%, 25.5rem);
    min-height: 3rem;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 999px;
    padding: 0 1.1rem 0 0;
    color: var(--navy);
    background:
        linear-gradient(90deg, rgba(255, 255, 255, .88), rgba(199, 235, 250, .72)),
        var(--button-fill);
    box-shadow: 0 10px 20px rgba(0, 88, 148, .12);
    font-weight: 800;
    text-align: center;
    overflow: visible;
    backdrop-filter: blur(5px);
}

.menu-button:hover,
.menu-button:focus-visible {
    background:
        linear-gradient(90deg, rgba(255, 255, 255, .96), rgba(170, 225, 248, .84)),
        var(--button-fill);
    outline: 0;
    transform: translateX(.1rem);
}

.menu-button-warning {
    color: #10243a;
    background: linear-gradient(90deg, rgba(255, 255, 255, .9), rgba(255, 214, 31, .9));
    border-color: rgba(255, 214, 31, .95);
}

.menu-button-warning:hover,
.menu-button-warning:focus-visible {
    background: linear-gradient(90deg, rgba(255, 255, 255, .96), rgba(255, 200, 0, .98));
}

.menu-button-alert {
    color: #fff;
    background: linear-gradient(90deg, #cb1717, #f04c42);
    border-color: rgba(255, 173, 166, .95);
}

.menu-button-alert:hover,
.menu-button-alert:focus-visible {
    background: linear-gradient(90deg, #b90f0f, #e5372d);
}

.menu-button span:last-child {
    min-width: 0;
    padding: 0 .4rem;
    overflow-wrap: anywhere;
}

.menu-note-meta {
    display: block;
    margin-top: .12rem;
    font-size: .72rem;
    font-weight: 900;
    line-height: 1.1;
    opacity: .86;
}

.menu-icon {
    display: grid;
    place-items: center;
    width: 3rem;
    aspect-ratio: 1;
    margin-left: -.05rem;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(145deg, var(--navy), var(--blue));
    box-shadow: 0 9px 18px rgba(0, 59, 120, .28);
}

.placeholder-panel {
    display: grid;
    gap: .25rem;
    padding: .85rem 1rem;
    border: 1px solid #c6ddf1;
    border-radius: 8px;
    color: var(--navy);
    background: var(--mist);
}

.placeholder-panel span {
    color: var(--muted);
    font-size: .92rem;
}

.icon-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .25rem .2rem .1rem;
}

.icon-actions button {
    display: grid;
    place-items: center;
    width: 3.1rem;
    aspect-ratio: 1;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: var(--navy);
}

.icon-actions button:hover,
.icon-actions button:focus-visible {
    outline: 0;
    background: var(--blue);
}

.floating-scroll-buttons {
    position: fixed;
    right: clamp(.65rem, 2vw, 1.05rem);
    bottom: 5.6rem;
    z-index: 1000;
    display: grid;
    gap: .45rem;
}

.arrow-button {
    display: grid;
    place-items: center;
    width: 2.65rem;
    height: 2.65rem;
    border: 1px solid rgba(255, 255, 255, .54);
    border-radius: 50%;
    color: #fff;
    background: rgba(0, 59, 120, .62);
    font-size: 1.1rem;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 10px 24px rgba(0, 59, 120, .22);
    backdrop-filter: blur(6px);
    opacity: .78;
}

.arrow-button:hover,
.arrow-button:focus-visible {
    outline: 0;
    opacity: 1;
    background: linear-gradient(145deg, var(--navy), var(--sky));
}

.work-shell {
    width: min(100%, 58rem);
    min-height: 100vh;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .94) 0%, rgba(232, 246, 255, .9) 48%, rgba(187, 232, 252, .74) 100%),
        linear-gradient(155deg, var(--navy), var(--blue) 48%, var(--sky) 100%);
}

.work-header {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    gap: .45rem;
    padding: clamp(.55rem, 2.2vw, .85rem) clamp(.8rem, 3vw, 1rem);
    border-bottom: 1px solid rgba(255, 255, 255, .72);
    background:
        linear-gradient(180deg, rgba(239, 249, 255, .98), rgba(218, 242, 253, .94)),
        linear-gradient(155deg, var(--navy), var(--sky));
    box-shadow: 0 8px 20px rgba(0, 59, 120, .1);
}

.work-brand-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .7rem;
}

.work-brand-row h1 {
    max-width: 38rem;
    font-size: clamp(1rem, 4.1vw, 1.45rem);
    line-height: 1;
}

.work-brand-row p:last-child {
    margin: .15rem 0 0;
    color: var(--muted);
    font-size: .9rem;
    font-weight: 700;
}

.work-title-row {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    color: var(--navy);
    font-size: clamp(1rem, 4vw, 1.2rem);
    font-weight: 900;
}

.work-title-row .menu-icon {
    width: 2.45rem;
}

.split-title-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    width: 100%;
}

.inline-round-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    min-height: 2.65rem;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 999px;
    padding: .25rem .9rem .25rem .35rem;
    color: var(--navy);
    background:
        linear-gradient(90deg, rgba(255, 255, 255, .9), rgba(199, 235, 250, .78)),
        var(--button-fill);
    font-size: .92rem;
    font-weight: 900;
    box-shadow: 0 8px 18px rgba(0, 88, 148, .12);
}

.inline-round-link:hover,
.inline-round-link:focus-visible {
    outline: 0;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, .96), rgba(170, 225, 248, .86)),
        var(--button-fill);
}

.mini-icon {
    display: grid;
    place-items: center;
    width: 2.15rem;
    aspect-ratio: 1;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(145deg, var(--navy), var(--blue));
}

.mini-icon svg {
    width: 1.25rem;
    height: 1.25rem;
    fill: currentColor;
}

.work-content {
    display: grid;
    gap: .65rem;
    padding: clamp(.65rem, 2.4vw, .9rem);
}

.toolbar-card,
.data-card,
.form-card {
    border: 1px solid rgba(255, 255, 255, .76);
    border-radius: 8px;
    background: rgba(255, 255, 255, .82);
    box-shadow: 0 12px 26px rgba(0, 88, 148, .11);
    backdrop-filter: blur(5px);
}

.toolbar-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: .55rem;
    padding: .55rem;
    overflow: hidden;
}

.toolbar-card.compact-actions {
    display: flex;
    justify-content: flex-end;
}

.notes-toolbar {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
}

.notes-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .45rem;
    min-width: 0;
}

.direct-filters {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: .45rem .8rem;
    padding: .1rem .25rem;
}

.direct-filters .remember-option {
    min-height: 2rem;
    font-size: .86rem;
}

.toolbar-actions {
    display: flex;
    gap: .45rem;
}

.search-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .45rem;
    min-width: 0;
    width: 100%;
}

.search-field.management-search {
    grid-template-columns: minmax(0, 1fr) minmax(9.5rem, auto) auto;
}

.quick-filter {
    min-height: 3rem;
    font-size: .9rem;
    font-weight: 800;
}

.round-action {
    display: grid;
    flex: 0 0 auto;
    align-self: center;
    place-items: center;
    width: 3rem;
    height: 3rem;
    aspect-ratio: 1;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: linear-gradient(145deg, var(--navy), var(--blue));
    box-shadow: 0 9px 18px rgba(0, 59, 120, .26);
}

.round-action svg {
    width: 1.55rem;
    height: 1.55rem;
    fill: currentColor;
}

.round-action.home-action {
    flex: 0 0 3rem;
    align-self: center;
    inline-size: 3rem;
    block-size: 3rem;
    min-width: 3rem;
    min-height: 3rem;
    max-width: 3rem;
    max-height: 3rem;
    padding: 0;
    border-radius: 50%;
}

.round-action.urgent-action {
    background: linear-gradient(145deg, #b90f0f, #f04c42);
    box-shadow: 0 9px 18px rgba(180, 35, 24, .3);
}

.round-action.resolver-action {
    background: linear-gradient(145deg, #0f7b4f, #26a269);
    box-shadow: 0 9px 18px rgba(15, 123, 79, .26);
}

.round-action.message-action {
    color: var(--navy);
    background: linear-gradient(145deg, #ffe68a, #fff4bf);
    box-shadow: 0 9px 18px rgba(151, 113, 0, .2);
}

.urgent-alert-banner {
    position: fixed;
    top: .75rem;
    left: 50%;
    z-index: 1300;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .75rem;
    width: min(calc(100% - 1.5rem), 28rem);
    padding: .85rem .95rem;
    border: 2px solid rgba(255, 255, 255, .9);
    border-radius: 8px;
    color: #fff;
    background: linear-gradient(145deg, #b90f0f, #f04c42);
    box-shadow: 0 18px 42px rgba(80, 0, 0, .28);
    transform: translateX(-50%);
}

.agent-message-banner {
    position: fixed;
    top: .75rem;
    left: 50%;
    z-index: 1300;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .75rem;
    width: min(calc(100% - 1.5rem), 28rem);
    padding: .85rem .95rem;
    border: 1px solid #ffd45d;
    border-radius: 8px;
    color: var(--navy);
    background: #fff4bf;
    box-shadow: 0 18px 42px rgba(124, 91, 0, .18);
    transform: translateX(-50%);
}

.agent-message-banner strong {
    display: block;
    font-size: 1rem;
}

.agent-message-banner p {
    margin: .2rem 0;
    font-weight: 800;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.agent-message-banner small {
    color: #7b5a00;
    font-weight: 800;
}

.agent-message-banner button {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid #e1b947;
    border-radius: 50%;
    color: var(--navy);
    background: rgba(255, 255, 255, .36);
    font-size: 1.35rem;
    font-weight: 900;
    line-height: 1;
}

.urgent-alert-banner strong {
    display: block;
    font-size: 1rem;
}

.urgent-alert-banner p {
    margin: .2rem 0;
    font-weight: 800;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.urgent-alert-banner small {
    opacity: .9;
    font-weight: 700;
}

.urgent-alert-banner button {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 50%;
    color: #fff;
    background: rgba(0, 0, 0, .12);
    font-size: 1.35rem;
    font-weight: 900;
    line-height: 1;
}

.urgent-alert-modal textarea {
    min-height: 7rem;
}

.data-card {
    max-height: calc(100vh - 15.5rem);
    overflow: auto;
    scrollbar-color: var(--blue) rgba(226, 246, 255, .7);
    cursor: grab;
    overscroll-behavior: contain;
    user-select: none;
}

.data-card.is-dragging,
.services-card.is-dragging,
.work-content.is-dragging,
.form-card.is-dragging,
.dashboard-shell.is-dragging {
    cursor: grabbing;
}

.requests-grid {
    display: grid;
    min-width: 52rem;
    width: 100%;
}

.requests-grid.mine {
    min-width: 44rem;
}

.requests-grid.notes-grid {
    min-width: 64rem;
}

.requests-header,
.requests-row {
    display: grid;
    grid-template-columns: .7fr 1.35fr 2fr 1.15fr .8fr .8fr;
    align-items: center;
    gap: .6rem;
}

.requests-grid.mine .requests-header,
.requests-grid.mine .requests-row {
    grid-template-columns: 1.35fr 2fr 1.15fr .8fr .8fr;
}

.requests-grid.notes-grid .requests-header,
.requests-grid.notes-grid .requests-row {
    grid-template-columns: 1.05fr .9fr .75fr .75fr 1.05fr 1.05fr 2fr;
}

.requests-header {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: .85rem .95rem;
    color: #fff;
    background: linear-gradient(90deg, var(--navy), var(--blue));
    font-size: .82rem;
    font-weight: 900;
}

.requests-row {
    width: 100%;
    min-height: 3.45rem;
    border: 0;
    border-top: 1px solid #cfe7f4;
    padding: .75rem .95rem;
    color: var(--text);
    background: rgba(255, 255, 255, .76);
    text-align: left;
    cursor: pointer;
}

.requests-row:hover,
.requests-row:focus-visible {
    outline: 0;
    background: rgba(224, 246, 255, .88);
}

.requests-row.is-granted {
    background: rgba(223, 247, 232, .88);
}

.requests-row.is-granted:hover,
.requests-row.is-granted:focus-visible {
    background: rgba(199, 239, 216, .96);
}

.requests-row.is-denied {
    background: rgba(255, 236, 234, .9);
}

.requests-row.is-denied:hover,
.requests-row.is-denied:focus-visible {
    background: rgba(255, 219, 216, .98);
}

.requests-row.is-active-note {
    background: rgba(255, 213, 0, .9);
}

.requests-row.is-active-note:hover,
.requests-row.is-active-note:focus-visible {
    background: rgba(255, 196, 0, .98);
}

.requests-row.is-high-note {
    color: #fff;
    background: rgba(213, 32, 32, .94);
}

.requests-row.is-high-note:hover,
.requests-row.is-high-note:focus-visible {
    background: rgba(188, 20, 20, .98);
}

.requests-row span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.empty-state {
    padding: 1.4rem;
    color: var(--muted);
    font-weight: 800;
    text-align: center;
}

.request-form {
    padding-bottom: 2rem;
}

.form-card {
    display: grid;
    gap: .95rem;
    padding: clamp(1rem, 4vw, 1.25rem);
}

.form-card h2 {
    margin: 0;
    color: var(--navy);
    font-size: clamp(1.2rem, 5vw, 1.55rem);
    font-weight: 900;
    text-align: center;
}

.form-grid {
    display: grid;
    gap: .85rem;
}

.two-cols {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.three-cols {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-control[readonly],
textarea[readonly] {
    color: #476277;
    background: rgba(239, 247, 252, .78);
}

.date-rule-text {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 700;
}

textarea.form-control {
    resize: vertical;
    line-height: 1.35;
    overflow: hidden;
    field-sizing: content;
}

.text-area-sm,
.text-area-lg {
    font-size: .92rem;
}

.text-area-sm {
    min-height: 6rem;
}

.text-area-lg {
    min-height: 10rem;
}

.note-textarea {
    min-height: 14rem;
}

.agent-change-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 7.5rem;
    gap: .75rem;
    align-items: stretch;
}

.nip-signature-field {
    position: relative;
}

.nip-signature-field .form-control {
    padding-right: 3.2rem;
}

.signature-preview {
    display: grid;
    place-items: center;
    min-height: 3.05rem;
    border: 1px solid #b7cadd;
    border-radius: 8px;
    background: rgba(255, 255, 255, .9);
    overflow: hidden;
}

.signature-preview img {
    width: 100%;
    height: 100%;
    min-height: 3.05rem;
    object-fit: contain;
}

.signature-preview span {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 800;
}

.signature-preview.is-empty {
    background: rgba(239, 247, 252, .78);
}

.signature-inline-action {
    margin-top: .45rem;
    justify-content: center;
}

.petitioner-signature {
    margin-top: .55rem;
    min-height: 5.5rem;
}

.signature-viewer {
    display: grid;
    place-items: center;
    min-height: 10rem;
    padding: .75rem;
    border: 1px solid #b7cadd;
    border-radius: 8px;
    background: rgba(255, 255, 255, .92);
}

.signature-viewer img {
    display: block;
    max-width: 100%;
    max-height: 15rem;
    object-fit: contain;
}

.compact-signature {
    margin-top: .55rem;
    min-height: 6rem;
}

.check-list {
    display: grid;
    gap: .7rem;
    align-items: start;
}

.form-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .85rem;
}

.form-actions.single-action {
    grid-template-columns: 1fr;
}

.detail-action-bar {
    display: flex;
    justify-content: flex-end;
    gap: .6rem;
    padding: .15rem .05rem .25rem;
}

.sticky-form-actions {
    position: sticky;
    top: calc(var(--work-header-sticky-offset, 8rem) + .55rem);
    z-index: 22;
    justify-content: flex-end;
    padding: .45rem .55rem;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 8px;
    background: rgba(230, 247, 255, .9);
    box-shadow: 0 10px 22px rgba(0, 88, 148, .12);
    backdrop-filter: blur(5px);
}

.detail-action-bar .round-action:disabled {
    cursor: progress;
    opacity: .68;
}

.year-field {
    display: grid;
    grid-template-columns: auto minmax(7rem, 10rem);
    align-items: center;
    gap: .7rem;
}

.year-field label {
    color: var(--navy);
    font-weight: 900;
}

.resolver-panel {
    display: grid;
    gap: .9rem;
    scroll-margin-top: calc(var(--work-header-sticky-offset, 8rem) + 4.5rem);
}

.resolver-summary-head {
    display: flex;
    flex-wrap: wrap;
    gap: .45rem 1rem;
    color: var(--muted);
    font-weight: 900;
}

.resolver-summary-head strong {
    color: var(--navy);
}

.annual-status-table {
    display: grid;
    overflow: hidden;
    border: 1px solid #b7d9f0;
    border-radius: 8px;
}

.annual-status-header,
.annual-status-row {
    display: grid;
    grid-template-columns: minmax(7.5rem, 1.25fr) repeat(3, minmax(3.6rem, .65fr));
    align-items: stretch;
    min-height: 2.35rem;
    border-bottom: 1px solid #cfe3f3;
}

.annual-status-header {
    color: #fff;
    background: var(--navy);
    font-weight: 900;
}

.annual-status-row:last-child {
    border-bottom: 0;
}

.annual-status-row > span,
.annual-status-header > span {
    display: grid;
    align-items: center;
    padding: .45rem .55rem;
}

.annual-status-row > span {
    color: var(--navy);
    background: rgba(255, 255, 255, .76);
    font-weight: 900;
}

.status-amount {
    display: grid;
    place-items: center;
    min-width: 0;
    padding: .35rem .25rem;
    border-left: 1px solid rgba(255, 255, 255, .72);
    color: var(--navy);
    font-size: .95rem;
    font-weight: 900;
    line-height: 1;
}

.status-blue {
    color: #fff;
    background: var(--blue);
}

.status-green {
    color: #fff;
    background: #0f7b4f;
}

.status-red {
    color: #fff;
    background: var(--danger);
}

.status-neutral {
    background: rgba(255, 255, 255, .9);
}

.status-observations span {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 900;
    line-height: 1.15;
}

.status-observations {
    display: grid;
    gap: .35rem;
    padding: .7rem;
    border-left: .28rem solid var(--blue);
    border-radius: 8px;
    background: rgba(255, 255, 255, .72);
}

.status-observations p {
    margin: 0;
    line-height: 1.35;
}

.service-day-query {
    display: grid;
    grid-template-columns: minmax(9rem, 13rem) minmax(12rem, auto);
    align-items: end;
    gap: .65rem;
}

.service-day-panel {
    display: grid;
    gap: .7rem;
    padding-top: .25rem;
}

.service-day-panel h3 {
    margin: .15rem 0 0;
    color: var(--navy);
    font-size: 1rem;
    font-weight: 900;
}

.service-day-grid,
.turn-summary-grid {
    display: grid;
    overflow: auto;
    border: 1px solid #b7d9f0;
    border-radius: 8px;
}

.service-day-header,
.service-day-row,
.turn-summary-header,
.turn-summary-row {
    display: grid;
    align-items: center;
    gap: .45rem;
    min-width: 30rem;
    padding: .55rem .65rem;
    border-bottom: 1px solid #cfe3f3;
}

.service-day-header,
.turn-summary-header {
    position: sticky;
    top: 0;
    z-index: 1;
    color: #fff;
    background: var(--navy);
    font-weight: 900;
}

.service-day-row,
.turn-summary-row {
    background: rgba(255, 255, 255, .78);
}

.service-day-row:last-child,
.turn-summary-row:last-child {
    border-bottom: 0;
}

.service-day-header,
.service-day-row {
    grid-template-columns: 1fr 1.2fr .8fr 1fr;
}

.turn-summary-header,
.turn-summary-row {
    grid-template-columns: 1fr .8fr 1fr;
}

.period-fields {
    display: flex;
    flex-wrap: wrap;
    gap: .8rem 1rem;
    align-items: center;
    min-width: 0;
}

.period-fields .year-field {
    min-width: 0;
}

.services-summary {
    display: flex;
    flex-wrap: wrap;
    gap: .25rem .8rem;
    color: var(--navy);
    font-size: .9rem;
    font-weight: 800;
}

.services-summary span {
    color: var(--muted);
}

.services-card {
    max-height: calc(100vh - 12.8rem);
    overflow: auto;
    border: 1px solid rgba(255, 255, 255, .76);
    border-radius: 8px;
    background: rgba(255, 255, 255, .82);
    box-shadow: 0 12px 26px rgba(0, 88, 148, .11);
    scrollbar-color: var(--blue) rgba(226, 246, 255, .7);
    cursor: grab;
    overscroll-behavior: contain;
    user-select: none;
}

.services-calendar {
    min-width: 68rem;
    width: max-content;
    border-collapse: separate;
    border-spacing: 0;
    color: var(--text);
    table-layout: fixed;
}

.services-calendar.general {
    min-width: 0;
}

.services-calendar th,
.services-calendar td {
    width: 2.05rem;
    min-width: 2.05rem;
    height: 2rem;
    border-right: 1px solid #9fc6df;
    border-bottom: 1px solid #9fc6df;
    padding: .18rem .12rem;
    text-align: center;
    font-size: .78rem;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.services-calendar thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    color: #fff;
    background: var(--navy);
}

.services-calendar thead th.day-friday {
    color: #061f3a;
    background: #ffe968;
}

.services-calendar thead th.day-saturday {
    color: #fff;
    background: #118447;
}

.services-calendar thead th.day-sunday {
    color: #fff;
    background: #c82c2c;
}

.services-calendar .month-col {
    position: sticky;
    left: 0;
    z-index: 2;
    width: 6.8rem;
    min-width: 6.8rem;
    color: #fff;
    background: var(--navy);
    text-align: center;
}

.services-calendar thead .month-col {
    z-index: 4;
}

.services-calendar tbody td {
    background: rgba(255, 255, 255, .82);
}

.services-calendar tbody tr:nth-child(even) td {
    background: rgba(233, 247, 255, .78);
}

.services-calendar td.out-day {
    background: rgba(224, 233, 240, .7);
}

.services-calendar td[style] {
    color: #001c36;
}

.secondary-action {
    min-height: 3.1rem;
    border: 1px solid rgba(255, 255, 255, .72);
    border-radius: 8px;
    color: var(--navy);
    background: rgba(226, 246, 255, .86);
    font-weight: 900;
    box-shadow: 0 10px 20px rgba(0, 88, 148, .12);
}

.secondary-action:hover {
    background: rgba(202, 236, 250, .94);
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(0, 34, 68, .38);
    backdrop-filter: blur(4px);
}

.signature-modal {
    display: grid;
    gap: 1rem;
    width: min(100%, 24rem);
    padding: 1.2rem;
    border: 1px solid rgba(255, 255, 255, .78);
    border-radius: 8px;
    background: rgba(248, 253, 255, .96);
    box-shadow: 0 24px 60px rgba(0, 34, 68, .28);
}

.signature-modal h2 {
    margin: 0;
    color: var(--navy);
    font-size: 1.35rem;
    font-weight: 900;
    text-align: center;
}

.signature-modal p {
    margin: 0;
    color: var(--muted);
    font-weight: 700;
    line-height: 1.35;
}

.signature-pad-wrap {
    display: grid;
    gap: .7rem;
}

.signature-pad {
    width: 100%;
    height: 11rem;
    border: 1px solid #9ebed8;
    border-radius: 8px;
    background: #fff;
    touch-action: none;
}

#blazor-error-ui {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    display: none;
    max-width: 26rem;
    padding: .8rem 2.5rem .8rem 1rem;
    border-radius: 8px;
    color: #fff;
    background: var(--danger);
    box-shadow: var(--shadow);
    z-index: 1000;
}

#blazor-error-ui .reload {
    color: #fff;
    font-weight: 800;
}

#blazor-error-ui .dismiss {
    position: absolute;
    top: .55rem;
    right: .85rem;
    cursor: pointer;
    font-weight: 800;
}

@media (min-width: 48rem) {
    .login-shell,
    .dashboard-shell {
        width: min(100%, 32rem);
    }

    .dashboard-shell {
        min-height: min(100vh, 48rem);
        margin: 2rem 0;
        border-radius: 8px;
        box-shadow: var(--shadow);
    }
}

@media (max-width: 44rem) {
    .work-shell {
        width: min(100%, 32rem);
    }

    .work-brand-row {
        align-items: flex-start;
    }

    .work-brand-row .jefatura-logo {
        width: 3rem;
        height: 3rem;
    }

    .toolbar-card {
        align-items: center;
        gap: .45rem;
        padding: .45rem;
    }

    .toolbar-card:has(.management-search) {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .search-field.management-search {
        display: contents;
    }

    .search-field.management-search .form-control:first-child {
        grid-column: 1;
        grid-row: 1;
    }

    .search-field.management-search .quick-filter {
        grid-column: 1;
        grid-row: 2;
        width: 100%;
    }

    .search-field.management-search .round-action {
        grid-column: 2;
        grid-row: 1;
    }

    .toolbar-card:has(.management-search) > .home-action {
        grid-column: 2;
        grid-row: 2;
    }

    .toolbar-card > .round-action {
        align-self: center;
    }

    .sticky-form-actions {
        top: calc(var(--work-header-sticky-offset, 8rem) + .45rem);
        padding: .35rem .45rem;
    }

    .data-card {
        margin-inline: -.2rem;
        max-height: calc(100vh - 12.5rem);
    }

    .services-card {
        max-height: calc(100vh - 12rem);
    }

    .requests-grid {
        min-width: 49rem;
    }

    .requests-grid.mine {
        min-width: 42rem;
    }

    .two-cols,
    .three-cols,
    .form-actions {
        grid-template-columns: 1fr;
    }

    .agent-change-row {
        grid-template-columns: 1fr;
    }

    .signature-preview {
        min-height: 4.2rem;
    }

    .split-title-row {
        grid-template-columns: auto 1fr;
    }

    .inline-round-link {
        grid-column: 1 / -1;
        justify-self: start;
        margin-left: 3.6rem;
    }
}

@media (max-width: 22rem) {
    .login-shell,
    .dashboard-shell {
        padding: .85rem;
    }

    .login-brand {
        grid-template-columns: 5rem 1fr;
    }

    .login-logo {
        width: 5rem;
        height: 5rem;
    }

    .menu-button {
        grid-template-columns: 2.75rem 1fr;
        min-height: 2.85rem;
        font-size: .92rem;
        width: min(100%, 22.5rem);
    }

    .menu-icon {
        width: 2.75rem;
    }
}
