/* ============================================
   APPLE-STYLE MINIMAL PET OWNER MANAGEMENT
   Clean, spacious, minimalist design
============================================ */
/* ========== TABLE HORIZONTAL SCROLL ON MOBILE ========== */
@media (max-width: 768px) {
    .vet-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -16px;
        padding: 0 16px;
        width: calc(100% + 32px);
    }
    
    .vet-table {
        min-width: 700px; /* Or adjust based on your table content */
    }
    
    .vet-table th,
    .vet-table td {
        white-space: nowrap;
    }
}


/* ========== BASE STYLES ========== */
.vet-pet-owner-management-wrapper,
.vet-pet-owner-dashboard {
    max-width: 1400px;
    margin: 0 auto;
    padding: 25px;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Helvetica Neue', sans-serif;
    color: #1d1d1f;
}

/* ========== SECTION STYLES ========== */


.vet-section:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    border-color: #c7c7cc;
}

.vet-section-header {
    padding: 28px 32px;
    border-bottom: 1px solid #f2f2f7;
    background: #fafafa;
}

.vet-section-header h2 {
    margin: 0 0 8px 0;
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.5px;
    color: #1d1d1f;
    line-height: 1.1;
}

.vet-section-header p {
    margin: 0;
    color: #86868b;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.4;
}

/* ========== SEARCH BAR - APPLE STYLE ========== */
.vet-search-filter-bar {
    padding: 24px 32px 32px;
    background: transparent;
    border-bottom: 1px solid #f2f2f7;
}

.vet-search-container {
    position: relative;
    max-width: 5000px;
}

.vet-search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #8e8e93;
    width: 20px;
    height: 20px;
}

.vet-search-input {
    width: 100%;
    padding: 18px 24px 18px 56px;
    border: 1px solid #d2d2d7;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 400;
    background: #ffffff;
    color: #1d1d1f;
    transition: all 0.3s ease;
    box-shadow: 0 1px 6px rgba(32, 33, 36, 0.02);
}

.vet-search-input:focus {
    outline: none;
    border-color: #007aff;
    box-shadow: 0 1px 8px rgba(0, 122, 255, 0.1);
}

.vet-search-input::placeholder {
    color: #8e8e93;
    font-weight: 400;
}

/* ========== TABLE STYLES ========== */
.vet-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 16px;
    font-weight: 400;
}

.vet-table thead {
    background: #fafafa;
}

.vet-table th {
    padding: 20px 24px;
    text-align: left;
    font-weight: 500;
    color: #1d1d1f;
    font-size: 14px;
    text-transform: none;
    letter-spacing: -0.2px;
    border-bottom: 1px solid #d2d2d7;
    white-space: nowrap;
    background: #fafafa;
    position: sticky;
    top: 0;
    z-index: 10;
}

.vet-table tbody tr {
    transition: background-color 0.2s ease;
    border-bottom: 1px solid #f2f2f7;
}

.vet-table tbody tr:hover {
    background: #fafafa;
}

.vet-table td {
    padding: 20px 24px;
    color: #1d1d1f;
    vertical-align: middle;
    line-height: 1.5;
    font-size: 16px;
    border-bottom: 1px solid #f2f2f7;
}

/* Last row should not have border */
.vet-table tbody tr:last-child td {
    border-bottom: none;
}

/* ========== BADGE STYLES ========== */
.vet-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: -0.2px;
    line-height: 1;
    min-width: 80px;
}

.vet-badge-primary {
    background: rgba(0, 122, 255, 0.1);
    color: #007aff;
    border: 1px solid rgba(0, 122, 255, 0.2);
}

.vet-badge-success {
    background: rgba(52, 199, 89, 0.1);
    color: #34c759;
    border: 1px solid rgba(52, 199, 89, 0.2);
}

.vet-badge-danger {
    background: rgba(255, 59, 48, 0.1);
    color: #ff3b30;
    border: 1px solid rgba(255, 59, 48, 0.2);
}

.vet-badge-secondary {
    background: rgba(142, 142, 147, 0.1);
    color: #8e8e93;
    border: 1px solid rgba(142, 142, 147, 0.2);
}

.vet-badge-info {
    background: rgba(90, 200, 250, 0.1);
    color: #5ac8fa;
    border: 1px solid rgba(90, 200, 250, 0.2);
}

/* ========== BUTTON STYLES ========== */
.vet-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 17px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
}

.vet-btn-sm {
    padding: 10px 20px;
    font-size: 15px;
    border-radius: 8px;
}

.vet-btn-primary {
    background: #007aff;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.15);
}

.vet-btn-primary:hover {
    background: #0056d6;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 122, 255, 0.2);
}

.vet-btn-danger {
    background: #ff3b30;
    color: white;
    box-shadow: 0 4px 12px rgba(255, 59, 48, 0.15);
}

.vet-btn-danger:hover {
    background: #d70015;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 59, 48, 0.2);
}

.vet-btn-info {
    background: #5ac8fa;
    color: white;
    box-shadow: 0 4px 12px rgba(90, 200, 250, 0.15);
}

.vet-btn-info:hover {
    background: #1cb0ff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(90, 200, 250, 0.2);
}

.vet-btn-secondary {
    background: #8e8e93;
    color: white;
    box-shadow: 0 4px 12px rgba(142, 142, 147, 0.15);
}

.vet-btn-secondary:hover {
    background: #636366;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(142, 142, 147, 0.2);
}

/* Add Pet Owner Button */
#add-pet-owner-btn {
    position: fixed !important;
    bottom: 0px !important;
    left: 0px !important;
    right: 0px !important;
    padding: 20px !important; /* Added padding */
    font-size: 18px !important; /* Bigger text */
    height: 10px !important; /* Fixed height */
    background-color: #007bff !important; /* Make it stand out */
    color: white !important;
    border: none !important;
    cursor: pointer !important;
    z-index: 1000 !important; /* Ensure it's on top */
}

#add-pet-owner-btn:hover {
    background: #0056d6;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 122, 255, 0.2);
}

/* ========== MODAL STYLES ========== */
.vet-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: none;
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.vet-popup-content {
    background: rgba(255, 255, 255, 0.98);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 1200px;
    max-height: 85vh;
    overflow: hidden;
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(60px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

.vet-popup-large {
    max-width: 1200px;
}

.vet-popup-header {
    padding: 28px 32px;
    border-bottom: 1px solid #f2f2f7;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    z-index: 100;
}

.vet-popup-header h3 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #1d1d1f;
    letter-spacing: -0.5px;
}

.vet-popup-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #8e8e93;
    cursor: pointer;
    padding: 8px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    transition: all 0.3s;
    line-height: 1;
}

.vet-popup-close:hover {
    background: #f2f2f7;
    color: #1d1d1f;
}

.vet-popup-body {
    padding: 32px;
    max-height: calc(85vh - 90px);
    overflow-y: auto;
    box-sizing: border-box;
}

/* ========== PET CARDS - SPACIOUS LAYOUT ========== */
.vet-pet-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    padding: 8px;
}

.vet-pet-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e5e5ea;
    padding: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.vet-pet-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
    border-color: #d2d2d7;
}

.vet-pet-card-header {
    padding: 24px;
    border-bottom: 1px solid #f2f2f7;
    background: #fafafa;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vet-pet-card-header h4 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1d1d1f;
    letter-spacing: -0.3px;
}

.vet-pet-card-body {
    padding: 24px;
}

.vet-pet-card-body p {
    margin: 0 0 16px 0;
    color: #1d1d1f;
    font-size: 16px;
    line-height: 1.5;
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
}

.vet-pet-card-body p:last-child {
    margin-bottom: 0;
}

.vet-pet-card-body strong {
    color: #1d1d1f;
    font-weight: 500;
    min-width: 120px;
}

.vet-pet-card-footer {
    padding: 20px 24px;
    border-top: 1px solid #f2f2f7;
    background: #fafafa;
    display: flex;
    justify-content: flex-end;
}

/* ========== MEDICAL HISTORY - CLEAN SPACIOUS LAYOUT ========== */
#medical-history-content,
#owner-medical-content {
    padding: 0;
}

.vet-medical-history-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

.vet-medical-record {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e5e5ea;
    padding: 32px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    margin: 0;
}

.vet-medical-record:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    border-color: #d2d2d7;
}

.vet-medical-record-header {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f2f2f7;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vet-case-id {
    font-size: 18px;
    font-weight: 600;
    color: #007aff;
    letter-spacing: -0.3px;
}

.vet-visit-date {
    font-size: 16px;
    color: #8e8e93;
    font-weight: 400;
}

.vet-medical-record-body {
    display: grid;
    gap: 24px;
}

.vet-field-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.vet-field-label {
    font-size: 15px;
    font-weight: 500;
    color: #1d1d1f;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.8;
}

.vet-field-value {
    font-size: 17px;
    color: #1d1d1f;
    line-height: 1.6;
}

.vet-text-block {
    background: #fafafa;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #e5e5ea;
    margin-top: 8px;
    font-size: 16px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Status badges in medical history */
.vet-status-badge {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    margin-left: 12px;
}

.vet-status-open {
    background: rgba(52, 199, 89, 0.1);
    color: #34c759;
    border: 1px solid rgba(52, 199, 89, 0.2);
}

.vet-status-closed {
    background: rgba(142, 142, 147, 0.1);
    color: #8e8e93;
    border: 1px solid rgba(142, 142, 147, 0.2);
}

.vet-status-pending {
    background: rgba(255, 149, 0, 0.1);
    color: #ff9500;
    border: 1px solid rgba(255, 149, 0, 0.2);
}

.vet-status-verified {
    background: rgba(0, 122, 255, 0.1);
    color: #007aff;
    border: 1px solid rgba(0, 122, 255, 0.2);
}

.vet-status-unknown {
    background: rgba(175, 82, 222, 0.1);
    color: #af52de;
    border: 1px solid rgba(175, 82, 222, 0.2);
}

/* ========== REMINDER STYLES ========== */
.vet-reminder-note {
    background: linear-gradient(135deg, #fff8e1 0%, #fff3cd 100%);
    border: 1px solid #ffd54f;
    border-radius: 12px;
    padding: 24px;
    margin-top: 24px;
    position: relative;
}

.vet-reminder-note::before {
    content: "🔔";
    position: absolute;
    right: 24px;
    top: 24px;
    font-size: 24px;
    opacity: 0.8;
}

.vet-reminder-header {
    font-weight: 600;
    color: #f57c00;
    margin-bottom: 12px;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.vet-reminder-body {
    color: #e65100;
    font-size: 16px;
    line-height: 1.5;
    padding-right: 40px;
}

.vet-record-footer {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid #f2f2f7;
    text-align: right;
}

.vet-record-footer small {
    color: #8e8e93;
    font-size: 14px;
    font-weight: 400;
}

/* ========== LOADING STATES ========== */
.vet-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.vet-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid #f2f2f7;
    border-top: 3px solid #007aff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.vet-loading p {
    color: #8e8e93;
    font-size: 17px;
    font-weight: 400;
}

/* ========== EMPTY STATES ========== */
.vet-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
    background: #fafafa;
    border-radius: 16px;
    margin: 20px;
}

.vet-empty::before {
    content: "";
    width: 64px;
    height: 64px;
    background: #e5e5ea;
    border-radius: 50%;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: #8e8e93;
}

.vet-empty p {
    color: #8e8e93;
    font-size: 18px;
    font-weight: 400;
    max-width: 300px;
    margin: 0;
    line-height: 1.4;
}

/* ========== FORM STYLES ========== */
#add-pet-owner-form {
    padding: 0;
}

.vet-form-group {
    margin-bottom: 28px;
}

.vet-form-group label {
    display: block;
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 500;
    color: #1d1d1f;
}

.vet-form-group input,
.vet-form-group textarea {
    width: 100%;
    padding: 16px 20px;
    border: 1px solid #d2d2d7;
    border-radius: 12px;
    font-size: 17px;
    font-weight: 400;
    background: #ffffff;
    color: #1d1d1f;
    transition: all 0.3s;
    box-sizing: border-box;
}

.vet-form-group input:focus,
.vet-form-group textarea:focus {
    outline: none;
    border-color: #007aff;
    box-shadow: 0 0 0 4px rgba(0, 122, 255, 0.1);
}

.vet-form-group small {
    display: block;
    margin-top: 8px;
    color: #8e8e93;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.4;
}

.vet-form-actions {
    display: flex;
    gap: 16px;
    justify-content: flex-end;
    margin-top: 40px;
    padding-top: 28px;
    border-top: 1px solid #f2f2f7;
}

/* ========== ALERT MESSAGES ========== */
.vet-alert {
    position: fixed;
    top: 32px;
    right: 32px;
    padding: 20px 24px;
    border-radius: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 10000;
    max-width: 400px;
    animation: slideInRight 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.vet-alert-success {
    background: rgba(52, 199, 89, 0.95);
    color: white;
    border-color: rgba(52, 199, 89, 0.3);
}

.vet-alert-error {
    background: rgba(255, 59, 48, 0.95);
    color: white;
    border-color: rgba(255, 59, 48, 0.3);
}

/* ========== SCROLLBAR STYLING ========== */
.vet-popup-body::-webkit-scrollbar {
    width: 8px;
}

.vet-popup-body::-webkit-scrollbar-track {
    background: #f2f2f7;
    border-radius: 8px;
}

.vet-popup-body::-webkit-scrollbar-thumb {
    background: #c7c7cc;
    border-radius: 8px;
}

.vet-popup-body::-webkit-scrollbar-thumb:hover {
    background: #8e8e93;
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 1024px) {
    .vet-pet-cards {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
    
    .vet-popup-content {
        width: 95%;
        max-width: none;
    }
}

@media (max-width: 768px) {
    .vet-pet-owner-management-wrapper,
    .vet-pet-owner-dashboard {
        padding: 20px;
    }
    
    .vet-section-header {
        padding: 24px;
    }
    
    .vet-section-header h2 {
        font-size: 24px;
    }
    
    .vet-popup-body {
        padding: 24px;
    }
    
    .vet-popup-header {
        padding: 24px;
    }
    
    .vet-table th,
    .vet-table td {
        padding: 16px 20px;
    }
    
    .vet-pet-cards {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .vet-form-actions {
        flex-direction: column;
    }
    
    .vet-form-actions button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .vet-pet-owner-management-wrapper,
    .vet-pet-owner-dashboard {
        padding: 16px;
    }
    
    .vet-medical-record {
        padding: 24px;
    }
    
    .vet-section-header {
        padding: 20px;
    }
    
    .vet-popup {
        padding: 16px;
    }
    
    .vet-alert {
        left: 16px;
        right: 16px;
        max-width: none;
    }
}

/* ========== ACTION BUTTONS IN TABLE ========== */
.vet-table .vet-btn {
    margin: 4px 6px;
    min-width: 100px;
}

.vet-table .vet-btn-sm {
    min-width: 90px;
}

/* ========== SPACING UTILITY CLASSES ========== */
.vet-mb-4 { margin-bottom: 4px; }
.vet-mb-8 { margin-bottom: 8px; }
.vet-mb-12 { margin-bottom: 12px; }
.vet-mb-16 { margin-bottom: 16px; }
.vet-mb-20 { margin-bottom: 20px; }
.vet-mb-24 { margin-bottom: 24px; }
.vet-mb-32 { margin-bottom: 32px; }

.vet-p-8 { padding: 8px; }
.vet-p-12 { padding: 12px; }
.vet-p-16 { padding: 16px; }
.vet-p-20 { padding: 20px; }
.vet-p-24 { padding: 24px; }
.vet-p-32 { padding: 32px; }

/* ========== TEXT UTILITIES ========== */
.vet-text-light { color: #8e8e93; }
.vet-text-medium { color: #636366; }
.vet-text-dark { color: #1d1d1f; }
.vet-text-blue { color: #007aff; }
.vet-text-green { color: #34c759; }
.vet-text-red { color: #ff3b30; }

.vet-font-light { font-weight: 300; }
.vet-font-regular { font-weight: 400; }
.vet-font-medium { font-weight: 500; }
.vet-font-semibold { font-weight: 600; }
.vet-font-bold { font-weight: 700; }

/* ========== FLEX UTILITIES ========== */
.vet-flex { display: flex; }
.vet-flex-col { flex-direction: column; }
.vet-items-center { align-items: center; }
.vet-justify-center { justify-content: center; }
.vet-justify-between { justify-content: space-between; }
.vet-gap-4 { gap: 4px; }
.vet-gap-8 { gap: 8px; }
.vet-gap-12 { gap: 12px; }
.vet-gap-16 { gap: 16px; }
.vet-gap-20 { gap: 20px; }













/* ========== FIX FOR PET LIST IN MODALS ========== */

/* Fix for pet cards in modals */
.vet-popup-body .vet-pet-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 0;
    margin: 0;
}

.vet-popup-body .vet-pet-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e5e5ea;
    margin: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.vet-popup-body .vet-pet-card-header {
    padding: 20px;
    border-bottom: 1px solid #f2f2f7;
    background: #fafafa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.vet-popup-body .vet-pet-card-header h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1d1d1f;
    letter-spacing: -0.3px;
}

.vet-popup-body .vet-pet-card-body {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.vet-popup-body .vet-pet-card-body p {
    margin: 0 0 12px 0;
    color: #1d1d1f;
    font-size: 15px;
    line-height: 1.4;
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
}

.vet-popup-body .vet-pet-card-body p:last-child {
    margin-bottom: 0;
}

.vet-popup-body .vet-pet-card-body strong {
    color: #1d1d1f;
    font-weight: 500;
    min-width: 110px;
    font-size: 15px;
}

.vet-popup-body .vet-pet-card-footer {
    padding: 16px 20px;
    border-top: 1px solid #f2f2f7;
    background: #fafafa;
    display: flex;
    justify-content: center;
    flex-shrink: 0;
}

.vet-popup-body .vet-pet-card-footer .vet-btn {
    margin: 0;
    width: 100%;
}

/* Fix for medical history in modals */
.vet-popup-body .vet-medical-history-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0;
    margin: 0;
}

.vet-popup-body .vet-medical-record {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #e5e5ea;
    padding: 24px;
    margin: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.vet-popup-body .vet-medical-record-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f2f2f7;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vet-popup-body .vet-case-id {
    font-size: 16px;
    font-weight: 600;
    color: #007aff;
}

.vet-popup-body .vet-visit-date {
    font-size: 14px;
    color: #8e8e93;
    font-weight: 400;
}

.vet-popup-body .vet-field-row {
    margin-bottom: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.vet-popup-body .vet-field-row:last-child {
    margin-bottom: 0;
}

.vet-popup-body .vet-field-label {
    font-size: 13px;
    font-weight: 500;
    color: #636366;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vet-popup-body .vet-field-value {
    font-size: 15px;
    color: #1d1d1f;
    line-height: 1.5;
}

.vet-popup-body .vet-text-block {
    background: #fafafa;
    padding: 16px;
    border-radius: 10px;
    border: 1px solid #e5e5ea;
    margin-top: 4px;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Fix for reminder notes in modals */
.vet-popup-body .vet-reminder-note {
    background: linear-gradient(135deg, #fff8e1 0%, #fff3cd 100%);
    border: 1px solid #ffd54f;
    border-radius: 10px;
    padding: 16px;
    margin-top: 20px;
    position: relative;
}

.vet-popup-body .vet-reminder-header {
    font-weight: 600;
    color: #f57c00;
    margin-bottom: 8px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.vet-popup-body .vet-reminder-body {
    color: #e65100;
    font-size: 14px;
    line-height: 1.4;
}

/* Ensure proper scrolling for modal content */
.vet-popup-body {
    max-height: calc(85vh - 90px);
    overflow-y: auto;
}

/* Compact layout for mobile */
@media (max-width: 768px) {
    .vet-popup-body .vet-pet-cards {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .vet-popup-body .vet-pet-card {
        margin-bottom: 0;
    }
    
    .vet-popup-body .vet-medical-record {
        padding: 20px;
    }
    
    .vet-popup-body .vet-pet-card-header,
    .vet-popup-body .vet-pet-card-body,
    .vet-popup-body .vet-pet-card-footer {
        padding: 16px;
    }
}

/* Fix for pet owner dashboard */
.vet-pet-owner-dashboard .vet-pet-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    padding: 0;
}

.vet-pet-owner-dashboard .vet-pet-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e5e5ea;
    padding: 0;
    margin: 0;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.vet-pet-owner-dashboard .vet-pet-card-header {
    padding: 20px;
    border-bottom: 1px solid #f2f2f7;
    background: #fafafa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.vet-pet-owner-dashboard .vet-pet-card-body {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.vet-pet-owner-dashboard .vet-pet-card-body p {
    margin: 0 0 12px 0;
    color: #1d1d1f;
    font-size: 15px;
    line-height: 1.4;
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
}

.vet-pet-owner-dashboard .vet-pet-card-body p:last-child {
    margin-bottom: 0;
}

.vet-pet-owner-dashboard .vet-pet-card-body strong {
    color: #1d1d1f;
    font-weight: 500;
    min-width: 110px;
    font-size: 15px;
}

.vet-pet-owner-dashboard .vet-pet-card-footer {
    padding: 16px 20px;
    border-top: 1px solid #f2f2f7;
    background: #fafafa;
    display: flex;
    justify-content: center;
    flex-shrink: 0;
}

/* Better scrollbar for modal content */
.vet-popup-body::-webkit-scrollbar {
    width: 6px;
}

.vet-popup-body::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 10px;
}

.vet-popup-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

.vet-popup-body::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}




/* ========== FIX FOR MEDICAL HISTORY IN MODALS ========== */

/* Fix for medical history modal spacing */
#medical-history-content,
#owner-medical-content {
    padding: 0 !important;
}

/* Medical history container in modals */
.vet-popup-body .vet-medical-history-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 0;
    margin: 0;
}

/* Medical record card in modals */
.vet-popup-body .vet-medical-record {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e5ea;
    padding: 18px 20px;
    margin: 0;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.vet-popup-body .vet-medical-record:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    border-color: #d1d1d6;
}

/* Medical record header - more compact */
.vet-popup-body .vet-medical-record-header {
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f2f2f7;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.vet-popup-body .vet-case-id {
    font-size: 15px;
    font-weight: 600;
    color: #007aff;
    letter-spacing: -0.2px;
    background: rgba(0, 122, 255, 0.08);
    padding: 4px 10px;
    border-radius: 6px;
}

.vet-popup-body .vet-visit-date {
    font-size: 13px;
    color: #8e8e93;
    font-weight: 400;
    background: #f5f5f7;
    padding: 3px 8px;
    border-radius: 4px;
}

/* Medical record body - more compact */
.vet-popup-body .vet-medical-record-body {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

/* Field rows - tighter spacing */
.vet-popup-body .vet-field-row {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.vet-popup-body .vet-field-label {
    font-size: 12px;
    font-weight: 600;
    color: #636366;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 2px;
}

.vet-popup-body .vet-field-value {
    font-size: 14px;
    color: #1d1d1f;
    line-height: 1.4;
    word-break: break-word;
}

/* Text blocks - more compact */
.vet-popup-body .vet-text-block {
    background: #fafafa;
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid #e5e5ea;
    margin-top: 2px;
    font-size: 13px;
    line-height: 1.4;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 200px;
    overflow-y: auto;
}

/* Status badges in modals */
.vet-popup-body .vet-status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
    margin-left: 8px;
    vertical-align: middle;
}

/* Visit type styling */
.vet-popup-body .vet-visit-type {
    font-weight: 500;
    color: #5856d6;
    background: rgba(88, 86, 214, 0.08);
    padding: 4px 10px;
    border-radius: 6px;
    display: inline-block;
    margin-right: 8px;
}

/* Reminder notes - more compact */
.vet-popup-body .vet-reminder-note {
    background: linear-gradient(135deg, #fff8e1 0%, #fff3cd 100%);
    border: 1px solid #ffd54f;
    border-radius: 8px;
    padding: 12px 14px;
    margin-top: 14px;
    position: relative;
}

.vet-popup-body .vet-reminder-note::before {
    content: "🔔";
    position: absolute;
    right: 12px;
    top: 12px;
    font-size: 16px;
    opacity: 0.7;
}

.vet-popup-body .vet-reminder-header {
    font-weight: 600;
    color: #f57c00;
    margin-bottom: 6px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.vet-popup-body .vet-reminder-body {
    color: #e65100;
    font-size: 13px;
    line-height: 1.3;
    padding-right: 30px;
}

/* Record footer - more compact */
.vet-popup-body .vet-record-footer {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #f2f2f7;
    text-align: right;
}

.vet-popup-body .vet-record-footer small {
    color: #8e8e93;
    font-size: 12px;
    font-weight: 400;
}

/* Empty state styling for medical history */
#medical-history-empty,
#owner-medical-empty {
    padding: 40px 20px;
    text-align: center;
    border-radius: 12px;
    background: #fafafa;
    border: 1px solid #e5e5ea;
    margin: 0;
}

#medical-history-empty p,
#owner-medical-empty p {
    color: #8e8e93;
    font-size: 16px;
    margin: 0;
}

/* Loading state */
#medical-history-loading,
#owner-medical-loading {
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}



/* Special styling for empty content */
.vet-popup-body .vet-empty-content {
    font-style: italic;
    color: #8e8e93;
    font-size: 13px;
    padding: 8px 0;
}

/* Make sure visit type and status are on same line when possible */
.vet-popup-body .vet-visit-info {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 8px;
}

.vet-popup-body .vet-visit-info .vet-field-label {
    display: none;
}

.vet-popup-body .vet-visit-info .vet-field-value {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}