/*
 * Bailey's Health Passport
 * Headspace-inspired warm, calming design
 */

/* === CSS VARIABLES === */
:root {
    /* Warm, calming Headspace-inspired palette */
    --orange: #F9A826;
    --orange-light: #FFCF70;
    --orange-soft: #FFF4E0;
    --coral: #FF8C69;
    --coral-light: #FFBCAB;
    --coral-soft: #FFF0ED;
    --navy: #2D3142;
    --navy-light: #4F5D75;
    --cream: #FFFCF7;
    --cream-dark: #FFF8EF;
    --sage: #8FC1A9;
    --sage-light: #D4EDE1;
    --sky: #A5C9E1;
    --sky-light: #E3F1FA;
    --lavender: #C7B8EA;
    --lavender-light: #EDE8F7;

    /* Functional colors */
    --success: #6BAF8D;
    --warning: #F9A826;
    --danger: #E07A5F;
    --danger-light: #FFEAE5;

    /* Neutrals - warm-tinted */
    --gray-50: #FDFCFB;
    --gray-100: #F7F5F3;
    --gray-200: #EFEBE8;
    --gray-300: #DDD8D3;
    --gray-400: #B8B2AA;
    --gray-500: #8A837A;
    --gray-600: #5F594F;
    --gray-700: #3D3832;
    --gray-800: #2A2622;
    --gray-900: #1A1714;

    /* Backgrounds */
    --bg-app: var(--cream);
    --bg-card: #FFFFFF;

    /* Shadows - soft and warm */
    --shadow-sm: 0 2px 8px rgba(45, 49, 66, 0.04);
    --shadow-md: 0 4px 20px rgba(45, 49, 66, 0.06);
    --shadow-lg: 0 8px 30px rgba(45, 49, 66, 0.08);
    --shadow-xl: 0 12px 40px rgba(45, 49, 66, 0.12);

    /* Radii - very rounded for friendly feel */
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-full: 9999px;

    /* Smooth, gentle transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
}

/* === RESET & BASE === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Rounded', 'Nunito', 'Quicksand', 'Segoe UI', sans-serif;
    background: var(--bg-app);
    color: var(--navy);
    line-height: 1.65;
    padding-bottom: 100px;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* === TAB BAR (Bottom Sticky) === */
.tab-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(255, 252, 247, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 8px 12px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom));
    gap: 8px;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.08);
}

.tab-btn {
    flex: 1;
    padding: 14px 20px;
    border: none;
    background: transparent;
    font-size: 15px;
    font-weight: 600;
    color: var(--gray-500);
    cursor: pointer;
    transition: var(--transition);
    border-radius: var(--radius-full);
    letter-spacing: -0.01em;
}

.tab-btn.active {
    color: var(--navy);
    background: white;
    box-shadow: var(--shadow-md);
}

.tab-btn:not(.active):hover {
    color: var(--navy-light);
    background: rgba(255, 255, 255, 0.5);
}

/* Tab visibility */
.tab-public .personal-only,
.tab-public .personal-only-section {
    display: none !important;
}

.tab-public .section-edit-btn {
    display: none !important;
}

/* === SECTION NAVIGATION === */
.section-nav {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 70px 20px 16px 20px; /* Top padding clears hamburger */
    background: var(--cream);
    position: sticky;
    top: 0;
    z-index: 90;
}

/* When there's no tab bar (view.html) */
body:not(.tab-personal):not(.tab-public) .section-nav {
    top: 0;
}

.section-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    background: white;
    border: 1.5px solid var(--gray-100);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition);
    min-width: 80px;
}

.section-nav-btn:hover {
    border-color: var(--gray-200);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.section-nav-btn.active {
    background: linear-gradient(145deg, var(--orange) 0%, var(--coral) 100%);
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(249, 168, 38, 0.35);
}

.section-nav-btn.active .section-nav-icon,
.section-nav-btn.active .section-nav-label {
    color: white;
}

.section-nav-icon {
    font-size: 24px;
    line-height: 1;
}

.section-nav-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-600);
    letter-spacing: -0.01em;
}

/* Section visibility */
.section-content {
    display: none;
}

.section-profile #section-profile,
.section-care #section-care,
.section-records #section-records {
    display: block;
}

/* Section header cards */
.section-header-card {
    text-align: center;
    padding: 24px 20px 16px;
    margin-bottom: 8px;
}

.section-header-card h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}

.section-header-card p {
    font-size: 15px;
    color: var(--gray-500);
    font-weight: 500;
}

/* === HEADER === */
header, .view-header {
    background: linear-gradient(145deg, var(--orange) 0%, var(--coral) 100%);
    color: white;
    padding: 32px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Soft decorative circle */
header::before, .view-header::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    top: -150px;
    right: -100px;
}

header::after, .view-header::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    bottom: -100px;
    left: -50px;
}

header h1, #header-title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
    position: relative;
    z-index: 1;
}

.mode-label {
    font-size: 13px;
    opacity: 0.9;
    margin-top: 8px;
    font-weight: 500;
    position: relative;
    z-index: 1;
}

.share-btn-inline {
    background: rgba(255, 255, 255, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    cursor: pointer;
    margin-left: 8px;
    transition: all 0.2s ease;
    vertical-align: middle;
}

.share-btn-inline:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.05);
}

.share-btn-inline:active {
    transform: scale(0.98);
}

/* === MAIN CONTENT === */
main {
    padding: 24px 20px;
    padding-bottom: 100px; /* Space for fixed bottom tab bar */
    max-width: 500px;
    margin: 0 auto;
}

/* === CARDS === */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-md);
    position: relative;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card h2 {
    font-size: 13px;
    font-weight: 700;
    color: var(--gray-500);
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.section-subtitle {
    font-size: 14px;
    color: var(--gray-500);
    margin-top: -12px;
    margin-bottom: 20px;
    font-weight: 500;
}

/* Section edit buttons */
.section-edit-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--orange);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.section-edit-btn:hover {
    background: var(--coral);
    transform: scale(1.02);
}

/* Private badge */
.private-badge {
    display: inline-flex;
    align-items: center;
    background: var(--lavender);
    color: var(--navy);
    font-size: 9px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    margin-left: 10px;
    vertical-align: middle;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* === PROFILE CARD === */
.profile-card {
    text-align: center;
    padding: 36px 28px;
    background: linear-gradient(180deg, #FFFFFF 0%, var(--orange-soft) 100%);
}

.profile-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 28px;
}

.pet-avatar {
    width: 88px;
    height: 88px;
    min-width: 88px;
    min-height: 88px;
    aspect-ratio: 1;
    flex-shrink: 0;
    background: linear-gradient(145deg, var(--orange) 0%, var(--coral) 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(249, 168, 38, 0.35);
}

.view-pet-photo {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border: 4px solid white;
}

.pet-title {
    text-align: left;
}

.pet-title h2 {
    border: none;
    padding: 0;
    margin: 0;
    font-size: 32px;
    color: var(--navy);
    text-transform: none;
    letter-spacing: -0.02em;
}

.pet-title p {
    color: var(--gray-500);
    margin-top: 6px;
    font-size: 16px;
    font-weight: 500;
}

/* Stats row */
.profile-stats {
    display: flex;
    justify-content: center;
    gap: 40px;
    padding: 20px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-label {
    font-size: 11px;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--navy);
    margin-top: 4px;
}

/* Microchip section */
.view-microchip-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 2px dashed var(--gray-200);
}

.microchip-label {
    font-size: 11px;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    margin-bottom: 8px;
}

.microchip-value {
    font-family: 'SF Mono', Monaco, monospace;
    font-size: 14px;
    color: var(--navy);
    background: var(--gray-100);
    padding: 10px 16px;
    border-radius: var(--radius-md);
    display: inline-block;
}

/* === EMERGENCY CARD === */
.emergency-card {
    background: linear-gradient(145deg, var(--coral) 0%, var(--danger) 100%);
    color: white;
    border: none;
}

.emergency-card::before {
    content: '';
    position: absolute;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    top: -50px;
    right: -30px;
}

.emergency-card h2 {
    color: rgba(255, 255, 255, 0.85);
}

.emergency-card .vet-name,
#vet-name {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 4px;
}

.emergency-card .clinic-name,
#clinic-name {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 24px;
    font-weight: 500;
}

.phone-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: white;
    color: var(--coral);
    padding: 16px 32px;
    border-radius: var(--radius-full);
    text-decoration: none;
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transition: var(--transition);
}

.phone-button:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
}

.emergency-card .address,
#vet-address {
    font-size: 14px;
    opacity: 0.9;
    font-weight: 500;
}

.emergency-card .empty-message {
    color: rgba(255, 255, 255, 0.8);
}

/* === ALLERGIES CARD === */
.allergies-card {
    background: linear-gradient(180deg, #FFFFFF 0%, var(--coral-soft) 100%);
    border: none;
    border-left: 5px solid var(--coral);
}

.allergies-card h2 {
    color: var(--coral);
}

.allergies-text {
    color: var(--danger);
    font-weight: 600;
}

.view-allergies-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.view-allergy-tag {
    display: inline-flex;
    align-items: center;
    background: var(--coral);
    color: white;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 600;
}

.view-allergies-notes {
    font-size: 15px;
    color: var(--gray-600);
    line-height: 1.7;
}

/* === SCHEDULE CARDS === */
.feeding-view-card,
.outdoor-view-card,
.sleep-view-card,
.behavior-view-card {
    background: linear-gradient(180deg, #FFFFFF 0%, var(--sage-light) 100%);
    border-left: 5px solid var(--sage);
}

.feeding-view-card h2,
.outdoor-view-card h2,
.sleep-view-card h2,
.behavior-view-card h2 {
    color: var(--sage);
}

/* === MEDICATIONS CARD === */
.medications-card {
    background: linear-gradient(180deg, #FFFFFF 0%, var(--sky-light) 100%);
    border-left: 5px solid var(--sky);
}

.medications-card h2 {
    color: #5A9BC1;
}

/* === VIEW ITEMS === */
.view-item {
    background: white;
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.view-item:hover {
    box-shadow: var(--shadow-md);
}

.view-item-title {
    font-weight: 700;
    font-size: 16px;
    color: var(--navy);
    margin-bottom: 6px;
}

.view-item-detail {
    font-size: 14px;
    color: var(--gray-600);
    margin-bottom: 4px;
}

.view-item-date {
    font-size: 12px;
    color: var(--gray-400);
    margin-top: 10px;
}

/* Sleep view details */
.sleep-view-details {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sleep-view-item {
    font-size: 15px;
    color: var(--gray-600);
}

.sleep-view-item strong {
    color: var(--navy);
}

/* === EMPTY MESSAGE === */
.empty-message {
    color: var(--gray-400);
    font-style: normal;
    text-align: center;
    padding: 24px;
    font-size: 15px;
    font-weight: 500;
}

/* === INPUTS === */
input, textarea, select {
    padding: 16px 20px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 16px;
    width: 100%;
    transition: var(--transition);
    background: white;
    color: var(--navy);
    font-family: inherit;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--orange);
    box-shadow: 0 0 0 4px var(--orange-soft);
}

input::placeholder, textarea::placeholder {
    color: var(--gray-400);
}

textarea {
    min-height: 100px;
    resize: vertical;
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%238A837A'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 20px;
    padding-right: 48px;
}

/* === BUTTONS === */
.add-button {
    width: 100%;
    padding: 16px;
    background: var(--orange-soft);
    color: var(--orange);
    border: 2px dashed var(--orange-light);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 16px;
    transition: var(--transition);
}

.add-button:hover {
    background: var(--orange-light);
    color: var(--navy);
    border-color: var(--orange);
}

.save-button {
    width: 100%;
    max-width: 500px;
    display: block;
    margin: 0 auto;
    padding: 18px;
    background: linear-gradient(145deg, var(--sage) 0%, #6BAF8D 100%);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 16px rgba(107, 175, 141, 0.35);
}

.save-button:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 24px rgba(107, 175, 141, 0.45);
}

.delete-button {
    background: var(--danger);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 8px;
    transition: var(--transition);
}

.delete-button:hover {
    background: #C96A52;
}

.preview-button {
    display: block;
    width: 100%;
    max-width: 500px;
    margin: 16px auto 0;
    padding: 16px;
    background: var(--orange);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-full);
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    transition: var(--transition);
}

.preview-button:hover {
    background: var(--coral);
}

/* === BOTTOM ACTION BAR === */
.bottom-action-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 252, 247, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 20px;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.06);
}

.export-btn {
    width: 100%;
    max-width: 500px;
    display: block;
    margin: 0 auto;
    padding: 18px;
    background: linear-gradient(145deg, var(--orange) 0%, var(--coral) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 16px rgba(249, 168, 38, 0.35);
}

.export-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 24px rgba(249, 168, 38, 0.45);
}

.save-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 252, 247, 0.95);
    backdrop-filter: blur(20px);
    padding: 20px;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.06);
}

.edit-link-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 252, 247, 0.95);
    backdrop-filter: blur(20px);
    padding: 24px;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.06);
    text-align: center;
}

.edit-link {
    color: var(--orange);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
}

/* === SUCCESS MESSAGE === */
.success-message {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(145deg, var(--sage) 0%, #6BAF8D 100%);
    color: white;
    padding: 16px 32px;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-xl);
    opacity: 0;
    transition: var(--transition);
    z-index: 1000;
    font-weight: 600;
    font-size: 15px;
}

.success-message.show {
    opacity: 1;
}

.auto-save-indicator {
    position: fixed;
    top: 80px;
    right: 20px;
    background: linear-gradient(145deg, var(--sage) 0%, #6BAF8D 100%);
    color: white;
    padding: 12px 20px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    opacity: 0;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 1000;
    box-shadow: var(--shadow-lg);
}

.auto-save-indicator.show {
    opacity: 1;
    transform: translateY(0);
}

/* === LIST ITEMS === */
.list-item {
    background: white;
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-sm);
}

.list-item input {
    margin-bottom: 12px;
}

.list-item input:last-child {
    margin-bottom: 0;
}

/* === INFO GRID === */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-item label {
    font-size: 11px;
    color: var(--gray-500);
    margin-bottom: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.full-width {
    grid-column: 1 / -1;
    margin-top: 8px;
}

/* === PET PARENT STYLES === */
.parent-block {
    margin-bottom: 20px;
}

.parent-divider {
    font-size: 13px;
    font-weight: 700;
    color: var(--orange);
    padding: 20px 0 16px;
    margin-top: 24px;
    border-top: 2px dashed var(--gray-200);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.remove-parent-button {
    background: var(--danger);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    padding: 14px 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 16px;
    width: 100%;
    transition: var(--transition);
}

.remove-parent-button:hover {
    background: #C96A52;
}

.parent-contact-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-sm);
}

.parent-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 20px;
}

.contact-button {
    display: block;
    padding: 14px 20px;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 12px;
    text-align: center;
    transition: var(--transition);
}

.phone-btn {
    background: var(--sage);
    color: white;
}

.phone-btn:hover {
    background: #6BAF8D;
}

.email-btn {
    background: var(--orange);
    color: white;
}

.email-btn:hover {
    background: var(--coral);
}

.parent-address {
    font-size: 14px;
    color: var(--gray-600);
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-200);
}

/* === ALLERGY SELECTOR === */
.selected-allergies {
    min-height: 44px;
    margin-bottom: 20px;
}

.no-allergies {
    color: var(--gray-400);
    font-style: normal;
    font-size: 15px;
    font-weight: 500;
}

.allergy-tag {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(145deg, var(--coral) 0%, var(--danger) 100%);
    color: white;
    padding: 10px 18px;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 600;
    margin: 4px 4px 4px 0;
    box-shadow: 0 2px 8px rgba(224, 122, 95, 0.3);
}

.allergy-tag button {
    background: none;
    border: none;
    color: white;
    font-size: 18px;
    margin-left: 10px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.8;
}

.allergy-tag button:hover {
    opacity: 1;
}

.allergy-suggestions {
    margin-bottom: 20px;
}

.allergy-suggestions label,
.allergy-search label,
.allergy-notes label {
    display: block;
    font-size: 11px;
    color: var(--gray-500);
    margin-bottom: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.allergy-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.allergy-chip {
    background: var(--gray-100);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-full);
    padding: 12px 18px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.allergy-chip:hover {
    background: var(--gray-200);
    border-color: var(--gray-300);
}

.allergy-chip.selected {
    background: linear-gradient(145deg, var(--coral) 0%, var(--danger) 100%);
    color: white;
    border-color: transparent;
}

.allergy-search {
    position: relative;
    margin-bottom: 20px;
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid var(--gray-200);
    border-top: none;
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    max-height: 200px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: var(--shadow-lg);
}

.search-result-item {
    padding: 16px 20px;
    cursor: pointer;
    border-bottom: 1px solid var(--gray-100);
    transition: var(--transition);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: var(--gray-50);
}

.no-results {
    padding: 16px 20px;
    color: var(--gray-400);
    font-style: normal;
    font-weight: 500;
}

.allergy-notes textarea {
    min-height: 80px;
}

/* === MEDICATION TRACKER === */
.no-medications {
    color: var(--gray-400);
    font-style: normal;
    font-size: 15px;
    text-align: center;
    padding: 28px;
    font-weight: 500;
}

.medication-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

.med-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.med-card-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--navy);
}

.med-remove-btn {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: var(--transition);
}

.med-remove-btn:hover {
    color: var(--danger);
}

.med-card-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}

.med-field-group label {
    display: block;
    font-size: 11px;
    color: var(--gray-500);
    margin-bottom: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.med-view-dates {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-200);
    font-size: 14px;
}

.med-date-item {
    color: var(--gray-600);
}

.med-date-item.med-overdue {
    color: var(--danger);
    font-weight: 600;
}

.med-date-item.med-due-today {
    color: var(--orange);
    font-weight: 600;
}

.med-date-item.med-due-soon {
    color: #D4870B;
}

/* === LAST UPDATED === */
.last-updated {
    text-align: center;
    color: var(--gray-400);
    font-size: 13px;
    margin-top: 32px;
    padding-bottom: 80px;
    font-weight: 500;
}

/* === HIDDEN === */
.hidden {
    display: none !important;
}

/* === AUTO FIELD === */
.auto-field {
    padding: 16px 20px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 16px;
    width: 100%;
    background: var(--gray-50);
    color: var(--navy);
}

.auto-save-notice {
    text-align: center;
    color: var(--gray-500);
    font-size: 13px;
    margin-bottom: 16px;
    font-weight: 500;
}

/* === MODALS === */
.modal, .edit-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.modal.hidden, .edit-modal.hidden {
    display: none;
}

.modal-content, .edit-modal-content {
    position: relative;
    background: white;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.edit-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(45, 49, 66, 0.4);
    backdrop-filter: blur(8px);
}

@keyframes slideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

.modal-header, .edit-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 28px;
    border-bottom: 1px solid var(--gray-100);
    flex-shrink: 0;
}

.modal-header h3, .edit-modal-header h3 {
    font-size: 20px;
    font-weight: 700;
    color: var(--navy);
}

.modal-close, .edit-modal-close {
    background: var(--gray-100);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 26px;
    color: var(--gray-500);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover, .edit-modal-close:hover {
    background: var(--gray-200);
    color: var(--navy);
}

.edit-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 28px;
}

.modal-actions, .edit-modal-footer {
    display: flex;
    gap: 12px;
    padding: 20px 28px 28px;
    border-top: none;
    flex-shrink: 0;
    background: linear-gradient(to top, white 80%, transparent);
}

.modal-cancel-btn {
    flex: 0 0 auto;
    padding: 16px 28px;
    background: transparent;
    color: var(--gray-500);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-full);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.modal-cancel-btn:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
    color: var(--navy);
}

.modal-cancel-btn:active {
    transform: scale(0.98);
}

.modal-save-btn {
    flex: 1;
    padding: 18px 32px;
    background: linear-gradient(145deg, var(--orange) 0%, var(--coral) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 16px rgba(249, 168, 38, 0.35);
    letter-spacing: -0.01em;
}

.modal-save-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(249, 168, 38, 0.45);
}

.modal-save-btn:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 8px rgba(249, 168, 38, 0.3);
}

.modal-description {
    color: var(--gray-600);
    font-size: 15px;
    margin-bottom: 24px;
    line-height: 1.6;
}

/* === INLINE EDIT HEADER (title + buttons) === */
.inline-edit-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.inline-edit-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--navy);
}

.inline-edit-buttons {
    display: flex;
    gap: 10px;
}

/* On mobile, stack title above buttons if needed */
@media (max-width: 400px) {
    .inline-edit-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .inline-edit-buttons {
        align-self: flex-end;
    }
}

.inline-cancel-btn {
    padding: 10px 20px;
    background: transparent;
    color: var(--gray-500);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.inline-cancel-btn:hover {
    background: var(--gray-50);
    border-color: var(--gray-300);
    color: var(--navy);
}

.inline-cancel-btn:active {
    transform: scale(0.96);
}

.inline-save-btn {
    padding: 10px 24px;
    background: linear-gradient(145deg, var(--orange) 0%, var(--coral) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 3px 12px rgba(249, 168, 38, 0.3);
}

.inline-save-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(249, 168, 38, 0.4);
}

.inline-save-btn:active {
    transform: translateY(0) scale(0.96);
    box-shadow: 0 2px 8px rgba(249, 168, 38, 0.25);
}

/* === INLINE FORMS === */
.inline-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.inline-form-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.inline-form-row label {
    font-size: 11px;
    color: var(--gray-500);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.inline-form-row-half {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.inline-list-form {
    max-height: 400px;
    overflow-y: auto;
}

.inline-list-item {
    background: var(--gray-50);
    border: 2px solid var(--gray-100);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 16px;
    position: relative;
}

.remove-item-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--danger);
    color: white;
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: var(--transition);
}

.remove-item-btn:hover {
    background: #C96A52;
    transform: scale(1.05);
}

.add-item-btn {
    display: block;
    width: 100%;
    padding: 16px;
    background: var(--orange-soft);
    border: 2px dashed var(--orange-light);
    border-radius: var(--radius-md);
    color: var(--orange);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.add-item-btn:hover {
    background: var(--orange-light);
    color: var(--navy);
    border-color: var(--orange);
}

/* === QUICK PICKS / CHIPS === */
.quick-picks, .food-quick-picks {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.quick-pick-chip, .food-chip {
    background: var(--gray-100);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-full);
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.quick-pick-chip:hover, .food-chip:hover {
    background: var(--gray-200);
    border-color: var(--gray-300);
}

.quick-pick-chip.selected, .food-chip.selected {
    background: var(--orange);
    color: white;
    border-color: transparent;
}

/* Food search */
.food-search-wrapper {
    position: relative;
}

.food-search-input {
    width: 100%;
}

.food-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    max-height: 200px;
    overflow-y: auto;
    margin-top: 4px;
}

.food-search-results.hidden {
    display: none;
}

.food-search-result {
    padding: 14px 20px;
    cursor: pointer;
    font-size: 15px;
    border-bottom: 1px solid var(--gray-100);
    transition: var(--transition);
}

.food-search-result:last-child {
    border-bottom: none;
}

.food-search-result:hover {
    background: var(--gray-50);
}

/* === EXPORT MODAL === */
.export-modal-content {
    max-width: 500px;
    margin: 0 auto;
}

.export-documents-list {
    max-height: 300px;
    overflow-y: auto;
}

.export-doc-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    margin-bottom: 12px;
}

.export-doc-item input[type="checkbox"] {
    width: 22px;
    height: 22px;
    accent-color: var(--orange);
}

.doc-type-badge {
    font-size: 10px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    background: var(--gray-200);
    color: var(--gray-600);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.doc-type-badge.vet-record {
    background: var(--orange-soft);
    color: var(--orange);
}

.export-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 28px;
    color: var(--orange);
    font-weight: 600;
}

/* === VACCINE UPLOAD SECTION === */
.vaccine-upload-section {
    background: var(--orange-soft);
    border: 2px dashed var(--orange-light);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 24px;
    text-align: center;
}

.upload-vaccine-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(145deg, var(--orange) 0%, var(--coral) 100%);
    color: white;
    padding: 16px 32px;
    border-radius: var(--radius-full);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    box-shadow: 0 4px 16px rgba(249, 168, 38, 0.35);
}

.upload-vaccine-btn:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 24px rgba(249, 168, 38, 0.45);
}

.upload-vaccine-btn .upload-icon {
    font-size: 20px;
}

.upload-hint {
    font-size: 14px;
    color: var(--gray-500);
    margin-top: 16px;
    margin-bottom: 0;
    font-weight: 500;
}

.upload-status {
    margin-top: 20px;
    padding: 16px;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 500;
}

.upload-status.hidden {
    display: none;
}

.upload-status.processing {
    background: var(--orange-soft);
    color: var(--orange);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

.upload-status.success {
    background: var(--sage-light);
    color: var(--success);
}

.upload-status.error {
    background: var(--danger-light);
    color: var(--danger);
}

.processing-spinner {
    width: 22px;
    height: 22px;
    border: 3px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* === VACCINE DOCUMENT LINKS === */
.view-doc-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 18px;
    background: var(--orange-soft);
    border: 2px solid var(--orange-light);
    border-radius: var(--radius-full);
    color: var(--orange);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.view-doc-link:hover {
    background: var(--orange);
    color: white;
    border-color: var(--orange);
}

.doc-link-icon {
    font-size: 16px;
}

.vax-doc-link {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding: 12px 16px;
    background: var(--sage-light);
    border-radius: var(--radius-md);
    color: var(--success);
    font-size: 14px;
    font-weight: 600;
}

/* === DOCUMENT MANAGEMENT === */
.document-item-layout {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.document-item .document-preview {
    flex-shrink: 0;
    width: 88px;
    height: 88px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    border-radius: var(--radius-md);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.document-item .document-preview:hover {
    background: var(--gray-200);
    transform: scale(1.02);
}

.doc-thumb-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-md);
}

.document-item .pdf-icon,
.document-item .file-icon {
    font-size: 36px;
}

.view-doc-hint {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(45, 49, 66, 0.75);
    color: white;
    font-size: 10px;
    text-align: center;
    padding: 6px;
    opacity: 0;
    transition: var(--transition);
    font-weight: 600;
}

.document-item .document-preview:hover .view-doc-hint {
    opacity: 1;
}

.document-fields {
    flex: 1;
    min-width: 0;
}

.document-fields .inline-form-row {
    margin-bottom: 14px;
}

.doc-notes {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    min-height: 60px;
    transition: var(--transition);
}

.doc-notes:focus {
    outline: none;
    border-color: var(--orange);
    box-shadow: 0 0 0 4px var(--orange-soft);
}

.doc-notes::placeholder {
    color: var(--gray-400);
}

.doc-date-info {
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 10px;
    font-weight: 500;
}

/* === DOCUMENTS VIEW === */
.doc-view-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: white;
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 14px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.doc-view-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.doc-view-thumb {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-sm);
    object-fit: cover;
}

.doc-view-icon {
    width: 56px;
    height: 56px;
    background: var(--gray-100);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.doc-view-info {
    flex: 1;
}

.doc-view-title {
    font-weight: 600;
    color: var(--navy);
    font-size: 15px;
}

.doc-view-date {
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 4px;
    font-weight: 500;
}

/* === PROFILE INFO ITEMS === */
.profile-info-item {
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-100);
}

.profile-info-item:last-child {
    border-bottom: none;
}

.profile-info-label {
    font-size: 11px;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
}

.profile-info-value {
    font-size: 16px;
    color: var(--navy);
    margin-top: 6px;
}

/* Profile schedule items */
.profile-schedule-item {
    background: white;
    border-radius: var(--radius-md);
    padding: 18px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
}

.profile-schedule-title {
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 6px;
}

.profile-schedule-detail {
    font-size: 15px;
    color: var(--gray-600);
}

/* Profile med/vax items */
.profile-med-item,
.profile-vax-item {
    background: white;
    border-radius: var(--radius-md);
    padding: 18px;
    margin-bottom: 12px;
    box-shadow: var(--shadow-sm);
}

.profile-med-name,
.profile-vax-name {
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 6px;
}

.profile-med-detail,
.profile-vax-detail {
    font-size: 14px;
    color: var(--gray-600);
}

/* Profile parent cards */
.profile-parent-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 14px;
    box-shadow: var(--shadow-sm);
}

.profile-parent-name {
    font-weight: 700;
    color: var(--navy);
    font-size: 18px;
    margin-bottom: 16px;
}

.profile-contact-btn {
    display: block;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-size: 15px;
    margin-bottom: 10px;
    text-align: center;
    font-weight: 600;
    transition: var(--transition);
}

.profile-contact-btn.phone-btn {
    background: var(--sage);
    color: white;
}

.profile-contact-btn.email-btn {
    background: var(--orange);
    color: white;
}

.profile-parent-address {
    font-size: 14px;
    color: var(--gray-600);
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-200);
}

/* Profile med status */
.profile-med-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.profile-med-status {
    font-size: 10px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.profile-med-status.status-due {
    background: var(--orange-soft);
    color: var(--orange);
}

.profile-med-status.status-overdue {
    background: var(--danger-light);
    color: var(--danger);
}

.profile-med-status.status-taken {
    background: var(--sage-light);
    color: var(--success);
}

.profile-med-last-taken {
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-200);
    font-weight: 500;
}

/* === DOCUMENT VIEWER MODAL === */
.document-viewer-content {
    max-width: 90vw;
    max-height: 90vh;
}

.doc-viewer-body {
    flex: 1;
    overflow: auto;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
}

.doc-viewer-body img {
    max-width: 100%;
    max-height: 70vh;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

/* === RESPONSIVE === */
@media (max-width: 480px) {
    main {
        padding: 16px;
    }

    .card {
        padding: 24px;
        border-radius: var(--radius-lg);
    }

    .profile-stats {
        gap: 24px;
        padding: 16px;
    }

    .stat-value {
        font-size: 20px;
    }

    .inline-form-row-half {
        grid-template-columns: 1fr;
    }

    .med-card-fields {
        grid-template-columns: 1fr;
    }
}

/* === SCROLLBAR STYLING === */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* === FOCUS VISIBLE === */
:focus-visible {
    outline: 3px solid var(--orange-light);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
    outline: 3px solid var(--orange-light);
    outline-offset: 2px;
}

/* ============================================
   AUTH PAGE STYLES
   ============================================ */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(145deg, var(--cream) 0%, var(--orange-soft) 100%);
}

.auth-container {
    width: 100%;
    max-width: 420px;
}

/* Brand/Logo */
.auth-brand {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo {
    font-size: 64px;
    line-height: 1;
    margin-bottom: 16px;
}

.auth-brand h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.auth-brand p {
    font-size: 16px;
    color: var(--gray-500);
    font-weight: 500;
}

/* Auth Card */
.auth-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 32px;
    box-shadow: var(--shadow-lg);
}

/* Tab Toggle */
.auth-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    background: var(--gray-100);
    border-radius: var(--radius-full);
    padding: 4px;
}

.auth-tab {
    flex: 1;
    padding: 12px 16px;
    border: none;
    background: transparent;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-500);
    cursor: pointer;
    transition: var(--transition);
}

.auth-tab.active {
    background: white;
    color: var(--navy);
    box-shadow: var(--shadow-sm);
}

.auth-tab:hover:not(.active) {
    color: var(--navy-light);
}

/* Google Sign In Button */
.google-signin-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 24px;
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-full);
    font-size: 16px;
    font-weight: 600;
    color: var(--navy);
    cursor: pointer;
    transition: var(--transition);
}

.google-signin-btn:hover {
    border-color: var(--gray-300);
    box-shadow: var(--shadow-md);
}

.google-signin-btn svg {
    flex-shrink: 0;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-200);
}

.auth-divider span {
    padding: 0 16px;
    font-size: 13px;
    color: var(--gray-400);
    font-weight: 500;
}

/* Auth Form */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-form.hidden {
    display: none;
}

.auth-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-form-group label {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-600);
}

.auth-form-group input {
    padding: 16px 20px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 16px;
    transition: var(--transition);
}

.auth-form-group input:focus {
    outline: none;
    border-color: var(--orange);
    box-shadow: 0 0 0 4px var(--orange-soft);
}

/* Submit Button */
.auth-submit-btn {
    width: 100%;
    padding: 18px 24px;
    background: linear-gradient(145deg, var(--orange) 0%, var(--coral) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 16px rgba(249, 168, 38, 0.35);
    margin-top: 8px;
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(249, 168, 38, 0.45);
}

.auth-submit-btn:active {
    transform: translateY(0);
}

/* Secondary Buttons */
.auth-forgot-btn,
.auth-back-btn {
    width: 100%;
    padding: 12px;
    background: transparent;
    border: none;
    color: var(--gray-500);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.auth-forgot-btn:hover,
.auth-back-btn:hover {
    color: var(--orange);
}

/* Reset Info */
.reset-info {
    font-size: 14px;
    color: var(--gray-600);
    line-height: 1.6;
    margin-bottom: 8px;
}

/* Message */
.auth-message {
    margin-top: 16px;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

.auth-message.hidden {
    display: none;
}

.auth-message.error {
    background: var(--danger-light);
    color: var(--danger);
}

.auth-message.success {
    background: var(--sage-light);
    color: var(--success);
}

/* Footer */
.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 13px;
    color: var(--gray-400);
}

/* Loading Overlay */
.auth-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 252, 247, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    z-index: 1000;
}

.auth-loading.hidden {
    display: none;
}

.auth-loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--orange);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.auth-loading p {
    font-size: 16px;
    color: var(--gray-600);
    font-weight: 500;
}

/* ============================================
   USER MENU (for logged-in state)
   ============================================ */

.user-menu {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--orange) 0%, var(--coral) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.logout-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: var(--radius-full);
    color: white;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Share Link Section */
.share-section {
    background: var(--orange-soft);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

.share-section h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 8px;
}

.share-section p {
    font-size: 13px;
    color: var(--gray-600);
    margin-bottom: 16px;
}

.share-url-box {
    display: flex;
    gap: 8px;
    align-items: center;
}

.share-url-input {
    flex: 1;
    padding: 12px 16px;
    background: white;
    border: 2px solid var(--orange-light);
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--navy);
    font-family: 'SF Mono', Monaco, monospace;
}

.copy-btn {
    padding: 12px 20px;
    background: var(--orange);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.copy-btn:hover {
    background: var(--coral);
}

/* App Loading State */
.app-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--cream);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    z-index: 9999;
}

.app-loading.hidden {
    display: none;
}

.app-loading-logo {
    font-size: 72px;
    animation: bounce 1s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.app-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--orange);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.app-loading-text {
    font-size: 16px;
    color: var(--gray-500);
    font-weight: 500;
}

/* Not Found State */
.not-found {
    text-align: center;
    padding: 60px 20px;
}

.not-found-icon {
    font-size: 80px;
    margin-bottom: 24px;
}

.not-found h2 {
    font-size: 28px;
    color: var(--navy);
    margin-bottom: 12px;
}

.not-found p {
    font-size: 16px;
    color: var(--gray-500);
    margin-bottom: 32px;
}

.not-found-btn {
    display: inline-flex;
    padding: 16px 32px;
    background: linear-gradient(145deg, var(--orange) 0%, var(--coral) 100%);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-full);
    font-size: 16px;
    font-weight: 600;
    transition: var(--transition);
}

.not-found-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(249, 168, 38, 0.35);
}

/* ========================================
   HAMBURGER MENU & SIDE DRAWER
   ======================================== */

/* Hamburger Button */
.hamburger-btn {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 1000;
    width: 44px;
    height: 44px;
    background: white;
    border: none;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    padding: 10px;
    transition: var(--transition);
}

.hamburger-btn:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

.hamburger-line {
    width: 20px;
    height: 2px;
    background: var(--navy);
    border-radius: 2px;
    transition: var(--transition);
}

/* Side Menu Overlay */
.side-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1001;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.side-menu-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Side Menu Drawer */
.side-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100%;
    background: white;
    z-index: 1002;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
    transform: translateX(0);
    transition: transform 0.3s ease;
}

.side-menu.hidden {
    transform: translateX(-100%);
}

.side-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid var(--gray-200);
    background: linear-gradient(135deg, var(--orange) 0%, var(--coral) 100%);
}

.side-menu-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: white;
}

.side-menu-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 24px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.side-menu-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.side-menu-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.side-menu-section h3 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-500);
    margin: 0 0 12px 0;
    font-weight: 600;
}

.side-menu-pet {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
}

.side-menu-pet:hover {
    background: var(--gray-100);
}

.side-menu-pet.active {
    background: var(--orange-soft);
}

.pet-avatar-small {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--orange) 0%, var(--coral) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
}

.pet-name-menu {
    font-weight: 600;
    color: var(--navy);
    font-size: 15px;
}

.side-menu-action {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    color: var(--navy);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}

.side-menu-action:hover {
    background: var(--orange-soft);
    border-color: var(--orange);
}

.action-icon {
    font-size: 18px;
}

.side-menu-footer {
    padding: 20px;
    border-top: 1px solid var(--gray-200);
}

.side-menu-signout {
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: 1px solid var(--gray-300);
    border-radius: 10px;
    color: var(--gray-600);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.side-menu-signout:hover {
    background: var(--danger-light);
    border-color: var(--danger);
    color: var(--danger);
}

/* Prevent body scroll when menu is open */
body.menu-open {
    overflow: hidden;
}

/* ========================================
   SHARE MODAL
   ======================================== */

.share-modal-content {
    max-width: 420px;
}

.share-link-container {
    display: flex;
    gap: 8px;
    margin: 16px 0;
}

.share-link-input {
    flex: 1;
    padding: 12px 14px;
    border: 1px solid var(--gray-300);
    border-radius: 10px;
    font-size: 14px;
    color: var(--navy);
    background: var(--gray-50);
}

.share-link-input:focus {
    outline: none;
    border-color: var(--orange);
}

.copy-link-btn {
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--orange) 0%, var(--coral) 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.copy-link-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(249, 168, 38, 0.3);
}

.share-copied-msg {
    text-align: center;
    color: var(--success);
    font-weight: 500;
    font-size: 14px;
    margin: 8px 0;
}

.share-copied-msg.hidden {
    display: none;
}

.share-reset-msg {
    text-align: center;
    color: var(--orange);
    font-weight: 500;
    font-size: 14px;
    margin: 8px 0;
}

.share-reset-msg.hidden {
    display: none;
}

.reset-link-btn {
    padding: 10px 16px;
    background: transparent;
    color: #888;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.reset-link-btn:hover {
    background: #f5f5f5;
    color: #666;
    border-color: #ccc;
}

.reset-link-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
