/* ============================================================
   PawSathi - Main Stylesheet
   Mobile-first design, Android-app feel
   Colors: Primary #2E7D32, Secondary #FF9800, BG #F7F9FB
   ============================================================ */

/* ============================================================
   CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   ============================================================ */
:root {
    --primary:        #2E7D32;
    --primary-light:  #4CAF50;
    --primary-dark:   #1B5E20;
    --secondary:      #FF9800;
    --secondary-light:#FFB74D;
    --secondary-dark: #E65100;
    --bg:             #F7F9FB;
    --card:           #FFFFFF;
    --text:           #212121;
    --text-muted:     #757575;
    --border:         #E0E0E0;
    --success:        #2E7D32;
    --danger:         #C62828;
    --warning:        #F57F17;
    --info:           #01579B;
    --radius:         16px;
    --radius-sm:      10px;
    --shadow:         0 2px 12px rgba(0,0,0,0.08);
    --shadow-lg:      0 8px 30px rgba(0,0,0,0.12);
    --transition:     0.2s ease;
    --bottom-nav-h:   64px;
    --header-h:       60px;
    --font:           'Nunito', system-ui, -apple-system, sans-serif;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    /* Reserve space for fixed top header + bottom nav */
    padding-top: var(--header-h);
    padding-bottom: calc(var(--bottom-nav-h) + 16px);
    -webkit-font-smoothing: antialiased;
}

/* Page without nav (public, login, install) */
body.no-nav {
    padding-top: 0;
    padding-bottom: 0;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text);
}

.page-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0;
}

.section-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
}

/* ============================================================
   TOP HEADER / APP BAR
   ============================================================ */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-h);
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.app-header .header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: white;
}

.app-header .header-logo img {
    height: 36px;
    width: 36px;
    border-radius: 50%;
    object-fit: cover;
    background: white;
    padding: 2px;
}

.app-header .logo-text {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.app-header .header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.15);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    text-decoration: none;
    transition: background var(--transition);
}

.header-icon-btn:hover {
    background: rgba(255,255,255,0.25);
    color: white;
}

.notification-badge {
    position: relative;
}

.notification-badge .badge-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: var(--secondary);
    border-radius: 50%;
    border: 2px solid var(--primary);
}

/* ============================================================
   BOTTOM NAVIGATION
   ============================================================ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-h);
    background: var(--card);
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 1000;
    box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
    border-top: 1px solid var(--border);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    text-decoration: none;
    color: var(--text-muted);
    flex: 1;
    height: 100%;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: color var(--transition);
    position: relative;
}

.bottom-nav-item .nav-icon {
    font-size: 1.4rem;
    transition: transform var(--transition);
}

.bottom-nav-item.active {
    color: var(--primary);
}

.bottom-nav-item.active .nav-icon {
    transform: scale(1.15);
}

.bottom-nav-item:hover {
    color: var(--primary);
}

/* FAB Placeholder in nav center */
.bottom-nav-fab-space {
    flex: 1;
    display: flex;
    justify-content: center;
}

/* ============================================================
   FLOATING ACTION BUTTON (FAB)
   ============================================================ */
.fab-wrapper {
    position: fixed;
    bottom: calc(var(--bottom-nav-h) - 28px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 1100;
}

.fab {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--secondary);
    color: white;
    border: none;
    box-shadow: 0 4px 16px rgba(255,152,0,0.5);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    transition: all 0.2s ease;
}

.fab:hover, .fab:focus {
    background: var(--secondary-dark);
    box-shadow: 0 6px 20px rgba(255,152,0,0.6);
    transform: scale(1.08);
    outline: none;
}

/* FAB Menu */
.fab-menu {
    position: absolute;
    bottom: 68px;
    left: 50%;
    transform: translateX(-50%);
    display: none;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.fab-menu.open {
    display: flex;
}

.fab-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--card);
    color: var(--text);
    padding: 10px 16px 10px 12px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: var(--shadow);
    white-space: nowrap;
    transition: all var(--transition);
}

.fab-menu-item:hover {
    background: var(--primary);
    color: white;
}

.fab-menu-item .fab-menu-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.fab-menu-item:hover .fab-menu-icon {
    background: rgba(255,255,255,0.25);
}

/* Overlay for FAB menu */
.fab-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.3);
    z-index: 1050;
    display: none;
}

.fab-overlay.open {
    display: block;
}

/* ============================================================
   CARDS
   ============================================================ */
.ps-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: none;
    overflow: hidden;
}

.ps-card .card-header {
    background: transparent;
    border-bottom: 1px solid var(--border);
    padding: 16px;
    font-weight: 700;
    font-size: 1rem;
}

.ps-card .card-body {
    padding: 16px;
}

/* Stat cards on dashboard */
.stat-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 18px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 16px;
}

.stat-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-card-icon.green  { background: rgba(46,125,50,0.12); color: var(--primary); }
.stat-card-icon.orange { background: rgba(255,152,0,0.12); color: var(--secondary); }
.stat-card-icon.red    { background: rgba(198,40,40,0.12); color: var(--danger); }
.stat-card-icon.blue   { background: rgba(1,87,155,0.12); color: var(--info); }

.stat-card-info .label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card-info .value {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--text);
}

/* ============================================================
   DOG CARDS
   ============================================================ */
.dog-card {
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
    text-decoration: none;
    color: var(--text);
    display: block;
}

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

.dog-card-photo {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: var(--bg);
    display: block;
}

.dog-card-body {
    padding: 14px;
}

.dog-card-name {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.dog-card-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.dog-card-badges {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    flex-wrap: wrap;
}

/* ============================================================
   LIST ITEMS (Activity, Feedings, etc.)
   ============================================================ */
.list-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

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

.list-item-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.list-item-body {
    flex: 1;
    min-width: 0;
}

.list-item-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.list-item-sub {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.list-item-right {
    text-align: right;
    flex-shrink: 0;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ============================================================
   FORMS
   ============================================================ */
.ps-form-label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 6px;
    display: block;
}

.ps-form-control {
    width: 100%;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    font-size: 0.95rem;
    font-family: var(--font);
    color: var(--text);
    background: white;
    transition: border-color var(--transition), box-shadow var(--transition);
    outline: none;
}

.ps-form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(46,125,50,0.12);
}

.ps-form-control::placeholder {
    color: #BDBDBD;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    border-radius: var(--radius-sm);
    font-family: var(--font);
    font-weight: 700;
    font-size: 0.95rem;
    padding: 12px 20px;
    min-height: 48px;           /* Touch target */
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all var(--transition);
    text-decoration: none;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    color: white;
}

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

.btn-secondary:hover {
    background: var(--secondary-dark);
    color: white;
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: white;
}

.btn-light {
    background: var(--bg);
    color: var(--text);
}

.btn-sm {
    padding: 8px 14px;
    min-height: 36px;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 15px 24px;
    min-height: 54px;
    font-size: 1rem;
    border-radius: var(--radius);
}

.btn-block {
    width: 100%;
}

/* ============================================================
   BADGES
   ============================================================ */
.badge {
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 8px;
    letter-spacing: 0.3px;
}

.badge-success  { background: rgba(46,125,50,0.12);  color: var(--primary); }
.badge-warning  { background: rgba(245,127,23,0.12); color: var(--warning); }
.badge-danger   { background: rgba(198,40,40,0.12);  color: var(--danger);  }
.badge-info     { background: rgba(1,87,155,0.12);   color: var(--info);    }
.badge-orange   { background: rgba(255,152,0,0.12);  color: var(--secondary);}
.badge-gray     { background: rgba(0,0,0,0.06);      color: var(--text-muted);}

/* ============================================================
   SECTION SPACING
   ============================================================ */
.section {
    padding: 20px 16px;
}

.section + .section {
    padding-top: 0;
}

/* ============================================================
   PAGE CONTENT WRAPPER
   ============================================================ */
.page-content {
    max-width: 768px;
    margin: 0 auto;
}

/* ============================================================
   SEARCH BAR
   ============================================================ */
.search-bar {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 50px;
    box-shadow: var(--shadow);
    padding: 0 16px;
    gap: 10px;
}

.search-bar input {
    border: none;
    background: transparent;
    outline: none;
    font-family: var(--font);
    font-size: 0.95rem;
    flex: 1;
    padding: 13px 0;
    color: var(--text);
}

.search-bar .search-icon {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* ============================================================
   FILTER CHIPS
   ============================================================ */
.filter-chips {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}

.filter-chips::-webkit-scrollbar { display: none; }

.chip {
    padding: 6px 16px;
    border-radius: 50px;
    border: 1.5px solid var(--border);
    background: white;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    transition: all var(--transition);
    font-family: var(--font);
}

.chip.active, .chip:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* ============================================================
   MAP CONTAINER
   ============================================================ */
#map {
    height: 400px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    z-index: 0;
}

/* ============================================================
   PHOTO UPLOAD AREA
   ============================================================ */
.photo-upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    background: var(--bg);
}

.photo-upload-area:hover, .photo-upload-area.dragover {
    border-color: var(--primary);
    background: rgba(46,125,50,0.04);
}

.photo-upload-area .upload-icon {
    font-size: 2.5rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.photo-upload-preview {
    width: 100%;
    max-height: 220px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    margin-top: 12px;
    display: none;
}

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.ps-progress {
    height: 10px;
    border-radius: 50px;
    background: var(--border);
    overflow: hidden;
}

.ps-progress-bar {
    height: 100%;
    border-radius: 50px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    transition: width 0.6s ease;
}

/* ============================================================
   TIMELINE
   ============================================================ */
.timeline {
    position: relative;
    padding-left: 28px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    padding: 0 0 20px 16px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -22px;
    top: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid white;
    box-shadow: 0 0 0 2px var(--primary);
}

.timeline-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 4px;
}

.timeline-content {
    background: var(--card);
    border-radius: var(--radius-sm);
    padding: 12px;
    box-shadow: var(--shadow);
}

.timeline-content .event-title {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.timeline-content .event-detail {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
}

.alert-success { background: rgba(46,125,50,0.12); color: var(--primary); }
.alert-danger  { background: rgba(198,40,40,0.12); color: var(--danger);  }
.alert-warning { background: rgba(245,127,23,0.12); color: var(--warning); }
.alert-info    { background: rgba(1,87,155,0.12); color: var(--info); }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 48px 24px;
}

.empty-state .empty-icon {
    font-size: 4rem;
    margin-bottom: 16px;
    display: block;
    opacity: 0.4;
}

.empty-state h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--text);
}

.empty-state p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 20px;
}

/* ============================================================
   BOTTOM SHEET / MODAL
   ============================================================ */
.bottom-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--card);
    border-radius: var(--radius) var(--radius) 0 0;
    z-index: 2000;
    padding: 20px 20px 40px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 -4px 30px rgba(0,0,0,0.15);
}

.bottom-sheet.open {
    transform: translateY(0);
}

.bottom-sheet-handle {
    width: 40px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    margin: 0 auto 20px;
}

/* ============================================================
   AVATAR
   ============================================================ */
.avatar {
    border-radius: 50%;
    object-fit: cover;
    background: var(--bg);
}

.avatar-placeholder {
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* ============================================================
   TABLE
   ============================================================ */
.ps-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.ps-table th {
    background: var(--bg);
    padding: 10px 12px;
    text-align: left;
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}

.ps-table td {
    padding: 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.ps-table tr:last-child td { border-bottom: none; }
.ps-table tr:hover td { background: var(--bg); }

/* ============================================================
   SCROLLABLE HORIZONTAL TABLE WRAPPER
   ============================================================ */
.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ============================================================
   LOGIN / INSTALL PAGES
   ============================================================ */
.auth-page {
    min-height: 100vh;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    background: white;
    border-radius: var(--radius);
    padding: 32px 24px;
    width: 100%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
}

.auth-logo {
    text-align: center;
    margin-bottom: 28px;
}

.auth-logo img {
    height: 80px;
    margin-bottom: 12px;
}

.auth-logo h1 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    margin: 0;
}

.auth-logo p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 4px 0 0;
}

/* ============================================================
   INSTALL STEPS
   ============================================================ */
.install-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 28px;
    position: relative;
}

.install-steps::before {
    content: '';
    position: absolute;
    top: 14px;
    left: 20px;
    right: 20px;
    height: 2px;
    background: var(--border);
    z-index: 0;
}

.install-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    position: relative;
    z-index: 1;
}

.install-step .step-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--border);
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.install-step.active .step-circle {
    background: var(--primary);
    color: white;
}

.install-step.done .step-circle {
    background: var(--primary-light);
    color: white;
}

.install-step .step-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    text-align: center;
    max-width: 60px;
}

.install-step.active .step-label,
.install-step.done .step-label {
    color: var(--primary);
}

/* ============================================================
   QUICK ACTION BUTTONS
   ============================================================ */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.quick-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--text);
}

.quick-action-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    transition: transform var(--transition), box-shadow var(--transition);
}

.quick-action:hover .quick-action-icon {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.quick-action-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-align: center;
    color: var(--text-muted);
}

/* ============================================================
   RESCUE PRIORITY COLORS
   ============================================================ */
.priority-low      { border-left: 4px solid var(--success); }
.priority-medium   { border-left: 4px solid var(--warning); }
.priority-high     { border-left: 4px solid var(--danger);  }
.priority-critical { border-left: 4px solid #000;           }

/* ============================================================
   PUBLIC PAGE / HERO
   ============================================================ */
.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: white;
    padding: 60px 20px;
    text-align: center;
}

.hero h1 {
    color: white;
    font-size: 2rem;
    margin-bottom: 12px;
}

.hero p {
    opacity: 0.9;
    font-size: 1rem;
    max-width: 500px;
    margin: 0 auto 24px;
}

.impact-counter {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.impact-item .impact-number {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--secondary);
    line-height: 1;
}

.impact-item .impact-label {
    font-size: 0.8rem;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

/* ============================================================
   MEDIA GALLERY
   ============================================================ */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.photo-grid-item {
    aspect-ratio: 1;
    overflow: hidden;
    cursor: pointer;
    border-radius: 4px;
}

.photo-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.photo-grid-item:hover img {
    transform: scale(1.05);
}

/* ============================================================
   LOADING SPINNER
   ============================================================ */
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* ============================================================
   RESPONSIVE: TABLET & DESKTOP
   ============================================================ */
@media (min-width: 640px) {
    .quick-actions {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .dog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    #map { height: 500px; }
}

@media (min-width: 768px) {
    body {
        padding-top: var(--header-h);
        padding-bottom: 0;
    }

    /* On desktop, bottom nav becomes sidebar or just hide it */
    .bottom-nav, .fab-wrapper { display: none; }

    /* Show desktop nav in header */
    .desktop-nav { display: flex !important; }

    .dog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .photo-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1024px) {
    .page-content {
        max-width: 960px;
    }
    
    .dog-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Desktop navigation in header */
.desktop-nav {
    display: none;
    align-items: center;
    gap: 4px;
}

.desktop-nav a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 700;
    transition: all var(--transition);
}

.desktop-nav a:hover, .desktop-nav a.active {
    background: rgba(255,255,255,0.15);
    color: white;
}

/* Dog grid layout */
.dog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

/* ============================================================
   UTILITIES
   ============================================================ */
.text-primary  { color: var(--primary) !important; }
.text-secondary{ color: var(--secondary) !important; }
.text-muted    { color: var(--text-muted) !important; }
.text-danger   { color: var(--danger) !important; }
.text-success  { color: var(--primary) !important; }

.bg-primary-soft { background: rgba(46,125,50,0.08); }
.bg-orange-soft  { background: rgba(255,152,0,0.08); }
.bg-red-soft     { background: rgba(198,40,40,0.08); }
.bg-blue-soft    { background: rgba(1,87,155,0.08); }

.fw-bold   { font-weight: 700; }
.fw-bolder { font-weight: 800; }

.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }

.rounded-full { border-radius: 50%; }
.rounded      { border-radius: var(--radius-sm); }
.rounded-lg   { border-radius: var(--radius); }

.shadow    { box-shadow: var(--shadow); }
.shadow-lg { box-shadow: var(--shadow-lg); }

.d-flex         { display: flex; }
.align-center   { align-items: center; }
.justify-between{ justify-content: space-between; }
.flex-1         { flex: 1; }
.flex-col       { flex-direction: column; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

.p-0 { padding: 0; }
.mt-auto { margin-top: auto; }

.overflow-hidden { overflow: hidden; }
.cursor-pointer  { cursor: pointer; }

/* ============================================================
   PRINT STYLES
   ============================================================ */
@media print {
    .app-header, .bottom-nav, .fab-wrapper, .btn { display: none !important; }
    body { padding: 0; background: white; }
    .ps-card { box-shadow: none; border: 1px solid #ddd; }
}
