/* 개체 목록, 상세정보, 기록 입력 화면 */

.page-title-copy h1 {
    margin: 0;
}

.page-title-copy p {
    margin: 5px 0 0;
    color: var(--text-secondary);
    font-size: 16px;
}

/* Cow list */
.cow-type-tabs {
    margin-bottom: 16px;
}

.cow-type-tabs .tab-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.cow-filter-panel {
    display: grid;
    grid-template-columns: minmax(320px, 1.35fr) minmax(430px, 1fr);
    gap: 22px;
    margin-bottom: 18px;
    padding: 21px;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--shadow-sm);
}

.cow-search-main > label,
.select-filter > span,
.pregnancy-filter legend {
    display: block;
    margin-bottom: 7px;
    color: #42564c;
    font-size: 14px;
    font-weight: 850;
}

.cow-search-control {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 9px;
}

.cow-search-control input {
    width: 100%;
    min-width: 0;
}

.cow-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
}

.cow-advanced-filters {
    min-width: 0;
}

.cow-advanced-filters > summary {
    display: none;
}

.cow-advanced-filters > .cow-filter-row {
    display: flex;
}

.select-filter {
    flex: 0 1 145px;
}

.select-filter select {
    width: 100%;
}

.pregnancy-filter {
    min-width: 240px;
    margin: 0;
    padding: 0;
    border: 0;
}

.cow-filter-row .filter-group {
    min-height: 52px;
}

.cow-filter-row .filter-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.clear-filter-link {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    padding: 8px 7px;
    color: #64756c;
    font-size: 14px;
    font-weight: 800;
}

.cow-list-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 12px;
}

.cow-list-meta p {
    margin: 0;
    color: #5c6e64;
    font-size: 15px;
}

.cow-list-meta p strong {
    margin-right: 4px;
    color: #1e523c;
    font-size: 24px;
}

.cow-list-meta .per-page-selector {
    margin: 0;
}

.cow-list-card {
    padding: 0;
    overflow: hidden;
}

.cow-list-card .table-container {
    border: 0;
    border-radius: 0;
}

.cow-list-table {
    table-layout: fixed;
}

.cow-list-table th:nth-child(1) { width: 20%; }
.cow-list-table th:nth-child(2) { width: 18%; }
.cow-list-table th:nth-child(3) { width: 24%; }
.cow-list-table th:nth-child(4) { width: 20%; }
.cow-list-table th:nth-child(5) { width: 18%; }

.cow-list-table th,
.cow-list-table td {
    padding: 16px 18px;
}

.cow-identity-link {
    display: inline-block;
    color: #155139;
    font-size: 18px;
    font-weight: 900;
    letter-spacing: 0.025em;
    text-decoration: none;
}

.cow-identity-link:hover {
    text-decoration: underline;
}

.cow-row-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
    margin-top: 6px;
}

.mini-label {
    display: inline-flex;
    min-height: 27px;
    align-items: center;
    padding: 3px 8px;
    border-radius: 999px;
    background: #eff2f0;
    color: #52645a;
    font-size: 13px;
    font-weight: 850;
}

.cow-age-cell strong,
.cow-age-cell small,
.cow-location-cell strong {
    display: block;
}

.cow-age-cell strong,
.cow-location-cell strong,
.cow-current-state strong {
    color: #2a3e34;
    font-size: 15px;
}

.cow-age-cell small {
    margin-top: 3px;
    color: #7b8780;
    font-size: 12px;
}

.cow-current-state .important,
.cow-status-message.important {
    color: #b13d36;
}

.location-cctv-link {
    margin-top: 5px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #2472a9;
    font-size: 13px;
    font-weight: 850;
    text-decoration: underline;
    cursor: pointer;
}

.cow-row-actions {
    white-space: nowrap;
}

.cow-row-actions .btn {
    margin: 2px;
}

.cow-row-actions .memo-btn {
    border-color: #ccd7d0;
    background: #fff;
    color: #365044;
}

.cow-card-main {
    display: block;
    color: inherit;
    text-decoration: none;
}

.cow-card-facts {
    display: grid;
    grid-template-columns: 0.7fr 1fr 1.5fr;
    gap: 7px;
    padding: 14px 0;
}

.cow-card-facts > span {
    min-width: 0;
    padding-right: 7px;
    border-right: 1px solid #e2e7e4;
}

.cow-card-facts > span:last-child {
    padding-right: 0;
    border-right: 0;
}

.cow-card-facts small,
.cow-card-facts strong {
    display: block;
}

.cow-card-facts small {
    color: #758179;
    font-size: 12px;
}

.cow-card-facts strong {
    overflow: hidden;
    margin-top: 2px;
    color: #283c32;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cow-status-message {
    margin: 0 0 12px;
    padding: 9px 11px;
    border-radius: 9px;
    background: #f2f5f3;
    color: #477060;
    font-size: 13px;
    font-weight: 800;
}

.cow-card-actions .cow-card-detail {
    flex: 1 1 auto;
}

/* Cow detail */
.cow-detail-page {
    max-width: 1280px;
    margin: 0 auto;
}

.detail-back-link {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    margin-bottom: 12px;
    color: #50675b;
    font-size: 15px;
    font-weight: 850;
    text-decoration: none;
}

.detail-back-link:hover {
    color: #174f39;
    text-decoration: underline;
}

.cow-profile-hero {
    display: grid;
    grid-template-columns: minmax(250px, 0.75fr) minmax(350px, 1fr);
    gap: 22px 34px;
    align-items: center;
    margin-bottom: 16px;
    padding: 28px 30px;
    border-radius: 21px;
    background: #1f5d45;
    color: #fff;
    box-shadow: var(--shadow-md);
}

.profile-label {
    display: block;
    margin-bottom: 3px;
    color: #f1c77e;
    font-size: 14px;
    font-weight: 900;
}

.cow-profile-identity h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(31px, 4vw, 48px);
    letter-spacing: 0.02em;
}

.profile-badges {
    display: flex;
    gap: 7px;
    align-items: center;
    margin-top: 10px;
}

.profile-gender {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    font-size: 14px;
    font-weight: 850;
}

.cow-profile-hero .badge {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.94);
}

.cow-profile-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 14px;
}

.cow-profile-summary div {
    padding: 14px;
    border-right: 1px solid rgba(255, 255, 255, 0.16);
}

.cow-profile-summary div:last-child {
    border-right: 0;
}

.cow-profile-summary dt {
    color: rgba(255, 255, 255, 0.64);
    font-size: 12px;
    font-weight: 800;
}

.cow-profile-summary dd {
    overflow: hidden;
    margin: 4px 0 0;
    color: #fff;
    font-size: 16px;
    font-weight: 850;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cow-primary-actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
}

.cow-profile-hero .cow-primary-actions .btn {
    border-color: rgba(255, 255, 255, 0.28);
    background: #fff;
    color: #1d543e;
}

.cow-profile-hero .cow-primary-actions .btn:nth-child(2) {
    border-color: #f0b352;
    background: #f0b352;
    color: #173b2c;
}

.detail-section-nav {
    position: sticky;
    top: calc(var(--topbar-height) + 8px);
    z-index: 80;
    display: flex;
    gap: 7px;
    margin-bottom: 18px;
    padding: 8px;
    overflow-x: auto;
    border: 1px solid var(--border-color);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow-sm);
}

.detail-section-nav a {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 8px 15px;
    border-radius: 9px;
    color: #466055;
    font-size: 14px;
    font-weight: 850;
    text-decoration: none;
    white-space: nowrap;
}

.detail-section-nav a:hover {
    background: #e9f2ec;
    color: #1d563f;
}

.cow-basic-info {
    scroll-margin-top: 145px;
}

.detail-card-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 18px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e1e7e3;
}

.detail-card-heading h2 {
    margin: 0;
    font-size: 25px;
}

.detail-card-heading .eyebrow {
    margin-bottom: 2px;
}

.edit-notice {
    padding: 7px 11px;
    border-radius: 8px;
    background: #fff1d9;
    color: #854707;
    font-size: 13px;
    font-weight: 800;
}

.cow-info-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid #dfe5e1;
    border-left: 1px solid #dfe5e1;
}

.cow-info-field {
    min-width: 0;
    padding: 16px;
    border-right: 1px solid #dfe5e1;
    border-bottom: 1px solid #dfe5e1;
    background: #fff;
}

.cow-info-field label {
    display: block;
    margin-bottom: 7px;
    color: #68786f;
    font-size: 13px;
    font-weight: 850;
}

.cow-info-field .view-mode {
    display: block;
    min-height: 30px;
    color: #24382e;
    font-size: 16px;
    font-weight: 750;
}

.cow-info-field .view-mode small {
    display: block;
    margin-top: 2px;
    color: #79867e;
    font-size: 12px;
    font-weight: 650;
}

.cow-info-field .ear-tag {
    color: #155139;
    font-size: 20px;
    font-weight: 900;
}

.cow-info-field .form-control {
    width: 100%;
    min-width: 0;
}

.featured-field {
    background: #eef5f0;
}

.memo-field {
    grid-column: span 2;
}

.inline-cctv-button {
    margin-left: 6px;
    padding: 3px 8px;
    border: 0;
    border-radius: 7px;
    background: #e4f0f8;
    color: #226894;
    font-size: 12px;
    font-weight: 850;
    cursor: pointer;
}

.detail-edit-actions {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #e1e7e3;
}

.detail-edit-actions[style*="display: block"],
.detail-edit-actions[style*="display: flex"] {
    display: flex !important;
}

/* Genetics is secondary, so keep it collapsed until requested. */
.genetics-card {
    scroll-margin-top: 145px;
}

.genetics-card.is-collapsed > :not(.card-header) {
    display: none !important;
}

.genetics-card.is-collapsed {
    min-height: 74px;
}

.genetics-card .genetics-header {
    min-height: 72px;
    padding: 15px 19px !important;
}

.genetics-expand-button {
    min-height: 38px;
    margin-left: auto;
    padding: 7px 12px;
    border: 1px solid #cbd7d0;
    border-radius: 8px;
    background: #fff;
    color: #315343;
    font-size: 13px;
    font-weight: 850;
    cursor: pointer;
}

/* Breeding / sales record cards */
.cow-detail-page .detail-record-card {
    padding: 0;
    overflow: hidden;
    scroll-margin-top: 145px;
}

.cow-detail-page .detail-record-header {
    min-height: 92px;
    margin: 0;
    padding: 17px 20px;
    background: #f8faf8;
}

.cow-detail-page .detail-record-header h2 {
    margin: 0;
    color: #17392b;
    font-size: 24px;
}

.cow-detail-page .detail-record-header .eyebrow {
    margin-bottom: 1px;
}

.cow-detail-page .detail-record-header small {
    display: block;
    margin-top: 2px;
    color: #728078;
    font-size: 13px;
    font-weight: 650;
}

.cow-detail-page .breeding-accordion {
    padding: 0 20px 16px;
}

.cow-detail-page .breeding-card {
    margin: 11px 0;
    overflow: hidden;
    border: 1px solid #d8e0db;
    border-radius: 12px;
    background: #fff;
}

.cow-detail-page .breeding-card-header {
    min-height: 63px;
    padding: 12px 15px;
    background: #f7f9f7;
}

.cow-detail-page .breeding-card.expanded {
    border-color: #8eb49f;
    box-shadow: 0 4px 14px rgba(37, 87, 64, 0.08);
}

.cow-detail-page .breeding-card.expanded .breeding-card-header {
    background: #eaf3ed;
}

.cow-detail-page .breeding-card-body {
    padding: 16px;
    border-top: 1px solid #dce4df;
}

.cow-detail-page .breeding-detail-grid {
    gap: 8px;
}

.cow-detail-page .breeding-detail-item {
    border: 1px solid #dfe5e1;
    border-radius: 9px;
    background: #fff;
}

.cow-detail-page .attempt-section {
    border-radius: 10px;
}

.cow-detail-page .breeding-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.detail-record-card > p {
    margin: 0;
    padding: 28px 20px !important;
}

.detail-record-card .sales-table {
    width: calc(100% - 40px);
    margin: 18px 20px 22px;
}

.detail-footer-actions {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin: 26px 0 10px;
}

.danger-zone {
    width: min(100%, 310px);
    padding: 10px 13px;
    border: 1px solid #e1c7c4;
    border-radius: 10px;
    background: #fff9f8;
}

.danger-zone summary {
    color: #87605c;
    font-size: 14px;
    font-weight: 850;
    cursor: pointer;
}

.danger-zone p {
    margin: 10px 0;
    color: #7b6a67;
    font-size: 13px;
}

.danger-zone .btn {
    width: 100%;
}

/* Record entry forms */
.workflow-page {
    width: min(100%, 900px);
    margin: 0 auto;
}

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

.workflow-subject {
    display: flex;
    min-height: 88px;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    padding: 16px 20px;
    border: 1px solid #a9c5b5;
    border-radius: 15px;
    background: #e8f2ec;
}

.subject-icon {
    display: flex;
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: #fff;
    color: #235f45;
    font-size: 26px;
    font-weight: 900;
}

.sale-subject-icon {
    color: #8b621d;
}

.workflow-subject > span:nth-child(2) small,
.workflow-subject > span:nth-child(2) strong,
.workflow-subject > span:nth-child(2) em {
    display: block;
}

.workflow-subject small {
    color: #64786d;
    font-size: 13px;
    font-weight: 800;
}

.workflow-subject strong {
    color: #174d37;
    font-size: 21px;
    letter-spacing: 0.02em;
}

.workflow-subject em {
    color: #64766c;
    font-size: 14px;
    font-style: normal;
}

.birth-subject {
    display: grid;
    grid-template-columns: 52px minmax(190px, 1fr) minmax(320px, 1.4fr);
}

.birth-subject dl {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    margin: 0;
    border-left: 1px solid #bfd1c6;
}

.birth-subject dl div {
    padding: 3px 13px;
}

.birth-subject dt {
    color: #708077;
    font-size: 12px;
    font-weight: 800;
}

.birth-subject dd {
    margin: 2px 0 0;
    color: #2c4438;
    font-size: 14px;
    font-weight: 850;
}

.workflow-form {
    padding: 28px;
}

.wide-workflow-form {
    width: min(100%, 1020px);
}

.workflow-section-heading {
    display: flex;
    gap: 13px;
    align-items: center;
    margin-bottom: 22px;
    padding-bottom: 16px;
    border-bottom: 1px solid #dfe5e1;
}

.workflow-section-heading > span {
    display: flex;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #24634b;
    color: #fff;
    font-weight: 900;
}

.workflow-section-heading h2,
.workflow-section-heading p {
    margin: 0;
}

.workflow-section-heading h2 {
    font-size: 22px;
}

.workflow-section-heading p {
    color: #758179;
    font-size: 13px;
}

.secondary-heading {
    margin-top: 34px;
}

.required-mark {
    display: inline-flex;
    margin-left: 4px;
    padding: 2px 6px;
    border-radius: 5px;
    background: #f9e5e3;
    color: #a53831;
    font-size: 11px;
    font-weight: 900;
    vertical-align: 2px;
}

.field-help {
    display: block;
    margin-top: 5px;
    color: #758179;
    font-size: 13px;
}

.form-notice {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 8px;
    padding: 13px 15px;
    border: 1px solid #b7cfe0;
    border-radius: 10px;
    background: #eef6fb;
    color: #2b5e7c;
}

.form-notice > span {
    display: flex;
    width: 27px;
    height: 27px;
    flex: 0 0 27px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: currentColor;
    color: #fff;
    font-size: 14px;
    font-weight: 900;
}

.form-notice p {
    margin: 0;
    font-size: 14px;
    font-weight: 750;
}

.warning-notice {
    border-color: #e4c596;
    background: #fff5e5;
    color: #85510f;
}

.workflow-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 26px;
    padding-top: 20px;
    border-top: 1px solid #dfe5e1;
}

.input-with-unit {
    position: relative;
}

.input-with-unit input {
    width: 100%;
    padding-right: 55px;
}

.input-with-unit span {
    position: absolute;
    top: 50%;
    right: 16px;
    color: #66766d;
    font-size: 14px;
    font-weight: 850;
    transform: translateY(-50%);
}

.choice-fieldset {
    margin: 0;
    padding: 0;
    border: 0;
}

.choice-fieldset legend {
    margin-bottom: 8px;
    color: #31443a;
    font-size: 17px;
    font-weight: 800;
}

.large-choice-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 9px;
}

.large-choice-group label {
    position: relative;
    cursor: pointer;
}

.large-choice-group input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.large-choice-group span {
    display: flex;
    min-height: 58px;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border: 2px solid #cbd5cf;
    border-radius: 11px;
    background: #fff;
    color: #465b50;
    font-weight: 850;
}

.large-choice-group input:checked + span {
    border-color: #24634b;
    background: #e6f1ea;
    color: #174e37;
}

.large-choice-group input:focus-visible + span {
    outline: 4px solid #e9a23b;
    outline-offset: 3px;
}

@media (max-width: 1120px) {
    .cow-filter-panel {
        grid-template-columns: 1fr;
    }

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

    .memo-field {
        grid-column: span 3;
    }
}

@media (max-width: 900px) {
    .cow-filter-panel {
        gap: 16px;
        padding: 15px;
    }

    .cow-filter-row {
        display: grid;
        grid-template-columns: 0.85fr 1.5fr;
        align-items: end;
    }

    .select-filter,
    .pregnancy-filter {
        min-width: 0;
    }

    .clear-filter-link {
        grid-column: 1 / -1;
        justify-content: center;
    }

    .cow-list-card {
        padding: 0;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    .cow-list-card .cow-card {
        padding: 16px;
    }

    .cow-list-card .cow-card-header {
        padding: 0 0 12px;
        background: transparent;
    }

    .cow-list-card .cow-card-actions {
        display: flex;
        gap: 7px;
        padding-top: 12px;
    }

    .cow-list-card .cow-card-actions .btn {
        min-height: 44px !important;
    }

    .cow-profile-hero {
        grid-template-columns: 1fr;
        padding: 23px 20px;
    }

    .cow-profile-summary {
        grid-template-columns: repeat(3, 1fr);
    }

    .cow-primary-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .detail-section-nav {
        top: calc(var(--topbar-height) + 5px);
        margin-right: -17px;
        margin-left: -17px;
        border-right: 0;
        border-left: 0;
        border-radius: 0;
    }

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

    .memo-field {
        grid-column: span 2;
    }

    .cow-detail-page .breeding-accordion {
        padding: 0 12px 12px;
    }

    .cow-detail-page .breeding-card-body {
        padding: 12px;
    }

    .birth-subject {
        grid-template-columns: 52px 1fr;
    }

    .birth-subject dl {
        grid-column: 1 / -1;
        border-top: 1px solid #bfd1c6;
        border-left: 0;
        padding-top: 10px;
    }
}

@media (max-width: 620px) {
    .cow-list-header {
        display: flex;
        align-items: flex-end;
        gap: 10px;
    }

    .cow-list-header .page-title-copy {
        flex: 1;
        min-width: 0;
    }

    .cow-list-header .page-title-copy .eyebrow,
    .cow-list-header .page-title-copy p {
        display: none;
    }

    .cow-list-header .header-actions {
        flex: 0 0 auto;
    }

    .cow-list-header .header-actions .btn {
        width: auto;
        min-height: 48px;
        padding: 9px 12px;
        font-size: 14px;
    }

    .page-title-copy p {
        font-size: 14px;
    }

    .cow-type-tabs {
        margin-bottom: 12px;
    }

    .cow-filter-row {
        grid-template-columns: 1fr;
    }

    .cow-advanced-filters > summary {
        display: flex;
        min-height: 52px;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        padding: 10px 13px;
        border: 1px solid #cbd5cf;
        border-radius: 10px;
        background: #f7f9f7;
        color: #334d40;
        font-size: 14px;
        font-weight: 850;
        cursor: pointer;
    }

    .cow-advanced-filters > summary span {
        color: #6e7d75;
        font-size: 12px;
        font-weight: 700;
    }

    .cow-advanced-filters:not([open]) > .cow-filter-row {
        display: none;
    }

    .cow-advanced-filters[open] > .cow-filter-row {
        display: grid;
        margin-top: 12px;
    }

    .cow-search-main > label,
    .select-filter > span,
    .pregnancy-filter legend {
        font-size: 13px;
    }

    .cow-search-control {
        grid-template-columns: 1fr 76px;
    }

    .cow-search-control input,
    .select-filter select {
        min-height: 52px;
    }

    .cow-filter-row .filter-group {
        min-height: 50px;
    }

    .cow-filter-row .filter-label {
        min-height: 38px;
        padding: 6px 9px;
        font-size: 14px;
    }

    .cow-list-meta {
        align-items: flex-end;
    }

    .cow-list-meta .per-page-selector {
        display: none;
    }

    .cow-card-facts {
        grid-template-columns: 0.6fr 1fr 1.6fr;
    }

    .cow-profile-hero {
        gap: 18px;
        padding: 20px 17px;
        border-radius: 17px;
    }

    .cow-profile-identity h1 {
        font-size: 32px;
    }

    .cow-profile-summary div {
        padding: 10px 8px;
    }

    .cow-profile-summary dd {
        font-size: 13px;
    }

    .cow-primary-actions {
        gap: 7px;
    }

    .cow-primary-actions .btn {
        min-height: 50px;
        padding: 9px 8px;
        font-size: 14px;
    }

    .cow-basic-info {
        padding: 16px;
    }

    .detail-card-heading {
        align-items: flex-start;
    }

    .edit-notice {
        max-width: 145px;
    }

    .cow-info-grid {
        grid-template-columns: 1fr;
        border: 0;
    }

    .cow-info-field,
    .featured-field {
        display: grid;
        grid-template-columns: 118px 1fr;
        align-items: center;
        gap: 10px;
        padding: 13px 0;
        border-right: 0;
        border-bottom: 1px solid #dfe5e1;
        background: #fff;
    }

    .cow-info-field label {
        margin: 0;
    }

    .cow-info-field .view-mode {
        min-width: 0;
        min-height: auto;
        overflow-wrap: anywhere;
    }

    .cow-info-field .form-control {
        grid-column: 1 / -1;
    }

    .memo-field {
        grid-column: auto;
        align-items: start;
    }

    .detail-edit-actions {
        position: sticky;
        bottom: calc(76px + env(safe-area-inset-bottom));
        z-index: 70;
        margin: 16px -16px -16px;
        padding: 12px 16px;
        background: #fff;
        box-shadow: 0 -6px 18px rgba(29, 67, 49, 0.1);
    }

    .detail-edit-actions .btn {
        flex: 1;
    }

    .genetics-card .genetics-header {
        padding: 13px !important;
    }

    .genetics-card .genetics-title {
        width: 100%;
    }

    .cow-detail-page .detail-record-header {
        display: grid;
        padding: 15px;
    }

    .cow-detail-page .detail-record-header .header-actions {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        width: 100%;
    }

    .cow-detail-page .breeding-summary-top {
        row-gap: 5px;
    }

    .cow-detail-page .breeding-card-actions .btn,
    .cow-detail-page .breeding-card-actions form {
        flex: 1 1 120px;
    }

    .cow-detail-page .breeding-card-actions form .btn {
        width: 100%;
    }

    .detail-record-card .sales-table {
        width: calc(100% - 24px);
        margin: 12px;
    }

    .detail-footer-actions {
        flex-direction: column;
    }

    .detail-footer-actions > .btn,
    .danger-zone {
        width: 100%;
    }

    .workflow-page .workflow-header h1 {
        font-size: 31px;
    }

    .workflow-subject {
        padding: 14px;
    }

    .birth-subject dl {
        grid-template-columns: 1fr 1fr;
    }

    .birth-subject dl div:last-child {
        grid-column: 1 / -1;
    }

    .workflow-form {
        padding: 18px 16px;
    }

    .workflow-section-heading {
        align-items: flex-start;
    }

    .large-choice-group {
        grid-template-columns: 1fr;
    }

    .workflow-actions {
        position: sticky;
        bottom: calc(76px + env(safe-area-inset-bottom));
        z-index: 70;
        margin: 22px -16px -18px;
        padding: 12px 16px;
        background: #fff;
        box-shadow: 0 -6px 18px rgba(29, 67, 49, 0.1);
    }

    .workflow-actions .btn {
        flex: 1;
        min-width: 0;
        padding-right: 10px;
        padding-left: 10px;
    }
}
