html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

body:has(.login-page-photo) {
    background:
        radial-gradient(circle at 50% 100%, rgba(232, 239, 246, 0.92) 0 9%, rgba(232, 239, 246, 0.68) 14%, transparent 31%),
        radial-gradient(circle at 0 50%, rgba(232, 239, 246, 0.9) 0 7%, transparent 22%),
        radial-gradient(circle at 100% 42%, rgba(232, 239, 246, 0.86) 0 7%, transparent 22%),
        linear-gradient(rgba(3, 35, 67, 0.08), rgba(3, 35, 67, 0.08)),
        url("images/backgrounds/login-visa.png") center/cover fixed;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.login-shell {
    width: min(100%, 1010px);
    min-height: 675px;
    display: grid;
    grid-template-columns: 45% 55%;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 12px;
    box-shadow: 0 28px 70px rgba(5, 38, 78, 0.28);
}

.brand-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 76px 28px 58px;
    background: linear-gradient(140deg, #f7fcff 0%, #e3f4ff 52%, #f6fbff 100%);
}

.brand-benefits {
    width: min(100%, 330px);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: auto;
}

.brand-benefits div {
    display: grid;
    justify-items: center;
    gap: 8px;
    text-align: center;
    color: #073b78;
}

.brand-benefits div + div {
    border-left: 1px solid #c8dff2;
}

.brand-benefits small {
    font-size: 0.72rem;
    line-height: 1.25;
    font-weight: 600;
}

.login-brand-title {
    margin-top: 18px;
    margin-bottom: 4px;
    color: #073b78;
    font-size: 0.86rem;
    font-weight: 900;
    line-height: 1.3;
    text-align: center;
}

.form-panel {
    display: grid;
    align-items: center;
    padding: 68px 64px;
    background: #ffffff;
}

.form-content {
    width: min(100%, 425px);
    margin: 0 auto;
}

.form-content h1 {
    margin: 0;
    font-size: clamp(2.8rem, 5vw, 3.75rem);
    line-height: 1;
    color: #073b78;
}

.subtitle {
    margin: 12px 0 36px;
    color: #73839c;
    font-size: 1rem;
}

.field-label {
    display: inline-block;
    margin: 0 0 10px;
    color: #073b78;
    font-size: 0.98rem;
    font-weight: 800;
}

.input-wrap {
    min-height: 52px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    margin-bottom: 24px;
    border: 1px solid #d8e1ee;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 10px 20px rgba(2, 40, 88, 0.04);
}

.input-wrap:focus-within {
    border-color: #83bff1;
    box-shadow: 0 0 0 3px rgba(11, 91, 184, 0.12);
}

.login-input {
    width: 100%;
    min-width: 0;
    height: 50px;
    padding: 0 16px;
    border: 0;
    outline: 0;
    color: #0b2c5c;
    font: inherit;
    background: transparent;
}

.login-input::placeholder {
    color: #8c9bb1;
}

.icon-button {
    min-width: 58px;
    height: 38px;
    margin-right: 6px;
    border: 0;
    border-radius: 6px;
    color: #073b78;
    background: transparent;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 800;
}

.icon-button:hover {
    background: #eef8ff;
}

.validation-message,
.login-error {
    margin: -16px 0 18px;
    color: #b42318;
    font-size: 0.9rem;
    font-weight: 600;
}

.field-error {
    display: none;
}

.field-error.visible {
    display: block;
}

.input-invalid {
    outline: 1px solid #f2a29b;
}

.submit-button {
    width: 100%;
    min-height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 6px;
    border: 0;
    border-radius: 8px;
    color: #ffffff;
    background: linear-gradient(90deg, #073e86, #075fb8);
    box-shadow: 0 14px 28px rgba(4, 70, 146, 0.24);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 800;
}

.login-data-notice {
    margin: 12px 0 0;
    color: #7b8aa1;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.35;
    text-align: center;
}

.login-page-photo {
    min-height: 100vh;
    padding: 24px;
}

.login-shell-photo {
    width: min(100%, 822px);
    min-height: 542px;
    grid-template-columns: 45% 55%;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 28px 80px rgba(5, 32, 66, 0.26);
}

.brand-panel-photo {
    gap: 16px;
    justify-content: center;
    padding: 42px 58px 34px;
    background: #eaf8ff;
}

.logos-card-image {
    width: min(100%, 244px);
    height: 92px;
    object-fit: contain;
    padding: 8px 10px;
    background: #ffffff;
}

.system-card-image {
    width: min(100%, 260px);
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 22px 44px rgba(2, 77, 137, 0.16);
}

.login-app-logo-visa {
    width: min(100%, 260px);
    overflow: hidden;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 22px 44px rgba(2, 77, 137, 0.16);
}

.login-app-logo-visa img {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.login-app-card-visa {
    position: relative;
    width: min(100%, 260px);
    min-height: 260px;
    display: grid;
    align-content: end;
    overflow: hidden;
    padding: 24px 18px 16px;
    border-radius: 8px;
    color: #ffffff;
    background:
        linear-gradient(180deg, rgba(5, 36, 71, 0.08), rgba(5, 36, 71, 0.88)),
        url("images/backgrounds/login-visa.png") center/cover;
    box-shadow: 0 22px 44px rgba(2, 77, 137, 0.16);
}

.login-app-card-visa::before {
    content: "";
    position: absolute;
    inset: 14px 18px auto auto;
    width: 92px;
    height: 92px;
    border: 8px solid rgba(65, 190, 111, 0.86);
    border-left-color: rgba(51, 171, 231, 0.92);
    border-radius: 50%;
}

.visa-card-badge {
    position: absolute;
    top: 22px;
    left: 20px;
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    border: 2px solid rgba(255, 255, 255, 0.72);
    border-radius: 50%;
    background: rgba(2, 61, 123, 0.86);
    font-size: 1.4rem;
    font-weight: 900;
}

.visa-card-copy {
    position: relative;
    z-index: 1;
    text-align: center;
    text-shadow: 0 2px 8px rgba(0, 20, 45, 0.42);
}

.visa-card-copy span {
    display: block;
    font-size: 1.05rem;
    font-weight: 900;
}

.visa-card-copy strong {
    display: block;
    margin-top: -4px;
    font-size: 2.7rem;
    line-height: 0.96;
}

.visa-card-copy small {
    display: block;
    margin-top: 7px;
    font-size: 0.86rem;
    font-weight: 800;
}

.visa-card-strip {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-top: 18px;
}

.visa-card-strip span {
    display: grid;
    place-items: center;
    min-height: 34px;
    border-radius: 999px;
    color: #073b78;
    background: rgba(255, 255, 255, 0.88);
    font-size: 0.62rem;
    font-weight: 900;
}

.brand-benefits-photo {
    width: min(100%, 292px);
    margin-top: 36px;
}

.form-panel-photo {
    padding: 44px 46px;
    background: #ffffff;
}

.form-panel-photo .form-content {
    max-width: 362px;
}

.form-panel-photo h1 {
    margin-bottom: 4px;
    color: #003874;
    font-size: 2.95rem;
}

.form-panel-photo .subtitle {
    margin-bottom: 4px;
    color: #697896;
    font-size: 1rem;
}

.app-version {
    margin: 0 0 26px;
    color: #526887;
    font-size: 0.82rem;
    font-weight: 800;
}

.form-panel-photo .field-label {
    margin-bottom: 10px;
    color: #003874;
    font-weight: 900;
}

.form-panel-photo .input-wrap {
    margin-bottom: 20px;
    background: #edf4ff;
    border-color: #cfdced;
    box-shadow: none;
}

.form-panel-photo .login-input {
    height: 44px;
    padding: 0 16px;
}

.form-panel-photo .submit-button {
    height: 46px;
    margin-top: 4px;
    background: #135baa;
    border-radius: 7px;
    box-shadow: none;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

:root {
    --visa-blue-900: #073b78;
    --visa-green-700: #287a49;
    --visa-surface: #ffffff;
    --visa-surface-soft: #f5f9fb;
    --visa-ink: #11243a;
    --visa-muted: #66758a;
    --visa-line: #d7e1ea;
    --visa-danger: #a52821;
    --visa-shadow: 0 18px 44px rgba(14, 42, 73, 0.13);
}

.app-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    color: var(--visa-ink);
    background: #f5f8fc;
}

.app-page:has(.sidebar-toggle-input:checked) {
    grid-template-columns: 54px minmax(0, 1fr);
}

.sidebar-toggle-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.app-sidebar {
    position: sticky;
    top: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 34px;
    padding: 28px 20px;
    border-right: 1px solid #dbe5f1;
    background: #ffffff;
}

.sidebar-toggle {
    position: absolute;
    top: 14px;
    right: -15px;
    z-index: 2;
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border: 1px solid #cbd8e8;
    border-radius: 50%;
    color: var(--visa-blue-900);
    background: #ffffff;
    cursor: pointer;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 8px 18px rgba(4, 42, 84, 0.14);
}

.sidebar-toggle-closed {
    display: none;
}

.app-page:has(.sidebar-toggle-input:checked) .app-sidebar {
    padding: 18px 10px;
}

.app-page:has(.sidebar-toggle-input:checked) .logo-brand,
.app-page:has(.sidebar-toggle-input:checked) .app-nav,
.app-page:has(.sidebar-toggle-input:checked) .app-credits {
    display: none;
}

.app-page:has(.sidebar-toggle-input:checked) .sidebar-toggle-open {
    display: none;
}

.app-page:has(.sidebar-toggle-input:checked) .sidebar-toggle-closed {
    display: inline;
}

.app-brand {
    display: flex;
    align-items: center;
    color: var(--visa-blue-900);
}

.logo-brand img {
    display: block;
    width: 100%;
    max-width: 228px;
    height: auto;
}

.app-nav {
    display: grid;
    gap: 8px;
}

.app-nav-primary {
    margin-bottom: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid #dbe5f1;
}

.app-nav a {
    padding: 10px 14px;
    border-radius: 8px;
    color: #24466f;
    text-decoration: none;
    text-align: left;
    font: inherit;
    font-size: 0.88rem;
    font-weight: 800;
}

.app-nav-primary a {
    display: block;
    border: 1px solid #cfe1f4;
    color: var(--visa-blue-900);
    background: #eef6ff;
}

.app-nav a:hover,
.app-nav a.active {
    color: var(--visa-blue-900);
    background: #eaf4ff;
}

.app-nav-section {
    margin: 4px 0 8px;
    padding: 0 14px;
    border-top: 1px solid #eef2f7;
    padding-top: 12px;
    color: #027a48;
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.app-credits {
    display: grid;
    gap: 4px;
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid #dbe5f1;
    color: #60748f;
    font-size: 0.72rem;
    font-weight: 800;
}

.app-main {
    min-width: 0;
    padding: 22px;
}

.app-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.topbar-title {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.topbar-title img {
    width: min(34vw, 330px);
    max-height: 76px;
    object-fit: contain;
}

.app-topbar h1 {
    margin: 0;
    color: var(--visa-blue-900);
    font-size: 1.65rem;
}

.app-topbar p {
    margin: 5px 0 0;
    color: var(--visa-muted);
    font-size: 0.95rem;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 14px;
}

.user-summary {
    display: grid;
    gap: 3px;
    min-width: 220px;
    padding: 8px 12px;
    border: 1px solid #ffefb3;
    border-radius: 8px;
    background: #fff8df;
    text-align: right;
}

.user-summary strong,
.user-summary span {
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-summary strong {
    color: #8a5200;
    font-size: 0.88rem;
}

.user-summary span {
    color: #60748f;
    font-size: 0.74rem;
    font-weight: 700;
}

.user-summary label,
.user-summary a {
    justify-self: end;
    color: #8a5200;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 900;
}

.user-summary label:hover,
.user-summary a:hover {
    text-decoration: underline;
}

.visa-page {
    color: var(--visa-ink);
}

.visa-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.35rem;
    padding: 1.5rem 1.75rem;
    border-top: 8px solid #abc4c9;
    border-radius: 8px;
    background: var(--visa-surface);
    box-shadow: var(--visa-shadow);
}

.visa-eyebrow {
    margin: 0 0 0.25rem;
    color: var(--visa-green-700);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.visa-topbar h1 {
    margin: 0;
    color: var(--visa-blue-900);
    font-size: clamp(1.9rem, 4vw, 3rem);
    line-height: 1.05;
}

.occurrence-register-page .visa-topbar h1 {
    font-size: clamp(1.45rem, 2.4vw, 2rem);
}

.occurrences-page .visa-topbar h1 {
    font-size: clamp(1.45rem, 2.4vw, 2rem);
}

.visa-route-pill {
    flex: 0 0 auto;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--visa-line);
    border-radius: 999px;
    color: var(--visa-blue-900);
    background: var(--visa-surface-soft);
    font-size: 0.9rem;
    font-weight: 800;
}

.visa-topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.visa-user-summary {
    display: grid;
    justify-items: end;
    gap: 2px;
    color: var(--visa-blue-900);
}

.visa-user-summary strong,
.visa-user-summary span {
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.visa-user-summary span {
    color: var(--visa-muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.logout-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 18px;
    border: 1px solid #cbd8e8;
    border-radius: 8px;
    color: var(--visa-blue-900);
    background: #ffffff;
    text-decoration: none;
    font-weight: 800;
}

.password-panel {
    display: none;
    grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(130px, 180px)) auto;
    align-items: end;
    gap: 10px;
    margin-bottom: 14px;
    padding: 12px;
    border: 1px solid #ffefb3;
    border-radius: 8px;
    background: #fff8df;
}

.password-toggle-input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.password-toggle-input:checked + .password-panel {
    display: grid;
}

.password-panel.standalone {
    display: grid;
    grid-template-columns: minmax(220px, 1fr);
    max-width: 760px;
    padding: 18px;
}

.password-panel div,
.password-panel label {
    display: grid;
    gap: 7px;
}

.password-panel strong {
    color: #8a5200;
}

.password-panel span,
.password-panel p {
    color: #60748f;
    font-size: 0.78rem;
    font-weight: 800;
}

.password-panel p {
    grid-column: 1 / -1;
    margin: 0;
}

.password-form {
    display: grid;
    grid-column: span 4;
    grid-template-columns: repeat(3, minmax(130px, 180px)) auto;
    gap: 10px;
}

.password-form input {
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid #cbd8e8;
    border-radius: 8px;
    color: var(--visa-ink);
    background: #ffffff;
    font: inherit;
}

.password-form input::placeholder {
    color: #60748f;
}

.password-message.success {
    color: #027a48;
}

.password-message.error {
    color: var(--visa-danger);
}

.primary-action,
.secondary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 18px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 800;
}

.primary-action {
    border: 0;
    color: #ffffff;
    background: #135baa;
}

.primary-action:disabled {
    cursor: wait;
    opacity: 0.72;
}

.secondary-action {
    border: 1px solid #cbd8e8;
    color: var(--visa-blue-900);
    background: #ffffff;
}

.form-section {
    display: grid;
    gap: 12px;
}

.form-section + .form-section {
    margin-top: 14px;
}

.form-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.form-window-tabs {
    display: block;
}

.tab-radio {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    opacity: 0;
    pointer-events: none;
}

.tab-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.tab-label {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border: 1px solid #cbd8e8;
    border-radius: 8px;
    color: var(--visa-blue-900);
    background: #ffffff;
    cursor: pointer;
    font-weight: 800;
}

.tab-panel {
    display: none;
}

#tab-identificacao:checked ~ .tab-labels .tab-label-identificacao,
#tab-tipo:checked ~ .tab-labels .tab-label-tipo,
#tab-glasgow:checked ~ .tab-labels .tab-label-glasgow,
#tab-trauma-tsr:checked ~ .tab-labels .tab-label-trauma-tsr,
#tab-sinais-vitais:checked ~ .tab-labels .tab-label-sinais-vitais,
#tab-destino-vitima:checked ~ .tab-labels .tab-label-destino-vitima,
#tab-observacoes:checked ~ .tab-labels .tab-label-observacoes,
#tab-equipe-visa:checked ~ .tab-labels .tab-label-equipe-visa {
    color: #ffffff;
    border-color: #135baa;
    background: #135baa;
}

#tab-identificacao:checked ~ .tab-panels .tab-panel-identificacao,
#tab-tipo:checked ~ .tab-panels .tab-panel-tipo,
#tab-glasgow:checked ~ .tab-panels .tab-panel-glasgow,
#tab-trauma-tsr:checked ~ .tab-panels .tab-panel-trauma-tsr,
#tab-sinais-vitais:checked ~ .tab-panels .tab-panel-sinais-vitais,
#tab-destino-vitima:checked ~ .tab-panels .tab-panel-destino-vitima,
#tab-observacoes:checked ~ .tab-panels .tab-panel-observacoes,
#tab-equipe-visa:checked ~ .tab-panels .tab-panel-equipe-visa {
    display: grid;
}

.form-tab {
    min-height: 40px;
    padding: 0 16px;
    border: 1px solid #cbd8e8;
    border-radius: 8px;
    color: var(--visa-blue-900);
    background: #ffffff;
    cursor: pointer;
    font-weight: 800;
}

.form-tab.active {
    color: #ffffff;
    border-color: #135baa;
    background: #135baa;
}

.form-section-header,
.form-card {
    border: 1px solid var(--visa-line);
    border-radius: 8px;
    background: var(--visa-surface);
    box-shadow: var(--visa-shadow);
}

.form-section-header {
    padding: 16px 20px;
    border-top: 8px solid #abc4c9;
}

.form-section-header span {
    display: block;
    margin-bottom: 4px;
    color: var(--visa-green-700);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.form-section-header strong {
    color: var(--visa-blue-900);
    font-size: 1.25rem;
}

.occurrence-section .form-section-header {
    padding: 12px 20px;
    border-top: 0;
    background: #b8ccd0;
}

.occurrence-section .form-section-header span {
    margin: 0;
    color: #111827;
    font-size: 0.94rem;
    letter-spacing: 0;
    text-transform: none;
}

.form-card {
    padding: 22px 24px;
}

.form-help-card {
    color: #111827;
    line-height: 1.5;
}

.occurrence-detail {
    display: none;
}

.occurrence-section:has(#categoria-trauma:checked) .occurrence-detail-trauma,
.occurrence-section:has(#categoria-clinico:checked) .occurrence-detail-clinico {
    display: block;
}

.destination-detail {
    display: none;
}

.tab-panel-destino-vitima:has(#destino-unidade-referencia:checked) .destination-detail-unidade-referencia {
    display: block;
}

.tab-panel-destino-vitima:has(#destino-recusou-atendimento:checked) .destination-detail-recusa,
.tab-panel-destino-vitima:has(#destino-recusou-remocao:checked) .destination-detail-recusa {
    display: block;
}

.field-title {
    display: block;
    margin-bottom: 16px;
    color: #111827;
    font-weight: 800;
}

.field-title span {
    color: #d92d20;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    margin: 12px 0;
    color: #111827;
}

.radio-option input {
    width: 17px;
    height: 17px;
}

.clear-answer {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    margin: 14px 0 0 18px;
    padding: 0;
    border: 0;
    color: #9ca3af;
    background: transparent;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 600;
}

.clear-answer:hover {
    color: #6b7280;
    text-decoration: underline;
}

.detail-input {
    width: min(100%, 440px);
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid #cfdced;
    border-radius: 6px;
    color: #203247;
    background: #ffffff;
}

.detail-input:focus {
    border-color: #83bff1;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(11, 91, 184, 0.12);
}

.uppercase-input {
    text-transform: uppercase;
}

.compact-input {
    width: min(100%, 170px);
}

.wide-input {
    width: min(100%, 520px);
}

.notes-input {
    width: min(100%, 720px);
    min-height: 120px;
    padding-top: 12px;
    resize: vertical;
}

.medium-input {
    width: min(100%, 260px);
}

.select-input {
    width: min(100%, 180px);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

.form-message {
    margin: 14px 0 0;
    padding: 14px 16px;
    border: 1px solid #f7c56d;
    border-radius: 8px;
    color: #7a3b00;
    background: #fff7e6;
    font-weight: 700;
}

.form-debug {
    margin: 12px 0 0;
    color: var(--visa-muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.visa-metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.875rem;
    margin-bottom: 1.125rem;
}

.visa-metrics-grid article,
.visa-notice,
.visa-loading-panel,
.visa-table-shell {
    border: 1px solid var(--visa-line);
    border-radius: 8px;
    background: var(--visa-surface);
    box-shadow: var(--visa-shadow);
}

.visa-metrics-grid article {
    padding: 1.25rem 1.375rem;
}

.visa-metrics-grid span {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--visa-muted);
    font-size: 0.86rem;
    font-weight: 700;
}

.visa-metrics-grid strong {
    color: var(--visa-blue-900);
    font-size: 2.2rem;
    line-height: 1;
}

.visa-notice,
.visa-loading-panel {
    padding: 1.375rem;
}

.visa-notice strong {
    color: var(--visa-danger);
}

.visa-notice p {
    margin-bottom: 0;
    color: var(--visa-muted);
}

.visa-table-shell {
    padding: 1rem;
    overflow: hidden;
}

.visa-filter-panel {
    margin-bottom: 1rem;
    padding: 1rem 1.25rem;
    border: 1px solid var(--visa-line);
    border-radius: 8px;
    background: var(--visa-surface);
    box-shadow: var(--visa-shadow);
}

.filter-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--visa-blue-900);
}

.filter-summary strong {
    font-size: 0.86rem;
    text-transform: uppercase;
}

.filter-summary span {
    color: var(--visa-muted);
    font-weight: 800;
}

.filter-fields {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 12px;
}

.filter-field {
    display: grid;
    gap: 6px;
}

.filter-field label {
    color: var(--visa-blue-900);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.filter-action {
    min-height: 42px;
}

.visa-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0 0 1rem;
}

.visa-section-heading h2 {
    margin: 0;
    color: var(--visa-blue-900);
    font-size: 1.1rem;
}

.visa-section-heading small {
    color: var(--visa-muted);
    font-weight: 700;
}

.visa-search-form {
    display: grid;
    gap: 8px;
    max-width: 620px;
    margin-bottom: 1rem;
}

.visa-search-form label {
    color: var(--visa-blue-900);
    font-size: 0.78rem;
    font-weight: 800;
}

.search-row {
    display: block;
}

.search-input {
    width: min(100%, 520px);
}

.visa-table-scroll {
    overflow-x: auto;
    border: 1px solid var(--visa-line);
    border-radius: 6px;
    background: var(--visa-surface);
}

.visa-table-scroll table {
    width: 100%;
    min-width: 1280px;
    border-collapse: separate;
    border-spacing: 0;
}

.visa-table-scroll th,
.visa-table-scroll td {
    padding: 0.48rem 0.75rem;
    border-bottom: 1px solid var(--visa-line);
    border-right: 1px solid rgba(215, 225, 234, 0.62);
    text-align: left;
    vertical-align: middle;
    font-size: 0.86rem;
    line-height: 1.22;
}

.visa-table-scroll th:first-child,
.visa-table-scroll td:first-child {
    border-left: 0;
}

.visa-table-scroll th:last-child,
.visa-table-scroll td:last-child {
    border-right: 0;
}

.visa-table-scroll th {
    color: var(--visa-blue-900);
    background: var(--visa-surface-soft);
    font-size: 0.78rem;
    text-transform: uppercase;
}

.sortable-header {
    display: inline;
    padding: 0;
    border: 0;
    color: inherit;
    background: transparent;
    cursor: pointer;
    font: inherit;
    font-weight: inherit;
    text-decoration: none;
    text-align: left;
    text-transform: inherit;
}

.sortable-header:hover {
    color: #135baa;
    text-decoration: underline;
}

.visa-table-scroll td {
    color: #203247;
}

.visa-table-scroll tfoot td {
    padding: 0.65rem 0.75rem;
    border-bottom: 0;
    color: var(--visa-blue-900);
    background: #f8fafc;
    font-weight: 800;
}

.visa-table-scroll tbody tr.row-trauma,
.visa-table-scroll tbody tr.row-trauma:nth-child(odd),
.visa-table-scroll tbody tr.row-trauma:nth-child(even) {
    background: #fff1f1;
}

.visa-table-scroll tbody tr.row-clinico,
.visa-table-scroll tbody tr.row-clinico:nth-child(odd),
.visa-table-scroll tbody tr.row-clinico:nth-child(even) {
    background: #eefaf6;
}

.visa-table-scroll tbody tr.row-sem-categoria:nth-child(odd) {
    background: #ffffff;
}

.visa-table-scroll tbody tr.row-sem-categoria:nth-child(even) {
    background: #f8fafc;
}

.visa-table-scroll tbody tr:hover {
    background: #fff7cc;
}

.visa-table-scroll tbody tr.row-trauma:hover {
    background: #ffd6d6;
}

.visa-table-scroll tbody tr.row-clinico:hover {
    background: #c9ecdf;
}

.app-info-footer {
    display: grid;
    gap: 4px;
    margin-top: 18px;
    padding: 14px 18px;
    border: 1px solid #d7e1ea;
    border-radius: 8px;
    color: #60748f;
    background: #f8fbff;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.35;
}

.app-info-footer p {
    margin: 0;
}

.app-info-footer strong {
    color: var(--visa-blue-900);
    font-weight: 900;
}

.app-info-footer .lgpd-highlight {
    color: inherit;
    font-weight: 900;
}

.support-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 16px;
    align-items: start;
}

.support-page .visa-table-scroll th,
.support-page .visa-table-scroll td,
.support-page .detail-input,
.support-page .table-action-link,
.support-page .table-action-button,
.support-page .secondary-action,
.support-page .primary-action {
    font-size: 0.8rem;
}

.support-page .visa-section-heading h2 {
    font-size: 1rem;
}

.support-page .visa-section-heading small,
.support-page .visa-search-form label,
.support-page .detail-header span,
.support-page .support-detail-panel label {
    font-size: 0.74rem;
}

.support-page .detail-header strong {
    font-size: 0.95rem;
}

.support-page .visa-topbar h1 {
    font-size: clamp(1.45rem, 2.4vw, 2rem);
}

.support-list-panel {
    min-width: 0;
}

.support-table-scroll table {
    min-width: 720px;
}

.selected-row {
    outline: 2px solid rgba(19, 91, 170, 0.24);
    outline-offset: -2px;
}

.support-detail-panel {
    display: grid;
    gap: 14px;
    padding: 1rem;
    border: 1px solid var(--visa-line);
    border-radius: 8px;
    background: var(--visa-surface);
    box-shadow: var(--visa-shadow);
}

.detail-header {
    display: grid;
    gap: 6px;
}

.detail-header span {
    color: #027a48;
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.detail-header strong {
    color: var(--visa-blue-900);
    font-size: 1rem;
}

.panel-kicker {
    color: #027a48;
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.support-detail-panel > strong {
    color: var(--visa-blue-900);
    font-size: 1.05rem;
}

.support-detail-panel form,
.support-detail-panel label,
.detail-form {
    display: grid;
    gap: 7px;
}

.detail-form {
    gap: 11px;
}

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

.compact-action {
    min-height: 38px;
    padding-inline: 12px;
    white-space: nowrap;
}

.support-detail-panel label {
    color: var(--visa-blue-900);
    font-size: 0.82rem;
    font-weight: 800;
}

.checkbox-line {
    display: flex !important;
    align-items: center;
    gap: 8px !important;
}

.checkbox-line input {
    width: 18px;
    height: 18px;
}

.support-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 4px;
}

.detail-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 4px;
}

.danger-action {
    background: #b91c1c;
}

.table-state {
    min-height: 170px;
    display: grid;
    place-items: center;
    border: 1px dashed #cbd8e8;
    border-radius: 8px;
    color: var(--visa-muted);
    background: #f8fbff;
    font-weight: 800;
}

.table-state.error {
    color: #b42318;
    background: #fff6f4;
}

.support-message {
    margin-bottom: 1rem;
    padding: 0.85rem 1rem;
    border-radius: 8px;
    font-weight: 800;
}

.support-message p {
    margin: 0;
}

.support-message.success {
    border: 1px solid #b7e4c7;
    color: #027a48;
    background: #ecfdf3;
}

.support-message.error {
    border: 1px solid #fecaca;
    color: #991b1b;
    background: #fff1f2;
}

.delete-confirm-panel {
    display: grid;
    gap: 8px;
    margin-top: 4px;
    padding: 12px;
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: #fff1f2;
}

.delete-confirm-panel strong {
    color: #991b1b;
}

.delete-confirm-panel span {
    color: #203247;
    font-weight: 800;
}

.delete-confirm-panel div {
    display: flex;
    gap: 8px;
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.table-action-default,
.table-action-confirm {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.table-action-confirm {
    display: none;
}

.table-actions.confirming-delete .table-action-default {
    display: none;
}

.table-actions.confirming-delete .table-action-confirm {
    display: inline-flex;
}

.table-actions form {
    display: inline-flex;
    margin: 0;
}

.table-action-link,
.table-action-button {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 8px;
    border: 1px solid #cbd8e8;
    border-radius: 6px;
    color: var(--visa-blue-900);
    background: #ffffff;
    cursor: pointer;
    font-size: 0.76rem;
    font-weight: 800;
    text-decoration: none;
}

.table-action-button.danger {
    color: #991b1b;
    border-color: #fecaca;
}

.table-action-button.confirm {
    color: #ffffff;
    border-color: #b91c1c;
    background: #b91c1c;
}

.table-action-link:hover,
.table-action-button:hover {
    background: #f8fafc;
}

@media (max-width: 720px) {
    .app-page {
        grid-template-columns: 1fr;
    }

    .app-page:has(.sidebar-toggle-input:checked) {
        grid-template-columns: 1fr;
    }

    .app-sidebar {
        position: static;
        min-height: auto;
        gap: 14px;
        padding: 18px;
    }

    .sidebar-toggle {
        display: none;
    }

    .app-page:has(.sidebar-toggle-input:checked) .logo-brand,
    .app-page:has(.sidebar-toggle-input:checked) .app-nav,
    .app-page:has(.sidebar-toggle-input:checked) .app-credits {
        display: grid;
    }

    .logo-brand img {
        max-width: 190px;
    }

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

    .app-main {
        padding: 14px;
    }

    .app-topbar,
    .visa-topbar,
    .visa-section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .topbar-title {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .topbar-title img {
        width: min(100%, 260px);
    }

    .topbar-actions,
    .visa-topbar-actions {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
    }

    .user-summary,
    .visa-user-summary {
        justify-items: start;
        text-align: left;
    }

    .visa-metrics-grid {
        grid-template-columns: 1fr;
    }

    .password-panel {
        grid-template-columns: 1fr;
    }

    .password-form {
        grid-column: 1;
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    body:has(.login-page-photo) {
        background-attachment: scroll;
    }

    .login-page {
        padding: 12px;
    }

    .login-shell,
    .login-shell-photo {
        min-height: auto;
        grid-template-columns: 1fr;
        width: min(100%, 460px);
    }

    .brand-panel,
    .brand-panel-photo {
        padding: 28px 24px;
    }

    .brand-benefits {
        margin-top: 18px;
    }

    .form-panel,
    .form-panel-photo {
        padding: 34px 28px;
    }
}
