* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

:root {
    --brand-color: #ea6603;
    --brand-color-hover: #c95502;
    --brand-color-soft: rgba(234, 102, 3, 0.14);
    --brand-color-bright: #ff7a00;
    --brand-color-deep: #f04400;
    --logo-letter-color: #55565a;
}

body.app-page {
    min-height: 100vh;
    margin: 0;
    background:
        linear-gradient(135deg, #fffaf4 0%, #ffe4c8 48%, #ffc487 100%);
    background-attachment: fixed;
    background-size: auto, auto, auto, 36px 36px, auto;
    color: #202932;
    font-family: "Instrument Sans", "Segoe UI", Arial, sans-serif;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

select:not(.technician-native-select) {
    background-color: #ffffff;
    border: 1px solid #b7c2cf;
}

.form-native-select.is-enhanced {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    pointer-events: none !important;
}

.app-header {
    min-height: 44px;
    padding: 4px clamp(10px, 2vw, 18px);
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 0.5px solid #7b2600;
    background: white;
}

.app-brand {
    width: fit-content;
    min-height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.app-header-row {
    position: relative;
    width: 100%;
    display: grid;
    grid-template-columns: minmax(120px, 210px) minmax(0, 1fr) minmax(220px, max-content);
    align-items: center;
    gap: 14px;
}

.app-brand-cell {
    min-width: 0;
    display: flex;
    align-items: center;
}

.app-logo {
    width: auto;
    max-height: 34px;
    display: block;
    object-fit: contain;
}

.app-logo.is-aliad {
    max-width: 138px;
}

.app-logo.is-formapersonas {
    max-width: 170px;
}

.app-nav-cell {
    position: static;
    flex: 0 0 auto;
    justify-self: center;
    text-align: center;
    transform: none;
}

.app-nav-group {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}

.app-nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 6px 12px;
    color: #54565A;
    border-bottom: 2px solid transparent;
    border-radius: 6px 6px 0 0;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.app-nav-link:hover {
    color: #202932;
    background: #f1f4f7;
    border-bottom-color: #aeb8c2;
}

.app-nav-link.is-active {
    color: var(--brand-color);
    border-bottom-color: var(--brand-color);
}

.app-nav-link.is-active:hover {
    color: var(--brand-color-hover);
    background: #fff7ef;
    border-bottom-color: var(--brand-color-hover);
}

.app-nav-dropdown {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.app-nav-dropdown summary {
    list-style: none;
    cursor: pointer;
}

.app-nav-dropdown summary::-webkit-details-marker {
    display: none;
}

.app-nav-dropdown-toggle::after {
    content: "v";
    margin-left: 7px;
    font-size: 10px;
    line-height: 1;
}

.app-nav-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    z-index: 30;
    min-width: 178px;
    padding: 6px;
    display: grid;
    gap: 2px;
    background: #ffffff;
    border: 1px solid #e0e3e7;
    border-radius: 8px;
    box-shadow: 0 14px 28px rgba(25, 31, 38, 0.13);
    transform: translateX(-50%);
}

.app-nav-menu-link {
    min-height: 34px;
    padding: 9px 10px;
    display: flex;
    align-items: center;
    color: #54565A;
    border-radius: 6px;
    box-shadow: inset 0 0 0 transparent;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    transition: background-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.app-nav-menu-link:hover {
    color: #202932;
    background: #f1f4f7;
    box-shadow: inset 3px 0 0 #aeb8c2;
}

.app-nav-menu-link.is-active {
    color: var(--brand-color);
    background: #fff7ef;
    box-shadow: inset 3px 0 0 var(--brand-color);
}

.app-nav-menu-link.is-active:hover {
    color: var(--brand-color-hover);
    background: #ffe8d5;
    box-shadow: inset 3px 0 0 var(--brand-color-hover);
}

.logout-form {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
}

.app-user-cell {
    min-width: 0;
    justify-self: end;
}

.app-user-menu {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    white-space: nowrap;
}

.app-user-identity {
    max-width: 250px;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.app-user-role {
    min-width: 42px;
    height: 27px;
    padding: 0 9px;
    display: inline-block;
    box-sizing: border-box;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    line-height: 22px;
    text-align: center;
    vertical-align: middle;
}

body.app-page .app-user-role.is-admin {
    color: #47515c !important;
    background: #eef1f4 !important;
    border: 1px solid #d7dde5 !important;
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.75);
}

.app-user-role.is-tech {
    color: #3a546c;
    background: #e8f0f6;
    border: 1px solid #cedce8;
}

.app-user-role.is-standard {
    color: #47515c;
    background: #e7ecf2;
    border: 1px solid #d7dde5;
}

.app-user-role span {
    display: inline-block;
    transform: translateY(2px);
}

.app-user-name {
    max-width: 140px;
    overflow: hidden;
    color: #54565A;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    text-overflow: ellipsis;
}

.logout-button {
    width: 34px;
    height: 30px;
    min-width: 34px;
    min-height: 30px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #54565A;
    background: none;
    border: 0;
    cursor: pointer;
}

.logout-button:hover {
    color: var(--brand-color);
}

.logout-icon {
    width: 19px;
    height: 19px;
    flex: 0 0 auto;
    fill: currentColor;
}

.app-notifications-button {
    position: relative;
    width: 34px;
    height: 30px;
    min-width: 34px;
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-color);
    background: #fff7ef;
    border: 1px solid #ffd2a6;
    border-radius: 7px;
    text-decoration: none;
    transition: color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.app-notifications-button:hover {
    color: var(--brand-color-hover);
    border-color: var(--brand-color);
    box-shadow: 0 0 0 3px var(--brand-color-soft);
}

.app-notifications-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-color);
    background: #ffffff;
    border: 2px solid #ffffff;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 0 0 1px var(--brand-color);
}

.page-main {
    padding:1.3%;
}

.incidents-content h1,
.users-content h1,
.notifications-content h1 {
    margin: 0;
    color: #1d2932;
    font-size: 28px;
    line-height: 1.2;
    letter-spacing: 0;
}

.page-title-group {
    display: grid;
    gap: 4px;
}

.page-title-row {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 9px;
}

.page-title-row h1 {
    flex: 0 0 auto;
}

.page-subtitle {
    margin: 0;
    color: #54565A;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
}

.aux-content h1 {
    margin: 0;
    color: #1d2932;
    font-size: 28px;
    line-height: 1.2;
    letter-spacing: 0;
}

.aux-header-row .page-title-row h1 {
    font-size: 28px;
    line-height: 1.2;
}

.users-header-row {
    position: relative;
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}

.aux-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
}

.aux-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.users-actions {
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 8px;
}

.users-toolbar {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-left: auto;
}

.users-add-button,
.users-search-button {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 0 16px;
    color: #ffffff;
    background: var(--brand-color);
    border: 0;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.users-add-button:hover,
.users-search-button:hover {
    background: var(--brand-color-hover);
}

.users-search-input {
    width: min(100%, 340px);
    flex: 1 1 260px;
    min-width: 0;
    min-height: 38px;
    padding: 9px 12px;
    color: #0f1720;
    background: #ffffff;
    border: 1px solid #c7d0dc;
    border-radius: 7px;
    font-size: 14px;
    line-height: 1.2;
    outline: none;
}

.users-search-input:focus {
    border-color: var(--brand-color);
    box-shadow: 0 0 0 3px var(--brand-color-soft);
}

.users-clear-link {
    color: #54565A;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
}

.users-clear-link:hover {
    color: var(--brand-color);
}

.user-feedback {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 7px;
    font-size: 13px;
    line-height: 1.35;
}

.user-feedback.is-success {
    color: #1f5a35;
    background: #edf8f0;
    border: 1px solid #bcdcc5;
}

.user-feedback.is-error {
    color: #8a1f1f;
    background: #fff0f0;
    border: 1px solid #f1c5c5;
}

.user-feedback ul {
    margin: 0;
    padding-left: 18px;
}

.user-create-panel {
    margin: 0 0 16px;
    padding: 16px;
    background: #ffffff;
    border: 1px solid #e0e3e7;
    border-radius: 8px;
}

.user-form-title {
    margin: 0 0 14px;
    color: #1d2932;
    font-size: 18px;
    line-height: 1.25;
    letter-spacing: 0;
}

.user-create-form {
    display: grid;
    gap: 14px;
}

.user-create-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.aux-create-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 12px;
}

.user-create-form .form-field input,
.user-create-form .form-field select,
.user-create-form .form-field textarea,
.user-password-form .form-field input {
    width: 100%;
    min-height: 39px;
    padding: 9px 12px;
    color: #0f1720;
    background: #ffffff;
    border: 1px solid #c7d0dc;
    border-radius: 7px;
    font-size: 14px;
    line-height: 1.2;
    outline: none;
}

.user-create-form .form-field select,
.notification-assignment-form .form-field select {
    border-color: #b7c2cf;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.user-create-form .form-field input:focus,
.user-create-form .form-field select:focus,
.user-create-form .form-field textarea:focus,
.user-password-form .form-field input:focus {
    border-color: var(--brand-color);
    box-shadow: 0 0 0 3px var(--brand-color-soft);
}

.user-create-form .form-field input.is-invalid,
.user-create-form .form-field select.is-invalid,
.user-create-form .form-field textarea.is-invalid,
.user-password-form .form-field input.is-invalid {
    background: #fff7f7;
    border-color: #c83434;
}

.user-create-form .form-field input.is-invalid:focus,
.user-create-form .form-field select.is-invalid:focus,
.user-create-form .form-field textarea.is-invalid:focus,
.user-password-form .form-field input.is-invalid:focus {
    border-color: #c83434;
    box-shadow: 0 0 0 3px rgba(200, 52, 52, 0.16);
}

.user-create-form .form-field textarea {
    min-height: 118px;
    resize: vertical;
    line-height: 1.45;
}

.user-create-form .form-field input[type="file"] {
    padding: 8px 10px;
}

.incident-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.incident-stats-panel,
.incident-table-panel,
.incident-history-panel {
    margin: 0 0 16px;
    padding: 14px;
    display: grid;
    gap: 12px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #e0e3e7;
    border-radius: 8px;
}

.incident-stats-header,
.incident-table-header,
.incident-history-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.incident-table-header {
    align-items: flex-start;
}

.incident-stats-panel > summary {
    list-style: none;
    cursor: pointer;
}

.incident-stats-panel > summary::-webkit-details-marker {
    display: none;
}

.incident-stats-heading {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.incident-stats-title,
.incident-stats-header h2,
.incident-table-header h2,
.incident-history-header h2 {
    margin: 0;
    color: #1d2932;
    font-size: 18px;
    line-height: 1.25;
    letter-spacing: 0;
}

.incident-table-header p,
.incident-history-header p,
.incident-stats-subtitle {
    margin: 4px 0 0;
    color: #7b8490;
    font-size: 13px;
    line-height: 1.3;
}

.incident-stats-subtitle {
    margin: 0;
}

.incident-table-title-group {
    min-width: 0;
}

.incident-table-title-row {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.incident-table-actions {
    min-width: 0;
    display: flex;
    align-items: flex-end;
    flex-direction: column;
    justify-content: flex-end;
    gap: 8px;
}

.incident-completed-filter {
    margin: 0;
    align-self: flex-end;
}

.incident-completed-filter-label {
    min-height: 32px;
    padding: 7px 10px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #47515c;
    background: #ffffff;
    border: 1px solid #c7d0dc;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
}

.incident-completed-filter-label:hover {
    color: var(--brand-color);
    background: var(--brand-color-soft);
    border-color: var(--brand-color);
}

.incident-completed-filter-label input {
    width: 15px;
    height: 15px;
    accent-color: var(--brand-color);
}

.incident-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.incident-filter-tab {
    min-height: 31px;
    padding: 8px 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #47515c;
    background: #ffffff;
    border: 1px solid #c7d0dc;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
}

.incident-filter-tab:hover {
    color: var(--brand-color);
    background: var(--brand-color-soft);
    border-color: var(--brand-color);
    box-shadow: 0 0 0 3px var(--brand-color-soft);
}

.incident-filter-tab.is-active {
    color: #ffffff;
    background: var(--brand-color);
    border-color: var(--brand-color);
}

.incident-filter-tab.is-active:hover {
    color: #ffffff;
    background: var(--brand-color);
    box-shadow: none;
}

.incident-stats-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.incident-stats-total {
    min-height: 27px;
    padding: 6px 10px;
    display: inline-flex;
    align-items: center;
    color: #8f3d00;
    background: #fff2e5;
    border: 1px solid #ffd2a6;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.incident-stats-toggle {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #8f3d00;
    background: #fff2e5;
    border: 1px solid #ffd2a6;
    border-radius: 999px;
}

.incident-stats-toggle::before {
    width: 8px;
    height: 8px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    content: "";
    transform: translateY(-2px) rotate(45deg);
}

.incident-stats-panel[open] .incident-stats-toggle::before {
    transform: translateY(2px) rotate(225deg);
}

.incident-stats-toolbar {
    margin-bottom: 4px;
    display: flex;
    justify-content: flex-end;
}

.incident-stats-download {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    padding: 5px;
    border-radius: 6px;
    text-decoration: none;
}

.users-search-icon-button {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    padding: 5px;
    border-radius: 6px;
}

.users-search-icon-button svg,
.incident-stats-download svg {
    width: 100%;
    height: 100%;
    display: block;
}

.incident-stats-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.incident-stat-group {
    min-width: 0;
    padding: 10px;
    background: #fbfcfd;
    border: 1px solid #e4e9ef;
    border-radius: 8px;
}

.incident-stat-group h3 {
    margin: 0 0 8px;
    color: #25313b;
    font-size: 13px;
    line-height: 1.2;
    letter-spacing: 0;
}

.incident-stat-group ul {
    margin: 0;
    padding: 0;
    display: grid;
    gap: 6px;
    list-style: none;
}

.incident-stat-group li {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    color: #54565A;
    font-size: 12px;
    line-height: 1.25;
}

.incident-stat-group li span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.incident-stat-group li strong {
    color: #202932;
    font-size: 13px;
}

.incident-stat-empty {
    color: #7b8490;
}

.incident-rating-form {
    display: grid;
    gap: 16px;
}

.incident-rating-options {
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    border: 0;
}

.incident-rating-options legend {
    width: 100%;
    margin: 0 0 6px;
    color: #25313b;
    font-size: 14px;
    font-weight: 800;
}

.incident-rating-option {
    min-width: 44px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.incident-rating-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.incident-rating-option span {
    width: 44px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #47515c;
    background: #ffffff;
    border: 1px solid #c7d0dc;
    border-radius: 7px;
    font-size: 15px;
    font-weight: 800;
}

.incident-rating-option input:checked + span {
    color: #ffffff;
    background: var(--brand-color);
    border-color: var(--brand-color);
}

.incident-rating-option input:focus-visible + span {
    box-shadow: 0 0 0 3px var(--brand-color-soft);
}

.notifications-panel {
    margin: 0 0 16px;
    padding: 14px;
    display: grid;
    gap: 12px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #e0e3e7;
    border-radius: 8px;
}

.notifications-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.notifications-header-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.notifications-header h2 {
    margin: 0;
    color: #1d2932;
    font-size: 18px;
    line-height: 1.25;
    letter-spacing: 0;
}

.notifications-header p {
    margin: 4px 0 0;
    color: #69737d;
    font-size: 13px;
    line-height: 1.35;
}

.notifications-count {
    min-height: 27px;
    padding: 6px 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #69737d;
    background: #f1f4f7;
    border: 1px solid #d7dde5;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.notifications-count.has-unread {
    color: #8f3d00;
    background: #fff2e5;
    border-color: #ffd2a6;
}

.notifications-clear-button {
    min-height: 31px;
    padding: 6px 10px;
    color: #54565A;
    background: #ffffff;
    border: 1px solid #c7d0dc;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
}

.notifications-clear-button:hover {
    color: var(--brand-color);
    border-color: var(--brand-color);
}

.notifications-list {
    display: grid;
    gap: 8px;
}

.notification-item {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: #fbfcfd;
    border: 1px solid #e4e9ef;
    border-radius: 8px;
}

.notification-item.is-unread {
    background: #fff0df;
    border-color: #ffb46b;
    box-shadow: 0 0 0 1px rgba(234, 102, 3, 0.12);
}

.notification-item.is-unread .notification-icon {
    color: #9a3f00;
    background: #ffffff;
}

.notification-item.is-unread .notification-title-row h3,
.notification-item.is-unread .notification-copy p {
    color: #3a2a1f;
}

.notification-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #47515c;
    background: #eef1f4;
    border-radius: 7px;
}

.notification-icon svg {
    width: 18px;
    height: 18px;
}

.notification-item.is-status .notification-icon {
    color: #1f5a35;
    background: #edf8f0;
}

.notification-copy {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.notification-title-row {
    min-width: 0;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.notification-title-row h3 {
    margin: 0;
    color: #202932;
    font-size: 14px;
    line-height: 1.25;
    letter-spacing: 0;
}

.notification-title-row span {
    color: #7b8490;
    font-size: 12px;
    white-space: nowrap;
}

.notification-copy p {
    margin: 0;
    color: #54565A;
    font-size: 13px;
    line-height: 1.35;
}

.notification-link {
    width: fit-content;
    color: var(--brand-color);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.notification-link:hover {
    color: var(--brand-color-hover);
    text-decoration: underline;
}

.notification-detail-button {
    width: fit-content;
    min-height: 31px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #47515c;
    background: #ffffff;
    border: 1px solid #c7d0dc;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    text-decoration: none;
}

.notification-detail-button:hover {
    color: var(--brand-color);
    border-color: var(--brand-color);
}

.notification-detail-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.notification-detail-header h2 {
    margin: 0;
    color: #1d2932;
    font-size: 18px;
    line-height: 1.25;
    letter-spacing: 0;
}

.notification-detail-header p {
    margin: 4px 0 0;
    color: #69737d;
    font-size: 13px;
    line-height: 1.35;
}

.notification-detail-body {
    display: grid;
    gap: 13px;
}

.notification-detail-body p {
    margin: 0;
    color: #54565A;
    font-size: 14px;
    line-height: 1.45;
}

.notification-detail-meta {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.notification-detail-meta div {
    min-width: 0;
    padding: 10px;
    background: #fbfcfd;
    border: 1px solid #e4e9ef;
    border-radius: 8px;
}

.notification-detail-meta dt {
    margin: 0 0 4px;
    color: #7b8490;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}

.notification-detail-meta dd {
    margin: 0;
    color: #25313b;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
}

.notification-incident-description {
    padding: 12px;
    display: grid;
    gap: 8px;
    justify-items: start;
    background: #fbfcfd;
    border: 1px solid #e4e9ef;
    border-radius: 8px;
}

.notification-incident-description h3 {
    margin: 0;
    color: #25313b;
    font-size: 14px;
    line-height: 1.25;
    letter-spacing: 0;
}

.notification-incident-description p {
    width: 100%;
    display: block;
    margin: 0;
    color: #54565A;
    font-size: 14px;
    line-height: 1.45;
    white-space: pre-wrap;
}

.notification-incident-description .incident-documents-list {
    width: 100%;
    justify-items: start;
}

.notification-assignment-panel {
    padding: 12px;
    display: grid;
    gap: 10px;
    background: #ffffff;
    border: 1px solid #e0e3e7;
    border-radius: 8px;
}

.notification-assignment-panel h3 {
    margin: 0;
    color: #25313b;
    font-size: 14px;
    line-height: 1.25;
    letter-spacing: 0;
}

.notification-assignment-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 10px;
}

.notification-assignment-form .form-field input,
.notification-assignment-form .form-field select {
    width: 100%;
    min-height: 39px;
    padding: 9px 12px;
    color: #0f1720;
    background: #ffffff;
    border: 1px solid #c7d0dc;
    border-radius: 7px;
    font-size: 14px;
    line-height: 1.2;
    outline: none;
}

.notification-assignment-form .form-field input:focus,
.notification-assignment-form .form-field select:focus {
    border-color: var(--brand-color);
    box-shadow: 0 0 0 3px var(--brand-color-soft);
}

.notification-assignment-form .form-field select.is-invalid {
    background: #fff7f7;
    border-color: #c83434;
}

.form-select-combobox {
    position: relative;
    width: 100%;
}

.form-select-combobox-toggle {
    width: 100%;
    min-height: 39px;
    padding: 9px 34px 9px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #0f1720;
    background: #ffffff;
    border: 1px solid #b7c2cf;
    border-radius: 7px;
    font-size: 14px;
    line-height: 1.2;
    text-align: left;
    cursor: pointer;
}

.form-select-combobox-toggle:focus {
    border-color: var(--brand-color);
    box-shadow: 0 0 0 3px var(--brand-color-soft);
    outline: none;
}

.form-select-combobox.is-invalid .form-select-combobox-toggle {
    background: #fff7f7;
    border-color: #c83434;
}

.form-select-combobox.is-disabled .form-select-combobox-toggle {
    color: #69737d;
    background: #f5f7f9;
    cursor: not-allowed;
}

.form-select-combobox-selected {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.form-select-combobox-arrow {
    position: absolute;
    top: 50%;
    right: 14px;
    width: 8px;
    height: 8px;
    color: #69737d;
    border-right: 1.8px solid currentColor;
    border-bottom: 1.8px solid currentColor;
    pointer-events: none;
    transform: translateY(-64%) rotate(45deg);
}

.form-select-combobox-panel {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    z-index: 80;
    width: 100%;
    padding: 8px;
    background: #ffffff;
    border: 1px solid #9fb0c1;
    border-radius: 8px;
    box-shadow: 0 14px 28px rgba(25, 31, 38, 0.15);
}

.form-select-combobox-options {
    max-height: 220px;
    overflow-y: auto;
    display: grid;
    gap: 3px;
}

.form-select-combobox-option {
    width: 100%;
    min-height: 34px;
    padding: 8px 10px;
    color: #25313b;
    background: #ffffff;
    border: 1px solid #c7d0dc;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.2;
    text-align: left;
    cursor: pointer;
}

.form-select-combobox-option:hover,
.form-select-combobox-option:focus,
.form-select-combobox-option.is-selected {
    color: var(--brand-color);
    background: #fff7ef;
    border-color: var(--brand-color);
    outline: none;
}

.form-select-combobox-option:disabled {
    color: #8a949f;
    background: #f6f8fa;
    cursor: not-allowed;
}

.technician-native-select.is-enhanced {
    display: none !important;
}

.technician-combobox {
    position: relative;
    width: 100%;
}

.technician-combobox-toggle {
    width: 100%;
    min-height: 39px;
    padding: 9px 34px 9px 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #0f1720;
    background: #ffffff;
    border: 1px solid #b7c2cf;
    border-radius: 7px;
    font-size: 14px;
    line-height: 1.2;
    text-align: left;
    cursor: pointer;
}

.technician-combobox-toggle:focus {
    border-color: var(--brand-color);
    box-shadow: 0 0 0 3px var(--brand-color-soft);
    outline: none;
}

.technician-native-select.is-invalid + .technician-combobox .technician-combobox-toggle {
    background: #fff7f7;
    border-color: #c83434;
}

.technician-combobox-selected {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.technician-combobox-arrow {
    position: absolute;
    top: 50%;
    right: 14px;
    width: 8px;
    height: 8px;
    color: #69737d;
    border-right: 1.8px solid currentColor;
    border-bottom: 1.8px solid currentColor;
    pointer-events: none;
    transform: translateY(-64%) rotate(45deg);
}

.technician-combobox-panel {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    z-index: 70;
    width: 100%;
    padding: 8px;
    display: grid;
    gap: 7px;
    background: #ffffff;
    border: 1px solid #c7d0dc;
    border-radius: 8px;
    box-shadow: 0 14px 28px rgba(25, 31, 38, 0.15);
}

.technician-combobox-search {
    width: 100%;
    min-height: 34px;
    padding: 7px 10px;
    color: #0f1720;
    background: #fbfcfd;
    border: 1px solid #c7d0dc;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.2;
    outline: none;
}

.technician-combobox-search:focus {
    border-color: var(--brand-color);
    box-shadow: 0 0 0 3px var(--brand-color-soft);
}

.technician-combobox-options {
    max-height: 190px;
    overflow-y: auto;
    display: grid;
    gap: 2px;
}

.technician-combobox-option {
    width: 100%;
    min-height: 32px;
    padding: 8px 9px;
    color: #25313b;
    background: #ffffff;
    border: 1px solid #e4e9ef;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.2;
    text-align: left;
    cursor: pointer;
}

.technician-combobox-option:hover,
.technician-combobox-option.is-selected {
    color: var(--brand-color);
    background: #fff7ef;
    border-color: #f2b579;
}

.technician-combobox-empty {
    padding: 8px 9px;
    color: #7b8490;
    font-size: 13px;
}

.notifications-empty {
    margin: 0;
    padding: 10px;
    color: #69737d;
    background: #fbfcfd;
    border: 1px dashed #d7dde5;
    border-radius: 8px;
    font-size: 13px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.incident-description-field {
    grid-column: 1 / -1;
}

.incident-documents-fieldset {
    grid-column: 1 / -1;
    padding: 14px;
    display: grid;
    gap: 12px;
    background: #ffffff;
    border: 1px dashed #b8c4d0;
    border-radius: 8px;
}

.incident-documents-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #25313b;
    font-size: 14px;
    font-weight: 700;
}

.incident-document-add {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    padding: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-color);
    background: #ffffff;
    border: 1px solid var(--brand-color);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.incident-document-add:hover {
    color: var(--brand-color);
    background: #ffffff;
    border-color: var(--brand-color);
    box-shadow: 0 0 0 3px var(--brand-color-soft);
}

.incident-document-add svg {
    width: 100%;
    height: 100%;
    display: block;
}

.incident-document-rows {
    display: grid;
    gap: 10px;
}

.incident-documents-empty {
    margin: 0;
    padding: 10px;
    color: #69737d;
    background: #fbfcfd;
    border: 1px dashed #c7d0dc;
    border-radius: 7px;
    font-size: 12px;
    line-height: 1.35;
}

.incident-existing-documents {
    display: grid;
    gap: 8px;
}

.incident-existing-documents-empty {
    margin: 0;
    color: #7b8490;
    font-size: 12px;
    line-height: 1.3;
}

.incident-existing-document-list {
    display: grid;
    gap: 8px;
}

.incident-existing-document {
    min-width: 0;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: #fbfcfd;
    border: 1px solid #e4e9ef;
    border-radius: 7px;
}

.incident-existing-document-remove {
    position: relative;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    padding: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #c83434;
    background: #ffffff;
    border: 1px solid #c83434;
    border-radius: 6px;
    cursor: pointer;
}

.incident-existing-document-remove:hover {
    color: #c83434;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(200, 52, 52, 0.16);
}

.incident-existing-document-remove input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.incident-existing-document-remove img,
.incident-existing-document-remove svg {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.incident-existing-document.is-marked-for-removal,
.incident-existing-document:has(.incident-existing-document-remove input:checked) {
    background: #fff4f4;
    border-color: #efb4b4;
}

.incident-existing-document.is-marked-for-removal .incident-document-link,
.incident-existing-document:has(.incident-existing-document-remove input:checked) .incident-document-link {
    color: #8a1f1f;
    text-decoration: line-through;
}

.incident-document-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 38px;
    align-items: end;
    gap: 10px;
    padding: 10px;
    background: #fbfcfd;
    border: 1px solid #e4e9ef;
    border-radius: 8px;
}

.incident-document-remove {
    position: relative;
    width: 38px;
    height: 39px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #9b2424;
    background: #ffffff;
    border: 1px solid #e1b8b8;
    border-radius: 7px;
    font-size: 0;
    line-height: 0;
    cursor: pointer;
}

.incident-document-remove::before {
    content: "\00d7";
    position: absolute;
    top: 43%;
    left: 50%;
    font-size: 24px;
    line-height: 1;
    transform: translate(-50%, -54%);
}

.incident-document-remove:hover {
    color: #ffffff;
    background: #c83434;
    border-color: #c83434;
}

.incident-document-input::file-selector-button {
    min-height: 30px;
    margin-right: 10px;
    padding: 0 12px;
    color: #47515c;
    background: #f1f4f7;
    border: 1px solid #d7dde5;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
}

.incident-document-input::file-selector-button:hover {
    color: var(--brand-color);
    border-color: var(--brand-color);
}

.aux-table {
    min-width: 520px;
}

.aux-inline-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
}

.aux-inline-form input {
    width: 100%;
    min-height: 38px;
    padding: 9px 12px;
    color: #0f1720;
    background: #ffffff;
    border: 1px solid #c7d0dc;
    border-radius: 7px;
    font-size: 14px;
    line-height: 1.2;
    outline: none;
}

.aux-inline-form input:focus {
    border-color: var(--brand-color);
    box-shadow: 0 0 0 3px var(--brand-color-soft);
}

.aux-inline-form input.is-invalid {
    background: #fff7f7;
    border-color: #c83434;
}

.aux-actions-cell {
    width: 120px;
    white-space: nowrap;
}

.aux-actions-cell .user-edit-button,
.aux-actions-cell .user-delete-button {
    vertical-align: middle;
}

.aux-delete-form {
    margin: 0 0 0 6px;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    line-height: 0;
}

.user-create-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.status-detail-actions {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #e4e9ef;
}

.user-cancel-button {
    min-height: 38px;
    padding: 0 15px;
    color: #54565A;
    background: #ffffff;
    border: 1px solid #c7d0dc;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.user-cancel-button:hover {
    color: var(--brand-color);
    border-color: var(--brand-color);
}

.user-add-button,
.user-edit-button,
.user-password-button,
.user-delete-button {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    margin: 0;
    padding: 5px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-color);
    background: #ffffff;
    border: 1px solid var(--brand-color);
    border-radius: 7px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.user-add-button img,
.user-add-button svg,
.user-edit-button img,
.user-password-button img,
.user-delete-button img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

.user-add-button-label {
    display: none;
}

.user-back-icon {
    width: 100%;
    height: 100%;
    display: none;
}

.user-back-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.user-add-button.is-back-button {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    padding: 5px;
    color: var(--brand-color);
    background: #ffffff;
    border: 1px solid var(--brand-color);
    border-radius: 6px;
}

.user-add-button.is-back-button img {
    display: none;
}

.user-add-button.is-back-button .user-back-icon {
    display: block;
}

.user-add-button.is-back-button .user-add-button-label {
    display: none;
}

.user-add-button:hover,
.user-add-button[aria-expanded="true"],
.user-edit-button:hover,
.user-password-button:hover {
    color: var(--brand-color);
    background: #ffffff;
    box-shadow: 0 0 0 3px var(--brand-color-soft);
}

.user-add-button.is-back-button:hover,
.user-add-button.is-back-button[aria-expanded="true"] {
    color: var(--brand-color);
    background: #ffffff;
    box-shadow: 0 0 0 3px var(--brand-color-soft);
}

.aux-header-row .user-add-button.is-back-button {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    padding: 5px;
    border-radius: 6px;
}

.page-title-row .user-add-button {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    padding: 4px;
    border-radius: 6px;
}

.page-title-row .user-add-button.is-back-button {
    position: absolute;
    top: 0;
    right: 0;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    padding: 5px;
}

.user-add-button.users-search-icon-button,
.user-add-button.incident-stats-download {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    padding: 5px;
    border-radius: 6px;
}

.users-actions .users-search-button {
    min-height: 32px;
    padding: 0 11px;
    border-radius: 6px;
    font-size: 12px;
}

.users-actions .users-search-input {
    width: min(100%, 240px);
    flex: 0 1 220px;
    min-height: 32px;
    padding: 6px 9px;
    border-radius: 6px;
    font-size: 12px;
}

.incident-table-search .users-search-input,
.incident-history-search .users-search-input {
    width: min(100%, 240px);
    flex: 0 1 220px;
    min-height: 32px;
    padding: 6px 9px;
    border-radius: 6px;
    font-size: 12px;
}

.users-actions .users-clear-link {
    align-self: center;
    font-size: 12px;
}

.incident-table-search .users-clear-link,
.incident-history-search .users-clear-link {
    align-self: center;
    font-size: 12px;
}

.user-delete-button {
    color: #c83434;
    border-color: #c83434;
}

.user-delete-button:hover {
    color: #c83434;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(200, 52, 52, 0.16);
}

.users-content.is-creating .users-toolbar,
.users-content.is-creating .table-wrapper,
.users-content.is-creating .users-pagination,
.incidents-content.is-creating .users-toolbar,
.incidents-content.is-creating .incident-stats-panel,
.incidents-content.is-creating .incident-table-panel,
.incidents-content.is-creating .incident-history-panel,
.incidents-content.is-creating .incident-table-title-row .user-add-button,
.incidents-content.is-creating .table-wrapper,
.incidents-content.is-creating .users-pagination {
    display: none;
}

.incident-header-back-button {
    flex: 0 0 auto;
}

.table-wrapper {
    width: 100%;
    overflow-x: auto;
    background: #ffffff;
    border: 1px solid #e0e3e7;
    border-radius: 8px;
}

.users-pagination {
    margin-top: 14px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.users-page-link {
    min-width: 38px;
    min-height: 36px;
    padding: 8px 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #54565A;
    background: #ffffff;
    border: 1px solid #c7d0dc;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
}

.users-page-link:hover {
    color: var(--brand-color);
    border-color: var(--brand-color);
}

.users-page-link.is-active {
    color: #ffffff;
    background: var(--brand-color);
    border-color: var(--brand-color);
}

.users-page-link.is-disabled {
    color: #9aa3ad;
    background: #f6f7f8;
    cursor: default;
}

.users-table {
    width: 100%;
    min-width: 1020px;
    border-collapse: collapse;
}

.incidents-table {
    min-width: 1120px;
}

.users-table th,
.users-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #edf0f2;
    text-align: left;
    vertical-align: middle;
}

.users-table th {
    font-size: 12px;
}

.users-table td {
    font-size: 12px;
}

.users-table td a,
.users-table td span,
.users-table td button {
    font-size: 12px;
}

.users-table th {
    color: #25313b;
    background: #f6f7f8;
    font-weight: 700;
}

.sort-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: inherit;
    text-decoration: none;
}

.sort-link:hover,
.sort-link.is-active {
    color: var(--brand-color);
}

.sort-indicator {
    min-width: 12px;
    font-size: 12px;
    line-height: 1;
}

.users-table tbody tr:last-child td {
    border-bottom: 0;
}

.users-table tbody tr:hover td {
    background: #fff7ef;
}

.empty-table {
    color: #5c6570;
    text-align: center !important;
}

.users-actions-cell {
    width: 240px;
    white-space: nowrap;
}

.incidents-actions-cell {
    width: 104px;
}

.incidents-description {
    max-width: 340px;
    white-space: normal;
}

.incident-documents-list {
    display: grid;
    gap: 5px;
}

.incident-document-item {
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
}

.incident-document-type {
    padding: 3px 7px;
    color: #47515c;
    background: #f1f4f7;
    border: 1px solid #d7dde5;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.incident-document-link {
    color: var(--brand-color);
    font-size: 12px;
    font-weight: 700;
    overflow-wrap: anywhere;
    text-decoration: none;
}

.incident-document-link:hover {
    color: var(--brand-color-hover);
    text-decoration: underline;
}

.incident-document-name {
    color: #54565A;
    font-size: 12px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.incident-empty-documents {
    color: #7b8490;
    font-size: 12px;
}

.incident-status-badge {
    min-height: 24px;
    padding: 5px 9px;
    display: inline-flex;
    align-items: center;
    color: #47515c;
    background: #eef1f4;
    border: 1px solid #d7dde5;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    white-space: nowrap;
}

.incident-status-badge.is-abierta {
    color: #15507d;
    background: #eaf5ff;
    border-color: #b8daf4;
}

.incident-status-badge.is-en-curso {
    color: #6b4a00;
    background: #fff6d8;
    border-color: #f1d47a;
}

.incident-status-badge.is-pendiente {
    color: #7b2f00;
    background: #fff0df;
    border-color: #ffc487;
}

.incident-status-badge.is-realizada {
    color: #1f5a35;
    background: #edf8f0;
    border-color: #bcdcc5;
}

.incident-status-badge.is-unknown,
.incident-status-badge.is-sin-estado {
    color: #47515c;
    background: #eef1f4;
    border-color: #d7dde5;
}

.incidents-table tr:target td {
    background: #fff2e5;
}

.incidents-table .incident-table-row {
    cursor: pointer;
}

.incidents-table .incident-table-row:focus-visible {
    outline: 2px solid var(--brand-color);
    outline-offset: -2px;
}

.incidents-table .incident-table-row:focus-visible td {
    background: #fff7ef;
}

.user-modal-header-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.user-modal-dialog.is-detail {
    width: min(100%, 760px);
}

.incident-detail-subtitle {
    margin: 4px 0 0;
    color: #69737d;
    font-size: 13px;
    line-height: 1.35;
}

.incident-detail-shell {
    display: grid;
    gap: 12px;
}

.incident-detail-grid {
    margin: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.incident-detail-grid div,
.incident-detail-section {
    min-width: 0;
    padding: 10px;
    background: #ffffff;
    border: 1px solid #e4e9ef;
    border-radius: 8px;
}

.incident-detail-grid dt {
    margin: 0 0 5px;
    color: #7b8490;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.1;
}

.incident-detail-grid dd {
    margin: 0;
    color: #202932;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.incident-detail-section {
    display: grid;
    gap: 8px;
}

.incident-detail-section h3 {
    margin: 0;
    color: #1d2932;
    font-size: 14px;
    line-height: 1.2;
}

.incident-detail-section p {
    margin: 0;
    color: #54565A;
    font-size: 13px;
    line-height: 1.45;
    white-space: pre-wrap;
}

.incident-detail-documents {
    display: grid;
    gap: 6px;
    justify-items: start;
}

.incident-detail-documents .incident-document-link,
.incident-detail-documents .incident-document-name {
    width: fit-content;
}

.incident-detail-empty {
    color: #7b8490 !important;
    width: 100%;
    display: block;
    justify-self: stretch;
    text-align: left;
    white-space: normal;
}

.table-action-button {
    min-height: 31px;
    padding: 0 10px;
    color: #54565A;
    background: #ffffff;
    border: 1px solid #c7d0dc;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.table-action-button:hover {
    color: var(--brand-color);
    border-color: var(--brand-color);
}

.table-action-button.is-danger {
    color: #9b2424;
    border-color: #e1b8b8;
}

.table-action-button.is-danger:hover {
    color: #ffffff;
    background: #c83434;
    border-color: #c83434;
}

.user-delete-form {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    line-height: 0;
    margin: 0 0 0 6px;
}

.users-actions-cell .user-edit-button,
.users-actions-cell .user-password-button,
.users-actions-cell .user-delete-button {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    margin: 0 0 0 6px;
    padding: 5px;
    border-radius: 6px;
    vertical-align: middle;
}

.users-actions-cell .user-edit-button {
    margin-left: 0;
}

.users-actions-cell .user-delete-button {
    margin-left: 0;
}

.aux-actions-cell .user-edit-button,
.aux-actions-cell .user-delete-button,
.incidents-actions-cell .user-edit-button {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    padding: 5px;
    border-radius: 6px;
}

.aux-table th {
    padding: 12px 14px;
    font-size: 12px;
    line-height: 1.2;
}

.user-modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.user-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(32, 41, 50, 0.48);
}

.user-modal-dialog {
    position: relative;
    width: min(100%, 520px);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 18px;
    background: #ffffff;
    border: 1px solid #e0e3e7;
    border-radius: 8px;
    box-shadow: 0 20px 44px rgba(25, 31, 38, 0.22);
}

.user-modal-dialog.is-wide {
    width: min(100%, 920px);
}

.user-modal-dialog.is-wide .user-create-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.user-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.user-modal-header h2 {
    margin: 0;
    color: #1d2932;
    font-size: 18px;
    line-height: 1.25;
    letter-spacing: 0;
}

.user-modal-close {
    position: relative;
    width: 32px;
    height: 32px;
    min-width: 32px;
    padding: 0;
    color: #54565A;
    background: #ffffff;
    border: 1px solid #c7d0dc;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0;
    line-height: 0;
    cursor: pointer;
}

.user-modal-close::before {
    content: "\00d7";
    position: absolute;
    top: 43%;
    left: 50%;
    font-size: 24px;
    line-height: 1;
    transform: translate(-50%, -54%);
}

.user-modal-close:hover {
    color: var(--brand-color);
    border-color: var(--brand-color);
}

.user-password-form {
    display: grid;
    gap: 14px;
}

.user-password-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

body.login-page {
    min-height: 100vh;
    margin: 0;
    background: #f6f7f8;
    color: #202932;
    font-family: "Instrument Sans", "Segoe UI", Arial, sans-serif;
}

.login-shell {
    width: min(100% - 32px, 416px);
    min-height: 100vh;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 42px 0 36px;
}

.login-brand {
    margin-bottom: 33px;
    text-align: center;
}

.login-logo {
    display: block;
    width: min(100%, 300px);
    height: auto;
    margin: 0 auto;
}

.login-brand p {
    margin: 10px 0 0;
    color: #6e7781;
    font-size: 13px;
    line-height: 1.35;
}

.login-card {
    width: 100%;
    padding: 32px 32px 34px;
    background: #ffffff;
    border: 1px solid #e0e3e7;
    border-radius: 8px;
    box-shadow: 0 14px 28px rgba(25, 31, 38, 0.13);
}

.login-card h2 {
    margin: 0 0 27px;
    color: #1d2932;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0;
}

.login-form {
    display: grid;
    gap: 18px;
}

.form-field {
    display: grid;
    gap: 7px;
}

.form-field label {
    color: #25313b;
    font-size: 14px;
    font-weight: 500;
}

.form-field input {
    width: 100%;
    min-height: 39px;
    padding: 9px 12px;
    color: #0f1720;
    background: #eaf1fb;
    border: 1px solid #c7d0dc;
    border-radius: 7px;
    font-size: 14px;
    line-height: 1.2;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.form-field input:focus {
    background: #ffffff;
    border-color: var(--brand-color);
    box-shadow: 0 0 0 3px var(--brand-color-soft);
}

.remember-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 1px 0 2px;
}

.remember-row input {
    width: 16px;
    height: 16px;
    margin: 0;
    accent-color: var(--brand-color);
}

.remember-row label {
    color: #5c6570;
    font-size: 13px;
    line-height: 1;
}

.login-button {
    width: 100%;
    min-height: 40px;
    margin-top: 1px;
    color: #ffffff;
    background: var(--brand-color);
    border: 0;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.login-button:hover {
    background: var(--brand-color-hover);
    box-shadow: 0 8px 16px rgba(255, 85, 0, 0.2);
}

.login-button:active {
    transform: translateY(1px);
}

.login-alert {
    margin: -4px 0 0;
    padding: 10px 12px;
    color: #8a1f1f;
    background: #fff0f0;
    border: 1px solid #f1c5c5;
    border-radius: 7px;
    font-size: 13px;
}

.login-footer {
    margin-top: 26px;
    color: #a0a6ad;
    font-size: 12px;
    line-height: 1.3;
    text-align: center;
}

@media (max-width: 550px) {
    .app-header {
        min-height: 42px;
        padding: 4px 8px;
        gap: 8px;
    }

    .app-header-row {
        grid-template-columns: auto minmax(0, 1fr);
        row-gap: 4px;
    }

    .app-brand {
        min-height: 30px;
        padding: 4px 7px;
    }

    .app-nav-cell {
        grid-column: 1 / -1;
        width: 100%;
        justify-self: center;
        transform: none;
    }

    .app-nav-group {
        gap: 2px;
    }

    .app-nav-link {
        min-height: 28px;
        padding: 5px 8px;
        font-size: 13px;
    }

    .app-nav-menu {
        left: 0;
        transform: none;
    }

    .app-logo {
        max-height: 30px;
    }

    .logout-button {
        width: 34px;
        min-width: 34px;
        min-height: 30px;
        padding: 0;
    }

    .app-user-menu {
        gap: 6px;
    }

    .app-user-name {
        max-width: 90px;
    }

    .app-user-identity {
        max-width: 160px;
    }

    .login-shell {
        width: min(100% - 24px, 416px);
        padding: 28px 0 24px;
    }

    .login-card {
        padding: 28px 22px 30px;
    }

    .page-main {
        padding:2% !important;
    }

    .users-header-row {
        display: flex;
        align-items: flex-start;
        flex-direction: column;
    }

    .aux-header-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .aux-actions {
        width: 100%;
        align-items: stretch;
        justify-content: flex-start;
    }

    .aux-actions .users-add-button {
        width: 100%;
    }

    .users-actions {
        width: 100%;
        align-items: stretch;
        justify-content: flex-start;
    }

    .users-toolbar {
        width: 100%;
        justify-content: flex-start;
        margin-left: 0;
    }

    .incident-table-header,
    .incident-history-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .incident-table-actions {
        width: 100%;
        align-items: stretch;
        justify-content: flex-start;
    }

    .incident-completed-filter {
        width: 100%;
        align-self: stretch;
    }

    .incident-completed-filter-label {
        width: 100%;
        justify-content: center;
    }

    .incident-table-title-row .user-add-button {
        flex: 0 0 auto;
    }

    .users-add-button {
        width: 100%;
    }

    .users-actions .users-search-button {
        width: 100%;
    }

    .page-title-row .user-add-button.is-back-button {
        position: static;
        width: 100%;
    }

    .users-search-input {
        width: auto;
        flex: 1 1 auto;
    }

    .users-pagination {
        justify-content: flex-start;
    }

    .notifications-header,
    .notification-detail-header,
    .notification-title-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .notifications-header-actions {
        align-items: flex-start;
        justify-content: flex-start;
    }

    .notification-item {
        grid-template-columns: 34px minmax(0, 1fr);
        align-items: flex-start;
    }

    .notification-detail-button {
        grid-column: 2;
    }

    .notification-detail-meta {
        grid-template-columns: 1fr;
    }

    .aux-create-row,
    .aux-inline-form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .user-create-grid,
    .incident-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

    .user-modal-dialog.is-wide .user-create-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .user-create-grid,
    .incident-form-grid {
        grid-template-columns: 1fr;
    }

    .incident-detail-grid {
        grid-template-columns: 1fr;
    }

    .incident-stats-header,
    .notification-assignment-form {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .incident-stats-header {
        flex-direction: column;
    }

    .incident-stats-actions {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
    }

    .incident-stats-total {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .incident-stats-toggle {
        align-self: center;
    }

    .incident-stats-grid {
        grid-template-columns: 1fr;
    }

    .incident-documents-header,
    .incident-document-row {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .incident-documents-header {
        flex-direction: column;
    }

    .incident-document-remove {
        width: 100%;
    }

    .user-modal-dialog.is-wide .user-create-grid {
        grid-template-columns: 1fr;
    }

    .user-create-actions .users-search-button,
    .notification-assignment-form .users-search-button,
    .user-cancel-button {
        width: 100%;
    }
}
