@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: #f7f4ef;
    color: #1f2937;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #1e5d4d;
}

.btn-primary {
    color: #fff;
    background-color: #2c735d;
    border-color: #2c735d;
}

.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 rgba(44, 115, 93, 0.22);
}

.content {
    padding-top: 1.1rem;
}

.section-eyebrow {
    color: #1f6e59;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.page-intro,
.table-wrapper,
.clients-page .card {
    border-radius: 1.1rem;
}

.clients-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.95rem;
    width: min(100%, 860px);
    align-self: stretch;
}

.alerts-summary-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.95rem;
    width: 100%;
    align-self: stretch;
}

.summary-tile {
    position: relative;
    padding: 1.15rem 1.2rem 1.15rem 1.35rem;
    border-radius: 1.15rem;
    background: linear-gradient(180deg, #fffdfa 0%, #f7f2ea 100%);
    border: 1px solid rgba(217, 209, 197, 0.75);
    box-shadow: 0 10px 26px rgba(30, 41, 59, 0.06);
    min-height: 112px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.15rem;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.summary-tile::before {
    content: "";
    position: absolute;
    left: 0;
    top: 14px;
    bottom: 14px;
    width: 4px;
    border-radius: 999px;
    background: linear-gradient(180deg, #2fa88a 0%, #1f7a63 100%);
}

.summary-tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 34px rgba(31, 41, 55, 0.09);
    border-color: rgba(47, 168, 138, 0.35);
}

.summary-label {
    display: block;
    color: #7a7a73;
    font-size: 0.72rem;
    margin-bottom: 0.2rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.summary-value {
    display: block;
    color: #183c33;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.35;
    word-break: break-word;
}

.table-wrapper {
    overflow: hidden;
}

.table-wrapper-header {
    border-bottom: 1px solid rgba(232, 227, 219, 0.95);
    background: linear-gradient(180deg, rgba(251, 250, 247, 0.98) 0%, rgba(255, 255, 255, 0.98) 100%);
}

.clients-table thead th {
    color: #444b46;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: none;
    background-color: #fbfaf7;
    border-bottom-width: 1px;
    padding: 1rem 1.25rem;
}

.clients-table tbody td {
    padding: 1rem 1.25rem;
    border-color: #ece6dc;
    vertical-align: middle;
}

.clients-table tbody tr:hover {
    background-color: #faf8f3;
}

.client-name {
    color: #1b4036;
    font-weight: 600;
}

.client-meta {
    color: #7b7b73;
    font-size: 0.88rem;
    margin-top: 0.2rem;
}

.filter-label {
    color: #444b46;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: normal;
    text-transform: none;
}

.filter-control {
    min-height: 46px;
    border-color: #e5dfd4;
    border-radius: 0.45rem;
    background-color: #fff;
}

.filter-control:focus {
    border-color: #2c735d;
}

.filter-reset-button {
    min-height: 46px;
    border-radius: 0.45rem;
    border-color: #d5d0c7;
    color: #4b5563;
}

.filter-reset-button:hover {
    background-color: #f5f2ec;
    border-color: #2c735d;
    color: #1f6e59;
}

.status-badge {
    min-width: 96px;
    padding: 0.42rem 0.78rem;
    font-size: 0.78rem;
    font-weight: 500;
}

.status-badge-positive {
    background-color: #dff1e6;
    color: #205941;
}

.status-badge-negative {
    background-color: #f7dcdc;
    color: #a63d3d;
}

.status-badge-warning {
    background-color: #fff2d8;
    color: #a16207;
}

.status-badge-violet {
    background-color: #efe7ff;
    color: #6d28d9;
}

.status-badge-muted {
    background-color: #e8e8e8;
    color: #5f656b;
}

.detail-table thead th {
    white-space: nowrap;
}

.detail-counter {
    min-width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.7rem;
    border-radius: 999px;
    background-color: #edf4f1;
    color: #1f6e59;
    font-size: 0.85rem;
    font-weight: 700;
}

.products-add-button {
    min-height: 44px;
    padding-inline: 1rem;
    border-radius: 0.5rem;
    white-space: nowrap;
}

.dashboard-page {
    color: #1f2937;
}

.dashboard-subtitle {
    max-width: 42rem;
}

.dashboard-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.9rem;
    width: 100%;
}

.dashboard-kpi-value {
    color: #163f35;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
}

.dashboard-kpi-note {
    color: #6b7280;
    font-size: 0.9rem;
    margin-top: 0.45rem;
}

.dashboard-alerts {
    border-radius: 1.1rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(251, 249, 244, 0.98) 100%);
}

.dashboard-alert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 1rem;
}

.dashboard-alert-card {
    padding: 1.15rem;
    border: 1px solid rgba(229, 223, 212, 0.95);
    border-radius: 1rem;
    background: #fffdfa;
    box-shadow: 0 12px 30px rgba(30, 41, 59, 0.04);
    border-left-width: 4px;
    border-left-color: #d7d2c8;
}

.dashboard-alert-card-info {
    border-left-color: #1f7a63;
}

.dashboard-alert-card-warning {
    border-left-color: #f59e0b;
}

.dashboard-alert-card-danger {
    border-left-color: #ef4444;
}

.dashboard-alert-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.8rem;
    margin-bottom: 0.9rem;
}

.dashboard-alert-card-header h3 {
    margin: 0;
    color: #1c4a3e;
    font-size: 1rem;
    font-weight: 700;
}

.dashboard-alert-card-header p {
    margin: 0.2rem 0 0;
    color: #6b7280;
    font-size: 0.88rem;
}

.dashboard-alert-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.dashboard-alert-list li {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.9rem;
    padding: 0.85rem 0.95rem;
    border-radius: 0.85rem;
    background: #f9f6f0;
}

.dashboard-alert-item {
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.dashboard-alert-item:hover {
    transform: translateY(-1px);
    background: #f4efe7;
    box-shadow: 0 10px 20px rgba(31, 41, 55, 0.05);
}

.dashboard-alert-list strong {
    display: block;
    color: #1f2937;
    font-size: 0.95rem;
    font-weight: 600;
}

.dashboard-alert-list span,
.dashboard-alert-list small {
    color: #6b7280;
    font-size: 0.84rem;
}

.dashboard-alert-list small {
    white-space: nowrap;
    text-align: right;
}

.dashboard-empty-state {
    margin: 0;
    padding: 0.9rem 0.95rem;
    border-radius: 0.85rem;
    background: #f9f6f0;
    color: #6b7280;
    font-size: 0.92rem;
}

.alerts-page-grid {
    display: grid;
    gap: 1.25rem;
}

.alerts-section {
    border-radius: 1.1rem;
}

.filter-help-text {
    color: #7b7b73;
    font-size: 0.8rem;
    margin-top: 0.35rem;
}

.export-feedback {
    display: inline-flex;
    align-items: center;
    padding: 0.55rem 0.8rem;
    border-radius: 999px;
    background-color: #e8f3ee;
    color: #1f6e59;
    font-size: 0.88rem;
    font-weight: 500;
}

.dashboard-counter-info {
    background-color: #e3f4ee;
    color: #1f7a63;
}

.dashboard-counter-warning {
    background-color: #fff2d8;
    color: #a16207;
}

.dashboard-counter-danger {
    background-color: #fde3e3;
    color: #b42318;
}

@media (max-width: 767.98px) {
    .page-intro .card-body,
    .clients-page .card .card-body,
    .table-wrapper-header {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .clients-table thead th,
    .clients-table tbody td {
        padding: 0.82rem 0.9rem;
    }

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

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

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

    .dashboard-alert-list li {
        flex-direction: column;
    }

    .dashboard-alert-list small {
        white-space: normal;
        text-align: left;
    }
}

@media (max-width: 575.98px) {
    .products-add-button {
        width: 100%;
    }

    .clients-summary-grid {
        grid-template-columns: 1fr;
        width: 100%;
    }

    .dashboard-kpi-grid {
        grid-template-columns: 1fr;
    }

    .clients-page .clients-table thead th:nth-child(2),
    .clients-page .clients-table tbody td:nth-child(2),
    .clients-page .clients-table thead th:nth-child(4),
    .clients-page .clients-table tbody td:nth-child(4),
    .clients-page .clients-table thead th:nth-child(6),
    .clients-page .clients-table tbody td:nth-child(6) {
        display: none;
    }

    .clients-page .clients-table tbody td {
        font-size: 0.92rem;
    }

    .clients-page .clients-table tbody td:last-child .d-flex {
        flex-direction: column;
        align-items: stretch;
    }

    .clients-page .clients-table tbody td:last-child .btn {
        width: 100%;
    }

    .client-meta {
        font-size: 0.82rem;
    }
}

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

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    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,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNS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2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

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