html, body {
    font-family: 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: #1d2a32;
}

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

.btn-primary {
    color: #fff;
    background-color: #1f5f73;
    border-color: #184b5b;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: #184b5b;
    border-color: #123b48;
    color: #fff;
}

.btn-outline-primary {
    color: #1f5f73;
    border-color: #1f5f73;
}

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

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+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE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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;
}

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

.page-header h1, .hero h1 {
    font-size: 1.85rem;
    margin-bottom: 0.35rem;
}

.lede {
    color: #4b5b63;
    max-width: 46rem;
    margin-bottom: 0;
}

.status-pill {
    border-radius: 999px;
    padding: 0.35rem 0.8rem;
    font-size: 0.85rem;
    white-space: nowrap;
    background: #e8eef0;
}

.status-pill.ok { background: #e4f4ea; color: #1b6b3a; }
.status-pill.warn { background: #fbead2; color: #8a4b00; }

.search-panel, .card-panel {
    background: #f7fafb;
    border: 1px solid #d9e3e7;
    border-radius: 12px;
    padding: 1.1rem;
    margin-bottom: 1.25rem;
}

.result-count { color: #4b5b63; margin: 0.5rem 0; }
.result-list { display: flex; flex-direction: column; gap: 0.5rem; }
.result-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: baseline;
    padding: 0.85rem 1rem;
    border: 1px solid #d9e3e7;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    background: #fff;
}
.result-row:hover { border-color: #1f5f73; }
.crumb { color: #1f5f73; }
.crumb-sep { color: #8aa0a8; }
.result-note { color: #4b5b63; font-size: 0.92rem; }

.stat-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr));
    gap: 0.75rem;
    margin-top: 1.5rem;
}
.stat-row div {
    background: #f7fafb;
    border-radius: 10px;
    padding: 0.85rem;
    color: #4b5b63;
}
.stat-row span { display: block; font-size: 1.4rem; color: #1d2a32; font-weight: 600; }

.hero { max-width: 46rem; padding: 1.5rem 0 2rem; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.78rem; color: #1f5f73; font-weight: 600; }
.hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin: 1.25rem 0; }
.demo-hint { color: #4b5b63; font-size: 0.92rem; }
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 1rem;
}
.feature-grid article {
    border: 1px solid #d9e3e7;
    border-radius: 12px;
    padding: 1rem 1.1rem;
    background: #fff;
}
.feature-grid h2 { font-size: 1.1rem; }

.cabinet-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.add-location-row { display: flex; gap: 0.6rem; margin-bottom: 1.25rem; }
.line-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.line-row .form-label { margin-bottom: 0; white-space: nowrap; }
.line-row select.form-select { flex: 1 1 auto; min-width: 10rem; max-width: 24rem; }
.drawer-meta { display: flex; justify-content: space-between; gap: 1rem; align-items: center; margin-bottom: 0.85rem; flex-wrap: wrap; }

/* Thin breadcrumb strip only — stays pinned above the file list while scrolling,
   without pinning the action buttons too and eating into the file list's visible space. */
.drawer-context {
    position: sticky;
    top: 0;
    z-index: 2;
    background-color: #fff;
    padding: 0.35rem 0;
    border-bottom: 1px solid #d6d5d5;
    font-size: 0.9rem;
}

@media (min-width: 641px) {
    .drawer-context {
        top: 3.5rem; /* stick just below the fixed top-row header */
    }
}
.inline-rename { display: flex; gap: 0.5rem; }
.file-table input.form-control { min-width: 12rem; }
.file-table textarea.form-control { min-width: 12rem; }
.file-table td { vertical-align: middle; }

.print-sheet { display: none; }

@media print {
    body * { visibility: hidden; }
    .print-sheet, .print-sheet * { visibility: visible; }
    .print-sheet {
        display: block;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
    }
    .print-sheet h1 { font-size: 18pt; margin: 0 0 0.08in; }
    .print-sheet .print-sep { color: #4b5b63; }
    .print-meta { font-size: 10pt; color: #4b5b63; margin: 0 0 0.2in; }
    .print-grid {
        column-count: 2;
        column-gap: 0.4in;
    }
    .print-card {
        break-inside: avoid;
        page-break-inside: avoid;
        padding: 0.05in 0;
        border-bottom: 1px solid #ccc;
    }
    .print-card .card-name { font-size: 11pt; font-weight: 600; }
    .print-card .card-notes { font-size: 9.5pt; color: #4b5b63; margin-top: 0.02in; }
    @page { size: auto; margin: 0.5in; }
}
.notes-panel {
    background: #f7fafb;
    border: 1px solid #d9e3e7;
    border-radius: 12px;
    padding: 1rem 1.1rem;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.notes-panel-compact { margin-top: -0.35rem; margin-bottom: 1rem; }
.notes-field { flex: 1; }
.notes-field .form-label { margin-bottom: 0.35rem; font-size: 0.9rem; color: #4b5b63; }
.notes-display { margin: 0; white-space: pre-wrap; }
.delete-confirm-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(20, 52, 63, 0.45);
    display: grid;
    place-items: center;
    padding: 1rem;
    z-index: 1050;
}
.delete-confirm-dialog {
    width: min(28rem, 100%);
    background: #fff;
    border-radius: 12px;
    padding: 1.25rem 1.35rem;
    box-shadow: 0 16px 40px rgba(20, 52, 63, 0.2);
}
.delete-confirm-dialog h3 { font-size: 1.2rem; margin-bottom: 0.65rem; }
.delete-confirm-message { color: #4b5b63; margin-bottom: 0.5rem; }
.delete-confirm-hint { font-size: 0.92rem; margin-bottom: 0.75rem; }
.delete-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1rem;
}
.danger-zone {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.5rem;
}
.unsaved-actions { flex-wrap: wrap; }
.field-dirty {
    background-color: #fff6d8 !important;
    border-color: #e0b400 !important;
}
.file-row.file-row-dirty { background-color: #fffaeb; }
.file-row.file-row-dirty td { box-shadow: inset 0 0 0 9999px rgba(224, 180, 0, 0.06); }
.file-row.file-row-empty td { background-color: #eef1f5; color: #6c757d; }
.file-row.file-row-target td { background-color: #d8ecff; box-shadow: inset 0 0 0 9999px rgba(13, 110, 253, 0.08); }
.file-row.file-row-target td:first-child { border-left: 4px solid #0d6efd; font-weight: 600; }
.dirty-badge {
    display: inline-block;
    margin-left: 0.5rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #8a6400;
    background: #fff1c2;
    border-radius: 999px;
    padding: 0.1rem 0.55rem;
    vertical-align: middle;
}
.empty-note { color: #4b5b63; margin-top: 1rem; }
.billing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 1rem; }
.price { font-size: 2rem; font-weight: 700; }
.price span { font-size: 1rem; color: #4b5b63; font-weight: 400; }

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: linear-gradient(160deg, #14343f 0%, #1f5f73 55%, #dce8ec 55%);
    padding: 1.5rem;
}
.auth-card {
    width: min(28rem, 100%);
    background: #fff;
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: 0 16px 40px rgba(20, 52, 63, 0.18);
}
.auth-brand {
    display: inline-block;
    font-weight: 700;
    color: #1f5f73;
    text-decoration: none;
    margin-bottom: 1rem;
}

