/* Shared styling for the NWD admin and customer portals. Loaded from
   _content/Slabsmith.Licensing.Portal.Shared/portal.css by both apps. */

:root {
    --mud-typography-default-family: "Segoe UI", Arial, sans-serif;
}

html,
body {
    background: #f5f6f4;
    color: #1f2725;
    font-family: "Segoe UI", Arial, sans-serif;
}

a,
.btn-link {
    color: #17695c;
}

h1,
h2 {
    color: #1f2725;
    letter-spacing: 0;
    margin: 0;
}

h1 {
    font-size: 1.55rem;
    font-weight: 650;
}

h2 {
    font-size: 1rem;
    font-weight: 650;
}

code {
    color: #37413e;
    font-size: 0.84rem;
}

.content {
    padding: 1.1rem;
}

.surface-section {
    background: #ffffff;
    border: 1px solid #d9dedb;
    border-radius: 6px;
    margin-bottom: 1rem;
    padding: 1rem;
}

.section-header {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.section-header.compact {
    align-items: center;
}

.subtle {
    color: #64706c;
    font-size: 0.86rem;
    margin-top: 0.2rem;
}

.toolbar,
.inline-form,
.identity-switcher {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.inline-form {
    margin-bottom: 1rem;
}

.inline-form .mud-input-control,
.inline-form .mud-picker {
    max-width: 18rem;
}

.inline-form .short-input {
    max-width: 7rem;
}

.identity-switcher {
    justify-content: flex-end;
}

.identity-switcher label {
    color: #4e5b57;
    font-size: 0.82rem;
    font-weight: 600;
}

.identity-switcher input {
    min-width: 18rem;
}

.search-input {
    min-width: 16rem;
}

.metric-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
}

.metric {
    background: #f7f8f6;
    border: 1px solid #dfe4e1;
    border-radius: 6px;
    padding: 0.8rem;
}

.metric span {
    color: #64706c;
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.metric strong {
    display: block;
    font-size: 1.45rem;
    line-height: 1.2;
    margin-top: 0.35rem;
}

.form-grid {
    display: grid;
    gap: 0.8rem;
    grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
}

.data-table .mud-table-cell {
    border-color: #e7ebe8;
}

.data-table th,
.data-table .mud-table-cell.mud-table-head-cell,
.data-table thead .mud-table-cell {
    color: #53605c;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.click-row {
    cursor: pointer;
}

.click-row:hover {
    background: #f1f5f3;
}

.status-pill,
.data-chip,
.count-label {
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.76rem;
    font-weight: 700;
    line-height: 1;
    padding: 0.35rem 0.55rem;
}

.status-good {
    background: #dfeee9;
    color: #16594d;
}

.status-warning {
    background: #fff2cf;
    color: #6b4a00;
}

.status-muted {
    background: #ecefed;
    color: #56625f;
}

.data-chip,
.count-label {
    background: #edf3f1;
    color: #31524b;
}

.chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.tabs {
    border-bottom: 1px solid #d9dedb;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-bottom: 1rem;
}

.tab-button {
    background: transparent;
    border: 0;
    border-bottom: 2px solid transparent;
    color: #4f5b58;
    font-weight: 700;
    padding: 0.65rem 0.8rem;
}

.tab-button.active {
    border-color: #1f7668;
    color: #143d37;
}

.detail-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
}

.summary-list {
    display: grid;
    gap: 0.4rem 1rem;
    grid-template-columns: max-content minmax(0, 1fr);
    margin: 1rem 0 0;
}

.summary-list dt {
    color: #64706c;
    font-weight: 700;
}

.summary-list dd {
    margin: 0;
}

.actions-cell {
    text-align: right;
    white-space: nowrap;
}

.check-line {
    align-items: center;
    display: inline-flex;
    gap: 0.35rem;
    font-weight: 600;
}

.link-button {
    background: transparent;
    border: 0;
    color: #17695c;
    font-size: 0.88rem;
    font-weight: 700;
    margin: 0 0 0.45rem;
    padding: 0;
}

.loading-row,
.empty-row {
    color: #64706c;
    padding: 1rem 0;
}

.table-pager {
    align-items: center;
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 0.5rem;
}

.access-shell {
    align-items: center;
    display: flex;
    min-height: 100vh;
    padding: 1.5rem;
}

.access-panel {
    background: #ffffff;
    border: 1px solid #d9dedb;
    border-radius: 6px;
    margin: 0 auto;
    max-width: 34rem;
    padding: 1.25rem;
    width: 100%;
}

.access-panel p {
    color: #64706c;
    margin: 0.65rem 0 0;
}

.access-local-identity {
    border-top: 1px solid #e5e9e6;
    margin-top: 1rem;
    padding-top: 1rem;
}

.access-local-identity .identity-switcher {
    justify-content: flex-start;
}

.access-action {
    margin-top: 1rem;
}

.blazor-error-boundary {
    background: #b32121;
    color: white;
    padding: 1rem;
}

#blazor-error-ui {
    display: none;
}

@media (min-width: 641px) {
    .content {
        padding: 1.25rem 1.5rem;
    }
}

@media (max-width: 640px) {
    .section-header {
        display: block;
    }

    .toolbar,
    .identity-switcher {
        justify-content: flex-start;
        margin-top: 0.75rem;
    }

    .identity-switcher input,
    .search-input {
        min-width: 100%;
        width: 100%;
    }

    .inline-form .mud-input-control,
    .inline-form .mud-picker {
        max-width: none;
    }
}
