body { background: linear-gradient(160deg, #f3f7fb 0%, #f8fafc 55%, #fffdf6 100%); }
.app-page-shell {
    padding-left: 0;
    padding-right: 0;
}

.auth-bg {
    background: radial-gradient(circle at 15% 20%, #d8f4ff 0%, rgba(216, 244, 255, 0) 35%),
                radial-gradient(circle at 80% 30%, #ffe8c6 0%, rgba(255, 232, 198, 0) 34%),
                linear-gradient(145deg, #edf6f3 0%, #f5f8ff 52%, #fff9ef 100%);
    min-height: 100vh;
}
.card { border-radius: 12px; }
.table td, .table th { vertical-align: middle; }

.info-card {
    border-left: 4px solid #198754;
    background-color: #fff;
    background-image: linear-gradient(155deg, rgba(255, 255, 255, 0.98) 0%, rgba(248, 250, 252, 0.9) 100%);
}

.info-card .card-body {
    backdrop-filter: blur(1px);
}

.info-card-locations {
    background-image: linear-gradient(155deg, #ffffff 0%, #e9f7ff 100%);
}

.info-card-batches {
    background-image: linear-gradient(155deg, #ffffff 0%, #eef9ea 100%);
}

.info-card-sales {
    background-image: linear-gradient(155deg, #ffffff 0%, #eaf9f2 100%);
}

.info-card-expenses {
    background-image: linear-gradient(155deg, #ffffff 0%, #fff4e8 100%);
}

.info-card-mortality {
    background-image: linear-gradient(155deg, #ffffff 0%, #ffeef0 100%);
}

.info-card-medicines {
    background-image: linear-gradient(155deg, #ffffff 0%, #eef3ff 100%);
}

.info-card-vaccinations {
    background-image: linear-gradient(155deg, #ffffff 0%, #f3efff 100%);
}

.info-label {
    color: #6c757d;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.info-value {
    font-size: 1.45rem;
    font-weight: 700;
}

.summary-carousel-wrap {
    overflow: hidden;
}

.subscription-status-card {
    background:
        radial-gradient(circle at 88% 18%, rgba(13, 109, 84, 0.09) 0, rgba(13, 109, 84, 0) 34%),
        radial-gradient(circle at 10% 92%, rgba(0, 119, 182, 0.08) 0, rgba(0, 119, 182, 0) 36%),
        #fff;
}

.page-hero {
    border: 0;
    border-radius: 0;
    color: #fff;
    overflow: hidden;
    position: relative;
    margin-bottom: 1.45rem !important;
}

.page-hero::before {
    background: radial-gradient(circle at 85% 18%, rgba(255, 255, 255, 0.2) 0, rgba(255, 255, 255, 0) 36%);
    content: '';
    inset: 0;
    pointer-events: none;
    position: absolute;
}

.page-hero .card-body {
    align-items: flex-start;
    display: flex;
    gap: 0.8rem;
    justify-content: space-between;
    padding: 1.75rem clamp(0.9rem, 2.2vw, 1.6rem) 1.9rem;
    position: relative;
    z-index: 1;
}

.page-hero-main {
    align-items: flex-start;
    display: flex;
    gap: 0.7rem;
    min-width: 0;
}

.page-hero-icon {
    align-items: center;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 13px;
    display: inline-flex;
    flex: 0 0 3rem;
    font-size: 1.32rem;
    height: 3rem;
    justify-content: center;
    width: 3rem;
}

.page-hero-title {
    font-size: 1.22rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.6rem;
}

.page-hero-desc {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    line-height: 1.56;
    margin-bottom: 1.15rem;
    max-width: 760px;
}

.page-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.78rem 0.62rem;
}

.page-hero-chip {
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.34);
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    padding: 0.54rem 0.82rem;
}

.page-hero-action .btn {
    border-color: rgba(255, 255, 255, 0.44);
    color: #fff;
    font-weight: 700;
    margin-top: 0.15rem;
    padding-top: 0.58rem;
    padding-bottom: 0.58rem;
    padding-left: 1rem;
    padding-right: 1rem;
}

.page-hero-action .btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.6);
    color: #fff;
}

.page-hero-dashboard {
    background: linear-gradient(132deg, #0b7862 0%, #0f9d7b 54%, #24b08c 100%);
}

.page-hero-profile {
    background: linear-gradient(132deg, #0b5da9 0%, #1772c7 54%, #3b8fe0 100%);
}

.page-hero-subscription {
    background: linear-gradient(132deg, #b26a07 0%, #d48617 52%, #eca938 100%);
}

.page-hero-admin {
    background: linear-gradient(132deg, #24404f 0%, #2f5c72 52%, #3c6f87 100%);
}

.page-hero-admin-subscriptions {
    background: linear-gradient(132deg, #8a4d00 0%, #b06505 52%, #cd7d13 100%);
}

.page-hero-marketplace {
    background: linear-gradient(132deg, #056e75 0%, #0a8f94 52%, #18a9ae 100%);
}

.page-hero-marketplace-manage {
    background: linear-gradient(132deg, #4a4f9f 0%, #5b62b8 52%, #7277cf 100%);
}

.page-hero-auth-login {
    background: linear-gradient(132deg, #0f6b55 0%, #12856b 52%, #1ca383 100%);
}

.page-hero-auth-register {
    background: linear-gradient(132deg, #0d659f 0%, #237fbf 52%, #3d97d6 100%);
}

.summary-card-btn {
    width: 100%;
    border: 0;
    text-align: left;
    color: #fff;
    padding: 1rem 3.2rem;
    min-height: 205px;
}

.summary-card-btn:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: -2px;
}

.summary-card-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.74rem;
    opacity: 0.92;
}

.summary-card-title {
    font-weight: 700;
    line-height: 1.2;
}

.summary-card-subtitle {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.85);
}

.summary-badge {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 999px;
    color: #fff;
    font-size: 0.76rem;
    font-weight: 700;
    padding: 0.35rem 0.55rem;
    white-space: nowrap;
}

.summary-inline-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.9rem;
    font-size: 0.88rem;
    margin-bottom: 0.4rem;
}

.summary-inline-row strong {
    font-weight: 700;
}

.summary-gradient-day {
    background: linear-gradient(130deg, #0077b6 0%, #00b4d8 100%);
}

.summary-gradient-week {
    background: linear-gradient(130deg, #3a5a40 0%, #588157 100%);
}

.summary-gradient-month {
    background: linear-gradient(130deg, #d97706 0%, #f59e0b 100%);
}

.summary-control {
    width: 3rem;
}

.summary-control .carousel-control-next-icon,
.summary-control .carousel-control-prev-icon {
    background-size: 1.15rem;
}

.summary-indicators {
    bottom: 0.35rem;
}

.summary-indicators [data-bs-target] {
    width: 18px;
    height: 3px;
    border-radius: 999px;
}

.app-navbar {
    background: linear-gradient(130deg, #0f5d4a 0%, #0d6d54 38%, #0c7d57 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 10px 24px rgba(13, 80, 62, 0.2);
}

.app-brand {
    font-weight: 700;
    letter-spacing: 0.02em;
}

.app-user-pill {
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    padding: 0.2rem 0.55rem;
}

.app-nav-btn {
    border-radius: 999px;
    font-weight: 600;
}

.app-menu-trigger {
    background: rgba(255, 255, 255, 0.14);
    border-radius: 10px;
    padding: 0.24rem 0.45rem;
}

.app-menu-trigger:hover {
    background: rgba(255, 255, 255, 0.2);
}

.app-menu-trigger:focus {
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.22);
}

.app-sidebar-offcanvas {
    width: min(94vw, 370px);
}

.app-sidebar-header {
    background: #f6faf8;
}

.app-user-panel {
    background: linear-gradient(145deg, #0d6d54 0%, #0f7f62 55%, #11a074 100%);
    color: #fff;
    padding: 1rem 1rem 1.05rem;
    text-align: center;
}

.app-user-avatar {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0.35rem;
}

.app-user-avatar i {
    font-size: 3.4rem;
    color: rgba(255, 255, 255, 0.94);
}

.app-user-name {
    font-weight: 700;
    letter-spacing: 0.01em;
}

.app-user-email {
    color: rgba(255, 255, 255, 0.86);
    font-size: 0.82rem;
    line-height: 1.35;
    word-break: break-word;
}

.app-user-actions {
    display: grid;
    gap: 0.55rem;
    grid-template-columns: 1fr 1fr;
}

.app-user-actions form {
    margin: 0;
}

.app-user-action-btn {
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 10px;
    color: #fff;
    font-weight: 600;
    width: 100%;
}

.app-user-action-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.58);
    color: #fff;
}

.app-logout-btn {
    border-color: rgba(255, 229, 229, 0.65);
}

.app-sidebar-nav {
    padding: 0.55rem 0;
    background: #fff;
}

.app-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.app-menu-list li + li .app-menu-item {
    border-top: 1px solid #edf1f4;
}

.app-menu-item {
    align-items: center;
    color: #1d2a33;
    display: flex;
    gap: 0.78rem;
    padding: 0.8rem 0.95rem;
    text-decoration: none;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.app-menu-item:hover {
    background: #f7fbf9;
    color: #0f6b55;
}

.app-menu-item.active {
    background: #eef8f4;
    color: #0f6b55;
}

.app-menu-icon {
    align-items: center;
    background: #f0f5f7;
    border-radius: 10px;
    color: #3a5866;
    display: inline-flex;
    font-size: 0.95rem;
    height: 2rem;
    justify-content: center;
    width: 2rem;
    flex: 0 0 2rem;
}

.app-menu-item.active .app-menu-icon {
    background: rgba(15, 107, 85, 0.16);
    color: #0f6b55;
}

.app-menu-text {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
}

.app-menu-title {
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.2;
}

.app-menu-desc {
    color: #6e7d86;
    font-size: 0.74rem;
    line-height: 1.24;
    margin-top: 0.12rem;
}

.app-menu-arrow {
    color: #93a0a8;
    font-size: 0.72rem;
}

.app-menu-item.active .app-menu-arrow {
    color: #0f6b55;
}

.app-main {
    min-height: calc(100vh - 150px);
}

.app-main > *:not(.page-hero):not(.offcanvas) {
    margin-left: clamp(0.8rem, 2.2vw, 1.5rem);
    margin-right: clamp(0.8rem, 2.2vw, 1.5rem);
}

.app-main > .page-hero {
    margin-left: 0;
    margin-right: 0;
}

.app-footer {
    background: linear-gradient(120deg, #1d2935 0%, #263748 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.92);
    margin-top: 1.25rem;
    padding: 0.85rem 0;
}

.app-footer .small {
    color: rgba(255, 255, 255, 0.78);
}

.auth-brand-chip {
    background: linear-gradient(120deg, #0d6d54 0%, #0085a8 100%);
    border-radius: 999px;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    margin: 0 auto;
    max-width: 220px;
    padding: 0.4rem 0.85rem;
    text-transform: uppercase;
}

.auth-card-shell {
    border: 1px solid rgba(10, 94, 88, 0.14);
    box-shadow: 0 22px 45px rgba(22, 57, 87, 0.12);
}

.auth-card-body {
    background:
        radial-gradient(circle at 90% 8%, rgba(0, 119, 182, 0.08) 0, rgba(0, 119, 182, 0) 34%),
        radial-gradient(circle at 0 100%, rgba(21, 145, 106, 0.07) 0, rgba(21, 145, 106, 0) 40%),
        #fff;
    border-radius: 12px;
}

.auth-title {
    font-weight: 700;
    letter-spacing: 0.01em;
}

.auth-submit-btn {
    border-radius: 10px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.auth-link {
    color: #0e7490;
    font-weight: 600;
    text-decoration: none;
}

.auth-link:hover {
    color: #0f766e;
    text-decoration: underline;
}

.section-card {
    scroll-margin-top: 84px;
}

.offcanvas .form-label {
    font-size: 0.875rem;
    font-weight: 600;
}

.offcanvas-records {
    width: min(94vw, 560px);
}

.offcanvas-health {
    width: min(94vw, 560px);
}

.offcanvas-summary {
    width: min(96vw, 620px);
}

.offcanvas-records .offcanvas-body {
    overflow: hidden;
}

#recordBrowserList {
    min-height: 240px;
    max-height: calc(100vh - 260px);
    background: #fff;
}

.health-inline-fields {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mobile-record-list .list-group-item {
    border-left: 0;
    border-right: 0;
}

.record-title {
    font-size: 0.98rem;
    font-weight: 700;
}

.marketplace-result-item .record-title {
    font-size: 1rem;
}

.marketplace-rating-inline {
    align-items: center;
    display: inline-flex;
    gap: 0.12rem;
}

.offcanvas-marketplace {
    width: min(96vw, 620px);
}

.marketplace-edit-details {
    border-top: 1px dashed #d9e1e8;
    margin-top: 0.35rem;
    padding-top: 0.5rem;
}

.marketplace-edit-details summary {
    color: #0f6b55;
    cursor: pointer;
    font-weight: 700;
    list-style: none;
    outline: none;
}

.marketplace-edit-details summary::-webkit-details-marker {
    display: none;
}

.marketplace-edit-details summary::before {
    content: '\\f044';
    display: inline-block;
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-right: 0.45rem;
}

.record-meta-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.75rem;
}

.meta-item {
    border-radius: 999px;
    background: #f3f5f7;
    color: #1f2a33;
    font-size: 0.82rem;
    line-height: 1.2;
    padding: 0.3rem 0.55rem;
}

.meta-label-inline {
    color: #6c757d;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-right: 0.2rem;
}

.summary-period-tabs .btn.active {
    background: #198754;
    border-color: #198754;
    color: #fff;
}

.summary-stat-grid {
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.summary-stat-item {
    background: #f8f9fa;
    border: 1px solid #e7ecf2;
    border-radius: 10px;
    padding: 0.7rem 0.75rem;
}

.summary-stat-label {
    color: #6c757d;
    display: block;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.summary-stat-value {
    color: #212529;
    display: block;
    font-size: 1rem;
    font-weight: 700;
    margin-top: 0.15rem;
}

@media (max-width: 991.98px) {
    .page-hero .card-body {
        flex-direction: column;
        gap: 0.95rem;
        padding-top: 1.45rem;
        padding-bottom: 1.5rem;
    }

    .page-hero-action {
        width: 100%;
    }

    .page-hero-action .btn {
        width: 100%;
    }

    .summary-card-btn {
        min-height: 190px;
        padding: 1rem 2.7rem;
    }

    .info-value {
        font-size: 1.3rem;
    }
}

@media (max-width: 575.98px) {
    .page-hero .card-body {
        padding: 1.3rem 0.82rem 1.35rem;
    }

    .page-hero-title {
        font-size: 1.08rem;
    }

    .page-hero-desc {
        font-size: 0.84rem;
        line-height: 1.4;
    }

    .page-hero-icon {
        flex-basis: 2.5rem;
        height: 2.5rem;
        width: 2.5rem;
        font-size: 1.12rem;
    }

    .summary-card-btn {
        min-height: 200px;
        padding: 0.95rem 2.25rem;
    }

    .summary-inline-row {
        font-size: 0.82rem;
    }

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

    .offcanvas-records {
        width: 100vw;
    }

    .offcanvas-health {
        width: 100vw;
    }

    .health-inline-fields {
        grid-template-columns: 1fr;
    }

    .offcanvas-summary {
        width: 100vw;
    }

    .offcanvas-marketplace {
        width: 100vw;
    }
}
