html, body {
    background: #f4f6f8;
    color: #1d2733;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.alert-danger {
    background: #fff1f1;
    border-color: #ffc9c9;
    color: #8a1f1f;
}

.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.25rem;
    min-width: 0;
}

h1 {
    color: #182230;
    font-size: 1.65rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

h2 {
    color: #27364a;
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: .85rem;
}

.metric-grid {
    display: grid;
    gap: .9rem;
    grid-template-columns: repeat(6, minmax(140px, 1fr));
    margin-bottom: 1rem;
}

.metric {
    background: #ffffff;
    border: 1px solid #d8e0ea;
    border-radius: 8px;
    padding: .9rem 1rem;
}

.metric-link {
    color: inherit;
    display: block;
    text-decoration: none;
}

.metric-link:hover,
.metric-link:focus {
    border-color: #1b6ec2;
    box-shadow: 0 8px 24px rgba(27, 110, 194, .12);
}

.metric span {
    color: #526174;
    display: block;
    font-size: .84rem;
}

.metric strong {
    color: #16202d;
    display: block;
    font-size: 1.8rem;
    line-height: 1.15;
}

.metric.urgent strong {
    color: #b42318;
}

.two-column,
.workspace {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
    min-width: 0;
}

.workspace-single {
    grid-template-columns: minmax(0, 1fr);
}

.panel {
    background: #ffffff;
    border: 1px solid #d8e0ea;
    border-radius: 8px;
    min-width: 0;
    padding: 1rem;
}

.form-grid {
    display: grid;
    gap: .8rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: .9rem;
}

.form-grid label {
    color: #465568;
    font-size: .86rem;
    font-weight: 600;
}

.form-grid .wide {
    grid-column: 1 / -1;
}

.table {
    margin-bottom: 0;
}

.table th {
    color: #526174;
    font-size: .78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.table td {
    color: #1d2733;
    vertical-align: middle;
}

.table-link {
    color: #006bb7;
    font-weight: 700;
    text-decoration: none;
}

.table-link:hover,
.table-link:focus {
    color: #004f87;
    text-decoration: underline;
}

.empty-state {
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    color: #526174;
    margin: 0;
    padding: 1rem;
    text-align: center;
}

.table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
}

.compact td,
.compact th {
    padding: .45rem .5rem;
}

.management-users-toolbar {
    align-items: end;
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    justify-content: space-between;
    margin-bottom: .75rem;
}

.management-users-toolbar label {
    color: #465568;
    display: grid;
    font-size: .82rem;
    font-weight: 700;
    gap: .25rem;
    min-width: 12rem;
}

.management-users-toolbar span {
    color: #526174;
    font-size: .84rem;
    font-weight: 700;
}

.management-users-table td,
.management-users-table th {
    vertical-align: top;
}

.management-users-table .form-select-sm,
.management-users-table .form-control-sm {
    min-width: 9rem;
}

.link-button {
    background: transparent;
    border: 0;
    color: #006bb7;
    font: inherit;
    font-weight: 700;
    padding: 0;
    text-align: left;
}

.link-button:hover,
.link-button:focus {
    color: #004f87;
    text-decoration: underline;
}

.status {
    background: #e8f0fe;
    border: 1px solid #c6d7fb;
    border-radius: 999px;
    color: #1b4d9b;
    display: inline-flex;
    font-size: .78rem;
    font-weight: 700;
    line-height: 1;
    padding: .28rem .5rem;
}

.status-success {
    background: #e6f4ea;
    border-color: #b7dfc4;
    color: #137333;
}

.status-muted {
    background: #f1f3f4;
    border-color: #dadce0;
    color: #5f6368;
}

.top-row {
    gap: .75rem;
}

.current-user {
    color: #344054;
    font-size: .88rem;
    font-weight: 700;
    margin-left: auto;
}

.auth-main {
    align-items: center;
    background: #eef2f6;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
}

.login-panel {
    background: #fff;
    border: 1px solid #d8e0ea;
    border-radius: 8px;
    box-shadow: 0 18px 44px rgba(18, 32, 48, .1);
    display: grid;
    gap: 1rem;
    max-width: 430px;
    padding: 1.4rem;
    width: min(430px, calc(100vw - 2rem));
}

.login-panel h1 {
    margin-bottom: .35rem;
}

.login-panel p {
    color: #526174;
    margin: 0;
}

.login-kicker {
    align-items: center;
    color: #1b6ec2;
    display: inline-flex;
    font-size: .78rem;
    gap: .5rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.login-kicker .brand-logo {
    height: 2.4rem;
    object-fit: contain;
    width: 2.4rem;
}

.login-form {
    display: grid;
    gap: .8rem;
    margin-bottom: 1rem;
}

.login-form label {
    align-items: center;
    color: #526174;
    display: grid;
    font-size: .86rem;
    font-weight: 600;
    gap: .45rem;
}

.role-chip {
    background: #edf7ed;
    border: 1px solid #c8e6c9;
    border-radius: 999px;
    color: #1b5e20;
    font-size: .78rem;
    font-weight: 700;
    padding: .3rem .6rem;
}

.context-line {
    color: #526174;
    font-size: .9rem;
    margin-bottom: 1rem;
}

.page-title-row {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.details-grid {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    margin-bottom: 1rem;
}

.details-grid dt {
    color: #526174;
    font-weight: 700;
}

.details-grid dd {
    margin-bottom: .55rem;
}

.dev-popup-backdrop {
    align-items: flex-start;
    background: rgba(15, 23, 42, .38);
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 5rem 1rem 1rem;
    position: fixed;
    z-index: 30;
}

.dev-popup {
    background: #fff;
    border: 1px solid #d8e0ea;
    border-radius: 8px;
    box-shadow: 0 24px 64px rgba(15, 23, 42, .24);
    display: grid;
    gap: 1rem;
    max-width: 28rem;
    padding: 1rem;
    width: min(28rem, calc(100vw - 2rem));
}

.dev-popup h2 {
    margin-bottom: .35rem;
}

.dev-popup p {
    color: #465568;
    margin: 0;
}

.dev-popup-success {
    border-top: 4px solid #23a455;
}

.dev-popup-error {
    border-top: 4px solid #b42318;
}

.lead-contact-list {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: grid;
    margin-bottom: 1rem;
    overflow: hidden;
}

.lead-contact-row {
    align-items: center;
    border-bottom: 1px solid #eef1f5;
    display: grid;
    gap: .7rem;
    grid-template-columns: 100px minmax(0, 1fr) minmax(120px, auto);
    padding: .65rem .75rem;
}

.lead-contact-row:last-child {
    border-bottom: 0;
}

.lead-contact-row span {
    color: #526174;
    font-size: .86rem;
}

.lead-contact-row strong {
    color: #1d2733;
    font-weight: 700;
}

.lead-comment {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    margin-bottom: 1rem;
    padding: .75rem;
}

.lead-comment p {
    margin: .35rem 0 0;
}

.field-block {
    color: #465568;
    display: block;
    font-size: .86rem;
    font-weight: 600;
    margin-bottom: .75rem;
}

.inline-form {
    display: flex;
    gap: .75rem;
}

.filter-bar {
    align-items: end;
    display: grid;
    gap: .6rem;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    margin-bottom: .85rem;
}

.filter-bar label {
    color: #465568;
    font-size: .82rem;
    font-weight: 600;
}

.section-gap {
    margin-top: 1rem;
}

.section-gap-small {
    margin-top: .75rem;
}

.timeline {
    display: grid;
    gap: .75rem;
    margin-top: 1rem;
}

.timeline-item {
    border-left: 3px solid #8fb3e8;
    padding-left: .75rem;
}

.timeline-item span {
    color: #526174;
    display: block;
    font-size: .78rem;
}

.timeline-item p {
    margin: .3rem 0 0;
}

.table-actions {
    white-space: nowrap;
}

.pagination-bar {
    align-items: center;
    border-top: 1px solid #eef1f5;
    color: #526174;
    display: flex;
    font-size: .86rem;
    gap: .75rem;
    justify-content: space-between;
    margin-top: .75rem;
    padding-top: .75rem;
}

.pagination-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: flex-end;
}

.pagination-actions span {
    color: #344054;
    font-weight: 700;
}

@media (max-width: 640.98px) {
    .pagination-bar {
        align-items: flex-start;
        flex-direction: column;
    }

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

.calendar-strip {
    display: flex;
    gap: .5rem;
    overflow-x: auto;
    padding-bottom: .75rem;
}

.day-pill {
    background: #fff;
    border: 1px solid #d8e0ea;
    border-radius: 8px;
    color: #344054;
    min-width: 5.25rem;
    padding: .55rem .65rem;
    text-align: left;
}

.day-pill span {
    color: #667085;
    display: block;
    font-size: .78rem;
}

.day-pill.active {
    border-color: #1b6ec2;
    box-shadow: inset 0 0 0 1px #1b6ec2;
}

.lesson-block,
.funnel-block,
.duplicate-row {
    border: 1px solid #e1e7ef;
    border-radius: 8px;
    margin-bottom: .75rem;
    padding: .85rem;
}

.lesson-head {
    align-items: flex-start;
    display: flex;
    gap: .75rem;
    justify-content: space-between;
    margin-bottom: .65rem;
}

.lesson-head span,
.duplicate-row span {
    color: #526174;
    display: block;
    font-size: .84rem;
}

.attendance-table {
    table-layout: fixed;
    width: 100%;
}

.attendance-client-column {
    width: 43%;
}

.attendance-status-column {
    width: 26%;
}

.attendance-actions-column {
    width: 31%;
}

.attendance-client-cell,
.attendance-status-cell {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.attendance-actions {
    align-items: center;
    justify-content: flex-start;
}

.check-grid {
    display: grid;
    gap: .45rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 16rem;
    overflow: auto;
}

.check-row {
    align-items: center;
    display: flex;
    gap: .45rem;
}

.stage-list {
    margin-bottom: 0;
    padding-left: 1.25rem;
}

.stage-list li + li {
    margin-top: .3rem;
}

.funnel-edit-target {
    align-items: center;
    display: inline-flex;
    gap: .35rem;
    min-width: 0;
}

.stage-edit-target {
    max-width: 100%;
}

.funnel-edit-pencil {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 5px;
    color: #526174;
    display: inline-flex;
    font-size: 1rem;
    height: 1.65rem;
    justify-content: center;
    opacity: 0;
    padding: 0;
    transition: background-color .15s ease, color .15s ease, opacity .15s ease;
    width: 1.65rem;
}

.funnel-edit-target:hover .funnel-edit-pencil,
.funnel-edit-target:focus-within .funnel-edit-pencil,
.funnel-edit-pencil:focus-visible {
    opacity: 1;
}

.funnel-edit-pencil:hover,
.funnel-edit-pencil:focus-visible {
    background: #eef4fb;
    color: #006bb7;
}

.funnel-edit-form {
    margin-top: .75rem;
}

.funnel-order-control {
    color: #465568;
    display: grid;
    font-size: .86rem;
    font-weight: 600;
    gap: .4rem;
}

.danger-confirmation {
    background: #fff7f6;
    border: 1px solid #f2b8b5;
    border-radius: 8px;
    margin-top: 1rem;
    padding: .85rem;
}

.danger-confirmation p {
    color: #6b2a28;
    margin: .4rem 0 .75rem;
}

@media (hover: none) {
    .funnel-edit-pencil {
        opacity: 1;
    }
}

.funnel-workspace {
    background: #fbfcfe;
    overflow: hidden;
}

.funnel-board-toolbar {
    align-items: end;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(13rem, auto) minmax(18rem, 1fr) auto;
    margin-bottom: 1rem;
}

.funnel-board-heading {
    min-width: 0;
}

.funnel-board-toolbar h2 {
    margin-bottom: .25rem;
}

.funnel-board-toolbar p {
    color: #526174;
    font-size: .88rem;
    margin: 0;
}

.funnel-board-controls {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    justify-content: flex-start;
    min-width: 0;
}

.funnel-board-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    justify-content: flex-end;
}

.funnel-board-controls span {
    background: #eef2f6;
    border: 1px solid #d8e0ea;
    border-radius: 999px;
    color: #465568;
    font-size: .8rem;
    font-weight: 700;
    padding: .32rem .6rem;
    white-space: nowrap;
}

.funnel-select {
    min-width: 17rem;
}

.branch-multiselect {
    color: #465568;
    font-size: .86rem;
    font-weight: 600;
    min-width: 0;
    position: relative;
}

.branch-multiselect-label {
    display: block;
    margin-bottom: .15rem;
}

.branch-multiselect-dropdown {
    position: relative;
}

.branch-multiselect-dropdown > summary {
    cursor: pointer;
    list-style: none;
}

.branch-multiselect-dropdown > summary::-webkit-details-marker {
    display: none;
}

.branch-multiselect-toggle {
    overflow: hidden;
    padding-right: 2rem;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.branch-multiselect-menu {
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, .14);
    display: grid;
    gap: .4rem;
    left: 0;
    margin-top: .25rem;
    max-height: 15rem;
    min-width: 100%;
    overflow-y: auto;
    padding: .65rem;
    position: absolute;
    top: 100%;
    width: max-content;
    z-index: 20;
}

.branch-multiselect-menu .check-row {
    font-weight: 500;
    margin: 0;
    white-space: nowrap;
}

.branch-multiselect-compact {
    min-width: 11rem;
}

.funnel-board-scroll {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: .15rem .15rem .75rem;
    scrollbar-gutter: stable;
}

.funnel-board {
    display: grid;
    gap: .85rem;
    grid-auto-columns: 18.5rem;
    grid-auto-flow: column;
    min-width: max-content;
    width: max-content;
}

.funnel-column {
    --stage-accent: #1b6ec2;
    background: #f8fafc;
    border: 1px solid #d8e0ea;
    border-top: 4px solid var(--stage-accent);
    border-radius: 8px;
    box-shadow: 0 8px 22px rgba(18, 32, 48, .06);
    display: flex;
    flex-direction: column;
    max-height: 38rem;
    min-width: 0;
    padding: .75rem;
}

.funnel-column-drop-target {
    background: color-mix(in srgb, var(--stage-accent) 8%, #f8fafc);
    border-color: color-mix(in srgb, var(--stage-accent) 45%, #d8e0ea);
    box-shadow: 0 10px 26px rgba(18, 32, 48, .1);
}

.funnel-column-head {
    align-items: flex-start;
    display: flex;
    gap: .5rem;
    justify-content: space-between;
    margin-bottom: .55rem;
}

.funnel-column-title {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}

.funnel-column-head h3 {
    color: #182230;
    font-size: .98rem;
    font-weight: 800;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.funnel-column-title > span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.funnel-column-head span,
.funnel-column-empty,
.lead-card span {
    color: #526174;
    font-size: .8rem;
}

.funnel-count {
    align-items: center;
    background: #fff;
    border: 1px solid color-mix(in srgb, var(--stage-accent) 35%, #d8e0ea);
    border-radius: 999px;
    color: var(--stage-accent) !important;
    display: inline-flex;
    font-weight: 800;
    justify-content: center;
    min-width: 2rem;
    padding: .25rem .45rem;
}

.funnel-column-tools {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    gap: .35rem;
}

.funnel-column-tools .btn {
    align-items: center;
    display: inline-flex;
    font-weight: 800;
    height: 2rem;
    justify-content: center;
    padding: 0;
    width: 2rem;
}

.stage-kind {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 6px;
    color: #9a3412;
    font-size: .76rem;
    font-weight: 800;
    margin-bottom: .6rem;
    padding: .32rem .45rem;
}

.stage-kind-success {
    background: #ecfdf3;
    border-color: #bbf7d0;
    color: #166534;
}

.funnel-column-body {
    overflow-y: auto;
    padding-right: .15rem;
}

.funnel-column-empty {
    background: #fff;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    padding: .85rem;
    text-align: center;
}

.lead-card {
    background: #fff;
    border: 1px solid #d8e0ea;
    border-left: 3px solid var(--stage-accent);
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(18, 32, 48, .05);
    display: grid;
    gap: .5rem;
    cursor: grab;
    margin-bottom: .6rem;
    padding: .72rem;
}

.lead-card:active {
    cursor: grabbing;
}

.lead-card-dragging {
    opacity: .58;
}

.lead-card-main,
.lead-card-meta {
    display: grid;
    gap: .2rem;
    min-width: 0;
}

.lead-card span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lead-card strong {
    color: #182230;
    overflow-wrap: anywhere;
}

.lead-card-title {
    color: #182230;
    display: block;
    font-weight: 800;
    overflow: hidden;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lead-card-title:hover,
.lead-card-title:focus {
    color: #006bb7;
    text-decoration: underline;
}

.lead-card-meta {
    align-items: center;
    grid-template-columns: minmax(0, 1fr) auto;
}

.lead-card-meta span:first-child {
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 999px;
    color: #1f2a5c;
    font-weight: 700;
    padding: .22rem .45rem;
}

.lead-card-actions {
    display: grid;
    gap: .35rem;
    grid-template-columns: 2.35rem minmax(0, 1fr) 2.35rem;
}

.lead-card-actions-incoming {
    grid-template-columns: minmax(0, 1fr) 2.35rem;
}

.lead-card-actions .btn {
    min-height: 2rem;
    min-width: 0;
    overflow: hidden;
    padding-left: .45rem;
    padding-right: .45rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.board-action-panel {
    background: #fff;
    border: 1px solid #d8e0ea;
    border-left: 4px solid #1b6ec2;
    border-radius: 8px;
    box-shadow: 0 8px 22px rgba(18, 32, 48, .06);
    margin-bottom: 1rem;
    padding: .9rem;
}

.board-action-panel .filter-bar {
    margin-bottom: .75rem;
}

.existing-lead-list {
    display: grid;
    gap: .5rem;
    margin-bottom: .75rem;
}

.existing-lead-row {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e1e7ef;
    border-radius: 8px;
    display: flex;
    gap: .75rem;
    justify-content: space-between;
    padding: .65rem .75rem;
}

.existing-lead-row div {
    display: grid;
    gap: .15rem;
    min-width: 0;
}

.existing-lead-row strong,
.existing-lead-row span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.existing-lead-row span {
    color: #526174;
    font-size: .82rem;
}

@media (max-width: 640.98px) {
    .funnel-board-toolbar {
        align-items: stretch;
        grid-template-columns: minmax(0, 1fr);
    }

    .funnel-board-controls,
    .funnel-board-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .funnel-select {
        min-width: 0;
        width: 100%;
    }

    .existing-lead-row {
        align-items: stretch;
        flex-direction: column;
    }
}

.utility-box {
    border: 1px solid #e1e7ef;
    border-radius: 8px;
    margin-bottom: 1rem;
    padding: .85rem;
}

.panel-title-row {
    align-items: center;
    display: flex;
    gap: .75rem;
    justify-content: space-between;
    margin-bottom: .85rem;
}

.panel-title-row h2 {
    margin-bottom: 0;
}

.webhook-log-controls {
    align-items: center;
    display: flex;
    gap: .5rem;
}

.webhook-log-controls .form-select {
    min-width: 8rem;
}

.webhook-log-table {
    font-size: .88rem;
}

.webhook-log-body {
    background: #f6f8fb;
    border: 1px solid #dfe7f1;
    border-radius: 6px;
    color: #162033;
    margin: .5rem 0 0;
    max-height: 18rem;
    overflow: auto;
    padding: .65rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.webhook-log-dialog .panel-title-row {
    margin-bottom: .75rem;
}

.webhook-log-dialog-body {
    max-height: min(65dvh, 34rem);
    margin: 0;
}

.appeal-comment {
    white-space: pre-line;
}

.segmented-control {
    background: #eef2f6;
    border: 1px solid #d8e0ea;
    border-radius: 8px;
    display: inline-flex;
    padding: .15rem;
}

.segmented-control button {
    background: transparent;
    border: 0;
    border-radius: 6px;
    color: #465568;
    font-size: .8rem;
    font-weight: 700;
    padding: .32rem .55rem;
}

.segmented-control button.active {
    background: #fff;
    box-shadow: 0 1px 4px rgba(16, 24, 40, .12);
    color: #1b4d9b;
}

.page-tabs {
    margin-bottom: 1rem;
}

.app-modal-backdrop {
    align-items: center;
    background: rgba(15, 23, 42, .35);
    display: flex;
    inset: 0;
    justify-content: center;
    padding: 1rem;
    position: fixed;
    z-index: 30;
}

.app-modal-panel {
    background: #fff;
    border: 1px solid #d8e0ea;
    border-radius: 8px;
    box-shadow: 0 24px 64px rgba(15, 23, 42, .22);
    max-height: calc(100dvh - 2rem);
    overflow-y: auto;
    padding: 1rem;
    width: min(620px, calc(100vw - 2rem));
}

.app-modal-panel-wide {
    width: min(760px, calc(100vw - 2rem));
}

.bar-row {
    align-items: center;
    display: grid;
    gap: .6rem;
    grid-template-columns: minmax(120px, 1fr) minmax(120px, 2fr) auto;
    margin-bottom: .65rem;
}

.bar-row-link {
    border-radius: 6px;
    color: inherit;
    padding: .15rem .2rem;
    text-decoration: none;
}

.bar-row-link:hover,
.bar-row-link:focus {
    background: #f4f8fd;
}

.bar-row span {
    color: #344054;
    font-size: .88rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bar-track {
    background: #edf1f6;
    border-radius: 999px;
    height: .55rem;
    overflow: hidden;
}

.bar-fill {
    background: #1b6ec2;
    height: 100%;
}

.bar-fill.alt {
    background: #667085;
}

.bar-fill.good {
    background: #208a5d;
}

.bar-fill.danger {
    background: #d92d20;
}

.attendance-track {
    display: flex;
}

.pie-view {
    align-items: center;
    display: grid;
    gap: 1rem;
    grid-template-columns: 150px minmax(0, 1fr);
}

.pie-chart {
    aspect-ratio: 1;
    border: 1px solid #d8e0ea;
    border-radius: 50%;
    box-shadow: inset 0 0 0 18px #fff;
    width: 150px;
}

.pie-legend {
    display: grid;
    gap: .45rem;
}

.pie-legend div,
.pie-legend a {
    align-items: center;
    color: inherit;
    display: grid;
    gap: .45rem;
    grid-template-columns: auto minmax(0, 1fr) auto;
    text-decoration: none;
}

.pie-legend a:hover,
.pie-legend a:focus {
    color: #006bb7;
}

.pie-legend span:nth-child(2) {
    color: #344054;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.attendance-tabs {
    display: flex;
    flex-wrap: wrap;
}

.attendance-toolbar {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.25fr);
    margin-bottom: 1rem;
}

.weekday-checks {
    display: grid;
    gap: .45rem;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.attendance-matrix-panel {
    overflow: hidden;
}

.attendance-group-block {
    border-top: 1px solid #e1e7ef;
    padding: 1rem 0;
}

.attendance-group-block:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.attendance-group-heading {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}

.attendance-group-heading strong,
.attendance-group-heading span {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.attendance-group-actions {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    gap: .4rem;
}

.attendance-group-actions .status {
    flex: 0 0 auto;
}

.attendance-add-child-button {
    align-items: center;
    display: inline-flex;
    font-size: 1rem;
    height: 1.75rem;
    justify-content: center;
    line-height: 1;
    padding: 0;
    width: 1.75rem;
}

.child-picker-search {
    display: grid;
    gap: .3rem;
    margin-bottom: .75rem;
}

.attendance-matrix-scroll {
    overflow-x: auto;
    padding-bottom: .35rem;
}

.attendance-matrix {
    min-width: 980px;
    table-layout: fixed;
}

.attendance-matrix th,
.attendance-matrix td {
    overflow: hidden;
    text-align: center;
}

.attendance-cell-text {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.attendance-matrix .attendance-student-cell,
.attendance-matrix .attendance-student-head {
    text-align: left;
}

.attendance-branch-head {
    width: 8.5rem;
}

.attendance-trainer-head {
    width: 9.5rem;
}

.attendance-time-head {
    width: 7rem;
}

.attendance-student-head {
    width: 12rem;
}

.attendance-total-head {
    width: 5rem;
}

.attendance-day-head {
    border-left: 1px solid #dde5ef !important;
    min-width: 3rem;
    width: 3rem;
}

.attendance-day-head.scheduled {
    background: #eaf7ef;
    color: #137333;
}

.attendance-cell {
    border-left: 1px solid #dde5ef !important;
    height: 2.4rem;
    padding: .25rem !important;
}

.attendance-cell:last-child,
.attendance-day-head:last-child {
    border-right: 1px solid #dde5ef !important;
}

.attendance-cell input,
.attendance-checkbox {
    accent-color: #1b6ec2;
    height: 1.05rem;
    width: 1.05rem;
}

.attendance-cell.inactive {
    background: #f1f4f8;
}

.attendance-cell.scheduled {
    background: #f8fffb;
}

.attendance-cell.present {
    background: #e3f5e8;
}

.attendance-cell.absent {
    background: #fff1f1;
}

.legend-dot {
    border-radius: 999px;
    display: inline-block;
    height: .65rem;
    width: .65rem;
}

.alert {
    border-radius: 8px;
}

@media (max-width: 1200px) {
    .metric-grid {
        grid-template-columns: repeat(3, minmax(140px, 1fr));
    }

    .two-column,
    .workspace {
        grid-template-columns: 1fr;
    }

    .pie-view {
        grid-template-columns: 1fr;
    }

    .attendance-toolbar {
        grid-template-columns: 1fr;
    }

    .weekday-checks {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

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;
}
