/* =====================================================
   GLOBAL STYLES
===================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* =====================================================
   BODY
===================================================== */

body {
    font-family: Arial, sans-serif;
    background: #f4f4f4;
    color: #333333;
    line-height: 1.6;
}

/* =====================================================
   CONTAINER
===================================================== */

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* =====================================================
   HEADER
===================================================== */

.site-header {
    background: #222222;
    padding: 20px 0;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* =====================================================
   LOGO
===================================================== */

.logo a {
    color: #ffffff;
    font-size: 24px;
    font-weight: bold;
    text-decoration: none;
}

/* =====================================================
   USER ROLE DISPLAY
===================================================== */

.user-role {
    color: #cccccc;
    font-size: 12px;
    margin-top: 4px;
}

/* =====================================================
   NAVIGATION
===================================================== */

.navigation ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

.navigation ul li a {
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
}

.navigation ul li a:hover {
    text-decoration: underline;
}

/* =====================================================
   PAGE HEADER
===================================================== */

.page-header {
    margin: 30px 0;
}

.page-header h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

/* =====================================================
   DASHBOARD CARDS
===================================================== */

.dashboard-cards {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: #ffffff;
    padding: 20px;
    border-radius: 5px;
    flex: 1;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.card h2 {
    margin-bottom: 10px;
}

.card p {
    font-size: 28px;
    font-weight: bold;
}

.dashboard-header {
    margin-bottom: 18px;
}

.dashboard-stat-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.dashboard-stat-card {
    padding: 16px;
    background: #ffffff;
    border: 1px solid #dddddd;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.dashboard-stat-card span,
.dashboard-stat-card strong,
.dashboard-stat-card em {
    display: block;
}

.dashboard-stat-card span {
    color: #666666;
    font-size: 13px;
    font-weight: 700;
}

.dashboard-stat-card strong {
    margin-top: 6px;
    color: #111827;
    font-size: 30px;
    line-height: 1;
}

.dashboard-stat-card em {
    margin-top: 8px;
    color: #555555;
    font-size: 13px;
    font-style: normal;
    line-height: 1.3;
}

.dashboard-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

.dashboard-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
    gap: 20px;
    align-items: start;
}

.dashboard-wide-panel {
    grid-row: span 2;
}

.dashboard-panel {
    padding: 18px;
    background: #ffffff;
    border: 1px solid #dddddd;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.dashboard-panel .section-heading-row {
    margin-top: 0;
}

.dashboard-pigeon-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.dashboard-pigeon-card {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 12px;
    background: #f8f8f8;
    border: 1px solid #e2e2e2;
    border-radius: 6px;
}

.dashboard-pigeon-card img,
.dashboard-pigeon-placeholder {
    width: 64px;
    height: 50px;
    object-fit: cover;
    border: 1px solid #d0d0d0;
    border-radius: 5px;
    background: #ffffff;
}

.dashboard-pigeon-placeholder {
    display: grid;
    place-items: center;
    color: #777777;
    font-size: 12px;
    font-weight: 700;
}

.dashboard-pigeon-card strong,
.dashboard-pigeon-card span,
.dashboard-pigeon-card em {
    display: block;
}

.dashboard-pigeon-card strong {
    color: #111827;
    font-size: 15px;
}

.dashboard-pigeon-card span {
    margin-top: 3px;
    color: #333333;
}

.dashboard-pigeon-card em {
    margin-top: 4px;
    color: #666666;
    font-size: 13px;
    font-style: normal;
}

.dashboard-pigeon-card .table-actions {
    grid-column: 1 / -1;
}

.dashboard-list {
    display: grid;
    gap: 10px;
}

.dashboard-list-item {
    display: block;
    padding: 12px;
    background: #f8f8f8;
    border: 1px solid #e2e2e2;
    border-left: 4px solid #1d4ed8;
    border-radius: 5px;
    color: #222222;
    text-decoration: none;
}

.dashboard-list-item strong,
.dashboard-list-item span {
    display: block;
}

.dashboard-list-item span {
    margin-top: 5px;
    color: #666666;
    font-size: 13px;
}

.dashboard-alert-item {
    border-left-color: #b91c1c;
}

.dashboard-empty-text {
    margin: 0;
    color: #666666;
}

.race-list-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.race-list-filter-panel {
    margin-bottom: 20px;
}

.race-list-filter-panel .section-heading-row,
.race-list-results-panel .section-heading-row {
    margin-top: 0;
}

.race-list-filter-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    gap: 16px;
    align-items: end;
}

.race-list-filter-form .form-group {
    margin-bottom: 0;
}

.race-list-filter-form .form-actions {
    display: flex;
    gap: 10px;
}

.race-list-results-panel {
    margin-bottom: 30px;
}

.race-list-table th,
.race-list-table td {
    vertical-align: middle;
}

.pigeon-search-summary-grid {
    margin-bottom: 20px;
}

.pigeon-search-panel {
    margin-bottom: 20px;
}

.pigeon-search-panel .section-heading-row,
.pigeon-search-results-panel .section-heading-row {
    margin-top: 0;
}

.pigeon-search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: end;
}

.pigeon-search-form .form-group {
    margin-bottom: 0;
}

.pigeon-search-form .form-actions {
    display: flex;
    gap: 10px;
}

.pigeon-search-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.pigeon-search-card {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 14px;
    background: #f8f8f8;
    border: 1px solid #e2e2e2;
    border-radius: 6px;
}

.pigeon-search-card img,
.pigeon-search-card .dashboard-pigeon-placeholder {
    width: 86px;
    height: 66px;
    object-fit: cover;
    border: 1px solid #d0d0d0;
    border-radius: 5px;
    background: #ffffff;
}

.pigeon-search-card-body strong,
.pigeon-search-card-body span,
.pigeon-search-card-body em,
.pigeon-search-card-body small {
    display: block;
}

.pigeon-search-card-body strong {
    color: #111827;
    font-size: 17px;
    line-height: 1.2;
}

.pigeon-search-card-body span {
    margin-top: 4px;
    color: #333333;
    font-size: 15px;
}

.pigeon-search-card-body em,
.pigeon-search-card-body small {
    margin-top: 5px;
    color: #666666;
    font-size: 13px;
    font-style: normal;
    line-height: 1.3;
}

.pigeon-search-card .table-actions {
    justify-content: flex-end;
}

.pigeon-search-card-actions {
    flex-wrap: nowrap;
}

.pigeon-search-table-wrapper {
    overflow-x: auto;
}

.pigeon-search-table {
    width: 100%;
    min-width: 980px;
}

.pigeon-search-table th,
.pigeon-search-table td {
    vertical-align: middle;
    white-space: nowrap;
}

.pigeon-search-table th:last-child,
.pigeon-search-table td:last-child {
    width: 360px;
}

.pigeon-search-row-actions {
    justify-content: flex-start;
    flex-wrap: nowrap;
}

.progeny-table-panel {
    padding: 18px;
}

.progeny-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 16px;
}

.progeny-generation-form {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    margin: 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

.progeny-generation-form label {
    margin: 0;
    color: #1d4ed8;
    font-weight: 700;
}

.progeny-generation-form select {
    width: auto;
    min-width: 86px;
}

.btn-disabled {
    background: #c7c7c7;
    border-color: #c7c7c7;
    color: #ffffff;
    cursor: not-allowed;
}

.progeny-count {
    margin: 0 0 14px;
}

.progeny-table-wrapper {
    overflow-x: auto;
}

.progeny-table {
    width: 100%;
    min-width: 1420px;
}

.progeny-table th,
.progeny-table td {
    vertical-align: middle;
    white-space: nowrap;
}

.progeny-row-actions {
    justify-content: flex-start;
    flex-wrap: nowrap;
}

.report-summary-grid,
.report-filter-panel {
    margin-bottom: 20px;
}

.report-filter-panel .section-heading-row,
.report-summary-results-panel .section-heading-row {
    margin-top: 0;
}

.report-filter-form {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
    gap: 16px;
    align-items: end;
}

.report-filter-form .form-group {
    margin-bottom: 0;
}

.report-filter-form .form-actions {
    display: flex;
    gap: 10px;
}

.report-summary-compact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.report-summary-compact-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 12px;
    background: #f8f8f8;
    border: 1px solid #e2e2e2;
    border-radius: 6px;
}

.report-summary-compact-main {
    min-width: 0;
}

.report-summary-compact-main strong,
.report-summary-compact-main span,
.report-summary-compact-main em {
    display: inline;
}

.report-summary-compact-main strong {
    color: #111827;
    font-size: 15px;
}

.report-summary-compact-main span,
.report-summary-compact-main em {
    color: #444444;
    font-size: 14px;
}

.report-summary-compact-main span::before,
.report-summary-compact-main em::before {
    content: " - ";
    color: #888888;
}

.report-summary-compact-main em {
    font-style: normal;
}

.report-summary-compact-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
}

.notice-box {
    max-width: 680px;
    padding: 20px;
    background: #ffffff;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.notice-box p {
    margin-bottom: 18px;
}

.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin: 20px 0 30px;
}

.pagination-status {
    color: #555555;
    font-size: 14px;
}

.section-heading-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin: 30px 0 14px;
}

.section-heading-row h2 {
    margin-bottom: 0;
}

.section-heading-row p {
    margin: 0;
    color: #555555;
}

.user-edit-panel {
    display: none;
    margin-bottom: 28px;
}

.user-edit-panel.user-edit-panel-active {
    display: block;
}

.user-edit-panel h2 {
    margin-bottom: 12px;
}

#userEditName {
    color: #1d4ed8;
}

/* =====================================================
   BUTTONS
===================================================== */

.actions {
    margin-bottom: 30px;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background: #1d4ed8;
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    border: 1px solid #1d4ed8;
    cursor: pointer;
    margin-right: 10px;
}

.btn:hover {
    background: #1e40af;
    border-color: #1e40af;
}

.btn-danger {
    background: #7f1d1d;
    border-color: #7f1d1d;
}

.btn-danger:hover {
    background: #991b1b;
    border-color: #991b1b;
}

.table-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    align-items: center;
}

.table-action-form,
.inline-action-form {
    display: inline-flex;
    margin: 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

.table-action-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 7px 12px;
    background: #1d4ed8;
    color: #ffffff;
    border: 1px solid #1d4ed8;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.2;
    white-space: nowrap;
}

.table-action-link:hover {
    background: #1e40af;
    border-color: #1e40af;
    text-decoration: none;
}

.table-action-danger {
    background: #7f1d1d;
    border-color: #7f1d1d;
}

.table-action-danger:hover {
    background: #991b1b;
    border-color: #991b1b;
}

.users-table {
    min-width: 920px;
    table-layout: fixed;
}

.users-table th,
.users-table td {
    white-space: nowrap;
    word-break: normal;
    vertical-align: middle;
}

.users-table th {
    font-size: 15px;
}

.users-table .table-actions {
    justify-content: flex-start;
}

.users-col-username {
    width: 15%;
}

.users-col-email {
    width: 25%;
}

.users-col-role,
.users-col-status {
    width: 12%;
}

.users-col-created {
    width: 14%;
}

.users-col-action {
    width: 22%;
}

.user-role-pill,
.user-status-pill {
    display: inline-flex;
    justify-content: center;
    min-width: 86px;
    padding: 6px 10px;
    border-radius: 5px;
    font-weight: bold;
}

.user-role-admin {
    background: #fef3c7;
    color: #92400e;
}

.user-role-editor {
    background: #dbeafe;
    color: #1e40af;
}

.user-role-viewer {
    background: #e5e7eb;
    color: #374151;
}

.user-status-active {
    background: #dcfce7;
    color: #166534;
}

.user-status-inactive {
    background: #fee2e2;
    color: #991b1b;
}

.animals-table td:last-child > a,
.race-report-table td:last-child > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    margin: 2px 4px 2px 0;
    padding: 7px 12px;
    background: #1d4ed8;
    color: #ffffff;
    border: 1px solid #1d4ed8;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    line-height: 1.2;
    white-space: nowrap;
}

.animals-table td:last-child > a:hover,
.race-report-table td:last-child > a:hover {
    background: #1e40af;
    border-color: #1e40af;
    text-decoration: none;
}

.animals-table td:last-child > a[href*="delete"],
.race-report-table td:last-child > a[href*="delete"] {
    background: #7f1d1d;
    border-color: #7f1d1d;
}

.animals-table td:last-child > a[href*="delete"]:hover,
.race-report-table td:last-child > a[href*="delete"]:hover {
    background: #991b1b;
    border-color: #991b1b;
}

/* =====================================================
   FORMS
===================================================== */

form {
    background: #ffffff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

form.table-action-form,
form.inline-action-form {
    display: inline-flex;
    margin: 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #cccccc;
    border-radius: 4px;
    font-size: 16px;
}

/* =====================================================
   TABLES
===================================================== */

table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    margin-bottom: 30px;
}

table th,
table td {
    padding: 12px;
    border: 1px solid #dddddd;
    text-align: left;
}

table th {
    background: #eeeeee;
}

/* =====================================================
   DETAILS TABLE
===================================================== */

.details-table {
    margin-bottom: 30px;
}

/* =====================================================
   PEDIGREE TABLE
===================================================== */

.pedigree-table td {
    vertical-align: middle;
    text-align: center;
    height: 80px;
}

/* =====================================================
   FOOTER
===================================================== */

.site-footer {
    background: #222222;
    color: #ffffff;
    text-align: center;
    padding: 20px 0;
    margin-top: 40px;
}

/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 768px) {

    .site-header .container {
        flex-direction: column;
        gap: 20px;
    }

    .navigation ul {
        flex-direction: column;
        text-align: center;
    }

    .dashboard-cards {
        flex-direction: column;
    }

    .dashboard-stat-grid,
    .dashboard-main-grid,
    .dashboard-pigeon-grid,
    .race-list-summary-grid,
    .race-list-filter-form,
    .pigeon-search-form,
    .pigeon-search-card-grid,
    .report-filter-form,
    .report-summary-compact-grid {
        grid-template-columns: 1fr;
    }

    .report-summary-compact-card {
        grid-template-columns: 1fr;
    }

    .report-summary-compact-actions {
        flex-wrap: wrap;
    }

    .dashboard-wide-panel {
        grid-row: auto;
    }

    .pigeon-search-card {
        grid-template-columns: 76px minmax(0, 1fr);
    }

    .pigeon-search-card .table-actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    .pigeon-search-card-actions {
        flex-wrap: wrap;
    }

    .race-list-filter-form .form-actions,
    .pigeon-search-form .form-actions,
    .report-filter-form .form-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    table {
        display: block;
        overflow-x: auto;
    }

}
/* =====================================================
   PRINT PEDIGREE CERTIFICATE
===================================================== */

.print-button {
    margin-bottom: 20px;
}

/* =====================================================
   PEDIGREE CERTIFICATE
===================================================== */

.certificate {
    background: #ffffff;
    border: 5px solid #000000;
    padding: 30px;
    margin-top: 20px;
}

.certificate .title {
    text-align: center;
    margin-bottom: 30px;
}

.certificate .title h1 {
    font-size: 42px;
    letter-spacing: 3px;
}

/* =====================================================
   ANIMAL INFO TABLE
===================================================== */

.animal-info {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 40px;
}

.animal-info th,
.animal-info td {
    border: 1px solid #000000;
    padding: 10px;
    text-align: left;
}

.animal-info th {
    width: 250px;
    background: #f0f0f0;
}

/* =====================================================
   PEDIGREE TABLE
===================================================== */

.pedigree-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 50px;
}

.pedigree-table td {
    border: 1px solid #000000;
    padding: 10px;
    vertical-align: middle;
    text-align: center;
    height: 80px;
}

/* =====================================================
   SIGNATURE AREA
===================================================== */

.signature-area {
    margin-top: 60px;
}

.signature-line {
    width: 300px;
    border-top: 1px solid #000000;
    padding-top: 10px;
    text-align: center;
}

/* =====================================================
   PRINT SETTINGS
===================================================== */

@media print {

    @page {
        size: landscape;
        margin: 15mm;
    }

    body {
        background: #ffffff;
    }

    .site-header,
    .site-footer,
    .navigation,
    .print-button,
    .btn,
    .actions {
        display: none !important;
    }

    .container {
        width: 100%;
        max-width: 100%;
    }

    .certificate {
        border: 3px solid #000000;
        margin: 0;
        padding: 20px;
    }

}
/* =====================================================
   RESPONSIVE FOUNDATION
   BREAKPOINTS + LAYOUT SAFETY
===================================================== */

/* =====================================================
   GLOBAL RESPONSIVE SAFETY
===================================================== */

* {
    box-sizing: border-box;
}

html {
    width: 100%;
    overflow-x: hidden;
}

body {
    width: 100%;
    overflow-x: hidden;
}

/* =====================================================
   IMAGES + MEDIA
===================================================== */

img,
video,
iframe {
    max-width: 100%;
    height: auto;
}

/* =====================================================
   CONTAINER SAFETY
===================================================== */

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 15px;
    padding-right: 15px;
}

/* =====================================================
   TABLE RESPONSIVE SAFETY
===================================================== */

table {
    width: 100%;
    border-collapse: collapse;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* =====================================================
   FORM RESPONSIVE SAFETY
===================================================== */

input,
select,
textarea,
button {
    max-width: 100%;
}

textarea {
    resize: vertical;
}

/* =====================================================
   BUTTON RESPONSIVE SAFETY
===================================================== */

.btn {
    display: inline-block;
    text-align: center;
    white-space: normal;
}

/* =====================================================
   ACTION AREA SAFETY
===================================================== */

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

/* =====================================================
   MOBILE DEVICES
===================================================== */

@media screen and (max-width: 768px) {

    /* ============================================= */
    /* TYPOGRAPHY
    /* ============================================= */

    body {
        font-size: 14px;
    }

    h1 {
        font-size: 24px;
    }

    h2 {
        font-size: 20px;
    }

    h3 {
        font-size: 18px;
    }

    /* ============================================= */
    /* CONTAINERS
    /* ============================================= */

    .container {
        padding-left: 10px;
        padding-right: 10px;
    }

    /* ============================================= */
    /* TABLES
    /* ============================================= */

    table {
        font-size: 13px;
    }

    th,
    td {
        padding: 8px;
    }

    /* ============================================= */
    /* FORMS
    /* ============================================= */

    input,
    select,
    textarea {
        width: 100%;
        font-size: 16px;
    }

    /* ============================================= */
    /* BUTTONS
    /* ============================================= */

    .btn {
        width: 100%;
    }

    .actions {
        flex-direction: column;
    }

}

/* =====================================================
   TABLET DEVICES
===================================================== */

@media screen and (min-width: 769px)
and (max-width: 1024px) {

    /* ============================================= */
    /* CONTAINERS
    /* ============================================= */

    .container {
        max-width: 95%;
    }

    /* ============================================= */
    /* TYPOGRAPHY
    /* ============================================= */

    body {
        font-size: 15px;
    }

    h1 {
        font-size: 30px;
    }

    h2 {
        font-size: 26px;
    }

    /* ============================================= */
    /* TABLES
    /* ============================================= */

    table {
        font-size: 14px;
    }

    /* ============================================= */
    /* BUTTONS
    /* ============================================= */

    .actions {
        flex-wrap: wrap;
    }

}
/* =====================================================
   RESPONSIVE COMPONENTS
   NAVIGATION + TABLES + FORMS + BUTTONS
===================================================== */

/* =====================================================
   NAVIGATION
===================================================== */

.navigation,
.navbar,
nav {
    width: 100%;
}

.navigation ul,
.navbar ul,
nav ul {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.navigation li,
.navbar li,
nav li {
    margin: 0;
}

.navigation a,
.navbar a,
nav a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
}

/* =====================================================
   TABLES
===================================================== */

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    vertical-align: top;
    word-break: break-word;
}

.table-wrapper,
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* =====================================================
   DETAIL TABLES
===================================================== */

.details-table th {
    width: 220px;
}

/* =====================================================
   FORMS
===================================================== */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

input,
select,
textarea {
    width: 100%;
    padding: 10px;
    font-size: 15px;
}

textarea {
    min-height: 120px;
}

.form-help {
    margin: 6px 0 0;
    color: #666666;
    font-size: 14px;
}

.checkbox-row {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    margin: 10px 0 14px;
    font-weight: 600;
}

.checkbox-row input {
    width: auto;
}

.animal-photo-current,
.animal-photo-panel,
.animal-photo-placeholder {
    max-width: 260px;
    margin: 0 0 16px;
}

.animal-photo-current img,
.animal-photo-panel img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border: 1px solid #d7d7d7;
    border-radius: 6px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.animal-photo-placeholder {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 8px;
    width: 100%;
    aspect-ratio: 4 / 3;
    color: #6b7280;
    padding: 16px;
    text-align: center;
    border: 1px dashed #b8b8b8;
    border-radius: 6px;
    background: #f7f7f7;
}

.animal-photo-placeholder strong,
.animal-photo-placeholder span {
    display: block;
}

.animal-photo-placeholder strong {
    color: #333333;
    font-size: 17px;
}

.animal-photo-placeholder span {
    max-width: 210px;
    font-size: 13px;
    line-height: 1.35;
}

.photo-upload-button {
    margin-top: 10px;
}

.animal-details-with-photo {
    display: grid;
    grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.animal-details .details-table {
    min-width: 0;
}

.animal-profile {
    display: grid;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.animal-profile-side,
.animal-profile-section {
    background: #ffffff;
    border: 1px solid #dddddd;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.animal-profile-side {
    padding: 18px;
}

.animal-profile-side .animal-photo-panel,
.animal-profile-side .animal-photo-placeholder {
    max-width: none;
    margin-bottom: 16px;
}

.animal-profile-main {
    display: grid;
    gap: 18px;
}

.animal-identity span,
.animal-fact span,
.animal-parent span {
    display: block;
    color: #666666;
    font-size: 13px;
    font-weight: 700;
}

.animal-identity strong {
    display: block;
    margin-top: 4px;
    color: #111827;
    font-size: 24px;
    line-height: 1.15;
}

.animal-identity em {
    display: inline-block;
    margin-top: 10px;
    padding: 5px 10px;
    background: #e9f1ff;
    color: #1d4ed8;
    border-radius: 4px;
    font-size: 14px;
    font-style: normal;
    font-weight: 700;
}

.animal-profile-section {
    padding: 18px;
}

.animal-profile-section h2 {
    margin: 0 0 14px;
    font-size: 22px;
}

.animal-fact-grid,
.animal-parent-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.animal-fact,
.animal-parent {
    padding: 12px;
    background: #f8f8f8;
    border: 1px solid #e2e2e2;
    border-radius: 5px;
}

.animal-fact strong,
.animal-parent strong {
    display: block;
    margin-top: 5px;
    color: #222222;
    font-size: 16px;
    line-height: 1.3;
}

.animal-notes-box {
    min-height: 70px;
    padding: 12px;
    background: #f8f8f8;
    border: 1px solid #e2e2e2;
    border-radius: 5px;
    line-height: 1.45;
}

.animal-notes-box span {
    color: #666666;
}

.animal-edit-form {
    margin-bottom: 28px;
}

.animal-edit-profile {
    display: grid;
    grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.animal-edit-identity {
    margin-bottom: 18px;
}

.animal-edit-identity em {
    max-width: 100%;
    word-break: break-word;
}

.animal-photo-edit-group {
    margin-bottom: 0;
}

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

.animal-edit-grid .form-group {
    margin-bottom: 0;
}

.animal-edit-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 30px;
}

.settings-logo-field {
    max-width: 320px;
}

.settings-logo-preview {
    max-width: 220px;
}

.settings-logo-preview img {
    object-fit: contain;
    background: #ffffff;
}

.animal-edit-grid-wide {
    grid-column: 1 / -1;
}

.race-entry-side-note {
    padding: 12px;
    background: #f8f8f8;
    border: 1px solid #e2e2e2;
    border-radius: 5px;
}

.race-entry-side-note + .race-entry-side-note {
    margin-top: 12px;
}

.race-entry-side-note strong,
.race-entry-side-note span {
    display: block;
}

.race-entry-side-note strong {
    color: #111827;
    font-size: 14px;
}

.race-entry-side-note span {
    margin-top: 5px;
    color: #666666;
    font-size: 13px;
    line-height: 1.35;
}

/* =====================================================
   BUTTONS
===================================================== */

.btn {
    padding: 10px 16px;
    text-decoration: none;
    cursor: pointer;
}

.actions {
    margin-top: 20px;
}

/* =====================================================
   MOBILE COMPONENTS
===================================================== */

@media screen and (max-width: 768px) {

    /* ============================================= */
    /* NAVIGATION
    /* ============================================= */

    .navigation ul,
    .navbar ul,
    nav ul {
        flex-direction: column;
        gap: 5px;
    }

    .navigation a,
    .navbar a,
    nav a {
        width: 100%;
        padding: 12px;
    }

    /* ============================================= */
    /* TABLES
    /* ============================================= */

    table {
        font-size: 13px;
    }

    th,
    td {
        padding: 8px;
    }

    .details-table,
    .details-table tbody,
    .details-table tr,
    .details-table th,
    .details-table td {
        display: block;
        width: 100%;
    }

    .details-table {
        background: transparent;
        border-collapse: separate;
        border-spacing: 0;
    }

    .details-table tr {
        display: grid;
        grid-template-columns: minmax(118px, 42%) minmax(0, 1fr);
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: 1px solid #dddddd;
        background: #ffffff;
    }

    .details-table th,
    .details-table td {
        min-width: 0;
        padding: 10px;
        border: 0;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .details-table th {
        background: #eeeeee;
    }

    /* ============================================= */
    /* FORMS
    /* ============================================= */

    .form-group {
        margin-bottom: 18px;
    }

    input,
    select,
    textarea {
        font-size: 16px;
        padding: 12px;
    }

    .form-actions {
        flex-direction: column;
        gap: 12px;
    }

    .form-actions .btn {
        width: 100%;
        margin-right: 0;
    }

    /* ============================================= */
    /* BUTTONS
    /* ============================================= */

    .actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .btn {
        width: 100%;
    }

}

/* =====================================================
   TABLET COMPONENTS
===================================================== */

@media screen and (min-width: 769px)
and (max-width: 1024px) {

    /* ============================================= */
    /* NAVIGATION
    /* ============================================= */

    .navigation ul,
    .navbar ul,
    nav ul {
        gap: 8px;
    }

    .navigation a,
    .navbar a,
    nav a {
        padding: 10px 12px;
    }

    /* ============================================= */
    /* TABLES
    /* ============================================= */

    table {
        font-size: 14px;
    }

    th,
    td {
        padding: 10px;
    }

    /* ============================================= */
    /* FORMS
    /* ============================================= */

    input,
    select,
    textarea {
        font-size: 15px;
    }

    /* ============================================= */
    /* BUTTONS
    /* ============================================= */

    .actions {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
    }

}
/* =====================================================
   PEDIGREE RESPONSIVE SYSTEM
===================================================== */

/* =====================================================
   PEDIGREE CONTAINER
===================================================== */

.pedigree-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 20px;
}

/* =====================================================
   PEDIGREE TABLE
===================================================== */

.pedigree-table {
    width: 100%;
    min-width: 900px;
    border-collapse: collapse;
}

.pedigree-table td {
    vertical-align: middle;
    text-align: center;
    word-break: break-word;
}

/* =====================================================
   PEDIGREE BOXES
===================================================== */

.pedigree-box {
    padding: 10px;
    border: 1px solid #000000;
    background: #ffffff;
    min-height: 60px;
}

/* =====================================================
   PEDIGREE TEXT
===================================================== */

.pedigree-name {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
}

.pedigree-reference {
    display: block;
    font-size: 13px;
}

.pedigree-dates {
    display: block;
    font-size: 12px;
    margin-top: 4px;
}

/* =====================================================
   MOBILE PEDIGREE
===================================================== */

@media screen and (max-width: 768px) {

    /* ============================================= */
    /* PEDIGREE SCROLLING
    /* ============================================= */

    .pedigree-container {
        overflow-x: auto;
    }

    .pedigree-table {
        min-width: 1000px;
        font-size: 12px;
    }

    .pedigree-table td {
        padding: 4px;
    }

    .pedigree-dynamic-wrapper {
        padding: 12px;
    }

    .pedigree-card {
        width: 210px;
        padding: 10px;
    }

    .pedigree-parent .pedigree-parent .pedigree-card,
    .pedigree-parent .pedigree-parent .pedigree-parent .pedigree-card,
    .pedigree-parent .pedigree-parent .pedigree-parent .pedigree-parent .pedigree-card {
        width: 190px;
    }

    .pedigree-parents {
        gap: 12px;
        margin-left: 16px;
    }

    /* ============================================= */
    /* PEDIGREE BOXES
    /* ============================================= */

    .pedigree-box {
        padding: 6px;
        min-height: 50px;
    }

    /* ============================================= */
    /* PEDIGREE TEXT
    /* ============================================= */

    .pedigree-name {
        font-size: 12px;
    }

    .pedigree-reference,
    .pedigree-dates {
        font-size: 11px;
    }

}

/* =====================================================
   TABLET PEDIGREE
===================================================== */

@media screen and (min-width: 769px)
and (max-width: 1024px) {

    .pedigree-table {
        min-width: 850px;
    }

    .pedigree-box {
        padding: 8px;
    }

    .pedigree-name {
        font-size: 14px;
    }

    .pedigree-reference,
    .pedigree-dates {
        font-size: 12px;
    }

}
/* ========================================= */
/* DYNAMIC PEDIGREE TREE */
/* ========================================= */

.pedigree-dynamic-wrapper {

    overflow-x: auto;
    padding: 20px;
    -webkit-overflow-scrolling: touch;

}

.pedigree-node {

    margin-bottom: 20px;
    width: max-content;

}

.pedigree-card {

    background: #ffffff;

    border: 1px solid #d7d7d7;

    border-radius: 10px;

    padding: 12px;

    margin-bottom: 10px;

    box-shadow: 0 2px 6px rgba(0,0,0,0.08);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;

    width: 240px;

}

.pedigree-parent .pedigree-parent .pedigree-card {
    width: 220px;
}

.pedigree-parent .pedigree-parent .pedigree-parent .pedigree-card {
    width: 205px;
}

.pedigree-parent .pedigree-parent .pedigree-parent .pedigree-parent .pedigree-card {
    width: 190px;
}

.pedigree-reference {

    font-weight: bold;
    font-size: 14px;

    margin-bottom: 5px;

}

.pedigree-name {

    font-size: 18px;
    font-weight: bold;

    margin-bottom: 5px;

}

.pedigree-breed,
.pedigree-dob {

    font-size: 14px;
    color: #555555;

}

.pedigree-parents {

   display: flex;

    gap: 18px;

    margin-left: 28px;

    margin-top: 6px;

    align-items: flex-start;

    flex-wrap: nowrap;

}

.pedigree-parent {

 position: relative;

    padding-left: 16px;

    border-left: 2px solid #d0d0d0;

}

.pedigree-node.empty {

    background: #f5f5f5;

    border: 1px dashed #cccccc;

    border-radius: 8px;

    padding: 10px;

    color: #777777;

    max-width: 220px;

}

/* ========================================= */
/* ROOT NODE */
/* ========================================= */

.pedigree-dynamic-wrapper > .pedigree-node > .pedigree-card-link .pedigree-card {

    border: 2px solid #444444;

    background: #fafafa;

}
/* ========================================= */
/* PEDIGREE ACTIONS */
/* ========================================= */

.pedigree-actions {

    display: flex;

    gap: 8px;

    margin-top: 12px;

    flex-wrap: wrap;

}

/* ========================================= */
/* PEDIGREE ACTION LINKS */
/* ========================================= */

.pedigree-action-link {

    display: inline-block;

    padding: 6px 10px;

    background: #f3f3f3;

    border: 1px solid #cccccc;

    border-radius: 6px;

    font-size: 13px;

    text-decoration: none;

    color: #333333;

    transition:
        background 0.2s ease,
        border-color 0.2s ease;

}

/* ========================================= */
/* ACTION HOVER */
/* ========================================= */

.pedigree-action-link:hover {

    background: #e8e8e8;

    border-color: #999999;

}

.pedigree-external-label {
    display: inline-block;
    margin-top: 10px;
    padding: 5px 8px;
    background: #fff4d8;
    border: 1px solid #e2c474;
    border-radius: 6px;
    color: #6f4d00;
    font-size: 12px;
    font-weight: 700;
}

/* =====================================================
   SIMPLE HORIZONTAL PEDIGREE LIST
===================================================== */

.pedigree-list-wrapper {
    display: grid;
    grid-template-columns:
        minmax(220px, 0.85fr)
        minmax(240px, 1fr)
        minmax(280px, 1.2fr)
        minmax(320px, 1.4fr)
        minmax(360px, 1.6fr);
    gap: 12px;
    width: 100%;
    overflow-x: auto;
    padding: 16px 0 24px;
    -webkit-overflow-scrolling: touch;
}

.pedigree-list-generation {
    min-width: 0;
}

.pedigree-list-generation h2 {
    margin: 0 0 8px;
    padding: 10px 12px;
    background: #222222;
    color: #ffffff;
    border-radius: 6px 6px 0 0;
    font-size: 16px;
    line-height: 1.2;
}

.pedigree-list-column {
    display: grid;
    gap: 8px;
}

.pedigree-list-box {
    min-height: 74px;
    padding: 10px 12px;
    background: #ffffff;
    border: 1px solid #d8d8d8;
    border-left: 4px solid #1f5bd8;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    overflow-wrap: anywhere;
}

.pedigree-list-box a {
    color: inherit;
    text-decoration: none;
}

.pedigree-list-box strong,
.pedigree-list-box span,
.pedigree-list-box em {
    display: block;
}

.pedigree-list-box strong {
    color: #222222;
    font-size: 14px;
    line-height: 1.3;
}

.pedigree-list-box span,
.pedigree-list-box em {
    margin-top: 4px;
    color: #555555;
    font-size: 12px;
    line-height: 1.25;
}

.pedigree-list-box em {
    display: inline-block;
    padding: 3px 6px;
    background: #fff4d8;
    border: 1px solid #e2c474;
    border-radius: 4px;
    color: #6f4d00;
    font-style: normal;
    font-weight: 700;
}

.pedigree-list-external {
    border-left-color: #d99b2b;
}

.pedigree-list-empty {
    display: flex;
    align-items: center;
    color: #777777;
    background: #f7f7f7;
    border-style: dashed;
    border-left-color: #bbbbbb;
    box-shadow: none;
}

.pedigree-list-generation:nth-child(1) .pedigree-list-box {
    border-left-color: #137a4b;
}

/* =====================================================
   STANDARD PEDIGREE CHART
===================================================== */

.pedigree-standard-wrapper {
    display: grid;
    grid-template-columns: repeat(5, 180px);
    gap: 8px;
    width: 100%;
    overflow-x: auto;
    padding: 16px 0 26px;
    -webkit-overflow-scrolling: touch;
}

.pedigree-standard-generation {
    min-width: 0;
}

.pedigree-standard-generation h2 {
    margin: 0 0 10px;
    padding: 8px 9px;
    background: #222222;
    color: #ffffff;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.2;
}

.pedigree-standard-column {
    display: grid;
    grid-template-rows: repeat(16, 42px);
    gap: 0;
    min-height: 672px;
}

.pedigree-standard-slot {
    display: flex;
    align-items: center;
    position: relative;
}

.pedigree-standard-slot::before {
    content: "";
    position: absolute;
    left: -8px;
    width: 8px;
    border-top: 1px solid #c9c9c9;
}

.pedigree-standard-generation:first-child .pedigree-standard-slot::before {
    display: none;
}

.pedigree-standard-wrapper .pedigree-list-box {
    width: 100%;
    min-height: 0;
    padding: 6px 7px;
    background: transparent;
    border: 0;
    border-left: 3px solid #666666;
    border-radius: 0;
    box-shadow: none;
}

.pedigree-standard-wrapper .pedigree-list-box strong {
    font-size: 12px;
    line-height: 1.2;
}

.pedigree-standard-wrapper .pedigree-list-box span,
.pedigree-standard-wrapper .pedigree-list-box em {
    font-size: 10px;
    line-height: 1.15;
}

.pedigree-standard-wrapper .pedigree-list-empty {
    background: transparent;
    border: 0;
    border-left: 3px dotted #bbbbbb;
    color: #777777;
}

.pedigree-standard-wrapper .pedigree-list-external {
    border-left-color: #d99b2b;
}

.pedigree-standard-wrapper .pedigree-list-box em {
    padding: 0;
    background: transparent;
    border: 0;
    color: #8a5b00;
}

.pedigree-standard-generation:first-child .pedigree-list-box {
    border-left-color: #137a4b;
}

.pedigree-selected-summary {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    margin: 0 0 18px;
    padding: 14px;
    background: #ffffff;
    border: 1px solid #dddddd;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.pedigree-selected-summary.no-photo {
    display: block;
}

.pedigree-selected-summary-photo img {
    display: block;
    width: 96px;
    height: 72px;
    object-fit: cover;
    border: 1px solid #d0d0d0;
    border-radius: 5px;
    background: #ffffff;
}

.pedigree-selected-summary-details span,
.pedigree-selected-summary-details strong,
.pedigree-selected-summary-details em {
    display: block;
}

.pedigree-selected-summary-details span {
    color: #666666;
    font-size: 13px;
    font-weight: 700;
}

.pedigree-selected-summary-details strong {
    margin-top: 4px;
    color: #111827;
    font-size: 20px;
    line-height: 1.2;
}

.pedigree-selected-summary-details em {
    margin-top: 5px;
    color: #555555;
    font-size: 14px;
    font-style: normal;
}

/* =====================================================
   EXTERNAL PEDIGREE EDITOR
===================================================== */

.external-pedigree-editor {
    margin: 28px 0;
    padding: 18px;
    background: #ffffff;
    border: 1px solid #dddddd;
    border-radius: 6px;
}

.external-pedigree-editor h2 {
    margin: 0 0 6px;
    font-size: 24px;
}

.external-pedigree-editor p {
    margin: 0 0 18px;
    color: #555555;
}

.external-pedigree-group {
    margin-top: 20px;
}

.external-pedigree-group h3 {
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #dddddd;
    font-size: 18px;
}

.external-pedigree-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.external-pedigree-grid input[list] {
    background-image: linear-gradient(45deg, transparent 50%, #555555 50%),
        linear-gradient(135deg, #555555 50%, transparent 50%);
    background-position:
        calc(100% - 16px) 50%,
        calc(100% - 11px) 50%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    padding-right: 30px;
}

/* =====================================================
   SETTINGS
===================================================== */

.settings-form {
    display: grid;
    gap: 22px;
}

.settings-panel {
    padding: 18px;
    background: #ffffff;
    border: 1px solid #dddddd;
    border-radius: 6px;
}

.settings-panel h2 {
    margin: 0 0 16px;
    font-size: 24px;
}

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

.settings-notes-field {
    grid-column: 1 / -1;
}

.storage-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.storage-summary-card {
    padding: 14px;
    background: #f8f8f8;
    border: 1px solid #dddddd;
    border-radius: 6px;
}

.storage-summary-card span,
.storage-summary-card strong,
.storage-summary-card em {
    display: block;
}

.storage-summary-card span {
    margin-bottom: 6px;
    color: #555555;
    font-size: 13px;
    font-weight: 700;
}

.storage-summary-card strong {
    color: #222222;
    font-size: 22px;
    line-height: 1.2;
}

.storage-summary-card em {
    margin-top: 6px;
    color: #666666;
    font-size: 13px;
    font-style: normal;
}

.storage-usage-box {
    padding: 14px;
    margin: 4px 0 18px;
    background: #ffffff;
    border: 1px solid #dddddd;
    border-radius: 6px;
}

.storage-usage-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.storage-usage-header strong {
    color: #222222;
    font-size: 18px;
}

.storage-usage-header span {
    color: #2354d8;
    font-size: 18px;
    font-weight: 700;
}

.storage-usage-bar {
    height: 12px;
    margin-bottom: 10px;
    overflow: hidden;
    background: #e5e5e5;
    border-radius: 999px;
}

.storage-usage-bar span {
    display: block;
    height: 100%;
    background: #2354d8;
}

.storage-usage-box p {
    margin: 0;
    color: #555555;
    font-size: 14px;
}

@media screen and (max-width: 760px) {

    .settings-grid {
        grid-template-columns: 1fr;
    }

    .storage-summary-grid {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 1000px) {

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

@media screen and (max-width: 640px) {

    .external-pedigree-editor {
        padding: 14px;
    }

    .external-pedigree-grid {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 900px) {

    .pedigree-list-wrapper {
        grid-template-columns:
            220px
            240px
            280px
            320px
            360px;
        padding-bottom: 18px;
    }

    .pedigree-list-generation h2 {
        font-size: 14px;
    }

    .pedigree-list-box {
        min-height: 68px;
        padding: 9px 10px;
    }

    .pedigree-standard-wrapper {
        grid-template-columns: repeat(5, 180px);
    }

    .pedigree-standard-column {
        grid-template-rows: repeat(16, 38px);
        min-height: 608px;
    }
}
/* =====================================================
   RACE REPORT TABLE
===================================================== */

.race-report-table {

    font-size: 12px;

}

.race-report-table th,
.race-report-table td {

    padding: 6px 8px;

    white-space: nowrap;

}

.race-report-table th {

    font-size: 14px;

}

.race-report-table td {

    font-size: 14px;

}
/* =====================================================
   MOBILE / TABLET MENU
===================================================== */

.menu-toggle {

    display: none;

}

/* =====================================================
   TABLET + PHONE
===================================================== */

@media screen and (max-width: 1024px) {

    .menu-toggle {

        display: inline-block;

        padding: 10px 15px;

        background: #222222;

        color: #ffffff;

        border: none;

        border-radius: 4px;

        cursor: pointer;

    }

    .navigation {

        display: none;

        width: 100%;

        margin-top: 15px;

    }

    .navigation.navigation-open {

        display: block;

    }

    .navigation ul {

        flex-direction: column;

        gap: 0;

    }

    .navigation ul li {

        width: 100%;

    }

    .navigation ul li a {

        display: block;

        padding: 12px;

        border-top: 1px solid #444444;

    }

}
/* =====================================================
   LOGIN PAGE
===================================================== */

.login-page-container {

    min-height: 100vh;

    display: flex;

    justify-content: center;

    align-items: center;
	
	background: #000000;

}

.login-box {

    width: 100%;

    max-width: 400px;

    background: #ffffff;

    padding: 30px;

    border-radius: 8px;

    box-shadow: 0 4px 20px rgba(0,0,0,0.25);

}

.login-box h1 {

    text-align: center;

    margin-bottom: 10px;

}

.login-subtitle {

    text-align: center;

    margin-bottom: 25px;

    color: #666666;

}

/* =====================================================
   RACE REPORT TABLE - NOTES MOBILE / TABLET
===================================================== */
/* =====================================================
   NOTES TABLE - MOBILE / TABLET
===================================================== */
@media screen and (max-width: 1024px) {

    .race-report-table.notes-table {
        display: block;
        width: 100%;
        overflow-x: auto; /* horizontal scroll */
    }

    .race-report-table.notes-table th,
    .race-report-table.notes-table td {
        white-space: nowrap;
        padding: 6px 8px;
        font-size: 14px;
        text-align: left; /* th will override to center */
    }

    .race-report-table.notes-table th {
        text-align: center;
    }
}

/* =====================================================
   SMALL SCREEN TABLE SLIDER
   Keeps wide data tables usable on phones.
===================================================== */
@media screen and (max-width: 768px) {

    .content > table,
    .table,
    .animals-table,
    .race-report-table {
        display: block;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .users-table {
        min-width: 1040px;
    }

    .content > table th,
    .content > table td,
    .table th,
    .table td,
    .animals-table th,
    .animals-table td,
    .race-report-table th,
    .race-report-table td {
        white-space: nowrap;
    }

    .content > table .btn,
    .table .btn,
    .animals-table .btn,
    .race-report-table .btn {
        width: auto;
        min-width: 88px;
        margin-right: 0;
        padding: 8px 12px;
        white-space: nowrap;
        text-align: center;
    }
}

/* =====================================================
   RACE VIEW RESPONSIVE LAYOUT
===================================================== */

.race-details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.race-details-table {
    margin-bottom: 0;
    table-layout: fixed;
}

.race-details-table th {
    width: 42%;
}

.race-view-table-slider {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media screen and (max-width: 768px) {

    .race-details-grid {
        display: block;
        margin-bottom: 24px;
    }

    .race-details-table {
        margin-bottom: 0;
    }

    .race-details-table + .race-details-table {
        margin-top: 0;
    }

    .recent-animals {
        margin-top: 22px;
    }

    .race-view-table-slider .animals-table {
        display: table;
        min-width: 520px;
        margin-bottom: 18px;
    }

    .race-view-table-slider .animals-table th,
    .race-view-table-slider .animals-table td {
        white-space: nowrap;
    }

    .race-view-table-slider .animals-table th:nth-child(2),
    .race-view-table-slider .animals-table td:nth-child(2),
    .race-view-table-slider .animals-table th:nth-child(4),
    .race-view-table-slider .animals-table td:nth-child(4) {
        white-space: normal;
        min-width: 110px;
    }
}

@media screen and (max-width: 420px) {

    .details-table tr,
    .race-details-table tr {
        grid-template-columns: minmax(104px, 40%) minmax(0, 1fr);
    }

    .details-table th,
    .details-table td,
    .race-details-table th,
    .race-details-table td {
        padding: 9px 8px;
        font-size: 13px;
    }
}

/* =====================================================
   NOTES MODAL
===================================================== */

.notes-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1000;
}

.notes-modal.notes-modal-open {
    display: block;
}

.notes-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
}

.notes-modal-dialog {
    position: relative;
    width: min(92vw, 520px);
    max-height: 80vh;
    margin: 10vh auto 0;
    background: #ffffff;
    border-radius: 6px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
    overflow: hidden;
}

.notes-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: #eeeeee;
    border-bottom: 1px solid #dddddd;
}

.notes-modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.notes-modal-close {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 4px;
    background: #222222;
    color: #ffffff;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
}

.notes-modal-body {
    max-height: calc(80vh - 65px);
    padding: 16px;
    overflow-y: auto;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

@media screen and (max-width: 768px) {

    .notes-modal-dialog {
        width: calc(100vw - 28px);
        max-height: 86vh;
        margin-top: 7vh;
    }

    .notes-modal-body {
        max-height: calc(86vh - 65px);
    }
}

/* =====================================================
   PUBLIC MARKETING FRONT END
===================================================== */

.marketing-page {
    margin: 0;
    background: #f4f7f6;
    color: #172033;
}

.marketing-page * {
    box-sizing: border-box;
}

.marketing-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 72px;
    padding: 14px clamp(18px, 4vw, 58px);
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid #dfe6e2;
}

.marketing-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #172033;
    font-size: 20px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.marketing-brand-mark {
    display: inline-grid;
    width: 42px;
    height: 42px;
    place-items: center;
    background: #1f5bd8;
    color: #ffffff;
    border-radius: 8px;
    font-size: 15px;
    letter-spacing: 0;
}

.marketing-nav {
    display: flex;
    align-items: center;
    gap: clamp(12px, 2vw, 26px);
}

.marketing-nav a,
.marketing-login-link {
    color: #344054;
    font-weight: 700;
    text-decoration: none;
}

.marketing-nav a:hover,
.marketing-login-link:hover {
    color: #1f5bd8;
}

.marketing-header-cta,
.marketing-primary-button,
.marketing-secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 20px;
    border-radius: 6px;
    font-weight: 800;
    text-decoration: none;
}

.marketing-header-cta,
.marketing-primary-button {
    background: #1f5bd8;
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(31, 91, 216, 0.24);
}

.marketing-secondary-button {
    border: 1px solid #b7c4d7;
    background: #ffffff;
    color: #172033;
}

.marketing-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(330px, 0.92fr);
    gap: clamp(28px, 5vw, 72px);
    min-height: calc(100vh - 72px);
    padding: clamp(44px, 7vw, 98px) clamp(18px, 5vw, 72px) 42px;
    background:
        linear-gradient(120deg, rgba(15, 43, 86, 0.88), rgba(25, 77, 88, 0.74)),
        url("https://images.unsplash.com/photo-1549646379-f8659f76222b?auto=format&fit=crop&w=1800&q=80");
    background-position: center;
    background-size: cover;
    color: #ffffff;
}

.marketing-hero-content {
    align-self: center;
    max-width: 790px;
}

.marketing-kicker {
    margin: 0 0 12px;
    color: #d99b2b;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.marketing-hero h1 {
    max-width: 860px;
    margin: 0;
    color: #ffffff;
    font-size: clamp(42px, 7vw, 78px);
    line-height: 1.02;
    letter-spacing: 0;
}

.marketing-hero-copy {
    max-width: 690px;
    margin: 22px 0 0;
    color: #e6eef3;
    font-size: 21px;
    line-height: 1.58;
}

.marketing-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 30px;
}

.marketing-trust-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.marketing-trust-row span {
    padding: 9px 12px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
}

.marketing-product-panel,
.marketing-history-table,
.marketing-trial-card {
    background: #ffffff;
    border: 1px solid rgba(23, 32, 51, 0.12);
    border-radius: 8px;
    box-shadow: 0 24px 60px rgba(9, 27, 49, 0.24);
}

.marketing-product-panel {
    align-self: center;
    padding: clamp(18px, 3vw, 28px);
    color: #172033;
}

.marketing-panel-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 18px;
    border-bottom: 1px solid #dfe6e2;
}

.marketing-panel-top strong {
    display: block;
    margin-top: 4px;
    font-size: 28px;
}

.marketing-panel-label,
.marketing-stat-grid span,
.marketing-result-preview span {
    display: block;
    color: #667085;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.marketing-status-pill {
    flex: 0 0 auto;
    padding: 8px 10px;
    background: #e9f7ef;
    color: #137a4b;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
}

.marketing-stat-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.marketing-stat-grid div,
.marketing-result-preview {
    padding: 16px;
    background: #f4f7f6;
    border: 1px solid #dfe6e2;
    border-radius: 6px;
}

.marketing-stat-grid strong {
    display: block;
    margin-top: 6px;
    font-size: 26px;
}

.marketing-result-preview {
    display: grid;
    gap: 14px;
    margin-top: 14px;
}

.marketing-section,
.marketing-history-section,
.marketing-trial-section {
    padding: clamp(54px, 8vw, 104px) clamp(18px, 5vw, 72px);
}

.marketing-section-heading {
    max-width: 780px;
    margin: 0 auto 34px;
    text-align: center;
}

.marketing-section-heading h2,
.marketing-history-copy h2,
.marketing-trial-section h2 {
    margin: 0;
    color: #172033;
    font-size: clamp(32px, 4vw, 50px);
    line-height: 1.12;
}

.marketing-section-heading p,
.marketing-history-copy p,
.marketing-trial-section p,
.marketing-benefit-grid p,
.marketing-trial-card p {
    color: #4b5565;
    font-size: 18px;
    line-height: 1.62;
}

.marketing-benefit-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
    width: min(100%, 1180px);
    margin: 0 auto;
}

.marketing-benefit-grid article {
    min-height: 0;
    padding: 24px;
    background: #ffffff;
    border: 1px solid #dfe6e2;
    border-radius: 8px;
}

.marketing-benefit-grid span {
    color: #1f5bd8;
    font-size: 14px;
    font-weight: 900;
}

.marketing-benefit-grid h3,
.marketing-trial-card h3 {
    margin: 16px 0 10px;
    color: #172033;
    font-size: 23px;
}

.marketing-history-section {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
    gap: clamp(28px, 6vw, 70px);
    align-items: center;
    background: #ffffff;
}

.marketing-history-copy {
    max-width: 620px;
}

.marketing-history-copy ul {
    display: grid;
    gap: 10px;
    margin: 24px 0 0;
    padding-left: 22px;
    color: #344054;
    font-size: 18px;
    line-height: 1.45;
}

.marketing-history-table {
    overflow: hidden;
    box-shadow: 0 18px 45px rgba(9, 27, 49, 0.14);
}

.marketing-table-title {
    padding: 18px 20px;
    background: #172033;
    color: #ffffff;
    font-size: 20px;
    font-weight: 900;
}

.marketing-history-row {
    display: grid;
    grid-template-columns: 1.15fr 1fr 0.8fr 0.6fr;
    gap: 10px;
    padding: 16px 20px;
    border-top: 1px solid #dfe6e2;
    color: #344054;
}

.marketing-history-head {
    background: #f1f3f7;
    color: #172033;
    font-weight: 900;
}

.marketing-pedigree-section {
    background: #eef3f1;
}

.mini-pedigree-chart {
    display: grid;
    grid-template-columns:
        minmax(180px, 1.05fr)
        minmax(180px, 1.05fr)
        minmax(190px, 1.1fr)
        minmax(210px, 1.25fr)
        minmax(210px, 1.25fr);
    gap: 10px;
    align-items: stretch;
    max-width: 1280px;
    margin: 0 auto;
    overflow-x: auto;
    padding-bottom: 12px;
}

.mini-pedigree-header {
    padding: 10px 12px;
    background: #202020;
    border-radius: 6px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
}

.mini-pedigree-column {
    display: grid;
    gap: 10px;
    align-content: center;
    min-width: 0;
}

.mini-pedigree-column.parents {
    align-content: space-around;
}

.mini-pedigree-column.grandparents,
.mini-pedigree-column.great-grandparents,
.mini-pedigree-column.fourth-generation {
    align-content: space-between;
}

.mini-pedigree-card {
    min-height: 58px;
    padding: 10px 10px 10px 14px;
    background: transparent;
    border-left: 3px solid #d99b2b;
}

.mini-pedigree-card strong,
.mini-pedigree-card span {
    display: block;
}

.mini-pedigree-card strong {
    color: #172033;
    font-size: 15px;
    line-height: 1.2;
}

.mini-pedigree-card span {
    margin-top: 4px;
    color: #667085;
    font-size: 13px;
    font-weight: 600;
}

.mini-pedigree-parent {
    border-left-color: #1f5bd8;
}

.mini-pedigree-main {
    border-left-color: #137a4b;
}

.mini-pedigree-unknown {
    border-left-style: dotted;
    border-left-color: #b8b8b8;
}

.mini-pedigree-unknown strong,
.mini-pedigree-unknown span {
    color: #666666;
}

.mini-pedigree-compact {
    min-height: 38px;
    padding-top: 6px;
    padding-bottom: 6px;
}

.marketing-trial-section {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
    gap: clamp(22px, 5vw, 60px);
    align-items: center;
    background: #172033;
    color: #ffffff;
}

.marketing-trial-section h2,
.marketing-trial-section p {
    color: #ffffff;
}

.marketing-trial-card {
    padding: clamp(22px, 4vw, 34px);
    box-shadow: none;
}

.marketing-trial-card h3,
.marketing-trial-card p {
    color: #172033;
}

.marketing-trial-card .marketing-primary-button,
.marketing-trial-card .marketing-login-link {
    width: 100%;
}

.marketing-trial-card .marketing-login-link {
    display: block;
    margin-top: 16px;
    text-align: center;
}

.marketing-footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 22px clamp(18px, 5vw, 72px);
    background: #ffffff;
    color: #667085;
    border-top: 1px solid #dfe6e2;
}

.marketing-footer span:first-child {
    color: #172033;
    font-weight: 900;
}

@media screen and (max-width: 1020px) {

    .marketing-hero,
    .marketing-history-section,
    .marketing-trial-section {
        grid-template-columns: 1fr;
    }

    .marketing-product-panel,
    .marketing-history-copy {
        max-width: none;
    }

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

@media screen and (max-width: 760px) {

    .marketing-header {
        position: static;
        flex-wrap: wrap;
        padding: 14px 16px;
    }

    .marketing-brand {
        width: 100%;
    }

    .marketing-nav {
        order: 3;
        width: 100%;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .marketing-nav a {
        flex: 0 0 auto;
        padding: 8px 2px;
    }

    .marketing-header-cta {
        min-height: 42px;
        padding: 0 14px;
    }

    .marketing-hero {
        min-height: auto;
        padding: 36px 16px 30px;
    }

    .marketing-hero h1 {
        font-size: 42px;
    }

    .marketing-hero-copy {
        font-size: 18px;
    }

    .marketing-hero-actions,
    .marketing-primary-button,
    .marketing-secondary-button {
        width: 100%;
    }

    .marketing-stat-grid,
    .marketing-benefit-grid,
    .mini-pedigree-chart {
        grid-template-columns: 1fr;
    }

    .marketing-section,
    .marketing-history-section,
    .marketing-trial-section {
        padding: 46px 16px;
    }

    .marketing-benefit-grid article {
        min-height: 0;
    }

    .marketing-history-table {
        overflow-x: auto;
    }

    .marketing-history-row {
        min-width: 560px;
    }

    .marketing-footer {
        flex-direction: column;
    }
}

@media screen and (max-width: 768px) {

    .animal-details-with-photo {
        display: block;
    }

    .animal-profile {
        display: block;
    }

    .animal-edit-profile {
        display: block;
    }

    .animal-profile-side {
        margin-bottom: 18px;
    }

    .animal-fact-grid,
    .animal-parent-grid,
    .animal-edit-grid {
        grid-template-columns: 1fr;
    }

    .animal-photo-panel,
    .animal-photo-current {
        max-width: 100%;
    }
}

@media screen and (max-width: 430px) {

    .marketing-hero h1 {
        font-size: 34px;
    }

    .marketing-section-heading h2,
    .marketing-history-copy h2,
    .marketing-trial-section h2 {
        font-size: 30px;
    }

    .marketing-panel-top {
        display: grid;
    }
}
