html, body {
    font-family: 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 14px;
    background-color: #f4f6f9;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1565C0;
    border-color: #0D47A1;
}

.btn-primary:hover {
    background-color: #0D47A1;
    border-color: #0D47A1;
}

.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;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUu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4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.loading-splash {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

.loading-logo {
    width: 120px;
    height: auto;
    margin-bottom: 1rem;
}

.loading-progress-wrapper {
    position: relative;
    width: 8rem;
    height: 8rem;
}

.loading-progress {
    display: block;
    width: 100%;
    height: 100%;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Carregando");
    }

.loading-hint {
    color: #6c757d;
    font-size: 0.9rem;
    margin-top: 1rem;
}

code {
    color: #c02d76;
}

.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;
}

/* ==============================
   Login
   ============================== */

.login-layout {
    min-height: 100vh;
    background: linear-gradient(135deg, #0D47A1 0%, #1565C0 50%, #1976D2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 1rem;
}

.login-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.login-header {
    background: linear-gradient(135deg, #0D47A1, #1565C0);
    color: white;
    padding: 1.5rem 2rem;
    text-align: center;
}

.login-body {
    padding: 2rem;
}

.login-footer {
    padding: 1rem 2rem;
    text-align: center;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

/* ==============================
   Landing Page
   ============================== */

.landing-page {
    min-height: 100vh;
    background: #f4f6f9;
    display: flex;
    flex-direction: column;
}

.landing-hero {
    background: linear-gradient(135deg, #0D47A1 0%, #1565C0 40%, #1976D2 100%);
    color: white;
    padding: 4rem 1.5rem;
    text-align: center;
    flex-shrink: 0;
}

.landing-hero-content {
    max-width: 720px;
    margin: 0 auto;
}

.landing-hero-logo {
    height: 96px;
    margin-bottom: 1.25rem;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
}

.landing-hero-title {
    font-size: 2.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.landing-hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 0.75rem;
}

.landing-hero-desc {
    font-size: 1.05rem;
    opacity: 0.8;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.landing-section {
    padding: 4rem 1.5rem;
    flex: 1;
}

.landing-container {
    max-width: 1200px;
    margin: 0 auto;
}

.landing-section-title {
    text-align: center;
    font-size: 1.75rem;
    font-weight: 700;
    color: #0D47A1;
    margin-bottom: 0.5rem;
}

.landing-section-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 2.5rem;
    font-size: 1.05rem;
}

.landing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.landing-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.landing-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
}

.landing-card-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.landing-card h5 {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.landing-card p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0;
    line-height: 1.5;
}

.landing-section-alt {
    background: #e9edf3;
}

/* Exportação */
.landing-export-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.landing-export-item {
    background: white;
    border-radius: 12px;
    padding: 2.5rem 2rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.landing-export-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
}

.landing-export-icon {
    margin-bottom: 1.25rem;
}

.landing-export-item h5 {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.75rem;
}

.landing-export-item p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0;
    line-height: 1.5;
}

/* Como Funciona */
.landing-steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.landing-step {
    background: white;
    border-radius: 12px;
    padding: 2rem 1.25rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    text-align: center;
    flex: 1;
    min-width: 190px;
    max-width: 260px;
}

.landing-step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0D47A1, #1976D2);
    color: white;
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.landing-step h5 {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.landing-step p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0;
    line-height: 1.5;
}

.landing-step-arrow {
    display: flex;
    align-items: center;
    padding-top: 2rem;
    color: #1565C0;
    font-size: 1.5rem;
}

@media (max-width: 768px) {
    .landing-step-arrow {
        display: none;
    }

    .landing-steps {
        flex-direction: column;
        align-items: center;
    }

    .landing-step {
        max-width: 100%;
    }
}

/* Tipos de Fichas */
.landing-fichas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
}

.landing-ficha-group {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.landing-ficha-group-title {
    font-weight: 600;
    color: #0D47A1;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e3eaf5;
    font-size: 0.95rem;
}

.landing-ficha-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.landing-ficha-list li {
    padding: 0.35rem 0;
    color: #444;
    font-size: 0.9rem;
}

.landing-ficha-list li.landing-ficha-detalhe {
    padding: 0 0 0.35rem 1.75rem;
    color: #888;
    font-size: 0.8rem;
    font-style: italic;
}

/* Seção de Dor / Problema */
.landing-pain-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
}

.landing-pain-item {
    background: #fff8f0;
    border-left: 4px solid #EF6C00;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.landing-pain-item p {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 0;
}

/* Números / Estatísticas */
.landing-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.landing-stat {
    text-align: center;
    padding: 2rem 1rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.landing-stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: #0D47A1;
    line-height: 1.1;
    margin-bottom: 0.5rem;
}

.landing-stat-label {
    display: block;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
}

/* Benefícios */
.landing-benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.landing-benefit {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.landing-benefit:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
}

.landing-benefit h5 {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.landing-benefit p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0;
    line-height: 1.5;
}

/* CTA Final */
.landing-cta-section {
    background: linear-gradient(135deg, #0D47A1 0%, #1565C0 40%, #1976D2 100%);
    padding: 4rem 1.5rem;
}

.landing-cta-box {
    text-align: center;
    max-width: 720px;
    margin: 0 auto;
}

.landing-cta-box h2 {
    color: white;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.landing-cta-box p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}

.landing-footer {
    background: #0D47A1;
    color: rgba(255, 255, 255, 0.7);
    text-align: center;
    padding: 1.5rem;
    font-size: 0.85rem;
}

/* ==============================
   Sidebar
   ==============================

.sidebar {
    background: linear-gradient(180deg, #0D47A1 0%, #1565C0 100%) !important;
}

/* ==============================
   Ordenação de Colunas (Tabelas)
   ============================== */

.coluna-ordenavel {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    transition: color 0.15s ease;
}

.coluna-ordenavel:hover {
    color: var(--bs-primary) !important;
}

/* ==============================
   Tags (Chips)
   ============================== */

.tag-chip {
    font-size: 0.75rem;
    line-height: 1.2;
    padding: 0.2em 0.5em;
    cursor: default;
    position: relative;
}

.tag-chip .tag-remover {
    font-size: 0.5rem;
    opacity: 0;
    transition: opacity 0.15s ease;
    vertical-align: middle;
}

.tag-chip:hover .tag-remover {
    opacity: 1;
}

/* ==============================
   Badges de Status de Fichas
   Cores customizadas por status — cada status tem cor única.
   Usadas via CorBadge() em FichaStatusEnum.
   ============================== */

.badge-status-criado {
    background-color: #6c757d;
    color: #fff;
}

.badge-status-importado {
    background-color: #1565C0;
    color: #fff;
}

.badge-status-disponivel-campo {
    background-color: #EF6C00;
    color: #fff;
}

.badge-status-baixado-campo {
    background-color: #E65100;
    color: #fff;
}

.badge-status-editado-campo {
    background-color: #00838F;
    color: #fff;
}

.badge-status-verificado {
    background-color: #2E7D32;
    color: #fff;
}

.badge-status-conferido {
    background-color: #00695C;
    color: #fff;
}

.badge-status-finalizado {
    background-color: #4527A0;
    color: #fff;
}

.badge-status-editado {
    background-color: #283593;
    color: #fff;
}

.badge-status-revogado {
    background-color: #C62828;
    color: #fff;
}

/* Modal de zoom de fotos — remove padding e ajusta layout */
.foto-zoom-dialog .mud-dialog-content {
    padding: 0 !important;
    overflow: hidden;
}

.foto-zoom-dialog .mud-dialog-title {
    position: absolute;
    right: 0;
    top: 0;
    z-index: 1;
    background: transparent;
    padding: 8px;
}

.foto-zoom-dialog .mud-dialog-title .mud-icon-button {
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
}