html,
body.abd-app-body {
    margin: 0;
    min-height: 100%;
    background: #f6f5ef;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #121212;
}

body.abd-app-body #wpadminbar { display: none !important; }

.abd-app-shell { min-height: 100vh; display: grid; grid-template-columns: 280px minmax(0, 1fr); }
.abd-app-sidebar { background: #ece7db; color: #1d2a20; display: flex; flex-direction: column; border-right: 1px solid #d6d5c6; padding: 28px 22px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.abd-app-brand { margin-bottom: 28px; }
.abd-app-brand span, .abd-app-brand strong, .abd-app-brand small { display: block; }
.abd-app-brand span, .abd-app-brand strong { font-size: 30px; line-height: .92; letter-spacing: -0.05em; }
.abd-app-brand small { margin-top: 12px; color: #6b8f71; font-size: 12px; font-weight: 800; }
.abd-app-nav { display: grid; gap: 8px; }
.abd-app-nav-item { display: flex; align-items: center; gap: 10px; color: #2e3a30 !important; text-decoration: none !important; padding: 12px; border-radius: 14px; font-weight: 750; font-size: 14px; }
.abd-app-nav-item span { width: 28px; text-align: center; }
.abd-app-nav-item:hover, .abd-app-nav-item.active { background: rgba(0,0,0,.07); color: #14201a !important; }

.abd-app-main { padding: 30px; max-width: 1480px; width: 100%; box-sizing: border-box; }
.abd-app-header { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 22px; }
.abd-app-eyebrow { margin: 0 0 7px; color: #42634a; text-transform: uppercase; letter-spacing: .14em; font-size: 12px; font-weight: 900; }
.abd-app-header h1 { margin: 0; font-size: 34px; letter-spacing: -0.04em; }
.abd-app-header-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.abd-app-header-actions a, .abd-app-button { background: #4f7357; color: #fff !important; text-decoration: none !important; border-radius: 999px; padding: 11px 16px; font-weight: 800; font-size: 13px; }
.abd-app-header-actions a:hover, .abd-app-button:hover { background: #6b8f71; color: #111 !important; }

.abd-app-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0 0 22px; }
.abd-app-stats article { background: #fff; border: 1px solid #e1e0d3; border-radius: 22px; padding: 20px; box-shadow: 0 12px 28px rgba(0,0,0,.055); }
.abd-app-stats span, .abd-app-stats small { display: block; color: #676767; }
.abd-app-stats span { font-size: 13px; font-weight: 850; margin-bottom: 8px; }
.abd-app-stats strong { display: block; color: #111; font-size: 34px; line-height: 1.05; margin-bottom: 7px; white-space: nowrap; }
.abd-app-stats small { font-size: 12px; }

.abd-app-operational-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.abd-app-panel { background: #fff; border: 1px solid #e1e0d3; border-radius: 24px; padding: 18px; box-shadow: 0 12px 28px rgba(0,0,0,.055); min-height: 255px; }
.abd-app-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.abd-app-panel h2 { margin: 0; font-size: 20px; letter-spacing: -0.025em; }
.abd-app-panel-head a { color: #3f5f47 !important; background: #e2ece3; text-decoration: none !important; border-radius: 999px; padding: 7px 10px; font-weight: 850; font-size: 12px; white-space: nowrap; }
.abd-app-list { display: grid; gap: 9px; }
.abd-app-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 11px 0; border-top: 1px solid #ecebe1; }
.abd-app-row:first-child { border-top: 0; }
.abd-app-row strong, .abd-app-row span, .abd-app-row em { display: block; }
.abd-app-row strong { font-size: 14px; margin-bottom: 3px; }
.abd-app-row span { color: #666; font-size: 12px; line-height: 1.25; }
.abd-app-row em { color: #111; background: #fbfaf5; border-radius: 999px; padding: 6px 9px; font-style: normal; font-size: 12px; font-weight: 850; white-space: nowrap; }
.abd-app-empty { color: #777; background: #fbfaf5; border: 1px dashed #d6d5c6; border-radius: 16px; padding: 18px; font-size: 14px; }

.abd-app-access { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.abd-app-access-card { background: #fff; border: 1px solid #e1e0d3; border-radius: 24px; padding: 32px; max-width: 620px; box-shadow: 0 18px 40px rgba(0,0,0,.08); }
.abd-app-access-card h1 { margin: 0 0 10px; font-size: 34px; }
.abd-app-access-card p { color: #626262; }

@media (max-width: 1100px) {
    .abd-app-shell { grid-template-columns: 230px minmax(0, 1fr); }
    .abd-app-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .abd-app-operational-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    .abd-app-shell { display: block; }
    .abd-app-sidebar { position: static; height: auto; }
    .abd-app-main { padding: 16px; }
    .abd-app-header { display: block; }
    .abd-app-header-actions { margin-top: 14px; }
    .abd-app-stats, .abd-app-operational-grid { grid-template-columns: 1fr; }
}


/* Portal 1.2.3: compactación de paneles vacíos y prioridades */
.abd-app-panel {
    min-height: auto !important;
}

.abd-app-empty {
    min-height: 0 !important;
    padding: 14px 16px !important;
    border-radius: 14px !important;
    font-size: 13px;
}

.abd-app-row {
    border-left: 5px solid transparent;
}

.abd-app-row.abd-priority-normal {
    border-left-color: #d6d5c6;
    background: #fff;
}

.abd-app-row.abd-priority-pending {
    border-left-color: #6b8f71;
    background: #fbfaf5;
}

.abd-app-row.abd-priority-urgent {
    border-left-color: #b94a48;
    background: #fff3f1;
}

.abd-app-stat-finance small {
    line-height: 1.45;
}


/* Portal 1.2.5: pulido visual del inicio operativo */
.abd-app-operational-grid {
    gap: 18px !important;
}

.abd-app-panel {
    padding: 20px !important;
    min-height: 0 !important;
}

.abd-app-panel-head {
    margin-bottom: 12px !important;
}

.abd-app-panel-head h2 {
    font-size: 22px !important;
}

.abd-app-empty {
    min-height: 0 !important;
    padding: 12px 15px !important;
    border-radius: 13px !important;
    font-size: 13px !important;
    line-height: 1.3 !important;
}

.abd-app-list {
    display: grid;
    gap: 8px !important;
}

.abd-app-row {
    padding: 12px 13px !important;
    min-height: 0 !important;
    align-items: center !important;
}

.abd-app-row span + span {
    margin-top: 3px;
}

.abd-app-row em {
    white-space: nowrap;
}

@media (min-width: 900px) {
    .abd-app-panel:has(.abd-app-empty) {
        min-height: 150px !important;
    }
}


/* Portal 1.2.6: vista Animales */
.abd-app-section {
    margin-top: 4px;
}

.abd-app-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.abd-app-section-head h2 {
    margin: 0 0 4px;
    font-size: 28px;
    letter-spacing: -0.04em;
}

.abd-app-section-head p {
    margin: 0;
    color: #666;
}

.abd-app-small-button,
.abd-app-filters button,
.abd-app-filters a,
.abd-app-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    border-radius: 999px;
    padding: 8px 13px;
    background: #4f7357;
    color: #fff !important;
    text-decoration: none !important;
    border: 0;
    font-weight: 800;
    font-size: 12px;
    cursor: pointer;
}

.abd-app-filters a {
    background: #e2ece3;
    color: #3f5f47 !important;
}

.abd-app-filters {
    display: grid;
    grid-template-columns: 1.4fr repeat(4, minmax(120px, 1fr)) auto auto;
    gap: 10px;
    margin-bottom: 16px;
    background: #fff;
    border: 1px solid #e1e0d3;
    border-radius: 20px;
    padding: 14px;
}

.abd-app-filters input,
.abd-app-filters select {
    width: 100%;
    min-height: 38px;
    border: 1px solid #d6d5c6;
    border-radius: 12px;
    padding: 8px 10px;
    background: #fff;
}

.abd-app-table-card {
    background: #fff;
    border: 1px solid #e1e0d3;
    border-radius: 22px;
    box-shadow: 0 12px 28px rgba(0,0,0,.055);
    overflow: auto;
}

.abd-app-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1080px;
}

.abd-app-table th,
.abd-app-table td {
    padding: 13px 14px;
    text-align: left;
    border-bottom: 1px solid #e1e0d3;
    vertical-align: middle;
    font-size: 13px;
}

.abd-app-table th {
    background: #fbfaf7;
    color: #5d5647;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.abd-app-table td strong,
.abd-app-table td small {
    display: block;
}

.abd-app-table td small {
    margin-top: 3px;
    color: #777;
}

.abd-app-pill {
    display: inline-flex;
    border-radius: 999px;
    background: #e2ece3;
    color: #3f5f47;
    padding: 5px 9px;
    font-size: 12px;
    font-weight: 800;
    white-space: nowrap;
}

.abd-app-actions {
    white-space: nowrap;
}

.abd-app-actions a {
    min-height: 32px;
    padding: 6px 10px;
    margin-right: 4px;
}

.abd-app-actions a:first-child {
    background: #e2ece3;
    color: #3f5f47 !important;
}

.abd-app-table-empty {
    text-align: center !important;
    color: #777;
    padding: 26px !important;
}

@media (max-width: 1200px) {
    .abd-app-filters {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .abd-app-section-head {
        display: block;
    }

    .abd-app-section-head .abd-app-small-button {
        margin-top: 12px;
    }

    .abd-app-filters {
        grid-template-columns: 1fr;
    }
}


/* Portal 1.2.7: foto en tabla de animales */
.abd-app-photo-cell {
    width: 74px;
}

.abd-app-animal-photo-img,
.abd-app-animal-photo-placeholder {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    object-fit: cover;
}

.abd-app-animal-photo-img {
    background: #e2ece3;
}

.abd-app-animal-photo-placeholder {
    background: #4f7357;
    color: #6b8f71;
    font-weight: 900;
    font-size: 20px;
}


/* Portal 1.2.8: edición rápida de salud / higiene */
.abd-app-section-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.abd-app-small-button.secondary {
    background: #e2ece3;
    color: #3f5f47 !important;
}

.abd-app-health-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr);
    gap: 18px;
    align-items: start;
}

.abd-app-health-form,
.abd-app-health-history {
    background: #fff;
    border: 1px solid #e1e0d3;
    border-radius: 22px;
    padding: 20px;
    box-shadow: 0 12px 28px rgba(0,0,0,.055);
}

.abd-app-health-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.abd-app-health-form label {
    display: grid;
    gap: 6px;
    color: #5d5647;
    font-weight: 800;
    font-size: 13px;
}

.abd-app-health-form input,
.abd-app-health-form select,
.abd-app-health-form textarea {
    width: 100%;
    border: 1px solid #d6d5c6;
    border-radius: 12px;
    padding: 10px 11px;
    background: #fff;
    font: inherit;
}

.abd-app-health-notes,
.abd-app-health-form button {
    grid-column: 1 / -1;
}

.abd-app-health-form button {
    min-height: 42px;
    border: 0;
    border-radius: 999px;
    background: #4f7357;
    color: #fff;
    font-weight: 900;
    cursor: pointer;
}

.abd-app-health-history h3 {
    margin: 0 0 12px;
    font-size: 21px;
}

.abd-app-notice {
    border-radius: 16px;
    padding: 13px 15px;
    margin: 0 0 16px;
    font-weight: 700;
}

.abd-app-notice-success {
    background: #eff8ef;
    border: 1px solid #b8d9b8;
    color: #225922;
}

.abd-app-notice-error {
    background: #fff3f1;
    border: 1px solid #e2b7b2;
    color: #8b2c25;
}

@media (max-width: 1050px) {
    .abd-app-health-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .abd-app-health-form {
        grid-template-columns: 1fr;
    }
}


/* Portal 1.2.9: ajuste de tamaño de campos en Salud / higiene */
.abd-app-health-layout {
    grid-template-columns: minmax(0, 760px) minmax(320px, 460px) !important;
    align-items: start;
}

.abd-app-health-form {
    grid-template-columns: 1fr 1fr !important;
    gap: 18px !important;
    padding: 24px !important;
}

.abd-app-health-form label {
    font-size: 14px !important;
    gap: 8px !important;
}

.abd-app-health-form input,
.abd-app-health-form select {
    min-height: 48px !important;
    font-size: 15px !important;
    padding: 11px 13px !important;
    border-radius: 14px !important;
}

.abd-app-health-form textarea {
    min-height: 150px !important;
    font-size: 15px !important;
    padding: 13px !important;
    border-radius: 14px !important;
}

.abd-app-health-form button {
    min-height: 48px !important;
    font-size: 15px !important;
}

.abd-app-health-history {
    padding: 24px !important;
}

@media (min-width: 1051px) {
    .abd-app-health-form {
        max-width: 760px;
    }
}

@media (max-width: 1050px) {
    .abd-app-health-layout {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 760px) {
    .abd-app-health-form {
        grid-template-columns: 1fr !important;
        padding: 18px !important;
    }

    .abd-app-health-form input,
    .abd-app-health-form select,
    .abd-app-health-form textarea {
        font-size: 16px !important;
    }
}


/* Portal 1.2.11: separar registro realizado y próximos avisos */
.abd-app-health-forms {
    display: grid;
    gap: 18px;
}

.abd-app-health-form-record,
.abd-app-health-form-alerts {
    max-width: none !important;
}

.abd-app-form-title {
    grid-column: 1 / -1;
    margin-bottom: 2px;
}

.abd-app-form-title h3 {
    margin: 0 0 4px;
    font-size: 21px;
    letter-spacing: -0.03em;
}

.abd-app-form-title p {
    margin: 0;
    color: #666;
    font-size: 13px;
}

.abd-app-health-form-alerts {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    background: #fbfaf5 !important;
}

.abd-app-health-form-alerts button {
    background: #6b8f71 !important;
    color: #111 !important;
}

@media (max-width: 760px) {
    .abd-app-health-form-alerts {
        grid-template-columns: 1fr !important;
    }
}


/* Portal 1.2.12: Higiene y Salud veterinaria separadas */
.abd-app-health-form-alerts label {
    grid-column: 1 / -1;
}

.abd-app-health-form-alerts button {
    grid-column: 1 / -1;
}


/* Portal 1.2.14: ficha completa de salud veterinaria */
.abd-app-health-form-full {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.abd-app-health-form-full .abd-app-health-notes {
    grid-column: 1 / -1;
}

.abd-app-health-form-full textarea {
    min-height: 112px !important;
}

.abd-app-health-form-full button {
    grid-column: 1 / -1;
}

@media (max-width: 760px) {
    .abd-app-health-form-full {
        grid-template-columns: 1fr !important;
    }
}


/* Portal 1.2.17: urgencia en salud veterinaria */
.abd-app-checkbox-label {
    align-content: start;
}

.abd-app-checkbox-label em {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    border: 1px solid #d6d5c6;
    border-radius: 14px;
    padding: 11px 13px;
    font-style: normal;
    background: #fff;
    color: #111;
}

.abd-app-checkbox-label input {
    width: auto !important;
}


/* Portal 1.2.19: campos dinámicos en Salud veterinaria */
.abd-app-health-form [data-health-field] {
    transition: opacity .15s ease;
}


/* Portal 1.2.21: pestañas internas de Salud */
.abd-app-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 18px;
}

.abd-app-tabs a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 999px;
    background: #e2ece3;
    color: #3f5f47;
    text-decoration: none;
    font-weight: 900;
    border: 1px solid #e1e0d3;
}

.abd-app-tabs a.active {
    background: #4f7357;
    color: #fff;
    border-color: #4f7357;
}

@media (max-width: 760px) {
    .abd-app-tabs {
        display: grid;
        grid-template-columns: 1fr;
    }
}


/* Portal 1.2.23: historial sanitario */
.abd-app-history-panel {
    max-width: none !important;
}

.abd-app-history-filters {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 4px 0 12px;
}

.abd-app-history-filters a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #e2ece3;
    color: #3f5f47;
    text-decoration: none;
    font-weight: 900;
    border: 1px solid #e1e0d3;
    font-size: 13px;
}

.abd-app-history-filters a.active {
    background: #4f7357;
    color: #fff;
    border-color: #4f7357;
}

.abd-app-history-table-wrap {
    grid-column: 1 / -1;
    overflow-x: auto;
}

.abd-app-history-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 820px;
    background: #fff;
}

.abd-app-history-table th,
.abd-app-history-table td {
    text-align: left;
    vertical-align: top;
    padding: 14px 12px;
    border-bottom: 1px solid #e1e0d3;
    font-size: 13px;
    color: #333;
}

.abd-app-history-table th {
    color: #6b6257;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: 11px;
}

.abd-app-priority.urgent {
    display: inline-flex;
    padding: 5px 9px;
    border-radius: 999px;
    background: #ffe2dd;
    color: #a5281a;
    font-weight: 900;
}

.abd-app-muted {
    color: #999;
}


/* Portal 1.2.24: historial sanitario en tarjetas */
.abd-app-health-history-panel {
    width: 100%;
}

.abd-app-history-card-list {
    grid-column: 1 / -1;
    display: grid;
    gap: 12px;
}

.abd-app-history-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: start;
    padding: 16px 18px;
    border: 1px solid #e2ece3;
    border-radius: 18px;
    background: #fbfaf5;
}

.abd-app-history-card-main {
    min-width: 0;
}

.abd-app-history-card-top {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: baseline;
    margin-bottom: 8px;
}

.abd-app-history-card-top strong {
    font-size: 16px;
    color: #111;
}

.abd-app-history-card-top span {
    color: #736b61;
    font-weight: 800;
}

.abd-app-history-card p {
    margin: 0;
    color: #5f5a52;
    line-height: 1.45;
    font-size: 14px;
}

.abd-app-history-card-side {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
    max-width: 260px;
}

.abd-app-history-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 10px;
    border-radius: 999px;
    background: #e2ece3;
    color: #3f5f47;
    font-weight: 900;
    font-size: 12px;
    text-align: right;
}

@media (max-width: 860px) {
    .abd-app-history-card {
        grid-template-columns: 1fr;
    }

    .abd-app-history-card-side {
        align-items: flex-start;
        max-width: none;
    }
}


/* Portal 1.2.26: colores por tipo de registro sanitario */
.abd-app-history-card {
    position: relative;
    overflow: hidden;
}

.abd-app-history-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    background: #b5c9b8;
}

.abd-app-history-card.type-observacion {
    background: #fbfaf5;
    border-color: #e1e0d3;
}

.abd-app-history-card.type-observacion::before {
    background: #6b8f71;
}

.abd-app-history-card.type-consulta {
    background: #f5f8ff;
    border-color: #dbe6ff;
}

.abd-app-history-card.type-consulta::before {
    background: #3f6fb5;
}

.abd-app-history-card.type-vacuna {
    background: #f3fff8;
    border-color: #d8f0e2;
}

.abd-app-history-card.type-vacuna::before {
    background: #2f9d68;
}

.abd-app-history-card.type-desparasitacion {
    background: #f7f2ff;
    border-color: #e6dafb;
}

.abd-app-history-card.type-desparasitacion::before {
    background: #7f56c5;
}

.abd-app-history-card.type-higiene {
    background: #f1fbff;
    border-color: #d7edf5;
}

.abd-app-history-card.type-higiene::before {
    background: #3b97b8;
}

.abd-app-history-card.type-general {
    background: #fbfaf7;
    border-color: #d6d5c6;
}

.abd-app-history-card.type-general::before {
    background: #9b9285;
}

.abd-app-history-type-label {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(255,255,255,.7);
    border: 1px solid rgba(0,0,0,.05);
}


/* Portal 1.2.27: detalle desplegable en historial */
.abd-app-history-detail {
    margin-top: 12px;
}

.abd-app-history-detail summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 7px 12px;
    border-radius: 999px;
    background: #4f7357;
    color: #fff;
    font-weight: 900;
    font-size: 12px;
    cursor: pointer;
    user-select: none;
}

.abd-app-history-detail[open] summary {
    margin-bottom: 12px;
}

.abd-app-history-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
    padding: 14px;
    border-radius: 16px;
    background: rgba(255,255,255,.7);
    border: 1px solid rgba(0,0,0,.05);
}

.abd-app-history-detail-grid div {
    min-width: 0;
}

.abd-app-history-detail-grid dt {
    margin: 0 0 4px;
    color: #6b6257;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .07em;
}

.abd-app-history-detail-grid dd {
    margin: 0;
    color: #222;
    font-size: 13px;
    line-height: 1.45;
    word-break: break-word;
}

@media (max-width: 760px) {
    .abd-app-history-detail-grid {
        grid-template-columns: 1fr;
    }
}


/* Portal 1.2.28: resumen compacto en tarjetas de historial */
.abd-app-history-card p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}


/* Portal 1.2.29: clientes */
.abd-app-client-layout {
    display: grid;
    grid-template-columns: minmax(360px, 520px) minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.abd-app-client-form,
.abd-app-client-list-panel {
    background: #fff;
    border: 1px solid #e1e0d3;
    border-radius: 24px;
    padding: 24px;
    box-shadow: 0 18px 45px rgba(40,30,10,.06);
}

.abd-app-client-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.abd-app-client-form .abd-app-form-title,
.abd-app-client-wide,
.abd-app-client-form button {
    grid-column: 1 / -1;
}

.abd-app-client-form label {
    display: grid;
    gap: 7px;
    color: #625b52;
    font-weight: 900;
    font-size: 13px;
}

.abd-app-parent-fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

@media (max-width: 720px) {
    .abd-app-parent-fields {
        grid-template-columns: 1fr;
    }
}

.abd-app-client-form input,
.abd-app-client-form textarea,
.abd-app-filter-bar input {
    width: 100%;
    border: 1px solid #d6d5c6;
    border-radius: 14px;
    padding: 12px 13px;
    background: #fff;
    color: #111;
    font-weight: 800;
}

.abd-app-client-form button,
.abd-app-filter-bar button {
    border: 0;
    border-radius: 999px;
    padding: 13px 18px;
    background: #4f7357;
    color: #fff;
    font-weight: 900;
    cursor: pointer;
}

.abd-app-client-cards {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.abd-app-client-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 16px;
    border: 1px solid #e2ece3;
    border-radius: 18px;
    background: #fbfaf5;
}

.abd-app-client-card h4 {
    margin: 0 0 6px;
    font-size: 17px;
}

.abd-app-client-card p {
    margin: 3px 0;
    color: #625b52;
    line-height: 1.4;
}

.abd-app-client-actions a {
    display: inline-flex;
    padding: 10px 13px;
    border-radius: 999px;
    background: #4f7357;
    color: #fff;
    text-decoration: none;
    font-weight: 900;
    white-space: nowrap;
}

@media (max-width: 1000px) {
    .abd-app-client-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .abd-app-client-form {
        grid-template-columns: 1fr;
    }

    .abd-app-client-card {
        grid-template-columns: 1fr;
    }
}


/* Portal 1.2.30: clientes más limpio */
.abd-app-client-card {
    grid-template-columns: 1fr !important;
}

.abd-app-client-actions {
    display: none !important;
}


/* Portal 1.2.31: clientes por pestañas */
.abd-app-client-tabs {
    margin-bottom: 18px;
}

.abd-app-client-form-single {
    max-width: 760px;
}

.abd-app-client-list-full {
    max-width: 980px;
}

.abd-app-client-list-full .abd-app-client-cards {
    grid-template-columns: 1fr;
}


/* Portal 1.2.32: animales por pestañas */
.abd-app-animal-tabs {
    margin-bottom: 18px;
}

.abd-app-animal-form-single {
    max-width: 820px;
}

.abd-app-table-panel {
    max-width: 1280px;
}

.abd-app-client-form select {
    width: 100%;
    border: 1px solid #d6d5c6;
    border-radius: 14px;
    padding: 12px 13px;
    background: #fff;
    color: #111;
    font-weight: 800;
}


/* Portal 1.2.33: animales vuelve a listado operativo */
.abd-app-animal-tabs,
.abd-app-animal-form-single {
    display: none;
}


/* Portal 1.2.34: razas */
.abd-app-breed-tabs {
    margin-bottom: 18px;
}

.abd-app-breed-form-single {
    max-width: 860px;
}

.abd-app-breed-list-full {
    max-width: 980px;
}

.abd-app-breed-filter select {
    border: 1px solid #d6d5c6;
    border-radius: 14px;
    padding: 12px 13px;
    background: #fff;
    color: #111;
    font-weight: 800;
}

.abd-app-breed-cards {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.abd-app-breed-card {
    padding: 18px;
    border: 1px solid #e2ece3;
    border-radius: 18px;
    background: #fbfaf5;
    position: relative;
    overflow: hidden;
}

.abd-app-breed-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    background: #6b8f71;
}

.abd-app-breed-card.inactive {
    background: #f7f7f7;
    border-color: #e0ded9;
    opacity: .82;
}

.abd-app-breed-card.inactive::before {
    background: #9b9285;
}

.abd-app-breed-card-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
}

.abd-app-breed-card h4 {
    margin: 0 0 6px;
    font-size: 18px;
}

.abd-app-breed-card span {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: #e2ece3;
    color: #3f5f47;
    font-weight: 900;
    font-size: 12px;
}

.abd-app-breed-card p {
    margin: 0;
    color: #625b52;
    line-height: 1.45;
}


/* Portal 1.2.36: limpieza de cabecera en Razas */
.abd-app-section-head-simple {
    margin-top: -4px;
}

.abd-app-section-head-simple p {
    margin: 0;
}


/* Portal 1.2.37: camadas */
.abd-app-litter-tabs {
    margin-bottom: 18px;
}

.abd-app-litter-form-single {
    max-width: 860px;
}

.abd-app-litter-list-full {
    max-width: 1060px;
}

.abd-app-litter-filter select {
    border: 1px solid #d6d5c6;
    border-radius: 14px;
    padding: 12px 13px;
    background: #fff;
    color: #111;
    font-weight: 800;
}

.abd-app-litter-cards {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.abd-app-litter-card {
    padding: 18px;
    border: 1px solid #e2ece3;
    border-radius: 18px;
    background: #fbfaf5;
    position: relative;
    overflow: hidden;
}

.abd-app-litter-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    background: #6b8f71;
}

.abd-app-litter-card.status-activa::before,
.abd-app-litter-card.status-nacida::before {
    background: #2f9d68;
}

.abd-app-litter-card.status-cerrada::before {
    background: #3f6fb5;
}

.abd-app-litter-card.status-cancelada::before {
    background: #9b9285;
}

.abd-app-litter-card-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: start;
}

.abd-app-litter-card h4 {
    margin: 0 0 6px;
    font-size: 18px;
}

.abd-app-litter-card p {
    margin: 4px 0;
    color: #625b52;
    line-height: 1.45;
}

.abd-app-litter-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.abd-app-litter-tags span,
.abd-app-litter-meta span {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: #e2ece3;
    color: #3f5f47;
    font-weight: 900;
    font-size: 12px;
}

.abd-app-litter-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

@media (max-width: 760px) {
    .abd-app-litter-card-head {
        grid-template-columns: 1fr;
    }

    .abd-app-litter-tags {
        justify-content: flex-start;
    }
}


/* Portal 1.2.40: color por estado de camada */
.abd-app-litter-status-badge.status-planificada {
    background: #e2ece3;
    color: #3f5f47;
}

.abd-app-litter-status-badge.status-activa {
    background: #e7f5ec;
    color: #1f7a4c;
}

.abd-app-litter-status-badge.status-nacida {
    background: #e9f7ef;
    color: #1f7a4c;
}

.abd-app-litter-status-badge.status-cerrada {
    background: #eaf0fb;
    color: #2f5e9e;
}

.abd-app-litter-status-badge.status-cancelada {
    background: #eeeeee;
    color: #6f6f6f;
}


/* Portal 1.2.41: ficha de camada */
.abd-app-litter-card-actions {
    margin-top: 14px;
}

.abd-app-litter-card-actions a,
.abd-app-puppy-actions a,
.abd-app-section-actions .abd-app-small-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 8px 13px;
    border-radius: 999px;
    background: #4f7357;
    color: #fff;
    text-decoration: none;
    font-weight: 900;
    font-size: 13px;
}

.abd-app-litter-summary-card {
    max-width: 1060px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    padding: 20px;
    border: 1px solid #e1e0d3;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(40,30,10,.06);
    position: relative;
    overflow: hidden;
}

.abd-app-litter-summary-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    background: #6b8f71;
}

.abd-app-litter-summary-card.status-activa::before,
.abd-app-litter-summary-card.status-nacida::before {
    background: #2f9d68;
}

.abd-app-litter-summary-card.status-cerrada::before {
    background: #3f6fb5;
}

.abd-app-litter-summary-card.status-cancelada::before {
    background: #9b9285;
}

.abd-app-litter-summary-card div {
    padding: 12px;
    border-radius: 16px;
    background: #fbfaf5;
}

.abd-app-litter-summary-card span {
    display: block;
    margin-bottom: 5px;
    color: #6b6257;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .07em;
}

.abd-app-litter-summary-card strong {
    color: #111;
    font-size: 16px;
}

.abd-app-litter-puppies-head {
    max-width: 1060px;
    margin: 22px 0 12px;
}

.abd-app-litter-puppies-head h3 {
    margin: 0 0 4px;
    font-size: 24px;
}

.abd-app-litter-puppies-head p {
    margin: 0;
    color: #666;
}

.abd-app-puppy-grid {
    max-width: 1060px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.abd-app-puppy-card {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 14px;
    padding: 16px;
    border: 1px solid #e2ece3;
    border-radius: 20px;
    background: #fbfaf5;
}

.abd-app-puppy-photo .abd-app-animal-photo,
.abd-app-puppy-photo img {
    width: 82px;
    height: 82px;
    border-radius: 18px;
    object-fit: cover;
}

.abd-app-puppy-info h4 {
    margin: 0 0 4px;
    font-size: 18px;
}

.abd-app-puppy-info p {
    margin: 4px 0;
    color: #625b52;
    line-height: 1.35;
}

.abd-app-puppy-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 8px 0;
}

.abd-app-puppy-meta span {
    display: inline-flex;
    padding: 5px 8px;
    border-radius: 999px;
    background: #e2ece3;
    color: #3f5f47;
    font-size: 12px;
    font-weight: 900;
}

.abd-app-puppy-actions {
    grid-column: 1 / -1;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

@media (max-width: 920px) {
    .abd-app-litter-summary-card,
    .abd-app-puppy-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .abd-app-puppy-card {
        grid-template-columns: 1fr;
    }
}


/* Portal 1.2.42: gráfica de pesos y tarjetas de cachorros en una columna */
.abd-app-weight-panel {
    max-width: 1060px;
    margin-top: 22px;
    padding: 20px;
    border: 1px solid #e1e0d3;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(40,30,10,.06);
}

.abd-app-weight-chart-wrap {
    margin-top: 14px;
    width: 100%;
    overflow-x: auto;
    border-radius: 18px;
    background: #fbfaf5;
    border: 1px solid #e2ece3;
    padding: 12px;
}

.abd-app-weight-chart {
    min-width: 760px;
    width: 100%;
    height: auto;
    display: block;
}

.abd-app-chart-grid {
    stroke: #d6d5c6;
    stroke-width: 1;
}

.abd-app-chart-axis {
    stroke: #9f9383;
    stroke-width: 1.5;
}

.abd-app-chart-label {
    fill: #6b6257;
    font-size: 12px;
    font-weight: 800;
}

.abd-app-weight-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-top: 14px;
}

.abd-app-weight-legend span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #5f5a52;
    font-weight: 900;
    font-size: 13px;
}

.abd-app-weight-legend i {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    display: inline-block;
}

.abd-app-puppy-grid {
    grid-template-columns: 1fr !important;
}

.abd-app-puppy-card {
    grid-template-columns: 92px minmax(0, 1fr) auto !important;
    align-items: center;
}

.abd-app-puppy-photo .abd-app-animal-photo,
.abd-app-puppy-photo img {
    width: 92px;
    height: 92px;
}

.abd-app-puppy-actions {
    grid-column: auto !important;
    flex-direction: column;
    justify-content: center;
}

@media (max-width: 760px) {
    .abd-app-puppy-card {
        grid-template-columns: 82px minmax(0, 1fr) !important;
    }

    .abd-app-puppy-actions {
        grid-column: 1 / -1 !important;
        flex-direction: row;
    }
}

@media (max-width: 520px) {
    .abd-app-puppy-card {
        grid-template-columns: 1fr !important;
    }
}


/* Portal 1.2.43: pestaña Peso */
.abd-app-weight-form .abd-app-form-title p { max-width: 680px; }


/* Portal 1.2.44: filtro Peso en historial */
.abd-app-history-card.type-peso {
    background: #f2fbff;
    border-color: #cdebf5;
}

.abd-app-history-card.type-peso::before {
    background: #3498b8;
}


/* Portal 1.2.45: historial de peso más claro */
.abd-app-comment-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.abd-app-comment-chip.no-comment {
    background: #eeeeee;
    color: #777;
}

.abd-app-comment-chip.has-comment {
    background: #e7f5ec;
    color: #1f7a4c;
}

.abd-app-history-card.type-peso .abd-app-history-card-main p {
    font-size: 18px;
    font-weight: 900;
    color: #111;
    margin-top: 10px;
}

.abd-app-history-card.type-peso .abd-app-history-card-top {
    align-items: center;
}

.abd-app-history-card.type-peso .abd-app-history-card-side {
    gap: 8px;
}


/* Portal 1.2.48: Documentos */
.abd-app-document-tabs {
    margin-bottom: 18px;
}

.abd-app-document-panel {
    max-width: 1080px;
}

.abd-app-document-filter select {
    border: 1px solid #d6d5c6;
    border-radius: 14px;
    padding: 12px 13px;
    background: #fff;
    color: #111;
    font-weight: 800;
}

.abd-app-document-cards {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.abd-app-document-card {
    padding: 18px;
    border: 1px solid #e2ece3;
    border-radius: 18px;
    background: #fbfaf5;
    position: relative;
    overflow: hidden;
}

.abd-app-document-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    background: #6b8f71;
}

.abd-app-document-card.status-ready::before {
    background: #2f9d68;
}

.abd-app-document-card.type-generated::before {
    background: #3f6fb5;
}

.abd-app-document-card-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
    margin-bottom: 12px;
}

.abd-app-document-card h4 {
    margin: 0 0 5px;
    font-size: 18px;
}

.abd-app-document-card p {
    margin: 4px 0;
    color: #625b52;
    line-height: 1.45;
}

.abd-app-document-card-head > span {
    display: inline-flex;
    padding: 7px 11px;
    border-radius: 999px;
    background: #e2ece3;
    color: #3f5f47;
    font-size: 12px;
    font-weight: 900;
}

.abd-app-document-card.status-ready .abd-app-document-card-head > span {
    background: #e7f5ec;
    color: #1f7a4c;
}

.abd-app-document-meta,
.abd-app-document-pending-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.abd-app-document-meta span,
.abd-app-document-pending-list span {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: #e2ece3;
    color: #3f5f47;
    font-size: 12px;
    font-weight: 900;
}

.abd-app-document-pending-list span {
    background: #fff1e3;
    color: #8a4d10;
}

@media (max-width: 760px) {
    .abd-app-document-card-head {
        grid-template-columns: 1fr;
    }
}


/* Portal 1.2.49: generación documental */
.abd-app-document-generate-form {
    max-width: 920px;
    margin-bottom: 20px;
}

.abd-app-document-preview {
    margin-top: 22px;
    padding: 18px;
    border: 1px solid #e1e0d3;
    border-radius: 20px;
    background: #fff;
}

.abd-app-document-preview-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 14px;
}

.abd-app-document-preview-head h3 {
    margin: 0;
}

.abd-app-document-preview-head button {
    border: 0;
    border-radius: 999px;
    padding: 10px 16px;
    background: #4f7357;
    color: #fff;
    font-weight: 900;
    cursor: pointer;
}

.abd-app-document-preview pre {
    margin: 0;
    white-space: pre-wrap;
    font-family: inherit;
    line-height: 1.55;
    font-size: 14px;
    color: #111;
}

@media print {
    .abd-app-sidebar,
    .abd-app-header,
    .abd-app-tabs,
    .abd-app-document-generate-form,
    .abd-app-document-preview-head button {
        display: none !important;
    }

    .abd-app-document-preview {
        border: 0 !important;
        box-shadow: none !important;
    }
}


/* Portal 1.2.50: seguimiento de entrega y firma documental */
.abd-app-document-tracking-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.abd-app-document-tracking-actions form {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    padding: 6px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #e1e0d3;
}

.abd-app-document-tracking-actions input[type="date"] {
    border: 0;
    background: transparent;
    font-weight: 800;
    color: #111;
    max-width: 142px;
}

.abd-app-document-tracking-actions button {
    border: 0;
    border-radius: 999px;
    padding: 8px 12px;
    background: #4f7357;
    color: #fff;
    font-weight: 900;
    cursor: pointer;
    font-size: 12px;
}


/* Portal 1.2.51: acuse firmado y vista previa en historial */
.abd-app-document-history-preview {
    margin-top: 14px;
}

.abd-app-document-history-preview > summary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 8px 13px;
    border-radius: 999px;
    background: #4f7357;
    color: #fff;
    font-weight: 900;
    cursor: pointer;
    list-style: none;
}

.abd-app-document-history-preview > summary::-webkit-details-marker {
    display: none;
}

.abd-app-document-history-preview .abd-app-document-preview {
    margin-top: 12px;
}


/* Portal 1.2.52: impresión solo del documento */
.abd-app-document-print-area {
    white-space: pre-wrap;
    font-family: inherit;
}


/* Portal 1.2.55: tarjetas de documentación pendiente más limpias */
.abd-app-document-card.status-pending .abd-app-document-meta {
    display: none;
}

.abd-app-document-card.status-pending .abd-app-document-pending-list span {
    background: #ffe8e3;
    color: #9a2f12;
    border: 1px solid #ffd0c6;
}

.abd-app-document-card.status-pending .abd-app-document-card-head > span {
    background: #ffe8e3;
    color: #9a2f12;
}

.abd-app-document-card.status-pending .abd-app-document-card-head {
    margin-bottom: 14px;
}


/* Portal 1.2.56: nombre del animal destacado en historial documental */
.abd-app-document-meta .abd-app-document-animal-chip {
    background: #4f7357;
    color: #fff;
    font-size: 14px;
    padding: 8px 13px;
}

.abd-app-document-meta .abd-app-document-animal-chip strong {
    color: #fff;
    font-size: 15px;
}

.abd-app-document-meta .abd-app-document-client-chip {
    font-size: 13px;
}


/* Portal 1.2.57: historial documental con animal destacado sin exceso de negro */
.abd-app-document-meta .abd-app-document-animal-chip {
    background: transparent !important;
    color: #111 !important;
    font-size: 19px !important;
    font-weight: 950 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    min-width: 100%;
    display: block;
    margin: 2px 0 2px;
}

.abd-app-document-meta .abd-app-document-animal-chip strong {
    color: #111 !important;
    font-size: inherit !important;
}

.abd-app-document-card.type-generated .abd-app-document-meta {
    align-items: center;
}

.abd-app-document-card.type-generated .abd-app-document-client-chip,
.abd-app-document-card.type-generated .abd-app-document-meta span:not(.abd-app-document-animal-chip) {
    background: #e2ece3;
    color: #3f5f47;
}


/* Portal 1.2.59: Gastos e ingresos */
.abd-app-finance-panel {
    max-width: 1120px;
}

.abd-app-finance-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.abd-app-finance-filter input,
.abd-app-finance-filter select {
    border: 1px solid #d6d5c6;
    border-radius: 14px;
    padding: 12px 13px;
    background: #fff;
    color: #111;
    font-weight: 800;
}

.abd-app-finance-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0;
}

.abd-app-finance-summary div {
    padding: 16px;
    border: 1px solid #e1e0d3;
    border-radius: 18px;
    background: #fbfaf5;
}

.abd-app-finance-summary span {
    display: block;
    color: #6b6257;
    font-weight: 800;
    margin-bottom: 8px;
}

.abd-app-finance-summary strong {
    font-size: 22px;
}

.abd-app-finance-cards {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.abd-app-finance-card {
    padding: 18px;
    border: 1px solid #e1e0d3;
    border-radius: 18px;
    background: #fbfaf5;
    position: relative;
    overflow: hidden;
}

.abd-app-finance-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    background: #6b8f71;
}

.abd-app-finance-card.type-income::before {
    background: #2f9d68;
}

.abd-app-finance-card.type-expense::before {
    background: #c84d55;
}

.abd-app-finance-card-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
}

.abd-app-finance-card h4 {
    margin: 0 0 4px;
    font-size: 18px;
}

.abd-app-finance-card p {
    margin: 4px 0;
    color: #625b52;
}

.abd-app-finance-card-head strong {
    font-size: 20px;
}

.abd-app-finance-form .abd-app-finance-paid {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
}

.abd-app-finance-subtitle {
    margin: 24px 0 12px;
}

.abd-app-finance-report-table {
    display: grid;
    gap: 8px;
}

.abd-app-finance-report-table div {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #fbfaf5;
    border: 1px solid #e1e0d3;
}

.abd-app-export-button {
    display: inline-flex;
    margin-top: 16px;
    padding: 12px 18px;
    border-radius: 999px;
    background: #4f7357;
    color: #fff;
    text-decoration: none;
    font-weight: 900;
}

@media (max-width: 900px) {
    .abd-app-finance-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .abd-app-finance-summary,
    .abd-app-finance-card-head {
        grid-template-columns: 1fr;
    }
}


/* Portal 1.2.60: ámbito de gasto general del criadero */
.abd-app-finance-scope-help {
    padding: 12px 14px;
    border-radius: 16px;
    background: #fff8ea;
    border: 1px solid #e1e0d3;
    color: #62523a;
    font-weight: 800;
    line-height: 1.45;
}


/* Portal 1.2.61: informe por categoría simplificado */
.abd-app-finance-report-table div.type-income {
    border-left: 5px solid #2f9d68;
}

.abd-app-finance-report-table div.type-expense {
    border-left: 5px solid #c84d55;
}

.abd-app-finance-report-table div span {
    font-weight: 900;
}


/* Portal 1.2.63: selector específico según ámbito */
.abd-app-finance-scope-specific {
    min-width: 220px;
}


/* Portal 1.2.64: formulario financiero alineado con Manager */
.abd-app-finance-form small {
    display: block;
    margin-top: 6px;
    color: #6f675d;
    font-weight: 700;
}


/* Portal 1.2.65: Veterinarios */
.abd-app-vet-panel {
    max-width: 1120px;
}

.abd-app-vet-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.abd-app-vet-filter input,
.abd-app-vet-filter select {
    border: 1px solid #d6d5c6;
    border-radius: 14px;
    padding: 12px 13px;
    background: #fff;
    color: #111;
    font-weight: 800;
}

.abd-app-vet-cards {
    display: grid;
    gap: 12px;
    margin-top: 16px;
}

.abd-app-vet-card {
    padding: 18px;
    border: 1px solid #e1e0d3;
    border-radius: 18px;
    background: #fbfaf5;
    position: relative;
    overflow: hidden;
}

.abd-app-vet-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    background: #8d69c9;
}

.abd-app-vet-card.type-clinic::before {
    background: #2f8eb8;
}

.abd-app-vet-card.type-vet::before {
    background: #8d69c9;
}

.abd-app-vet-card-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
}

.abd-app-vet-card h4 {
    margin: 0 0 4px;
    font-size: 20px;
}

.abd-app-vet-card p {
    margin: 4px 0;
    color: #625b52;
}

.abd-app-vet-card-head > span {
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 999px;
    background: #e2ece3;
    color: #3f5f47;
    font-weight: 900;
}

@media (max-width: 560px) {
    .abd-app-vet-card-head {
        grid-template-columns: 1fr;
    }
}


/* Portal 1.2.67: versiones Portal/Manager en cabecera lateral */
.abd-app-brand small + small {
    margin-top: 2px;
}


/* Portal 1.2.68: versión segura en cabecera lateral */
.abd-app-brand small {
    display: block;
    color: #6b8f71;
    font-weight: 900;
}


/* Portal 1.2.69: colores diferenciados para clínica y veterinario */
.abd-app-vet-card.type-clinic .abd-app-vet-card-head > span {
    background: #e9f6fb;
    color: #1f6f8b;
    border: 1px solid #c8e8f3;
}

.abd-app-vet-card.type-vet .abd-app-vet-card-head > span,
.abd-app-vet-card.type-veterinarian .abd-app-vet-card-head > span {
    background: #f0eafc;
    color: #6d46a6;
    border: 1px solid #dcccf5;
}

.abd-app-vet-card.type-clinic {
    background: #fbfdff;
}

.abd-app-vet-card.type-vet,
.abd-app-vet-card.type-veterinarian {
    background: #fdfbff;
}


/* Portal 1.2.70: checkbox de pagado claro y agrupado */
.abd-app-finance-form .abd-app-finance-paid {
    display: flex !important;
    flex-direction: column;
    align-items: flex-start !important;
    justify-content: flex-start;
    gap: 10px;
    min-height: auto;
}

.abd-app-finance-paid > span:first-child {
    font-weight: 900;
    color: #5f564d;
}

.abd-app-finance-paid-control {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 10px 14px;
    border: 1px solid #d6d5c6;
    border-radius: 999px;
    background: #fff;
}

.abd-app-finance-paid-control input {
    width: 18px;
    height: 18px;
}

.abd-app-finance-paid-control strong {
    font-weight: 900;
    color: #111;
}


/* Portal 1.2.71: Nuevo movimiento como acción principal */
.abd-app-finance-topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.abd-app-finance-topbar .abd-app-tabs {
    margin-bottom: 0;
}

.abd-app-finance-new-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 0 24px;
    border-radius: 999px;
    background: #2f9d68;
    color: #fff;
    text-decoration: none;
    font-weight: 950;
    box-shadow: 0 14px 26px rgba(47, 157, 104, 0.16);
}

.abd-app-finance-new-button:hover,
.abd-app-finance-new-button:focus,
.abd-app-finance-new-button.active {
    background: #247a51;
    color: #fff;
}

@media (max-width: 760px) {
    .abd-app-finance-topbar {
        align-items: stretch;
    }

    .abd-app-finance-new-button {
        width: 100%;
    }
}


/* Portal 1.2.72: asociación visible y colores por origen del movimiento */
.abd-app-finance-association-chip {
    border: 1px solid transparent;
}

.abd-app-document-meta .abd-app-finance-association-chip.association-general {
    background: #e2ece3;
    color: #705019;
    border-color: #ead7ac;
}

.abd-app-document-meta .abd-app-finance-association-chip.association-animal {
    background: #e9f6fb;
    color: #1f6f8b;
    border-color: #c8e8f3;
}

.abd-app-document-meta .abd-app-finance-association-chip.association-litter {
    background: #eef8ef;
    color: #2d7a4d;
    border-color: #ccebd4;
}

.abd-app-document-meta .abd-app-finance-association-chip.association-client {
    background: #fff0e4;
    color: #9a5519;
    border-color: #ffd9bd;
}

.abd-app-document-meta .abd-app-finance-association-chip.association-health {
    background: #f0eafc;
    color: #6d46a6;
    border-color: #dcccf5;
}

.abd-app-document-meta .abd-app-finance-association-chip.association-clinic,
.abd-app-document-meta .abd-app-finance-association-chip.association-vet {
    background: #eef2ff;
    color: #394b9f;
    border-color: #d5ddff;
}


/* Portal 1.2.73: referencia del movimiento en cabecera y color en tarjeta completa */
.abd-app-finance-association-head {
    display: inline-flex;
    width: fit-content;
    margin: 2px 0 6px;
    padding: 7px 12px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 13px;
    font-weight: 950;
}

.abd-app-finance-card.association-general {
    background: #fbfaf5;
}

.abd-app-finance-card.association-animal {
    background: #f1fbff;
}

.abd-app-finance-card.association-litter {
    background: #f3fbf5;
}

.abd-app-finance-card.association-client {
    background: #fff7ef;
}

.abd-app-finance-card.association-health {
    background: #fbf7ff;
}

.abd-app-finance-card.association-clinic,
.abd-app-finance-card.association-vet {
    background: #f7f8ff;
}

.abd-app-finance-association-head.association-general {
    background: #e2ece3;
    color: #705019;
    border-color: #ead7ac;
}

.abd-app-finance-association-head.association-animal {
    background: #e9f6fb;
    color: #1f6f8b;
    border-color: #c8e8f3;
}

.abd-app-finance-association-head.association-litter {
    background: #eef8ef;
    color: #2d7a4d;
    border-color: #ccebd4;
}

.abd-app-finance-association-head.association-client {
    background: #fff0e4;
    color: #9a5519;
    border-color: #ffd9bd;
}

.abd-app-finance-association-head.association-health {
    background: #f0eafc;
    color: #6d46a6;
    border-color: #dcccf5;
}

.abd-app-finance-association-head.association-clinic,
.abd-app-finance-association-head.association-vet {
    background: #eef2ff;
    color: #394b9f;
    border-color: #d5ddff;
}


/* Portal 1.2.74: referencia del movimiento como texto principal, sin chip superior */
.abd-app-finance-card h4 {
    font-weight: 950;
    line-height: 1.2;
}

.abd-app-finance-association-head {
    display: none !important;
}


/* Portal 1.2.75: colores diferenciados en resumen económico */
.abd-app-finance-summary div {
    position: relative;
    overflow: hidden;
}

.abd-app-finance-summary div::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    border-radius: 18px 0 0 18px;
}

.abd-app-finance-summary .summary-income {
    background: #f3fbf5;
    border-color: #ccebd4;
}

.abd-app-finance-summary .summary-income::before {
    background: #2f9d68;
}

.abd-app-finance-summary .summary-expense {
    background: #fff4f4;
    border-color: #f0c8cc;
}

.abd-app-finance-summary .summary-expense::before {
    background: #c84d55;
}

.abd-app-finance-summary .summary-balance {
    background: #f1fbff;
    border-color: #c8e8f3;
}

.abd-app-finance-summary .summary-balance::before {
    background: #2f8eb8;
}

.abd-app-finance-summary .summary-pending {
    background: #fff7ef;
    border-color: #ffd9bd;
}

.abd-app-finance-summary .summary-pending::before {
    background: #d98b3a;
}


/* Portal 1.2.76: crear ficha completa de animal */
.abd-app-animal-topbar {
    margin-bottom: 18px;
}

.abd-app-animal-create-form {
    max-width: 1120px;
}

.abd-app-form-block {
    padding: 18px;
    border: 1px solid #e1e0d3;
    border-radius: 20px;
    background: #fbfaf5;
    margin-bottom: 18px;
}

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

.abd-app-animal-create-form label {
    display: grid;
    gap: 7px;
    font-weight: 900;
    color: #5f564d;
}

.abd-app-animal-create-form input,
.abd-app-animal-create-form select,
.abd-app-animal-create-form textarea {
    width: 100%;
    border: 1px solid #d6d5c6;
    border-radius: 14px;
    padding: 12px 13px;
    background: #fff;
    color: #111;
    font-weight: 800;
    box-sizing: border-box;
}

.abd-app-submit-wide {
    display: inline-flex;
    justify-content: center;
    min-height: 52px;
    padding: 0 26px;
    border: 0;
    border-radius: 999px;
    background: #4f7357;
    color: #fff;
    font-weight: 950;
    cursor: pointer;
}

@media (max-width: 760px) {
    .abd-app-form-grid {
        grid-template-columns: 1fr;
    }

    .abd-app-submit-wide {
        width: 100%;
    }
}


/* Portal 1.2.77: pestañas internas en crear perro */
.abd-app-animal-form-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0 0 18px;
}

.abd-app-animal-form-tabs button {
    border: 1px solid #e1e0d3;
    border-radius: 999px;
    background: #e2ece3;
    color: #3f5f47;
    min-height: 44px;
    padding: 0 16px;
    font-weight: 950;
    cursor: pointer;
}

.abd-app-animal-form-tabs button.active {
    background: #4f7357;
    color: #fff;
    border-color: #4f7357;
}

.abd-app-animal-form-panel {
    display: none;
}

.abd-app-animal-form-panel.active {
    display: block;
}

.abd-app-animal-create-form .abd-app-form-title p {
    display: none;
}


/* Portal 1.2.78: corrección layout nuevo perro */
.abd-app-animal-create-form {
    display: block !important;
}

.abd-app-animal-create-form .abd-app-animal-form-tabs {
    width: 100%;
}

.abd-app-animal-form-tabs {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 0 0 18px;
}

.abd-app-animal-form-tabs button {
    width: auto !important;
    min-width: 0 !important;
    min-height: 44px !important;
    padding: 0 16px !important;
    border-radius: 999px !important;
    white-space: nowrap;
    flex: 0 0 auto;
}

.abd-app-animal-form-panel {
    width: 100%;
}

.abd-app-secondary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 20px;
    border-radius: 999px;
    background: #e2ece3;
    color: #3f5f47;
    border: 1px solid #e1e0d3;
    text-decoration: none;
    font-weight: 950;
}

.abd-app-secondary-action:hover,
.abd-app-secondary-action:focus {
    background: #efe2bd;
    color: #4f390e;
}


/* Portal 1.2.79: foto de animal como archivo WordPress */
.abd-app-animal-create-form input[type="file"] {
    padding: 10px;
    background: #fff;
}

.abd-app-animal-create-form input[type="file"]::file-selector-button {
    margin-right: 12px;
    border: 1px solid #4f7357;
    border-radius: 999px;
    background: #4f7357;
    color: #fff;
    padding: 10px 14px;
    font-weight: 900;
    cursor: pointer;
}


/* Portal 1.2.82: alta de perro simplificada */
.abd-app-animal-create-form .abd-app-animal-form-tabs {
    margin-bottom: 16px;
}

.abd-app-animal-create-form .abd-app-form-block {
    margin-bottom: 14px;
}


/* Portal 1.2.84: pedigrí externo simplificado */
.abd-app-disabled-action {
    opacity: .55;
    cursor: not-allowed;
    margin-top: 12px;
}

.abd-app-pedigree-import-note {
    margin-top: 14px;
}


/* Portal 1.2.85: importación externa de pedigrí */
.abd-app-external-import-button {
    margin-top: 14px;
}

.abd-app-external-import-button:disabled {
    opacity: .6;
    cursor: wait;
}

.abd-app-pedigree-delete-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.abd-app-pedigree-delete-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.abd-app-inline-link {
    background: none;
    border: 0;
    padding: 0;
    margin: 0;
    font: inherit;
    font-weight: 900;
    color: #3f5f47;
    text-decoration: underline;
    cursor: pointer;
}

.abd-app-external-import-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.abd-app-external-import-row input {
    flex: 1;
    min-width: 220px;
}

.abd-app-external-import-status {
    margin-top: 12px;
    font-weight: 900;
    color: #6b6258;
}

.abd-app-external-import-status:empty {
    display: none;
}

.abd-app-external-import-status.success {
    color: #2f7d4e;
}

.abd-app-external-import-status.error {
    color: #b34242;
}

.abd-app-external-import-preview {
    margin-top: 14px;
    padding: 16px;
    border: 1px solid #e1e0d3;
    border-radius: 18px;
    background: #fff;
}

.abd-app-external-import-preview h4 {
    margin: 0 0 10px;
}

.abd-app-external-import-preview dl {
    display: grid;
    grid-template-columns: minmax(160px, 220px) 1fr;
    gap: 8px 14px;
    margin: 0;
}

.abd-app-external-import-preview dt {
    font-weight: 950;
    color: #6b6258;
}

.abd-app-external-import-preview dd {
    margin: 0;
    white-space: pre-wrap;
    font-weight: 800;
}

@media (max-width: 760px) {
    .abd-app-external-import-preview dl {
        grid-template-columns: 1fr;
    }
}


/* Portal 1.2.90: pedigrí externo del perro, padre y madre */
.abd-app-external-pedigree-grid {
    display: grid;
    gap: 16px;
}

.abd-app-external-pedigree-card {
    padding: 16px;
    border: 1px solid #e1e0d3;
    border-radius: 18px;
    background: #fbfaf5;
}

.abd-app-external-pedigree-card > h4 {
    margin: 0 0 12px;
    font-size: 1.15rem;
}


/* Portal 1.2.93: fotos manuales de padre/madre en pedigrí externo */
.abd-app-external-photo-field {
    display: block;
    margin: 12px 0 0;
    font-weight: 900;
}

.abd-app-external-photo-field input[type="file"] {
    margin-top: 8px;
}


/* Portal 1.2.94: campos editables de importación de pedigrí */
.abd-app-external-import-preview dl {
    display: grid;
    grid-template-columns: minmax(160px, 240px) 1fr;
    gap: 10px 16px;
    align-items: start;
}

.abd-app-external-import-preview dt {
    font-weight: 900;
    color: #6a5f50;
    padding-top: 10px;
}

.abd-app-external-import-preview dd {
    margin: 0;
}

.abd-app-external-edit-field {
    width: 100%;
    min-height: 42px;
    border: 1px solid #e1e0d3;
    border-radius: 12px;
    padding: 10px 12px;
    font: inherit;
    font-weight: 800;
    background: #fff;
}

textarea.abd-app-external-edit-field {
    min-height: 72px;
    resize: vertical;
}


/* Portal 1.2.96: ficha visual de perro */
.abd-app-animal-profile-card {
    margin-bottom: 18px;
}

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

.abd-app-animal-profile-photo,
.abd-app-animal-profile-photo-placeholder {
    width: 220px;
    height: 220px;
    border-radius: 24px;
    object-fit: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #4f7357;
    color: #d8ad44;
    font-size: 56px;
    font-weight: 900;
}

.abd-app-profile-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.abd-app-profile-card {
    border: 1px solid #e1e0d3;
    border-radius: 22px;
    padding: 18px;
    background: #fbfaf5;
}

.abd-app-profile-card h3 {
    margin-top: 0;
}

.abd-app-profile-card-photo img {
    max-width: 180px;
    height: auto;
    border-radius: 18px;
    margin-bottom: 12px;
}

.abd-app-profile-data-grid {
    display: grid;
    grid-template-columns: minmax(130px, 190px) minmax(0, 1fr);
    gap: 8px 14px;
    margin: 0;
}

.abd-app-profile-data-grid dt {
    font-weight: 900;
    color: #6a5f50;
}

.abd-app-profile-data-grid dd {
    margin: 0;
    font-weight: 800;
}

@media (max-width: 960px) {
    .abd-app-animal-profile-main,
    .abd-app-profile-grid {
        grid-template-columns: 1fr;
    }
}


/* Portal 1.3.2: ajuste menor ficha visual */
.abd-app-profile-card a[href] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 6px 12px;
    border-radius: 999px;
    background: #4f7357;
    color: #fff;
    text-decoration: none;
    font-weight: 900;
}

.abd-app-profile-card a[href]:hover {
    text-decoration: none;
    opacity: .9;
}


/* Portal 1.3.3: pedigrí interno/importado */
.abd-app-pedigree-group {
    margin-top: 18px;
}

.abd-app-pedigree-group:first-of-type {
    margin-top: 0;
}

.abd-app-pedigree-group > h3 {
    margin: 0 0 14px;
}

.abd-app-internal-parent-main {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.abd-app-internal-parent-photo .abd-app-animal-profile-photo,
.abd-app-internal-parent-photo .abd-app-animal-profile-photo-placeholder {
    width: 130px;
    height: 130px;
    border-radius: 18px;
    font-size: 34px;
}

.abd-app-internal-parent-card h4 {
    margin: 0 0 6px;
    font-size: 24px;
}

@media (max-width: 960px) {
    .abd-app-internal-parent-main {
        grid-template-columns: 1fr;
    }
}


/* Portal 1.3.4: carga de abuelos importados */
.abd-app-external-pedigree-card-wide {
    grid-column: 1 / -1;
}


/* Portal 1.3.5: diferenciación visual de bloques de pedigrí */
.abd-app-external-pedigree-card {
    position: relative;
    border-width: 2px;
    border-left-width: 10px;
    box-shadow: 0 10px 24px rgba(16, 16, 16, 0.035);
}

.abd-app-external-pedigree-card h4 {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
}

.abd-app-pedigree-card-self {
    border-left-color: #111111;
    background: #fbfaf5;
}

.abd-app-pedigree-card-parent {
    border-left-color: #b88a2d;
    background: #fff8e7;
}

.abd-app-pedigree-card-paternal {
    border-left-color: #3e6f9f;
    background: #f3f8fc;
}

.abd-app-pedigree-card-maternal {
    border-left-color: #4c8a63;
    background: #f4fbf6;
}

.abd-app-external-pedigree-card-wide {
    border-left-color: #d8ad44;
    background: #fff9e9;
}

.abd-app-pedigree-card-self h4::before,
.abd-app-pedigree-card-parent h4::before,
.abd-app-pedigree-card-paternal h4::before,
.abd-app-pedigree-card-maternal h4::before {
    content: "";
    width: 12px;
    height: 12px;
    border-radius: 999px;
    display: inline-block;
    background: currentColor;
}

.abd-app-pedigree-card-self h4 {
    color: #111111;
}

.abd-app-pedigree-card-parent h4 {
    color: #7a5413;
}

.abd-app-pedigree-card-paternal h4 {
    color: #28577f;
}

.abd-app-pedigree-card-maternal h4 {
    color: #356847;
}

.abd-app-external-pedigree-card-wide h4 {
    color: #7a5413;
}

.abd-app-external-pedigree-card-wide .abd-app-muted {
    color: #6a5f50;
    font-weight: 700;
}


/* Portal 1.3.6: ficha por pestañas */
.abd-app-profile-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 18px 0 18px;
}

.abd-app-profile-tabs a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 18px;
    border-radius: 999px;
    background: #e2ece3;
    color: #3f5f47;
    border: 1px solid #e1e0d3;
    text-decoration: none;
    font-weight: 900;
}

.abd-app-profile-tabs a.is-active {
    background: #4f7357;
    color: #ffffff;
    border-color: #4f7357;
}

.abd-app-tab-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
}

.abd-app-tab-section-head h2 {
    margin: 0 0 6px;
}

.abd-app-tab-section-head p {
    margin: 0;
    color: #6a5f50;
}

@media (max-width: 760px) {
    .abd-app-tab-section-head {
        display: block;
    }

    .abd-app-tab-section-head .abd-app-secondary-action {
        margin-top: 14px;
    }
}


/* Portal 1.3.7: información completa y árbol visual */
.abd-app-info-summary-card {
    margin-bottom: 18px;
}

.abd-app-info-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 28px;
    margin-top: 18px;
}

.abd-app-info-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
    margin-bottom: 18px;
}

.abd-app-info-block {
    background: #fbfaf5;
    border: 1px solid #e1e0d3;
    border-radius: 22px;
    padding: 20px;
}

.abd-app-info-block-head h3 {
    margin: 0 0 14px;
}

.abd-app-weight-chart {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    min-height: 190px;
    overflow-x: auto;
    padding: 18px 4px 4px;
}

.abd-app-weight-bar-wrap {
    min-width: 72px;
    text-align: center;
    font-weight: 800;
    color: #6a5f50;
}

.abd-app-weight-bar {
    width: 30px;
    margin: 0 auto 8px;
    border-radius: 12px 12px 4px 4px;
    background: #4f7357;
}

.abd-app-weight-bar-wrap span,
.abd-app-weight-bar-wrap small {
    display: block;
}

.abd-app-weight-bar-wrap small {
    margin-top: 4px;
    font-size: 11px;
    opacity: .75;
}

.abd-app-pedigree-tree {
    display: grid;
    gap: 24px;
    margin: 24px 0;
    position: relative;
}

.abd-app-pedigree-tree-generation {
    display: grid;
    gap: 18px;
    justify-items: center;
    position: relative;
}

.abd-app-pedigree-tree-generation-main {
    grid-template-columns: minmax(220px, 320px);
    justify-content: center;
}

.abd-app-pedigree-tree-generation-parents {
    grid-template-columns: repeat(2, minmax(220px, 320px));
    justify-content: center;
}

.abd-app-pedigree-tree-generation-grandparents {
    grid-template-columns: repeat(4, minmax(170px, 240px));
    justify-content: center;
}

.abd-app-pedigree-tree-generation-parents::before,
.abd-app-pedigree-tree-generation-grandparents::before {
    content: "";
    position: absolute;
    top: -14px;
    left: 12%;
    right: 12%;
    height: 2px;
    background: #d8c59a;
}

.abd-app-pedigree-tree-node {
    width: 100%;
    min-height: 160px;
    border: 2px solid #e1e0d3;
    border-top: 8px solid #101010;
    border-radius: 22px;
    padding: 14px;
    background: #fbfaf5;
    text-align: center;
    box-shadow: 0 12px 24px rgba(16, 16, 16, 0.04);
}

.abd-app-pedigree-tree-label {
    display: inline-flex;
    margin-bottom: 10px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #e2ece3;
    color: #3f5f47;
    font-weight: 900;
    font-size: 12px;
}

.abd-app-pedigree-tree-photo img,
.abd-app-pedigree-tree-photo .abd-app-animal-profile-photo,
.abd-app-pedigree-tree-photo .abd-app-animal-profile-photo-placeholder {
    width: 82px;
    height: 82px;
    border-radius: 16px;
    object-fit: cover;
    margin: 0 auto 10px;
}

.abd-app-pedigree-tree-node strong {
    display: block;
    margin-bottom: 6px;
    font-size: 15px;
}

.abd-app-pedigree-tree-node span {
    display: block;
    color: #6a5f50;
    font-size: 12px;
    font-weight: 700;
}

.abd-app-pedigree-tree-node a {
    display: inline-flex;
    margin-top: 10px;
    padding: 5px 10px;
    border-radius: 999px;
    background: #4f7357;
    color: #fff;
    text-decoration: none;
    font-weight: 900;
    font-size: 12px;
}

.abd-app-pedigree-details {
    margin-top: 28px;
}

@media (max-width: 1100px) {
    .abd-app-pedigree-tree-generation-grandparents {
        grid-template-columns: repeat(2, minmax(180px, 1fr));
    }
}

@media (max-width: 760px) {
    .abd-app-info-summary-grid,
    .abd-app-info-grid,
    .abd-app-pedigree-tree-generation-parents,
    .abd-app-pedigree-tree-generation-grandparents {
        grid-template-columns: 1fr;
    }
}


/* Portal 1.3.8: pedigrí con microfichas */
.abd-app-pedigree-node-detail {
    margin-top: 18px;
}

.abd-app-pedigree-tree-node-empty {
    opacity: .45;
    background: #f6f5ef;
}

.abd-app-pedigree-tree-node-empty span {
    font-style: italic;
}

.abd-app-pedigree-tree-internal {
    overflow-x: auto;
    padding-bottom: 14px;
}

.abd-app-pedigree-tree-internal .abd-app-pedigree-tree-generation {
    min-width: 720px;
}

.abd-app-pedigree-tree-node a {
    cursor: pointer;
}

.abd-app-pedigree-tree-node a:hover,
.abd-app-pedigree-node-detail a:hover {
    opacity: .88;
}


/* Portal 1.3.9: árbol interno completo y ramas externas terminales */
.abd-app-pedigree-external-branch {
    margin-top: 26px;
    padding-top: 18px;
    border-top: 2px solid #d8c59a;
}

.abd-app-pedigree-external-branch h4 {
    margin: 0 0 16px;
}

.abd-app-pedigree-tree-node-external {
    border-top-color: #b88a2d;
    background: #fff8e7;
}

.abd-app-pedigree-tree-manual-badge {
    margin-left: 4px;
    font-weight: 400;
    font-size: 10px;
    opacity: .75;
}


/* Portal 1.3.10: microficha externa limpia */
.abd-app-pedigree-node-detail {
    max-width: 980px;
}

.abd-app-pedigree-node-detail > .abd-app-secondary-action {
    margin-bottom: 28px;
}

.abd-app-pedigree-node-detail h1 {
    margin: 24px 0 28px;
    font-size: clamp(34px, 5vw, 58px);
}

.abd-app-pedigree-node-detail .abd-app-animal-profile-main {
    align-items: flex-start;
}

.abd-app-pedigree-node-detail .abd-app-animal-profile-photo,
.abd-app-pedigree-node-detail img.abd-app-animal-profile-photo {
    width: 230px;
    height: 230px;
    border-radius: 28px;
    object-fit: cover;
}

.abd-app-pedigree-tree-node a {
    white-space: nowrap;
}


/* Portal 1.3.11: detalle básico de nodos del pedigrí */
.abd-app-pedigree-node-actions {
    margin-top: 22px;
}


/* Portal 1.3.12: microficha de pedigrí sin textos auxiliares */
.abd-app-pedigree-node-detail h1 {
    margin-top: 0;
}

.abd-app-pedigree-node-detail .abd-app-animal-profile-main {
    margin-top: 24px;
}


/* ---------------------------------------------------------------------------
   Secciones nuevas: configuración, informes, reproducción, pedigrí
   --------------------------------------------------------------------------- */
.abd-app-notice-warning { background: #fff8e6; border: 1px solid #ecd28f; color: #6b4e08; }
.abd-app-notice-info { background: #eef4fb; border: 1px solid #bcd2ea; color: #1f4468; }
.abd-app-notice p { margin: 8px 0 0; font-weight: 600; }
.abd-app-notice p:first-child { margin-top: 0; }

.abd-app-panel-spaced { margin-top: 18px; }
.abd-app-group-tabs { margin-bottom: 18px; }

.abd-app-check { display: flex !important; grid-template-columns: none; align-items: center; gap: 9px; cursor: pointer; font-weight: 800; }
.abd-app-client-form .abd-app-check input[type="checkbox"],
.abd-app-check input[type="checkbox"] { width: 18px; height: 18px; flex: 0 0 18px; padding: 0; margin: 0; }

.abd-app-field-label { display: block; color: #625b52; font-weight: 900; font-size: 13px; margin-bottom: 7px; }
.abd-app-logo-field { display: grid; gap: 9px; }
.abd-app-logo-preview img { max-width: 160px; height: auto; border-radius: 14px; border: 1px solid #d6d5c6; background: #fff; padding: 6px; }
.abd-app-logo-field input[type="file"] { border: 1px dashed #d6d5c6; border-radius: 14px; padding: 12px; background: #fbf9f4; }

.abd-app-plain-list { margin: 0 0 18px; padding-left: 20px; columns: 2; column-gap: 28px; }
.abd-app-plain-list li { margin-bottom: 4px; }

.abd-app-danger-zone { border-color: #e3b5b5; }
.abd-app-danger-zone h4 { margin: 18px 0 8px; }
.abd-app-reset-form { display: grid; gap: 14px; max-width: 520px; margin-top: 8px; }
.abd-app-reset-form label { display: grid; gap: 7px; color: #625b52; font-weight: 900; font-size: 13px; }
.abd-app-reset-form input { width: 100%; box-sizing: border-box; border: 1px solid #d6d5c6; border-radius: 14px; padding: 12px 13px; font-weight: 800; }
.abd-app-button-danger { border: 0; border-radius: 999px; padding: 13px 18px; background: #a12626; color: #fff; font-weight: 900; cursor: pointer; justify-self: start; }
.abd-app-button-danger:hover { background: #831c1c; }

@media (max-width: 720px) {
    .abd-app-plain-list { columns: 1; }
}


/* ---------------------------------------------------------------------------
   .abd-app-legacy: pantallas compartidas con wp-admin (informes, etc.)
   Adapta el marcado de wp-admin (nav-tab, form-table, widefat, button...) al estilo del Portal.
   --------------------------------------------------------------------------- */
.abd-app-legacy .wrap { margin: 0; padding: 0; }
.abd-app-legacy .wrap > h1 { display: none; }
.abd-app-legacy h2 { margin: 26px 0 12px; font-size: 22px; letter-spacing: -0.02em; }
.abd-app-legacy h3 { margin: 22px 0 10px; font-size: 17px; }
.abd-app-legacy p { line-height: 1.55; }
.abd-app-legacy .description { color: #776f63; font-size: 12px; margin: 6px 0 0; }

.abd-app-legacy .nav-tab-wrapper { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 18px; padding: 0; border: 0; }
.abd-app-legacy .nav-tab { display: inline-block; padding: 11px 16px; border-radius: 999px; background: #e2ece3; color: #7a5b17; font-weight: 900; font-size: 13px; text-decoration: none; border: 0; margin: 0; }
.abd-app-legacy .nav-tab:hover { background: #cfe0d2; }
.abd-app-legacy .nav-tab-active, .abd-app-legacy .nav-tab-active:hover { background: #4f7357; color: #fff; }

.abd-app-legacy form { background: #fff; border: 1px solid #e1e0d3 !important; border-radius: 24px; padding: 22px !important; box-shadow: 0 18px 45px rgba(40,30,10,.06); }
.abd-app-legacy .form-table { width: 100%; border-collapse: collapse; }
.abd-app-legacy .form-table th { text-align: left; padding: 8px 12px 8px 0; color: #625b52; font-weight: 900; font-size: 13px; width: 130px; vertical-align: middle; }
.abd-app-legacy .form-table td { padding: 8px 18px 8px 0; }
.abd-app-legacy input[type="text"], .abd-app-legacy input[type="date"], .abd-app-legacy input[type="number"],
.abd-app-legacy input[type="search"], .abd-app-legacy select, .abd-app-legacy textarea {
    box-sizing: border-box; max-width: 100%; border: 1px solid #d6d5c6; border-radius: 14px; padding: 10px 12px; background: #fff; color: #111; font-weight: 700; font-size: 14px;
}
.abd-app-legacy .regular-text { width: 25em; }
.abd-app-legacy .large-text { width: 100%; }

.abd-app-legacy .button, .abd-app-legacy input[type="submit"], .abd-app-legacy button.button {
    display: inline-block; border: 0; border-radius: 999px; padding: 11px 18px; background: #e2ece3; color: #4b3a10; font-weight: 900; font-size: 13px; cursor: pointer; text-decoration: none; line-height: 1.2;
}
.abd-app-legacy .button:hover { background: #cfe0d2; }
.abd-app-legacy .button-primary, .abd-app-legacy input.button-primary { background: #4f7357; color: #fff; }
.abd-app-legacy .button-primary:hover { background: #333; }
.abd-app-legacy .button-small { padding: 7px 12px; font-size: 12px; }

.abd-app-legacy table.widefat { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border: 1px solid #e1e0d3; border-radius: 18px; overflow: hidden; margin: 10px 0 18px; }
.abd-app-legacy table.widefat th, .abd-app-legacy table.widefat td { padding: 12px 14px; text-align: left; border-bottom: 1px solid #e2ece3; vertical-align: top; font-size: 14px; }
.abd-app-legacy table.widefat thead th { background: #fbfaf5; color: #625b52; font-weight: 900; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.abd-app-legacy table.widefat.striped tbody tr:nth-child(even) td { background: #fdfbf6; }
.abd-app-legacy table.widefat tfoot td, .abd-app-legacy table.widefat tfoot th { font-weight: 900; background: #fbfaf5; }

.abd-app-legacy .notice { border-radius: 16px; padding: 4px 15px; margin: 0 0 16px; border: 1px solid #d6d5c6; background: #fbf9f4; }
.abd-app-legacy .notice-success { background: #eff8ef; border-color: #b8d9b8; }
.abd-app-legacy .notice-error { background: #fdf1f1; border-color: #e3b5b5; }
.abd-app-legacy .notice-warning { background: #fff8e6; border-color: #ecd28f; }
.abd-app-legacy .notice-info { background: #eef4fb; border-color: #bcd2ea; }
.abd-app-legacy code { background: #e2ece3; padding: 1px 6px; border-radius: 6px; }

@media print {
    .abd-app-shell { display: block !important; }
    .abd-app-main { padding: 0 !important; max-width: none !important; }
    .abd-app-section-head,
    .abd-app-legacy .nav-tab-wrapper,
    .abd-app-legacy form,
    .abd-app-legacy .button,
    .abd-app-legacy button { display: none !important; }
    .abd-app-legacy table.widefat { border-radius: 0; }
}

.abd-app-inline-form { display: inline; margin: 0; }
button.abd-app-small-button { border: 0; cursor: pointer; font-family: inherit; }
/* !important: la regla base de .abd-app-small-button fuerza color blanco y dejaba el texto invisible sobre este fondo claro. */
.abd-app-small-button.danger { background: #fbeaea; color: #a12626 !important; }
.abd-app-small-button.danger:hover { background: #f5d3d3; color: #831c1c !important; }
.abd-app-table td .abd-app-small-button { margin-right: 4px; }
.abd-app-info-block-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 22px 0 10px; }
.abd-app-info-block-head h3 { margin: 0; }


/* ---------------------------------------------------------------------------
   Libro de registro de entradas y salidas
   --------------------------------------------------------------------------- */
.abd-app-registry-actions { display: flex; gap: 10px; align-items: center; }
.abd-app-registry-table td { vertical-align: top; }
.abd-app-registry-row-entrada .abd-app-pill { background: #eaf5ea; color: #1f5c1f; }
.abd-app-registry-row-salida .abd-app-pill { background: #fdeeea; color: #8a3418; }
.abd-app-registry-row-correccion .abd-app-pill { background: #f1eefc; color: #4c3a94; }
.abd-app-registry-correct { margin-top: 8px; }
.abd-app-registry-correct summary { cursor: pointer; color: #42634a; font-weight: 800; font-size: 12px; }
.abd-app-registry-correct form { display: grid; gap: 6px; margin-top: 6px; }
.abd-app-registry-correct textarea { width: 100%; box-sizing: border-box; border: 1px solid #d6d5c6; border-radius: 10px; padding: 8px; font-size: 13px; }
.abd-app-registry-correction-note { margin: 6px 0 0; font-size: 12px; color: #6b4e08; background: #fff8e6; border-radius: 8px; padding: 6px 8px; }

@media print {
    .abd-app-registry-actions,
    .abd-app-registry-filter,
    .abd-app-registry-correct { display: none !important; }
}

@media print {
    .abd-app-print-hide,
    .abd-app-profile-tabs { display: none !important; }
}

/* Portal 3.7.1: móvil. Menú compacto (marca en una línea + menú en fila deslizable), pestañas
   en una sola fila deslizable y ficha más pequeña, en vez de apilar todo a pantalla completa. */
@media (max-width: 760px) {
    .abd-app-sidebar { padding: 12px 14px 10px; }
    .abd-app-brand { margin-bottom: 8px; display: flex; align-items: baseline; gap: 8px; }
    .abd-app-brand span, .abd-app-brand strong { display: inline; font-size: 20px; line-height: 1; }
    .abd-app-brand small { display: inline; margin: 0 0 0 auto; font-size: 11px; }
    .abd-app-nav { display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; scrollbar-width: none; }
    .abd-app-nav::-webkit-scrollbar { display: none; }
    .abd-app-nav-item { flex: 0 0 auto; white-space: nowrap; padding: 8px 12px; font-size: 13px; gap: 6px; }
    .abd-app-nav-item span { width: auto; }

    .abd-app-main { padding: 14px; }
    .abd-app-header { margin-bottom: 14px; }
    .abd-app-header h1 { font-size: 26px; }

    .abd-app-tabs,
    .abd-app-profile-tabs {
        display: flex;
        flex-wrap: nowrap;
        gap: 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 6px;
        scrollbar-width: none;
    }
    .abd-app-tabs::-webkit-scrollbar,
    .abd-app-profile-tabs::-webkit-scrollbar { display: none; }
    .abd-app-tabs a,
    .abd-app-profile-tabs a { flex: 0 0 auto; min-height: 36px; padding: 7px 14px; font-size: 13px; white-space: nowrap; }

    .abd-app-animal-profile-photo,
    .abd-app-animal-profile-photo-placeholder { width: 120px; height: 120px; border-radius: 18px; font-size: 38px; }
    .abd-app-profile-data-grid { grid-template-columns: minmax(100px, 140px) minmax(0, 1fr); gap: 6px 10px; font-size: 14px; }

    .abd-app-animal-form-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .abd-app-animal-form-tabs button { flex: 0 0 auto; white-space: nowrap; }
}

/* Portal 3.9.0: pedigrí en horizontal (como en Afghan Hound Pedigree Database). */
.abd-app-pedchart-controls { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; flex-wrap: wrap; }
.abd-app-pedchart-controls label { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 14px; }
.abd-app-pedchart-controls select { border: 1px solid #d6d5c6; border-radius: 12px; padding: 6px 10px; background: #fff; font-weight: 800; }
.abd-app-pedchart {
    display: flex;
    overflow-x: auto;
    background: #fff;
    border: 1px solid #e1e0d3;
    border-radius: 18px;
}
.abd-app-pedchart-col { display: flex; flex-direction: column; flex: 1 0 168px; min-width: 168px; }
.abd-app-pedchart-cell {
    flex: 1 1 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    padding: 8px 8px; text-align: center;
    border-left: 4px solid #d6d5c6;
    border-bottom: 1px solid #e2ece3;
    box-sizing: border-box;
}
.abd-app-pedchart-cell.is-sire { border-left-color: #9fd3e3; }
.abd-app-pedchart-cell.is-dam { border-left-color: #f2a9bd; }
.abd-app-pedchart-cell.is-root { border-left-color: #111; background: #fbfaf5; }
.abd-app-pedchart-cell.is-imported { background: #fbfaf5; }
.abd-app-pedchart-cell strong { font-size: 13px; line-height: 1.2; font-weight: 800; }
.abd-app-pedchart-cell span { font-size: 12px; color: #6a5f50; }
.abd-app-pedchart-cell em { font-style: normal; font-size: 10px; font-weight: 800; color: #3f5f47; background: #e2ece3; border-radius: 999px; padding: 2px 8px; }
.abd-app-pedchart-cell a { font-size: 11px; font-weight: 800; color: #3f5f47 !important; text-decoration: underline; }
.abd-app-pedchart-photo img,
.abd-app-pedchart-photo .abd-app-animal-profile-photo,
.abd-app-pedchart-photo .abd-app-animal-profile-photo-placeholder {
    width: 56px; height: 56px; border-radius: 10px; object-fit: cover; font-size: 22px;
}
.abd-app-pedchart.is-dense .abd-app-pedchart-photo img,
.abd-app-pedchart.is-dense .abd-app-pedchart-photo .abd-app-animal-profile-photo,
.abd-app-pedchart.is-dense .abd-app-pedchart-photo .abd-app-animal-profile-photo-placeholder { width: 40px; height: 40px; font-size: 16px; }
.abd-app-pedchart-empty { font-size: 11px; color: #a39a88 !important; font-style: italic; }
@media (max-width: 760px) {
    .abd-app-pedchart-col { flex-basis: 150px; min-width: 150px; }
}

/* Portal 3.11.0: listado sin botones (foto/nombre abren la ficha), borrado al pie de la ficha y pestaña Entrega ordenada. */
.abd-app-photo-link { display: inline-block; line-height: 0; border-radius: 12px; }
.abd-app-photo-link:hover { box-shadow: 0 0 0 3px #6b8f71; }
.abd-app-name-link { color: #111 !important; text-decoration: none !important; }
.abd-app-name-link:hover { text-decoration: underline !important; }
.abd-app-danger-footer { display: flex; justify-content: flex-end; margin: 36px 0 8px; padding-top: 18px; border-top: 1px solid #e1e0d3; }
.abd-app-checklist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; margin: 0 0 16px; }
.abd-app-checklist .abd-app-check { display: flex; align-items: flex-start; gap: 10px; font-weight: 800; }
.abd-app-delivery-form input[type="checkbox"] { width: auto; margin-top: 3px; flex: 0 0 auto; }
@media (max-width: 760px) { .abd-app-checklist { grid-template-columns: 1fr; } }

/* Portal 3.12.0: Ficha comercial (PDF para «envíame información del perro»). */
.abd-app-commercial-toolbar { margin: 0 0 16px; }
.abd-app-commercial-toolbar p { margin: 8px 0 0; font-size: 13px; }
.abd-app-commercial-sheet { background: #fff; border: 1px solid #e1e0d3; border-radius: 18px; padding: 26px 28px; max-width: 920px; box-sizing: border-box; color: #111; }
.abd-app-commercial-head { display: flex; align-items: center; gap: 16px; padding-bottom: 14px; border-bottom: 3px solid #6b8f71; margin-bottom: 18px; }
.abd-app-commercial-logo img { width: 72px; height: 72px; object-fit: contain; }
.abd-app-commercial-head h1 { margin: 0; font-size: 26px; letter-spacing: -0.03em; }
.abd-app-commercial-affix { margin: 2px 0 6px; color: #3f5f47; font-weight: 800; font-size: 13px; }
.abd-app-commercial-contact { margin: 6px 0 0; font-size: 12px; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.abd-app-commercial-contact a, .abd-app-commercial-data a { color: #3f5f47; text-decoration: underline; }
.abd-app-commercial-tag { margin-left: auto; background: #4f7357; color: #fff; border-radius: 999px; padding: 6px 14px; font-weight: 900; font-size: 12px; white-space: nowrap; }
.abd-app-commercial-main { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; align-items: start; margin-bottom: 22px; }
.abd-app-commercial-photo img, .abd-app-commercial-photo .abd-app-animal-profile-photo, .abd-app-commercial-photo .abd-app-animal-profile-photo-placeholder { width: 100%; height: auto; max-height: 380px; object-fit: cover; border-radius: 14px; }
.abd-app-commercial-photo .abd-app-animal-profile-photo-placeholder { height: 300px; }
.abd-app-commercial-data h2 { margin: 0; font-size: 28px; letter-spacing: -0.03em; }
.abd-app-commercial-pedname { margin: 2px 0 12px; color: #6a5f50; font-weight: 800; }
.abd-app-commercial-data dl { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 7px 12px; margin: 12px 0 0; font-size: 14px; }
.abd-app-commercial-data dt { font-weight: 900; color: #6a5f50; }
.abd-app-commercial-data dd { margin: 0; font-weight: 700; }
.abd-app-commercial-pedigree h3 { margin: 0 0 10px; font-size: 18px; }
.abd-app-commercial-note { margin: 8px 0 0; font-size: 11px; color: #777; }
.abd-app-commercial-foot { margin-top: 18px; padding-top: 10px; border-top: 1px solid #e1e0d3; font-size: 11px; color: #777; }
.abd-app-pedchart.is-print { overflow: visible; border-radius: 8px; }
.abd-app-pedchart.is-print .abd-app-pedchart-col { min-width: 0; flex-basis: 0; }
.abd-app-pedchart.is-print .abd-app-pedchart-cell { flex-direction: row; justify-content: flex-start; gap: 6px; padding: 2px 5px; text-align: left; overflow: hidden; }
.abd-app-pedchart.is-print .abd-app-pedchart-cell.is-root { flex-direction: column; justify-content: center; text-align: center; }
.abd-app-pedchart.is-print .abd-app-pedchart-text { display: flex; flex-direction: column; min-width: 0; }
.abd-app-pedchart.is-print .abd-app-pedchart-cell strong { font-size: 9.5px; line-height: 1.15; }
.abd-app-pedchart.is-print .abd-app-pedchart-cell span { font-size: 8.5px; }
.abd-app-pedchart.is-print .abd-app-pedchart-photo { flex: 0 0 auto; }
.abd-app-pedchart.is-print .abd-app-pedchart-photo img,
.abd-app-pedchart.is-print .abd-app-pedchart-photo .abd-app-animal-profile-photo,
.abd-app-pedchart.is-print .abd-app-pedchart-photo .abd-app-animal-profile-photo-placeholder { width: 34px; height: 34px; border-radius: 6px; font-size: 14px; }
.abd-app-pedchart.is-print .abd-app-pedchart-cell.is-root .abd-app-pedchart-photo img,
.abd-app-pedchart.is-print .abd-app-pedchart-cell.is-root .abd-app-pedchart-photo .abd-app-animal-profile-photo-placeholder { width: 56px; height: 56px; }
.abd-app-pedchart-cell strong a.abd-app-pedchart-source { font-size: inherit; font-weight: inherit; color: #1f4f8a !important; text-decoration: underline; }
@media (max-width: 760px) {
    .abd-app-commercial-sheet { padding: 16px; }
    .abd-app-commercial-main { grid-template-columns: 1fr; }
    .abd-app-commercial-head { flex-wrap: wrap; }
    .abd-app-commercial-tag { margin-left: 0; }
}
@media print {
    @page { size: A4; margin: 10mm; }
    body.abd-app-body { background: #fff !important; }
    .abd-app-sidebar, .abd-app-header, .abd-app-section-head, .abd-app-profile-tabs, .abd-app-finance-topbar,
    .abd-app-animal-topbar, .abd-app-print-hide, .abd-app-notice, .abd-app-danger-footer { display: none !important; }
    .abd-app-shell { display: block !important; }
    .abd-app-main { padding: 0 !important; max-width: none !important; }
    .abd-app-commercial-sheet { border: 0; border-radius: 0; padding: 0; max-width: none; }
    .abd-app-commercial-main { grid-template-columns: 64mm minmax(0, 1fr); }
    .abd-app-commercial-photo img, .abd-app-commercial-photo .abd-app-animal-profile-photo { max-height: 62mm; width: auto; max-width: 100%; }
    .abd-app-commercial-photo .abd-app-animal-profile-photo-placeholder { height: 62mm; width: 62mm; }
    .abd-app-commercial-head { margin-bottom: 10px; padding-bottom: 8px; }
    .abd-app-commercial-main { margin-bottom: 12px; gap: 14px; }
    .abd-app-commercial-pedigree h3 { break-after: avoid; page-break-after: avoid; margin-bottom: 6px; }
    .abd-app-commercial-sheet, .abd-app-commercial-sheet * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .abd-app-commercial-pedigree, .abd-app-pedchart { break-inside: avoid; page-break-inside: avoid; }
}


/* 3.16.0: gráfica de peso de cada animal */
.abd-app-animal-weight-panel { margin: 0 0 18px; }
.abd-app-weight-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
    gap: 10px;
    margin-top: 12px;
}
.abd-app-weight-stats > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 10px 14px;
    border: 1px solid #e2ece3;
    border-radius: 16px;
    background: #fbfaf5;
}
.abd-app-weight-stats span { font-size: 12px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #6b6257; }
.abd-app-weight-stats strong { font-size: 20px; color: #111; }
.abd-app-weight-stats small { color: #7a7266; }
.abd-app-weight-stats .is-gain { color: #2f7d4f; }
.abd-app-weight-stats .is-loss { color: #a12626; }
/* Una regla antigua de barras (.abd-app-weight-chart) añadía relleno y alto mínimo al SVG: se anula dentro del contenedor de la gráfica de líneas. */
.abd-app-weight-chart-wrap .abd-app-weight-chart { display: block; box-sizing: border-box; padding: 0; min-height: 0; overflow: visible; }
.abd-app-weight-chart-wrap { box-sizing: border-box; }

/* 3.17.0: ficha de cruce (reutiliza la tarjeta resumen de camada) */
.abd-app-litter-summary-card small { display: block; margin-top: 2px; color: #7a7266; }
.abd-app-litter-summary-card strong a { color: inherit; text-decoration: underline; text-decoration-color: #6b8f71; text-underline-offset: 3px; }
.abd-app-mating-detail-panel { max-width: 1060px; }

/* 3.19.0: línea de tiempo del cruce */
.abd-app-timeline { list-style: none; margin: 14px 0 6px; padding: 0 0 0 18px; border-left: 2px solid #e1e0d3; }
.abd-app-timeline li { position: relative; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 0 0 14px 14px; }
.abd-app-timeline li::before { content: ""; position: absolute; left: -26px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: #6b8f71; box-shadow: 0 0 0 3px #fff; }
.abd-app-timeline li.is-result::before { background: #3f6fb5; }
.abd-app-timeline li.is-birth::before { background: #2f9d68; }
.abd-app-timeline li.is-upcoming::before { background: #fff; border: 2px solid #6b8f71; box-sizing: border-box; }
.abd-app-timeline time { min-width: 92px; font-weight: 800; color: #6b6257; font-size: 13px; }
.abd-app-timeline strong { color: #111; }
.abd-app-timeline span { color: #7a7266; font-size: 14px; }

/* 3.21.0: modo solo lectura. La protección real está en el servidor; esto solo quita los botones que no sirven. */
.abd-app-readonly-banner {
    margin: 0 0 18px;
    padding: 12px 16px;
    border: 1px solid #e1e0d3;
    border-left: 5px solid #6b8f71;
    border-radius: 14px;
    background: #fbfaf5;
    color: #5f5a52;
}
.abd-app-readonly form[method="post"]:not(.abd-app-keep),
.abd-app-readonly .abd-app-danger-footer,
.abd-app-readonly .abd-app-small-button.danger,
.abd-app-readonly a[href*="tab=editar"],
.abd-app-readonly a[href*="tab=nuevo"],
.abd-app-readonly a[href*="tab=nueva"],
.abd-app-readonly a[href*="tab=generar"],
.abd-app-readonly a[href*="tab=entrada"],
.abd-app-readonly a[href*="tab=salida"],
.abd-app-readonly a[href*="vtab=nuevo"],
.abd-app-readonly a[href*="vtab=editar"],
.abd-app-readonly a[href*="sub=nueva"],
.abd-app-readonly a[href*="sub=editar"],
.abd-app-readonly a[href*="pedigree_action="],
.abd-app-readonly a[href*="edit_record="],
.abd-app-readonly a[href*="abd_export"],
.abd-app-readonly a[href*="abd_registry_export"],
.abd-app-readonly a[href*="export_csv"],
.abd-app-readonly a[href*="tab=exportacion"],
.abd-app-readonly .abd-app-export-button {
    display: none !important;
}

/* 3.21.2: antepasado del que solo se conoce el nombre (viene de la ficha importada de su hijo/a) */
.abd-app-pedchart-cell.is-named { background: #fbfaf5; }
.abd-app-pedchart-cell.is-named strong { font-weight: 600; font-style: italic; }
.abd-app-pedchart-cell.is-named em { color: #8a7d62; }

/* 3.23.0: pesos anotados en la gráfica, diferencias y ficha del cachorro desde la camada */
.abd-app-chart-value { font-size: 12px; font-weight: 800; fill: #222; }
.abd-app-chart-diff { font-size: 11px; font-weight: 800; }
.abd-app-chart-diff.is-gain, .abd-app-weight-delta.is-gain { fill: #2f7d4f; color: #2f7d4f; }
.abd-app-chart-diff.is-loss, .abd-app-weight-delta.is-loss { fill: #a12626; color: #a12626; }
.abd-app-weight-delta { font-weight: 800; margin-right: 6px; }
.abd-app-animal-weight-panel .abd-app-weight-table { margin-top: 14px; }
.abd-app-animal-weight-panel .abd-app-weight-table .abd-app-table { min-width: 0; width: 100%; }
a.abd-app-puppy-photo { display: block; color: inherit; text-decoration: none; }
.abd-app-puppy-info h4 a { color: inherit; text-decoration: underline; text-decoration-color: #6b8f71; text-underline-offset: 3px; }

/* Portal 3.24.0: paleta Marfil y salvia, menú claro y botón "Cerrar sesión" al pie del menú. */
.abd-app-brand small { color: #42634a; }
.abd-app-sidebar-foot { margin-top: auto; padding-top: 18px; }
.abd-app-nav-item.abd-app-logout { border-top: 1px solid rgba(0,0,0,.12); border-radius: 0 0 14px 14px; padding-top: 14px; }
.abd-app-nav-item.abd-app-logout:hover { background: rgba(0,0,0,.07); border-radius: 14px; }
@media (max-width: 760px) {
    .abd-app-sidebar { display: block; border-right: 0; border-bottom: 1px solid #d6d5c6; }
    .abd-app-sidebar-foot { display: none; }
    .abd-app-nav-item.abd-app-logout-mobile { display: inline-flex; }
}
@media (min-width: 761px) {
    .abd-app-nav-item.abd-app-logout-mobile { display: none; }
}
.abd-app-nav-item.abd-app-logout-mobile { border-top: 0; border-radius: 14px; padding-top: 8px; }

/* Portal 3.25.2: el pedigrí en pantalla es una cuadrícula; las filas crecen para que quepa el contenido
   de la última columna (nombres largos con foto, año y enlace) sin que las casillas se monten unas sobre otras. */
.abd-app-pedchart:not(.is-print) { display: grid; grid-template-columns: repeat(var(--abd-ped-cols, 4), minmax(168px, 1fr)); grid-auto-rows: minmax(var(--abd-ped-leaf, 124px), auto); }
.abd-app-pedchart:not(.is-print) .abd-app-pedchart-col { display: contents; }
.abd-app-pedchart:not(.is-print) .abd-app-pedchart-cell { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 760px) {
    .abd-app-pedchart:not(.is-print) { grid-template-columns: repeat(var(--abd-ped-cols, 4), minmax(150px, 1fr)); }
}

/* Portal 3.26.4: la edad del listado lleva años y meses; no se parte en varias líneas. */
.abd-app-table td.abd-app-age-cell { white-space: nowrap; }

/* Portal 3.27.0: panel «En tratamiento» del Inicio; en pantallas estrechas el aviso de fin puede partirse en dos líneas. */
.abd-app-row-treatment > div { min-width: 0; }
.abd-app-row-treatment em { white-space: normal; text-align: right; max-width: 40%; }

/* Portal 3.27.1: notas de la camada en su ficha. */
.abd-app-litter-notes { background: #fff; border: 1px solid #e1e0d3; border-radius: 18px; padding: 16px 20px; margin: 0 0 18px; }
.abd-app-litter-notes h3 { margin: 0 0 8px; font-size: 15px; letter-spacing: -0.01em; }
.abd-app-litter-notes p { margin: 0; color: #2e3a30; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }

/* Portal 3.27.2: tabla de pesos de la camada, última variación frente a la pesada anterior. */
.abd-app-weight-delta-cell { white-space: nowrap; }
.abd-app-weight-delta-cell small { display: block; color: #6a5f50; font-size: 11px; font-weight: 600; }
.abd-app-weight-delta-cell.is-gain { color: #1f7a4c; font-weight: 800; }
.abd-app-weight-delta-cell.is-loss { color: #a12626; font-weight: 800; }

/* Portal 3.28.0: animales de otro propietario. */
.abd-app-owner-note { display: block; margin-top: 3px; color: #6a5f50; font-size: 11px; font-weight: 700; }
.abd-app-owner-warning { margin: 8px 0 0; padding: 10px 12px; background: #fff8e6; border: 1px solid #ecd28f; border-radius: 12px; color: #6b4e08; font-size: 13px; }

/* Portal 3.29.0: monta con un animal de otro propietario (contrato y dinero). */
.abd-app-monta-docs span { display: inline-block; margin: 0 6px 0 4px; padding: 2px 8px; background: #e2ece3; border-radius: 999px; font-size: 12px; font-weight: 700; }
.abd-app-monta-form { margin-top: 12px; border: 1px solid #e1e0d3; border-radius: 14px; padding: 6px 14px 14px; background: #fbfaf5; }
.abd-app-monta-form > summary { cursor: pointer; font-weight: 800; padding: 8px 0; }
.abd-app-monta-totals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 12px; }
.abd-app-monta-totals > div { background: #fbfaf5; border: 1px solid #e1e0d3; border-radius: 14px; padding: 10px 14px; }
.abd-app-monta-totals span { display: block; color: #6a5f50; font-size: 12px; font-weight: 800; }
.abd-app-monta-totals strong { font-size: 22px; }
.abd-app-monta-totals strong.is-gain { color: #1f7a4c; }
.abd-app-monta-totals strong.is-loss { color: #a12626; }
.abd-app-monta-totals small { display: block; color: #6a5f50; font-size: 11px; font-weight: 700; }
.abd-app-inline-form { display: flex; align-items: center; gap: 8px; margin: 0; }
.abd-app-pill-pending { background: #fff8e6; color: #6b4e08; }

/* Portal 3.29.1: el botón secundario de las cabeceras («Ficha comercial», «Volver a…») tenía fondo verde oscuro y
   texto verde oscuro (la regla de .abd-app-section-actions pisaba el fondo claro): se lee otra vez. */
.abd-app-section-actions .abd-app-small-button.secondary { background: #e2ece3; color: #3f5f47 !important; }
.abd-app-section-actions .abd-app-small-button.secondary:hover { background: #cfe0d2; }

/* Hoja comercial neutra: sin cabecera ni pie del criadero, en pantalla y al imprimir. */
.abd-app-commercial-neutral-toggle { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; font-weight: 700; font-size: 13px; }
.abd-app-commercial-sheet.is-neutral .abd-app-commercial-head,
.abd-app-commercial-sheet.is-neutral .abd-app-commercial-foot { display: none !important; }
button.abd-app-primary-action { border: 0; border-radius: 999px; background: #4f7357; color: #fff; padding: 10px 18px; font-family: inherit; font-weight: 800; font-size: 13px; cursor: pointer; }
button.abd-app-primary-action:hover { background: #3f5f47; }

/* Portal 3.30.0: precio y cobros de la venta de un animal. */
.abd-app-sale-totals { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin: 12px 0; }
.abd-app-sale-totals > div { background: #fbfaf5; border: 1px solid #e1e0d3; border-radius: 14px; padding: 10px 14px; }
.abd-app-sale-totals span { display: block; color: #6a5f50; font-size: 12px; font-weight: 800; }
.abd-app-sale-totals strong { font-size: 22px; }
.abd-app-sale-totals strong.is-gain { color: #1f7a4c; }
.abd-app-sale-totals strong.is-loss { color: #a12626; }
.abd-app-sale-totals small { display: block; color: #6a5f50; font-size: 11px; font-weight: 700; }

.abd-app-sale-totals strong.is-text { font-size: 15px; line-height: 1.3; display: block; padding-top: 4px; }
