/* Oasis shared polish + responsive layer. Desktop content remains intact; mobile gets a cleaner drawer layout. */
.sidebar-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar .menu-item i {
    width: 18px;
    text-align: center;
    flex: 0 0 18px;
}

.sidebar-logo-icon {
    background: #fff;
    color: #1e3b2b;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 36px;
    font-size: 1.05rem;
}

.sidebar-logo-text {
    font-family: 'Lora', serif;
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.08;
    letter-spacing: .4px;
}

.sidebar-logo-text span {
    display: block;
    font-family: 'Nunito', sans-serif;
    font-size: .58rem;
    font-weight: 700;
    letter-spacing: 1.45px;
    opacity: .68;
    margin-top: 2px;
}

.sidebar-footer {
    display: flex;
    align-items: center;
    gap: 11px;
}

.user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #8fb396;
    color: #1e3b2b;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 34px;
    font-size: .76rem;
    font-weight: 800;
}

.user-info {
    min-width: 0;
}

.user-info h4 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-logout {
    padding: 8px 14px 16px;
}

.logout-btn {
    width: 100%;
    background: none;
    border: 0;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
}

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

.oasis-mobile-bar,
.oasis-sidebar-backdrop {
    display: none;
}

@media (max-width: 900px) {

    html,
    body {
        max-width: 100%;
    }

    body.oasis-has-sidebar {
        display: block !important;
        height: auto !important;
        min-height: 100vh !important;
        overflow: auto !important;
        overflow-x: hidden !important;
        padding-top: 62px !important;
    }

    .oasis-mobile-bar {
        position: fixed;
        inset: 0 0 auto 0;
        z-index: 4000;
        height: 62px;
        padding: 0 14px;
        background: #1e3b2b;
        color: #fff;
        display: flex;
        align-items: center;
        gap: 12px;
        box-shadow: 0 5px 18px rgba(12, 34, 22, .18);
    }

    .oasis-menu-toggle {
        width: 40px;
        height: 40px;
        border: 1px solid rgba(255, 255, 255, .15);
        border-radius: 10px;
        background: rgba(255, 255, 255, .08);
        color: #fff;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 1rem;
        cursor: pointer;
    }

    .oasis-mobile-brand {
        min-width: 0;
        display: flex;
        align-items: center;
        gap: 9px;
        font-family: 'Lora', serif;
        font-weight: 700;
        font-size: .98rem;
    }

    .oasis-mobile-brand span {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .oasis-sidebar-backdrop {
        display: block;
        position: fixed;
        inset: 62px 0 0 0;
        z-index: 3890;
        border: 0;
        background: rgba(10, 22, 15, .42);
        opacity: 0;
        visibility: hidden;
        transition: opacity .22s ease, visibility .22s ease;
    }

    body.oasis-nav-open .oasis-sidebar-backdrop {
        opacity: 1;
        visibility: visible;
    }

    .sidebar {
        position: fixed !important;
        z-index: 3900 !important;
        top: 62px !important;
        bottom: 0 !important;
        left: 0 !important;
        width: min(82vw, 300px) !important;
        height: auto !important;
        min-height: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        transform: translateX(-105%);
        transition: transform .24s ease !important;
        box-shadow: 14px 0 30px rgba(11, 30, 18, .18);
        overflow: hidden !important;
    }

    body.oasis-nav-open .sidebar {
        transform: translateX(0);
    }

    .sidebar-header {
        padding: 18px 18px 12px !important;
        display: flex !important;
    }

    .sidebar-menu {
        display: block !important;
        flex: 1 1 auto !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        padding: 8px 12px 14px !important;
    }

    .menu-category {
        display: block !important;
    }

    .menu-item {
        width: 100% !important;
        margin-bottom: 3px !important;
        padding: 11px 13px !important;
        white-space: normal !important;
    }

    .sidebar-footer {
        padding: 14px 18px !important;
        border-top: 1px solid rgba(255, 255, 255, .08) !important;
    }

    .sidebar-logout {
        padding: 8px 12px 16px !important;
    }

    .main-wrapper {
        width: 100% !important;
        min-width: 0 !important;
        height: auto !important;
        min-height: calc(100vh - 62px) !important;
        overflow: visible !important;
    }

    .topbar {
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        padding: 18px 18px 14px !important;
        gap: 12px !important;
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .topbar-header,
    .topbar>div {
        min-width: 0 !important;
    }

    .topbar h1 {
        line-height: 1.2 !important;
    }

    .topbar p {
        line-height: 1.5 !important;
    }

    .search-bar {
        width: 100% !important;
        max-width: none !important;
    }

    .content-area {
        width: 100% !important;
        padding: 0 18px 28px !important;
        overflow: visible !important;
    }

    .stats-grid,
    .stats-grid-3,
    .stats-grid-4,
    .quick-actions,
    .bottom-split,
    .records-grid,
    .reports-layout,
    .grid-3-col,
    .grid-2-col,
    .booking-layout,
    .form-row,
    .grid,
    .analytics-grid,
    .dashboard-grid,
    .overview-grid,
    .cards-grid {
        grid-template-columns: 1fr !important;
    }

    .pets-grid,
    .services-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .slots-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }

    .panel,
    .stat-card,
    .card,
    .profile-card,
    .receipt,
    .welcome-banner,
    .banner-header,
    .booking-layout>*,
    .records-grid>*,
    .reports-layout>* {
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .panel,
    .profile-card,
    .receipt {
        border-radius: 12px !important;
    }

    .panel {
        overflow-x: auto !important;
    }

    table {
        min-width: 640px;
    }

    .panel-header,
    .panel-header-row,
    .receipt-head,
    .section-header,
    .toolbar,
    .filters-row,
    .banner-header,
    .welcome-banner {
        flex-wrap: wrap !important;
        gap: 10px !important;
    }

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

    input,
    select,
    textarea {
        font-size: 16px !important;
    }

    .modal-card,
    .logout-modal-card {
        width: calc(100% - 28px) !important;
        max-width: 540px !important;
        max-height: calc(100vh - 88px) !important;
        overflow-y: auto !important;
        margin: 12px !important;
    }

    .modal-overlay,
    .logout-modal-overlay {
        padding: 12px !important;
    }

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

    .back-link {
        align-self: flex-start !important;
    }
}

@media (max-width: 620px) {
    body.oasis-has-sidebar {
        padding-top: 58px !important;
    }

    .oasis-mobile-bar {
        height: 58px;
        padding: 0 11px;
    }

    .oasis-sidebar-backdrop {
        inset: 58px 0 0 0;
    }

    .sidebar {
        top: 58px !important;
        width: min(88vw, 294px) !important;
    }

    .oasis-menu-toggle {
        width: 38px;
        height: 38px;
    }

    .content-area {
        padding: 0 12px 22px !important;
    }

    .topbar {
        padding: 15px 12px 12px !important;
    }

    .pets-grid,
    .services-grid,
    .slots-grid {
        grid-template-columns: 1fr !important;
    }

    .stat-card,
    .panel,
    .profile-card,
    .receipt,
    .card {
        padding: 15px !important;
    }

    .profile-card .grid,
    .grid {
        gap: 9px !important;
    }

    .field {
        padding: 11px !important;
    }

    .btn-export,
    .btn-add-solid,
    .btn-add-outline,
    .btn-add-item,
    .btn-submit,
    .btn-save,
    .btn-primary,
    .btn-secondary,
    .btn-banner-action {
        width: 100% !important;
        justify-content: center !important;
        text-align: center !important;
    }

    .logout-modal-actions,
    .modal-actions {
        flex-direction: column !important;
    }

    h1 {
        font-size: 1.28rem !important;
    }

    h2 {
        font-size: 1.1rem !important;
    }

    table {
        min-width: 600px;
        font-size: .79rem !important;
    }

    th,
    td {
        padding: 10px 8px !important;
    }
}

@media print {

    .oasis-mobile-bar,
    .oasis-sidebar-backdrop {
        display: none !important;
    }

    body {
        padding-top: 0 !important;
    }
}

/* Oasis paw-logo placeholder
   Put your paw/icon image at: public/images/oasis-logo.png
   The image now fills the available logo placeholder without stretching. */
.sidebar-logo-icon {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    max-width: 36px !important;
    max-height: 36px !important;
    overflow: hidden !important;
    padding: 0 !important;
}

.sidebar-paw-image {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 100% !important;
    min-height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center !important;
    flex-shrink: 0;
}

.header-paw-image {
    display: block !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    object-fit: contain !important;
    object-position: center !important;
    flex-shrink: 0;
}

@media (max-width: 620px) {
    .header-paw-image {
        width: 34px !important;
        height: 34px !important;
        min-width: 34px !important;
        min-height: 34px !important;
        max-width: 34px !important;
        max-height: 34px !important;
    }
}

/* Oasis centered message modal (replaces browser alert popups) */
.oasis-alert-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
    z-index: 99999
}

.oasis-alert-overlay.active {
    display: flex
}

.oasis-alert-card {
    width: 360px;
    max-width: 100%;
    background: #fff;
    border-radius: 13px;
    padding: 27px 24px 23px;
    text-align: center;
    box-shadow: 0 14px 38px rgba(0, 0, 0, .22);
    font-family: 'Nunito', sans-serif
}

.oasis-alert-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 13px;
    border-radius: 50%;
    background: #edf4ef;
    color: #1e3b2b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem
}

.oasis-alert-card h3 {
    font-size: 1.05rem;
    color: #1a2b1c;
    margin: 0 0 8px
}

.oasis-alert-card p {
    white-space: pre-line;
    color: #706f6c;
    font-size: .83rem;
    line-height: 1.5;
    margin: 0 0 20px;
    max-height: 45vh;
    overflow: auto
}

.oasis-alert-card button {
    width: 100%;
    border: 0;
    border-radius: 7px;
    padding: 10px 14px;
    background: #1e3b2b;
    color: #fff;
    font: 800 .84rem 'Nunito', sans-serif;
    cursor: pointer
}

/* Sidebar brand header refresh */
.sidebar-header {
    background: #fff !important;
    color: #111 !important;
    border-bottom: 1px solid #e5e7e5 !important;
}

.sidebar-header .sidebar-logo-icon {
    background: #fff !important;
    box-shadow: none !important;
}

.sidebar-header .sidebar-logo-text {
    color: #111 !important;
}

.sidebar-header .sidebar-logo-text span {
    color: #3f4a42 !important;
    opacity: 1 !important;
}

/* Records use more of the available right-side width */
.records-grid {
    grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr) !important;
}

.records-grid .panel {
    min-width: 0;
}

.records-grid .table-wrap,
.records-grid table {
    width: 100%;
}

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

.record-see-all {
    border: 0;
    background: none;
    color: #1e3b2b;
    font: 800 .76rem 'Nunito', sans-serif;
    cursor: pointer;
    white-space: nowrap;
}

.record-row-hidden {
    display: none;
}

/* Thin clinic-green outline around the white sidebar brand header */
.sidebar-header {
    border: 1px solid #2f5d42 !important;
}

.clinic-notification-count {
    margin-left: auto;
    background: #f1b932;
    color: #1b3323;
    border-radius: 999px;
    padding: 1px 7px;
    font-size: .68rem;
    font-weight: 800;
    flex-shrink: 0;
}

.inventory-review-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 16px;
    border: 1px solid #1e3b2b;
    border-radius: 8px;
    background: #1e3b2b;
    color: #fff;
    font-weight: 800;
    font-size: .82rem;
    text-decoration: none;
}

.inventory-review-button:hover { background: #2e533c; }
.inventory-review-button:focus-visible { outline: 2px solid #926000; outline-offset: 3px; }

.inventory-expiration-alerts {
    margin-bottom: 24px;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid #dfe7e0;
    border-radius: 12px;
}

.inventory-expiration-alerts summary { font-weight: 800; color: #1e3b2b; }
.inventory-expiration-list { max-height: 280px; overflow-y: auto; margin: 12px 0; }
.inventory-expiration-alert {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 20px;
    padding: 10px 0;
    border-bottom: 1px solid #edf1ed;
}
.inventory-expiration-alert p { margin: 4px 0 0; font-size: .82rem; color: #738275; }
.expiration-overdue { color: #b42318; font-weight: 700; }
.expiration-upcoming { color: #926000; font-weight: 700; }

/* Shared dropdown indicators and editable option lists. */
select:not([multiple]):not([size]),
select[size="1"] {
    appearance: none;
    padding-right: 36px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231e3b2b' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 12px center !important;
    background-size: 16px !important;
}

.oasis-option-field {
    position: relative;
    min-width: 0;
    width: 100%;
}

.oasis-option-field > input {
    width: 100%;
    padding-right: 40px !important;
}

.oasis-option-toggle {
    position: absolute;
    right: 1px;
    top: 1px;
    width: 36px;
    height: calc(100% - 2px);
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #1e3b2b;
    font-size: 22px;
    cursor: pointer;
}

.oasis-option-toggle[aria-expanded="true"] { transform: rotate(180deg); }

.oasis-option-list {
    position: absolute;
    inset: calc(100% + 4px) 0 auto;
    z-index: 100;
    max-height: 220px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #dfe7e0;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgb(0 0 0 / 12%);
}

.oasis-option-list[hidden] { display: none; }

.oasis-option-list > button {
    display: block;
    width: 100%;
    border: 0;
    padding: 10px 12px;
    background: transparent;
    color: #1e3b2b;
    text-align: left;
    font: inherit;
    white-space: normal;
    cursor: pointer;
}

.oasis-option-list > button:hover,
.oasis-option-list > button:focus-visible { background: #edf5ef; }

details > summary { cursor: pointer; list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before {
    content: '\203A';
    display: inline-block;
    margin-right: 8px;
    transition: transform .15s ease;
}
details[open] > summary::before { transform: rotate(90deg); }

/* Live date/time displayed beside topbar search fields */
.oasis-topbar-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    min-width: 0;
}

.oasis-live-datetime {
    min-width: 148px;
    background: #fff;
    border: 1px solid #dfe7e0;
    border-radius: 10px;
    padding: 7px 11px;
    color: #1e3b2b;
    line-height: 1.15;
    text-align: right;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .025);
    flex-shrink: 0;
}

.oasis-live-date {
    display: block;
    font-size: .66rem;
    font-weight: 800;
    color: #738275;
    letter-spacing: .15px;
}

.oasis-live-time {
    display: block;
    font-size: .82rem;
    font-weight: 800;
    margin-top: 3px;
}

@media(max-width:900px) {
    .oasis-topbar-tools {
        width: 100%;
        justify-content: space-between;
    }

    .oasis-topbar-tools .search-bar {
        flex: 1;
        width: auto !important;
    }
}

@media(max-width:520px) {
    .oasis-topbar-tools {
        align-items: stretch;
        flex-direction: column;
    }

    .oasis-live-datetime {
        width: 100%;
        text-align: left;
        min-width: 0;
        display: flex;
        gap: 8px;
        align-items: center;
        justify-content: space-between;
    }

    .oasis-live-time {
        margin-top: 0;
    }
}


/* Final sidebar brand + live date/time refinements */
.sidebar-header {
    background: #fff !important;
    color: #111 !important;
    border: 0 !important;
    border-left: 1px solid #2f5d42 !important;
    border-right: 1px solid #2f5d42 !important;
    border-bottom: 1px solid #2f5d42 !important;
    min-height: 82px;
    padding: 14px 15px !important;
    gap: 12px !important;
}

.sidebar-header .sidebar-logo-icon {
    width: 46px !important;
    height: 46px !important;
    min-width: 46px !important;
    min-height: 46px !important;
    max-width: 46px !important;
    max-height: 46px !important;
    background: #fff !important;
    box-shadow: none !important;
    border-radius: 8px !important;
    overflow: hidden !important;
}

.sidebar-header .sidebar-paw-image {
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    display: block !important;
}

.sidebar-header .sidebar-logo-text {
    color: #111 !important;
    font-size: 1.12rem !important;
    line-height: 1.05 !important;
    font-weight: 700 !important;
}

.sidebar-header .sidebar-logo-text span {
    color: #27332b !important;
    font-size: .68rem !important;
    line-height: 1.15 !important;
    letter-spacing: 1.25px !important;
    margin-top: 4px !important;
    opacity: 1 !important;
}

/* Keep live date/time beside search, but remove its card/border look. */
.oasis-live-datetime {
    min-width: 140px;
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    padding: 0 2px !important;
    box-shadow: none !important;
    color: #1e3b2b;
}

@media(max-width:620px) {
    .sidebar-header {
        min-height: 72px;
        padding: 11px 13px !important;
    }

    .sidebar-header .sidebar-logo-icon {
        width: 40px !important;
        height: 40px !important;
        min-width: 40px !important;
        min-height: 40px !important;
        max-width: 40px !important;
        max-height: 40px !important;
    }

    .sidebar-header .sidebar-logo-text {
        font-size: 1.02rem !important;
    }

    .sidebar-header .sidebar-logo-text span {
        font-size: .62rem !important;
    }
}

/* Shared empty state for all Oasis search fields */
.oasis-search-empty {
    margin: 14px 0;
    padding: 14px 16px;
    border: 1px dashed #cbd8ce;
    border-radius: 10px;
    background: #fff;
    color: #738275;
    text-align: center;
    font: 700 .82rem 'Nunito', sans-serif;
}

.oasis-search-empty[hidden] {
    display: none !important;
}

.search-empty-row td {
    padding: 18px !important;
    text-align: center !important;
    color: #738275 !important;
    font-weight: 700 !important;
    background: #fbfcfb !important;
}

/* Keep header space stable before clock initialization and during clock ticks. */
.topbar {
    min-width: 0;
    gap: 16px;
    flex-shrink: 0;
}

.topbar > :first-child { min-width: 0; }

.topbar h1,
.topbar p { margin: 0; }

.topbar .oasis-topbar-tools {
    min-width: 0;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.topbar .oasis-topbar-tools .search-bar {
    box-sizing: border-box;
    height: 40px;
    min-height: 40px;
    margin: 0;
    padding: 8px 16px;
}

.topbar .search-bar input {
    min-width: 0;
    width: 100%;
}

.oasis-live-datetime {
    width: 178px;
    min-width: 178px;
    flex: 0 0 178px;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.content-area { scrollbar-gutter: stable; }

@media (min-width: 901px) {
    .topbar {
        height: auto !important;
        min-height: 90px;
        padding: 16px 32px;
        align-items: center;
    }

    .topbar:has(> .oasis-topbar-tools) {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .topbar .oasis-topbar-tools .search-bar {
        width: clamp(180px, 20vw, 280px);
        flex: 0 0 auto;
    }
}

@media (max-width: 900px) {
    .topbar .oasis-topbar-tools .search-bar {
        flex: 1 1 0;
    }
}
@media (max-width: 520px) {
    .topbar .oasis-topbar-tools .search-bar { flex: 0 0 auto; }
    .oasis-live-datetime { width: 100%; min-width: 0; flex: 0 0 auto; }
}
