/*
   File: styles.css
   Version: 6.36
*/

/* ================================
   Base / Reset (shared)
   ================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    height: 100%;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
                 Roboto, Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 1.4;
}

/* Reserve space so content isn't hidden behind the fixed footer
   (overridden when using the app-shell layout) */
body {
    padding-bottom: 2rem;
}

/* 3-section shell: header / main / footer */
body.app-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-bottom: 0;        /* footer is not fixed in shell */
    overflow: hidden;         /* scrolling only inside .app-content */
}

.app-header,
.app-footer {
    flex: 0 0 auto;
}

.app-content {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
    align-items: stretch;
    overflow: hidden;         /* inner scroll container handles scrolling */
    padding: 0.5rem 1rem 0.75rem;
}

/* Inner layout for content width */
.page-main,
.page-inner {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Main page content container inside <main> */
.page-main,
.page-inner {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Top row inside page: title + buttons; fixed within content */
.page-header-row {
    flex: 0 0 auto;
}

/* Filters: fixed within content */
.page-main .section,
.page-inner .section {
    flex: 0 0 auto;
    margin-bottom: 0.5rem;
}

/* Scroll area for tables/cards only */
.page-scroll {
    flex: 1 1 auto;
    overflow-y: auto;
    padding-bottom: 0.5rem;
}

/* Limit line length for main content on non-shell pages */
body:not(.app-shell) > * {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* Allow footer to be full width even on non-app-shell pages (e.g. login.php) */
body:not(.app-shell) > .page-footer,
body:not(.app-shell) > .page-footer-spacer {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
}

/* ================================
   Typography & Layout (shared)
   ================================ */

h1, h2, h3 {
    font-weight: 600;
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

h1 {
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

h2 {
    font-size: 1.3rem;
}

h3 {
    font-size: 1.1rem;
}

p {
    margin-top: 0.4em;
    margin-bottom: 0.4em;
}

/* ================================
   Forms & Controls (shared)
   ================================ */

form {
    margin: 0.5em 0;
}

label {
    font-size: 0.9rem;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
select {
    font: inherit;
    padding: 0.25rem 0.4rem;
    border-radius: 4px;
    min-width: 160px;
    box-sizing: border-box;
    height: 30px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

textarea {
    font: inherit;
    padding: 0.25rem 0.4rem;
    border-radius: 4px;
    min-width: 160px;
    box-sizing: border-box;
}

/* Custom dropdown triangle for selects */
select {
    padding-right: 1.5em;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23666'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.4em center;
    background-size: 10px 6px;
}

input[type="checkbox"]:focus {
    box-shadow: none;
}

/* Override browser autofill/autocomplete highlight */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
select:-webkit-autofill,
textarea:-webkit-autofill {
    -webkit-text-fill-color: inherit;
    -webkit-box-shadow: 0 0 0 1000px transparent inset;
    transition: background-color 5000s ease-in-out 0s;
}

/* Disable focus highlight on select dropdowns in health config */
#healthConvTypeSelect:focus,
#healthMetricType:focus,
#healthDisplayUnit:focus {
    box-shadow: none;
}

/* Search form layout */
#searchForm label {
    vertical-align: middle;
}

/* Buttons (structure only, colors in theme CSS) */
h1 button, h1 input[type="button"], h1 input[type="submit"],
h2 button, h2 input[type="button"], h2 input[type="submit"],
h3 button, h3 input[type="button"], h3 input[type="submit"],
button, input[type="submit"], input[type="button"] {
    font: revert !important;
    padding: 0.1rem 0.4rem !important;
    border-radius: 4px !important;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    transition: background-color 0.15s ease, border-color 0.15s ease,
                transform 0.05s ease, color 0.15s ease;
}

/* Make file upload button use same structure as normal buttons */
input[type="file"]::file-selector-button,
input[type="file"]::-webkit-file-upload-button {
    font: inherit;
    padding: 0.25rem 0.7rem;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    transition: background-color 0.15s ease, border-color 0.15s ease,
                transform 0.05s ease, color 0.15s ease;
    margin-right: 0.5rem;
}

/* Tiny X clear buttons in filters (structure) */
#clearPetName,
#clearOwnerName {
    padding: 0 0.3rem;
    min-width: auto;
    border-radius: 9999px;
    font-size: 0.75rem;
    line-height: 1;
}

/* Disabled button visual feedback */
button:disabled,
input[type="submit"]:disabled,
input[type="button"]:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

/* ================================
   Icon buttons (Lucide)
   ================================ */

.icon-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    padding: 0.2rem 0.3rem !important;
    min-width: 28px !important;
    height: 28px;
    border-radius: 4px !important;
    cursor: pointer;
    vertical-align: middle;
    line-height: 1;
    background: transparent !important;
    border-color: transparent !important;
    color: #2563eb !important;
}

.icon-btn:hover {
    background: rgba(37, 99, 235, 0.1) !important;
    color: #1d4ed8 !important;
}

.icon-btn svg {
    width: 16px;
    height: 16px;
    pointer-events: none;
}

/* Danger variant (delete, terminate, reject) */
.icon-btn-danger {
    background: transparent !important;
    border-color: transparent !important;
    color: #dc2626 !important;
}

.icon-btn-danger:hover {
    background: rgba(220, 38, 38, 0.1) !important;
    border-color: transparent !important;
    color: #b91c1c !important;
}

/* Success variant (approve, enable, restore) */
.icon-btn-success {
    background: transparent !important;
    border-color: transparent !important;
    color: #16a34a !important;
}

.icon-btn-success:hover {
    background: rgba(22, 163, 74, 0.1) !important;
    border-color: transparent !important;
    color: #15803d !important;
}

/* Warning variant (disable, suspend) */
.icon-btn-warning {
    background: transparent !important;
    border-color: transparent !important;
    color: #d97706 !important;
}

.icon-btn-warning:hover {
    background: rgba(217, 119, 6, 0.1) !important;
    border-color: transparent !important;
    color: #b45309 !important;
}

/* Neutral/secondary variant (export, refresh, copy) */
.icon-btn-secondary {
    background: transparent !important;
    border-color: transparent !important;
    color: #6b7280 !important;
}

.icon-btn-secondary:hover {
    background: rgba(107, 114, 128, 0.1) !important;
    border-color: transparent !important;
    color: #4b5563 !important;
}

/* Remove form margins inside table cells */
td form {
    margin: 0;
    padding: 0;
}

/* Icon button in table cells — tighter spacing */
td .icon-btn {
    margin: 0 1px;
}

/* Icon button group — consistent spacing */
.icon-btn-group {
    display: inline-flex;
    gap: 3px;
    align-items: center;
}

/* ================================
   Tables (shared)
   ================================ */

table {
    width: 100%;
    border-collapse: collapse;
    margin: 0.5em 0 1em;
    border-radius: 6px;
    overflow: hidden;
}

th,
td {
    padding: 0.35rem 0.5rem;
    line-height: 28px;
    vertical-align: middle;
}

/* Allow centered headers */
th.text-center,
th[style*="text-align:center"] {
    text-align: center;
}

/* Notes column: allow long text (pets table) */
td:nth-child(13) {
    white-space: pre-wrap;
}

/* ================================
   Messages (shared, colors in theme CSS)
   ================================ */

.message-error,
.message-success {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    margin: 0.4rem 0;
}

/* Toast container & toasts (flash popups) */
#toast-container {
    position: fixed;
    right: 1rem;
    top: 1rem;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

.toast {
    min-width: 220px;
    max-width: 360px;
    pointer-events: auto;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

/* Remove extra margins when message styles are used as toasts */
.toast.message-error,
.toast.message-success {
    margin: 0;
}

/* ================================
   Auth / Small Forms (shared)
   ================================ */

.login-container,
.small-form {
    max-width: 420px;
    margin: 2rem auto;
    padding: 1rem 1.25rem;
    border-radius: 6px;
}

/* Center login form in the middle of the screen */
body.login-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}

body.login-page .login-container {
    margin: 0;
}

/* Full-width login banner above the form */
.login-banner {
    width: 100%;
    text-align: center;
    margin-bottom: 1rem;
}

/* Rounded corners for login banner image */
.login-banner img {
    border-radius: 16px;
    overflow: hidden;
}

/* Make login form fields aligned and same size */
.login-container form label {
    display: block;
    margin-bottom: 0.5rem;
}

.login-container form input[type="text"],
.login-container form input[type="password"] {
    display: block;
    width: 100%;
    max-width: 260px;
    box-sizing: border-box;
    margin-top: 0.15rem;
}

/* ================================
   Utility
   ================================ */

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }

.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }

/* ================================
   Fixed footer (non-shell)
   ================================ */

.site-footer,
.page-footer {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    text-align: center;
    z-index: 1500;
    border-top: none;
}

/* In shell layout, footer participates in flex and is not fixed */
body.app-shell .page-footer {
    position: relative;
}

/* Inner wrapper to align footer content with main max-width */
.page-footer-inner {
    max-width: none;
    width: 100%;
    margin: 0;
    text-align: center;
}

/* Spacer div inside main page flow so content doesn't run into footer
   (not needed in shell layout, but harmless) */
.page-footer-spacer {
    height: 2rem;
}

/* ================================
   Site-wide background overlay (except login page)
   ================================ */

body:not(.login-page) {
    position: relative;
}

body:not(.login-page)::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
}

/* Generic section/container (colors in theme CSS) */
.section {
    border-radius: 6px !important;
    border: 1px solid transparent;
    padding: 0.5em;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 1rem;
}

/* ================================
   Header-specific styles
   ================================ */

.app-header-inner {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 0.5rem 1.5rem 0.75rem;
}

/* Top bar with user info on the right */
.header-top {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 0.25rem;
}

.header-user {
    margin: 0;
    font-size: 0.9rem;
}

/* User menu dropdown (top-right) */
.header-user-menu {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.9rem;
}

.header-user-label {
    color: #6b7280;
}

/* Just text, no button look */
.user-menu-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.15rem;
    cursor: pointer;
    padding: 0;
    border: none;
    background: transparent;
}

.user-menu-caret {
    font-size: 0.7rem;
}

/* Subscription status dot in header */
.sub-status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.2em;
    vertical-align: middle;
}

/* Dropdown panel */
.user-menu-dropdown {
    position: absolute;
    right: 0;
    top: 100%;
    min-width: 150px;
    padding: 0.25rem 0;
    border-radius: 6px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.18);
    background: #ffffff;
    border: 1px solid #d1d5db;
    display: none;
    z-index: 1800;
}

/* Menu items as plain links */
.user-menu-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 0.25rem 0.75rem;
    font-size: 0.9rem;
    text-decoration: none;
    color: inherit;
    box-sizing: border-box;
}

.user-menu-item:hover {
    background-color: #f3f4f6;
}

/* Active state for current page in user dropdown */
.user-menu-item-active {
    font-weight: 600;
    background-color: #f3f4f6;
}

/* User menu section dividers */
.user-menu-divider {
    display: flex;
    align-items: center;
    gap: 0.4em;
    padding: 0.3rem 0.75rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: #9ca3af;
    text-transform: uppercase;
    white-space: nowrap;
    margin-top: 0.15rem;
}

.user-menu-divider::after {
    content: "";
    flex: 1 1 auto;
    border-top: 1px solid #d1d5db;
}

/* Show dropdown while hovering username or dropdown */
.header-user-menu:hover .user-menu-dropdown {
    display: block;
}

/* Show dropdown when JS adds class */
.header-user-menu.user-menu-open .user-menu-dropdown {
    display: block;
}

/* Nav pills */
.main-nav {
    text-align: center;
    margin-bottom: 0.25rem;
}

.nav-pill-bar {
    display:inline-flex;
    flex-wrap:wrap;
    gap:0.4rem;
    justify-content:center;
}

.nav-pill {
    display:inline-block;
    padding:0.25rem 0.7rem;
    border-radius:9999px;
    border:1px solid #d1d5db;
    text-decoration:none;
    font-size:0.85rem;
    font-weight:600;
    letter-spacing:0.03em;
    color:#111827;
    background:#f9fafb;
    text-transform:uppercase;
    transition:background-color 0.15s ease, border-color 0.15s ease,
               color 0.15s ease, box-shadow 0.15s ease;
}
.nav-pill:hover {
    background:#e5e7eb;
    border-color:#9ca3af;
    box-shadow:0 1px 3px rgba(0,0,0,0.12);
    text-decoration:none;
}
.nav-pill-active {
    background:#2563eb;
    border-color:#1d4ed8;
    color:#ffffff;
}
.nav-pill-active:hover {
    background:#1d4ed8;
    border-color:#1d4ed8;
}

/* Slightly larger logout pill only */
.nav-pill-logout {
    padding:0.25rem 0.9rem;
}

.section > h2 {
    margin-top: 0;
    margin-bottom: 0.6rem;
}

/* ================================
   Password field + toggle button
   ================================ */

.password-field-wrapper {
    position: relative;
    max-width: 260px;
    display: inline-block;
}
.password-field-wrapper input[type="password"],
.password-field-wrapper input[type="text"] {
    width: 100%;
    padding-right: 2.0rem;
}
/* On login/register pages, password wrapper matches full-width inputs */
.login-container .password-field-wrapper {
    display: block;
    max-width: 260px;
}
.pw-toggle-btn {
    position: absolute;
    right: 0.2rem;
    top: 50%;
    transform: translateY(-50%);
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0;
    margin: 0;
    cursor: pointer;
    width: 24px;
    height: 24px;
}
.pw-toggle-btn:hover,
.pw-toggle-btn:active {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    transform: translateY(-50%) !important;
}
.pw-toggle-btn svg,
.pw-toggle-btn img {
    width: 20px;
    height: 20px;
    display: block;
}

.pw-toggle-btn1 {
    color: #6b7280;
}

.pw-toggle-btn1:hover {
    color: #374151;
}

.pw-toggle-btn {
    color: #374151;
}

.pw-toggle-btn:hover {
    color: #111827;
}

/* ================================
   Confirm modal (modal.php)
   ================================ */

#confirmModalOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}
#confirmModal {
    background: #ffffff;
    color: #111827;
    max-width: 480px;
    width: 90%;
    padding: 1rem 1.25rem;
    border-radius: 6px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
}
#confirmModalMessage {
    margin-bottom: 1rem;
}

/* ================================
   Photo editor overlay (add_edit_photo.php)
   ================================ */

#photoEditorOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2700;
}
#photoEditorModal {
    background: #ffffff;
    color: #111827;
    padding: 0.75rem 0.9rem 0.9rem;
    border-radius: 6px;
    box-shadow: 0 12px 30px rgba(0,0,0,0.4);
    max-width: 900px;
    width: 95%;
}
#photoEditorTitle {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 0.6rem 0;
}
#photoEditorFrameWrapper {
    position: relative;
    width: 100%;
    max-width: 640px;
    margin: 0 auto 0.75rem;
    background: #111827;
    overflow: hidden;
}
#photoEditorFrameInner {
    position: relative;
    width: 100%;
    padding-top: 75%;
    overflow: hidden;
    background: #000000;
}
#photoEditorImage {
    position: absolute;
    top: 0;
    left: 0;
    cursor: grab;
    user-select: none;
    -webkit-user-drag: none;
}
#photoEditorControls {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}
#photoEditorLeftControls,
#photoEditorRightControls {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
#photoEditorFileInput {
    display: none;
}
#photoEditorHint {
    font-size: 0.8rem;
    color: #6b7280;
}

/* ================================
   Footer bar & pills
   ================================ */

.footer-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
}
.footer-pill-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
}
.footer-copy {
    font-size: 0.75rem;
}
.footer-pill {
    display: inline-block;
    padding: 0.08rem 0.45rem;
    border-radius: 9999px;
    border: 1px solid #d1d5db;
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: #111827;
    background: #f9fafb;
    text-transform: uppercase;
    transition: background-color 0.15s ease, border-color 0.15s ease,
                color 0.15s ease, box-shadow 0.15s ease;
}
.footer-pill:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
    text-decoration: none;
}
#aboutModalOverlay,
#legalModalOverlay,
#termsModalOverlay,
#privacyModalOverlay,
#contactModalOverlay {
    max-width: none !important;
    margin: 0 !important;
}

/* ================================
   Recover account modal (login.php)
   ================================ */

#recoverModalOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2100;
    max-width: none !important;
    margin: 0 !important;
}
#recoverModal {
    background: #ffffff;
    color: #111827;
    max-width: 420px;
    width: 90%;
    padding: 1rem 1.25rem;
    border-radius: 6px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
}
#recoverModal h3 {
    margin-top: 0;
}
#recoverModalActions {
    text-align: right;
    margin-top: 0.75rem;
}

/* ================================
   Register container
   ================================ */

#registerContainer {
    max-width: 580px;
    margin: 2rem auto;
    padding: 1rem 1.25rem;
    border-radius: 6px;
}

/* Register form two-column layout */
.register-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.6em;
}

.register-col {
    flex: 1 1 0;
    min-width: 0;
}

.register-col label {
    display: block;
    margin-bottom: 0.2rem;
}

.register-col input[type="text"],
.register-col input[type="email"] {
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

.register-pw-wrapper {
    max-width: none;
    display: block;
    width: 100%;
}

.register-pw-wrapper input[type="password"],
.register-pw-wrapper input[type="text"] {
    width: 100%;
    max-width: none;
}

/* Stack register form columns on narrow screens */
@media (max-width: 600px) {
    .register-row {
        flex-direction: column;
        gap: 0.4em;
    }

    #registerContainer {
        max-width: 420px;
    }
}

#reg_email {
    width: 100%;
    max-width: 260px;
    box-sizing: border-box;
}

/* ================================
   Reset password container
   ================================ */

#resetContainer {
    max-width: 420px;
    margin: 2rem auto;
    padding: 1rem 1.25rem;
    border-radius: 6px;
}
/* ================================
   Detail overlay (shared: pets, species, bin)
   ================================ */

.detail-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2500;
}
.detail-modal {
    background: transparent;
    border-radius: 6px;
    max-width: 900px;
    width: 95%;
    max-height: 90vh;
    overflow: hidden;
    position: relative;
}
.detail-frame {
    border: none;
    width: 100%;
    height: 80vh;
}
.detail-close-x {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    background: rgba(0,0,0,0.6);
    color: #f9fafb;
    border: none;
    border-radius: 9999px;
    width: 26px;
    height: 26px;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2600;
}
.detail-close-text {
    position: absolute;
    bottom: 0.5rem;
    right: 0.75rem;
    z-index: 2600;
}

/* Clickable table rows */
.clickable-row {
    cursor: pointer;
}
.clickable-row:hover {
    background-color: rgba(37, 99, 235, 0.08);
}

/* ================================
   Photo preview (add_edit_pet, add_edit_species)
   ================================ */

.photo-preview {
    max-width: 400px;
    max-height: 400px;
    border: 1px solid #ccc;
}
/* Round all main photos and thumbnails served via view_*_photo.php */
.details-photo-wrapper img,
.photo-preview {
    border-radius: 20px;
}
.photo-actions {
    margin-top: 0.75em;
}
.photo-actions button {
    margin-right: 0.5rem;
}

/* Photo shadow — all displayed photos */
.photo-display {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* ================================
   Popup details pages (details_pet, details_species)
   ================================ */

body.popup {
    padding-bottom: 0;
}
.details-wrapper {
    padding: 0.75rem 1rem 0.25rem;
}
.details-name {
    text-align: center;
    display: block;
}
.details-photo-wrapper {
    text-align: center;
    margin-bottom: 0.75rem;
}

/* ================================
   Date picker (logs.php)
   ================================ */

.date-picker-popup {
    position: absolute;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
    padding: 0.5rem;
    z-index: 2800;
    min-width: 220px;
    font-size: 0.85rem;
}
.date-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
    font-weight: 600;
}
.date-picker-nav-btn {
    min-width: 28px !important;
    padding: 0.1rem 0.3rem !important;
}
.date-picker-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    font-weight: 600;
    font-size: 0.75rem;
    margin-bottom: 0.2rem;
    color: #6b7280;
}
.date-picker-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    gap: 1px;
}
.date-cell {
    padding: 0.2rem;
    border-radius: 3px;
    font-size: 0.8rem;
    min-height: 1.5em;
}
.date-cell.disabled {
    color: #d1d5db;
}
.date-cell.enabled {
    cursor: pointer;
    color: #111827;
}
.date-cell.enabled:hover {
    background: #e5e7eb;
}
.date-cell.selected {
    background: #2563eb;
    color: #ffffff;
}
.date-cell.selected:hover {
    background: #1d4ed8;
}

/* ================================
   Logs header actions alignment
   ================================ */

.logs-header-actions form {
    margin: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
}

/* ================================
   Settings page layout
   ================================ */

.admin-settings-row {
    display: flex;
    align-items: center;
    margin-bottom: 0.4rem;
}
.admin-settings-label {
    display: inline-block;
    width: 220px;
    text-align: right;
    margin-right: 0.5rem;
    font-weight: 500;
}
.admin-settings-input {
    flex: 1 1 auto;
}
.admin-section-box {
    border: none;
    padding: 0;
    margin: 0;
}
.admin-range-hint {
    margin-left: 0.5rem;
    font-size: 0.8rem;
    color: #16a34a;
    white-space: nowrap;
}

/* ================================
   Page tabs (reusable: settings, system info, etc.)
   ================================ */

.page-tabs {
    display: flex;
    flex: 0 0 auto;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}

.page-tab {
    padding: 0.3rem 0.8rem !important;
    border-radius: 9999px !important;
    border: 1px solid #d1d5db !important;
    background: #f9fafb !important;
    color: #111827 !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.03em;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease,
                color 0.15s ease, box-shadow 0.15s ease;
}

.page-tab:hover {
    background: #e5e7eb !important;
    border-color: #9ca3af !important;
}

.page-tab.active {
    background: #2563eb !important;
    border-color: #1d4ed8 !important;
    color: #ffffff !important;
}

.page-tab.active:hover {
    background: #1d4ed8 !important;
}

.page-tab-panel {
    /* panels are shown/hidden via JS */
}

/* ================================
   Test email modal (settings.php)
   ================================ */

#testEmailModalOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2100;
}
#testEmailModal {
    background: #ffffff;
    color: #111827;
    max-width: 420px;
    width: 90%;
    padding: 1rem 1.25rem;
    border-radius: 6px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
}
#testEmailModal h3 {
    margin-top: 0;
}
#testEmailModalActions {
    text-align: right;
    margin-top: 0.75rem;
}

/* ================================
   Template variable picker (settings.php)
   ================================ */

#templateVarPicker {
    position: absolute;
    background: #ffffff;
    color: #111827;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
    padding: 4px 0;
    display: none;
    z-index: 2200;
    min-width: 180px;
    font-size: 0.9rem;
}
#templateVarPicker ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
#templateVarPicker li {
    padding: 3px 8px;
    cursor: pointer;
    white-space: nowrap;
}
#templateVarPicker li span.var-name {
    font-weight: bold;
    margin-right: 0.5em;
}
#templateVarPicker li.template-var-selected {
    background: #e5e7eb;
}
#templateVarPicker li:hover {
    background: #e5e7eb;
}
#templateVarPickerHint {
    padding: 3px 8px 2px;
    border-top: 1px solid #e5e7eb;
    font-size: 0.75rem;
    color: #6b7280;
}

/* ================================
   Pet card grid (pets.php)
   ================================ */

.pets-card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}
.pet-card {
    cursor: pointer;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0.5rem 0.6rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.pet-card-header {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}
.pet-card-thumb {
    flex: 0 0 80px;
    height: 80px;
    width: 80px;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e5e7eb;
}
.pet-card-thumb img {
    max-width: 100%;
    max-height: 100%;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.pet-card-title {
    flex: 1 1 auto;
}
.pet-card-title h3 {
    margin: 0 0 0.15rem;
    font-size: 1rem;
}
.pet-card-body {
    font-size: 0.9rem;
}
.pet-card-meta {
    margin: 0.1rem 0;
}
.pet-card-actions {
    margin-top: 0.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}
.pet-card-actions form {
    margin: 0;
}
.pet-card-actions button {
    min-width: auto;
}
.pet-card-secondary {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 0.15rem;
}
.pet-card-secondary span + span::before {
    content: " · ";
    margin: 0 0.15rem;
}
.pet-card:hover {
    transform: translateY(-1px);
}
.pet-card-thumb,
.vet-card-thumb,
.species-card-thumb {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
}

/* ================================
   Species card grid (species.php)
   ================================ */

.species-card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}
.species-card {
    background-color: #f5f7f7;
    cursor: pointer;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0.5rem 0.6rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.species-card-header {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}
.species-card-thumb {
    flex: 0 0 80px;
    height: 80px;
    width: 80px;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e5e7eb;
}
.species-card-thumb img {
    max-width: 100%;
    max-height: 100%;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.species-card-title {
    flex: 1 1 auto;
}
.species-card-title h3 {
    margin: 0 0 0.15rem;
    font-size: 1rem;
}
.species-card-body {
    font-size: 0.9rem;
}
.species-card-actions {
    margin-top: 0.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}
.species-card-actions form {
    margin: 0;
}
.species-card-actions button {
    min-width: auto;
}
.species-card:hover {
    transform: translateY(-1px);
}

/* ================================
   Vet card grid (vets.php)
   ================================ */

.vets-card-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}
.vet-card {
    cursor: pointer;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 0.5rem 0.6rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-height: 180px;
}
.vet-card-header {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}
.vet-card-thumb {
    flex: 0 0 80px;
    height: 80px;
    width: 80px;
    border-radius: 6px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e5e7eb;
    position: relative;
}
.vet-card-thumb img {
    max-width: 100%;
    max-height: 100%;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.vet-card-title {
    flex: 1 1 auto;
}
.vet-card-title h3 {
    margin: 0 0 0.15rem;
    font-size: 1rem;
}
.vet-card-body {
    font-size: 0.9rem;
}
.vet-card-actions {
    margin-top: 0.25rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}
.vet-card-actions form {
    margin: 0;
}
.vet-card-actions button {
    min-width: auto;
}
.vet-card:hover {
    transform: translateY(-1px);
}
/* Vet score overlay on card thumbnail */
.vet-score-overlay {
    position: absolute;
    top: 2px;
    left: 2px;
    display: flex;
    align-items: center;
    gap: 2px;
    background: rgba(0, 0, 0, 0.55);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 1px 4px;
    border-radius: 3px;
    line-height: 1;
}
.vet-score-overlay img,
.vet-score-overlay svg {
    width: 12px;
    height: 12px;
}

/* ================================
   Verify email container
   ================================ */

#verifyContainer {
    max-width: 420px;
    margin: 2rem auto;
    padding: 1rem 1.25rem;
    border-radius: 6px;
}

/* ================================
   Photo viewer (popup)
   ================================ */

body.photo-viewer {
    margin: 0;
    padding: 0;
    background: #000;
}
body.photo-viewer img {
    display: block;
}

/* ================================
   Anti-spam honeypot (hidden from humans)
   ================================ */

.hp-field {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
    overflow: hidden;
    pointer-events: none;
}

/* ================================
   Unsaved changes banner
   ================================ */

.unsaved-banner {
    position: fixed;
    top: 0.1rem;
    left: 50%;
    transform: translateX(-50%) translateY(-150%);
    z-index: 1900;
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #f59e0b;
    border-radius: 9999px;
    padding: 0.25rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.25s ease;
    pointer-events: none;
}

.unsaved-banner.visible {
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

/* ================================
   Combo box (reusable)
   ================================ */

.combo-box {
    position: relative;
    display: inline-block;
}

.combo-box-input {
    width: 20em;
    padding-right: 1.5em;
}

.combo-box-toggle-OLD {
    position: absolute;
    right: 3px;
    top: 50%;
    transform: translateY(-50%);
    border: none !important;
    background: transparent !important;
    cursor: pointer;
    padding: 0 4px;
    color: #444;
    font-size: 0.75rem;
    line-height: 1;
}

.combo-box-toggle {
    position: absolute;
    right: 3px;
    top: 50%;
    transform: translateY(-50%);
    border: none !important;
    background: transparent !important;
    cursor: pointer;
    padding: 0 6px;
    line-height: 1;
}

.combo-box-toggle::after {
    content: '';
    display: block;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #666;
}

.combo-box-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    max-height: 280px;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-top: none;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    z-index: 2200;
    display: none;
}

.combo-box-dropdown.open {
    display: block;
}

.combo-box-section-header {
    padding: 0.3em 0.5em;
    font-size: 0.75em;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: #f3f4f6;
    border-bottom: 1px solid #e5e7eb;
    cursor: default;
    user-select: none;
}

.combo-box-divider {
    border-top: 1px solid #e5e7eb;
}

.combo-box-item {
    padding: 0.35em 0.5em;
    cursor: pointer;
    font-size: 0.9em;
}

.combo-box-item:hover,
.combo-box-item.highlighted {
    background: #e5e7eb;
}

.combo-box-item .combo-box-account {
    font-size: 0.85em;
    color: #6b7280;
    margin-left: 0.3em;
}

.combo-box-item .combo-box-closed {
    font-size: 0.8em;
    color: #dc2626;
    font-weight: 600;
    margin-left: 0.3em;
}

.combo-box-empty {
    padding: 0.5em;
    font-size: 0.85em;
    color: #6b7280;
    text-align: center;
    cursor: default;
}

.combo-box-clear {
    position: absolute;
    right: 1.3em;
    top: 50%;
    transform: translateY(-50%);
    border: none !important;
    background: transparent !important;
    cursor: pointer;
    padding: 0 4px;
    color: #444;
    font-size: 0.75rem;
    line-height: 1;
    display: none;
}

/* ================================
   Health metric range buttons
   ================================ */

.health-range-btn {
    padding: 0.15rem 0.4rem !important;
    border-radius: 4px !important;
    border: 1px solid #d1d5db !important;
    background: #f9fafb !important;
    color: #374151 !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    cursor: pointer;
    min-width: auto !important;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.health-range-btn:hover {
    background: #e5e7eb !important;
    border-color: #9ca3af !important;
}

.health-range-btn.active {
    background: #2563eb !important;
    border-color: #1d4ed8 !important;
    color: #ffffff !important;
}

/* ================================
   Vet rating stars (inline SVG)
   ================================ */

.vet-star {
    display: inline-block;
    vertical-align: middle;
    margin-right: 2px;
}

.vet-star-none {
    stroke: #9ca3af;
    fill: none;
}

.vet-star-red {
    stroke: #dc2626;
    fill: #dc2626;
}

.vet-star-yellow {
    stroke: #d97706;
    fill: #d97706;
}

.vet-star-green {
    stroke: #16a34a;
    fill: #16a34a;
}

/* ================================
   Notification mail icons (inline SVG)
   ================================ */

.notify-mail {
    display: inline-block;
    vertical-align: middle;
    margin-left: 0.5em;
}

.notify-mail-green {
    stroke: #16a34a;
}

.notify-mail-red {
    stroke: #dc2626;
}

/* Health chart container background */
#healthChartContainer {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 0.5rem;
}

/* ================================
   Log row color coding
   ================================ */

.log-row-danger {
    background-color: #fef2f2 !important;
}

.log-row-success {
    background-color: #f0fdf4 !important;
}

.log-row-warning {
    background-color: #fff7ed !important;
}

.log-row-info {
    background-color: #eff6ff !important;
}

.log-row-admin {
    background-color: #faf5ff !important;
}

/* --- Flag language selector --- */
.flag-select {
    position: relative;
    display: inline-block;
}
.flag-select-btn {
    font: inherit !important;
    padding: 0.25rem 0.4rem !important;
    border-radius: 4px !important;
    min-width: 160px;
    height: 30px;
    box-sizing: border-box;
    display: inline-flex !important;
    align-items: center;
    gap: 0.4em;
    cursor: pointer;
    line-height: 1.4;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}
.flag-select-arrow1 {
    margin-left: auto;
    pointer-events: none;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid currentColor;
    opacity: 0.6;
}
.flag-select-arrow {
    margin-left: auto;
    pointer-events: none;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid #666;
}
.flag-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 2200;
    margin: 2px 0 0;
    padding: 0;
    list-style: none;
    border-radius: 4px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    min-width: 100%;
}
.flag-select-option {
    display: flex;
    align-items: center;
    gap: 0.4em;
    padding: 0.3em 0.5em;
    cursor: pointer;
    white-space: nowrap;
    font-size: 0.9em;
}
.flag-select-option.active {
    font-weight: 600;
}
.flag-icon1 {
    width: 1.4em;
    height: 1.05em;
    vertical-align: middle;
    border-radius: 2px;
    box-shadow: 0 0 1px rgba(0,0,0,0.15);
}
.flag-icon {
    width: 1.4em;
    height: 1.05em;
    vertical-align: middle;
    border-radius: 2px;
    border: 1px solid rgba(0,0,0,0.2);
}

/* ===================================
   Home / Dashboard
   =================================== */
.home-welcome {
    margin-bottom: 1.25rem;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    background: var(--card-bg, #f9fafb);
    border: 1px solid var(--border-color, #e5e7eb);
}
/* Section headings */
.home-section {
    margin-bottom: 1.5rem;
}
.home-section h3 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--text-color, #111827);
}
/* Quick stats row */
.home-stats {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    justify-content: flex-start;
}
.home-stat-card {
    flex: 0 1 auto;
    min-width: 100px;
    width: 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #e5e7eb);
/*    cursor: pointer;	*/
    cursor: default !important;
    transition: box-shadow 0.15s, border-color 0.15s;
}
.home-stat-card:hover {
/*    border-color: var(--accent-color, #3b82f6);	*/
/*    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);	*/
}
.home-stat-icon {
    color: var(--accent-color, #3b82f6);
    margin-bottom: 0.25rem;
}
.home-stat-icon svg {
    width: 24px;
    height: 24px;
}
.home-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}
.home-stat-label {
    font-size: 0.8rem;
    color: #6b7280;
    text-align: center;
}
/* News section */
.home-news-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.home-news-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    border-radius: 6px;
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #e5e7eb);
    transition: box-shadow 0.15s, border-color 0.15s;
}
.home-news-item:hover {
/*    border-color: var(--accent-color, #3b82f6);	*/
/*    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);	*/
}
.home-news-icon {
    flex: 0 0 auto;
}
.home-news-icon svg {
    width: 20px;
    height: 20px;
}
.home-news-content {
    flex: 1 1 auto;
    font-size: 0.9rem;
}
/* Announcements */
.home-news-announcements {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.home-announcement {
    padding: 0.6rem 0.75rem;
    border-radius: 6px;
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #e5e7eb);
    transition: opacity 0.3s, max-height 0.3s;
}

.home-announcement-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}

.home-announcement-title {
    flex: 1 1 auto;
    font-size: 0.9rem;
    line-height: 1.4;
}

.home-announcement-dismiss {
    flex: 0 0 auto;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 2px;
    color: #9ca3af;
    border-radius: 3px;
    transition: color 0.15s, background 0.15s;
}

.home-announcement-dismiss:hover {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.08);
}

.home-announcement-body {
    font-size: 0.85rem;
    color: var(--text-color, #374151);
    margin-top: 0.3em;
    line-height: 1.5;
}

.home-announcement-body a {
    color: var(--accent-color, #2563eb);
    text-decoration: underline;
}

.home-announcement-meta {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 0.3em;
}

.home-announcement-info {
    border-left-color: #2563eb;
}

.home-announcement-warning {
    border-left-color: #d97706;
}

.home-announcement-important {
    border-left-color: #dc2626;
    background: var(--card-bg, #fff5f5);
}
/* Upcoming events list */
.home-upcoming-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.home-upcoming-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    border-radius: 6px;
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #e5e7eb);
    transition: box-shadow 0.15s, border-color 0.15s;
    cursor: default !important;
}
.home-upcoming-item:hover {
/*    border-color: var(--accent-color, #3b82f6);	*/
/*    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);	*/
}
.home-upcoming-icon {
    flex: 0 0 auto;
}
.home-upcoming-icon svg {
    width: 20px;
    height: 20px;
}
.home-upcoming-birthday .home-upcoming-icon {
    color: #16a34a;
}
.home-upcoming-death .home-upcoming-icon {
    color: #dc2626;
}
.home-upcoming-event .home-upcoming-icon {
    color: #2563eb;
}
.home-upcoming-content {
    flex: 1 1 auto;
    min-width: 0;
}
.home-upcoming-pet {
    font-size: 0.9rem;
    line-height: 1.3;
}
.home-upcoming-detail {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 0.1em;
}
.home-upcoming-date {
    flex: 0 0 auto;
    font-size: 0.8rem;
    color: #6b7280;
    white-space: nowrap;
    text-align: right;
}
.home-upcoming-today {
    color: #dc2626;
    font-weight: 600;
}
/* Feature cards grid */
.home-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.75rem;
}
.home-feature-card {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #e5e7eb);
    cursor: default !important;
    transition: box-shadow 0.15s, border-color 0.15s;
}
.home-feature-card:hover {
/*    border-color: var(--accent-color, #3b82f6);	*/
/*    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);	*/
}
.home-feature-icon {
    flex: 0 0 auto;
    margin-top: 0.1em;
}
.home-feature-icon svg {
    width: 22px;
    height: 22px;
}
.home-feature-body {
    flex: 1 1 auto;
    min-width: 0;
}
.home-feature-title {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.15em;
}
.home-feature-desc {
    font-size: 0.8rem;
    color: #6b7280;
    line-height: 1.3;
}
/* We Support section */
.home-support-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}
.home-support-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #e5e7eb);
    text-decoration: none;
    color: var(--text-color, #111827);
    transition: box-shadow 0.15s, border-color 0.15s;
    min-width: 140px;
}
.home-support-card:hover {
    border-color: var(--accent-color, #3b82f6);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.home-support-logo {
    max-width: 160px;
    max-height: 80px;
    object-fit: contain;
}
.home-support-logo {
    background: #2c2c2c;
    border-radius: 2px;
    padding: 1px;
}
.home-support-name {
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
}



/* ================================
   Responsive helpers & adjustments
   ================================ */

/* Horizontal scrolling helper for wide tables (to be used by wrapping tables) */
.table-scroll-x {
    overflow-x: auto;
    width: 100%;
}

.table-scroll-x table {
    min-width: 600px;
}

/* Pets card grid: make responsive; override 4-column inline grid on smaller screens */
@media (max-width: 900px) {
    body .pets-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
    body .vets-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 600px) {
    body .pets-card-grid {
        grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
    }
    body .vets-card-grid {
        grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
    }
}

/* On narrow screens, stack fixed-width labels above inputs and slightly increase base font */
@media (max-width: 600px) {
    .admin-settings-label,
    .page-inner label[style*="width:120px"],
    .page-inner label[style*="width:160px"],
    .page-inner label[style*="width:220px"],
    .page-inner label[style*="width: 120px"],
    .page-inner label[style*="width: 160px"],
    .page-inner label[style*="width: 220px"] {
        width: 100% !important;
        text-align: left !important;
        margin-right: 0 !important;
        display: block !important;
    }

    .admin-settings-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-settings-input {
        width: 100%;
    }

    body {
        font-size: 15px;
    }

    .app-header-inner {
        padding: 0.25rem 0.75rem 0.5rem;
    }

    .nav-pill-bar {
        gap: 0.25rem;
    }
}

@media (max-width: 900px) {
    body .species-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}
@media (max-width: 600px) {
    body .species-card-grid {
        grid-template-columns: repeat(1, minmax(0, 1fr)) !important;
    }
}

/* ================================
   Print styles
   ================================ */

@media print {
    /* Hide non-content elements */
    .app-header,
    .app-footer,
    .page-footer,
    .page-footer-spacer,
    .page-main-filters,
    #toast-container,
    #confirmModalOverlay,
    #photoEditorOverlay,
    #recoverModalOverlay,
    #testEmailModalOverlay,
    #templateVarPicker,
    #aboutModalOverlay,
    #legalModalOverlay,
    #termsModalOverlay,
    #privacyModalOverlay,
    #contactModalOverlay,
    #vetUpdateModalOverlay,
    #vetVoteModalOverlay,
    .detail-overlay,
    .unsaved-banner,
    .hp-field,
    #paypal-button-container,
    button,
    input[type="submit"],
    input[type="button"],
    .photo-actions,
    .pet-card-actions,
    .species-card-actions,
    .vet-card-actions {
        display: none !important;
    }

    /* Reset layout */
    body,
    body.app-shell {
        display: block;
        overflow: visible;
        background: #ffffff !important;
        color: #000000 !important;
        min-height: auto;
        padding: 0;
    }

    body::before {
        display: none !important;
    }

    .app-content {
        overflow: visible;
        padding: 0;
    }

    .page-scroll {
        overflow: visible;
    }

    .page-inner {
        max-width: none;
    }

    /* Headings */
    h1, h2, h3 {
        color: #000000 !important;
    }

    /* Links */
    a {
        color: #000000 !important;
        text-decoration: underline;
    }

    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666666;
    }

    a[href^="javascript"]::after,
    a[href^="#"]::after {
        content: none;
    }

    /* Clean tables */
    table {
        background: #ffffff !important;
    }

    th {
        background: #f3f4f6 !important;
        color: #000000 !important;
    }

    td {
        color: #000000 !important;
    }

    tbody tr:nth-child(even),
    tbody tr:nth-child(odd) {
        background: #ffffff !important;
    }

    tbody tr:hover {
        background: #ffffff !important;
    }

    /* Cards: clean borders, no hover effects */
    .pet-card,
    .species-card,
    .vet-card {
        background: #ffffff !important;
        border-color: #cccccc !important;
        transform: none !important;
        break-inside: avoid;
    }

    /* Section boxes */
    .section {
        background: #ffffff !important;
        border-color: #cccccc !important;
    }

    /* Photos: ensure visible */
    .photo-preview,
    .details-photo-wrapper img {
        max-width: 300px;
        max-height: 300px;
    }

    /* Prevent page breaks inside key elements */
    tr,
    .pet-card,
    .species-card,
    .vet-card,
    .details-wrapper {
        break-inside: avoid;
    }

    /* Popup/detail pages */
    body.popup {
        background: #ffffff !important;
        color: #000000 !important;
    }
}
