/*
 * noizgenetics-tools.css structure
 * 01 Tokens / base elements
 * 02 Public layout / public cards
 * 03 Calculator / results / export
 * 04 App shell / sidebar / mobile shell
 * 05 Admin / forms / news / maintenance
 * 06 Horse lists
 * 07 Horse profile
 * 08 Admin import debug
 * 09 Import preview / quality checks / competition values
 * 10 Feedback / bugreport / modals
 * 11 Settings / profile
 * 12 Dark mode polish
 * 13 MDR / inventory comparison
 * 14 Ideas & roadmap
 *
 * Responsive overrides live near the related feature area unless marked otherwise.
 */

/* Tokens / base elements ------------------------------------------------ */

:root {
    --ng-bg: #f7fbfd;
    --ng-card: #ffffff;
    --ng-border: #dbe7ef;
    --ng-soft: #eaf7fb;
    --ng-soft-blue: #eef7ff;
    --ng-soft-lavender: #f3eefb;
    --ng-text: #172033;
    --ng-muted: #667085;
    --ng-primary: #2f8fa3;
    --ng-primary-dark: #216b7a;
    --ng-accent: #b994e8;
    --ng-shadow: 0 16px 40px rgba(31, 41, 55, 0.08);
}

.ng-calculator-body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(196, 236, 245, 0.85), transparent 32rem),
        radial-gradient(circle at top right, rgba(214, 190, 247, 0.45), transparent 34rem),
        linear-gradient(135deg, #f8fcff 0%, var(--ng-bg) 55%, #fbf7ff 100%);
    color: var(--ng-text);
}

/* Public layout / public cards ----------------------------------------- */

.ng-public-page {
    width: min(1180px, calc(100% - 48px));
    min-height: 100vh;
    margin: 0 auto;
    padding: 24px 0 56px;
}

.ng-public-page--wide {
    width: min(1720px, calc(100% - 48px));
}

.ng-public-page--app {
    width: 100%;
    min-height: auto;
    margin: 0;
    padding: 0;
}

.ng-public-header {
    display: flex;
    gap: 18px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    border: 1px solid var(--ng-border);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--ng-shadow);
    padding: 12px 14px 12px 18px;
}

.ng-public-brand {
    color: var(--ng-text);
    font-size: 1rem;
    font-weight: 850;
    text-decoration: none;
}

.ng-public-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
}

.ng-public-nav form {
    margin: 0;
}

.ng-public-nav-link,
.ng-public-nav-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    color: var(--ng-primary-dark);
    padding: 8px 12px;
    font-size: 0.9rem;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.ng-public-nav-link:hover,
.ng-public-nav-button:hover,
.ng-public-nav-link.is-current {
    border-color: rgba(47, 143, 163, 0.18);
    background: var(--ng-soft);
    color: var(--ng-text);
}

.ng-public-nav-action {
    border-color: var(--ng-border);
    background: #fff;
}

.ng-public-main {
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.ng-public-main > * {
    width: 100%;
}

.ng-public-hero {
    border: 1px solid rgba(47, 143, 163, 0.18);
    border-radius: 28px;
    background:
        linear-gradient(135deg, rgba(234, 247, 251, 0.96), rgba(255, 255, 255, 0.96) 52%, rgba(246, 239, 255, 0.94));
    box-shadow: var(--ng-shadow);
    padding: 42px 34px;
}

.ng-public-hero h1 {
    margin: 8px 0 0;
    color: var(--ng-text);
    font-size: clamp(2.4rem, 5vw, 4.8rem);
    line-height: 1.02;
    letter-spacing: 0;
}

.ng-public-copy {
    max-width: 760px;
    margin-top: 18px;
    color: var(--ng-muted);
    font-size: 1.05rem;
    line-height: 1.65;
}

.ng-public-copy p {
    margin: 0;
}

.ng-public-copy p + p {
    margin-top: 8px;
}

.ng-public-actions {
    margin-top: 24px;
}

.ng-public-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

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

.ng-public-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ng-public-section-heading h2 {
    margin: 0;
    color: var(--ng-text);
    font-size: 1.55rem;
    font-weight: 900;
    letter-spacing: 0;
}

.ng-public-card {
    display: flex;
    min-height: 230px;
    flex-direction: column;
    border: 1px solid var(--ng-border);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--ng-shadow);
    padding: 22px;
}

.ng-public-card--app-link,
.ng-public-card--dashboard-link,
.ng-public-card--admin-link,
.ng-public-card--idea-summary {
    display: flex;
    min-height: 230px;
    flex-direction: column;
}

.ng-public-card--empty-state,
.ng-public-card--form-section,
.ng-public-card--profile-section,
.ng-public-card--import-preview,
.ng-public-card--mdr-panel,
.ng-public-card--idea-item,
.ng-public-card--horse-filter,
.ng-public-card--horse-table,
.ng-public-card--horse-item,
.ng-public-card--admin-panel,
.ng-public-card--admin-stat {
    min-height: 0;
    height: auto;
}

.ng-public-card--idea-item {
    display: flex;
    flex-direction: column;
}

.ng-public-card--empty-state,
.ng-public-card--form-section,
.ng-public-card--profile-section,
.ng-public-card--import-preview,
.ng-public-card--mdr-panel,
.ng-public-card--horse-filter,
.ng-public-card--horse-table,
.ng-public-card--horse-item,
.ng-public-card--admin-panel,
.ng-public-card--admin-stat {
    display: block;
}

.ng-public-card h2,
.ng-public-card h3 {
    margin: 0;
    color: var(--ng-text);
    font-size: 1.35rem;
    font-weight: 850;
    letter-spacing: 0;
}

.ng-public-card p:not(.ng-card-label) {
    margin: 12px 0 0;
    color: var(--ng-muted);
    font-size: 0.95rem;
    line-height: 1.55;
}

.ng-public-card-link {
    display: inline-flex;
    width: fit-content;
    margin-top: auto;
    border-radius: 12px;
    color: var(--ng-primary-dark);
    padding-top: 18px;
    font-size: 0.92rem;
    font-weight: 850;
    text-decoration: none;
}

.ng-public-card-link:hover {
    text-decoration: underline;
}

.ng-public-card-action {
    width: fit-content;
    margin-top: auto;
}

.ng-public-card.is-disabled {
    background: rgba(255, 255, 255, 0.66);
}

.ng-public-card.is-disabled .ng-card-label,
.ng-public-card.is-disabled h2,
.ng-public-card.is-disabled p {
    color: var(--ng-muted);
}

.ng-login-modal {
    width: min(92vw, 460px);
    border: 0;
    border-radius: 18px;
    background: transparent;
    color: var(--ng-text);
    padding: 0;
}

.ng-login-modal::backdrop {
    background: rgba(24, 32, 39, 0.48);
}

.ng-login-modal-panel {
    max-height: min(760px, calc(100vh - 40px));
    overflow: auto;
    border: 1px solid var(--ng-border);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--ng-shadow);
    padding: 24px;
}

.ng-login-modal-panel h2 {
    margin: 4px 0 0;
    color: var(--ng-text);
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: 0;
}

.ng-login-modal-panel p:not(.ng-card-label) {
    margin: 12px 0 0;
    color: var(--ng-muted);
    line-height: 1.6;
}

.ng-login-modal-form {
    margin-top: 18px;
}

.ng-auth-modal-view[hidden] {
    display: none;
}

.ng-login-modal-links {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.ng-login-modal-links a,
.ng-login-modal-links button {
    border: 0;
    background: transparent;
    color: var(--ng-primary-dark);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.4;
    padding: 0;
    text-decoration: none;
}

.ng-login-modal-links a:hover,
.ng-login-modal-links button:hover {
    text-decoration: underline;
}

.ng-login-modal-status {
    border: 1px solid rgba(45, 122, 112, 0.25);
    border-radius: 12px;
    background: rgba(235, 250, 247, 0.9);
    color: var(--ng-primary-dark) !important;
    font-size: 0.92rem;
    font-weight: 700;
    padding: 10px 12px;
}

.ng-login-modal-notice {
    border: 1px solid rgba(190, 18, 60, 0.22);
    border-radius: 12px;
    background: rgba(255, 241, 242, 0.82);
    color: #8f1238 !important;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.45 !important;
    padding: 10px 12px;
}

.ng-login-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.ng-layout {
    width: min(1720px, calc(100% - 48px));
    margin: 0 auto;
    padding: 24px 0 48px;
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 32px;
}

.ng-sidebar {
    position: sticky;
    top: 24px;
    align-self: start;
    border: 1px solid var(--ng-border);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--ng-shadow);
    padding: 18px;
}

.ng-sidebar-title {
    margin: 0 0 14px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ng-muted);
}

.ng-side-link,
.ng-side-current {
    display: block;
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
}

.ng-side-link {
    color: var(--ng-primary-dark);
}

.ng-side-link:hover {
    background: var(--ng-soft);
}

.ng-side-current {
    margin-top: 4px;
    background: var(--ng-soft);
    color: var(--ng-text);
}

.ng-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ng-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 0.9rem;
    color: var(--ng-muted);
}

.ng-breadcrumb a {
    color: var(--ng-primary-dark);
    font-weight: 700;
    text-decoration: none;
}

.ng-breadcrumb a:hover {
    text-decoration: underline;
}

.ng-hero {
    border: 1px solid rgba(47, 143, 163, 0.18);
    border-radius: 28px;
    background:
        linear-gradient(135deg, rgba(234, 247, 251, 0.96), rgba(255, 255, 255, 0.96) 50%, rgba(246, 239, 255, 0.94));
    box-shadow: var(--ng-shadow);
    padding: 34px 28px;
    text-align: center;
}

.ng-kicker {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ng-primary);
}

.ng-hero h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 3.4rem);
    line-height: 1.05;
    letter-spacing: -0.04em;
}

.ng-help-button {
    margin-top: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(47, 143, 163, 0.22);
    border-radius: 999px;
    background: #fff;
    color: var(--ng-primary-dark);
    font-weight: 800;
    font-size: 0.9rem;
    padding: 10px 16px;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
    cursor: pointer;
    transform: none;
}

.ng-help-button:hover {
    background: var(--ng-soft);
}

.ng-card {
    border: 1px solid var(--ng-border);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--ng-shadow);
    padding: 22px;
}

.ng-card-label {
    margin: 0 0 4px;
    color: var(--ng-primary);
    font-size: 0.82rem;
    font-weight: 800;
}

.ng-card-title {
    display: block;
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
}

.ng-textarea {
    margin-top: 16px;
    width: 100%;
    min-height: 320px;
    box-sizing: border-box;
    resize: vertical;
    border: 1px solid #ccd8d4;
    border-radius: 16px;
    background: #fff;
    color: var(--ng-text);
    padding: 16px;
    font-size: 0.95rem;
    line-height: 1.55;
    box-shadow: inset 0 2px 8px rgba(15, 23, 42, 0.04);
}

.ng-textarea:focus {
    outline: 3px solid rgba(47, 143, 163, 0.16);
    border-color: var(--ng-primary);
}

.ng-check-card {
    margin-top: 14px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    border: 1px solid rgba(47, 143, 163, 0.18);
    border-radius: 16px;
    background: var(--ng-soft);
    padding: 14px;
    cursor: pointer;
}

.ng-check-card input {
    margin-top: 3px;
    accent-color: var(--ng-primary);
}

.ng-check-title {
    display: block;
    font-weight: 800;
}

.ng-check-text {
    display: block;
    margin-top: 2px;
    color: var(--ng-muted);
    font-size: 0.88rem;
}

.ng-actions {
    margin-top: 18px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ng-btn-primary,
.ng-btn-secondary,
.ng-btn-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    padding: 10px 16px;
    font-size: 0.92rem;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.ng-btn-primary {
    border: 1px solid var(--ng-primary);
    background: var(--ng-primary);
    color: #fff;
}

.ng-btn-primary:hover {
    background: var(--ng-primary-dark);
}

.ng-btn-primary:disabled,
.ng-btn-primary[disabled] {
    border-color: rgba(148, 163, 184, 0.42);
    background: rgba(148, 163, 184, 0.22);
    color: rgba(71, 85, 105, 0.72);
    cursor: not-allowed;
}

.ng-btn-secondary {
    border: 1px solid var(--ng-border);
    background: #fff;
    color: var(--ng-text);
}

.ng-btn-secondary:hover {
    background: #f8faf9;
}

.ng-btn-danger {
    border: 1px solid rgba(180, 35, 24, 0.34);
    background: rgba(254, 242, 242, 0.96);
    color: #991b1b;
}

.ng-btn-danger:hover {
    background: #fee2e2;
}
.ng-content > * {
    width: 100%;
}

[data-help-modal] {
    position: fixed;
    inset: 0;
    z-index: 50;
    padding: 24px;
    background: rgba(15, 23, 42, 0.38);
    backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
}

[data-help-modal].hidden {
    display: none !important;
}

[data-help-modal]:not(.hidden) {
    display: flex !important;
}

[data-help-modal] [role="dialog"] {
    width: min(680px, calc(100vw - 32px));
    max-height: min(760px, calc(100vh - 48px));
    overflow-y: auto;
    border: 1px solid var(--ng-border);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.24);
    padding: 24px;
}

[data-help-modal] h2 {
    margin: 0;
    font-size: 1.35rem;
    color: var(--ng-text);
}

[data-help-modal] button[data-help-modal-close] {
    border: 1px solid var(--ng-border);
    border-radius: 999px;
    background: #fff;
    color: var(--ng-muted);
    padding: 8px 12px;
    font-weight: 700;
    cursor: pointer;
}

[data-help-modal] button[data-help-modal-close]:hover {
    background: var(--ng-soft-blue);
    color: var(--ng-text);
}

[data-help-modal] ol {
    margin: 18px 0 0;
}

[data-help-modal] li {
    margin-bottom: 8px;
}

[data-help-modal] .rounded-md {
    border-radius: 16px;
}

.ng-help-section h3,
.ng-help-note h3 {
    margin: 18px 0 10px;
    font-size: 1rem;
    color: var(--ng-text);
}

.ng-help-note {
    margin-top: 18px;
    border: 1px solid var(--ng-border);
    border-radius: 16px;
    background: linear-gradient(135deg, var(--ng-soft-blue), #fff);
    padding: 14px 16px;
}

.ng-help-note h3 {
    margin-top: 0;
}

.ng-help-note ul {
    margin: 0;
    padding-left: 1.15rem;
    list-style: disc;
}

.ng-help-note li {
    display: list-item;
    margin-bottom: 8px;
    line-height: 1.45;
}

.ng-help-note li:last-child {
    margin-bottom: 0;
}

.ng-help-privacy {
    margin: 16px 0 0;
    color: var(--ng-muted);
    font-size: 0.92rem;
    line-height: 1.55;
}

.ng-help-steps {
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
    counter-reset: ng-help-step;
}

.ng-help-steps li {
    counter-increment: ng-help-step;
    position: relative;
    margin-bottom: 9px;
    padding-left: 28px;
    line-height: 1.45;
}

.ng-help-steps li::before {
    content: counter(ng-help-step) ".";
    position: absolute;
    left: 0;
    top: 0.05rem;
    min-width: 20px;
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--ng-primary);
}

/* Calculator / results / export ---------------------------------------- */

.ng-result-card {
    border: 1px solid var(--ng-border);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--ng-shadow);
    overflow: hidden;
}

.ng-result-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    padding: 26px 26px 22px;
    border-bottom: 1px solid var(--ng-border);
    background: linear-gradient(135deg, var(--ng-soft-blue), #ffffff 58%, var(--ng-soft-lavender));
}

.ng-result-label {
    margin: 0 0 4px;
    color: var(--ng-muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.ng-result-name {
    margin: 0;
    color: var(--ng-text);
    font-size: 1.7rem;
    font-weight: 850;
    letter-spacing: -0.02em;
}

.ng-result-pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border: 1px solid rgba(47, 143, 163, 0.22);
    border-radius: 999px;
    background: var(--ng-soft);
    color: var(--ng-primary-dark);
    padding: 8px 12px;
    font-size: 0.88rem;
    font-weight: 800;
    white-space: nowrap;
}

.ng-result-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    padding: 22px 26px 26px;
}

.ng-result-metric {
    border: 1px solid var(--ng-border);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.88);
    min-width: 0;
    padding: 16px;
}

.ng-result-metric dt {
    margin: 0;
    color: var(--ng-muted);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.ng-result-metric dd {
    margin: 8px 0 0;
    color: var(--ng-text);
    font-size: 1.45rem;
    font-weight: 850;
}

/* Responsive overrides / related feature areas ------------------------- */

@media (max-width: 1100px) {
    .ng-result-header {
        align-items: stretch;
    }

    .ng-result-pill {
        max-width: 100%;
        white-space: normal;
    }

    .ng-result-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .ng-public-header {
        gap: 12px;
        padding: 14px;
    }

    .ng-public-brand {
        width: 100%;
    }

    .ng-public-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .ng-public-nav-link,
    .ng-public-nav-button {
        width: 100%;
        min-width: 0;
        padding: 9px 10px;
        text-align: center;
        white-space: normal;
    }

    .ng-public-nav-action {
        grid-column: 1 / -1;
    }

    .ng-hero h1 {
        font-size: 2rem;
    }

    .ng-result-header {
        flex-direction: column;
    }

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

    .ng-export-header {
        flex-direction: column;
        align-items: stretch;
    }

    .ng-export-controls,
    .ng-copy-actions,
    .ng-export-select-group {
        width: 100%;
    }

    .ng-export-controls {
        align-items: stretch;
        justify-content: flex-start;
    }

    .ng-copy-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .ng-copy-actions .ng-btn-primary {
        width: 100%;
    }

    .ng-export-title {
        font-size: 1.2rem;
    }

    .ng-back-to-top {
        right: 16px;
        bottom: 18px;
        width: 42px;
        height: 42px;
        font-size: 1.15rem;
    }
}

.ng-export-card {
    border: 1px solid var(--ng-border);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--ng-shadow);
    padding: 22px;
}

.ng-export-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 16px;
}

.ng-export-label {
    margin: 0 0 4px;
    color: var(--ng-muted);
    font-size: 0.82rem;
    font-weight: 800;
}

.ng-export-title {
    margin: 0;
    color: var(--ng-text);
    font-size: 1.35rem;
    font-weight: 850;
    letter-spacing: -0.02em;
}

.ng-copy-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.ng-copy-feedback {
    color: var(--ng-primary-dark);
    font-size: 0.88rem;
    font-weight: 800;
}

.ng-copy-feedback.hidden {
    display: none;
}

.ng-copy-block {
    margin: 0;
    overflow-x: auto;
    border: 1px solid var(--ng-border);
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(238, 247, 255, 0.55), rgba(255, 255, 255, 0.96));
    color: var(--ng-text);
    padding: 18px;
    font-size: 0.92rem;
    line-height: 1.55;
    box-shadow: inset 0 2px 8px rgba(15, 23, 42, 0.035);
}

.ng-mobile-menu {
    display: none;
}

.ng-mobile-menu summary {
    list-style: none;
    cursor: pointer;
}

.ng-mobile-menu summary::-webkit-details-marker {
    display: none;
}

@media (max-width: 640px) {
    .ng-hero h1 {
        font-size: 2rem;
    }

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

    .ng-export-controls,
    .ng-copy-actions,
    .ng-export-select-group {
        width: 100%;
    }

    .ng-export-controls {
        align-items: stretch;
    }

    .ng-copy-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .ng-copy-actions .ng-btn-primary {
        width: 100%;
    }

    .ng-back-to-top {
        right: 16px;
        bottom: 18px;
        width: 42px;
        height: 42px;
        font-size: 1.15rem;
    }
}

.ng-competition-card {
    overflow: hidden;
    border: 1px solid var(--ng-border);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--ng-shadow);
}

.ng-competition-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--ng-border);
    background: linear-gradient(135deg, #ffffff, var(--ng-soft-blue));
    padding: 18px 22px;
}

.ng-competition-label {
    margin: 0 0 4px;
    color: var(--ng-muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ng-competition-title {
    margin: 0;
    color: var(--ng-text);
    font-size: 1.25rem;
    font-weight: 850;
    letter-spacing: -0.02em;
}

.ng-competition-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.ng-competition-table {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.94rem;
}

.ng-competition-table thead {
    color: var(--ng-muted);
    background: rgba(248, 252, 255, 0.8);
}

.ng-competition-table th {
    padding: 13px 18px;
    font-size: 0.76rem;
    font-weight: 850;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border-bottom: 1px solid var(--ng-border);
}

.ng-competition-table td {
    padding: 13px 18px;
    border-bottom: 1px solid rgba(219, 231, 239, 0.8);
    color: var(--ng-text);
}

.ng-competition-table tbody tr:last-child td {
    border-bottom: 0;
}

.ng-competition-table tbody tr:hover {
    background: rgba(238, 247, 255, 0.65);
}

.ng-competition-table th:nth-child(n + 2),
.ng-competition-table td:nth-child(n + 2) {
    text-align: right;
    white-space: nowrap;
}

.ng-competition-table td:first-child {
    font-weight: 700;
}

.ng-lk-pill {
    display: inline-flex;
    justify-content: center;
    min-width: 42px;
    border-radius: 999px;
    background: var(--ng-soft);
    color: var(--ng-primary-dark);
    padding: 4px 9px;
    font-size: 0.82rem;
    font-weight: 850;
}

.ng-competition-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.ng-competition-grid .ng-competition-card:first-child {
    grid-column: 1 / -1;
}

@media (max-width: 1320px) {
    .ng-competition-grid {
        grid-template-columns: 1fr;
    }
}

.ng-back-to-top {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 40;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(47, 143, 163, 0.24);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--ng-primary-dark);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.18);
    cursor: pointer;
    font-size: 1.35rem;
    font-weight: 900;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 160ms ease, transform 160ms ease, background 160ms ease;
}

.ng-back-to-top.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.ng-back-to-top:hover {
    background: var(--ng-soft-blue);
}

.ng-export-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: end;
    justify-content: flex-end;
}

.ng-export-select-group {
    display: flex;
    min-width: 220px;
    flex-direction: column;
    gap: 5px;
}

.ng-export-select-label {
    color: var(--ng-muted);
    font-size: 0.76rem;
    font-weight: 850;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ng-export-select {
    min-height: 42px;
    border: 1px solid var(--ng-border);
    border-radius: 12px;
    background: #fff;
    color: var(--ng-text);
    padding: 8px 12px;
    font-weight: 750;
}

.ng-export-select:focus {
    outline: 3px solid rgba(47, 143, 163, 0.16);
    border-color: var(--ng-primary);
}

.ng-app-body {
    overflow-x: hidden;
}

.ng-app-sidebar {
    margin: 16px 0 16px 16px;
    height: calc(100vh - 32px);
    border: 1px solid var(--ng-border) !important;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.9) !important;
    box-shadow: var(--ng-shadow);
    backdrop-filter: blur(18px);
}

.ng-app-sidebar-header {
    padding: 18px 16px 10px;
}

.ng-app-logo-mark {
    display: inline-flex;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 1px solid rgba(47, 143, 163, 0.22);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.78);
    box-shadow:
        0 10px 24px rgba(47, 143, 163, 0.18),
        0 0 0 3px rgba(47, 143, 163, 0.06);
}

.ng-app-logo-initials {
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.03em;
}

.ng-brand-logo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ng-brand-logo--sidebar {
    object-position: center 42%;
}

.ng-brand-logo--mobile {
    object-position: center 42%;
}

.ng-app-nav-group {
    gap: 6px;
    padding: 0 12px;
}

.ng-app-sidebar-item {
    min-height: 42px !important;
    border: 1px solid transparent !important;
    border-radius: 14px !important;
    color: var(--ng-primary-dark) !important;
    font-weight: 800 !important;
}

.ng-app-sidebar-item:hover,
.ng-app-sidebar-item.is-current,
.ng-app-sidebar-item[aria-current='page'] {
    border-color: rgba(47, 143, 163, 0.18) !important;
    background: var(--ng-soft) !important;
    color: var(--ng-text) !important;
}

.ng-app-mobile-header {
    border-bottom: 1px solid var(--ng-border) !important;
    background: rgba(255, 255, 255, 0.9) !important;
    box-shadow: 0 10px 28px rgba(31, 41, 55, 0.08);
    backdrop-filter: blur(16px);
}

.ng-app-topbar {
    border-bottom: 1px solid var(--ng-border) !important;
    background: rgba(255, 255, 255, 0.9) !important;
    box-shadow: 0 12px 30px rgba(31, 41, 55, 0.08);
    backdrop-filter: blur(16px);
}

.ng-app-main {
    width: min(1280px, calc(100% - 48px));
    margin: 0 auto;
    padding: 28px 0 56px;
}

.ng-app-page {
    display: flex;
    width: 100%;
    flex-direction: column;
    gap: 22px;
}

.ng-app-page--narrow {
    max-width: 920px;
}

.ng-app-hero {
    padding: 36px 32px;
}

.ng-app-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

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

.ng-dashboard-card-wide {
    grid-column: 1 / -1;
}

.ng-app-card-link {
    color: inherit;
    text-decoration: none;
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.ng-app-card-link:hover {
    transform: translateY(-2px);
    border-color: rgba(47, 143, 163, 0.28);
    box-shadow: 0 18px 44px rgba(31, 41, 55, 0.11);
}

.ng-app-card-link:focus-visible {
    outline: 3px solid rgba(47, 143, 163, 0.2);
    outline-offset: 3px;
    border-color: rgba(47, 143, 163, 0.38);
}

.ng-breeding-management-page {
    gap: 24px;
}

.ng-breeding-management-status {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.ng-breeding-management-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ng-breeding-management-section-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.ng-breeding-management-section-header h2 {
    margin: 0;
    color: var(--ng-primary);
    font-size: 1.18rem;
    font-weight: 900;
    letter-spacing: 0;
}

.ng-breeding-management-grid {
    gap: 14px;
}

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

.ng-breeding-management-card {
    position: relative;
    min-height: 0;
    padding: 20px 48px 20px 20px;
}

.ng-breeding-management-card p:not(.ng-card-label) {
    margin-top: 9px;
}

.ng-breeding-management-card .ng-breeding-management-badge-group {
    margin: 14px 0 0;
}

.ng-breeding-management-card-chevron {
    position: absolute;
    right: 20px;
    bottom: 20px;
    width: 9px;
    height: 9px;
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    color: var(--ng-primary-dark);
    opacity: 0.58;
    transform: rotate(45deg);
    transition: opacity 160ms ease, transform 160ms ease;
}

.ng-breeding-management-card:hover .ng-breeding-management-card-chevron,
.ng-breeding-management-card:focus-visible .ng-breeding-management-card-chevron {
    opacity: 0.92;
    transform: translateX(2px) rotate(45deg);
}

.ng-breeding-management-card--wide {
    max-width: none;
}

.ng-app-card-admin {
    border-color: rgba(185, 148, 232, 0.36);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(243, 238, 251, 0.88));
}

.ng-app-card-disabled {
    background: rgba(255, 255, 255, 0.66);
}

.ng-app-card-disabled .ng-card-label,
.ng-app-card-disabled h2,
.ng-app-card-disabled p {
    color: var(--ng-muted);
}

/* App shell / sidebar / mobile shell ----------------------------------- */

.ng-shell-body {
    overflow-x: hidden;
}

.ng-shell {
    min-height: 100vh;
}

.ng-shell-toggle {
    position: fixed;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.ng-shell-sidebar {
    position: fixed;
    z-index: 60;
    top: 16px;
    bottom: 16px;
    left: 16px;
    display: flex;
    width: 260px;
    flex-direction: column;
    gap: 18px;
    border: 1px solid var(--ng-border);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--ng-shadow);
    padding: 16px;
    backdrop-filter: blur(18px);
    transition: width 180ms ease, transform 180ms ease;
}

.ng-shell-brand-row {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
}

.ng-shell-brand {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
    color: var(--ng-text);
    font-weight: 900;
    text-decoration: none;
}

.ng-shell-brand-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ng-shell-collapse {
    display: inline-flex;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--ng-border);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.8);
    color: var(--ng-primary-dark);
    cursor: pointer;
}

.ng-shell-collapse span,
.ng-shell-mobile-toggle-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ng-shell-collapse span::before {
    content: "";
    width: 10px;
    height: 10px;
    border-top: 2px solid currentColor;
    border-left: 2px solid currentColor;
    transform: rotate(-45deg);
    transition: transform 160ms ease;
}

.ng-shell-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ng-shell-nav-gap {
    height: 6px;
}

.ng-shell-nav-form {
    margin: 0;
}

.ng-shell-bottom {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: auto;
}

.ng-shell-nav-link {
    display: flex;
    min-height: 42px;
    width: 100%;
    align-items: center;
    gap: 10px;
    border: 1px solid transparent;
    border-radius: 14px;
    background: transparent;
    color: var(--ng-primary-dark);
    padding: 8px 10px;
    font: inherit;
    font-size: 0.94rem;
    font-weight: 850;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.ng-shell-nav-link:hover,
.ng-shell-nav-link.is-current {
    border-color: rgba(47, 143, 163, 0.18);
    background: var(--ng-soft);
    color: var(--ng-text);
}

.ng-shell-nav-button {
    appearance: none;
}

.ng-shell-nav-icon {
    display: inline-flex;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: rgba(47, 143, 163, 0.1);
    color: var(--ng-primary-dark);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0;
}

.ng-shell-nav-icon svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

.ng-shell-nav-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ng-shell-user {
    display: flex;
    gap: 10px;
    align-items: center;
    border: 1px solid var(--ng-border);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
    padding: 10px;
}

.ng-shell-user-link {
    color: inherit;
    text-decoration: none;
    transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.ng-shell-user-link:hover,
.ng-shell-user-link:focus-visible {
    border-color: rgba(47, 143, 163, 0.35);
    background: rgba(255, 255, 255, 0.9);
    outline: none;
    transform: translateY(-1px);
}

.ng-shell-user-avatar {
    display: inline-flex;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    border-radius: 13px;
    background: var(--ng-soft);
    color: var(--ng-primary-dark);
    font-size: 0.75rem;
    font-weight: 900;
}

.ng-shell-user-details {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ng-shell-user-details strong,
.ng-shell-user-details span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ng-shell-user-details strong {
    color: var(--ng-text);
    font-size: 0.88rem;
}

.ng-shell-user-details span {
    color: var(--ng-muted);
    font-size: 0.78rem;
}

.ng-shell-content {
    min-height: 100vh;
    padding: 24px 24px 56px 308px;
    transition: padding-left 180ms ease;
}

.ng-shell-content--wide {
    padding-right: 12px;
}

.ng-shell-toggle:checked ~ .ng-shell-sidebar {
    width: 80px;
    padding-inline: 12px;
}

.ng-shell-toggle:checked ~ .ng-shell-sidebar .ng-shell-brand-text,
.ng-shell-toggle:checked ~ .ng-shell-sidebar .ng-shell-nav-text,
.ng-shell-toggle:checked ~ .ng-shell-sidebar .ng-shell-user-details {
    display: none;
}

.ng-shell-toggle:checked ~ .ng-shell-sidebar .ng-shell-brand-row {
    flex-direction: column;
    justify-content: center;
    gap: 12px;
}

.ng-shell-toggle:checked ~ .ng-shell-sidebar .ng-shell-brand {
    justify-content: center;
}

.ng-shell-toggle:checked ~ .ng-shell-sidebar .ng-shell-collapse {
    position: static;
    width: 38px;
    height: 38px;
    margin-inline: auto;
}

.ng-shell-toggle:checked ~ .ng-shell-sidebar .ng-shell-collapse span::before {
    transform: rotate(135deg);
}

.ng-shell-toggle:checked ~ .ng-shell-sidebar .ng-shell-nav-link {
    min-height: 46px;
    justify-content: center;
    padding: 8px;
}

.ng-shell-toggle:checked ~ .ng-shell-sidebar .ng-shell-nav-icon {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
    margin: 0;
}

.ng-shell-toggle:checked ~ .ng-shell-sidebar .ng-shell-user {
    justify-content: center;
    padding: 8px;
}

.ng-shell-toggle:checked ~ .ng-shell-sidebar .ng-sidebar-bug-report {
    justify-content: center;
    padding-inline: 8px;
}

.ng-shell-toggle:checked ~ .ng-shell-sidebar .ng-shell-bottom {
    align-items: stretch;
}

.ng-shell-toggle:checked ~ .ng-shell-content {
    padding-left: 120px;
}

.ng-shell-mobile-toggle,
.ng-shell-overlay {
    display: none;
}

@media (max-width: 900px) {
    .ng-public-page {
        width: min(100%, 760px);
        padding: 18px 4px 40px;
    }

    .ng-public-page--app {
        width: 100%;
        padding: 0;
    }

    .ng-public-header {
        align-items: flex-start;
        flex-direction: column;
        border-radius: 18px;
    }

    .ng-public-nav {
        justify-content: flex-start;
        width: 100%;
    }

    .ng-public-hero {
        border-radius: 20px;
        padding: 26px 22px;
    }

    .ng-public-hero h1 {
        font-size: 2.4rem;
    }

    .ng-public-grid {
        grid-template-columns: 1fr;
    }

    .ng-public-card {
        min-height: auto;
        padding: 24px;
    }

    .ng-layout {
        display: block;
        width: min(100% - 24px, 760px);
        padding: 16px 0 36px;
    }

    .ng-sidebar {
        display: none;
    }

    .ng-content {
        gap: 16px;
    }

    .ng-hero,
    .ng-card {
        border-radius: 20px;
        padding: 20px;
    }

    .ng-textarea {
        min-height: 260px;
    }

    .ng-mobile-menu {
        display: block;
        border: 1px solid var(--ng-border);
        border-radius: 18px;
        background: rgba(255, 255, 255, 0.94);
        box-shadow: var(--ng-shadow);
        overflow: hidden;
    }

    .ng-mobile-menu summary {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 14px 16px;
        color: var(--ng-text);
        font-weight: 850;
    }

    .ng-mobile-menu nav {
        display: flex;
        flex-direction: column;
        gap: 4px;
        border-top: 1px solid var(--ng-border);
        padding: 10px;
    }

    .ng-mobile-menu a,
    .ng-mobile-menu span {
        border-radius: 12px;
        padding: 10px 12px;
        font-weight: 750;
        text-decoration: none;
    }

    .ng-mobile-menu a {
        color: var(--ng-primary-dark);
    }

    .ng-mobile-menu span {
        background: var(--ng-soft-blue);
        color: var(--ng-text);
    }

    .ng-app-sidebar {
        margin: 0;
        height: 100dvh;
        border-radius: 0 22px 22px 0;
    }

    .ng-app-main {
        width: min(100% - 24px, 760px);
        padding: 18px 0 36px;
    }

    .ng-app-hero {
        padding: 26px 22px;
    }

    .ng-app-card-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .ng-breeding-management-card,
    .ng-breeding-management-card--wide {
        max-width: none;
    }

    .ng-shell-sidebar {
        top: 0;
        bottom: 0;
        left: 0;
        width: min(84vw, 300px);
        max-width: calc(100vw - 28px);
        height: 100dvh;
        margin: 0;
        border-radius: 0 22px 22px 0;
        transform: translateX(-110%);
    }

    .ng-shell-mobile-toggle {
        position: fixed;
        z-index: 55;
        top: 12px;
        left: 12px;
        display: inline-flex;
        min-height: 42px;
        align-items: center;
        gap: 8px;
        border: 1px solid var(--ng-border);
        border-radius: 14px;
        background: rgba(255, 255, 255, 0.92);
        color: var(--ng-primary-dark);
        box-shadow: var(--ng-shadow);
        padding: 8px 12px;
        font-size: 0.9rem;
        font-weight: 850;
        cursor: pointer;
        backdrop-filter: blur(14px);
    }

    .ng-shell-mobile-toggle-mark {
        width: 30px;
        height: 30px;
        flex: 0 0 30px;
        overflow: hidden;
        border: 1px solid rgba(47, 143, 163, 0.22);
        border-radius: 10px;
        background: rgba(255, 255, 255, 0.82);
        box-shadow: 0 6px 16px rgba(47, 143, 163, 0.18);
    }

    .ng-shell-overlay {
        position: fixed;
        z-index: 58;
        inset: 0;
        background: rgba(15, 23, 42, 0.3);
        opacity: 0;
        pointer-events: none;
        transition: opacity 160ms ease;
    }

    .ng-shell-toggle:checked ~ .ng-shell-sidebar {
        width: min(84vw, 300px);
        padding: 16px;
        transform: translateX(0);
    }

    .ng-shell-toggle:checked ~ .ng-shell-overlay {
        display: block;
        opacity: 1;
        pointer-events: auto;
    }

    .ng-shell-toggle:checked ~ .ng-shell-sidebar .ng-shell-brand-text,
    .ng-shell-toggle:checked ~ .ng-shell-sidebar .ng-shell-nav-text {
        display: inline-block;
    }

    .ng-shell-toggle:checked ~ .ng-shell-sidebar .ng-shell-user-details {
        display: flex;
    }

    .ng-shell-toggle:checked ~ .ng-shell-sidebar .ng-shell-brand-row {
        flex-direction: row;
        justify-content: space-between;
        gap: 10px;
    }

    .ng-shell-toggle:checked ~ .ng-shell-sidebar .ng-shell-brand {
        justify-content: flex-start;
    }

    .ng-shell-toggle:checked ~ .ng-shell-sidebar .ng-shell-nav-link {
        min-height: 46px;
        justify-content: flex-start;
        padding: 8px 10px;
    }

    .ng-shell-toggle:checked ~ .ng-shell-sidebar .ng-shell-nav-icon {
        width: 30px;
        height: 30px;
        flex-basis: 30px;
    }

    .ng-shell-toggle:checked ~ .ng-shell-sidebar .ng-shell-user {
        justify-content: flex-start;
        padding: 10px;
    }

    .ng-shell-toggle:checked ~ .ng-shell-sidebar .ng-shell-collapse {
        position: static;
        width: 38px;
        height: 38px;
    }

    .ng-shell-content,
    .ng-shell-toggle:checked ~ .ng-shell-content {
        box-sizing: border-box;
        width: 100%;
        padding: 74px 18px 40px;
    }

    .ng-shell-content--wide {
        padding-right: 18px;
    }

    .ng-public-main,
    .ng-app-page {
        gap: 24px;
    }

    .ng-horse-profile-gene-grid > section:first-child,
    .ng-horse-profile-feature-grid > section:first-child {
        padding-right: 0;
        border-right: 0;
    }

    .ng-horse-profile-gene-grid > section:last-child,
    .ng-horse-profile-feature-grid > section:last-child {
        padding-left: 0;
    }

    .ng-horse-profile-offspring-grid {
        grid-template-columns: 1fr;
    }

    
}

@media (max-width: 560px) {
    .ng-horse-profile-offspring {
        margin-top: 20px;
    }

    .ng-horse-profile-offspring-header {
        align-items: flex-start;
    }

    .ng-horse-profile-offspring-card {
        padding: 13px;
    }

    .ng-horse-profile-offspring-values {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .ng-shell-content,
    .ng-shell-toggle:checked ~ .ng-shell-content {
        padding-inline: 16px;
    }

    .ng-public-page {
        padding-top: 12px;
    }

    .ng-public-hero,
    .ng-app-hero,
    .ng-public-card {
        border-radius: 18px;
        padding: 22px 18px;
    }

    .ng-app-card-grid,
    .ng-public-main,
    .ng-app-page {
        gap: 18px;
    }

    .ng-login-modal {
        width: min(100% - 24px, 420px);
    }

    .ng-login-modal-panel {
        max-height: calc(100dvh - 24px);
        padding: 20px;
    }

    .ng-login-modal-form {
        gap: 16px;
    }

    .ng-login-modal-actions {
        justify-content: stretch;
    }

    .ng-login-modal-actions .ng-btn-primary,
    .ng-login-modal-actions .ng-btn-secondary {
        flex: 1 1 140px;
    }
}

/* Admin / forms / news / maintenance ----------------------------------- */

/* Admin forms ------------------------------------------------------------ */

.ng-form-card {
    max-width: 1040px;
}

.ng-public-card--form-section,
.ng-public-card--admin-panel {
    border-radius: 18px;
}

.ng-public-card--admin-stat {
    text-decoration: none;
}

.ng-form-stack {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ng-horse-edit-name {
    margin: 0;
    color: var(--ng-text);
    font-size: 1.08rem;
    font-weight: 800;
    line-height: 1.35;
}

.ng-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.ng-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ng-field span {
    color: var(--ng-text);
    font-size: 0.82rem;
    font-weight: 850;
}

.ng-field input,
.ng-field select,
.ng-field textarea {
    width: 100%;
    border: 1px solid var(--ng-border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--ng-text);
    font: inherit;
    font-size: 0.95rem;
    padding: 12px 14px;
    box-shadow: inset 0 1px 3px rgba(15, 23, 42, 0.04);
}

.ng-field input.ng-date-input {
    max-width: 240px;
}

.ng-date-tool-grid {
    display: grid;
    gap: 18px;
    margin-top: 22px;
}

.ng-date-tool-panel {
    display: grid;
    gap: 18px;
    border: 1px solid rgba(47, 143, 163, 0.16);
    border-radius: 14px;
    background: rgba(47, 143, 163, 0.06);
    padding: 18px;
}

.ng-date-tool-panel h3 {
    margin: 0;
    color: var(--ng-text);
    font-size: 1rem;
    font-weight: 850;
    line-height: 1.35;
}

.ng-date-result-box {
    display: grid;
    gap: 16px;
    margin-top: 18px;
    border: 1px solid rgba(47, 143, 163, 0.18);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(47, 143, 163, 0.1), rgba(255, 255, 255, 0.9));
    background-clip: padding-box;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    padding: 18px;
}

.ng-date-result-box--compact {
    border-radius: 18px;
    margin-top: 0;
    padding: 14px;
}

.ng-date-result-header {
    border-radius: 18px;
    overflow: hidden;
}

.ng-field textarea {
    resize: vertical;
    min-height: 110px;
    line-height: 1.55;
}

.ng-field textarea[name="body"] {
    min-height: 260px;
}

.ng-field input:focus,
.ng-field select:focus,
.ng-field textarea:focus {
    border-color: rgba(47, 143, 163, 0.45);
    box-shadow: 0 0 0 4px rgba(47, 143, 163, 0.12);
    outline: none;
}

.ng-field small {
    color: #b42318;
    font-size: 0.78rem;
    font-weight: 700;
}

.ng-field .ng-field-help,
.ng-import-route-debug {
    color: var(--ng-text-muted);
    font-size: 0.78rem;
    font-weight: 700;
}

.ng-internal-sale-time-help {
    display: grid;
    gap: 8px;
    border: 1px solid rgba(47, 143, 163, 0.24);
    border-radius: 12px;
    background: rgba(47, 143, 163, 0.08);
    color: var(--ng-text);
    padding: 12px;
}

.ng-internal-sale-time-help strong {
    font-size: 0.82rem;
    font-weight: 850;
}

.ng-internal-sale-time-help dl {
    display: grid;
    gap: 6px;
    margin: 0;
}

.ng-internal-sale-time-help div {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px;
}

.ng-internal-sale-time-help dt,
.ng-internal-sale-time-help dd {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 700;
}

.ng-internal-sale-time-help dd {
    color: var(--ng-text-muted);
    text-align: right;
}

.ng-protocol-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 18px;
}

.ng-protocol-list--stacked {
    grid-template-columns: minmax(0, 1fr);
}

.ng-news-filter-tabs {
    margin-top: 8px;
}

.ng-public-card.ng-maintenance-news-card,
.ng-public-card--maintenance-teaser {
    display: block;
    min-height: 0;
    height: auto;
    padding: 18px 20px 22px;
}

.ng-maintenance-news-card h2 {
    color: var(--ng-primary-dark);
}

.ng-maintenance-news-card p:not(.ng-card-label) {
    margin-top: 6px;
}

.ng-maintenance-news-card-action {
    margin-top: 12px;
    width: fit-content;
    white-space: nowrap;
}

.ng-maintenance-log-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.ng-maintenance-log-entry,
.ng-public-card--maintenance-entry {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: auto;
    gap: 10px;
    padding: 18px 20px;
}

.ng-maintenance-log-entry .ng-public-copy p {
    margin-top: 0;
}

.ng-news-section {
    display: grid;
    gap: 14px;
}

.ng-news-section + .ng-news-section {
    margin-top: 10px;
    padding-top: 20px;
    border-top: 1px solid rgba(219, 231, 239, 0.82);
}

.ng-news-section-header {
    display: grid;
    gap: 4px;
}

.ng-news-section-header h2 {
    margin: 0;
}

.ng-idea-section .ng-news-section-header p:not(.ng-card-label) {
    max-width: 48rem;
    margin: 0;
    color: var(--ng-muted);
    line-height: 1.55;
}

.ng-protocol-entry,
.ng-public-card--news-entry {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ng-protocol-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.ng-protocol-chip {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    border-radius: 999px;
    background: rgba(47, 143, 163, 0.1);
    color: var(--ng-primary-dark);
    font-size: 0.75rem;
    font-weight: 850;
    padding: 6px 10px;
}

.ng-protocol-sequence {
    color: var(--ng-primary-dark);
    font-weight: 900;
}

.ng-content-like-form {
    display: flex;
    width: fit-content;
    margin-top: 2px;
}

.ng-content-like-button {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: 1px solid rgba(47, 143, 163, 0.18);
    border-radius: 999px;
    background: rgba(47, 143, 163, 0.06);
    color: var(--ng-text);
    padding: 0.34rem 0.62rem;
    font: inherit;
    font-size: 0.78rem;
    font-weight: 760;
    line-height: 1.15;
    cursor: pointer;
    transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.ng-content-like-button:hover {
    border-color: rgba(47, 143, 163, 0.34);
    background: rgba(47, 143, 163, 0.1);
    color: var(--ng-primary-dark);
}

.ng-content-like-button:focus-visible {
    outline: 2px solid rgba(47, 143, 163, 0.45);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(47, 143, 163, 0.12);
}

.ng-content-like-button.is-active {
    border-color: rgba(47, 143, 163, 0.34);
    background: rgba(47, 143, 163, 0.12);
    color: var(--ng-primary-dark);
}

.ng-content-like-icon {
    font-size: 0.92rem;
    line-height: 1;
}

.ng-content-like-separator,
.ng-content-like-count {
    color: var(--ng-muted);
    font-weight: 700;
}

.ng-protocol-code {
    display: inline-flex;
    width: fit-content;
    border-radius: 10px;
    background: rgba(15, 23, 42, 0.06);
    color: var(--ng-text);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.78rem;
    padding: 5px 8px;
}

.ng-protocol-details {
    border-top: 1px solid var(--ng-border);
    margin-top: 4px;
    padding-top: 12px;
}

.ng-status-card {
    border-color: rgba(47, 143, 163, 0.18);
    background: rgba(236, 253, 245, 0.7);
    color: var(--ng-primary-dark);
    font-weight: 750;
}

.ng-import-status-card {
    display: flex;
    max-width: 1180px;
    flex-direction: column;
    gap: 16px;
}

.ng-import-check-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 12px;
}

.ng-import-check {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    border: 1px solid var(--ng-border);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.82);
    padding: 14px;
}

.ng-import-check h3 {
    margin: 0 0 4px;
    color: var(--ng-text);
    font-size: 0.96rem;
}

.ng-import-check p {
    margin: 0;
    color: var(--ng-muted);
    font-size: 0.86rem;
    line-height: 1.45;
}

.ng-import-check small {
    display: block;
    margin-top: 6px;
    color: var(--ng-muted);
    font-size: 0.76rem;
    font-weight: 750;
}

.ng-import-check-badge {
    display: inline-flex;
    justify-content: center;
    min-width: 58px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 900;
    padding: 5px 8px;
}

.ng-import-check--ok {
    border-color: rgba(47, 143, 163, 0.24);
    background: rgba(236, 253, 245, 0.78);
}

.ng-import-check--ok .ng-import-check-badge {
    background: rgba(47, 143, 163, 0.14);
    color: var(--ng-primary-dark);
}

.ng-import-check--warning {
    border-color: rgba(217, 119, 6, 0.28);
    background: rgba(255, 251, 235, 0.82);
}

.ng-import-check--warning .ng-import-check-badge {
    background: rgba(217, 119, 6, 0.14);
    color: #92400e;
}

.ng-import-check--error {
    border-color: rgba(180, 35, 24, 0.28);
    background: rgba(254, 242, 242, 0.82);
}

.ng-import-check--error .ng-import-check-badge {
    background: rgba(180, 35, 24, 0.14);
    color: #991b1b;
}

.ng-import-status-note {
    margin: 0;
    border-radius: 16px;
    font-weight: 800;
    line-height: 1.5;
    padding: 12px 14px;
}

.ng-import-status-note--ok {
    background: rgba(236, 253, 245, 0.9);
    color: var(--ng-primary-dark);
}

.ng-import-status-note--warning {
    background: rgba(255, 251, 235, 0.9);
    color: #92400e;
}

.ng-import-status-note--error {
    background: rgba(254, 242, 242, 0.92);
    color: #991b1b;
}

.ng-import-status-note p {
    margin: 0;
}

.ng-import-hero-status-note {
    margin-top: 1.15rem;
}

.ng-import-manual-fields {
    display: grid;
    gap: 0.65rem;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    padding-top: 0.9rem;
}

.ng-import-success-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

@media (max-width: 900px) {
    .ng-import-status-note {
        max-width: 100%;
        padding: 10px 12px;
    }

    .ng-import-success-actions {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    }

    .ng-import-success-actions .ng-btn-primary,
    .ng-import-success-actions .ng-btn-secondary {
        justify-content: center;
        width: 100%;
    }
}

@media (max-width: 720px) {
    .ng-form-grid {
        grid-template-columns: 1fr;
    }

    .ng-field input.ng-date-input {
        max-width: 100%;
    }

    .ng-protocol-list {
        grid-template-columns: 1fr;
    }
}

/* Developer protocol interactions -------------------------------------- */

summary.ng-public-card-link {
    width: fit-content;
    cursor: pointer;
    list-style: none;
}

summary.ng-public-card-link::-webkit-details-marker {
    display: none;
}

summary.ng-public-card-link:hover {
    color: var(--ng-primary-dark);
    text-decoration: underline;
}

.ng-check-row {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    border: 1px solid var(--ng-border);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.76);
    padding: 14px;
}

.ng-check-row input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--ng-primary);
}

.ng-check-row span {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ng-check-row strong {
    color: var(--ng-text);
    font-size: 0.92rem;
}

.ng-check-row small {
    color: var(--ng-muted);
    font-size: 0.8rem;
}

/* Horse lists ----------------------------------------------------------- */

/* Horse index ------------------------------------------------------------ */

.ng-horse-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ng-horse-tab {
    display: inline-flex;
    min-height: 40px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--ng-border);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.84);
    color: var(--ng-primary-dark);
    font-size: 0.9rem;
    font-weight: 850;
    min-width: 0;
    overflow-wrap: anywhere;
    padding: 8px 14px;
    text-decoration: none;
}

.ng-horse-tab:hover,
.ng-horse-tab.is-active {
    border-color: rgba(47, 143, 163, 0.26);
    background: var(--ng-soft);
    color: var(--ng-text);
}

.ng-horse-filter-card,
.ng-horse-empty {
    min-height: auto;
}

.ng-horse-filter-grid {
    display: grid;
    grid-template-columns: minmax(220px, 1.5fr) repeat(4, minmax(150px, 1fr)) auto;
    gap: 14px;
    align-items: end;
}

.ng-horse-filter-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.ng-horse-table-card {
    min-height: auto;
    overflow: hidden;
    padding: 0;
}

.ng-horse-table-header {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    justify-content: space-between;
    border-bottom: 1px solid var(--ng-border);
    background: linear-gradient(135deg, #fff, var(--ng-soft-blue));
    padding: 20px 22px;
}

.ng-horse-table-header h2 {
    margin: 0;
}

.ng-horse-table-card--new-received {
    border-color: rgba(47, 143, 163, 0.28);
}

.ng-horse-table-card--new-received > .ng-horse-table-header {
    background: linear-gradient(135deg, #f8fcff, rgba(47, 143, 163, 0.14));
}

.ng-horse-count,
.ng-horse-ekh,
.ng-horse-action-placeholder,
.ng-horse-muted {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    border-radius: 999px;
    background: rgba(47, 143, 163, 0.1);
    color: var(--ng-primary-dark);
    font-size: 0.78rem;
    font-weight: 850;
    padding: 6px 10px;
    white-space: nowrap;
}

.ng-horse-action-placeholder,
.ng-horse-muted {
    background: rgba(15, 23, 42, 0.06);
    color: var(--ng-muted);
}

.ng-breeding-community-badge-group,
.ng-breeding-management-badge-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0 18px;
}

.ng-breeding-community-badge-group .ng-horse-count,
.ng-breeding-management-badge-group .ng-horse-count {
    padding: 7px 12px;
}

.ng-horse-table-wrap {
    overflow-x: auto;
}

.ng-horse-table {
    width: 100%;
    min-width: 1180px;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.9rem;
}

.ng-mdr-change-table {
    min-width: 680px;
}

.ng-horse-table thead {
    background: rgba(248, 252, 255, 0.84);
    color: var(--ng-muted);
}

.ng-horse-table th {
    border-bottom: 1px solid var(--ng-border);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    padding: 12px 14px;
    text-transform: uppercase;
}

.ng-horse-table td {
    border-bottom: 1px solid rgba(219, 231, 239, 0.82);
    color: var(--ng-text);
    padding: 13px 14px;
    vertical-align: top;
}

.ng-horse-table tbody tr:last-child td {
    border-bottom: 0;
}

.ng-horse-table tbody tr:hover {
    background: rgba(238, 247, 255, 0.62);
}

.ng-horse-talent {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: center;
}

.ng-horse-category-badge,
.ng-horse-ekh-badge {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 900;
    line-height: 1.15;
    padding: 5px 8px;
    white-space: nowrap;
}

.ng-horse-category-badge--english {
    border-color: rgba(225, 29, 72, 0.2);
    background: rgba(255, 228, 230, 0.84);
    color: #9f1239;
}

.ng-horse-category-badge--racing {
    border-color: rgba(14, 116, 144, 0.22);
    background: rgba(207, 250, 254, 0.72);
    color: #0e7490;
}

.ng-horse-category-badge--western {
    border-color: rgba(22, 163, 74, 0.2);
    background: rgba(220, 252, 231, 0.74);
    color: #166534;
}

.ng-horse-category-badge--rodeo {
    border-color: rgba(202, 138, 4, 0.2);
    background: rgba(254, 249, 195, 0.82);
    color: #854d0e;
}

.ng-horse-category-badge--driving {
    border-color: rgba(37, 99, 235, 0.2);
    background: rgba(219, 234, 254, 0.78);
    color: #1d4ed8;
}

.ng-horse-category-badge--baroque {
    border-color: rgba(147, 51, 234, 0.2);
    background: rgba(243, 232, 255, 0.74);
    color: #7e22ce;
}

.ng-horse-category-badge--gaited {
    border-color: rgba(13, 148, 136, 0.2);
    background: rgba(204, 251, 241, 0.72);
    color: #0f766e;
}

.ng-horse-ekh-badge--free {
    border-color: rgba(100, 116, 139, 0.16);
    background: rgba(241, 245, 249, 0.82);
    color: #475569;
}

.ng-horse-ekh-badge--alert {
    border-color: rgba(220, 38, 38, 0.24);
    background: rgba(254, 226, 226, 0.9);
    color: #991b1b;
}

.ng-horse-ekh-badge--unknown {
    border-color: rgba(202, 138, 4, 0.2);
    background: rgba(254, 249, 195, 0.82);
    color: #854d0e;
}

.ng-mdr-change-group td {
    background: rgba(47, 143, 163, 0.08);
    color: var(--ng-primary-dark);
    font-weight: 900;
}

.ng-mdr-change-item td:first-child {
    color: var(--ng-muted);
    font-weight: 800;
    padding-left: 28px;
}

.ng-horse-name-cell {
    font-weight: 900;
}

.ng-horse-name-link {
    color: var(--ng-primary-dark);
    font-weight: 900;
    text-decoration: none;
}

.ng-horse-name-link:hover,
.ng-horse-name-link:focus-visible {
    color: var(--ng-text);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ng-horse-table-action,
.ng-horse-card-action {
    min-height: 34px;
    padding: 7px 10px;
}

.ng-horse-actions {
    display: inline-flex;
    gap: 0.4rem;
    align-items: center;
}

.ng-horse-actions form {
    margin: 0;
}

.ng-horse-icon-action {
    display: inline-flex;
    width: 34px;
    height: 34px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--ng-border);
    border-radius: 10px;
    background: #fff;
    color: var(--ng-primary-dark);
    cursor: pointer;
    text-decoration: none;
}

.ng-horse-icon-action:hover,
.ng-horse-icon-action:focus-visible {
    border-color: rgba(47, 143, 163, 0.28);
    background: var(--ng-soft);
    color: var(--ng-text);
}

.ng-horse-icon-action--danger {
    color: #b42318;
}

.ng-horse-icon-action--danger:hover,
.ng-horse-icon-action--danger:focus-visible {
    border-color: rgba(180, 35, 24, 0.28);
    background: #fff4f2;
    color: #7a271a;
}

html.dark .ng-horse-icon-action {
    border-color: rgba(125, 211, 252, 0.34);
    background: #334155;
    color: #f1f5f9;
    box-shadow:
        0 3px 10px rgba(0, 0, 0, 0.28),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

html.dark .ng-horse-icon-action:hover,
html.dark .ng-horse-icon-action:focus-visible {
    border-color: rgba(103, 232, 249, 0.78);
    background: #40536d;
    color: #ffffff;
}

html.dark .ng-horse-icon-action--danger {
    border-color: rgba(248, 113, 113, 0.5);
    background: rgba(153, 27, 27, 0.3);
    color: #fecaca;
}

html.dark .ng-horse-icon-action--danger:hover,
html.dark .ng-horse-icon-action--danger:focus-visible {
    border-color: rgba(248, 113, 113, 0.8);
    background: rgba(153, 27, 27, 0.55);
    color: #ffffff;
}

@media (max-width: 980px) {
    .ng-horse-icon-action {
        width: 38px;
        height: 38px;
        border-radius: 11px;
    }

    .ng-horse-icon-action svg {
        width: 18px;
        height: 18px;
    }
}

.ng-horse-icon-action svg {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.ng-horse-modal {
    width: min(92vw, 480px);
    border: 0;
    border-radius: 18px;
    background: transparent;
    color: var(--ng-text);
    padding: 0;
}

.ng-horse-modal::backdrop {
    background: rgba(24, 32, 39, 0.48);
}

.ng-horse-modal-panel {
    border: 1px solid var(--ng-border);
    border-radius: 18px;
    background: #fff;
    box-shadow: var(--ng-shadow);
    padding: 24px;
}

.ng-horse-modal-panel h2 {
    margin: 4px 0 0;
    color: var(--ng-text);
    font-size: 1.25rem;
    font-weight: 900;
    letter-spacing: 0;
}

.ng-horse-modal-panel p:not(.ng-card-label) {
    margin: 12px 0 0;
    color: var(--ng-muted);
    line-height: 1.6;
}

html.dark .ng-horse-modal-panel {
    border-color: rgba(148, 163, 184, 0.28);
    background: #172235;
    color: var(--ng-text);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.55);
}

html.dark .ng-horse-modal-panel h2 {
    color: #f8fafc;
}

html.dark .ng-horse-modal-panel p:not(.ng-card-label),
html.dark .ng-horse-modal-panel label,
html.dark .ng-horse-modal-panel .ng-card-label {
    color: #cbd5e1;
}

html.dark .ng-horse-modal-panel input,
html.dark .ng-horse-modal-panel select,
html.dark .ng-horse-modal-panel textarea {
    border-color: rgba(148, 163, 184, 0.3);
    background: #111c2d;
    color: #f8fafc;
}

html.dark .ng-horse-modal-panel input::placeholder,
html.dark .ng-horse-modal-panel textarea::placeholder {
    color: #64748b;
}

html.dark .ng-horse-modal-panel input:focus,
html.dark .ng-horse-modal-panel select:focus,
html.dark .ng-horse-modal-panel textarea:focus {
    border-color: rgba(103, 232, 249, 0.62);
    outline: none;
    box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.ng-horse-modal-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 22px;
}

.ng-horse-modal-actions form {
    margin: 0;
}

.ng-horse-sex-heading,
.ng-horse-sex-cell {
    width: 44px;
    text-align: center;
    white-space: nowrap;
}

.ng-horse-sex-symbol {
    display: inline-flex;
    min-width: 24px;
    align-items: center;
    justify-content: center;
    color: var(--ng-text);
    font-size: 1.1rem;
    font-weight: 900;
    line-height: 1;
}

.ng-horse-table th:nth-child(n + 7):nth-child(-n + 10),
.ng-horse-table td:nth-child(n + 7):nth-child(-n + 10) {
    text-align: right;
    white-space: nowrap;
}

.ng-horse-marker-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
}

.ng-horse-marker {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    border: 1px solid transparent;
    border-radius: 999px;
    background: rgba(185, 148, 232, 0.14);
    color: #6f4ca1;
    font-size: 0.72rem;
    font-weight: 900;
    padding: 5px 8px;
    white-space: nowrap;
}

.ng-horse-marker--flaxen {
    border-color: rgba(193, 132, 24, 0.28);
    background: rgba(245, 185, 66, 0.24);
    color: #8a5700;
}

.ng-horse-marker--flaxen_carrier {
    border-color: rgba(193, 132, 24, 0.2);
    background: rgba(245, 185, 66, 0.14);
    color: #966712;
}

.ng-horse-marker--pearl {
    border-color: rgba(141, 93, 206, 0.3);
    background: rgba(173, 123, 235, 0.24);
    color: #643694;
}

.ng-horse-marker--pearl_carrier {
    border-color: rgba(141, 93, 206, 0.2);
    background: rgba(173, 123, 235, 0.14);
    color: #76519d;
}

.ng-horse-marker--silver {
    border-color: rgba(65, 126, 166, 0.28);
    background: rgba(99, 172, 217, 0.2);
    color: #285f82;
}

html.dark .ng-horse-category-badge--english {
    border-color: rgba(251, 113, 133, 0.32);
    background: rgba(159, 18, 57, 0.28);
    color: #fecdd3;
}

html.dark .ng-horse-category-badge--racing {
    border-color: rgba(103, 232, 249, 0.3);
    background: rgba(14, 116, 144, 0.34);
    color: #cffafe;
}

html.dark .ng-horse-category-badge--western {
    border-color: rgba(74, 222, 128, 0.28);
    background: rgba(22, 101, 52, 0.32);
    color: #bbf7d0;
}

html.dark .ng-horse-category-badge--rodeo {
    border-color: rgba(250, 204, 21, 0.28);
    background: rgba(133, 77, 14, 0.32);
    color: #fef08a;
}

html.dark .ng-horse-category-badge--driving {
    border-color: rgba(147, 197, 253, 0.3);
    background: rgba(30, 64, 175, 0.32);
    color: #dbeafe;
}

html.dark .ng-horse-category-badge--baroque {
    border-color: rgba(216, 180, 254, 0.3);
    background: rgba(107, 33, 168, 0.34);
    color: #f3e8ff;
}

html.dark .ng-horse-category-badge--gaited {
    border-color: rgba(94, 234, 212, 0.28);
    background: rgba(15, 118, 110, 0.34);
    color: #ccfbf1;
}

html.dark .ng-horse-ekh-badge--free {
    border-color: rgba(148, 163, 184, 0.22);
    background: rgba(148, 163, 184, 0.12);
    color: #cbd5e1;
}

html.dark .ng-horse-ekh-badge--alert {
    border-color: rgba(248, 113, 113, 0.32);
    background: rgba(153, 27, 27, 0.34);
    color: #fecaca;
}

html.dark .ng-horse-ekh-badge--unknown {
    border-color: rgba(250, 204, 21, 0.28);
    background: rgba(133, 77, 14, 0.32);
    color: #fef08a;
}

.ng-horse-mobile-list {
    display: none;
    gap: 14px;
    padding: 16px;
}

.ng-horse-card {
    min-height: auto;
}

.ng-horse-card-header {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    justify-content: space-between;
    min-width: 0;
}

.ng-horse-card-header h2 {
    margin: 0;
    overflow-wrap: anywhere;
}

.ng-horse-card-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 16px 0 0;
}

.ng-horse-card-stats div {
    border: 1px solid var(--ng-border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.78);
    padding: 10px;
}

html.dark .ng-horse-card-stats div {
    background: rgba(30, 41, 59, 0.78);
}

.ng-horse-card-stats dt {
    color: var(--ng-muted);
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ng-horse-card-stats dd {
    margin: 5px 0 0;
    color: var(--ng-text);
    font-size: 0.95rem;
    font-weight: 850;
    overflow-wrap: anywhere;
}

.ng-horse-card-stat-wide {
    grid-column: span 3;
}

/* Horse profile ---------------------------------------------------------- */

.ng-horse-profile-page {
    align-self: stretch;
    max-width: none;
    width: 100%;
}

.ng-horse-profile-page > .ng-public-card,
.ng-horse-profile-page > .ng-public-hero {
    width: 100%;
}

.ng-horse-profile-page .ng-horse-profile-hero {
    display: flex;
    gap: 24px;
    align-items: flex-end;
    justify-content: space-between;
    min-height: auto;
    padding: 32px;
}

.ng-horse-profile-page .ng-horse-profile-hero h1 {
    display: flex;
    max-width: 860px;
    align-items: baseline;
    gap: 12px;
    font-size: clamp(2rem, 4vw, 3.35rem);
    line-height: 1.02;
}

.ng-horse-profile-sex {
    color: var(--ng-primary-dark);
    font-size: 0.78em;
    line-height: 1;
}

.ng-horse-profile-title-link {
    color: inherit;
    text-decoration: none;
    text-decoration-thickness: 2px;
    text-underline-offset: 7px;
}

.ng-horse-profile-title-link:hover,
.ng-horse-profile-title-link:focus-visible {
    color: var(--ng-primary-dark);
    text-decoration: underline;
}

.ng-horse-profile-title-link small {
    color: var(--ng-primary-dark);
    font-size: 0.34em;
    font-weight: 900;
    vertical-align: super;
}

.ng-horse-profile-page .ng-horse-profile-subtitle {
    margin: 10px 0 0;
    color: var(--ng-muted);
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.45;
}

.ng-horse-profile-page .ng-horse-profile-actions {
    flex-shrink: 0;
    justify-content: flex-end;
}

.ng-horse-profile-mdr-action {
    min-width: auto;
    padding-inline: 12px;
}

.ng-horse-profile-page .ng-horse-profile-card {
    min-height: auto;
    border-radius: 18px;
    padding: 24px;
}

.ng-horse-profile-inventory-banner {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: space-between;
    min-height: auto;
    border-color: rgba(180, 83, 9, 0.24);
    background: linear-gradient(135deg, rgba(255, 251, 235, 0.96), rgba(240, 249, 255, 0.92));
    padding: 18px 22px;
}

.ng-horse-profile-inventory-banner h2 {
    margin: 0;
    color: var(--ng-text);
    font-size: 1.05rem;
    line-height: 1.35;
}

.ng-horse-profile-inventory-banner .ng-card-label {
    margin-bottom: 6px;
    font-size: 0.78rem;
    text-transform: uppercase;
}

.ng-horse-profile-page .ng-card-label {
    margin: 0 0 16px;
    color: var(--ng-primary-dark);
    font-size: clamp(1.25rem, 2.2vw, 1.7rem);
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1.2;
    text-transform: none;
}

.ng-horse-profile-page .ng-horse-profile-card h2 {
    margin: 0 0 16px;
    font-size: clamp(1.25rem, 2.2vw, 1.7rem);
}

.ng-horse-profile-section-header {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 18px;
}

.ng-horse-profile-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 34px;
    margin: 0;
}

.ng-horse-profile-info-grid--compact {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.ng-horse-profile-info-grid div,
.ng-horse-profile-rows div {
    display: grid;
    grid-template-columns: minmax(130px, 0.85fr) minmax(0, 1fr);
    gap: 16px;
    align-items: baseline;
    min-width: 0;
    border-bottom: 1px solid rgba(219, 231, 239, 0.82);
    padding: 8px 0;
}

.ng-horse-profile-info-grid--compact div {
    display: block;
    box-sizing: border-box;
    border: 1px solid rgba(219, 231, 239, 0.86);
    border-radius: 12px;
    background: rgba(248, 252, 255, 0.72);
    min-height: 76px;
    padding: 10px;
}

.ng-horse-profile-info-grid:not(.ng-horse-profile-info-grid--compact) div:nth-last-child(-n + 2),
.ng-horse-profile-rows div:last-child {
    border-bottom: 0;
}

.ng-horse-profile-info-grid dt,
.ng-horse-profile-rows dt {
    color: var(--ng-muted);
    font-size: 0.69rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    line-height: 1.25;
    overflow-wrap: anywhere;
    text-transform: uppercase;
}

.ng-horse-profile-info-grid dd,
.ng-horse-profile-rows dd {
    margin: 0;
    color: var(--ng-text);
    font-weight: 850;
    overflow-wrap: anywhere;
    text-align: right;
}

.ng-horse-profile-info-grid--compact dd {
    margin-top: 4px;
    text-align: left;
}

.ng-horse-profile-inventory-rows {
    margin-top: 18px;
    border-top: 1px solid rgba(219, 231, 239, 0.92);
    padding-top: 16px;
}

.ng-horse-profile-inventory-rows .ng-card-label {
    margin-bottom: 10px;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ng-horse-profile-inventory-rows .ng-horse-profile-info-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.ng-horse-profile-inventory-rows .ng-horse-profile-info-grid div {
    display: block;
    border: 1px solid rgba(219, 231, 239, 0.86);
    border-radius: 12px;
    background: rgba(248, 252, 255, 0.72);
    padding: 10px;
}

.ng-horse-profile-inventory-rows .ng-horse-profile-info-grid dd {
    margin-top: 4px;
    text-align: left;
}

.ng-horse-profile-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(82px, 1fr));
    gap: 8px;
    min-width: 390px;
    margin: 0;
}

.ng-horse-profile-stats div {
    border: 1px solid rgba(47, 143, 163, 0.16);
    border-radius: 12px;
    background: rgba(238, 247, 255, 0.72);
    padding: 9px 10px;
}

.ng-horse-profile-stats dt {
    color: var(--ng-muted);
    font-size: 0.66rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ng-horse-profile-stats dd {
    margin: 4px 0 0;
    color: var(--ng-text);
    font-size: 1.18rem;
    font-weight: 900;
    line-height: 1;
}

.ng-horse-profile-feature-grid,
.ng-horse-profile-gene-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.ng-horse-profile-gene-grid {
    margin-top: 20px;
}

.ng-horse-profile-feature-grid h3,
.ng-horse-profile-gene-grid h3,
.ng-horse-profile-subsection h3,
.ng-horse-profile-offspring h3,
.ng-horse-profile-pedigree h3 {
    margin: 0 0 10px;
    color: var(--ng-text);
    font-size: 1rem;
}

.ng-horse-profile-rows,
.ng-horse-profile-exterior-genes {
    display: grid;
    gap: 0;
    margin: 0;
}

.ng-horse-profile-rows--genes div {
    grid-template-columns: minmax(110px, 0.6fr) minmax(0, 1fr);
}

.ng-horse-profile-details {
    border: 1px solid rgba(219, 231, 239, 0.88);
    border-radius: 14px;
    background: rgba(248, 252, 255, 0.62);
}

.ng-horse-profile-details summary {
    cursor: pointer;
    color: var(--ng-text);
    font-weight: 900;
    list-style: none;
    padding: 12px 14px;
}

.ng-horse-profile-details summary::-webkit-details-marker {
    display: none;
}

.ng-horse-profile-exterior-genes {
    padding: 8px 14px 12px;
}

html.dark .ng-horse-profile-exterior-genes {
    border-top-color: rgba(148, 163, 184, 0.2);
}

.ng-horse-profile-exterior-genes div {
    min-width: 0;
    border-bottom: 1px solid rgba(219, 231, 239, 0.76);
    padding: 10px 0;
}

.ng-horse-profile-exterior-genes div:last-child {
    border-bottom: 0;
}

.ng-horse-profile-exterior-genes dt {
    color: var(--ng-muted);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ng-horse-profile-exterior-genes dd {
    margin: 5px 0 0;
    color: var(--ng-text);
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.ng-horse-profile-exterior-genes small {
    display: inline-flex;
    margin-left: 8px;
    border-radius: 999px;
    background: rgba(47, 143, 163, 0.1);
    color: var(--ng-primary-dark);
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 900;
    padding: 3px 7px;
}

.ng-horse-profile-subsection {
    margin-top: 22px;
    border-top: 1px solid rgba(219, 231, 239, 0.86);
    padding-top: 18px;
}

.ng-horse-profile-competition-grid {
    display: grid;
    gap: 9px;
}

.ng-horse-profile-competition-category {
    overflow: hidden;
    border: 1px solid rgba(219, 231, 239, 0.9);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.78);
}

.ng-horse-profile-competition-category.is-main {
    border-color: rgba(47, 143, 163, 0.34);
    background: rgba(238, 247, 255, 0.76);
}

.ng-horse-profile-competition-category summary {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    color: var(--ng-text);
    font-weight: 900;
    list-style: none;
    padding: 11px 13px;
}

.ng-horse-profile-competition-category summary::-webkit-details-marker {
    display: none;
}

.ng-horse-profile-competition-category summary small {
    display: inline-flex;
    margin-left: 8px;
    border-radius: 999px;
    background: rgba(47, 143, 163, 0.12);
    color: var(--ng-primary-dark);
    font-size: 0.68rem;
    font-weight: 900;
    padding: 3px 7px;
}

.ng-horse-profile-competition-category summary strong {
    color: var(--ng-muted);
    font-size: 0.74rem;
    white-space: nowrap;
}

.ng-horse-profile-table-wrap {
    overflow-x: auto;
    border-top: 1px solid rgba(219, 231, 239, 0.86);
}

.ng-horse-profile-table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
    text-align: left;
}

.ng-horse-profile-table th,
.ng-horse-profile-table td {
    border-bottom: 1px solid rgba(219, 231, 239, 0.72);
    padding: 8px 11px;
}

.ng-horse-profile-table th {
    color: var(--ng-muted);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ng-horse-profile-table td {
    color: var(--ng-text);
    font-size: 0.9rem;
    font-weight: 750;
}

.ng-horse-profile-table tbody tr:last-child td {
    border-bottom: 0;
}

.ng-horse-profile-table tr.is-main {
    background: rgba(47, 143, 163, 0.08);
}

.ng-horse-profile-table th:nth-child(n + 2),
.ng-horse-profile-table td:nth-child(n + 2) {
    text-align: right;
    white-space: nowrap;
}

.ng-horse-profile-mini-badge {
    display: inline-flex;
    margin-left: 7px;
    border-radius: 999px;
    background: rgba(185, 148, 232, 0.14);
    color: #6f4ca1;
    font-size: 0.66rem;
    font-weight: 900;
    padding: 3px 7px;
    white-space: nowrap;
}

.ng-horse-profile-offspring {
    margin-top: 18px;
    border-top: 1px solid rgba(219, 231, 239, 0.86);
    padding-top: 16px;
}

.ng-horse-profile-offspring p {
    display: inline-flex;
    width: fit-content;
    margin: 0;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
    color: var(--ng-muted);
    font-size: 0.78rem;
    font-weight: 850;
    padding: 6px 10px;
}

.ng-horse-profile-badge-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.ng-horse-profile-page .ng-horse-profile-badge {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    border-radius: 999px;
    background: rgba(47, 143, 163, 0.1);
    color: var(--ng-primary-dark);
    font-size: 0.72rem;
    font-weight: 900;
    padding: 5px 8px;
    white-space: nowrap;
}

.ng-horse-profile-pedigree {
    display: grid;
    gap: 18px;
}

.ng-horse-profile-pedigree-grid {
    display: grid;
    gap: 8px;
}

.ng-horse-profile-pedigree-grid--parents {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ng-horse-profile-pedigree-grid--grandparents {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ng-horse-profile-pedigree-grid--greatgrandparents {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ng-horse-profile-pedigree-card {
    min-width: 0;
    border: 1px solid rgba(219, 231, 239, 0.88);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.76);
    padding: 10px;
}

.ng-horse-profile-pedigree-card span {
    display: block;
    color: var(--ng-muted);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ng-horse-profile-pedigree-card strong {
    display: block;
    margin-top: 5px;
    color: var(--ng-text);
    font-size: 0.94rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.ng-horse-profile-pedigree-card strong a {
    color: inherit;
    text-decoration: none;
}

.ng-horse-profile-pedigree-card strong a:hover {
    text-decoration: underline;
}

.ng-horse-profile-pedigree-card small {
    display: block;
    margin-top: 4px;
    color: var(--ng-muted);
    font-weight: 750;
}

html.dark .ng-horse-profile-exterior-genes div {
    border-bottom-color: rgba(148, 163, 184, 0.16);
}

html.dark .ng-horse-profile-exterior-genes small {
    background: rgba(34, 211, 238, 0.12);
    color: #a5f3fc;
}

html.dark .ng-horse-profile-info-grid > div,
html.dark .ng-horse-profile-stats > div {
    border-color: rgba(148, 163, 184, 0.18);
    background: rgba(30, 42, 61, 0.58);
    color: var(--ng-text);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

html.dark .ng-horse-profile-info-grid dt,
html.dark .ng-horse-profile-stats dt {
    color: #94a3b8;
}

html.dark .ng-horse-profile-info-grid dd,
html.dark .ng-horse-profile-stats dd {
    color: #f1f5f9;
}

html.dark .ng-horse-profile-inventory-rows {
    border-top-color: rgba(148, 163, 184, 0.22);
}

html.dark .ng-horse-profile-inventory-banner {
    border-color: rgba(245, 158, 11, 0.32);
    background: linear-gradient(135deg, rgba(69, 52, 21, 0.72), rgba(30, 42, 61, 0.72));
}

html.dark .ng-horse-profile-inventory-banner h2 {
    color: #f8fafc;
}

html.dark .ng-horse-profile-competition-category {
    border-color: rgba(148, 163, 184, 0.18);
    background: rgba(30, 42, 61, 0.52);
}

html.dark .ng-horse-profile-competition-category.is-main {
    border-color: rgba(56, 189, 248, 0.34);
    background: rgba(34, 54, 75, 0.68);
}

html.dark .ng-horse-profile-competition-category summary {
    color: #f1f5f9;
}

html.dark .ng-horse-profile-competition-category summary strong {
    color: #cbd5e1;
}

html.dark .ng-horse-profile-competition-category summary small {
    background: rgba(34, 211, 238, 0.14);
    color: #a5f3fc;
}

html.dark .ng-horse-profile-competition-category table {
    color: #e2e8f0;
}

html.dark .ng-horse-profile-competition-category th {
    border-color: rgba(148, 163, 184, 0.18);
    background: #26364a;
    color: #cbd5e1;
}

html.dark .ng-horse-profile-competition-category td {
    border-color: rgba(148, 163, 184, 0.12);
    background: rgba(30, 42, 61, 0.42);
    color: #f1f5f9;
}

html.dark .ng-horse-profile-competition-category tbody tr:nth-child(even) td {
    background: rgba(36, 50, 71, 0.55);
}

html.dark .ng-horse-profile-competition-category tr.is-main td {
    background: rgba(43, 67, 89, 0.62);
}

html.dark .ng-horse-profile-competition-category tbody tr:nth-child(even) td {
    background: #243247;
}

html.dark .ng-horse-profile-competition-category tr.is-main td {
    background: #2b4359;
}

html.dark .ng-horse-profile-pedigree-card {
    border-color: rgba(148, 163, 184, 0.18);
    background: rgba(30, 42, 61, 0.52);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

html.dark .ng-horse-profile-pedigree-card span {
    color: #94a3b8;
}

html.dark .ng-horse-profile-pedigree-card strong {
    color: #f1f5f9;
}

html.dark .ng-horse-profile-pedigree-card small {
    color: #cbd5e1;
}

/* Admin import debug ---------------------------------------------------- */

.ng-admin-debug-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(140px, 1fr));
    gap: 12px;
}

.ng-admin-debug-stat {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: auto;
    padding: 18px;
    text-decoration: none;
    transition:
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        transform 0.18s ease;
}

.ng-admin-debug-stat:hover,
.ng-admin-debug-stat:focus-visible,
.ng-admin-debug-stat.is-active {
    border-color: rgba(47, 143, 163, 0.34);
    box-shadow: 0 16px 34px rgba(37, 72, 86, 0.12);
    transform: translateY(-1px);
}

.ng-admin-debug-stat strong {
    display: block;
    color: var(--ng-text);
    font-size: 1.8rem;
    line-height: 1;
}

.ng-admin-debug-stat p:not(.ng-card-label) {
    margin: 0;
    line-height: 1.45;
}

.ng-horse-inactive-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ng-admin-debug-filter-card,
.ng-admin-debug-empty {
    min-height: auto;
}

.ng-admin-debug-empty {
    display: flex;
    align-items: center;
    border-top: 1px solid var(--ng-border);
    background: rgba(248, 252, 255, 0.72);
    padding: 28px 22px;
}

.ng-admin-debug-empty p {
    margin: 0;
    color: var(--ng-muted);
    font-weight: 850;
    line-height: 1.5;
}

.ng-admin-debug-filter-grid {
    display: grid;
    grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(150px, 1fr)) auto;
    gap: 14px;
    align-items: end;
}

.ng-admin-debug-table {
    min-width: 1680px;
}

.ng-admin-debug-table small {
    display: block;
    margin-top: 3px;
    color: var(--ng-muted);
    font-size: 0.72rem;
    font-weight: 750;
}

.ng-admin-debug-status {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 900;
    padding: 6px 9px;
    white-space: nowrap;
}

.ng-admin-debug-status--error {
    background: rgba(254, 226, 226, 0.94);
    color: #991b1b;
}

.ng-admin-debug-status--attention {
    background: rgba(254, 243, 199, 0.94);
    color: #92400e;
}

.ng-admin-debug-status--okay {
    background: rgba(220, 252, 231, 0.94);
    color: #166534;
}

.ng-admin-debug-status--inactive,
.ng-admin-debug-status--transfer_pending,
.ng-admin-debug-status--archived_stallion {
    background: rgba(254, 243, 199, 0.94);
    color: #92400e;
}

.ng-admin-debug-details-row td {
    padding-top: 0;
}

.ng-admin-debug-details {
    border: 1px solid rgba(219, 231, 239, 0.82);
    border-radius: 12px;
    background: rgba(248, 252, 255, 0.72);
    padding: 10px 12px;
}

.ng-admin-debug-details summary {
    cursor: pointer;
    color: var(--ng-primary-dark);
    font-size: 0.82rem;
    font-weight: 900;
}

.ng-admin-debug-details dl {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 12px 0 0;
}

.ng-admin-debug-details div {
    min-width: 0;
}

.ng-admin-debug-details dt {
    color: var(--ng-muted);
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ng-admin-debug-details dd {
    margin: 4px 0 0;
    overflow-wrap: anywhere;
}

.ng-admin-debug-details code {
    white-space: normal;
}

.ng-horse-card-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
}

.ng-admin-debug-attention {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin: 18px 0 0;
    border: 1px solid rgba(217, 119, 6, 0.24);
    border-radius: 16px;
    background: rgba(245, 158, 11, 0.1);
    padding: 16px;
}

.ng-admin-debug-attention-icon {
    display: inline-flex;
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(245, 158, 11, 0.2);
    color: #92400e;
    font-weight: 900;
}

.ng-admin-debug-attention h3 {
    margin: 0;
    color: var(--ng-text);
    font-size: 1rem;
    font-weight: 900;
}

.ng-admin-debug-attention ul {
    display: grid;
    gap: 6px;
    margin: 10px 0 0;
    padding-left: 20px;
    color: var(--ng-text);
}

.ng-admin-debug-attention p {
    margin: 10px 0 0;
    color: var(--ng-muted);
    line-height: 1.5;
}

html.dark .ng-admin-debug-attention {
    border-color: rgba(251, 191, 36, 0.34);
    background: rgba(120, 53, 15, 0.28);
}

html.dark .ng-admin-debug-attention-icon {
    background: rgba(251, 191, 36, 0.18);
    color: #fde68a;
}

html.dark .ng-admin-debug-detail-card .ng-horse-table-header {
    border-color: rgba(148, 163, 184, 0.2);
    background: transparent;
}

html.dark .ng-admin-debug-detail-card .ng-horse-table-header h2 {
    color: var(--ng-text);
}

@media (max-width: 1180px) {
    .ng-admin-debug-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .ng-admin-debug-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ng-horse-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ng-horse-profile-value-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ng-horse-profile-pedigree-grid--grandparents {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ng-horse-filter-actions {
        align-self: stretch;
    }
}

@media (max-width: 980px) {
    .ng-horse-profile-hero-main {
        flex-direction: column;
    }

    .ng-horse-profile-actions {
        justify-content: flex-start;
    }

    .ng-horse-profile-grid,
    .ng-horse-profile-two-column {
        grid-template-columns: 1fr;
    }

    .ng-horse-table-wrap {
        display: none;
    }

    .ng-admin-debug-table-wrap {
        display: block;
    }

    .ng-horse-mobile-list {
        display: grid;
    }
}

@media (max-width: 720px) {
    .ng-admin-debug-stats,
    .ng-admin-debug-filter-grid,
    .ng-admin-debug-details dl {
        grid-template-columns: 1fr;
    }

    .ng-horse-tabs {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ng-horse-tab {
        width: 100%;
        padding-inline: 10px;
        text-align: center;
    }

    .ng-horse-filter-grid,
    .ng-horse-card-stats {
        grid-template-columns: 1fr;
    }

    .ng-horse-filter-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .ng-horse-filter-actions .ng-btn-primary,
    .ng-horse-filter-actions .ng-btn-secondary {
        width: 100%;
    }

    .ng-horse-table-header,
    .ng-horse-card-header {
        flex-direction: column;
    }

    .ng-horse-card-stat-wide {
        grid-column: auto;
    }

    .ng-horse-profile-value-grid,
    .ng-horse-profile-grid,
    .ng-horse-profile-two-column,
    .ng-horse-profile-list,
    .ng-horse-profile-gene-list--chips,
    .ng-horse-profile-pedigree-grid--parents,
    .ng-horse-profile-pedigree-grid--grandparents {
        grid-template-columns: 1fr;
    }

    .ng-horse-profile-badges span {
        white-space: normal;
    }

    .ng-horse-profile-list div,
    .ng-horse-profile-gene-list div,
    .ng-horse-profile-trait-list div {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .ng-horse-profile-list dd,
    .ng-horse-profile-gene-list:not(.ng-horse-profile-gene-list--chips) dd,
    .ng-horse-profile-trait-list dd {
        text-align: left;
    }

    .ng-horse-profile-actions,
    .ng-horse-profile-actions .ng-btn-primary,
    .ng-horse-profile-actions .ng-btn-secondary {
        width: 100%;
    }
}

@media (max-width: 1180px) {
    .ng-horse-profile-page .ng-horse-profile-hero {
        align-items: flex-start;
    }

    .ng-horse-profile-info-grid--compact {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .ng-horse-profile-inventory-rows .ng-horse-profile-info-grid {
        grid-template-columns: 1fr;
    }

    .ng-horse-profile-stats {
        min-width: 0;
    }

    .ng-horse-profile-pedigree-grid--grandparents,
    .ng-horse-profile-pedigree-grid--greatgrandparents {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .ng-horse-profile-page .ng-horse-profile-hero,
    .ng-horse-profile-section-header {
        flex-direction: column;
    }

    .ng-horse-profile-page .ng-horse-profile-actions {
        justify-content: flex-start;
        width: auto;
    }

    .ng-horse-profile-feature-grid,
    .ng-horse-profile-gene-grid {
        grid-template-columns: 1fr;
    }

    .ng-horse-profile-info-grid div,
    .ng-horse-profile-rows div {
        grid-template-columns: minmax(0, 0.75fr) minmax(0, 1fr);
    }

    .ng-horse-profile-stats {
        width: 100%;
    }
}

@media (max-width: 720px) {
    .ng-horse-profile-page .ng-horse-profile-hero,
    .ng-horse-profile-page .ng-horse-profile-card {
        padding: 18px;
    }

    .ng-horse-profile-page .ng-horse-profile-hero h1 {
        gap: 8px;
    }

    .ng-horse-profile-info-grid,
    .ng-horse-profile-info-grid--compact,
    .ng-horse-profile-inventory-rows .ng-horse-profile-info-grid,
    .ng-horse-profile-stats,
    .ng-horse-profile-pedigree-grid--parents,
    .ng-horse-profile-pedigree-grid--grandparents,
    .ng-horse-profile-pedigree-grid--greatgrandparents {
        grid-template-columns: 1fr;
    }

    .ng-horse-profile-info-grid div,
    .ng-horse-profile-rows div {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .ng-horse-profile-info-grid:not(.ng-horse-profile-info-grid--compact) div:nth-last-child(-n + 2) {
        border-bottom: 1px solid rgba(219, 231, 239, 0.82);
    }

    .ng-horse-profile-info-grid:not(.ng-horse-profile-info-grid--compact) div:last-child {
        border-bottom: 0;
    }

    .ng-horse-profile-info-grid dd,
    .ng-horse-profile-rows dd {
        text-align: left;
    }

    .ng-horse-profile-page .ng-horse-profile-actions {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .ng-horse-profile-page .ng-horse-profile-actions .ng-btn-primary,
    .ng-horse-profile-page .ng-horse-profile-actions .ng-btn-secondary {
        width: 100%;
    }

    .ng-horse-profile-badge-list {
        justify-content: flex-start;
    }
}

/* Pferdeprofil: farbige Kernwerte */
.ng-horse-profile-stat {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.68);
    transition:
        border-color 160ms ease,
        background-color 160ms ease,
        transform 160ms ease;
}

.ng-horse-profile-stat::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    border-radius: 16px 0 0 16px;
    content: "";
}

.ng-horse-profile-stat dt,
.ng-horse-profile-stat dd {
    position: relative;
    z-index: 1;
}

.ng-horse-profile-stat--exterior {
    border-color: rgba(59, 130, 246, 0.24);
    background: rgba(219, 234, 254, 0.48);
}

.ng-horse-profile-stat--exterior::before {
    background: rgba(37, 99, 235, 0.72);
}

.ng-horse-profile-stat--exterior dd {
    color: rgb(30, 64, 175);
}

.ng-horse-profile-stat--mentality {
    border-color: rgba(139, 92, 246, 0.24);
    background: rgba(237, 233, 254, 0.5);
}

.ng-horse-profile-stat--mentality::before {
    background: rgba(124, 58, 237, 0.68);
}

.ng-horse-profile-stat--mentality dd {
    color: rgb(91, 33, 182);
}

.ng-horse-profile-stat--potential {
    border-color: rgba(234, 179, 8, 0.26);
    background: rgba(254, 249, 195, 0.52);
}

.ng-horse-profile-stat--potential::before {
    background: rgba(202, 138, 4, 0.7);
}

.ng-horse-profile-stat--potential dd {
    color: rgb(133, 77, 14);
}

.ng-horse-profile-stat--exterior-percent {
    border-color: rgba(20, 184, 166, 0.24);
    background: rgba(204, 251, 241, 0.48);
}

.ng-horse-profile-stat--exterior-percent::before {
    background: rgba(13, 148, 136, 0.7);
}

.ng-horse-profile-stat--exterior-percent dd {
    color: rgb(15, 118, 110);
}


/* Pferdeprofil: Exterieur-Gene */
.ng-horse-profile-exterior-gene-code {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.ng-horse-profile-gene-pair {
    display: inline-flex;
    flex: 0 0 auto;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 8px;
    background: rgba(248, 250, 252, 0.76);
}

.ng-horse-profile-gene-allele {
    display: inline-grid;
    place-items: center;
    width: 25px;
    min-width: 25px;
    height: 28px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.84rem;
    font-weight: 900;
    line-height: 1;
}

.ng-horse-profile-gene-allele + .ng-horse-profile-gene-allele {
    border-left: 1px solid rgba(148, 163, 184, 0.2);
}

.ng-horse-profile-gene-allele.is-correct {
    color: rgb(22, 101, 52);
    background: rgba(187, 247, 208, 0.72);
}

.ng-horse-profile-gene-allele.is-wrong {
    color: rgb(153, 27, 27);
    background: rgba(254, 202, 202, 0.72);
}

.ng-horse-profile-gene-divider {
    flex: 0 0 auto;
    width: 1px;
    height: 28px;
    margin: 0 3px;
    background: rgba(100, 116, 139, 0.42);
}

.ng-horse-profile-exterior-gene-fallback {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-weight: 800;
}


/* Pferdeprofil: Qualitätsfarben der Merkmale */
.ng-horse-profile-trait-row {
    align-items: center;
}

.ng-horse-profile-trait-value {
    justify-self: end;
    max-width: 100%;
    padding: 5px 10px;
    border: 1px solid transparent;
    border-radius: 9px;
    font-weight: 800;
    line-height: 1.35;
    text-align: right;
}

.ng-horse-profile-trait-value--excellent {
    border-color: rgba(21, 128, 61, 0.24);
    color: rgb(21, 128, 61);
    background: rgba(187, 247, 208, 0.68);
}

.ng-horse-profile-trait-value--good {
    border-color: rgba(74, 222, 128, 0.25);
    color: rgb(22, 101, 52);
    background: rgba(220, 252, 231, 0.72);
}

.ng-horse-profile-trait-value--passable {
    border-color: rgba(217, 119, 6, 0.22);
    color: rgb(146, 64, 14);
    background: rgba(254, 243, 199, 0.76);
}

.ng-horse-profile-trait-value--poor {
    border-color: rgba(248, 113, 113, 0.24);
    color: rgb(153, 27, 27);
    background: rgba(254, 226, 226, 0.76);
}

.ng-horse-profile-trait-value--very-poor {
    border-color: rgba(220, 38, 38, 0.28);
    color: rgb(127, 29, 29);
    background: rgba(254, 202, 202, 0.82);
}

.ng-horse-profile-trait-value--unknown {
    border-color: rgba(148, 163, 184, 0.25);
    color: rgb(71, 85, 105);
    background: rgba(226, 232, 240, 0.68);
}


/* Pferdeprofil: Darkmode-Farbvarianten */
html.dark .ng-horse-profile-stat {
    border-color: rgba(148, 163, 184, 0.16);
    background: rgba(15, 23, 42, 0.4);
}

html.dark .ng-horse-profile-stat--exterior {
    border-color: rgba(96, 165, 250, 0.22);
    background: rgba(30, 64, 175, 0.14);
}

html.dark .ng-horse-profile-stat--exterior dd {
    color: rgb(147, 197, 253);
}

html.dark .ng-horse-profile-stat--mentality {
    border-color: rgba(167, 139, 250, 0.22);
    background: rgba(91, 33, 182, 0.14);
}

html.dark .ng-horse-profile-stat--mentality dd {
    color: rgb(196, 181, 253);
}

html.dark .ng-horse-profile-stat--potential {
    border-color: rgba(250, 204, 21, 0.2);
    background: rgba(133, 77, 14, 0.15);
}

html.dark .ng-horse-profile-stat--potential dd {
    color: rgb(253, 224, 71);
}

html.dark .ng-horse-profile-stat--exterior-percent {
    border-color: rgba(45, 212, 191, 0.2);
    background: rgba(15, 118, 110, 0.15);
}

html.dark .ng-horse-profile-stat--exterior-percent dd {
    color: rgb(94, 234, 212);
}

html.dark .ng-horse-profile-gene-pair {
    border-color: rgba(148, 163, 184, 0.22);
    background: rgba(15, 23, 42, 0.52);
}

html.dark .ng-horse-profile-gene-allele + .ng-horse-profile-gene-allele {
    border-left-color: rgba(148, 163, 184, 0.18);
}

html.dark .ng-horse-profile-gene-allele.is-correct {
    color: rgb(187, 247, 208);
    background: rgba(22, 163, 74, 0.24);
}

html.dark .ng-horse-profile-gene-allele.is-wrong {
    color: rgb(254, 202, 202);
    background: rgba(220, 38, 38, 0.24);
}

html.dark .ng-horse-profile-gene-divider {
    background: rgba(148, 163, 184, 0.32);
}

html.dark .ng-horse-profile-trait-value--excellent {
    border-color: rgba(74, 222, 128, 0.22);
    color: rgb(134, 239, 172);
    background: rgba(22, 163, 74, 0.2);
}

html.dark .ng-horse-profile-trait-value--good {
    border-color: rgba(74, 222, 128, 0.18);
    color: rgb(187, 247, 208);
    background: rgba(21, 128, 61, 0.15);
}

html.dark .ng-horse-profile-trait-value--passable {
    border-color: rgba(251, 191, 36, 0.2);
    color: rgb(253, 230, 138);
    background: rgba(180, 83, 9, 0.18);
}

html.dark .ng-horse-profile-trait-value--poor {
    border-color: rgba(248, 113, 113, 0.2);
    color: rgb(254, 202, 202);
    background: rgba(185, 28, 28, 0.17);
}

html.dark .ng-horse-profile-trait-value--very-poor {
    border-color: rgba(248, 113, 113, 0.25);
    color: rgb(254, 202, 202);
    background: rgba(220, 38, 38, 0.24);
}

html.dark .ng-horse-profile-trait-value--unknown {
    border-color: rgba(148, 163, 184, 0.18);
    color: rgb(203, 213, 225);
    background: rgba(71, 85, 105, 0.24);
}

/* News indicator --------------------------------------------------------- */

.ng-news-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(232, 93, 158, 0.13);
    color: #b83273;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.03em;
    line-height: 1;
    margin-left: 8px;
    min-width: 1.35rem;
    padding: 4px 7px;
    white-space: nowrap;
    text-transform: uppercase;
}

.ng-news-badge--neutral {
    background: rgba(100, 116, 139, 0.14);
    color: #475569;
}

.ng-news-dot {
    display: inline-flex;
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #e85d9e;
    box-shadow: 0 0 0 4px rgba(232, 93, 158, 0.16);
}

.ng-news-dot--neutral {
    background: #94a3b8;
    box-shadow: 0 0 0 4px rgba(100, 116, 139, 0.16);
}

.ng-news-dot--collapsed {
    display: none;
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
}

.ng-shell-nav-link {
    position: relative;
}

.ng-shell-toggle:checked ~ .ng-shell-sidebar .ng-news-badge {
    display: none;
}

.ng-shell-toggle:checked ~ .ng-shell-sidebar .ng-news-dot--collapsed {
    display: inline-flex;
}

html.dark .ng-news-badge {
    background: rgba(255, 255, 255, 0.92);
    color: #7f1d5a;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.28);
}

html.dark .ng-shell-nav-text .ng-news-badge {
    color: #3f1231 !important;
}

html.dark .ng-news-badge--neutral {
    background: rgba(148, 163, 184, 0.18);
    color: #dbe4ef;
    box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.22);
}

html.dark .ng-shell-nav-text .ng-news-badge--neutral {
    color: #dbe4ef !important;
}

html.dark .ng-news-dot {
    background: #f8fafc;
    box-shadow: 0 0 0 4px rgba(248, 250, 252, 0.18);
}

html.dark .ng-news-dot--neutral {
    background: #94a3b8;
    box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.16);
}

@media (max-width: 900px) {
    .ng-news-dot--collapsed {
        display: none;
    }

    .ng-shell-toggle:checked ~ .ng-shell-sidebar .ng-news-badge {
        display: inline-flex;
    }

    .ng-horse-profile-gene-grid > section:first-child,
    .ng-horse-profile-feature-grid > section:first-child {
        padding-right: 0;
        padding-bottom: 18px;
        border-right: 0;
        border-bottom: 1px solid rgba(219, 231, 239, 0.82);
    }

    .ng-horse-profile-gene-grid > section:last-child,
    .ng-horse-profile-feature-grid > section:last-child {
        padding-top: 18px;
        padding-left: 0;
    }

    .ng-horse-profile-exterior-gene-code {
        justify-content: flex-end;
    }

    .ng-horse-profile-trait-value {
        white-space: normal;
    }

    html.dark .ng-horse-profile-gene-grid > section:first-child,
    html.dark .ng-horse-profile-feature-grid > section:first-child {
        border-bottom-color: rgba(148, 163, 184, 0.2);
    }
}

@media (max-width: 560px) {
    .ng-horse-profile-exterior-gene-code {
        justify-content: flex-start;
    }

    .ng-horse-profile-gene-divider {
        flex-basis: 100%;
        width: 100%;
        height: 1px;
        margin: 3px 0;
        background: rgba(100, 116, 139, 0.24);
    }

    .ng-horse-profile-trait-row {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .ng-horse-profile-trait-value {
        justify-self: start;
        text-align: left;
    }

    html.dark .ng-horse-profile-gene-divider {
        background: rgba(148, 163, 184, 0.22);
    }
}

.ng-admin-debug-action {
    display: inline-flex;
    white-space: nowrap;
}

.ng-admin-debug-actions {
    align-items: flex-start;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.ng-admin-debug-actions form {
    margin: 0;
}

.ng-admin-debug-action-group {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.ng-admin-debug-action-group--admin {
    opacity: 0.92;
}

.ng-admin-debug-actions .ng-admin-debug-action {
    min-height: 34px;
    padding: 6px 9px;
}

.ng-admin-debug-actions .ng-horse-icon-action {
    width: 34px;
    height: 34px;
    padding: 0;
}

.ng-admin-debug-detail-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.ng-admin-debug-detail-card {
    overflow: hidden;
}

.ng-admin-debug-hint-groups {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-top: 1rem;
}

.ng-admin-debug-hint-groups h3 {
    font-size: 0.95rem;
    margin: 0 0 0.5rem;
}

.ng-admin-debug-detail-list {
    display: grid;
    gap: 0.75rem;
    margin: 1rem 0 0;
}

.ng-admin-debug-detail-list div {
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    display: grid;
    gap: 0.25rem;
    padding-bottom: 0.75rem;
}

.ng-admin-debug-detail-list div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.ng-admin-debug-detail-list dt {
    color: var(--ng-muted, #64748b);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ng-admin-debug-detail-list dd {
    margin: 0;
    overflow-wrap: anywhere;
}

.ng-admin-debug-detail-list small {
    color: var(--ng-muted, #64748b);
    display: block;
    font-size: 0.8rem;
    margin-top: 0.2rem;
}

.ng-admin-debug-json-grid {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}

.ng-admin-debug-json-card,
.ng-admin-debug-raw-text {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 1rem;
    padding: 0.9rem 1rem;
}

.ng-admin-debug-json-card summary,
.ng-admin-debug-raw-text summary {
    cursor: pointer;
    font-weight: 700;
}

.ng-admin-debug-json-card pre,
.ng-admin-debug-raw-text pre {
    background: rgba(15, 23, 42, 0.06);
    border-radius: 0.75rem;
    margin: 0.75rem 0 0;
    max-height: 28rem;
    overflow: auto;
    padding: 1rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.ng-admin-debug-attribute-wrap {
    margin-top: 1rem;
    overflow-x: auto;
}

.ng-admin-debug-attribute-table {
    border-collapse: collapse;
    min-width: 100%;
    table-layout: fixed;
}

.ng-admin-debug-attribute-table th,
.ng-admin-debug-attribute-table td {
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    padding: 0.75rem;
    text-align: left;
    vertical-align: top;
}

.ng-admin-debug-attribute-table thead th,
.ng-admin-debug-attribute-table tbody th {
    color: var(--ng-muted, #64748b);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    width: 15rem;
}

.ng-admin-debug-attribute-value {
    display: block;
    margin: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
    word-break: break-word;
}

pre.ng-admin-debug-attribute-value {
    background: rgba(15, 23, 42, 0.06);
    border-radius: 0.75rem;
    max-height: 24rem;
    overflow: auto;
    padding: 0.85rem;
}

html.dark pre.ng-admin-debug-attribute-value {
    background: rgba(15, 23, 42, 0.36);
    color: #e5f7fb;
}

@media (max-width: 640px) {
    .ng-admin-debug-attribute-table {
        min-width: 44rem;
    }
}

/* Import preview / quality checks / competition values ------------------ */

.ng-import-top-layout {
    display: grid;
    gap: 1rem;
}

.ng-import-top-layout--preview {
    align-items: start;
}

.ng-import-top-layout .ng-form-card,
.ng-import-top-layout .ng-import-overview-card {
    min-height: auto;
}

.ng-import-overview-card {
    border-width: 1px;
}

.ng-import-overview-card--ok {
    border-color: rgba(34, 197, 94, 0.28);
}

.ng-import-overview-card--warning {
    border-color: rgba(245, 158, 11, 0.32);
}

.ng-import-overview-card--error {
    border-color: rgba(239, 68, 68, 0.32);
}

.ng-import-overview-header {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.ng-import-overview-header > * {
    min-width: 0;
}

.ng-import-overview-header h2 {
    margin-bottom: 0.4rem;
}

.ng-import-overview-header p {
    color: var(--ng-muted, #64748b);
    margin: 0;
}

.ng-import-overview-badge {
    border-radius: 999px;
    flex-shrink: 0;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 0.45rem 0.7rem;
    white-space: nowrap;
}

.ng-import-overview-badge--ok {
    background: rgba(34, 197, 94, 0.12);
    color: #15803d;
}

.ng-import-overview-badge--warning {
    background: rgba(245, 158, 11, 0.14);
    color: #b45309;
}

.ng-import-overview-badge--error {
    background: rgba(239, 68, 68, 0.12);
    color: #b91c1c;
}

.ng-import-overview-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
    margin-top: 1.25rem;
}

.ng-import-overview-grid h3 {
    font-size: 1rem;
    margin: 0 0 0.65rem;
}

.ng-import-hint-list {
    display: grid;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.ng-import-hint-list li {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.22);
    border-radius: 0.85rem;
    padding: 0.65rem 0.8rem;
}

.ng-import-quality-details {
    border-top: 1px solid rgba(148, 163, 184, 0.18);
    margin-top: 1.25rem;
    padding-top: 1rem;
}

.ng-import-quality-details summary {
    cursor: pointer;
    font-weight: 800;
}

.ng-horse-muted {
    color: var(--ng-muted, #64748b);
}

@media (max-width: 760px) {
    .ng-import-overview-header {
        display: grid;
    }

    .ng-import-overview-badge {
        width: fit-content;
    }

    .ng-import-overview-grid {
        grid-template-columns: 1fr;
    }
}

.ng-import-preview-summary {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.ng-import-preview-card {
    min-width: 0;
    overflow: hidden;
}

.ng-mdr-identity-card {
    min-height: 0;
    padding: 18px 20px;
}

.ng-mdr-identity-card h2 {
    margin: 0.15rem 0 0.35rem;
}

.ng-mdr-identity-card p:last-child {
    margin-bottom: 0;
}

.ng-mdr-submit-note {
    margin: 0;
}

.ng-import-preview-card--primary {
    border-color: rgba(14, 116, 144, 0.18);
}

.ng-import-preview-list {
    display: grid;
    gap: 0.65rem;
    margin: 1rem 0 0;
}

.ng-import-preview-list div {
    align-items: start;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    display: grid;
    gap: 0.35rem;
    grid-template-columns: minmax(120px, 0.7fr) minmax(0, 1fr);
    padding-bottom: 0.65rem;
}

.ng-import-preview-list div:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.ng-import-preview-list dt {
    color: var(--ng-muted, #64748b);
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ng-import-preview-list dd {
    font-weight: 700;
    margin: 0;
    overflow-wrap: anywhere;
}

.ng-import-preview-list--compact {
    margin-top: 1.25rem;
}

.ng-import-value-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 1rem;
}

.ng-import-value-tile {
    background: rgba(14, 116, 144, 0.06);
    border: 1px solid rgba(14, 116, 144, 0.14);
    border-radius: 1rem;
    padding: 0.9rem;
}

.ng-import-value-tile span {
    color: var(--ng-muted, #64748b);
    display: block;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ng-import-value-tile strong {
    display: block;
    font-size: 1.35rem;
    margin-top: 0.35rem;
}

.ng-import-gene-list {
    display: grid;
    gap: 0;
    margin: 1rem 0 0;
    max-width: 42rem;
}

.ng-import-gene-list div {
    align-items: center;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(140px, 0.7fr) minmax(0, 1fr);
    padding: 0.45rem 0;
}

.ng-import-gene-list div:last-child {
    border-bottom: 0;
}

.ng-import-gene-list dt {
    color: var(--ng-muted, #64748b);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1.25;
    overflow-wrap: anywhere;
    text-transform: uppercase;
}

.ng-import-gene-list dd {
    font-weight: 800;
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
}

@media (max-width: 640px) {
    .ng-import-gene-list div {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }
}

.ng-import-detail-stack {
    display: grid;
    gap: 0.55rem;
}

.ng-import-preview-details {
    min-height: auto;
    padding: 0;
}

.ng-import-preview-details summary {
    align-items: center;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    list-style: none;
    min-height: 0;
    padding: 0.75rem 0.9rem;
}

.ng-import-preview-details summary::-webkit-details-marker {
    display: none;
}

.ng-import-preview-details summary::after {
    content: '▾';
    font-size: 0.9rem;
    transition: transform 0.2s ease;
}

.ng-import-preview-details[open] summary::after {
    transform: rotate(180deg);
}

.ng-import-preview-details summary small {
    color: var(--ng-muted, #64748b);
    display: block;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ng-import-preview-details summary strong {
    display: block;
    font-size: 0.95rem;
    margin-top: 0.1rem;
}

.ng-import-preview-details > :not(summary) {
    margin-left: 1.15rem;
    margin-right: 1.15rem;
}

.ng-import-preview-details > :last-child {
    margin-bottom: 1.15rem;
}

.ng-import-detail-grid {
    margin-top: 0.25rem;
}

.ng-import-detail-note {
    color: var(--ng-muted, #64748b);
    margin-top: 0;
}

@media (max-width: 900px) {
    .ng-import-value-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ng-import-gene-list {
        max-width: none;
    }

    .ng-import-gene-list div {
        grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
    }
}

@media (max-width: 640px) {
    .ng-import-preview-list div {
        grid-template-columns: 1fr;
    }

    .ng-import-value-grid {
        grid-template-columns: 1fr;
    }

    .ng-import-gene-chip {
        border-radius: 0.9rem;
        justify-content: space-between;
        width: 100%;
    }
}

.ng-import-detail-stack .ng-public-card {
    border-radius: 0.9rem;
    min-height: auto;
}

.ng-import-preview-details:not([open]) {
    padding: 0;
}

.ng-import-preview-details:not([open]) > :not(summary) {
    display: none;
}

.ng-import-preview-details[open] {
    padding-bottom: 1rem;
}

.ng-import-gene-section {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(280px, 0.85fr) minmax(360px, 1.15fr);
}

.ng-import-gene-section .ng-import-preview-card {
    min-height: auto;
}

@media (max-width: 980px) {
    .ng-import-gene-section {
        grid-template-columns: 1fr;
    }
}

.ng-import-gene-list dd {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.ng-import-gene-list dd small {
    background: rgba(14, 116, 144, 0.08);
    border-radius: 999px;
    color: var(--ng-muted, #64748b);
    flex: 0 0 auto;
    font-size: 0.72rem;
    font-weight: 900;
    padding: 0.2rem 0.45rem;
}

.ng-import-trait-section {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(280px, 1fr));
}

.ng-import-trait-section .ng-import-preview-card {
    min-height: auto;
}

@media (max-width: 980px) {
    .ng-import-trait-section {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 980px) {
    .ng-import-top-layout--preview {
        grid-template-columns: minmax(360px, 0.9fr) minmax(420px, 1.1fr);
    }

    .ng-import-top-layout--preview .ng-import-overview-grid {
        grid-template-columns: 1fr;
    }
}

.ng-import-competition-grid {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
}

.ng-import-competition-category {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 0.9rem;
    background: rgba(255, 255, 255, 0.72);
    overflow: hidden;
}

.ng-import-main-competition-category {
    border-color: rgba(14, 116, 144, 0.32);
    background: rgba(14, 116, 144, 0.04);
}

.ng-import-competition-category summary {
    align-items: center;
    cursor: pointer;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    list-style: none;
    padding: 0.8rem 0.95rem;
}

.ng-import-competition-category summary::-webkit-details-marker {
    display: none;
}

.ng-import-competition-category summary::after {
    color: var(--ng-muted, #64748b);
    content: '▾';
    flex: 0 0 auto;
    font-size: 0.9rem;
    transition: transform 0.2s ease;
}

.ng-import-competition-category[open] summary::after {
    transform: rotate(180deg);
}

.ng-import-competition-category summary span {
    align-items: center;
    color: var(--ng-text, #0f172a);
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    font-weight: 900;
    min-width: 0;
}

.ng-import-competition-category summary small,
.ng-import-main-discipline-badge {
    border-radius: 999px;
    background: rgba(14, 116, 144, 0.1);
    color: var(--ng-primary-dark, #0e7490);
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    padding: 0.18rem 0.45rem;
    text-transform: uppercase;
}

.ng-import-competition-category summary strong {
    color: var(--ng-muted, #64748b);
    flex: 0 0 auto;
    font-size: 0.76rem;
    font-weight: 850;
}

.ng-import-competition-table {
    font-size: 0.86rem;
    min-width: 520px;
}

.ng-import-competition-table th,
.ng-import-competition-table td {
    padding: 0.65rem 0.85rem;
}

.ng-import-competition-table td:first-child {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.ng-import-main-discipline-row {
    background: rgba(14, 116, 144, 0.07);
}

.ng-import-main-discipline-row td:first-child {
    color: var(--ng-primary-dark, #0e7490);
}

@media (max-width: 640px) {
    .ng-import-competition-category summary {
        align-items: flex-start;
        padding: 0.75rem 0.8rem;
    }

    .ng-import-competition-category summary strong {
        font-size: 0.7rem;
    }

    .ng-import-competition-table {
        min-width: 460px;
    }
}

.ng-import-pedigree-tree {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.ng-import-pedigree-generation {
    display: grid;
    gap: 0.75rem;
}

.ng-import-pedigree-generation h3 {
    font-size: 0.95rem;
    margin: 0;
}

.ng-import-pedigree-grid {
    display: grid;
    gap: 0.75rem;
}

.ng-import-pedigree-grid--parents {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.ng-import-pedigree-grid--grandparents {
    grid-template-columns: repeat(4, minmax(180px, 1fr));
}

.ng-import-pedigree-grid--greatgrandparents {
    grid-template-columns: repeat(4, minmax(170px, 1fr));
    margin-top: 0.85rem;
}

.ng-import-pedigree-card {
    background: rgba(14, 116, 144, 0.05);
    border: 1px solid rgba(14, 116, 144, 0.14);
    border-radius: 0.9rem;
    display: grid;
    gap: 0.28rem;
    min-width: 0;
    padding: 0.75rem 0.85rem;
}

.ng-import-pedigree-card span {
    color: var(--ng-muted, #64748b);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ng-import-pedigree-card strong {
    font-size: 0.92rem;
    overflow-wrap: anywhere;
}

.ng-import-pedigree-card small {
    color: var(--ng-muted, #64748b);
    font-weight: 700;
}

.ng-import-pedigree-greatgrandparents {
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    padding-top: 0.75rem;
}

.ng-import-pedigree-greatgrandparents summary {
    cursor: pointer;
    font-weight: 800;
}

@media (max-width: 1180px) {
    .ng-import-pedigree-grid--grandparents,
    .ng-import-pedigree-grid--greatgrandparents {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }
}

@media (max-width: 760px) {
    .ng-import-pedigree-grid--parents,
    .ng-import-pedigree-grid--grandparents,
    .ng-import-pedigree-grid--greatgrandparents {
        grid-template-columns: 1fr;
    }
}

.ng-modal-close-x {
    align-items: center;
    border: 1px solid rgba(15, 118, 110, 0.14);
    border-radius: 999px;
    color: #64748b;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 1.35rem;
    font-weight: 700;
    height: 2.25rem;
    justify-content: center;
    line-height: 1;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
    width: 2.25rem;
}

.ng-modal-close-x:hover,
.ng-modal-close-x:focus-visible {
    background: rgba(14, 165, 164, 0.08);
    border-color: rgba(14, 165, 164, 0.28);
    color: #0f766e;
    outline: none;
    transform: translateY(-1px);
}

.ng-help-modal-panel {
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
}

@media (min-width: 1024px) and (min-height: 760px) {
    .ng-help-modal-panel {
        max-height: none;
        overflow: visible;
    }

    .ng-help-modal-panel .ng-help-section,
    .ng-help-modal-panel .ng-help-note {
        font-size: 0.84rem;
    }

    .ng-help-modal-panel .ng-help-steps {
        gap: 0.35rem;
    }

    .ng-help-modal-panel .ng-help-note ul {
        gap: 0.35rem;
    }
}

@media (min-width: 1024px) and (min-height: 760px) {
    .ng-help-modal-body {
        display: grid;
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
        gap: 1.25rem;
    }

    .ng-help-modal-side {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    .ng-help-modal-body .ng-help-section,
    .ng-help-modal-body .ng-help-note {
        margin: 0;
    }

    .ng-help-modal-body .ng-help-privacy {
        margin: 0;
    }
}


.ng-sidebar-bug-report {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    border: 0;
    border-radius: 0.9rem;
    padding: 0.7rem 0.85rem;
    background: rgba(255, 255, 255, 0.08);
    color: inherit;
    font: inherit;
    cursor: pointer;
    text-align: left;
    transition: background 0.18s ease, transform 0.18s ease;
}

.ng-sidebar-bug-report:hover {
    background: rgba(255, 255, 255, 0.14);
    transform: translateY(-1px);
}

.ng-sidebar-contact-feedback {
    background: rgba(47, 143, 163, 0.1);
}

.ng-sidebar-contact-feedback:hover {
    background: rgba(47, 143, 163, 0.16);
}

.ng-sidebar-bug-report-icon {
    display: inline-flex;
    width: 1.1rem;
    height: 1.1rem;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    line-height: 1;
}

.ng-sidebar-bug-report-icon svg {
    width: 1.05rem;
    height: 1.05rem;
    fill: currentColor;
}

.ng-bug-report-modal {
    max-width: 640px;
}

.ng-honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.ng-soft-note {
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 0.9rem;
    padding: 0.85rem 1rem;
    background: rgba(148, 163, 184, 0.08);
    color: var(--ng-muted, #64748b);
    font-size: 0.9rem;
    line-height: 1.45;
}

.ng-modal-dialog {
    border: 0;
    padding: 0;
    background: transparent;
    max-width: min(680px, calc(100vw - 2rem));
    width: 100%;
}

.ng-modal-dialog::backdrop {
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(6px);
}

.ng-bug-report-dialog {
    border: 0;
    padding: 0;
    background: transparent;
    max-width: min(680px, calc(100vw - 2rem));
    width: 100%;
}

.ng-bug-report-dialog::backdrop {
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(6px);
}

.ng-bug-report-card {
    width: 100%;
    border-radius: 1.35rem;
    padding: 1.5rem;
    background: #ffffff;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
}

.ng-bug-report-form {
    display: grid;
    gap: 1rem;
}

.ng-bug-report-form .ng-field {
    display: grid;
    gap: 0.4rem;
}

.ng-bug-report-form label {
    font-weight: 700;
    color: #1e293b;
}

.ng-bug-report-form input,
.ng-bug-report-form select,
.ng-bug-report-form textarea {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 0.9rem;
    padding: 0.8rem 0.95rem;
    background: #ffffff;
    color: #0f172a;
    font: inherit;
}

.ng-bug-report-form textarea {
    resize: vertical;
}

.ng-bug-report-form input:focus,
.ng-bug-report-form select:focus,
.ng-bug-report-form textarea:focus {
    outline: 2px solid rgba(34, 150, 170, 0.22);
    border-color: rgba(34, 150, 170, 0.65);
}

.ng-bug-report-card .ng-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.ng-bug-report-card .ng-modal-header h2 {
    margin: 0.15rem 0 0;
    font-size: 1.45rem;
}

.ng-bug-report-card .ng-modal-close {
    border: 0;
    border-radius: 999px;
    width: 2.25rem;
    height: 2.25rem;
    background: rgba(148, 163, 184, 0.16);
    color: #0f172a;
    cursor: pointer;
    font-size: 1.4rem;
    line-height: 1;
}

.ng-bug-report-card .ng-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 0.25rem;
}

.ng-bug-report-card .ng-button {
    border: 0;
    border-radius: 0.9rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    font-weight: 700;
}

.ng-bug-report-card .ng-button-primary {
    background: #2296aa;
    color: #ffffff;
}

.ng-bug-report-card .ng-button-ghost {
    background: rgba(148, 163, 184, 0.12);
    color: #0f172a;
}

@media (max-width: 640px) {
    .ng-bug-report-card {
        padding: 1rem;
        border-radius: 1rem;
    }

    .ng-bug-report-card .ng-modal-actions {
        flex-direction: column-reverse;
    }

    .ng-bug-report-card .ng-button {
        width: 100%;
    }
}

.ng-flash-message {
    margin: 0 0 1rem;
    border-radius: 1rem;
    padding: 0.9rem 1rem;
    font-weight: 700;
    box-shadow: 0 16px 44px rgba(15, 23, 42, 0.08);
}

.ng-flash-success {
    border: 1px solid rgba(34, 197, 94, 0.22);
    background: rgba(220, 252, 231, 0.9);
    color: #166534;
}

.ng-toast {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    z-index: 80;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    max-width: min(420px, calc(100vw - 2rem));
    border-radius: 1rem;
    padding: 0.9rem 1rem;
    font-weight: 700;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.18);
}

.ng-toast-success {
    border: 1px solid rgba(34, 197, 94, 0.22);
    background: rgba(220, 252, 231, 0.96);
    color: #166534;
}

.ng-toast-icon {
    flex: 0 0 auto;
}

.ng-toast-icon--svg {
    display: inline-flex;
    width: 1.25rem;
    height: 1.25rem;
    align-items: center;
    justify-content: center;
}

.ng-toast-icon--svg svg {
    width: 1.15rem;
    height: 1.15rem;
    fill: currentColor;
}

.ng-toast-close {
    flex: 0 0 auto;
    margin-left: auto;
    border: 0;
    border-radius: 999px;
    width: 1.6rem;
    height: 1.6rem;
    background: rgba(22, 101, 52, 0.12);
    color: inherit;
    cursor: pointer;
    font-weight: 900;
    line-height: 1;
}

@media (max-width: 640px) {
    .ng-toast {
        right: 1rem;
        bottom: 1rem;
        left: 1rem;
        max-width: none;
    }
}

.ng-site-footer {
    margin: clamp(28px, 5vw, 56px) auto 0;
    width: min(100%, 1180px);
    border-top: 1px solid var(--ng-border);
    color: var(--ng-muted);
    font-size: 0.88rem;
    padding: 18px 0 4px;
}

.ng-site-footer-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.ng-site-footer-links {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.ng-site-footer-links a,
.ng-site-footer-links span {
    color: inherit;
    font-weight: 750;
    text-decoration: none;
}

.ng-site-footer-links a:hover,
.ng-site-footer-links a:focus-visible {
    color: var(--ng-primary-dark);
    outline: none;
}

.ng-footer-discord-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    line-height: 1;
}

.ng-footer-discord-link svg {
    display: block;
    width: 0.95rem;
    height: 0.95rem;
    fill: currentColor;
}

.ng-footer-discord-link--disabled {
    opacity: 0.55;
}

.ng-profile-card-grid {
    align-items: stretch;
}

.ng-profile-card {
    display: flex;
    flex-direction: column;
}

.ng-profile-meta-list {
    display: grid;
    gap: 10px;
    margin: 0;
}

.ng-profile-meta-list div {
    min-width: 0;
    border-top: 1px solid var(--ng-border);
    padding-top: 10px;
}

.ng-profile-meta-list dt {
    color: var(--ng-muted);
    font-size: 0.78rem;
    font-weight: 850;
    text-transform: uppercase;
}

.ng-profile-meta-list dd {
    margin: 3px 0 0;
    color: var(--ng-text);
    font-weight: 800;
    overflow-wrap: anywhere;
}

.ng-profile-link-list {
    display: grid;
    gap: 10px;
    margin-top: auto;
}

.ng-profile-link-list a {
    border-radius: 12px;
    background: rgba(47, 143, 163, 0.08);
    color: var(--ng-primary-dark);
    font-weight: 850;
    padding: 10px 12px;
    text-decoration: none;
}

.ng-profile-link-list a:hover,
.ng-profile-link-list a:focus-visible {
    background: rgba(47, 143, 163, 0.14);
    outline: none;
}

.ng-legal-document {
    width: min(100%, 880px);
    color: var(--ng-text);
    font-size: 1rem;
    line-height: 1.72;
}

.ng-legal-document h2 {
    margin: 1.7rem 0 0.45rem;
    color: var(--ng-text);
    font-size: 1.08rem;
    line-height: 1.35;
}

.ng-legal-document h2:first-child {
    margin-top: 0;
}

.ng-legal-document p {
    margin: 0 0 0.95rem;
    color: var(--ng-muted);
}

.ng-legal-document a {
    color: var(--ng-primary-dark);
    font-weight: 800;
    text-decoration: none;
}

.ng-legal-document a:hover,
.ng-legal-document a:focus-visible {
    text-decoration: underline;
    outline: none;
}

.ng-modal-title-with-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.ng-modal-title-with-icon span {
    display: inline-flex;
    width: 2rem;
    height: 2rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    background: rgba(47, 143, 163, 0.12);
    color: var(--ng-primary-dark);
}

.ng-modal-title-with-icon svg {
    width: 1.05rem;
    height: 1.05rem;
    fill: currentColor;
}

.ng-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.ng-admin-table {
    width: 100%;
    border-collapse: collapse;
}

.ng-admin-table th,
.ng-admin-table td {
    padding: 0.85rem 0.75rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
    text-align: left;
    vertical-align: top;
}

.ng-admin-table th {
    color: #475569;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ng-table-muted {
    margin: 0.25rem 0 0;
    color: #64748b;
    font-size: 0.88rem;
}

.ng-status-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.25rem 0.6rem;
    font-size: 0.78rem;
    font-weight: 800;
}

.ng-status-open {
    background: rgba(251, 191, 36, 0.18);
    color: #92400e;
}

.ng-status-in_progress {
    background: rgba(59, 130, 246, 0.16);
    color: #1d4ed8;
}

.ng-status-resolved {
    background: rgba(34, 197, 94, 0.16);
    color: #166534;
}

.ng-status-waiting {
    background: rgba(251, 191, 36, 0.18);
    color: #92400e;
}

.ng-status-archived {
    background: rgba(100, 116, 139, 0.18);
    color: #334155;
}

.ng-status-closed {
    background: rgba(100, 116, 139, 0.16);
    color: #334155;
}

.ng-button-small {
    padding: 0.55rem 0.75rem;
    font-size: 0.85rem;
}

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

.ng-detail-list {
    display: grid;
    gap: 0.65rem;
}

.ng-detail-list div {
    display: grid;
    gap: 0.2rem;
}

.ng-detail-list span {
    color: #64748b;
    font-size: 0.85rem;
}

.ng-detail-list strong {
    color: #0f172a;
}

.ng-divider {
    border: 0;
    border-top: 1px solid rgba(148, 163, 184, 0.2);
    margin: 1.25rem 0;
}

.ng-prose-box {
    border-radius: 1rem;
    padding: 1rem;
    background: rgba(148, 163, 184, 0.08);
    color: #0f172a;
    line-height: 1.55;
}

.ng-code-block {
    overflow-x: auto;
    border-radius: 1rem;
    padding: 1rem;
    background: #0f172a;
    color: #e2e8f0;
    white-space: pre-wrap;
    word-break: break-word;
}

.ng-raw-details summary {
    cursor: pointer;
    font-weight: 800;
    margin: 1rem 0;
}

.ng-raw-input {
    max-height: 520px;
    overflow: auto;
}

.ng-break-anywhere {
    overflow-wrap: anywhere;
}

.ng-pagination {
    margin-top: 1rem;
}

@media (max-width: 900px) {
    .ng-grid-2 {
        grid-template-columns: 1fr;
    }
}

.ng-page-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.25rem;
    border: 1px solid rgba(125, 211, 218, 0.28);
    border-radius: 1.65rem;
    padding: clamp(1.4rem, 3vw, 2.2rem);
    background:
        radial-gradient(circle at top left, rgba(207, 250, 254, 0.6), transparent 42%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(247, 242, 255, 0.92));
    box-shadow: 0 22px 70px rgba(15, 23, 42, 0.08);
    margin-bottom: 1rem;
}

.ng-page-hero h1 {
    margin: 0.25rem 0 0.45rem;
    font-size: clamp(2.4rem, 5vw, 4.75rem);
    line-height: 0.95;
    letter-spacing: -0.055em;
    color: #0f172a;
}

.ng-page-hero p {
    max-width: 58rem;
    margin: 0;
    color: #64748b;
    font-size: 1rem;
    line-height: 1.6;
}

.ng-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.ng-stat-card {
    border: 1px solid rgba(125, 211, 218, 0.24);
    border-radius: 1.25rem;
    padding: 1.15rem 1.25rem;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 16px 44px rgba(15, 23, 42, 0.06);
}

.ng-stat-card span {
    display: block;
    margin-bottom: 0.45rem;
    color: #2296aa;
    font-size: 0.82rem;
    font-weight: 800;
}

.ng-stat-card strong {
    display: block;
    color: #0f172a;
    font-size: 1.7rem;
    line-height: 1;
}

.ng-filter-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(180px, 0.7fr) minmax(180px, 0.7fr) auto;
    gap: 1rem;
    align-items: end;
}

.ng-filter-grid .ng-field {
    display: grid;
    gap: 0.4rem;
}

.ng-filter-grid label {
    color: #0f172a;
    font-weight: 800;
    font-size: 0.9rem;
}

.ng-filter-grid input,
.ng-filter-grid select {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 0.9rem;
    padding: 0.75rem 0.9rem;
    background: #ffffff;
    color: #0f172a;
    font: inherit;
}

.ng-filter-actions {
    display: flex;
    gap: 0.65rem;
    align-items: center;
    flex-wrap: wrap;
}

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

.ng-section-header h2 {
    margin: 0.2rem 0 0;
    color: #0f172a;
    font-size: 1.35rem;
}

.ng-soft-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.35rem 0.7rem;
    background: rgba(207, 250, 254, 0.75);
    color: #147184;
    font-size: 0.82rem;
    font-weight: 800;
    white-space: nowrap;
}

@media (max-width: 1100px) {
    .ng-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ng-filter-grid {
        grid-template-columns: 1fr 1fr;
    }
}

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

    .ng-stats-grid,
    .ng-filter-grid {
        grid-template-columns: 1fr;
    }

    .ng-filter-actions {
        justify-content: stretch;
    }

    .ng-filter-actions .ng-button {
        width: 100%;
    }

    .ng-section-header {
        flex-direction: column;
    }
}

/* Feedback / bugreport / modals ---------------------------------------- */

.ng-feedback-admin-page {
    display: grid;
    gap: 1.15rem;
}

.ng-feedback-filter-card {
    min-height: auto;
}

.ng-feedback-stats {
    grid-template-columns: repeat(6, minmax(130px, 1fr));
}

.ng-feedback-stat--active {
    border-color: rgba(47, 143, 163, 0.46);
    box-shadow: 0 16px 34px rgba(37, 72, 86, 0.14);
}

.ng-feedback-filter-grid {
    grid-template-columns: minmax(240px, 1.6fr) repeat(2, minmax(160px, 0.75fr)) auto;
}

.ng-feedback-filter-grid .ng-field {
    min-width: 0;
}

.ng-feedback-filter-actions {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-end;
}

.ng-feedback-table-card {
    min-height: auto;
    overflow: hidden;
}

.ng-feedback-table-wrap {
    display: block;
    margin: 0;
    overflow-x: auto;
    padding: 14px 16px 18px;
}

.ng-feedback-table {
    min-width: 920px;
}

.ng-feedback-table th,
.ng-feedback-table td {
    vertical-align: top;
}

.ng-feedback-table th:first-child,
.ng-feedback-table td:first-child {
    padding-left: 16px;
}

.ng-feedback-table th:last-child,
.ng-feedback-table td:last-child {
    min-width: 154px;
    padding-right: 16px;
    text-align: center;
}

.ng-feedback-actions {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    justify-content: center;
    white-space: nowrap;
}

.ng-feedback-actions form {
    margin: 0;
}

.ng-feedback-actions button {
    border: 0;
    cursor: pointer;
}

.ng-feedback-table tbody tr:hover {
    background: rgba(248, 252, 255, 0.88);
}

.ng-feedback-table small,
.ng-feedback-date-cell small {
    display: block;
    margin-top: 4px;
    color: var(--ng-muted);
    font-size: 0.78rem;
    font-weight: 750;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.ng-feedback-subject-cell {
    min-width: 280px;
}

.ng-feedback-subject-cell a {
    color: var(--ng-text);
    font-weight: 900;
    text-decoration: none;
}

.ng-feedback-subject-cell a:hover {
    color: var(--ng-primary-dark);
    text-decoration: underline;
}

.ng-feedback-context-cell {
    max-width: 170px;
    overflow-wrap: anywhere;
}

.ng-feedback-date-cell {
    white-space: nowrap;
}

.ng-feedback-type {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    padding: 6px 9px;
    background: rgba(226, 232, 240, 0.8);
    color: #334155;
    font-size: 0.72rem;
    font-weight: 900;
    white-space: nowrap;
}

.ng-feedback-type--bug {
    background: rgba(254, 226, 226, 0.94);
    color: #991b1b;
}

.ng-feedback-type--feedback {
    background: rgba(207, 250, 254, 0.82);
    color: #155e75;
}

.ng-feedback-type--contact {
    background: rgba(237, 233, 254, 0.88);
    color: #5b21b6;
}

.ng-feedback-empty {
    margin: 0;
}

.ng-feedback-detail-hero h1 {
    max-width: 980px;
    overflow-wrap: anywhere;
}

.ng-feedback-summary-card {
    min-height: auto;
}

.ng-feedback-status-form {
    display: grid;
    grid-template-columns: minmax(220px, 320px) auto;
    gap: 12px;
    align-items: end;
    margin-top: 18px;
    border-top: 1px solid rgba(219, 231, 239, 0.9);
    padding-top: 18px;
}

.ng-feedback-status-form .ng-field {
    display: grid;
    gap: 7px;
}

.ng-feedback-status-form .ng-field span {
    color: var(--ng-muted);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ng-feedback-status-form select {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 12px;
    background: #fff;
    color: var(--ng-text);
    font: inherit;
    min-height: 44px;
    padding: 0.7rem 0.85rem;
}

.ng-feedback-edit-dialog {
    width: min(92vw, 520px);
    border: 0;
    border-radius: 18px;
    background: transparent;
    color: var(--ng-text);
    padding: 0;
}

.ng-feedback-edit-dialog::backdrop {
    background: rgba(24, 32, 39, 0.48);
}

.ng-feedback-edit-modal {
    border: 1px solid var(--ng-border);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 28px 80px rgba(15, 23, 42, 0.2);
    padding: 22px;
}

.ng-feedback-edit-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.ng-feedback-edit-header h3 {
    margin: 4px 0 0;
    color: var(--ng-text);
    font-size: 1.1rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.ng-feedback-edit-grid {
    display: grid;
    gap: 12px;
    margin-top: 20px;
}

.ng-feedback-edit-grid .ng-field {
    display: grid;
    grid-template-columns: minmax(150px, 0.58fr) minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    border: 1px solid rgba(219, 231, 239, 0.82);
    border-radius: 14px;
    background: rgba(248, 252, 255, 0.72);
    padding: 12px 14px;
}

.ng-feedback-edit-grid .ng-field span {
    color: var(--ng-muted);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ng-feedback-edit-grid select {
    width: 100%;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 12px;
    background: #fff;
    color: var(--ng-text);
    font: inherit;
    min-height: 44px;
    padding: 0.7rem 0.85rem;
}

.ng-feedback-edit-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    border-top: 1px solid rgba(219, 231, 239, 0.9);
    padding-top: 16px;
}

.ng-feedback-meta-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.ng-feedback-meta-item {
    grid-column: span 2;
    min-width: 0;
    border: 1px solid rgba(219, 231, 239, 0.84);
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(248, 252, 255, 0.78));
    padding: 14px 15px;
}

.ng-feedback-meta-item--wide {
    grid-column: span 3;
}

.ng-feedback-meta-grid span {
    display: block;
    color: var(--ng-muted);
    font-size: 0.72rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ng-feedback-meta-grid strong {
    display: block;
    margin-top: 6px;
    color: var(--ng-text);
    font-size: 1rem;
    font-weight: 850;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.ng-feedback-meta-grid time {
    white-space: nowrap;
}

.ng-feedback-detail-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
}

.ng-feedback-message-card {
    min-height: auto;
}

.ng-feedback-prose-box {
    margin-top: 16px;
    border: 1px solid rgba(219, 231, 239, 0.82);
    border-radius: 16px;
    background: rgba(248, 252, 255, 0.78);
    color: var(--ng-text);
    line-height: 1.65;
    overflow-wrap: anywhere;
    padding: 16px;
}

.ng-feedback-expected {
    margin-top: 24px;
    border-top: 1px solid rgba(219, 231, 239, 0.9);
    padding-top: 20px;
}

.ng-feedback-expected h3 {
    margin: 6px 0 0;
    color: var(--ng-text);
    font-size: 1.05rem;
}

.ng-feedback-prose-box--expected {
    background: rgba(255, 255, 255, 0.82);
}

.ng-feedback-technical-list dd,
.ng-feedback-technical-list a {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.ng-feedback-code-block {
    margin: 16px 0 0;
    max-height: 32rem;
    overflow: auto;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    background: #101827;
    color: #e2e8f0;
    padding: 16px;
    white-space: pre-wrap;
    word-break: break-word;
}

.ng-feedback-raw-text {
    margin-top: 16px;
}

.ng-feedback-raw-text pre {
    max-height: 34rem;
}

@media (max-width: 1100px) {
    .ng-feedback-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .ng-feedback-filter-grid {
        grid-template-columns: 1fr 1fr;
    }

    .ng-feedback-filter-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    .ng-feedback-meta-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ng-feedback-meta-item,
    .ng-feedback-meta-item--wide {
        grid-column: auto;
    }

    .ng-feedback-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .ng-feedback-stats {
        grid-template-columns: 1fr;
    }

    .ng-feedback-status-form {
        grid-template-columns: 1fr;
    }

    .ng-feedback-status-form .ng-btn-primary {
        justify-content: center;
        width: 100%;
    }

    .ng-feedback-edit-actions {
        flex-direction: column-reverse;
    }

    .ng-feedback-edit-grid .ng-field {
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .ng-feedback-edit-actions .ng-btn-primary,
    .ng-feedback-edit-actions .ng-btn-secondary {
        justify-content: center;
        width: 100%;
    }

    .ng-feedback-filter-grid {
        grid-template-columns: 1fr;
    }

    .ng-feedback-filter-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .ng-feedback-filter-actions .ng-btn-primary,
    .ng-feedback-filter-actions .ng-btn-secondary {
        justify-content: center;
        width: 100%;
    }

    .ng-feedback-table {
        min-width: 940px;
    }

    .ng-feedback-meta-grid {
        grid-template-columns: 1fr;
    }

    .ng-feedback-meta-grid time {
        white-space: normal;
    }
}

.ng-legal-document h2 {
    color: var(--ng-teal, #1f8a94);
    font-size: 1rem;
    font-weight: 800;
    margin-top: 1.75rem;
    margin-bottom: 0.5rem;
}

.ng-profile-locked-field {
    display: inline-flex;
    margin-left: .35rem;
    cursor: not-allowed;
    opacity: .55;
    font-size: .85em;
    vertical-align: middle;
}

.ng-profile-locked-field {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    margin-left: .35rem;
    border-radius: 999px;
    background: rgba(33, 150, 169, .08);
    color: var(--ng-primary, #268ca0);
    cursor: not-allowed;
    font-size: .72rem;
    font-weight: 800;
    vertical-align: middle;
}

/* Settings / profile ---------------------------------------------------- */

.ng-settings-page {
    width: 100%;
}

.ng-settings-topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin: 1.25rem 0 2rem;
}

.ng-settings-topbar h1 {
    margin: .2rem 0 .35rem;
    font-size: clamp(2rem, 4vw, 3.8rem);
    line-height: 1;
    letter-spacing: -.04em;
    color: var(--ng-ink, #162033);
}

.ng-settings-topbar p:not(.ng-kicker) {
    margin: 0;
    max-width: 42rem;
    color: var(--ng-muted, #66758a);
}

@media (max-width: 760px) {
    .ng-settings-topbar {
        flex-direction: column;
    }

    .ng-settings-topbar .ng-button,
    .ng-settings-topbar .ng-button-ghost {
        width: 100%;
        justify-content: center;
    }
}

.ng-settings-section {
    margin-top: 2.25rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(148, 163, 184, .28);
}

.ng-settings-display-name {
    display: grid;
    gap: 1rem;
}

.ng-settings-display-name form {
    display: grid;
    gap: 1rem;
}

.ng-settings-display-name [role="radiogroup"] {
    display: grid;
    gap: .65rem;
}

.ng-settings-display-name label,
.ng-settings-display-name [data-flux-radio] {
    line-height: 1.45;
}

.ng-settings-note {
    max-width: 34rem;
    padding: .85rem 1rem;
    border: 1px solid rgba(38, 140, 160, .16);
    border-radius: 1rem;
    background: rgba(38, 140, 160, .06);
    color: var(--ng-muted, #66758a);
    font-size: .92rem;
    line-height: 1.5;
}

.ng-settings-success {
    margin: 0;
    padding: .75rem .9rem;
    border: 1px solid rgba(34, 197, 94, .2);
    border-radius: .9rem;
    background: rgba(34, 197, 94, .08);
    color: #166534;
    font-size: .9rem;
    font-weight: 700;
}

.ng-settings-security {
    display: grid;
    gap: 1rem;
}

.ng-settings-security [data-flux-button],
.ng-settings-security button {
    width: fit-content;
}

.ng-settings-modal-intro {
    display: grid;
    gap: .35rem;
    margin-bottom: 1.25rem;
}

.ng-settings-modal-intro h1,
.ng-settings-modal-intro h2,
.ng-settings-modal-intro h3 {
    margin: 0;
}

.ng-settings-modal-intro p {
    margin: 0;
    color: var(--ng-muted, #66758a);
    line-height: 1.5;
}

.ng-settings-section > flux\:heading,
.ng-settings-section h2,
.ng-settings-section h3 {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--ng-ink, #162033);
}

.ng-settings-section > flux\:subheading,
.ng-settings-section p {
    color: var(--ng-muted, #66758a);
}

.ng-settings-section {
    margin-top: 2.5rem;
    padding-top: 2.25rem;
}

.ng-settings-section-title {
    margin: 0 0 .45rem;
    color: var(--ng-ink, #162033);
    font-size: 1.15rem;
    font-weight: 900;
    letter-spacing: -.015em;
}

.ng-settings-section-copy {
    max-width: 34rem;
    margin: 0 0 1.15rem;
    color: var(--ng-muted, #66758a);
    font-size: .95rem;
    line-height: 1.55;
}

.ng-settings-section-header {
    margin-bottom: 1.15rem;
}

.ng-settings-appearance {
    display: grid;
    gap: 1rem;
}

.ng-settings-appearance [role="radiogroup"] {
    max-width: 34rem;
}

.ng-settings-appearance .ng-settings-note {
    max-width: 34rem;
}

/* Dark mode polish ------------------------------------------------------ */

html.dark {
    --ng-bg: #0f172a;
    --ng-card: #172033;
    --ng-border: rgba(148, 163, 184, .22);
    --ng-soft: rgba(34, 211, 238, .08);
    --ng-ink: #f8fafc;
    --ng-muted: #b6c3d6;
    --ng-primary: #5ecfe3;
}

html.dark body,
html.dark .ng-app-body,
html.dark .ng-shell-body,
html.dark .ng-calculator-body {
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, .12), transparent 32rem),
        radial-gradient(circle at top right, rgba(168, 85, 247, .11), transparent 34rem),
        #0f172a;
    color: var(--ng-ink);
}

html.dark .ng-shell {
    background: rgba(15, 23, 42, .88);
    border-color: rgba(148, 163, 184, .2);
    box-shadow: 0 24px 80px rgba(0, 0, 0, .35);
}

html.dark .ng-app-sidebar,
html.dark .ng-public-card,
html.dark .ng-profile-card,
html.dark .ng-app-hero,
html.dark .ng-public-hero {
    background: rgba(23, 32, 51, .84);
    border-color: rgba(148, 163, 184, .22);
    color: var(--ng-ink);
}

html.dark .ng-app-hero,
html.dark .ng-public-hero {
    background:
        linear-gradient(135deg, rgba(34, 211, 238, .09), rgba(168, 85, 247, .08)),
        rgba(23, 32, 51, .86);
}

html.dark .ng-public-copy,
html.dark .ng-public-card p,
html.dark .ng-card-label,
html.dark .ng-settings-section-copy,
html.dark .ng-settings-note,
html.dark .ng-soft-note,
html.dark .ng-footer,
html.dark .ng-profile-meta-list dt,
html.dark .ng-profile-meta-list dd,
html.dark .ng-shell-user-details span {
    color: var(--ng-muted);
}

html.dark h1,
html.dark h2,
html.dark h3,
html.dark .ng-settings-section-title,
html.dark .ng-shell-brand,
html.dark .ng-shell-user-details strong,
html.dark .ng-profile-meta-list dd {
    color: var(--ng-ink);
}

html.dark .ng-shell-nav-link,
html.dark .ng-shell-user,
html.dark .ng-profile-link-list a {
    color: var(--ng-ink);
    background: rgba(255, 255, 255, .035);
    border-color: rgba(148, 163, 184, .18);
}

html.dark .ng-shell-nav-link:hover,
html.dark .ng-shell-nav-link.is-active,
html.dark .ng-profile-link-list a:hover {
    background: rgba(34, 211, 238, .12);
    color: var(--ng-primary);
}

html.dark .ng-settings-note,
html.dark .ng-settings-success {
    background: rgba(34, 211, 238, .08);
    border-color: rgba(34, 211, 238, .18);
}

html.dark .ng-settings-danger-zone {
    background: rgba(239, 68, 68, .08);
    border-color: rgba(239, 68, 68, .22);
}

html.dark .ng-shell {
    background: rgba(15, 23, 42, .96);
    border-color: rgba(148, 163, 184, .18);
}

html.dark .ng-shell-brand {
    color: #f8fafc;
}

html.dark .ng-shell-collapse {
    background: rgba(255, 255, 255, .08);
    border-color: rgba(148, 163, 184, .22);
    color: #e2e8f0;
}

html.dark .ng-shell-nav-link {
    background: transparent;
    border-color: transparent;
    color: #cbd5e1;
}

html.dark .ng-shell-nav-link:hover,
html.dark .ng-shell-nav-link.is-active {
    background: rgba(34, 211, 238, .12);
    border-color: rgba(34, 211, 238, .18);
    color: #f8fafc;
}

html.dark .ng-shell-nav-icon,
html.dark .ng-shell-footer-icon,
html.dark .ng-shell-user-avatar {
    background: rgba(34, 211, 238, .13);
    color: #67e8f9;
}

html.dark .ng-shell-user {
    background: rgba(255, 255, 255, .04);
    border-color: rgba(148, 163, 184, .2);
    color: #f8fafc;
}

html.dark .ng-shell-user:hover {
    background: rgba(34, 211, 238, .11);
    border-color: rgba(34, 211, 238, .2);
}

html.dark .ng-shell-user-details strong {
    color: #f8fafc;
}

html.dark .ng-shell-user-details span {
    color: #94a3b8;
}

html.dark .ng-shell-footer-action {
    color: #cbd5e1;
}

html.dark .ng-shell-footer-action:hover {
    background: rgba(34, 211, 238, .1);
    color: #f8fafc;
}

html.dark .ng-shell-footer-action.is-active {
    background: rgba(34, 211, 238, .14);
    color: #f8fafc;
}


html.dark .ng-shell,
html.dark .ng-app-sidebar,
html.dark aside.ng-shell,
html.dark .ng-shell-sidebar {
    background: #111827 !important;
    border-color: rgba(148, 163, 184, .24) !important;
    color: #e5edf7 !important;
}

html.dark .ng-shell *,
html.dark .ng-app-sidebar * {
    color: inherit;
}

html.dark .ng-shell-brand,
html.dark .ng-shell-brand *,
html.dark .ng-shell-nav-text,
html.dark .ng-shell-footer-action,
html.dark .ng-shell-footer-action *,
html.dark .ng-shell-user-details strong {
    color: #e5edf7 !important;
}

html.dark .ng-shell-user-details span {
    color: #94a3b8 !important;
}

html.dark .ng-shell-nav-link,
html.dark .ng-shell-footer-action,
html.dark .ng-shell-user {
    background: transparent !important;
    border-color: transparent !important;
}

html.dark .ng-shell-nav-link:hover,
html.dark .ng-shell-nav-link.is-active,
html.dark .ng-shell-footer-action:hover,
html.dark .ng-shell-footer-action.is-active,
html.dark .ng-shell-user:hover {
    background: rgba(34, 211, 238, .12) !important;
    border-color: rgba(34, 211, 238, .2) !important;
    color: #f8fafc !important;
}

html.dark .ng-shell-nav-icon,
html.dark .ng-shell-footer-icon,
html.dark .ng-shell-user-avatar {
    background: rgba(34, 211, 238, .16) !important;
    color: #67e8f9 !important;
}

html.dark .ng-shell-sidebar {
    background: #111827 !important;
    border-color: rgba(148, 163, 184, .24) !important;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .38) !important;
}

html.dark .ng-shell-nav-text,
html.dark .ng-shell-footer-action,
html.dark .ng-shell-user-details strong,
html.dark .ng-shell-user-details span {
    opacity: 1 !important;
}

html.dark .ng-sidebar-bug-report {
    color: #fda4af !important;
}

html.dark .ng-contact-feedback-trigger {
    background: rgba(34, 211, 238, .12) !important;
    color: #e0faff !important;
    border-color: rgba(34, 211, 238, .18) !important;
}

html.dark .ng-shell-nav-link.is-current,
html.dark .ng-shell-nav-link[aria-current='page'] {
    background: rgba(34, 211, 238, .16) !important;
    border-color: rgba(34, 211, 238, .24) !important;
    color: #f8fafc !important;
}

html.dark button,
html.dark [type="button"],
html.dark [type="submit"],
html.dark .ng-button,
html.dark .ng-btn-primary,
html.dark .ng-btn-secondary,
html.dark .ng-public-card-action,
html.dark [data-flux-button] {
    border-color: rgba(148, 163, 184, .24) !important;
    background: rgba(255, 255, 255, .08) !important;
    color: #f8fafc !important;
}

html.dark button:hover,
html.dark [type="button"]:hover,
html.dark [type="submit"]:hover,
html.dark .ng-button:hover,
html.dark .ng-btn-primary:hover,
html.dark .ng-btn-secondary:hover,
html.dark .ng-public-card-action:hover,
html.dark [data-flux-button]:hover {
    border-color: rgba(34, 211, 238, .35) !important;
    background: rgba(34, 211, 238, .16) !important;
    color: #ffffff !important;
}

html.dark button[disabled],
html.dark [type="button"][disabled],
html.dark [type="submit"][disabled],
html.dark [data-flux-button][disabled],
html.dark button:disabled,
html.dark [type="button"]:disabled,
html.dark [type="submit"]:disabled {
    border-color: rgba(148, 163, 184, .14) !important;
    background: rgba(148, 163, 184, .12) !important;
    color: rgba(226, 232, 240, .45) !important;
    cursor: not-allowed !important;
}

html.dark .ng-btn-primary,
html.dark .ng-public-card-action,
html.dark button[type="submit"]:not([disabled]) {
    background: linear-gradient(135deg, #0e7490, #155e75) !important;
    border-color: rgba(103, 232, 249, .35) !important;
    color: #ecfeff !important;
}

html.dark .ng-btn-primary:hover,
html.dark .ng-public-card-action:hover,
html.dark button[type="submit"]:not([disabled]):hover {
    background: linear-gradient(135deg, #0891b2, #0e7490) !important;
    color: #ffffff !important;
}

html.dark button[variant="danger"],
html.dark .ng-settings-danger-zone button,
html.dark .ng-profile-card-danger button {
    background: #dc2626 !important;
    border-color: rgba(248, 113, 113, .45) !important;
    color: #fff7f7 !important;
}

.ng-appearance-toggle {
    display: grid;
    gap: .45rem;
    padding: .65rem;
    border: 1px solid rgba(148, 163, 184, .18);
    border-radius: 1rem;
    background: rgba(255, 255, 255, .55);
}

.ng-appearance-toggle-label {
    margin: 0;
    color: var(--ng-muted, #66758a);
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.ng-appearance-toggle [role="radiogroup"] {
    width: 100%;
}

html.dark .ng-appearance-toggle {
    background: rgba(255, 255, 255, .04);
    border-color: rgba(148, 163, 184, .2);
}

html.dark .ng-appearance-toggle-label {
    color: #94a3b8;
}

.ng-shell-sidebar .ng-appearance-toggle {
    overflow: hidden;
}

.ng-shell-sidebar .ng-appearance-toggle [role="radiogroup"] {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    max-width: 100%;
}

.ng-shell-sidebar .ng-appearance-toggle [role="radio"] {
    min-width: 0 !important;
    justify-content: center;
    padding-inline: .35rem !important;
    font-size: .72rem !important;
}

.ng-shell-sidebar .ng-appearance-toggle svg {
    width: .9rem;
    height: .9rem;
}

.ng-shell-toggle:checked ~ .ng-shell-sidebar .ng-appearance-toggle-label {
    display: none;
}

.ng-shell-toggle:checked ~ .ng-shell-sidebar .ng-appearance-toggle {
    padding: .45rem;
}

.ng-shell-toggle:checked ~ .ng-shell-sidebar .ng-appearance-toggle [role="radiogroup"] {
    grid-template-columns: 1fr;
    gap: .35rem;
}

.ng-shell-sidebar .ng-appearance-toggle {
    padding: .6rem;
}

.ng-shell-sidebar .ng-appearance-toggle [role="radiogroup"] {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: .3rem;
    width: 100%;
}

.ng-shell-sidebar .ng-appearance-toggle [role="radio"] {
    min-width: 0 !important;
    width: 100%;
    justify-content: center;
    padding: .42rem .35rem !important;
}

.ng-shell-sidebar .ng-appearance-toggle svg {
    width: 1rem;
    height: 1rem;
}

.ng-shell-sidebar .ng-appearance-toggle {
    padding: .55rem;
    overflow: hidden;
}

.ng-shell-sidebar .ng-appearance-toggle [role="radiogroup"] {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .25rem;
    width: 100%;
    max-width: 100%;
}

.ng-shell-sidebar .ng-appearance-toggle [role="radio"] {
    min-width: 0 !important;
    justify-content: center;
    padding: .4rem .25rem !important;
    font-size: .68rem !important;
    line-height: 1 !important;
}

.ng-shell-sidebar .ng-appearance-toggle-text {
    display: inline;
    white-space: nowrap;
}

.ng-shell-sidebar .ng-appearance-toggle svg {
    display: none;
}

.ng-appearance-toggle-options {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .35rem;
}

.ng-appearance-toggle-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 2.2rem;
    padding: .4rem;
    border: 1px solid transparent;
    border-radius: .65rem;
    background: rgba(255, 255, 255, .08);
    color: #cbd5e1;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: .18s ease;
}

.ng-appearance-toggle-option:hover {
    background: rgba(255, 255, 255, .14);
    border-color: rgba(255, 255, 255, .14);
}

.ng-appearance-toggle-option.is-active {
    background: rgba(34, 211, 238, .18);
    border-color: rgba(34, 211, 238, .35);
    color: #f8fafc;
    box-shadow: 0 0 0 1px rgba(34, 211, 238, .12) inset;
}

.ng-appearance-toggle-option {
    color: var(--ng-ink, #162033) !important;
}

.ng-appearance-toggle-option.is-active {
    background: linear-gradient(135deg, #2f8fa3, #24758a) !important;
    border-color: rgba(47, 143, 163, .45) !important;
    color: #ffffff !important;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, .22) inset,
        0 8px 20px rgba(47, 143, 163, .22) !important;
}

html.dark .ng-appearance-toggle-option {
    background: rgba(255, 255, 255, .07) !important;
    border-color: rgba(148, 163, 184, .2) !important;
    color: #dbeafe !important;
}

html.dark .ng-appearance-toggle-option.is-active {
    background: linear-gradient(135deg, #0891b2, #0e7490) !important;
    border-color: rgba(103, 232, 249, .55) !important;
    color: #ffffff !important;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, .18) inset,
        0 0 0 3px rgba(34, 211, 238, .12),
        0 10px 24px rgba(8, 145, 178, .28) !important;
}

html.dark dialog,
html.dark .ng-login-modal,
html.dark .ng-help-modal,
html.dark .ng-horse-modal,
html.dark .ng-contact-feedback-modal,
html.dark .ng-bug-report-modal {
    background: #172033 !important;
    border-color: rgba(148, 163, 184, .24) !important;
    color: #f8fafc !important;
}

html.dark dialog::backdrop {
    background: rgba(2, 6, 23, .72) !important;
    backdrop-filter: blur(8px);
}

html.dark dialog h1,
html.dark dialog h2,
html.dark dialog h3,
html.dark dialog label,
html.dark dialog strong {
    color: #f8fafc !important;
}

html.dark dialog p,
html.dark dialog li,
html.dark dialog small,
html.dark dialog span {
    color: #cbd5e1;
}

html.dark input,
html.dark textarea,
html.dark select {
    background: rgba(255, 255, 255, .08) !important;
    border-color: rgba(148, 163, 184, .28) !important;
    color: #f8fafc !important;
}

html.dark input::placeholder,
html.dark textarea::placeholder {
    color: rgba(203, 213, 225, .55) !important;
}

html.dark input:focus,
html.dark textarea:focus,
html.dark select:focus {
    border-color: rgba(34, 211, 238, .55) !important;
    box-shadow: 0 0 0 3px rgba(34, 211, 238, .12) !important;
    outline: none !important;
}

html.dark .ng-public-card,
html.dark .ng-public-card--app-link,
html.dark .ng-public-card--dashboard-link,
html.dark .ng-public-card--admin-link,
html.dark .ng-public-card--empty-state,
html.dark .ng-public-card--form-section,
html.dark .ng-public-card--profile-section,
html.dark .ng-public-card--import-preview,
html.dark .ng-public-card--mdr-panel,
html.dark .ng-public-card--idea-summary,
html.dark .ng-public-card--idea-item,
html.dark .ng-public-card--horse-filter,
html.dark .ng-public-card--horse-table,
html.dark .ng-public-card--horse-item,
html.dark .ng-public-card--admin-panel,
html.dark .ng-public-card--admin-stat,
html.dark .ng-public-card--maintenance-teaser,
html.dark .ng-public-card--maintenance-entry,
html.dark .ng-public-card--news-entry,
html.dark .ng-card,
html.dark .ng-form-card,
html.dark .ng-tool-card,
html.dark .ng-import-card,
html.dark .ng-filter-card,
html.dark .ng-table-card {
    background: rgba(23, 32, 51, .86) !important;
    border-color: rgba(148, 163, 184, .22) !important;
    color: #f8fafc !important;
}

html.dark .ng-date-result-box,
html.dark .ng-date-tool-panel {
    background: rgba(15, 23, 42, .62) !important;
    border-color: rgba(148, 163, 184, .2) !important;
}

html.dark .ng-date-result-box {
    box-shadow: 0 16px 32px rgba(2, 6, 23, .28);
}

html.dark table {
    color: #e5edf7;
}

html.dark thead,
html.dark th {
    background: rgba(148, 163, 184, .12) !important;
    color: #dbeafe !important;
    border-color: rgba(148, 163, 184, .22) !important;
}

html.dark td {
    border-color: rgba(148, 163, 184, .18) !important;
}

html.dark tbody tr {
    background: rgba(23, 32, 51, .55);
}

html.dark tbody tr:hover {
    background: rgba(34, 211, 238, .08) !important;
}

html.dark .ng-help-note,
html.dark .ng-soft-note {
    background: rgba(255, 255, 255, .06) !important;
    border-color: rgba(148, 163, 184, .2) !important;
    color: #cbd5e1 !important;
}

html.dark .ng-help-section,
html.dark .ng-help-privacy {
    background: transparent !important;
    color: #cbd5e1 !important;
}

/* Dark mode polish: real auth/contact/bug modal classes */
html.dark .ng-modal-dialog::backdrop {
    background: rgba(2, 6, 23, .76) !important;
    backdrop-filter: blur(8px);
}

html.dark .ng-modal-card,
html.dark .ng-bug-report-card,
html.dark .ng-contact-feedback-card {
    background: #172033 !important;
    border-color: rgba(148, 163, 184, .26) !important;
    color: #f8fafc !important;
}

html.dark .ng-modal-card h1,
html.dark .ng-modal-card h2,
html.dark .ng-modal-card h3,
html.dark .ng-modal-card label,
html.dark .ng-modal-card strong {
    color: #f8fafc !important;
}

html.dark .ng-modal-card p,
html.dark .ng-modal-card span,
html.dark .ng-modal-card small {
    color: #cbd5e1 !important;
}

html.dark .ng-modal-card input,
html.dark .ng-modal-card textarea,
html.dark .ng-modal-card select {
    background: rgba(255, 255, 255, .08) !important;
    border-color: rgba(148, 163, 184, .28) !important;
    color: #f8fafc !important;
}

html.dark .ng-modal-card input::placeholder,
html.dark .ng-modal-card textarea::placeholder {
    color: rgba(203, 213, 225, .62) !important;
}

html.dark .ng-modal-close {
    background: rgba(255, 255, 255, .08) !important;
    border-color: rgba(148, 163, 184, .24) !important;
    color: #e0faff !important;
}

html.dark .ng-modal-close:hover {
    background: rgba(34, 211, 238, .14) !important;
    border-color: rgba(34, 211, 238, .32) !important;
    color: #ffffff !important;
}

/* Auth modal specific controls */
html.dark .ng-check-row {
    background: rgba(255, 255, 255, .06) !important;
    border-color: rgba(148, 163, 184, .24) !important;
    color: #dbeafe !important;
}

html.dark .ng-check-row span {
    color: #dbeafe !important;
}

html.dark .ng-check-row input[type="checkbox"] {
    accent-color: #0891b2;
}

html.dark .ng-login-modal-links button {
    appearance: none;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    color: #bae6fd !important;
    text-decoration: underline;
    text-decoration-color: rgba(186, 230, 253, .45);
    font: inherit;
    font-weight: 700;
}

html.dark .ng-login-modal-links button:hover {
    background: transparent !important;
    color: #67e8f9 !important;
    text-decoration-color: rgba(103, 232, 249, .78);
}

html.dark .ng-login-modal-notice {
    background: rgba(251, 113, 133, .12) !important;
    border-color: rgba(251, 113, 133, .24) !important;
    color: #fecdd3 !important;
}

/* Dark mode fix: login/register modal panel */
html.dark .ng-login-modal,
html.dark .ng-login-modal-panel {
    background: #172033 !important;
    border-color: rgba(148, 163, 184, .26) !important;
    color: #f8fafc !important;
}

html.dark .ng-login-modal h1,
html.dark .ng-login-modal h2,
html.dark .ng-login-modal h3,
html.dark .ng-login-modal label,
html.dark .ng-login-modal strong {
    color: #f8fafc !important;
}

html.dark .ng-login-modal p,
html.dark .ng-login-modal span,
html.dark .ng-login-modal small {
    color: #cbd5e1 !important;
}

html.dark .ng-login-modal input {
    background: rgba(255, 255, 255, .08) !important;
    border-color: rgba(148, 163, 184, .28) !important;
    color: #f8fafc !important;
}

html.dark .ng-login-modal input::placeholder {
    color: rgba(203, 213, 225, .62) !important;
}

html.dark .ng-login-modal .ng-check-row {
    background: rgba(255, 255, 255, .06) !important;
    border-color: rgba(148, 163, 184, .24) !important;
}

html.dark .ng-login-modal .ng-login-modal-links button {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: #bae6fd !important;
    padding: 0 !important;
    text-decoration: underline;
    text-decoration-color: rgba(186, 230, 253, .45);
}

html.dark .ng-login-modal .ng-login-modal-links button:hover {
    color: #67e8f9 !important;
}

html.dark .ng-login-modal .ng-login-modal-notice {
    background: rgba(251, 113, 133, .12) !important;
    border-color: rgba(251, 113, 133, .24) !important;
    color: #fecdd3 !important;
}

/* Dark mode polish: admin feedback/import tables */
html.dark .ng-feedback-table-card,
html.dark .ng-feedback-table-card .ng-horse-table-header,
html.dark .ng-feedback-table-wrap,
html.dark .ng-admin-debug-table-wrap,
html.dark .ng-admin-debug-table,
html.dark .ng-feedback-table {
    background: rgba(23, 32, 51, .9) !important;
    border-color: rgba(148, 163, 184, .22) !important;
    color: #f8fafc !important;
}

html.dark .ng-feedback-empty,
html.dark .ng-admin-debug-empty {
    background: rgba(15, 23, 42, .58) !important;
    border-color: rgba(148, 163, 184, .2) !important;
    color: #cbd5e1 !important;
}

html.dark .ng-feedback-empty p,
html.dark .ng-admin-debug-empty p {
    color: #cbd5e1 !important;
}

html.dark .ng-admin-debug-details-row td {
    background: rgba(15, 23, 42, .72) !important;
    border-color: rgba(148, 163, 184, .16) !important;
}

html.dark .ng-admin-debug-details {
    background: rgba(255, 255, 255, .06) !important;
    border-color: rgba(148, 163, 184, .22) !important;
    color: #dbeafe !important;
}

html.dark .ng-admin-debug-details summary {
    background: transparent !important;
    color: #dbeafe !important;
}

html.dark .ng-admin-debug-details summary:hover {
    color: #67e8f9 !important;
}

html.dark .ng-admin-debug-details dl,
html.dark .ng-admin-debug-details div,
html.dark .ng-admin-debug-details dt,
html.dark .ng-admin-debug-details dd {
    color: #cbd5e1 !important;
}

/* Dark mode polish: calculator/import help modals */
html.dark .ng-help-dialog,
html.dark .ng-help-modal,
html.dark .ng-help-modal-panel,
html.dark .ng-calculator-help,
html.dark .ng-import-help {
    background: #172033 !important;
    border-color: rgba(148, 163, 184, .26) !important;
    color: #f8fafc !important;
}

html.dark .ng-help-dialog *,
html.dark .ng-help-modal *,
html.dark .ng-help-modal-panel *,
html.dark .ng-calculator-help *,
html.dark .ng-import-help * {
    color: inherit;
}

html.dark .ng-help-dialog p,
html.dark .ng-help-modal p,
html.dark .ng-help-modal li,
html.dark .ng-help-modal small,
html.dark .ng-help-modal-panel p,
html.dark .ng-help-modal-panel li,
html.dark .ng-help-modal-panel small {
    color: #cbd5e1 !important;
}

html.dark .ng-help-dialog section,
html.dark .ng-help-modal section,
html.dark .ng-help-modal article,
html.dark .ng-help-modal-panel section,
html.dark .ng-help-modal-panel article,
html.dark .ng-help-modal .ng-help-note,
html.dark .ng-help-modal .ng-help-box {
    background: rgba(255, 255, 255, .06) !important;
    border-color: rgba(148, 163, 184, .22) !important;
    color: #dbeafe !important;
}

/* Dark mode polish: horse/admin table cards header strip */
html.dark .ng-horse-table-card {
    background: rgba(23, 32, 51, .9) !important;
    border-color: rgba(148, 163, 184, .22) !important;
    color: #f8fafc !important;
}

html.dark .ng-horse-table-card > .ng-horse-table-header {
    background: rgba(15, 23, 42, .72) !important;
    border-bottom: 1px solid rgba(148, 163, 184, .18) !important;
    color: #f8fafc !important;
}

html.dark .ng-horse-table-card > .ng-horse-table-header h2,
html.dark .ng-horse-table-card > .ng-horse-table-header p,
html.dark .ng-horse-table-card > .ng-horse-table-header span {
    color: inherit !important;
}

html.dark .ng-horse-table-card > .ng-horse-table-header .ng-card-label {
    color: #67e8f9 !important;
}

html.dark .ng-horse-table-card > .ng-horse-table-header .ng-horse-count {
    background: rgba(34, 211, 238, .14) !important;
    border-color: rgba(34, 211, 238, .24) !important;
    color: #e0faff !important;
}

html.dark .ng-news-section + .ng-news-section {
    border-top-color: rgba(148, 163, 184, .22) !important;
}

html.dark .ng-horse-table-card--new-received {
    border-color: rgba(34, 211, 238, .3) !important;
}

html.dark .ng-horse-table-card--new-received > .ng-horse-table-header {
    background: linear-gradient(135deg, rgba(15, 23, 42, .82), rgba(8, 145, 178, .22)) !important;
}

html.dark .ng-mdr-change-group td {
    background: rgba(34, 211, 238, .1) !important;
    color: #a5f3fc !important;
}

html.dark .ng-mdr-change-item td:first-child {
    color: #cbd5e1 !important;
}

/* Dark mode polish: category/filter tabs */
html.dark .ng-horse-tab,
html.dark .ng-community-tab,
html.dark .ng-filter-tab {
    background: rgba(255, 255, 255, .08) !important;
    border-color: rgba(148, 163, 184, .24) !important;
    color: #dbeafe !important;
}

html.dark .ng-horse-tab:hover,
html.dark .ng-community-tab:hover,
html.dark .ng-filter-tab:hover,
html.dark .ng-horse-tab:focus-visible,
html.dark .ng-community-tab:focus-visible,
html.dark .ng-filter-tab:focus-visible {
    background: rgba(34, 211, 238, .13) !important;
    border-color: rgba(34, 211, 238, .32) !important;
    color: #f8fafc !important;
}

html.dark .ng-horse-tab.is-active,
html.dark .ng-community-tab.is-active,
html.dark .ng-filter-tab.is-active {
    background: rgba(34, 211, 238, .18) !important;
    border-color: rgba(34, 211, 238, .36) !important;
    color: #e0faff !important;
}

/* Dark mode polish: import status and quality badges */
html.dark .ng-import-status-note--ok,
html.dark .ng-quality-check--ok,
html.dark .ng-quality-card--ok,
html.dark .ng-quality-item--ok {
    background: rgba(34, 197, 94, .14) !important;
    border-color: rgba(34, 197, 94, .32) !important;
    color: #bbf7d0 !important;
}

html.dark .ng-import-status-note--warning,
html.dark .ng-quality-check--warning,
html.dark .ng-quality-card--warning,
html.dark .ng-quality-item--warning {
    background: rgba(245, 158, 11, .14) !important;
    border-color: rgba(245, 158, 11, .34) !important;
    color: #fde68a !important;
}

html.dark .ng-import-status-note--error,
html.dark .ng-quality-check--error,
html.dark .ng-quality-card--error,
html.dark .ng-quality-item--error,
html.dark .ng-quality-check--missing,
html.dark .ng-quality-card--missing,
html.dark .ng-quality-item--missing {
    background: rgba(244, 63, 94, .14) !important;
    border-color: rgba(244, 63, 94, .34) !important;
    color: #fecdd3 !important;
}

html.dark .ng-import-status-note--ok *,
html.dark .ng-import-status-note--warning *,
html.dark .ng-import-status-note--error *,
html.dark .ng-quality-check--ok *,
html.dark .ng-quality-check--warning *,
html.dark .ng-quality-check--error *,
html.dark .ng-quality-check--missing *,
html.dark .ng-quality-card--ok *,
html.dark .ng-quality-card--warning *,
html.dark .ng-quality-card--error *,
html.dark .ng-quality-card--missing *,
html.dark .ng-quality-item--ok *,
html.dark .ng-quality-item--warning *,
html.dark .ng-quality-item--error *,
html.dark .ng-quality-item--missing * {
    color: inherit !important;
}

html.dark .ng-quality-badge,
html.dark .ng-status-badge,
html.dark .ng-import-badge {
    background: rgba(255, 255, 255, .12) !important;
    border-color: rgba(255, 255, 255, .2) !important;
    color: inherit !important;
}

/* Dark mode polish: import preview accordions / tournament value groups */
html.dark .ng-tournament-group,
html.dark .ng-tournament-group-header,
html.dark .ng-tournament-category,
html.dark .ng-tournament-category-header,
html.dark .ng-preview-accordion,
html.dark .ng-preview-accordion-header,
html.dark .ng-import-accordion,
html.dark .ng-import-accordion-header {
    background: rgba(255, 255, 255, .07) !important;
    border-color: rgba(148, 163, 184, .24) !important;
    color: #dbeafe !important;
}

html.dark .ng-tournament-group[open] > summary,
html.dark .ng-tournament-category[open] > summary,
html.dark .ng-preview-accordion[open] > summary,
html.dark .ng-import-accordion[open] > summary {
    background: rgba(34, 211, 238, .12) !important;
    border-color: rgba(34, 211, 238, .26) !important;
    color: #e0faff !important;
}

html.dark .ng-tournament-group summary,
html.dark .ng-tournament-category summary,
html.dark .ng-preview-accordion summary,
html.dark .ng-import-accordion summary {
    background: rgba(255, 255, 255, .07) !important;
    border-color: rgba(148, 163, 184, .24) !important;
    color: #dbeafe !important;
}

/* Dark mode polish: admin import status badges and actions */
html.dark .ng-admin-debug-status {
    border-color: rgba(148, 163, 184, .24) !important;
    color: #dbeafe !important;
}

html.dark .ng-admin-debug-status--ok,
html.dark .ng-status-badge.ng-status-open,
html.dark .ng-status-badge.ng-status-resolved {
    background: rgba(34, 197, 94, .16) !important;
    border-color: rgba(34, 197, 94, .36) !important;
    color: #bbf7d0 !important;
}

html.dark .ng-admin-debug-status--warning,
html.dark .ng-admin-debug-status--attention,
html.dark .ng-status-badge.ng-status-pending,
html.dark .ng-status-badge.ng-status-waiting {
    background: rgba(245, 158, 11, .16) !important;
    border-color: rgba(245, 158, 11, .38) !important;
    color: #fde68a !important;
}

html.dark .ng-admin-debug-status--error,
html.dark .ng-admin-debug-status--blocked,
html.dark .ng-status-badge.ng-status-archived {
    background: rgba(244, 63, 94, .16) !important;
    border-color: rgba(244, 63, 94, .36) !important;
    color: #fecdd3 !important;
}

html.dark .ng-admin-debug-actions .ng-admin-debug-action,
html.dark .ng-feedback-actions .ng-admin-debug-action,
html.dark a.ng-admin-debug-action,
html.dark button.ng-admin-debug-action {
    background: rgba(255, 255, 255, .08) !important;
    border-color: rgba(148, 163, 184, .26) !important;
    color: #e0faff !important;
}

html.dark .ng-admin-debug-actions .ng-admin-debug-action:hover,
html.dark .ng-feedback-actions .ng-admin-debug-action:hover,
html.dark a.ng-admin-debug-action:hover,
html.dark button.ng-admin-debug-action:hover {
    background: rgba(34, 211, 238, .16) !important;
    border-color: rgba(34, 211, 238, .34) !important;
    color: #ffffff !important;
}

html.dark .ng-admin-debug-action svg,
html.dark .ng-admin-debug-action svg path,
html.dark .ng-admin-debug-action svg circle {
    stroke: currentColor !important;
    color: inherit !important;
}

/* Dark mode polish: import preview status, quality checks and competition groups */
html.dark .ng-import-hint-list li,
html.dark .ng-import-status-note--warning {
    background: rgba(245, 158, 11, .14) !important;
    border-color: rgba(245, 158, 11, .34) !important;
    color: #fde68a !important;
}

html.dark .ng-import-status-note--error {
    background: rgba(244, 63, 94, .16) !important;
    border-color: rgba(244, 63, 94, .36) !important;
    color: #fecdd3 !important;
}

html.dark .ng-import-status-note--ok {
    background: rgba(34, 197, 94, .14) !important;
    border-color: rgba(34, 197, 94, .32) !important;
    color: #bbf7d0 !important;
}

html.dark .ng-import-overview-badge--ok {
    background: rgba(34, 197, 94, .18) !important;
    border-color: rgba(34, 197, 94, .38) !important;
    color: #bbf7d0 !important;
}

html.dark .ng-import-overview-badge--warning {
    background: rgba(245, 158, 11, .18) !important;
    border-color: rgba(245, 158, 11, .38) !important;
    color: #fde68a !important;
}

html.dark .ng-import-overview-badge--error {
    background: rgba(244, 63, 94, .18) !important;
    border-color: rgba(244, 63, 94, .38) !important;
    color: #fecdd3 !important;
}

html.dark .ng-import-check {
    border-color: rgba(148, 163, 184, .22) !important;
}

html.dark .ng-import-check--ok {
    background: rgba(34, 197, 94, .13) !important;
    border-color: rgba(34, 197, 94, .3) !important;
    color: #bbf7d0 !important;
}

html.dark .ng-import-check--warning {
    background: rgba(245, 158, 11, .13) !important;
    border-color: rgba(245, 158, 11, .34) !important;
    color: #fde68a !important;
}

html.dark .ng-import-check--error {
    background: rgba(244, 63, 94, .14) !important;
    border-color: rgba(244, 63, 94, .36) !important;
    color: #fecdd3 !important;
}

html.dark .ng-import-check h3,
html.dark .ng-import-check p,
html.dark .ng-import-check small {
    color: inherit !important;
}

html.dark .ng-import-check-badge {
    background: rgba(255, 255, 255, .13) !important;
    border-color: rgba(255, 255, 255, .22) !important;
    color: inherit !important;
}

/* Dark mode polish: competition accordion rows */
html.dark .ng-import-competition-category {
    background: rgba(23, 32, 51, .9) !important;
    border-color: rgba(148, 163, 184, .22) !important;
    color: #f8fafc !important;
}

html.dark .ng-import-competition-category > summary {
    background: rgba(255, 255, 255, .07) !important;
    border-color: rgba(148, 163, 184, .22) !important;
    color: #dbeafe !important;
}

html.dark .ng-import-competition-category > summary:hover {
    background: rgba(34, 211, 238, .12) !important;
    border-color: rgba(34, 211, 238, .28) !important;
    color: #f8fafc !important;
}

html.dark .ng-import-main-competition-category > summary {
    background: rgba(34, 211, 238, .13) !important;
    border-color: rgba(34, 211, 238, .3) !important;
    color: #e0faff !important;
}

html.dark .ng-import-competition-table {
    background: rgba(15, 23, 42, .58) !important;
    color: #e5edf7 !important;
}

html.dark .ng-import-competition-table th {
    background: rgba(51, 65, 85, .78) !important;
    color: #dbeafe !important;
}

html.dark .ng-import-competition-table td {
    background: rgba(23, 32, 51, .82) !important;
    color: #f8fafc !important;
    border-color: rgba(148, 163, 184, .16) !important;
}

html.dark .ng-import-main-discipline-row td {
    background: rgba(34, 211, 238, .08) !important;
}

html.dark .ng-import-main-discipline-badge {
    background: rgba(34, 211, 238, .16) !important;
    border-color: rgba(34, 211, 238, .3) !important;
    color: #e0faff !important;
}

/* Dark mode polish: make admin status badges readable */
html.dark .ng-admin-debug-status,
html.dark .ng-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.6rem;
    padding: .25rem .55rem;
    border: 1px solid rgba(148, 163, 184, .26) !important;
    border-radius: 999px;
    font-weight: 800;
    font-size: .72rem;
    line-height: 1;
    color: #e5edf7 !important;
    background: rgba(255, 255, 255, .08) !important;
}

html.dark .ng-admin-debug-status *,
html.dark .ng-status-badge * {
    color: inherit !important;
}

html.dark .ng-admin-debug-status--ok,
html.dark .ng-admin-debug-status--okay,
html.dark .ng-status-badge.ng-status-ok,
html.dark .ng-status-badge.ng-status-open,
html.dark .ng-status-badge.ng-status-resolved {
    background: rgba(34, 197, 94, .22) !important;
    border-color: rgba(34, 197, 94, .48) !important;
    color: #dcfce7 !important;
    box-shadow: 0 0 0 1px rgba(34, 197, 94, .12) inset;
}

html.dark .ng-admin-debug-status--warning,
html.dark .ng-admin-debug-status--attention,
html.dark .ng-admin-debug-status--inactive,
html.dark .ng-admin-debug-status--transfer_pending,
html.dark .ng-admin-debug-status--archived_stallion,
html.dark .ng-admin-debug-status--needs_attention,
html.dark .ng-status-badge.ng-status-pending,
html.dark .ng-status-badge.ng-status-waiting {
    background: rgba(245, 158, 11, .22) !important;
    border-color: rgba(245, 158, 11, .5) !important;
    color: #fef3c7 !important;
    box-shadow: 0 0 0 1px rgba(245, 158, 11, .12) inset;
}

html.dark .ng-admin-debug-status--error,
html.dark .ng-admin-debug-status--blocked,
html.dark .ng-status-badge.ng-status-error,
html.dark .ng-status-badge.ng-status-archived {
    background: rgba(244, 63, 94, .22) !important;
    border-color: rgba(244, 63, 94, .5) !important;
    color: #ffe4e6 !important;
    box-shadow: 0 0 0 1px rgba(244, 63, 94, .12) inset;
}

.ng-ios-shortcut-modal {
    width: min(920px, calc(100vw - 2rem));
    max-height: min(820px, calc(100vh - 2rem));
    overflow-y: auto;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 1rem;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.3);
}

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

.ng-help-modal-header h2 {
    margin: 0;
    font-size: clamp(1.35rem, 2vw, 1.8rem);
}

.ng-help-modal-header p:not(.ng-eyebrow) {
    margin: 0.45rem 0 0;
    color: rgba(226, 232, 240, 0.78);
    line-height: 1.55;
}

.ng-help-modal-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(226, 232, 240, 0.9);
    font-size: 1.15rem;
    cursor: pointer;
}

.ng-help-modal-close:hover {
    background: rgba(255, 255, 255, 0.14);
}

.ng-help-modal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.ng-ios-shortcut-modal .ng-help-panel,
.ng-ios-shortcut-modal .ng-help-note {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 1rem;
    background: rgba(15, 23, 42, 0.72);
    padding: 1rem;
}

.ng-ios-shortcut-modal .ng-help-panel h3,
.ng-ios-shortcut-modal .ng-help-note strong {
    display: block;
    margin: 0 0 0.75rem;
    color: rgba(248, 250, 252, 0.96);
    font-size: 1rem;
}

.ng-ios-shortcut-modal .ng-help-steps {
    display: grid;
    gap: 0.85rem;
    margin: 0;
    padding-left: 1.15rem;
}

.ng-help-steps li {
    color: rgba(203, 213, 225, 0.9);
    line-height: 1.5;
}

.ng-help-steps strong,
.ng-help-steps span,
.ng-help-steps small {
    display: block;
}

.ng-help-steps strong {
    color: rgba(103, 232, 249, 0.95);
}

.ng-help-steps small {
    margin-top: 0.2rem;
    color: rgba(148, 163, 184, 0.95);
}

.ng-ios-shortcut-button {
    margin-top: 1rem;
}

.ng-ios-shortcut-modal .ng-help-note {
    margin-top: 1rem;
    border-color: rgba(45, 212, 191, 0.24);
    background: rgba(45, 212, 191, 0.08);
}

.ng-ios-shortcut-modal .ng-help-note p {
    margin: 0;
    color: rgba(203, 213, 225, 0.92);
    line-height: 1.55;
}

.ng-help-troubleshooting {
    margin-top: 1rem;
}

.ng-help-troubleshooting ul {
    margin: 0;
    padding-left: 1.15rem;
    color: rgba(203, 213, 225, 0.9);
    line-height: 1.6;
}

@media (max-width: 760px) {
    .ng-help-modal-grid {
        grid-template-columns: 1fr;
    }

    .ng-help-modal-header {
        align-items: flex-start;
    }
}

.ng-ios-shortcut-modal {
    padding: 1.25rem;
}

.ng-ios-shortcut-modal .ng-help-modal-grid {
    align-items: stretch;
}

.ng-help-modal-secondary-grid {
    margin-top: 1rem;
}

.ng-help-modal-secondary-grid .ng-help-note,
.ng-help-modal-secondary-grid .ng-help-troubleshooting {
    margin-top: 0;
}

.ng-ios-shortcut-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    margin-top: 0.75rem;
    text-decoration: none;
}

.ng-ios-shortcut-button:hover {
    text-decoration: none;
}

.ng-ios-shortcut-modal .ng-help-panel,
.ng-ios-shortcut-modal .ng-help-note {
    padding: 0.9rem;
}

.ng-ios-shortcut-modal .ng-help-steps {
    gap: 0.65rem;
}

.ng-ios-shortcut-modal .ng-help-modal-header {
    margin-bottom: 1rem;
}

.ng-ios-shortcut-modal .ng-help-troubleshooting ul {
    font-size: 0.88rem;
}

@media (max-width: 760px) {
    .ng-help-modal-secondary-grid {
        grid-template-columns: 1fr;
    }
}

.ng-ios-shortcut-modal {
    max-height: calc(100vh - 5rem);
}

.ng-ios-shortcut-modal .ng-help-modal-header {
    margin-bottom: 0.75rem;
}

.ng-ios-shortcut-modal .ng-help-modal-header h2 {
    font-size: 1.45rem;
}

.ng-ios-shortcut-modal .ng-help-modal-header p:not(.ng-eyebrow) {
    margin-top: 0.3rem;
    line-height: 1.42;
}

.ng-ios-shortcut-modal .ng-help-panel,
.ng-ios-shortcut-modal .ng-help-note {
    padding: 0.75rem;
}

.ng-ios-shortcut-modal .ng-help-modal-grid {
    gap: 0.75rem;
}

.ng-ios-shortcut-modal .ng-help-steps {
    gap: 0.5rem;
}

.ng-ios-shortcut-modal .ng-help-steps li {
    line-height: 1.38;
}

.ng-ios-shortcut-modal .ng-help-panel h3,
.ng-ios-shortcut-modal .ng-help-note strong {
    margin-bottom: 0.5rem;
}

.ng-ios-shortcut-modal .ng-help-note {
    margin-top: 0.75rem;
}

.ng-ios-shortcut-modal .ng-help-modal-secondary-grid {
    margin-top: 0.75rem;
}

html:not(.dark) .ng-ios-shortcut-modal {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(15, 23, 42, 0.12);
    color: #0f172a;
    box-shadow: 0 24px 80px rgba(15, 23, 42, 0.22);
}

html:not(.dark) .ng-ios-shortcut-modal .ng-help-modal-header h2 {
    color: #0f172a;
}

html:not(.dark) .ng-ios-shortcut-modal .ng-help-modal-header p:not(.ng-eyebrow) {
    color: rgba(51, 65, 85, 0.92);
}

html:not(.dark) .ng-ios-shortcut-modal .ng-help-panel,
html:not(.dark) .ng-ios-shortcut-modal .ng-help-note {
    background: rgba(248, 250, 252, 0.92);
    border-color: rgba(15, 23, 42, 0.1);
}

html:not(.dark) .ng-ios-shortcut-modal .ng-help-panel h3,
html:not(.dark) .ng-ios-shortcut-modal .ng-help-note strong {
    color: #0f172a;
}

html:not(.dark) .ng-ios-shortcut-modal .ng-help-steps li,
html:not(.dark) .ng-ios-shortcut-modal .ng-help-note p,
html:not(.dark) .ng-ios-shortcut-modal .ng-help-troubleshooting ul {
    color: rgba(51, 65, 85, 0.95);
}

html:not(.dark) .ng-ios-shortcut-modal .ng-help-steps strong {
    color: #0f766e;
}

html:not(.dark) .ng-ios-shortcut-modal .ng-help-steps small {
    color: rgba(71, 85, 105, 0.82);
}

html:not(.dark) .ng-ios-shortcut-modal .ng-help-note {
    background: rgba(240, 253, 250, 0.95);
    border-color: rgba(20, 184, 166, 0.22);
}

html:not(.dark) .ng-ios-shortcut-modal .ng-help-modal-close {
    background: rgba(15, 23, 42, 0.06);
    border-color: rgba(15, 23, 42, 0.12);
    color: #0f172a;
}

html:not(.dark) .ng-ios-shortcut-modal .ng-help-modal-close:hover {
    background: rgba(15, 23, 42, 0.1);
}

html:not(.dark) .ng-ios-shortcut-modal .ng-ios-shortcut-button {
    color: #ffffff;
}

.ng-ios-shortcut-modal .ng-ios-shortcut-button {
    min-height: 2.25rem;
    padding: 0.55rem 0.9rem;
    border-radius: 0.8rem;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(8, 145, 178, 0.24);
}

html:not(.dark) .ng-ios-shortcut-modal .ng-ios-shortcut-button {
    background: linear-gradient(135deg, #0891b2, #0f766e);
    border: 1px solid rgba(15, 118, 110, 0.2);
    color: #ffffff;
}

html:not(.dark) .ng-ios-shortcut-modal .ng-ios-shortcut-button:hover {
    filter: brightness(1.05);
    box-shadow: 0 14px 28px rgba(8, 145, 178, 0.28);
}

.dark .ng-ios-shortcut-modal .ng-ios-shortcut-button {
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.95), rgba(20, 184, 166, 0.95));
    border: 1px solid rgba(103, 232, 249, 0.3);
    color: #06202a;
}

.dark .ng-ios-shortcut-modal .ng-ios-shortcut-button:hover {
    filter: brightness(1.08);
}

html:not(.dark) .ng-help-modal-panel .ng-help-steps li {
    color: #475569;
}

html:not(.dark) .ng-help-modal-panel .ng-help-steps li::before {
    color: var(--ng-primary);
}

html:not(.dark) .ng-help-modal-panel .ng-help-privacy {
    color: #64748b;
}

/* Dark mode polish: mobile menu trigger and native select options */
html.dark .ng-shell-mobile-toggle {
    background: rgba(17, 24, 39, 0.96) !important;
    border-color: rgba(148, 163, 184, 0.26) !important;
    color: #e5edf7 !important;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.32);
}

html.dark .ng-shell-mobile-toggle:hover {
    background: rgba(30, 41, 59, 0.98) !important;
    border-color: rgba(34, 211, 238, 0.32) !important;
}

html.dark select {
    color-scheme: dark;
}

html.dark select option {
    background: #172033;
    color: #f8fafc;
}

.ng-horse-profile-exterior-gene-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: start;
}

.ng-horse-profile-exterior-gene-columns .ng-horse-profile-exterior-genes {
    min-width: 0;
}

@media (max-width: 760px) {
    .ng-horse-profile-exterior-gene-columns {
        grid-template-columns: 1fr;
    }

    .ng-horse-profile-inventory-banner {
        align-items: stretch;
        flex-direction: column;
        padding: 16px;
    }
}

.ng-horse-profile-gene-grid > section,
.ng-horse-profile-feature-grid > section {
    min-width: 0;
}

.ng-horse-profile-gene-grid > section h3,
.ng-horse-profile-feature-grid > section h3 {
    margin: 0 0 14px;
    padding: 0 0 10px;
    border-bottom: 1px solid rgba(219, 231, 239, 0.82);
    color: var(--ng-text);
    font-size: 1rem;
    font-weight: 800;
}

.ng-horse-profile-gene-grid > section:first-child,
.ng-horse-profile-feature-grid > section:first-child {
    padding-right: 18px;
    border-right: 1px solid rgba(219, 231, 239, 0.82);
}

.ng-horse-profile-gene-grid > section:last-child,
.ng-horse-profile-feature-grid > section:last-child {
    padding-left: 18px;
}

html.dark .ng-horse-profile-gene-grid > section h3,
html.dark .ng-horse-profile-feature-grid > section h3 {
    border-bottom-color: rgba(148, 163, 184, 0.2);
}

html.dark .ng-horse-profile-gene-grid > section:first-child,
html.dark .ng-horse-profile-feature-grid > section:first-child {
    border-right-color: rgba(148, 163, 184, 0.2);
}

/* Pferdeprofil: Nachkommen */
.ng-horse-profile-offspring {
    margin-top: 24px;
}

.ng-horse-profile-offspring-header {
    margin-bottom: 16px;
}

.ng-horse-profile-offspring-heading {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.ng-horse-profile-offspring-heading h3 {
    margin: 0;
    color: var(--ng-text);
    font-size: 1rem;
    font-weight: 800;
}

.ng-horse-profile-offspring-count {
    display: inline-flex;
    align-items: center;
    padding: 4px 9px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    color: var(--ng-text-muted);
    background: rgba(248, 250, 252, 0.7);
    font-size: 0.74rem;
    font-weight: 800;
    line-height: 1;
}

.ng-horse-profile-offspring-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.ng-horse-profile-offspring-card {
    display: block;
    min-width: 0;
    padding: 17px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 14px;
    color: inherit;
    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.86),
            rgba(248, 250, 252, 0.68)
        );
    text-decoration: none;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
    transition:
        transform 160ms ease,
        border-color 160ms ease,
        box-shadow 160ms ease;
}

.ng-horse-profile-offspring-title {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    margin-bottom: 11px;
}

.ng-horse-profile-offspring-name {
    min-width: 0;
    overflow-wrap: anywhere;
    color: var(--ng-text);
    font-size: 1.05rem;
    font-weight: 900;
    line-height: 1.3;
    text-decoration: none;
}

.ng-horse-profile-offspring-name:hover {
    color: var(--ng-accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ng-horse-profile-offspring-name:focus-visible {
    border-radius: 4px;
    outline: 3px solid rgba(56, 189, 248, 0.24);
    outline-offset: 3px;
}

.ng-horse-profile-offspring-sex {
    display: inline-grid;
    flex: 0 0 auto;
    place-items: center;
    width: 27px;
    height: 27px;
    border: 1px solid rgba(56, 189, 248, 0.24);
    border-radius: 8px;
    color: rgb(3, 105, 161);
    background: rgba(224, 242, 254, 0.72);
    font-size: 0.95rem;
    font-weight: 900;
    line-height: 1;
}

.ng-horse-profile-offspring-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 15px;
}

.ng-horse-profile-offspring-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 999px;
    color: var(--ng-text-muted);
    background: rgba(241, 245, 249, 0.82);
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.2;
}

.ng-horse-profile-offspring-values {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
}

.ng-horse-profile-offspring-values > div {
    min-width: 0;
    padding: 8px 6px;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 10px;
    background: rgba(241, 245, 249, 0.78);
    text-align: center;
}

.ng-horse-profile-offspring-values dt {
    margin-bottom: 3px;
    color: var(--ng-text-muted);
    font-size: 0.66rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.ng-horse-profile-offspring-values dd {
    margin: 0;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
    color: var(--ng-text);
    font-size: 0.84rem;
    font-weight: 900;
    line-height: 1.2;
}

.ng-horse-profile-offspring .ng-horse-muted {
    margin: 0;
}

html.dark .ng-horse-profile-offspring-card {
    border-color: rgba(148, 163, 184, 0.18);
    background:
        linear-gradient(
            145deg,
            rgba(30, 41, 59, 0.96),
            rgba(22, 32, 51, 0.94)
        );
    box-shadow:
        0 10px 24px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

html.dark .ng-horse-profile-offspring-card:hover {
    border-color: rgba(56, 189, 248, 0.3);
    box-shadow:
        0 14px 30px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.035);
}

html.dark .ng-horse-profile-offspring-count {
    border-color: rgba(148, 163, 184, 0.16);
    color: rgb(203, 213, 225);
    background: rgba(30, 41, 59, 0.48);
}

html.dark .ng-horse-profile-offspring-sex {
    border-color: rgba(56, 189, 248, 0.2);
    color: rgb(125, 211, 252);
    background: rgba(3, 105, 161, 0.2);
}

html.dark .ng-horse-profile-offspring-badge {
    border-color: rgba(148, 163, 184, 0.14);
    color: rgb(203, 213, 225);
    background: rgba(15, 23, 42, 0.36);
}

html.dark .ng-horse-profile-offspring-values > div {
    border-color: rgba(148, 163, 184, 0.12);
    background: rgba(15, 23, 42, 0.38);
}

.ng-horse-profile-offspring-details {
    margin: 0;
}

.ng-horse-profile-offspring-summary {
    display: flex;
    align-items: center;
    width: fit-content;
    margin-bottom: 16px;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

.ng-horse-profile-offspring-summary::-webkit-details-marker {
    display: none;
}

.ng-horse-profile-offspring-heading {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
}

.ng-horse-profile-offspring-chevron {
    display: inline-grid;
    place-items: center;
    width: 18px;
    height: 18px;
    color: var(--ng-text-muted);
    font-size: 1.1rem;
    font-weight: 900;
    line-height: 1;
    transform: rotate(0deg);
    transition: transform 160ms ease;
}

.ng-horse-profile-offspring-details[open]
    .ng-horse-profile-offspring-chevron {
    transform: rotate(90deg);
}

.ng-horse-profile-offspring-title-label {
    color: var(--ng-text);
    font-size: 1rem;
    font-weight: 800;
}

.ng-horse-profile-offspring-summary:hover
    .ng-horse-profile-offspring-title-label {
    color: var(--ng-accent);
}

.ng-horse-profile-offspring-summary:focus-visible {
    border-radius: 8px;
    outline: 3px solid rgba(56, 189, 248, 0.24);
    outline-offset: 4px;
}

/* Zuchtverwaltung: Nachkommen-Check */
.ng-descendant-check-summary {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    width: fit-content;
    max-width: 100%;
    margin: 0;
    padding: 14px 16px;
    border: 1px solid rgba(20, 184, 166, 0.24);
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(240, 253, 250, 0.96), rgba(239, 246, 255, 0.9));
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
    color: var(--ng-text);
}

.ng-descendant-check-summary-label {
    color: var(--ng-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
}

.ng-descendant-check-summary strong {
    color: var(--ng-text);
    font-size: 0.98rem;
    font-weight: 800;
    line-height: 1.35;
}

html.dark .ng-descendant-check-summary {
    border-color: rgba(45, 212, 191, 0.22);
    background: linear-gradient(135deg, rgba(20, 184, 166, 0.12), rgba(59, 130, 246, 0.1));
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18);
}

.ng-descendant-check-groups {
    display: grid;
    gap: 18px;
}

.ng-descendant-check-group {
    width: 100%;
}

.ng-descendant-check-parent-horse {
    min-width: 0;
}

.ng-descendant-check-parent-horse .ng-horse-profile-offspring-title {
    margin-bottom: 12px;
}

.ng-descendant-check-parent-horse .ng-horse-profile-offspring-name {
    font-size: clamp(1.18rem, 2vw, 1.45rem);
}

.ng-descendant-check-parent-horse .ng-horse-profile-offspring-values {
    max-width: 680px;
}

.ng-descendant-check-offspring-section {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(148, 163, 184, 0.18);
}

.ng-descendant-check-offspring-section
    > .ng-horse-profile-offspring-heading {
    margin-bottom: 14px;
}

html.dark .ng-descendant-check-offspring-section {
    border-top-color: rgba(148, 163, 184, 0.14);
}

/* Zuchtverwaltung: Turnierwerte-Vergleich */
.ng-tournament-filter-grid {
    grid-template-columns: minmax(190px, 1fr) minmax(220px, 1.4fr) repeat(2, minmax(150px, 1fr)) auto;
}

.ng-tournament-header-meta {
    margin: 4px 0 0;
    color: var(--ng-muted);
    font-size: 0.88rem;
    font-weight: 700;
    line-height: 1.35;
}

.ng-list-view-toggle {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px 20px 0;
    margin-bottom: 12px;
}

[data-list-view-root][data-view="table"] [data-list-view-panel="table"] {
    display: block;
}

[data-list-view-root][data-view="table"] [data-list-view-panel="cards"] {
    display: none;
}

[data-list-view-root][data-view="cards"] [data-list-view-panel="table"] {
    display: none;
}

[data-list-view-root][data-view="cards"] [data-list-view-panel="cards"] {
    display: grid;
}

.ng-list-view-toggle + [data-list-view-panel="table"],
[data-list-view-panel="table"] {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
}

[data-list-view-panel="table"] .ng-horse-table th {
    white-space: nowrap;
}

[data-list-view-panel="table"] .ng-horse-table td {
    word-break: normal;
}

[data-list-view-panel="table"] .ng-horse-table td:not(.ng-horse-name-cell) {
    overflow-wrap: normal;
}

[data-list-view-panel="table"] .ng-horse-name-cell {
    min-width: 180px;
    max-width: 280px;
    white-space: normal;
    overflow-wrap: anywhere;
}

.ng-tournament-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
}

.ng-tournament-table {
    min-width: 760px;
}

.ng-tournament-table th:first-child,
.ng-tournament-table td:first-child {
    min-width: 230px;
    max-width: 310px;
}

.ng-tournament-table th:nth-last-child(-n + 3),
.ng-tournament-table td:nth-last-child(-n + 3) {
    text-align: right;
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
}

.ng-tournament-table th,
.ng-tournament-table td {
    min-width: 112px;
}

.ng-tournament-horse-name {
    display: inline-flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
}

.ng-tournament-horse-name .ng-horse-name-link {
    overflow-wrap: break-word;
    word-break: normal;
}

.ng-tournament-card h2 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ng-tournament-card-stats dd {
    white-space: nowrap;
    overflow-wrap: normal;
    word-break: normal;
}

.ng-tournament-pagination {
    padding: 16px 20px 20px;
}

@media (max-width: 640px) {
    .ng-descendant-check-summary {
        width: 100%;
        padding: 12px 14px;
    }

    .ng-descendant-check-summary strong {
        min-width: 0;
    }

    .ng-descendant-check-group,
    .ng-descendant-check-offspring-section,
    .ng-horse-profile-offspring-grid,
    .ng-horse-profile-offspring-grid > *,
    .ng-horse-profile-offspring-card {
        min-width: 0;
        width: 100%;
    }

    .ng-descendant-check-group {
        padding: 18px 14px;
    }

    .ng-descendant-check-parent-horse .ng-horse-profile-offspring-values {
        max-width: none;
    }

    .ng-horse-profile-offspring-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }

    .ng-horse-profile-offspring-card {
        padding: 14px;
    }

    .ng-horse-profile-offspring-title {
        align-items: flex-start;
        gap: 8px;
    }

    .ng-horse-profile-offspring-name {
        overflow-wrap: break-word;
        word-break: normal;
    }

    .ng-horse-profile-offspring-meta {
        gap: 7px;
        margin-bottom: 12px;
    }

    .ng-horse-profile-offspring-badge {
        min-width: 0;
        max-width: 100%;
    }

    .ng-horse-profile-offspring-values {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .ng-horse-profile-offspring-values > div {
        padding: 8px;
    }

    .ng-horse-profile-offspring-values dd {
        font-size: 0.9rem;
    }

    .ng-tournament-filter-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .ng-tournament-filter-grid > *,
    .ng-tournament-filter-grid .ng-field,
    .ng-tournament-filter-grid .ng-field input,
    .ng-tournament-filter-grid .ng-field select,
    .ng-tournament-filter-grid .ng-horse-filter-actions,
    .ng-tournament-filter-grid .ng-btn-secondary {
        min-width: 0;
        width: 100%;
    }

    .ng-list-view-toggle {
        padding: 14px 14px 0;
    }

    .ng-list-view-toggle .ng-horse-tab {
        flex: 1 1 130px;
    }

    .ng-tournament-table {
        min-width: 680px;
    }

    .ng-tournament-table th,
    .ng-tournament-table td {
        min-width: 104px;
        padding-inline: 10px;
    }

    .ng-tournament-table th:first-child,
    .ng-tournament-table td:first-child {
        min-width: 210px;
        max-width: 260px;
    }

    .ng-tournament-card h2 {
        align-items: flex-start;
    }
}

/* Competition performance classes: shared row colors for calculator, import and horse profile */

.ng-competition-lk-row {
    --ng-lk-hue: 210;
    --ng-lk-saturation: 20%;
    --ng-lk-row-background: hsl(var(--ng-lk-hue) var(--ng-lk-saturation) 93%);
    --ng-lk-row-hover-background: hsl(var(--ng-lk-hue) var(--ng-lk-saturation) 90%);
    --ng-lk-row-border: hsl(var(--ng-lk-hue) var(--ng-lk-saturation) 79%);
    --ng-lk-pill-background: hsl(var(--ng-lk-hue) var(--ng-lk-saturation) 79%);
    --ng-lk-pill-color: hsl(var(--ng-lk-hue) var(--ng-lk-saturation) 23%);
}

.ng-competition-lk-row--10 {
    --ng-lk-hue: 210;
    --ng-lk-saturation: 18%;
}

.ng-competition-lk-row--9 {
    --ng-lk-hue: 218;
    --ng-lk-saturation: 68%;
}

.ng-competition-lk-row--8 {
    --ng-lk-hue: 190;
    --ng-lk-saturation: 72%;
}

.ng-competition-lk-row--7 {
    --ng-lk-hue: 169;
    --ng-lk-saturation: 58%;
}

.ng-competition-lk-row--6 {
    --ng-lk-hue: 138;
    --ng-lk-saturation: 52%;
}

.ng-competition-lk-row--5 {
    --ng-lk-hue: 91;
    --ng-lk-saturation: 58%;
}

.ng-competition-lk-row--4 {
    --ng-lk-hue: 48;
    --ng-lk-saturation: 82%;
}

.ng-competition-lk-row--3 {
    --ng-lk-hue: 29;
    --ng-lk-saturation: 82%;
}

.ng-competition-lk-row--2 {
    --ng-lk-hue: 356;
    --ng-lk-saturation: 70%;
}

.ng-competition-lk-row--1 {
    --ng-lk-hue: 275;
    --ng-lk-saturation: 62%;
}

.ng-competition-table .ng-competition-lk-row > td,
.ng-horse-profile-table .ng-competition-lk-row > td {
    background: var(--ng-lk-row-background);
    background-clip: border-box;
    border-color: var(--ng-lk-row-background);
    transition:
        background-color 160ms ease,
        border-color 160ms ease;
}

.ng-competition-table .ng-competition-lk-row:hover > td,
.ng-horse-profile-table .ng-competition-lk-row:hover > td {
    background: var(--ng-lk-row-hover-background);
    border-color: var(--ng-lk-row-hover-background);
}

.ng-competition-lk-row .ng-lk-pill {
    flex-shrink: 0;
    min-width: 38px;
    white-space: nowrap;
    background: var(--ng-lk-pill-background);
    color: var(--ng-lk-pill-color);
}

/* Hauptdisziplin bleibt zusätzlich erkennbar */

.ng-import-main-discipline-row > td:first-child,
.ng-horse-profile-table tr.is-main > td:first-child {
    box-shadow: inset 4px 0 0 var(--ng-primary, #2f8fa3);
}

/* Darkmode */

html.dark .ng-competition-lk-row {
    --ng-lk-row-background: hsl(
        var(--ng-lk-hue)
        calc(var(--ng-lk-saturation) * 0.72)
        27%
    );
    --ng-lk-row-hover-background: hsl(
        var(--ng-lk-hue)
        calc(var(--ng-lk-saturation) * 0.78)
        31%
    );
    --ng-lk-row-border: hsl(
        var(--ng-lk-hue)
        var(--ng-lk-saturation)
        58% / 0.34
    );
    --ng-lk-pill-background: hsl(
        var(--ng-lk-hue)
        var(--ng-lk-saturation)
        48% / 0.42
    );
    --ng-lk-pill-color: hsl(
        var(--ng-lk-hue)
        var(--ng-lk-saturation)
        91%
    );
}

html.dark .ng-competition-table .ng-competition-lk-row > td,
html.dark .ng-horse-profile-table .ng-competition-lk-row > td {
    background: var(--ng-lk-row-background) !important;
    border-color: var(--ng-lk-row-background) !important;
    color: #f8fafc !important;
}

html.dark .ng-competition-table .ng-competition-lk-row:hover > td,
html.dark .ng-horse-profile-table .ng-competition-lk-row:hover > td {
    background: var(--ng-lk-row-hover-background) !important;
    border-color: var(--ng-lk-row-hover-background) !important;
}

html.dark .ng-competition-lk-row .ng-lk-pill {
    background: var(--ng-lk-pill-background) !important;
    color: var(--ng-lk-pill-color) !important;
}

/* Mobile und Tablet */

@media (max-width: 768px) {
    .ng-competition-table .ng-competition-lk-row,
    .ng-horse-profile-table .ng-competition-lk-row {
        background: var(--ng-lk-row-background);
    }

    .ng-competition-table .ng-competition-lk-row > td,
    .ng-horse-profile-table .ng-competition-lk-row > td {
        background: var(--ng-lk-row-background);
        background-clip: border-box;
    }

    html.dark .ng-competition-table .ng-competition-lk-row,
    html.dark .ng-horse-profile-table .ng-competition-lk-row {
        background: var(--ng-lk-row-background);
    }

    html.dark .ng-competition-table .ng-competition-lk-row > td,
    html.dark .ng-horse-profile-table .ng-competition-lk-row > td {
        background: var(--ng-lk-row-background) !important;
    }

    .ng-competition-lk-row .ng-lk-pill {
        min-width: 34px;
        padding: 3px 7px;
        font-size: 0.76rem;
    }
}

/* Dark mode: calculator competition cards */

html.dark .ng-competition-card {
    border-color: rgba(148, 163, 184, 0.2);
    background: rgba(17, 24, 39, 0.96);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.22);
}

html.dark .ng-competition-header {
    border-bottom-color: rgba(148, 163, 184, 0.18);
    background: linear-gradient(
        135deg,
        rgba(30, 41, 59, 0.98),
        rgba(15, 23, 42, 0.96)
    );
}

html.dark .ng-competition-label {
    color: #94a3b8;
}

html.dark .ng-competition-title {
    color: #f8fafc;
}

html.dark .ng-competition-table thead {
    background: rgba(30, 41, 59, 0.92);
    color: #cbd5e1;
}

html.dark .ng-competition-table th {
    border-bottom-color: rgba(148, 163, 184, 0.18);
    color: #cbd5e1;
}

html.dark .ng-competition-table-wrap {
    background: rgba(15, 23, 42, 0.72);
}

/* Mobile and tablet */

@media (max-width: 768px) {
    html.dark .ng-competition-card {
        background: rgba(17, 24, 39, 0.98);
    }

    html.dark .ng-competition-header {
        background: linear-gradient(
            135deg,
            rgba(30, 41, 59, 0.98),
            rgba(15, 23, 42, 0.98)
        );
    }

    html.dark .ng-competition-table thead {
        background: rgba(30, 41, 59, 0.96);
    }
}

/* Dark mode: calculator result and export cards */

html.dark .ng-result-card,
html.dark .ng-export-card {
    border-color: rgba(148, 163, 184, 0.2);
    background: rgba(17, 24, 39, 0.96);
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.22);
}

html.dark .ng-result-header {
    border-bottom-color: rgba(148, 163, 184, 0.18);
    background: linear-gradient(
        135deg,
        rgba(30, 41, 59, 0.98),
        rgba(15, 23, 42, 0.96) 58%,
        rgba(36, 28, 56, 0.94)
    );
}

html.dark .ng-result-label,
html.dark .ng-export-label {
    color: #94a3b8;
}

html.dark .ng-result-name,
html.dark .ng-export-title {
    color: #f8fafc;
}

html.dark .ng-result-pill {
    border-color: rgba(34, 211, 238, 0.28);
    background: rgba(34, 211, 238, 0.12);
    color: #cffafe;
}

html.dark .ng-result-grid {
    background: rgba(15, 23, 42, 0.72);
}

html.dark .ng-result-metric {
    border-color: rgba(148, 163, 184, 0.18);
    background: rgba(30, 41, 59, 0.88);
}

html.dark .ng-result-metric dt {
    color: #94a3b8;
}

html.dark .ng-result-metric dd {
    color: #f8fafc;
}

html.dark .ng-copy-block {
    border-color: rgba(148, 163, 184, 0.2);
    background: linear-gradient(
        135deg,
        rgba(30, 41, 59, 0.92),
        rgba(15, 23, 42, 0.96)
    );
    color: #e2e8f0;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.18);
}

html.dark .ng-copy-feedback {
    color: #67e8f9;
}

html.dark .ng-app-logo-mark,
html.dark .ng-shell-mobile-toggle-mark {
    border-color: rgba(103, 232, 249, 0.22);
    background: rgba(15, 23, 42, 0.82);
    box-shadow:
        0 10px 24px rgba(0, 0, 0, 0.28),
        0 0 0 3px rgba(103, 232, 249, 0.05);
}

/* Mobile and tablet */

@media (max-width: 768px) {
    html.dark .ng-result-card,
    html.dark .ng-export-card {
        background: rgba(17, 24, 39, 0.98);
    }

    html.dark .ng-result-header {
        background: linear-gradient(
            135deg,
            rgba(30, 41, 59, 0.98),
            rgba(15, 23, 42, 0.98) 58%,
            rgba(36, 28, 56, 0.96)
        );
    }

    html.dark .ng-result-grid {
        background: rgba(15, 23, 42, 0.82);
    }

    html.dark .ng-result-metric {
        background: rgba(30, 41, 59, 0.94);
    }

    html.dark .ng-copy-block {
        background: rgba(15, 23, 42, 0.96);
    }
}

/* MDR / inventory comparison ------------------------------------------- */

/* MDR ↔ Noizgenetics Bestandsabgleich */

.ng-inventory-comparison-page .ng-inventory-comparison-input {
    display: grid;
    gap: 0.55rem;
    width: 100%;
    margin-top: 1.1rem;
}

.ng-inventory-comparison-page .ng-inventory-comparison-input label {
    display: block;
    font-weight: 700;
}

.ng-inventory-comparison-page .ng-inventory-comparison-input textarea {
    display: block;
    width: 100%;
    min-width: 0;
    min-height: 18rem;
    padding: 1rem 1.1rem;
    resize: vertical;
    box-sizing: border-box;
    border: 1px solid rgba(37, 116, 135, 0.24);
    border-radius: 1rem;
    background:
        linear-gradient(
            145deg,
            rgba(244, 252, 255, 0.98),
            rgba(247, 245, 255, 0.98)
        );
    box-shadow:
        inset 0 1px 2px rgba(15, 23, 42, 0.04),
        0 0 0 3px rgba(48, 151, 171, 0.04);
    color: var(--ng-text);
    font: inherit;
    line-height: 1.55;
    transition:
        border-color 160ms ease,
        box-shadow 160ms ease,
        background 160ms ease;
}

.ng-inventory-comparison-page .ng-inventory-comparison-input textarea:hover {
    border-color: rgba(37, 116, 135, 0.38);
}

.ng-inventory-comparison-page .ng-inventory-comparison-input textarea:focus {
    outline: none;
    border-color: rgba(35, 151, 174, 0.72);
    box-shadow:
        0 0 0 4px rgba(35, 151, 174, 0.12),
        inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.ng-inventory-comparison-page .ng-inventory-comparison-input textarea::placeholder {
    color: rgba(71, 85, 105, 0.66);
}

.dark .ng-inventory-comparison-page .ng-inventory-comparison-input textarea {
    border-color: rgba(113, 190, 207, 0.2);
    border-radius: 1rem;
    background:
        linear-gradient(
            145deg,
            rgba(34, 47, 70, 0.96),
            rgba(39, 49, 72, 0.96)
        );
    box-shadow:
        inset 0 1px 2px rgba(0, 0, 0, 0.2),
        0 0 0 3px rgba(79, 177, 198, 0.025);
    color: rgba(240, 247, 255, 0.96);
}

.dark .ng-inventory-comparison-page .ng-inventory-comparison-input textarea:hover {
    border-color: rgba(113, 190, 207, 0.34);
}

.dark .ng-inventory-comparison-page .ng-inventory-comparison-input textarea:focus {
    border-color: rgba(90, 193, 214, 0.68);
    box-shadow:
        0 0 0 4px rgba(52, 169, 193, 0.12),
        inset 0 1px 2px rgba(0, 0, 0, 0.2);
}

.dark .ng-inventory-comparison-page .ng-inventory-comparison-input textarea::placeholder {
    color: rgba(188, 205, 226, 0.56);
}

.ng-inventory-comparison-page .ng-form-help {
    margin-top: 0.7rem;
}

.ng-inventory-comparison-page form > .ng-btn-primary {
    display: flex;
    width: 100%;
    margin-top: 1.25rem;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    font-weight: 800;
}

@media (max-width: 640px) {
    .ng-inventory-comparison-page .ng-inventory-comparison-input textarea {
        min-height: 14rem;
        padding: 0.9rem;
        border-radius: 0.85rem;
    }
}

.ng-inventory-comparison-page .ng-inventory-stat-card {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    justify-content: space-between;
}

.ng-inventory-comparison-page .ng-inventory-stat-card .ng-kicker,
.ng-inventory-comparison-page .ng-inventory-stat-card p {
    margin: 0;
}

.ng-inventory-comparison-page .ng-inventory-stat-value {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    min-height: 2.35rem;
    padding: 0.45rem 0.85rem;
    border-radius: 0.85rem;
    background: rgba(42, 152, 176, 0.12);
    border: 1px solid rgba(42, 152, 176, 0.22);
    color: var(--ng-text);
    font-weight: 800;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.ng-inventory-comparison-page .ng-inventory-stat-help {
    color: var(--ng-muted);
    font-size: 0.95rem;
    line-height: 1.55;
}

.ng-inventory-comparison-page .ng-inventory-input-hint {
    margin: 0 0 0.85rem;
    color: var(--ng-muted);
    font-size: 0.95rem;
    line-height: 1.55;
}

.dark .ng-inventory-comparison-page .ng-inventory-stat-value {
    background: rgba(73, 178, 198, 0.14);
    border-color: rgba(90, 193, 214, 0.24);
    color: rgba(240, 247, 255, 0.96);
}

/* MDR-Bestandsabgleich – Ergebnisse */

.ng-inventory-results {
    display: grid;
    gap: 1.25rem;
    margin-top: 1.25rem;
}

.ng-inventory-warning {
    padding: 1rem 1.1rem;
    border: 1px solid rgba(202, 138, 4, 0.28);
    border-radius: 1rem;
    background: rgba(250, 204, 21, 0.1);
}

.ng-inventory-warning strong {
    display: block;
    margin-bottom: 0.45rem;
}

.ng-inventory-warning ul {
    margin: 0;
    padding-left: 1.2rem;
}

.ng-inventory-summary-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.85rem;
}

.ng-inventory-summary-card {
    display: grid;
    gap: 0.35rem;
    min-width: 0;
    padding: 1rem;
    border: 1px solid var(--ng-border);
    border-radius: 1rem;
    background: var(--ng-card);
}

.ng-inventory-summary-card span {
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ng-muted);
}

.ng-inventory-summary-card strong {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    line-height: 1;
}

.ng-inventory-summary-card small {
    color: var(--ng-muted);
    line-height: 1.4;
}

.ng-inventory-summary-card--success {
    border-color: rgba(34, 197, 94, 0.28);
    background: rgba(34, 197, 94, 0.07);
}

.ng-inventory-summary-card--warning {
    border-color: rgba(234, 179, 8, 0.3);
    background: rgba(234, 179, 8, 0.08);
}

.ng-inventory-summary-card--mdr {
    border-color: rgba(59, 130, 246, 0.26);
    background: rgba(59, 130, 246, 0.07);
}

.ng-inventory-summary-card--noiz {
    border-color: rgba(168, 85, 247, 0.26);
    background: rgba(168, 85, 247, 0.07);
}

.ng-inventory-result-groups {
    display: grid;
    gap: 0.85rem;
}

.ng-inventory-result-group {
    overflow: hidden;
    border: 1px solid var(--ng-border);
    border-radius: 1rem;
    background: var(--ng-card);
}

.ng-inventory-result-group summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-width: 0;
    min-height: 3.5rem;
    padding: 0.9rem 1rem;
    cursor: pointer;
    font-weight: 800;
    list-style: none;
}

.ng-inventory-result-group summary::-webkit-details-marker {
    display: none;
}

.ng-inventory-result-group summary::after {
    content: "⌄";
    margin-left: auto;
    transition: transform 160ms ease;
}

.ng-inventory-result-group[open] summary::after {
    transform: rotate(180deg);
}

.ng-inventory-result-group summary strong {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    min-height: 2rem;
    padding: 0 0.55rem;
    border-radius: 999px;
    background: rgba(42, 152, 176, 0.12);
}

.ng-inventory-result-list {
    display: grid;
    max-height: min(32rem, 65vh);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    padding-bottom: 0.55rem;
    border-top: 1px solid var(--ng-border);
    border-radius: 0 0 1rem 1rem;
    background: var(--ng-card);
    box-shadow:
        inset 0 10px 12px -14px rgba(15, 23, 42, 0.35),
        inset 0 -14px 16px -18px rgba(15, 23, 42, 0.4);
}

.ng-inventory-result-list::-webkit-scrollbar {
    width: 10px;
}

.ng-inventory-result-list::-webkit-scrollbar-track {
    margin-block: 0.45rem;
    border-radius: 999px;
    background: transparent;
}

.ng-inventory-result-list::-webkit-scrollbar-thumb {
    border: 3px solid transparent;
    border-radius: 999px;
    background: rgba(100, 116, 139, 0.38);
    background-clip: padding-box;
}

.ng-inventory-result-list::-webkit-scrollbar-thumb:hover {
    background: rgba(71, 85, 105, 0.56);
    background-clip: padding-box;
}

html.dark .ng-inventory-result-list {
    background: rgba(21, 31, 51, 0.92);
    box-shadow:
        inset 0 10px 12px -14px rgba(0, 0, 0, 0.75),
        inset 0 -16px 18px -20px rgba(0, 0, 0, 0.85);
}

html.dark .ng-inventory-result-list::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.34);
    background-clip: padding-box;
}

html.dark .ng-inventory-result-list::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.52);
    background-clip: padding-box;
}

.ng-inventory-result-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1rem;
}

.ng-inventory-result-item + .ng-inventory-result-item {
    border-top: 1px solid var(--ng-border);
}

.ng-inventory-result-item h3 {
    margin: 0;
    font-size: 0.98rem;
    overflow-wrap: anywhere;
}

.ng-inventory-result-item h3 a {
    color: inherit;
    text-decoration: none;
}

.ng-inventory-result-item h3 a:hover {
    text-decoration: underline;
}

.ng-inventory-result-item p {
    margin: 0.3rem 0 0;
    color: var(--ng-muted);
    line-height: 1.45;
}

.ng-inventory-difference-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.4rem;
}

.ng-inventory-difference-list span {
    display: inline-flex;
    max-width: 100%;
    padding: 0.3rem 0.55rem;
    border-radius: 999px;
    background: rgba(234, 179, 8, 0.12);
    border: 1px solid rgba(234, 179, 8, 0.24);
    font-size: 0.78rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.dark .ng-inventory-warning {
    background: rgba(234, 179, 8, 0.08);
}

.dark .ng-inventory-summary-card,
.dark .ng-inventory-result-group {
    background: rgba(21, 31, 51, 0.92);
}

@media (max-width: 1100px) {
    .ng-inventory-summary-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .ng-inventory-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ng-inventory-result-item {
        flex-direction: column;
    }

    .ng-inventory-difference-list {
        justify-content: flex-start;
    }
}

@media (max-width: 460px) {
    .ng-inventory-summary-grid {
        grid-template-columns: 1fr;
    }

    .ng-inventory-summary-card {
        padding: 0.9rem;
    }

    .ng-inventory-result-list {
        max-height: 26rem;
    }
}

.ng-inventory-summary-card[href] {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    transition:
        transform 160ms ease,
        box-shadow 160ms ease,
        border-color 160ms ease;
}

.ng-inventory-summary-card[href]:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.75rem 1.5rem rgba(15, 23, 42, 0.08);
}

.ng-inventory-summary-card[href]:focus-visible {
    outline: 3px solid rgba(42, 152, 176, 0.22);
    outline-offset: 3px;
}

.dark .ng-inventory-summary-card[href]:hover {
    box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.22);
}

.ng-inventory-result-group {
    scroll-margin-top: 1rem;
}

/* Ideas & roadmap ------------------------------------------------------- */

.ng-idea-submit-card {
    margin-bottom: clamp(1.25rem, 3vw, 2rem);
}

.ng-idea-section {
    scroll-margin-top: 1rem;
}

.ng-idea-section--archive {
    opacity: 0.92;
}

.ng-idea-list {
    gap: 1rem;
}

.ng-idea-card h3 {
    margin: 0;
    font-size: clamp(1.1rem, 2vw, 1.35rem);
}

.ng-idea-status {
    border-color: rgba(75, 121, 140, 0.28);
    background: rgba(75, 121, 140, 0.12);
    color: #284f5d;
}

.ng-idea-category {
    border-color: rgba(122, 167, 125, 0.3);
    background: rgba(122, 167, 125, 0.12);
    color: #315f39;
}

.ng-idea-submitted-at {
    border-color: rgba(75, 121, 140, 0.16);
    background: rgba(75, 121, 140, 0.07);
    color: var(--ng-muted);
}

.ng-idea-status--pending_review {
    border-color: rgba(191, 128, 51, 0.28);
    background: rgba(191, 128, 51, 0.13);
    color: #7a4a16;
}

.ng-idea-status--rejected,
.ng-idea-status--archived {
    border-color: rgba(118, 125, 133, 0.28);
    background: rgba(118, 125, 133, 0.12);
    color: #4e5660;
}

.ng-idea-status--completed {
    border-color: rgba(38, 132, 92, 0.28);
    background: rgba(38, 132, 92, 0.12);
    color: #226348;
}

.ng-idea-response {
    border-left: 3px solid rgba(75, 121, 140, 0.4);
    padding-left: 0.85rem;
}

.ng-idea-response p {
    margin-bottom: 0;
}

.ng-idea-progress {
    display: grid;
    gap: 0.45rem;
}

.ng-idea-progress-bar {
    overflow: hidden;
    height: 0.7rem;
    border-radius: 999px;
    background: rgba(75, 121, 140, 0.16);
}

.ng-idea-progress-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #4b798c, #7aa77d);
}

.ng-idea-progress p,
.ng-idea-vote-row p {
    margin: 0;
}

.ng-idea-vote-row {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    width: fit-content;
    max-width: 100%;
}

.ng-idea-vote-row form {
    display: inline-flex;
    width: fit-content;
    margin: 0;
}

.ng-idea-voting-deadline {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    border: 1px solid rgba(75, 121, 140, 0.16);
    border-radius: 999px;
    background: rgba(75, 121, 140, 0.07);
    color: var(--ng-muted);
    padding: 0.36rem 0.66rem;
    font-size: 0.78rem;
    font-weight: 760;
    line-height: 1.15;
}

.ng-idea-voting-deadline.is-ended {
    border-color: rgba(162, 82, 68, 0.2);
    background: rgba(162, 82, 68, 0.08);
    color: #8c3e34;
}

.ng-idea-vote-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    width: fit-content;
    max-width: 100%;
    border: 1px solid rgba(47, 143, 163, 0.18);
    border-radius: 999px;
    background: rgba(47, 143, 163, 0.06);
    color: var(--ng-text);
    padding: 0.36rem 0.66rem;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 780;
    line-height: 1.15;
    text-decoration: none;
}

button.ng-idea-vote-pill {
    cursor: pointer;
    transition:
        border-color 0.16s ease,
        background-color 0.16s ease,
        color 0.16s ease,
        box-shadow 0.16s ease;
}

button.ng-idea-vote-pill:hover {
    border-color: rgba(47, 143, 163, 0.34);
    background: rgba(47, 143, 163, 0.1);
    color: var(--ng-primary-dark);
}

button.ng-idea-vote-pill:focus-visible {
    outline: 2px solid rgba(47, 143, 163, 0.45);
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(47, 143, 163, 0.12);
}

.ng-idea-vote-pill.is-active {
    border-color: rgba(47, 143, 163, 0.34);
    background: rgba(47, 143, 163, 0.12);
    color: var(--ng-primary-dark);
}

.ng-idea-vote-pill strong {
    font-weight: 850;
}

.ng-idea-admin-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    min-width: 0;
    margin: 0;
}

.ng-idea-admin-meta div {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    min-width: 0;
    max-width: 100%;
    border: 1px solid rgba(75, 121, 140, 0.16);
    border-radius: 999px;
    padding: 0.34rem 0.6rem;
    background: rgba(255, 255, 255, 0.42);
    white-space: normal;
    overflow-wrap: anywhere;
}

.ng-idea-admin-meta dt {
    min-width: 0;
    color: var(--ng-muted);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    white-space: normal;
}

.ng-idea-admin-meta dd {
    min-width: 0;
    max-width: 100%;
    margin: 0;
    color: var(--ng-text);
    font-size: 0.82rem;
    font-weight: 760;
    overflow-wrap: anywhere;
    white-space: normal;
}

html.dark .ng-idea-status {
    border-color: rgba(154, 205, 217, 0.28);
    background: rgba(154, 205, 217, 0.12);
    color: #d9f3f7;
}

html.dark .ng-idea-category {
    border-color: rgba(187, 247, 208, 0.24);
    background: rgba(34, 197, 94, 0.11);
    color: #dcfce7;
}

html.dark .ng-idea-submitted-at {
    border-color: rgba(148, 163, 184, 0.18);
    background: rgba(15, 23, 42, 0.3);
    color: rgba(226, 232, 240, 0.72);
}

html.dark .ng-idea-status--pending_review {
    border-color: rgba(250, 204, 21, 0.34);
    background: rgba(250, 204, 21, 0.12);
    color: #fef3c7;
}

html.dark .ng-idea-status--rejected,
html.dark .ng-idea-status--archived {
    border-color: rgba(203, 213, 225, 0.24);
    background: rgba(148, 163, 184, 0.14);
    color: #e2e8f0;
}

html.dark .ng-idea-status--completed {
    border-color: rgba(134, 239, 172, 0.28);
    background: rgba(34, 197, 94, 0.12);
    color: #dcfce7;
}

html.dark .ng-idea-progress-bar {
    background: rgba(226, 232, 240, 0.12);
}

html.dark .ng-idea-admin-meta div {
    border-color: rgba(226, 232, 240, 0.12);
    background: rgba(15, 23, 42, 0.35);
}

@media (max-width: 720px) {
    .ng-idea-admin-meta {
        gap: 0.4rem;
    }

    .ng-idea-vote-row {
        width: fit-content;
    }

    .ng-idea-vote-row form,
    .ng-idea-vote-row button {
        width: fit-content;
    }
}

.ng-idea-page {
    display: grid;
    gap: clamp(1rem, 2.4vw, 1.6rem);
}

.ng-idea-hero {
    margin-bottom: 0;
}

.ng-idea-hub-grid {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr));
}

.ng-idea-summary-card {
    display: grid;
    align-content: start;
    gap: 0.35rem;
    min-height: 9.25rem;
    text-decoration: none;
}

.ng-idea-summary-card strong {
    color: var(--ng-ink);
    font-size: clamp(1.9rem, 4vw, 2.65rem);
    line-height: 1;
}

.ng-idea-summary-card span:not(.ng-public-card-link) {
    color: var(--ng-muted);
    font-size: 0.92rem;
    line-height: 1.4;
}

.ng-idea-summary-card.is-active {
    border-color: rgba(75, 121, 140, 0.5);
    box-shadow: 0 0 0 3px rgba(75, 121, 140, 0.12);
}

.ng-idea-submit-card {
    display: grid;
    gap: 1rem;
    margin-bottom: 0;
}

.ng-idea-submit-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.ng-idea-submit-intro h2,
.ng-idea-empty-card h3 {
    margin: 0;
}

.ng-idea-submit-intro p:last-child,
.ng-idea-empty-card p:last-child {
    margin-bottom: 0;
}

.ng-idea-submit-details {
    display: grid;
    gap: 1rem;
}

.ng-idea-submit-details summary {
    display: inline-flex;
    width: fit-content;
    cursor: pointer;
    list-style: none;
}

.ng-idea-submit-details summary::-webkit-details-marker {
    display: none;
}

.ng-idea-submit-form {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(75, 121, 140, 0.16);
}

.ng-idea-submit-panel {
    display: grid;
    gap: 1rem;
    max-width: 48rem;
    border: 1px solid rgba(75, 121, 140, 0.16);
    border-radius: 0.75rem;
    padding: clamp(1rem, 2.4vw, 1.35rem);
    background: rgba(75, 121, 140, 0.045);
}

.ng-idea-submit-actions {
    padding-top: 0.25rem;
}

.ng-idea-filter-tabs {
    margin-top: 0;
    opacity: 0.96;
}

.ng-idea-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
}

.ng-idea-list--forum {
    grid-template-columns: minmax(0, 1fr);
}

.ng-idea-list--roadmap {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
}

.ng-idea-list--archive {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
}

.ng-idea-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 100%;
}

.ng-idea-card--layout-forum {
    min-height: 18rem;
}

.ng-idea-card--layout-roadmap {
    min-height: 24rem;
}

.ng-idea-card--layout-archive {
    min-height: 17rem;
    padding: 1.05rem;
}

.ng-idea-card--archive {
    border-style: solid;
    background: rgba(248, 250, 252, 0.78);
}

.ng-idea-card-badges {
    align-items: flex-start;
}

.ng-idea-card-main {
    display: grid;
    gap: 0.85rem;
    min-width: 0;
}

.ng-idea-card-body {
    display: grid;
    gap: 0.55rem;
    min-width: 0;
}

.ng-idea-card-body p {
    margin: 0;
    overflow-wrap: anywhere;
}

.ng-idea-expandable {
    display: grid;
    gap: 0.45rem;
}

.ng-idea-expandable-text {
    margin: 0;
    overflow-wrap: anywhere;
}

.ng-idea-expandable-text.is-clamped {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
}

.ng-idea-card--layout-forum .ng-idea-card-body .ng-idea-expandable-text.is-clamped {
    line-clamp: 5;
    -webkit-line-clamp: 5;
}

.ng-idea-card--layout-roadmap .ng-idea-card-body .ng-idea-expandable-text.is-clamped,
.ng-idea-card--layout-archive .ng-idea-card-body .ng-idea-expandable-text.is-clamped,
.ng-idea-response .ng-idea-expandable-text.is-clamped {
    line-clamp: 4;
    -webkit-line-clamp: 4;
}

.ng-idea-card--layout-archive .ng-idea-card-body .ng-idea-expandable-text.is-clamped,
.ng-idea-card--layout-archive .ng-idea-response .ng-idea-expandable-text.is-clamped {
    line-clamp: 3;
    -webkit-line-clamp: 3;
}

.ng-idea-expandable-text.is-expanded {
    display: block;
    overflow: visible;
    line-clamp: unset;
    -webkit-line-clamp: unset;
}

.ng-idea-text-toggle {
    width: fit-content;
    border: 0;
    background: transparent;
    color: var(--ng-primary-dark);
    padding: 0;
    font: inherit;
    font-size: 0.86rem;
    font-weight: 850;
    line-height: 1.35;
    cursor: pointer;
}

.ng-idea-text-toggle:hover,
.ng-idea-text-toggle:focus-visible {
    text-decoration: underline;
}

.ng-idea-card-footer {
    display: grid;
    gap: 0.85rem;
    margin-top: auto;
}

.ng-idea-card-footer .ng-idea-vote-row {
    justify-content: flex-start;
}

.ng-idea-progress {
    border: 1px solid rgba(75, 121, 140, 0.16);
    border-radius: 0.65rem;
    padding: 0.75rem;
    background: rgba(75, 121, 140, 0.06);
}

.ng-idea-progress-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    color: var(--ng-muted);
    font-size: 0.86rem;
}

.ng-idea-progress-head strong {
    color: var(--ng-ink);
}

.ng-idea-empty-card {
    min-height: 10rem;
    border-style: dashed;
    display: grid;
    align-content: center;
    gap: 0.45rem;
    background: rgba(75, 121, 140, 0.045);
}

html.dark .ng-idea-summary-card strong,
html.dark .ng-idea-progress-head strong {
    color: #f8fafc;
}

html.dark .ng-idea-summary-card.is-active {
    border-color: rgba(154, 205, 217, 0.44);
    box-shadow: 0 0 0 3px rgba(154, 205, 217, 0.12);
}

html.dark .ng-idea-submit-form {
    border-top-color: rgba(226, 232, 240, 0.12);
}

html.dark .ng-idea-submit-panel {
    border-color: rgba(226, 232, 240, 0.12);
    background: rgba(15, 23, 42, 0.36);
}

html.dark .ng-idea-card--archive,
html.dark .ng-idea-empty-card {
    background: rgba(15, 23, 42, 0.34);
}

html.dark .ng-idea-progress {
    border-color: rgba(226, 232, 240, 0.12);
    background: rgba(15, 23, 42, 0.36);
}

html.dark .ng-idea-vote-pill {
    border-color: rgba(148, 163, 184, 0.24);
    background: rgba(15, 23, 42, 0.38);
    color: #e2e8f0;
}

html.dark .ng-idea-voting-deadline {
    border-color: rgba(148, 163, 184, 0.2);
    background: rgba(15, 23, 42, 0.32);
    color: rgba(226, 232, 240, 0.72);
}

html.dark .ng-idea-voting-deadline.is-ended {
    border-color: rgba(248, 113, 113, 0.24);
    background: rgba(248, 113, 113, 0.1);
    color: #fecaca;
}

html.dark button.ng-idea-vote-pill:hover,
html.dark button.ng-idea-vote-pill:focus-visible {
    border-color: rgba(34, 211, 238, 0.34);
    background: rgba(34, 211, 238, 0.1);
    color: #f8fafc;
}

html.dark .ng-idea-vote-pill.is-active {
    border-color: rgba(34, 211, 238, 0.36);
    background: rgba(34, 211, 238, 0.13);
    color: #ecfeff;
}

html.dark .ng-content-like-button {
    border-color: rgba(148, 163, 184, 0.24) !important;
    background: rgba(15, 23, 42, 0.38) !important;
    color: #e2e8f0 !important;
}

html.dark .ng-content-like-button:hover,
html.dark .ng-content-like-button:focus-visible {
    border-color: rgba(34, 211, 238, 0.34) !important;
    background: rgba(34, 211, 238, 0.1) !important;
    color: #f8fafc !important;
}

html.dark .ng-content-like-button.is-active {
    border-color: rgba(34, 211, 238, 0.36) !important;
    background: rgba(34, 211, 238, 0.13) !important;
    color: #ecfeff !important;
}

html.dark .ng-content-like-separator,
html.dark .ng-content-like-count {
    color: rgba(203, 213, 225, 0.72) !important;
}

.ng-idea-card > .ng-idea-vote-row,
.ng-admin-idea-card > .ng-admin-idea-quick-form {
    margin-top: auto;
}

.ng-admin-idea-card > .ng-admin-idea-quick-form {
    margin-top: 0;
}

.ng-admin-idea-filter-grid {
    grid-template-columns: repeat(auto-fit, minmax(9.75rem, 1fr));
}

.ng-admin-idea-filter-card {
    min-height: 8.4rem;
}

.ng-admin-idea-list {
    align-items: stretch;
    gap: 0.85rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}

.ng-admin-idea-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
    overflow-x: hidden;
    gap: 0.8rem;
}

.ng-admin-idea-card-content {
    display: grid;
    align-content: start;
    flex: 1 1 auto;
    gap: 0.8rem;
    min-width: 0;
}

.ng-admin-idea-card .ng-idea-card-body {
    gap: 0.45rem;
}

.ng-admin-idea-card .ng-idea-card-body h2 {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.25;
}

.ng-admin-idea-card .ng-idea-expandable-text {
    color: var(--ng-text);
    font-size: 0.9rem;
    line-height: 1.48;
}

.ng-admin-idea-card .ng-idea-card-body .ng-idea-expandable-text.is-clamped {
    line-clamp: 5;
    -webkit-line-clamp: 5;
}

.ng-admin-idea-card .ng-idea-response .ng-idea-expandable-text.is-clamped {
    line-clamp: 4;
    -webkit-line-clamp: 4;
}

.ng-admin-idea-card .ng-idea-response {
    gap: 0.45rem;
}

.ng-admin-idea-card .ng-idea-response strong {
    font-size: 0.82rem;
}

.ng-admin-idea-quick-form {
    display: grid;
    flex: 0 0 auto;
    min-width: 0;
    max-width: 100%;
    gap: 0.75rem;
    border: 1px solid rgba(75, 121, 140, 0.18);
    border-radius: 0.65rem;
    padding: 0.65rem;
    background: rgba(75, 121, 140, 0.055);
}

.ng-admin-idea-quick-head {
    min-width: 0;
}

.ng-admin-idea-quick-head h3 {
    margin: 0;
    color: var(--ng-ink);
    font-size: 0.86rem;
    line-height: 1.2;
}

.ng-admin-idea-quick-grid {
    display: grid;
    min-width: 0;
    max-width: 100%;
    gap: 0.55rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
    align-items: end;
}

.ng-admin-idea-quick-grid .ng-field {
    gap: 0.24rem;
    min-width: 0;
    max-width: 100%;
}

.ng-admin-idea-quick-grid .ng-field span {
    font-size: 0.72rem;
    letter-spacing: 0;
}

.ng-admin-idea-quick-grid .ng-field select,
.ng-admin-idea-quick-grid .ng-field input,
.ng-admin-idea-quick-grid .ng-field textarea {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 2.35rem;
    padding-block: 0.45rem;
    font-size: 0.86rem;
}

.ng-admin-idea-quick-reason {
    grid-column: 1 / -1;
}

.ng-admin-idea-quick-custom-date {
    min-width: 0;
}

.ng-admin-idea-quick-reason textarea {
    min-height: 4.6rem;
}

.ng-admin-idea-quick-actions {
    align-self: end;
    justify-content: flex-start;
    min-width: 0;
    max-width: 100%;
}

.ng-admin-idea-quick-actions .ng-btn-primary {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    min-height: 2.35rem;
    padding: 0.5rem 0.78rem;
    white-space: nowrap;
}

.ng-admin-idea-card-actions {
    align-items: center;
    flex-wrap: wrap;
    flex: 0 0 auto;
    gap: 0.5rem;
    min-width: 0;
    max-width: 100%;
    margin-top: 0.1rem;
}

html.dark .ng-admin-idea-quick-form {
    border-color: rgba(226, 232, 240, 0.13);
    background: rgba(15, 23, 42, 0.38);
}

html.dark .ng-admin-idea-quick-head h3 {
    color: #f8fafc;
}

@media (max-width: 1100px) {
    .ng-admin-idea-quick-grid {
        grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr));
    }
}

@media (max-width: 640px) {
    .ng-admin-idea-quick-grid {
        grid-template-columns: 1fr;
    }

    .ng-admin-idea-quick-actions,
    .ng-admin-idea-quick-actions button {
        width: 100%;
    }

    .ng-admin-idea-card-actions,
    .ng-admin-idea-card-actions form,
    .ng-admin-idea-card-actions a,
    .ng-admin-idea-card-actions button {
        width: 100%;
    }
}

@media (min-width: 1180px) {
    .ng-idea-hub-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .ng-idea-hub-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .ng-idea-hub-grid,
    .ng-idea-list {
        grid-template-columns: 1fr;
    }

    .ng-idea-card--layout-forum,
    .ng-idea-card--layout-roadmap,
    .ng-idea-card--layout-archive {
        min-height: 0;
    }

    .ng-idea-summary-card,
    .ng-idea-empty-card {
        min-height: auto;
    }

    .ng-idea-submit-details summary,
    .ng-idea-submit-details .ng-btn-primary {
        width: 100%;
        justify-content: center;
    }
}
