/* ==========================================
   1. APP FOUNDATION & RESET
   ========================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body.dashboard {
    font-family: 'Roboto', sans-serif;
    background-color: #f4f6f8;
    color: #333;
    padding-bottom: 90px; /* Space for the bottom nav */
    overflow-x: hidden;
}

main {
    padding: 15px;
    max-width: 1200px;
    margin: 0 auto;
}

/* ==========================================
   2. NATIVE BOTTOM NAVIGATION (MOBILE FIRST)
   ========================================== */
.dashboard-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #ffffff;
    border-top: 3px solid #f1c40f; 
    display: flex;
    justify-content: flex-start; /* FIX: Aligns items left to enable scrolling */
    align-items: center;
    padding: 5px 15px;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.05);
    z-index: 9999;
    overflow-x: auto; /* Enables horizontal scroll */
    -webkit-overflow-scrolling: touch; /* Smooth iOS swipe */
    gap: 15px; 
}

/* Hide scrollbar for a clean app look */
.dashboard-nav::-webkit-scrollbar {
    display: none; 
}

.dashboard-tab {
    background: transparent;
    border: none;
    color: #888;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    min-width: 60px; /* Ensure they are tap-friendly */
    transition: all 0.2s ease;
    flex: 0 0 auto; /* Prevent icons from shrinking into each other */
}

.dashboard-tab .material-icons {
    font-size: 28px; /* Slightly larger for easier tapping */
    margin-bottom: 2px;
}

.dashboard-tab.active {
    color: #940012; /* Happy Puppy Red */
}

.dashboard-tab.active .material-icons {
    transform: translateY(-2px);
}

/* Hide desktop tabs by default */
.dashboard-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

.dashboard-panel.active {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================
   3. THE STEP-BY-STEP WIZARD
   ========================================== */
.wizard-step {
    display: none;
}

.wizard-step.active {
    display: block;
    animation: slideInRight 0.3s ease;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.wizard-progress {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 25px;
}

.wizard-dot {
    height: 12px;
    width: 12px;
    background-color: #ddd;
    border-radius: 50%;
    transition: 0.3s all ease;
}

.wizard-dot.active {
    background-color: #940012;
    transform: scale(1.3);
}

/* ==========================================
   TAB 1: MY PROFILE (The Dossier)
   ========================================== */

/* The main container for the profile card */
.profile-card {
    background: #ffffff;
    border: 1px solid #eee;
    border-top: 5px solid #940012; /* Primary Red Anchor */
    border-radius: 12px;
    padding: 25px 20px;
    margin-bottom: 25px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.card-header h3 {
    color: #940012;
    font-family: 'Merriweather', serif;
    font-size: 1.25rem;
    margin: 0;
}

.gold-divider {
    border: none;
    height: 2px;
    background-color: #f1c40f; /* Happy Puppy Gold */
    margin: 15px 0 25px 0;
}

/* The grid holding the contact info */
.card-grid {
    display: flex;
    flex-direction: column; /* Stack vertically on mobile by default */
    gap: 20px;
}

.info-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.info-group label {
    font-size: 0.75rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

.info-group p {
    font-size: 1.1rem;
    color: #222;
    margin: 0;
    line-height: 1.4;
}

/* The Edit Button inside the profile card */
.edit-icon-btn {
    background: #f9f9f9;
    color: #333;
    border: 1px solid #ccc;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.edit-icon-btn:hover {
    background: #940012;
    color: #fff;
    border-color: #940012;
}

/* Tablet & Desktop Layout for Profile Card */
@media screen and (min-width: 768px) {
    .card-grid {
        flex-direction: row; /* Side-by-side on larger screens */
        flex-wrap: wrap; 
        gap: 30px;
    }
    
    .info-group {
        flex: 1 1 200px; /* Allow columns to grow and wrap naturally */
    }
}

/* ==========================================
   MY PETS TAB: BUTTON & LAYOUT FIXES
   ========================================== */

/* 1. Restore the "Add Pet" / "Add Circle" button styling */
.edit-icon-btn {
    background: #fdfdfd;
    border: 1px solid #ccc;
    color: #940012; /* Happy Puppy Red */
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.edit-icon-btn:hover {
    background: #940012;
    color: #fff;
    border-color: #940012;
}

.edit-icon-btn .material-icons {
    font-size: 1.1rem;
}

/* 2. Photo Upload Box Restoration */
/* Ensure the dashed box stays centered and clean */
div[style*="border: 2px dashed #ddd"] {
    background: #fdfdfd !important;
    padding: 20px !important;
    border-radius: 12px !important;
    margin-bottom: 20px !important;
}

/* Make the photo a perfect circle */
.pet-photo-preview {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #940012; /* Brand Red Anchor */
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    margin-bottom: 10px;
}

/* Style the text label acting as the upload button */
.upload-btn {
    color: #940012 !important;
    font-weight: 800 !important;
    font-family: 'Playfair Display', serif;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* 3. Re-align the Admin Discount Box to match */
#admin-only-pet-discount {
    background: #fffcf5 !important;
    border: 2px dashed #940012 !important;
    padding: 15px !important;
    border-radius: 12px !important;
    margin-bottom: 20px !important;
}

/* 4. Fix Pet List Header Spacing */
.section-header-boutique {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
  
    padding-bottom: 10px;
}

.section-header-boutique h2 {
    color: #940012;
    font-family: 'Merriweather', serif;
    margin: 0;
}


/* ==========================================
   4. THUMB-FRIENDLY MOBILE FORMS
   ========================================== */
fieldset {
    background: #ffffff;
    border: 1px solid #eee;
    border-top: 5px solid #f1c40f; 
    border-radius: 12px;
    padding: 20px 15px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

legend {
    font-family: 'Merriweather', serif;
    color: #940012;
    font-weight: bold;
    font-size: 1.1rem;
    padding: 0 10px;
    background: #fff;
}

/* Base Form Rows - Default to Stacking for Mobile */
.form-row, 
.form-row-grid, 
#petForm .form-row {
    display: flex;
    flex-direction: column; /* Force vertical stacking on mobile */
    gap: 15px;
    margin-bottom: 15px;
    width: 100%;
}

.form-group, 
.groomer-group {
    width: 100% !important;
    display: flex;
    flex-direction: column;
    flex: none !important; /* Stop flex elements from fighting */
}

/* Force stubborn elements to go full width on mobile */
#petAge, 
#petWeight, 
#petGoalWeight,
#isMicrochipped {
    width: 100% !important;
    max-width: 100% !important;
}

label {
    font-size: 0.85rem;
    font-weight: bold;
    color: #444;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.boutique-input {
    width: 100%;
    padding: 14px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    background-color: #fafafa;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.boutique-input:focus {
    border-color: #940012;
    outline: none;
    background-color: #fff;
}

/* ==========================================
   5. APP BUTTONS
   ========================================== */
.form-button {
    background-color: #000000;
    color: #ffffff;
    border: none;
    padding: 16px;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    width: 100%;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.form-button-group {
    display: flex;
    flex-direction: column; /* Stack the final Save/Cancel buttons on mobile */
    gap: 15px;
}

/* Navigation button rows */
div[style*="display: flex; gap: 10px; margin-top: 20px;"] {
    flex-direction: column !important; /* Stack Back/Next on mobile */
}

/* Make the Save button distinct */
button[type="submit"], .save-btn {
    background-color: #940012;
}
/* 1. The Home Tab Save Buttons */
.save-btn,
.btn-save-changes {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: #940012; /* Happy Puppy Red */
    color: #f1c40f; /* Gold text */
    border: 1px solid #f1c40f;
    border-radius: 50px; /* Restores the pill shape */
    padding: 12px 20px;
    width: 100%;
    margin: 15px 0 0 0;
    font-weight: 800;
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
}

.save-btn:hover {
    background-color: #000000;
    color: #fff;
    border-color: #940012;
}

/* 2. The Authorized Entry Toggle Button */
.btn-outline-gold {
    background: transparent;
    border: 2px solid #f1c40f; /* Gold Outline */
    color: #000;
    padding: 12px 24px;
    border-radius: 30px; /* Restores the pill shape */
    font-weight: bold;
    font-size: 1.05rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%; /* Ensures it spans well on mobile */
    transition: 0.3s all ease;
    font-family: "Playfair Display", serif;
}

.btn-outline-gold:hover {
    background: #f1c40f;
    box-shadow: 0 4px 15px rgba(241, 196, 15, 0.3);
}

/* Tablet & Desktop sizing for the toggle button */
@media screen and (min-width: 768px) {
    .btn-outline-gold {
        width: auto; /* Shrinks to fit content on big screens */
    }
}

/* ==========================================
   6. TABLET & DESKTOP EXPANSION (768px+)
   ========================================== */
@media screen and (min-width: 768px) {
    body.dashboard {
        padding-bottom: 0; 
    }

    main {
        padding: 40px;
    }

    /* 1. Move nav back to top for tablets/desktops */
    .dashboard-nav {
        position: relative;
        bottom: auto;
        border-top: none;
        box-shadow: none;
        background: transparent;
        justify-content: flex-start;
        gap: 15px;
        padding: 0 0 20px 0;
    }

    .dashboard-tab {
        background: #fff;
        border: 1px solid #ddd;
        border-radius: 30px;
        padding: 10px 20px;
        flex-direction: row;
        gap: 8px;
    }

    .dashboard-tab.active {
        background: #940012;
        color: white;
        border-color: #940012;
    }

    /* 2. Un-stack the forms for the big screens */
    .form-row, 
    #petForm .form-row {
        flex-direction: row !important; /* Re-enable side-by-side */
        align-items: flex-end;
    }
    
    .form-group, 
    .groomer-group {
        flex: 1 !important; /* Let them share space again */
    }
    
    /* Allow buttons to sit side-by-side again */
    .form-button-group,
    div[style*="display: flex; gap: 10px; margin-top: 20px;"] {
        flex-direction: row !important; 
    }
}
/* ==========================================
   7. THE GOLD STANDARD: BOUTIQUE FOOTER
   ========================================== */
footer {
    background-color: #f9f9f9; /* Soft light grey background */
    padding: 20px 0;
    border-top: 1px solid #eee;
    margin-top: 50px; /* Gives your tabs breathing room */
    width: 100%;
    position: relative; /* Keeps it grounded below the main content */
    clear: both; /* Prevents floating elements from overlapping */
}

footer .container {
    display: flex;
    justify-content: space-between; /* Splits Copyright (left) and Credit (right) */
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

footer p {
    font-size: 0.85rem;
    color: #666;
    margin: 0;
    font-family: "Roboto", sans-serif;
}

/* Designer Credit Styling */
.designer-credit {
    display: flex;
    align-items: center; /* Aligns text and logo nicely */
    gap: 15px;
}

.designer-credit p {
    font-weight: 500;
    color: #444;
}

/* Locks the Eden logo size so it stops expanding */
.designer-credit img {
    height: 35px !important; 
    width: auto !important;
    max-width: 150px; /* Ultimate safety cap */
    opacity: 0.9;
    transition: opacity 0.3s;
    display: block; /* Prevents weird inline scaling */
}

.designer-credit img:hover {
    opacity: 1;
}

/* Responsive fix for your S23 Ultra / mobile screens */
@media screen and (max-width: 768px) {
    footer {
        padding-bottom: 90px; /* Ensures footer doesn't hide under the sticky nav bar */
    }
    
    footer .container {
        flex-direction: column; /* Stacks text and logo on small screens */
        gap: 15px;
        text-align: center;
        padding: 0 15px;
    }
    
    .designer-credit {
        flex-direction: column;
        gap: 5px;
    }
}
/* ==========================================
   8. FEEDING SCHEDULE MOBILE RE-ALIGNMENT
   ========================================== */

/* Remove the grey border and background from the green + button globally */
.boutique-input-group button.delete-icon-btn {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    min-width: auto !important;
}

/* Mobile specific grid layout for the feeding inputs */
@media screen and (max-width: 768px) {
    .boutique-input-group {
        display: grid !important;
        grid-template-columns: 1fr 1fr auto !important; /* Type | Qty | + Button */
        gap: 10px !important;
        align-items: center !important;
    }
    
    /* Brand Input: Forces it to the top row, spanning full width */
    .boutique-input-group input[id^="newFeedName"] {
        grid-column: 1 / 4 !important;
        grid-row: 1 !important;
        width: 100% !important;
    }
    
    /* Type (Dry/Wet) Dropdown: Bottom Left */
    .boutique-input-group select[id^="newFeedType"] {
        grid-column: 1 / 2 !important;
        grid-row: 2 !important;
        width: 100% !important;
    }
    
    /* Qty Input: Bottom Middle */
    .boutique-input-group input[id^="newFeedQty"] {
        grid-column: 2 / 3 !important;
        grid-row: 2 !important;
        width: 100% !important;
    }
    
    /* + Button: Bottom Right */
    .boutique-input-group button.delete-icon-btn {
        grid-column: 3 / 4 !important;
        grid-row: 2 !important;
    }
}
/* ==========================================
   9. VET TAB & BOUTIQUE BUTTONS
   ========================================== */

/* The primary action pills (Open Form, Sync Alert) */
.action-button-pill {
    background-color: #940012;
    color: white !important;
    padding: 12px 22px;
    border-radius: 50px;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: none;
    transition: 0.3s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    font-size: 0.95rem;
    width: 100%;
}

.action-button-pill:hover {
    background-color: #000000;
    color: #fff !important;
    transform: translateY(-2px);
}

/* The smaller action chips (Add Injection, Sync Med) */
.save-chip-btn {
    background: #f1c40f; 
    color: #000;
    border: none;
    padding: 10px 18px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: bold;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    transition: 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin: 0;
}

.save-chip-btn:hover {
    background: #940012; 
    color: #fff;
}

/* Mobile un-squish for the detailed Vet Medication Form */
@media screen and (max-width: 768px) {
    #vetTabMedEntry > div {
        display: flex;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 12px !important;
    }
    
    #vetTabMedEntry > div > div {
        width: 100% !important;
        min-width: 100% !important;
    }
    
    /* Make the Time checkboxes easier to tap on mobile */
    .vetTabMedTime {
        width: 20px !important;
        height: 20px !important;
        margin-right: 5px;
    }
}
/* ==========================================
   10. BOOKING, QUOTE & HISTORY CARDS
   ========================================== */

/* 1. AGGRESSIVE HEADER FIX (Force Stack on Mobile) */
@media screen and (max-width: 768px) {
    .dashboard-header-modern {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 15px !important;
    }
    
    .dashboard-header-modern > div:first-child {
        flex-direction: column !important;
        justify-content: center !important;
        width: 100% !important;
    }
    
    #adminExitZone {
        width: 100% !important;
        justify-content: center !important;
        margin: 0 !important;
    }
}

/* 2. THE CARD CONTAINER (Boutique Style) */
#activeUpcomingList > div,
#clientQuotesList > div,
#historyListContainer > div {
    background: #ffffff !important;
    border: 1px solid #eee !important;
    border-left: 6px solid #f1c40f !important; /* Gold Anchor */
    border-radius: 12px !important;
    padding: 20px !important;
    margin-bottom: 20px !important;
    box-shadow: 0 4px 10px rgba(0,0,0,0.04) !important;
}

/* 3. FIX THE BLOCKY STATUS BADGES */
#activeUpcomingList > div > div:first-child span,
#clientQuotesList > div > div:first-child span {
    border-radius: 50px !important;
    padding: 6px 14px !important;
    font-size: 0.75rem !important;
    font-weight: 900 !important;
    letter-spacing: 0.5px !important;
    text-align: center !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    white-space: nowrap !important;
}

/* 4. FORMAT ALL ACTION BUTTONS INSIDE CARDS (Thinner & more compact) */
#activeUpcomingList button,
#clientQuotesList button,
#historyListContainer button {
    border-radius: 50px !important;
    padding: 10px 16px !important; 
    font-size: 0.85rem !important; 
    font-weight: bold !important;
    border: none !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1) !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 6px !important;
    margin-top: 8px !important;
    transition: all 0.3s ease !important;
}

#activeUpcomingList button:hover,
#clientQuotesList button:hover,
#historyListContainer button:hover {
    transform: translateY(-2px) !important;
}

/* 5. MOBILE CARD STACKING (S23 Ultra Optimization) */
@media screen and (max-width: 768px) {
    /* Stack the Title and Badge */
    #activeUpcomingList > div > div:first-child,
    #clientQuotesList > div > div:first-child {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
        margin-bottom: 12px !important;
    }

    /* Stack the action buttons tightly */
    #activeUpcomingList > div > div:last-child,
    #clientQuotesList > div > div:last-child,
    #activeUpcomingList > div > button,
    #clientQuotesList > div > button {
        display: flex !important;
        flex-direction: column !important;
        gap: 8px !important; 
        width: 100% !important;
    }

    /* Keep buttons 100% width but they will be much thinner now */
    #activeUpcomingList button,
    #clientQuotesList button,
    #historyListContainer button {
        width: 100% !important;
        margin-top: 0 !important;
    }
}
/* 🐾 VISUAL MENU SLIDER (CUSTOM SCROLLBAR) */
.dashboard-nav::-webkit-scrollbar {
    display: block !important; 
    height: 6px !important; 
    -webkit-appearance: none !important;
}

.dashboard-nav::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.15) !important; 
    border-radius: 10px;
    margin: 0 20px;
}

.dashboard-nav::-webkit-scrollbar-thumb {
    background: #940012 !important; 
    border-radius: 10px;
}