﻿/*---------------------MARGIN------------------*/
.mr-auto {
    margin-right: auto !important;
}

.ml-auto {
    margin-left: auto !important;
}
/*---------------------MARGIN END------------------*/

/*---------------------SUBMENU------------------*/
        /*---------------------SUBMENU END------------------*/

/*---------------------LOADER COMPONENT------------------*/
.freeze-layer0 {
    position: fixed;
    display: flex;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, .3);
    z-index: 1060;
    overflow-y: auto;
}

.freeze-layer {
    position: fixed;
    display: flex;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, .3);
    z-index: 1070;
    overflow-y: auto;
}

.custom-window {
    position: relative;
    z-index: 1090;
    width: 85%;
    max-height: 80%;
    overflow: auto;
    height: auto;
    margin: auto;
}

.custom-window2 {
    position: relative;
    z-index: 1080;
    width: 95%;
    height: auto;
    margin: auto;
}

.custom-spiner {
    margin: auto;
    display: inline-block;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid #3fdbd4;
    border-left-color: transparent;
    animation: splide-loading 1s linear infinite;
}
/*---------------------LOADER COMPONENT END------------------*/

.text-color-black {
    color: black;
}

/*---------------------TOP NAVBAR WITH SEARCH------------------*/
        /*---------------------TOP NAVBAR WITH SEARCH END------------------*/

/*---------------------TOP NAVBAR------------------*/

.navbar-right-button {
    position: absolute;
    height: 60px;
    width: 50px;
    right: 0px;
    text-align: center;
    line-height: 60px;
    font-size: 22px;
    color: #1f1f1f;
    border: none;
    -webkit-appearance: none;
    appearance: none;
    background-color: rgba(0, 0, 0, 0) !important;
    margin-top: calc((env(safe-area-inset-top))*0.8) !important;
}

.navbar-middle-button {
    position: absolute;
    height: 60px;
    width: 50px;
    right: 60px;
    text-align: center;
    line-height: 60px;
    font-size: 22px;
    color: #1f1f1f;
    border: none;
    -webkit-appearance: none;
    appearance: none;
    background-color: rgba(0, 0, 0, 0) !important;
    margin-top: calc((env(safe-area-inset-top))*0.8) !important;
}

.navbar-left-button {
    position: absolute;
    height: 60px;
    width: 50px;
    right: 120px;
    text-align: center;
    line-height: 60px;
    font-size: 22px;
    color: #1f1f1f;
    border: none;
    -webkit-appearance: none;
    appearance: none;
    background-color: rgba(0, 0, 0, 0) !important;
    margin-top: calc((env(safe-area-inset-top))*0.8) !important;
}

/*---------------------TOP NAVBAR------------------*/

/*---------------------INPUT NOTE DATE LIST------------------*/
                /*---------------------INPUT NOTE DATE LIST END------------------*/

/*---------------------INDEX/HOME PAGE------------------*/
/*---------------------INDEX/HOME PAGE END------------------*/

/*---------------------HEIGHT------------------*/
/*---------------------HEIGHT END--------------*/

/*---------------------WIDTH------------------*/
.w-33 {
    width: 33% !important;
}
/*---------------------WIDTH END--------------*/

/*---------------------LINE HEIGHT------------------*/
.line-h-15 {
    line-height: 15px;
}
/*---------------------LINE HEIGHT END------------------*/

/*---------------------BORDER------------------*/
.border-bottom-gray1 {
    border-bottom: 1px solid #dadada;
}
/*---------------------BORDER END------------------*/

/*---------------------CUSTOM BADGE------------------*/
/*---------------------CUSTOM BADGE END------------------*/

/*---------------------blazored-toast-------------------*/
/* Toast container mora imati visok z-index — naši popup overlay-i koriste z-index do 10001
   (AnimalBirth-AddEdit popup, AnimalBirth-Tasks-Popup itd.) pa default Blazored.Toast 1100
   ne bi se video. Sa 11000 toast je iznad svih popup overlay-a. */
.blazored-toast-container {
    z-index: 11000 !important;
}
/*---------------------blazored-toast END---------------*/

/*------------------- SweetAlert2 z-index override -------------------*/
/* Default swal2 z-index je 1060 — to je ispod AddEdit popup overlay-a (10000)
   i ispod re-skinovanog .popup-overlay-a (20000), pa se SweetAlert dialog
   "izgubi" iza forme kada korisnik klikne ZAVRŠI iz AddEdit popup-a.

   Postavljamo z-index 30000 — iznad svih popup-a, ali ispod toast-a (11000)
   ne, jer toast i swal su nezavisni i swal je modalni dialog koji baš zahteva
   da bude na vrhu. Reconnect modal koji je na max int-u i dalje pobeđuje. */
.swal2-container {
    z-index: 30000 !important;
}
/*------------------- SweetAlert2 END -------------------*/

/*---------------------CAMERA_COMPONENT----------------*/
/*---------------------CAMERA_COMPONENT END------------*/

/*---------------------Details page------------------------*/
/*---------------------Details page END--------------------*/


/*---------------Login---------------*/

.login-company-logo {
    width: 150px;
    height: 150px;
    border-radius: 75px;
    border: 2px solid #e2e2e2;
    background: white
}

input,
input::placeholder {
    font-size: 20px !important;
}

/*------------ SEARCH INPUT FONT ---------*/
/* Override globalnog 'input { font-size: 20px !important; }' samo za input-e
   pretrage. Vizuelni stil pretrage (pill kontejner sa lupom) ostaje inline
   na samoj komponenti — samo font-size se kontroliše ovde, da bude svuda
   isti i lako menjiv. */
.search-input,
.search-input::placeholder {
    font-size: 16px !important;
}

/*------------MULTI SELECT---------*/
        /*------------MULTI SELECT---------*/

/*------------SELECT---------*/
/*------------SELECT---------*/

/*------------CARD HEADER WITH IMPUT---------*/
        /*------------CARD HEADER WITH IMPUT---------*/

/*---------------Signature-----------*/
/*---------------!Signature-----------*/

/***Page Main***/
/***icon***/
/*default icon color: #caeeff*/
@media screen and (max-width: 767px) {
    .icon-size {
        height: 30px !important;
    }
}

@media screen and (max-width: 576px) {
    .icon-size-all-devices {
        height: 25px !important;
    }
}
/***icon***/

/******************** Switch ********************/
.switch-input-wrapper label {
    display: inline-block;
    position: relative;
    height: 30px;
    width: 60px;
    background-color: #fb1919;
    cursor: pointer;
    font-size: 0;
    color: transparent;
    border-radius: 22px;
    transition: background-color 500ms ease;
}

    .switch-input-wrapper label:after {
        content: '';
        display: block;
        height: 26px;
        width: 26px;
        position: absolute;
        top: 2px;
        right: 32px;
        border-radius: 50%;
        background-color: #e8e8e8;
        box-shadow: 2px 0px 0px rgba(0, 0, 0, 0.15);
        transition: right 500ms ease, background-color 500ms ease, box-shadow 500ms ease;
    }

.switch-input-wrapper input:checked + label {
    background: #408dfb;
}

    .switch-input-wrapper input:checked + label:after {
        right: 2px;
        background-color: #fff;
        box-shadow: -2px 0px 0px rgba(0, 0, 0, 0.1);
    }

.switch-input-wrapper input {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    bottom: 0;
}

.switch-input-box label {
    line-height: 44px;
    vertical-align: middle;
}

.switch-input-wrapper span {
    position: relative;
    top: -46px;
    left: 0;
    font-size: 12px;
    letter-spacing: 1px;
    color: #095a55;
    font-weight: 500;
}

.switch-input-wrapper {
    cursor: pointer;
    height: 32px;
}
/******************** Switch ********************/

/*-------------------UTILITY HELPERS---------------*/
.h-36-px-i {
    height: 36px !important;
}

.h-40-px {
    height: 40px;
}

.h-50-px {
    height: 50px;
}

.h-72-px-i {
    height: 72px !important;
}

.w-40-px {
    width: 40px;
}

.w-80 {
    width: 80%;
}

.m-2-px {
    margin: 2px;
}

.pt-55-px-i {
    padding-top: 55px !important;
}

.pt-65-px-i {
    padding-top: 65px !important;
}

.line-h-50 {
    line-height: 50px;
}

.text-orange-bold {
    font-size: 15px;
    font-weight: 700;
    color: #ff5e12;
}

.text-green {
    color: green;
}
/*-------------------UTILITY HELPERS END-----------*/


/*------------------- CHOICE BUTTONS (mobile radio group) -------------------*/
/* Radio + label pattern adapted from FarmWeb's Switch-Button-Component, optimized for touch input.
   Markup:
       <input type="radio" id="X" name="group" class="choice-input" />
       <label for="X" class="choice-btn">Text</label>
   Variants on label: choice-btn-red (destructive), choice-btn-grow (wider flex). */

.choice-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.choice-input {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    pointer-events: none;
    opacity: 0;
}

.choice-btn {
    position: relative;
    flex: 1 1 0;
    min-height: 46px;
    padding: 11px 10px 11px 10px;
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    color: #64748b;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    line-height: 1.2;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.05s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0;
}

    .choice-btn:active {
        transform: scale(0.97);
    }

.choice-btn-grow {
    flex: 1.3 1 0;
}

.choice-btn-shrink {
    flex: 0.7 1 0;
}

/* default selected = green */
.choice-input:checked + .choice-btn {
    background: linear-gradient(180deg, #EAF3DE 0%, #DCEBC9 100%);
    border-color: #6FA340;
    color: #27500A;
    box-shadow: 0 2px 6px rgba(111, 163, 64, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.6);
    padding-left: 30px;
}

    .choice-input:checked + .choice-btn::before {
        content: "";
        position: absolute;
        left: 9px;
        top: 50%;
        transform: translateY(-50%);
        width: 16px;
        height: 16px;
        border-radius: 50%;
        background-color: #4F8424;
        background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.5l3 3 6-6.5'/></svg>");
        background-size: 12px 12px;
        background-position: center;
        background-repeat: no-repeat;
    }

/* red variant when selected (destructive choices) */
.choice-input:checked + .choice-btn.choice-btn-red {
    background: linear-gradient(180deg, #FCEBEB 0%, #F9D7D7 100%);
    border-color: #C84545;
    color: #791F1F;
    box-shadow: 0 2px 6px rgba(200, 69, 69, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

    .choice-input:checked + .choice-btn.choice-btn-red::before {
        background-color: #A32D2D;
        background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='M4 4l8 8M12 4l-8 8'/></svg>");
        background-size: 10px 10px;
    }

/* warning (amber) variant when selected (intermediate / concerning choices) */
.choice-input:checked + .choice-btn.choice-btn-warning {
    background: linear-gradient(180deg, #FEF3C7 0%, #FDE68A 100%);
    border-color: #D97706;
    color: #78350F;
    box-shadow: 0 2px 6px rgba(217, 119, 6, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

    .choice-input:checked + .choice-btn.choice-btn-warning::before {
        background-color: #D97706;
        background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='white' d='M8 1.5L1 14h14L8 1.5zM8 6v4M8 11.5v.5'/></svg>");
        background-size: 10px 10px;
    }

/* keyboard focus ring for accessibility */
.choice-input:focus-visible + .choice-btn {
    outline: 3px solid rgba(64, 141, 251, 0.45);
    outline-offset: 1px;
}

/*------------------- FORM FIELD GROUPS (mobile) -------------------*/
.field-group {
    margin-bottom: 14px;
}

.field-label {
    font-size: 13px;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 8px;
    letter-spacing: 0.2px;
}

.found-info {
    font-size: 11px;
    color: #3B6D11;
    margin-top: 6px;
    font-weight: 500;
}

/*------------------- TIP BOX (warning callout) -------------------*/
.tip-box {
    background: linear-gradient(180deg, #FAEEDA 0%, #F6E1BB 100%);
    border: 1px solid #EF9F27;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 12px;
    color: #633806;
    margin-top: 10px;
    box-shadow: 0 1px 3px rgba(239, 159, 39, 0.15);
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.4;
}

    .tip-box::before {
        content: "⚠";
        font-size: 16px;
        flex-shrink: 0;
        line-height: 1;
    }

/*------------------- PHOTO SLOTS (RouteItem-Photo style) -------------------*/
.photo-slot-img {
    width: 100%;
    height: 30vh;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    cursor: pointer;
}

.photo-slot-img.empty {
    height: 22vh;
    background-color: #f8fafc;
    border: 1.5px dashed #cbd5e1;
    border-radius: 10px;
}

/*------------------- STICKY SUBMIT BAR (mobile bottom) -------------------*/
.submit-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 12px 15px calc(12px + env(safe-area-inset-bottom)) 15px;
    background: #fff;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
    z-index: 100;
}

    .submit-bar .btn {
        border-radius: 10px;
        font-size: 15px;
        letter-spacing: 0.3px;
        height: 48px;
        font-weight: 600;
    }
/*------------------- CHOICE BUTTONS END -------------------*/


/*------------------- MOBILE POPUPS (high-contrast variant) -------------------*/
/* Use on top of existing freeze-layer/custom-window for stronger contrast on light pages. */

/* Bottom-sheet overlay — full-screen dark backdrop, sheet pinned ispod gornjeg gap-a.
   Pattern je identičan FarmOverview-Search-Component / AnimalBirth-Search-Component
   filter sheet-ovima da popup kontrole vizuelno spadaju u istu porodicu.

   Z-INDEX: 20000 — mora biti iznad AddEdit popup overlay-a (10000) i njegovog crvenog
   close dugmeta (10001) kada se Animal/Depot/Box popup otvori unutar AddEdit popupa.
   Bez ovoga se AddEdit close button vidi iznad popup-a i pravi konfuzni dvostruki ✕. */
.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 20000;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.popup-window {
    position: relative;
    z-index: 20010;
    margin-top: 40px;
    flex: 1;
    width: 100%;
    max-width: none;
    max-height: none;
    background: #f4f6fa;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Drag indicator (gornja sivkasta crtica) — render preko ::before umesto markup-a,
   tako da svi postojeći popup-i automatski dobiju indikator bez izmene HTML-a. */
.popup-window::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 4px;
    background: #cbd5e1;
    border-radius: 2px;
    pointer-events: none;
    z-index: 1;
}

.popup-header {
    display: flex;
    align-items: center;
    padding: 22px 12px 12px 12px;
    background: white;
    color: #1e293b;
    border-bottom: 1px solid #e2e8f0;
    gap: 12px;
}

    .popup-header .popup-title {
        flex: 1;
        font-size: 18px;
        font-weight: 700;
        margin: 0;
        text-align: center;
        color: #1e293b;
        letter-spacing: 0.2px;
    }

    .popup-header .popup-close {
        width: 36px;
        height: 36px;
        border-radius: 18px;
        background: #ef4444;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        color: white;
        font-size: 14px;
        line-height: 1;
        transition: background-color 0.15s ease;
        flex-shrink: 0;
    }

        .popup-header .popup-close:active {
            background: #dc2626;
        }

/* .popup-search wrap-uje Basic_Search_Component. Ovde re-stylujemo unutrašnji input
   bez izmene komponente — klasa .form-control postaje borderless, pill outer kontejner. */
.popup-search {
    padding: 12px 12px 8px 12px;
    background: #f4f6fa;
    border-bottom: none;
}

    .popup-search > div {
        background: white !important;
        border-radius: 24px !important;
        height: auto !important;
        padding: 4px 10px !important;
        margin-bottom: 0 !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    }

    .popup-search input.form-control {
        border: none !important;
        box-shadow: none !important;
        background: transparent !important;
        font-size: 16px !important;
        height: 40px !important;
        margin: 0 !important;
        padding: 0 4px !important;
        color: #1e293b;
    }

        .popup-search input.form-control:focus {
            outline: none !important;
        }

    .popup-search img {
        width: 22px !important;
        height: 22px;
        opacity: 0.55;
    }

.popup-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background: #f4f6fa;
    padding: 8px 12px 8px 12px;
}

.popup-empty {
    text-align: center;
    padding: 48px 16px;
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.5;
}

/* Item row je sada bela kartica sa shadow-om, umesto flat reda sa donjom linijom.
   Daje "feed-style" prikaz koji se uklapa u FarmOverview / AnimalBirth-List language. */
.popup-item {
    display: flex;
    align-items: center;
    padding: 12px 14px;
    background: white;
    border: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    border-radius: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.12s ease, transform 0.05s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

    .popup-item:active {
        background: #f1f5f9;
        transform: scale(0.99);
    }

    .popup-item:hover {
        background: #fafbfd;
    }

    .popup-item:last-child {
        border-bottom: 1px solid #e2e8f0;
    }

/* Avatar je krug 40px sa light-blue paletom — mapira se na "ANIMAL_BIRTH" boje
   header-a u feed kartama da je hijerarhija konzistentna. */
.popup-item-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border-radius: 20px;
    background: #dbeafe;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1e3a8a;
    font-size: 18px;
    margin-right: 12px;
    border: none;
}

    .popup-item-icon img {
        width: 26px;
        height: 26px;
        object-fit: contain;
    }

.popup-item-body {
    flex: 1;
    min-width: 0;
}

.popup-item-title {
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.popup-item-sub {
    font-size: 12px;
    color: #64748b;
    line-height: 1.3;
    margin-top: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* "UČITAJ VIŠE" je dashed pill — vizuelno sekundaran u odnosu na infinite scroll
   koji uglavnom radi sam. Ostao je u markup-u kao fallback ako observer ne okine. */
.popup-load-more {
    display: block;
    margin: 8px auto 4px auto;
    width: 100%;
    padding: 11px;
    border-radius: 22px;
    border: 1px dashed #94a3b8;
    background: transparent;
    color: #64748b;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    letter-spacing: 0.3px;
}

    .popup-load-more:active {
        background: #e2e8f0;
        color: #1e293b;
    }

.popup-footer {
    padding: 10px 16px;
    border-top: 1px solid #e2e8f0;
    background: white;
    font-size: 12px;
    color: #64748b;
    text-align: center;
    font-weight: 600;
    letter-spacing: 0.2px;
}
/*------------------- MOBILE POPUPS END -------------------*/


/*------------------- DATE-SELECT (mobile, FarmWeb Date_Select inspired) -------------------*/
.date-select-wrapper {
    width: 100%;
}

.date-select-label {
    font-size: 13px;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 6px;
    letter-spacing: 0.2px;
}

.date-select {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 44px;
    padding: 0 6px 0 10px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

    .date-select:focus-within {
        border-color: #1f5fa6;
        box-shadow: 0 0 0 3px rgba(31, 95, 166, 0.15);
    }

.date-select-input {
    flex: 1 1 0;
    min-width: 0;
    border: none;
    background: transparent;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
    padding: 4px 2px;
    outline: none;
    -moz-appearance: textfield;
}

    .date-select-input::-webkit-outer-spin-button,
    .date-select-input::-webkit-inner-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }

    .date-select-input::placeholder {
        color: #a0aec0;
        font-weight: 400;
        font-size: 13px;
    }

.date-select-input-year {
    flex: 1.4 1 0;
}

.date-select-sep {
    color: #94a3b8;
    font-weight: 700;
    font-size: 16px;
    line-height: 1;
}

.date-select-calendar {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #1f5fa6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 15px;
    cursor: pointer;
    margin-bottom: 0;
    margin-left: 4px;
    position: relative;
    overflow: hidden;
    transition: background-color 0.15s ease;
}

    .date-select-calendar:active {
        background: #1a4f8b;
    }

.date-select-native {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    border: none;
    background: transparent;
    padding: 0;
}

    .date-select-native::-webkit-calendar-picker-indicator {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        opacity: 0;
        cursor: pointer;
    }
/*------------------- DATE-SELECT END -------------------*/


/*------------------- DATE FIELD (legacy, kept for back-compat) -------------------*/
.date-field {
    position: relative;
    width: 100%;
}

    .date-field input[type="date"] {
        width: 100%;
        height: 44px;
        padding: 10px 40px 10px 12px;
        border: 1.5px solid #e2e8f0;
        border-radius: 10px;
        background: #ffffff;
        font-size: 15px;
        font-weight: 500;
        color: #0f172a;
        font-family: inherit;
        outline: none;
        transition: border-color 0.15s ease, box-shadow 0.15s ease;
        -webkit-appearance: none;
        appearance: none;
    }

        .date-field input[type="date"]:focus {
            border-color: #1f5fa6;
            box-shadow: 0 0 0 3px rgba(31, 95, 166, 0.15);
        }

    .date-field::after {
        content: "\f073"; /* fa calendar */
        font-family: "Font Awesome 5 Free", "FontAwesome";
        font-weight: 900;
        position: absolute;
        right: 14px;
        top: 50%;
        transform: translateY(-50%);
        color: #1f5fa6;
        pointer-events: none;
        font-size: 16px;
    }

    /* Hide the native calendar icon on Chromium / Safari since we render our own */
    .date-field input[type="date"]::-webkit-calendar-picker-indicator {
        opacity: 0;
        position: absolute;
        right: 0;
        top: 0;
        width: 100%;
        height: 100%;
        cursor: pointer;
    }

/*------------------- LOOKUP FIELD (clickable read-only that opens popup) -------------------*/
.lookup-field {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    height: 44px;
    padding: 0 40px 0 12px;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    background: #ffffff;
    font-size: 15px;
    font-weight: 500;
    color: #0f172a;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

    .lookup-field:active {
        border-color: #1f5fa6;
        box-shadow: 0 0 0 3px rgba(31, 95, 166, 0.15);
    }

    .lookup-field.empty {
        color: #94a3b8;
        font-weight: 400;
    }

    .lookup-field::after {
        content: "\f002"; /* fa search */
        font-family: "Font Awesome 5 Free", "FontAwesome";
        font-weight: 900;
        position: absolute;
        right: 14px;
        top: 50%;
        transform: translateY(-50%);
        color: #1f5fa6;
        font-size: 14px;
    }

    .lookup-field span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        flex: 1;
    }
/*------------------- DATE/LOOKUP END -------------------*/


/*------------------- FEED (Instagram-style birth history) -------------------*/
.feed-page {
    background: #f4f6fa;
}

.feed-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    margin: 12px 8px 16px 8px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    overflow: hidden;
}

/* Header strip */
.feed-header {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    gap: 10px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.12s ease;
}

    .feed-header:active {
        background-color: #f1f5f9;
    }

.feed-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1f5fa6, #4ec0c8);
    padding: 2px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .feed-avatar img {
        width: 32px;
        height: 32px;
        border-radius: 50%;
        background: #ffffff;
        padding: 3px;
        object-fit: contain;
    }

.feed-meta {
    flex: 1;
    min-width: 0;
}

.feed-meta-title {
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.feed-meta-sub {
    font-size: 12px;
    color: #64748b;
    line-height: 1.2;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.feed-time {
    font-size: 12px;
    color: #94a3b8;
    flex-shrink: 0;
}

/* Image carousel */
.feed-carousel-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #0f172a;
    overflow: hidden;
}

.feed-carousel {
    width: 100%;
    height: 100%;
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

    .feed-carousel::-webkit-scrollbar {
        display: none;
    }

.feed-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}

.feed-counter {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(15, 23, 42, 0.65);
    color: #ffffff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 9px;
    border-radius: 12px;
    pointer-events: none;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.feed-dots {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    pointer-events: none;
}

.feed-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    transition: background-color 0.2s ease, transform 0.2s ease;
}

    .feed-dot.active {
        background: #ffffff;
        transform: scale(1.25);
    }

/* Action bar (instagram-like) */
.feed-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 12px 4px 12px;
    font-size: 22px;
    color: #0f172a;
}

.feed-action {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: color 0.15s ease, transform 0.1s ease;
}

    .feed-action:active {
        transform: scale(0.85);
    }

    .feed-action.liked {
        color: #e11d48;
    }

    .feed-action.saved {
        color: #1f5fa6;
    }

    .feed-action.ml-auto {
        margin-left: auto;
    }

/* Body */
.feed-body {
    padding: 6px 14px 12px 14px;
}

/* Stats badges */
.feed-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.feed-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 9px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
}

    .feed-badge.alive {
        background: #DCFCE7;
        color: #166534;
    }

    .feed-badge.dead {
        background: #FCE7E7;
        color: #991B1B;
    }

    .feed-badge.male {
        background: #DBEAFE;
        color: #1E3A8A;
    }

    .feed-badge.female {
        background: #FCE7F3;
        color: #9D174D;
    }

/* Calves details */
.feed-calves {
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
    padding: 8px 0;
    margin: 8px 0;
}

.feed-calf-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 0;
    font-size: 13px;
    color: #334155;
}

    .feed-calf-row + .feed-calf-row {
        border-top: 1px dashed #e2e8f0;
    }

.feed-calf-num {
    flex-shrink: 0;
    background: #eef4fb;
    color: #1f5fa6;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 8px;
    font-size: 12px;
}

.feed-calf-info {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

    .feed-calf-info .dot-sep {
        margin: 0 5px;
        color: #cbd5e1;
    }

.feed-eartag {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 12px;
    background: #f1f5f9;
    padding: 1px 6px;
    border-radius: 5px;
    color: #475569;
}

/* Description (Instagram caption style) */
.feed-desc {
    font-size: 13px;
    color: #0f172a;
    line-height: 1.4;
    margin-top: 4px;
}

    .feed-desc strong {
        font-weight: 700;
        margin-right: 2px;
    }

.feed-date {
    font-size: 11px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-top: 8px;
}

.font-600 {
    font-weight: 600;
}

.text-color-gray {
    color: #94a3b8;
}
/*------------------- FEED END -------------------*/


/*------------------- FILTER BAR -------------------*/
.feed-filter {
    margin: 8px;
}

.filter-row {
    margin-bottom: 12px;
}

.btn-outline-primary {
    background: #ffffff;
    border: 1.5px solid #1f5fa6;
    color: #1f5fa6;
    border-radius: 10px;
    padding: 0 18px;
    font-weight: 600;
}

    .btn-outline-primary:active {
        background: #eef4fb;
    }

/* Empty photo slide */
.feed-slide-empty {
    background: linear-gradient(135deg, #1f5fa6, #0f172a);
    display: flex;
    align-items: center;
    justify-content: center;
}

.feed-slide-empty-inner {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    text-align: center;
}

    .feed-slide-empty-inner i {
        display: block;
        font-size: 48px;
        margin-bottom: 8px;
        opacity: 0.6;
    }


/*------------------- FULLSCREEN PHOTO VIEWER -------------------*/
.photo-viewer {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 20px;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
}

.photo-viewer-img {
    max-width: 100%;
    max-height: calc(100vh - 100px);
    object-fit: contain;
    cursor: default;
    border-radius: 4px;
}

.photo-viewer-close {
    position: absolute;
    top: env(safe-area-inset-top, 12px);
    right: 14px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
}

    .photo-viewer-close:active {
        background: rgba(255, 255, 255, 0.3);
    }

.photo-viewer-nav {
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 18px;
    color: #ffffff;
    font-size: 14px;
}

.photo-viewer-arrow {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 18px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

    .photo-viewer-arrow:active {
        background: rgba(255, 255, 255, 0.3);
    }

.photo-viewer-counter {
    font-weight: 600;
    letter-spacing: 0.4px;
    min-width: 60px;
    text-align: center;
}
/*------------------- PHOTO VIEWER END -------------------*/
