html, body {
    font-family: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    max-width: 100%;
    margin: 0;
    overflow-x: hidden;
}

:root {
    --app-avatar-radius: 999px;
}

.app-avatar,
:is(
    .avatar,
    .detail-hero__avatar,
    .dx-edit-avatar,
    .profile-image,
    .customer-parent-combo-avatar,
    .customer-panel-hero__mark,
    .stock-panel-hero__mark,
    .sales-panel-hero__mark,
    .payment-panel-hero__mark,
    .app-entity-form__mark,
    .sales-document-summary-mark,
    .sales-combo-avatar,
    .sales-combo-address-icon,
    .payment-summary-mark,
    .payment-combo-avatar,
    .transfer-form-hero__avatar
) {
    border-radius: var(--app-avatar-radius) !important;
}

.app-avatar img,
:is(
    .avatar,
    .detail-hero__avatar,
    .dx-edit-avatar,
    .profile-image,
    .customer-parent-combo-avatar,
    .sales-combo-avatar,
    .sales-combo-address-icon,
    .payment-combo-avatar
) img,
.detail-hero__avatar-image,
.dx-edit-avatar__image {
    border-radius: inherit !important;
    object-fit: cover;
}

.app-hidden-file-input,
:is(
    .stock-photo-panel__input,
    .customer-photo-panel__input
) {
    height: 0 !important;
    opacity: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
    position: absolute !important;
    width: 0 !important;
}

.app-hidden-file-input::file-selector-button,
.app-hidden-file-input::-webkit-file-upload-button,
:is(
    .stock-photo-panel__input,
    .customer-photo-panel__input
)::file-selector-button,
:is(
    .stock-photo-panel__input,
    .customer-photo-panel__input
)::-webkit-file-upload-button {
    display: none !important;
}

.app-create-avatar-preview,
:is(
    .stock-photo-panel__preview,
    .customer-photo-panel__preview
) {
    align-items: center !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: var(--app-avatar-radius) !important;
    display: flex !important;
    height: 168px !important;
    justify-content: center !important;
    margin-inline: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    padding: 0 !important;
    position: relative !important;
    width: 168px !important;
}

.app-create-avatar-icon,
:is(
    .stock-photo-panel__camera,
    .customer-photo-panel__camera
) {
    border-radius: var(--app-avatar-radius) !important;
    height: 72px !important;
    margin: 0 !important;
    width: 72px !important;
}

.app-create-avatar-image,
:is(
    .stock-photo-panel__image,
    .customer-photo-panel__image
) {
    border-radius: inherit !important;
    display: block !important;
    height: 100% !important;
    object-fit: cover !important;
    width: 100% !important;
}

.app-create-avatar-remove-icon {
    align-items: center;
    background: #4f46e5;
    border: 2px solid #ffffff;
    border-radius: var(--app-avatar-radius);
    box-shadow: 0 10px 22px rgba(79, 70, 229, 0.32);
    color: #ffffff;
    cursor: pointer;
    display: inline-flex;
    height: 34px;
    justify-content: center;
    padding: 0;
    position: absolute;
    right: 5px;
    top: 5px;
    transform: translate(26%, -26%);
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.06s ease, box-shadow 0.15s ease;
    width: 34px;
    z-index: 3;
}

.app-create-avatar-remove-icon:hover {
    background: #4338ca;
    border-color: #ffffff;
    color: #ffffff;
    box-shadow: 0 12px 26px rgba(67, 56, 202, 0.38);
}

.app-create-avatar-remove-icon:active {
    transform: translate(26%, -26%) scale(0.96);
}

.app-create-avatar-remove-icon span {
    background-color: currentColor;
    display: inline-block;
    height: 1rem;
    mask-image: url("images/icons/trash.svg");
    mask-position: center;
    mask-repeat: no-repeat;
    mask-size: contain;
    width: 1rem;
}

.app-create-avatar-meta,
:is(
    .stock-photo-panel__meta,
    .customer-photo-panel__meta
) {
    display: grid;
    gap: 0.25rem;
    justify-items: center;
    text-align: center;
}

.app-create-avatar-meta strong,
:is(
    .stock-photo-panel__meta,
    .customer-photo-panel__meta
) strong {
    color: #1e293b;
    font-size: .92rem;
    font-weight: 700;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-create-avatar-meta small,
:is(
    .stock-photo-panel__meta,
    .customer-photo-panel__meta
) small {
    color: #94a3b8;
    font-size: .75rem;
}

.app-create-avatar-actions {
    display: grid;
    gap: 0.5rem;
    width: 100%;
}

.app-create-avatar-upload-button {
    align-items: center;
    border-radius: 0.55rem;
    cursor: pointer;
    display: inline-flex;
    font-size: 0.85rem;
    font-weight: 700;
    gap: 0.4rem;
    justify-content: center;
    min-height: 40px;
    padding: 0 1rem;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.06s ease;
    width: 100%;
}

.app-create-avatar-upload-button:active {
    transform: translateY(1px);
}

.hr-workspace {
    display: grid;
    grid-template-columns: 226px minmax(0, 1fr);
    gap: 0;
    min-height: calc(100vh - 2rem);
    border: 1px solid #d8e0ea;
    border-radius: 8px;
    overflow: hidden;
    background: #eef2f6;
}

.hr-module-rail {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 18px 14px;
    border-right: 1px solid #d8e0ea;
    background: #ffffff;
}

.hr-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    min-width: 0;
}

.hr-brand__mark,
.hr-person em,
.hr-profile > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    border-radius: 8px;
}

.hr-brand__mark {
    width: 42px;
    height: 42px;
    color: #047857;
    background: #d1fae5;
}

.hr-brand strong,
.hr-brand span {
    display: block;
}

.hr-brand strong {
    color: #0f172a;
    font-size: 0.98rem;
    font-weight: 900;
}

.hr-brand span,
.hr-kicker,
.hr-section-header span,
.hr-module-card span,
.hr-filters label span,
.hr-metrics span,
.hr-facts dt,
.hr-progress span {
    color: #64748b;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.hr-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hr-nav a,
.hr-module-card,
.hr-icon-button,
.hr-primary-button,
.hr-segmented button,
.hr-row,
.hr-detail-tabs button {
    border: 0;
    border-radius: 8px;
}

.hr-nav a {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 8px;
    color: #334155;
    text-align: left;
    background: transparent;
    text-decoration: none;
}

.hr-nav a:hover,
.hr-nav a.is-active {
    color: #0f172a;
    background: #f1f5f9;
}

.hr-nav a span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    color: #2563eb;
    background: #dbeafe;
    font-size: 0.72rem;
    font-weight: 900;
}

.hr-nav a strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.92rem;
}

.hr-main {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
    padding: 18px;
}

.hr-topbar,
.hr-section-header,
.hr-actions,
.hr-profile,
.hr-progress > div,
.hr-timeline-item {
    display: flex;
    align-items: center;
}

.hr-topbar {
    justify-content: space-between;
    gap: 16px;
}

.hr-topbar h1,
.hr-section-header h2,
.hr-profile h2 {
    margin: 0;
    color: #0f172a;
    font-weight: 900;
    line-height: 1.1;
}

.hr-topbar h1 {
    font-size: 1.75rem;
}

.hr-section-header h2,
.hr-profile h2 {
    font-size: 1rem;
}

.hr-kicker {
    margin: 0 0 4px;
}

.hr-actions {
    gap: 8px;
}

.hr-icon-button,
.hr-primary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    color: #0f172a;
    background: #ffffff;
    box-shadow: inset 0 0 0 1px #d8e0ea;
}

.hr-icon-button {
    width: 40px;
}

.hr-primary-button {
    gap: 8px;
    padding: 0 14px;
    color: #ffffff;
    background: #2563eb;
    box-shadow: none;
    font-weight: 850;
    text-decoration: none;
}

.hr-loading {
    display: grid;
    place-items: center;
    gap: 10px;
    min-height: 300px;
    color: #475569;
}

.hr-loading span {
    width: 34px;
    height: 34px;
    border: 3px solid #dbeafe;
    border-top-color: #2563eb;
    border-radius: 999px;
    animation: hr-spin 0.85s linear infinite;
}

@keyframes hr-spin {
    to {
        transform: rotate(360deg);
    }
}

.hr-warning {
    padding: 10px 12px;
    border: 1px solid #fde68a;
    border-radius: 8px;
    color: #92400e;
    background: #fffbeb;
    font-size: 0.86rem;
    font-weight: 750;
}

.hr-metrics,
.hr-module-strip {
    display: grid;
    gap: 10px;
}

.hr-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.hr-metrics article,
.hr-directory,
.hr-detail {
    border: 1px solid #d8e0ea;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.hr-metrics article {
    padding: 14px;
}

.hr-metrics strong {
    display: block;
    margin-top: 6px;
    color: #0f172a;
    font-size: 1.55rem;
    font-weight: 950;
}

.hr-module-strip {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.hr-module-card {
    position: relative;
    display: block;
    min-height: 92px;
    padding: 12px;
    text-align: left;
    border: 1px solid #d8e0ea;
    background: #ffffff;
    text-decoration: none;
}

.hr-module-card:hover,
.hr-module-card.is-active {
    border-color: #93c5fd;
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.12);
}

.hr-module-card strong,
.hr-module-card em {
    display: block;
}

.hr-module-card strong {
    margin-top: 8px;
    color: #0f172a;
    font-size: 0.98rem;
    font-style: normal;
}

.hr-module-card em {
    position: absolute;
    right: 12px;
    bottom: 10px;
    color: #0f172a;
    font-size: 1.25rem;
    font-style: normal;
    font-weight: 950;
}

.hr-module-card--teal em {
    color: #0f766e;
}

.hr-module-card--amber em {
    color: #b45309;
}

.hr-module-card--rose em {
    color: #be123c;
}

.hr-module-card--violet em {
    color: #7c3aed;
}

.hr-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 14px;
    min-height: 0;
}

.hr-directory,
.hr-detail {
    min-width: 0;
    padding: 14px;
}

.hr-section-header {
    justify-content: space-between;
    gap: 12px;
}

.hr-section-header > strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 28px;
    border-radius: 8px;
    color: #2563eb;
    background: #dbeafe;
    font-size: 0.82rem;
}

.hr-filters {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) 190px auto;
    gap: 10px;
    margin: 14px 0;
}

.hr-filters label {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.hr-filters input,
.hr-filters select {
    width: 100%;
    min-height: 40px;
    padding: 0 11px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: #0f172a;
    background: #ffffff;
}

.hr-filters input:focus,
.hr-filters select:focus {
    outline: 2px solid #bfdbfe;
    border-color: #60a5fa;
}

.hr-segmented {
    display: grid;
    grid-template-columns: repeat(3, minmax(60px, 1fr));
    align-self: end;
    min-height: 40px;
    padding: 3px;
    border-radius: 8px;
    background: #e2e8f0;
}

.hr-segmented button {
    color: #475569;
    background: transparent;
    font-size: 0.82rem;
    font-weight: 850;
}

.hr-segmented button.is-active {
    color: #0f172a;
    background: #ffffff;
    box-shadow: 0 5px 14px rgba(15, 23, 42, 0.08);
}

.hr-table {
    overflow: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.hr-table__head,
.hr-row {
    display: grid;
    grid-template-columns: minmax(260px, 1.4fr) minmax(130px, 0.8fr) minmax(100px, 0.6fr) 96px;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 740px;
}

.hr-table__head {
    padding: 10px 12px;
    color: #64748b;
    background: #f8fafc;
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
}

.hr-row {
    padding: 10px 12px;
    color: #334155;
    text-align: left;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    text-decoration: none;
}

.hr-row:hover,
.hr-row.is-selected {
    background: #f0f7ff;
}

.hr-person {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.hr-person em {
    width: 38px;
    height: 38px;
    color: #0f766e;
    background: #ccfbf1;
    font-style: normal;
    font-weight: 950;
}

.hr-person span,
.hr-person strong,
.hr-person small {
    display: block;
    min-width: 0;
}

.hr-person strong {
    overflow: hidden;
    color: #0f172a;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.9rem;
}

.hr-person small {
    overflow: hidden;
    color: #64748b;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.78rem;
}

.hr-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    width: fit-content;
    min-width: 72px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 900;
}

.hr-status--active {
    color: #047857;
    background: #d1fae5;
}

.hr-status--leave {
    color: #b45309;
    background: #fef3c7;
}

.hr-status--passive {
    color: #64748b;
    background: #e2e8f0;
}

.hr-detail {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.hr-detail-link,
.hr-back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    width: fit-content;
    padding: 0 12px;
    border-radius: 8px;
    color: #2563eb;
    background: #dbeafe;
    font-size: 0.82rem;
    font-weight: 850;
    text-decoration: none;
}

.hr-detail-link:hover,
.hr-back-link:hover {
    color: #1d4ed8;
    background: #bfdbfe;
}

.hr-profile {
    gap: 12px;
}

.hr-profile > span {
    width: 54px;
    height: 54px;
    color: #ffffff;
    background: #2563eb;
    font-weight: 950;
}

.hr-profile p {
    margin: 5px 0 0;
    color: #64748b;
    font-size: 0.88rem;
}

.hr-detail-tabs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    padding: 4px;
    border-radius: 8px;
    background: #f1f5f9;
}

.hr-detail-tabs button {
    min-height: 34px;
    color: #64748b;
    background: transparent;
    font-size: 0.78rem;
    font-weight: 850;
}

.hr-detail-tabs button.is-active {
    color: #0f172a;
    background: #ffffff;
}

.hr-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
}

.hr-facts div {
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

.hr-facts dd {
    margin: 5px 0 0;
    color: #0f172a;
    font-size: 0.9rem;
    font-weight: 850;
}

.hr-progress {
    padding: 12px;
    border-radius: 8px;
    background: #f8fafc;
}

.hr-progress > div {
    justify-content: space-between;
    gap: 12px;
}

.hr-progress strong {
    color: #0f172a;
}

.hr-progress progress {
    width: 100%;
    height: 10px;
    margin-top: 10px;
    border: 0;
    border-radius: 999px;
    overflow: hidden;
}

.hr-progress progress::-webkit-progress-bar {
    background: #dbeafe;
}

.hr-progress progress::-webkit-progress-value {
    background: #2563eb;
}

.hr-timeline {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hr-timeline-item {
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
}

.hr-timeline-item time {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 38px;
    border-radius: 8px;
    color: #2563eb;
    background: #dbeafe;
    font-size: 0.78rem;
    font-weight: 900;
}

.hr-timeline-item--leave time {
    color: #b45309;
    background: #fef3c7;
}

.hr-timeline-item--training time {
    color: #7c3aed;
    background: #ede9fe;
}

.hr-timeline-item strong,
.hr-timeline-item span {
    display: block;
}

.hr-timeline-item strong {
    color: #0f172a;
    font-size: 0.88rem;
}

.hr-timeline-item span {
    margin-top: 2px;
    color: #64748b;
    font-size: 0.78rem;
}

.hr-empty-state {
    display: grid;
    place-items: center;
    min-height: 180px;
    color: #64748b;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
}

.hr-detail-page {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-height: calc(100vh - 2rem);
}

.hr-detail-hero,
.hr-detail-summary article,
.hr-detail-section,
.hr-detail-side section {
    border: 1px solid #d8e0ea;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

.hr-detail-hero {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 16px;
}

.hr-detail-hero__content {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
}

.hr-detail-hero__content > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 8px;
    color: #ffffff;
    background: #2563eb;
    font-size: 1.1rem;
    font-weight: 950;
}

.hr-detail-hero h1,
.hr-detail-side h2,
.hr-detail-section h2 {
    margin: 0;
    color: #0f172a;
    font-weight: 900;
    line-height: 1.1;
}

.hr-detail-hero h1 {
    font-size: 1.55rem;
}

.hr-detail-hero strong {
    display: block;
    margin-top: 5px;
    color: #475569;
    font-size: 0.95rem;
}

.hr-detail-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.hr-detail-summary article {
    min-width: 0;
    padding: 12px;
}

.hr-detail-summary span,
.hr-detail-section header span {
    display: block;
    color: #64748b;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.hr-detail-summary strong {
    display: block;
    overflow: hidden;
    margin-top: 6px;
    color: #0f172a;
    font-size: 0.94rem;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hr-detail-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 14px;
}

.hr-detail-sections {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    min-width: 0;
}

.hr-detail-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    padding: 14px;
}

.hr-detail-section dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
}

.hr-detail-section dl div {
    min-width: 0;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}

.hr-detail-section dt {
    color: #64748b;
    font-size: 0.74rem;
    font-weight: 800;
}

.hr-detail-section dd {
    overflow: hidden;
    margin: 5px 0 0;
    color: #0f172a;
    font-size: 0.88rem;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hr-detail-section--teal h2 {
    color: #0f766e;
}

.hr-detail-section--amber h2 {
    color: #b45309;
}

.hr-detail-section--rose h2 {
    color: #be123c;
}

.hr-detail-section--violet h2 {
    color: #7c3aed;
}

.hr-detail-section--slate h2 {
    color: #334155;
}

.hr-detail-side {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.hr-detail-side section {
    padding: 14px;
}

.hr-detail-side p {
    margin: 8px 0 0;
    color: #475569;
    font-size: 0.9rem;
    line-height: 1.55;
}

@media (max-width: 1180px) {
    .hr-workspace {
        grid-template-columns: 84px minmax(0, 1fr);
    }

    .hr-brand div,
    .hr-nav a strong {
        display: none;
    }

    .hr-nav a {
        grid-template-columns: 1fr;
        justify-items: center;
    }

    .hr-content-grid {
        grid-template-columns: 1fr;
    }

    .hr-detail-body {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .hr-workspace {
        grid-template-columns: 1fr;
    }

    .hr-module-rail {
        position: sticky;
        top: 0;
        z-index: 10;
        flex-direction: row;
        align-items: center;
        overflow-x: auto;
        border-right: 0;
        border-bottom: 1px solid #d8e0ea;
    }

    .hr-brand div {
        display: block;
    }

    .hr-nav {
        flex-direction: row;
    }

    .hr-nav a {
        width: 54px;
    }

    .hr-main {
        padding: 12px;
    }

    .hr-topbar,
    .hr-filters {
        grid-template-columns: 1fr;
    }

    .hr-topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .hr-metrics,
    .hr-module-strip,
    .hr-detail-summary,
    .hr-detail-sections,
    .hr-detail-section dl {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hr-detail-hero__content {
        grid-template-columns: 54px minmax(0, 1fr);
    }

    .hr-detail-hero__content > em {
        grid-column: 1 / -1;
    }
}

@media (max-width: 560px) {
    .hr-metrics,
    .hr-module-strip,
    .hr-detail-summary,
    .hr-detail-sections,
    .hr-detail-section dl {
        grid-template-columns: 1fr;
    }
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

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

.stock-card-tab-grid {
    min-height: 360px;
}

.stock-card-tab-grid .app-panel-grid__footer {
    display: none;
}

.stock-detail-grid__strong {
    color: #0f172a;
    font-weight: 700;
}

.stock-detail-grid__badge {
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.74rem;
    font-weight: 700;
    justify-content: center;
    line-height: 1;
    min-width: 56px;
    padding: 0.32rem 0.6rem;
}

.stock-detail-grid__badge--ok {
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
}

.stock-detail-grid__badge--muted {
    background: rgba(100, 116, 139, 0.12);
    color: #475569;
}

.stock-detail-grid__badge--info {
    background: rgba(99, 102, 241, 0.12);
    color: #4338ca;
}

.stock-detail-grid__badge--danger {
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
}

.stock-detail-grid__code {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.35rem;
    color: #334155;
    font-family: "Courier New", monospace;
    font-size: 0.8rem;
    padding: 0.22rem 0.48rem;
}

.stock-detail-grid__link {
    color: #4338ca;
    font-weight: 700;
    text-decoration: none;
}

.stock-detail-grid__link:hover {
    color: #6366f1;
    text-decoration: underline;
}

.stock-detail-grid__actions {
    align-items: center;
    display: inline-flex;
    gap: .45rem;
}

button.stock-detail-grid__link {
    background: transparent;
    border: 0;
    cursor: pointer;
    font: inherit;
    padding: 0;
}

.stock-detail-grid__link--danger {
    color: #b91c1c;
}

.stock-detail-grid__link--danger:hover {
    color: #991b1b;
}

.stock-detail-grid__muted {
    color: #94a3b8;
}

.image-upload-modal__input {
    cursor: pointer;
    font-size: 0;
    height: 100%;
    inset: 0;
    opacity: 0;
    position: absolute;
    width: 100%;
    z-index: 2;
}

.image-upload-modal__input::file-selector-button,
.image-upload-modal__input::-webkit-file-upload-button {
    display: none;
}

.image-upload-preview__media {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    position: relative;
}

.image-upload-preview__media img {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.image-upload-preview__remove-overlay {
    align-items: center;
    background: rgba(15, 23, 42, 0.42);
    display: flex;
    inset: 0;
    justify-content: center;
    opacity: 0;
    position: absolute;
    transition: opacity 0.15s ease;
}

.image-upload-preview__item:hover .image-upload-preview__remove-overlay {
    opacity: 1;
}

.image-upload-preview__remove-button {
    align-items: center !important;
    background: rgba(220, 38, 38, 0.96) !important;
    border: 0 !important;
    border-radius: 999px !important;
    box-shadow: 0 10px 22px rgba(127, 29, 29, 0.28) !important;
    color: #ffffff !important;
    display: inline-flex !important;
    height: 42px !important;
    justify-content: center !important;
    min-height: 42px !important;
    padding: 0 !important;
    width: 42px !important;
}

.image-upload-preview__remove-button .dxbl-btn-caption {
    display: none !important;
}

.image-upload-preview__trash-icon {
    background-color: currentColor;
    display: inline-block;
    height: 1.15rem;
    mask-image: url("images/icons/trash.svg");
    mask-position: center;
    mask-repeat: no-repeat;
    mask-size: contain;
    width: 1.15rem;
}

/* DevExpress combobox/list dropdown — selected item highlight (2-3 tones darker than hover) */
.dxbl-list-box,
.dxbl-list-box-render-container {
    --dxbl-list-box-item-selected-bg: #c7d2fe !important;
    --dxbl-list-box-item-selected-color: #1e293b !important;
    --dxbl-list-box-item-selected-hover-bg: #b4c2fb !important;
    --dxbl-list-box-item-selected-hover-color: #1e293b !important;
}

/* Lookup combobox (DxComboBox) — self-contained field styling, immune to host input rules */
.app-combo {
    --dxbl-text-edit-border-radius: 0.55rem !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 0.55rem !important;
    min-height: 40px;
    overflow: hidden;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    width: 100%;
}

.app-combo.dxbl-text-edit,
.app-combo.dxbl-cmbbx {
    --dxbl-text-edit-border-radius: 0.55rem !important;
    background: #f8fafc !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 0.55rem !important;
    min-height: 40px;
}

.app-combo:focus-within,
.app-combo.dxbl-text-edit:focus-within,
.app-combo.dxbl-cmbbx:focus-within {
    background: #ffffff !important;
    border-color: #6366f1 !important;
    border-radius: 0.55rem !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.14) !important;
}

.app-grid-filter-input.dxbl-text-edit,
.app-grid-filter-input .dxbl-text-edit {
    --dxbl-text-edit-border-radius: 0.55rem !important;
}

.app-combo__input,
.app-combo .dxbl-edit-input,
.app-combo .dxbl-text-edit-input {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: #0f172a;
    font-size: 0.9rem;
    min-height: 38px;
}

.app-combo .dxbl-btn,
.app-combo .dxbl-edit-btn {
    background: transparent !important;
    border-color: transparent !important;
    min-height: 38px;
}

.app-combo-item {
    display: grid;
    gap: 0.1rem;
    min-width: 0;
    padding: 0.15rem 0;
}

.app-combo-code {
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 650;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.app-combo-title {
    color: #0f172a;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Shared detail shells, form fields, tabs, and action controls */
.crm-detail-page,
.stock-card-detail-page,
.sales-create-detail-page {
    color: #0f172a;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    min-width: 0;
    padding: 0.5rem 0 1.5rem;
    width: 100%;
}

.crm-detail-page *,
.crm-detail-page *::before,
.crm-detail-page *::after,
.stock-card-detail-page *,
.stock-card-detail-page *::before,
.stock-card-detail-page *::after,
.sales-create-detail-page *,
.sales-create-detail-page *::before,
.sales-create-detail-page *::after {
    box-sizing: border-box;
}

.detail-empty,
.detail-loading {
    align-items: center;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 1.1rem;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 12px 28px rgba(15, 23, 42, 0.06);
    color: #0f172a;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin: 2rem auto;
    max-width: 480px;
    padding: 2.5rem 2rem;
    text-align: center;
}

.detail-empty__icon {
    color: #94a3b8;
}

.detail-empty h1,
.detail-loading h1 {
    color: #0f172a;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 0;
    margin: 0;
}

.detail-empty p,
.detail-loading p {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0;
}

.detail-state__actions {
    align-items: center;
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 0.6rem;
}

.detail-empty__back {
    align-items: center;
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 58%, #0d9488 100%);
    border-radius: 0.6rem;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.26);
    color: #ffffff;
    display: inline-flex;
    font-size: 0.88rem;
    font-weight: 600;
    gap: 0.4rem;
    margin-top: 0.6rem;
    padding: 0.6rem 1rem;
    text-decoration: none;
    transition: filter 0.15s ease, box-shadow 0.15s ease;
}

.detail-empty__back:hover {
    filter: brightness(1.05);
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.34);
}

.detail-loading__spinner,
.dx-text-action__spinner {
    animation: detail-action-spin 0.8s linear infinite;
    border-radius: 999px;
}

.detail-loading__spinner {
    border: 3px solid rgba(99, 102, 241, 0.14);
    border-top-color: #6366f1;
    height: 42px;
    width: 42px;
}

.dx-text-action__spinner {
    border: 2px solid rgba(255, 255, 255, 0.42);
    border-top-color: #ffffff;
    height: 13px;
    width: 13px;
}

@keyframes detail-action-spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes detail-loading-spin {
    to {
        transform: rotate(360deg);
    }
}

.detail-hero {
    align-items: center;
    background:
        radial-gradient(900px 320px at 90% -40%, rgba(13, 148, 136, 0.08), transparent 60%),
        radial-gradient(700px 280px at -10% 110%, rgba(99, 102, 241, 0.08), transparent 60%),
        #ffffff;
    border: 1px solid rgba(99, 102, 241, 0.10);
    border-radius: 1.1rem;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 14px 32px rgba(15, 23, 42, 0.07);
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.25rem;
    justify-content: space-between;
    overflow: hidden;
    padding: 1rem 1.25rem;
    position: relative;
}

.detail-hero__intro {
    align-items: center;
    display: flex;
    gap: 0.9rem;
    min-width: 0;
}

.detail-hero__back {
    align-items: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.55rem;
    color: #475569;
    display: inline-flex;
    flex-shrink: 0;
    height: 38px;
    justify-content: center;
    text-decoration: none;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.06s ease;
    width: 38px;
}

.detail-hero__back:hover {
    background: rgba(99, 102, 241, 0.06);
    border-color: #c7d2fe;
    color: #4338ca;
}

.detail-hero__back:active {
    transform: translateX(-1px);
}

.detail-hero__avatar {
    align-items: center;
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 58%, #0d9488 100%);
    border-radius: var(--app-avatar-radius);
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.28);
    color: #ffffff;
    display: inline-flex;
    flex-shrink: 0;
    font-size: 1.05rem;
    font-weight: 800;
    height: 3rem;
    justify-content: center;
    letter-spacing: 0;
    overflow: hidden;
    position: relative;
    width: 3rem;
}

.detail-hero__avatar--image {
    background: #f8fafc;
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
}

.detail-hero__avatar-image {
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.detail-hero__text {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
}

.detail-hero__eyebrow {
    color: #4f46e5;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.detail-hero__title {
    color: #0f172a;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.15;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.detail-hero__meta,
.detail-hero__actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.detail-hero__code,
.detail-hero__pill {
    background: rgba(99, 102, 241, 0.10);
    border-radius: 0.4rem;
    color: #4338ca;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0;
    padding: 0.18rem 0.55rem;
}

.detail-hero__pill {
    border-radius: 999px;
    display: inline-flex;
    gap: 0.4rem;
    padding: 0.18rem 0.6rem 0.2rem 0.5rem;
}

.detail-hero__pill-dot {
    background: currentColor;
    border-radius: 999px;
    display: inline-block;
    height: 0.45rem;
    width: 0.45rem;
}

.dh-action,
.dx-text-action {
    align-items: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0.55rem;
    color: #334155;
    cursor: pointer;
    display: inline-flex;
    font-size: 0.85rem;
    font-weight: 600;
    gap: 0.4rem;
    justify-content: center;
    min-height: 38px;
    padding: 0 0.85rem;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease, transform 0.06s ease;
}

.dh-action svg {
    color: #4f46e5;
}

.dh-action:hover,
.dx-text-action:hover {
    background: #f8fafc;
    border-color: #c7d2fe;
    color: #4338ca;
}

.dh-action:active,
.dx-text-action:active,
.tab-add-button:active,
.detail-inline-plus:active {
    transform: translateY(1px);
}

.dh-action:focus-visible,
.dx-text-action:focus-visible,
.tab-add-button:focus-visible,
.detail-inline-plus:focus-visible {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.22);
    outline: none;
}

.dh-action--primary,
.dx-text-action--primary,
.tab-add-button {
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 58%, #0d9488 100%);
    border-color: transparent;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.28);
    color: #ffffff;
}

.dh-action--primary svg {
    color: #ffffff;
}

.dh-action--primary:hover,
.dx-text-action--primary:hover,
.tab-add-button:hover {
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 58%, #0d9488 100%);
    border-color: transparent;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.36);
    color: #ffffff;
    filter: brightness(1.05);
}

.dh-action--danger {
    border-color: #fecaca;
    color: #b91c1c;
}

.dh-action--danger svg {
    color: #dc2626;
}

.dh-action--danger:hover {
    background: #fef2f2;
    border-color: #fca5a5;
    color: #991b1b;
}

.dh-action:disabled,
.dx-text-action:disabled,
.tab-add-button:disabled {
    cursor: default;
    opacity: 0.58;
}

.app-print-modal__body {
    display: grid;
    gap: 12px;
}

.app-print-template-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 10px;
}

.app-print-template {
    display: flex;
    min-height: 88px;
    cursor: pointer;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid #d9e2ef;
    border-radius: 8px;
    background: #fff;
    padding: 14px;
    color: #0f172a;
    transition: background-color .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.app-print-template:hover,
.app-print-template.is-selected {
    border-color: #93c5fd;
    background: #eff6ff;
    box-shadow: 0 12px 26px rgba(15, 23, 42, .08);
    transform: translateY(-1px);
}

.app-print-template strong,
.app-print-template span,
.app-print-template small {
    display: block;
}

.app-print-template span {
    margin-top: 5px;
    color: #64748b;
    font-size: .82rem;
}

.app-print-template small {
    border-radius: 999px;
    background: #e2e8f0;
    padding: 4px 8px;
    color: #475569;
    font-size: .72rem;
    white-space: nowrap;
}

.app-print-empty {
    display: grid;
    gap: 4px;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
    padding: 18px;
    color: #475569;
}

@media (max-width: 640px) {
    .app-print-modal .app-modal-footer {
        align-items: stretch;
        flex-direction: column-reverse;
    }

    .app-print-modal .app-modal-action {
        width: 100%;
    }
}

.dx-edit-grid {
    display: grid;
    gap: 0.85rem 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dx-field {
    display: grid;
    gap: 0.3rem;
    min-width: 0;
}

.dx-field--full {
    grid-column: 1 / -1;
}

.dx-field .dxbl-text-edit {
    --dxbl-text-edit-border-radius: 0.55rem !important;
}

.dx-field label {
    color: #475569;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0;
}

.dx-field input,
.dx-field select,
.dx-field textarea {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.55rem;
    color: #0f172a;
    font-size: 0.9rem;
    min-height: 40px;
    padding: 0 0.8rem;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
    width: 100%;
}

.dx-field textarea {
    min-height: 126px;
    padding: 0.7rem 0.8rem;
    resize: vertical;
}

.dx-field input:disabled,
.dx-field select:disabled,
.dx-field textarea:disabled {
    color: #64748b;
    cursor: default;
    opacity: 1;
}

.dx-field input:focus,
.dx-field select:focus,
.dx-field textarea:focus {
    background: #ffffff;
    border-color: #6366f1;
    border-radius: 0.55rem;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.14);
    outline: 0;
}

.detail-lookup-row {
    align-items: end;
    display: grid;
    gap: 0.55rem;
    grid-template-columns: minmax(0, 1fr) auto;
}

.detail-inline-plus {
    align-items: center;
    background: #ffffff;
    border: 1px solid #dbe3ee;
    border-radius: 999px;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
    color: #4f46e5;
    cursor: pointer;
    display: inline-flex;
    font-size: 1rem;
    font-weight: 700;
    height: 30px;
    justify-content: center;
    margin-bottom: 0.35rem;
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease, transform 0.06s ease;
    width: 30px;
}

.detail-inline-plus:hover {
    background: rgba(99, 102, 241, 0.06);
    border-color: #c7d2fe;
    box-shadow: 0 8px 18px rgba(99, 102, 241, 0.18);
}

.detail-inline-plus:disabled {
    cursor: default;
    opacity: 0.45;
    transform: none;
}

.tabs-nav {
    align-items: center;
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.75rem 0;
    scrollbar-width: thin;
}

.tabs-nav::-webkit-scrollbar {
    height: 4px;
}

.tabs-nav::-webkit-scrollbar-track {
    background: transparent;
}

.tabs-nav::-webkit-scrollbar-thumb {
    background: rgba(15, 23, 42, 0.1);
    border-radius: 999px;
}

.tab-button {
    align-items: center;
    background: transparent;
    border: 0;
    border-bottom: 2px solid transparent;
    color: #64748b;
    cursor: pointer;
    display: inline-flex;
    flex-shrink: 0;
    font-size: 0.9rem;
    font-weight: 600;
    gap: 0.4rem;
    padding: 0.5rem 0.85rem 0.6rem;
    transition: color 0.15s ease, border-bottom-color 0.15s ease;
    white-space: nowrap;
}

.tab-button:hover {
    color: #475569;
}

.tab-button--active {
    border-bottom-color: #6366f1;
    color: #4338ca;
}

.tab-badge {
    align-items: center;
    background: rgba(99, 102, 241, 0.12);
    border-radius: 999px;
    color: #4338ca;
    display: inline-flex;
    font-size: 0.7rem;
    font-weight: 700;
    height: 20px;
    justify-content: center;
    min-width: 20px;
    padding: 0 0.35rem;
}

.tab-add-button {
    border: 0;
    border-radius: 0.5rem;
    flex: 0 0 auto;
    font-size: 0.82rem;
    gap: 0.35rem;
    min-height: 32px;
    padding: 0 0.8rem;
}

@media (max-width: 768px) {
    .detail-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .detail-hero__actions {
        justify-content: flex-start;
    }

    .dh-action,
    .dx-text-action,
    .tab-add-button {
        min-width: 0;
    }

    .dx-edit-grid {
        grid-template-columns: 1fr;
    }

    .detail-lookup-row {
        align-items: stretch;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .tabs-nav {
        padding: 0;
    }
}
