/* =========================================
   1. CSS Variables & Design Tokens
   ========================================= */
:root {
    /* Primary Palette */
    --primary-color: #0d9488;
    /* Teal 600 */
    --primary-dark: #0f766e;
    /* Teal 700 */
    --primary-light: #ccfbf1;
    /* Teal 100 */

    /* Secondary Palette */
    --secondary-color: #f97316;
    /* Orange 500 */
    --secondary-dark: #ea580c;
    /* Orange 600 */

    /* Neutral Palette */
    --text-main: #1e293b;
    /* Slate 800 */
    --text-muted: #64748b;
    /* Slate 500 */
    --text-light: #94a3b8;
    /* Slate 400 */
    --bg-body: #f8fafc;
    /* Slate 50 */
    --bg-card: #ffffff;
    --border-color: #e2e8f0;
    /* Slate 200 */

    /* Status Colors */
    --success: #22c55e;
    --error: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;

    /* Typography */
    --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
    --font-heading: 'Poppins', sans-serif;

    /* Spacing & Layout */
    --container-width: 1200px;
    --header-height: 70px;
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
}

/* =========================================
   2. Reset & Base Styles
   ========================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-main);
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* =========================================
   3. Layout Utilities
   ========================================= */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 4rem 0;
}

.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.pet-details-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: start;
}

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

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

.grid-5 {
    grid-template-columns: repeat(5, 1fr);
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

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

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-4 {
    gap: 1rem;
}

/* =========================================
   4. Components
   ========================================= */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    font-size: 1rem;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: white;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--bg-body);
    border-color: var(--text-muted);
}

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

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

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

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

.card-image-container {
    width: 100%;
    position: relative;
    overflow: hidden;
}

/* Aspect Ratio Utilities */
.aspect-4-3 {
    padding-top: 75%;
    /* 4:3 Aspect Ratio */
}

.aspect-16-9 {
    padding-top: 56.25%;
    /* 16:9 Aspect Ratio */
}

.aspect-1-1 {
    padding-top: 100%;
    /* 1:1 Aspect Ratio */
}

.aspect-3-4 {
    padding-top: 133.33%;
    /* 3:4 Aspect Ratio */
}

.card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.card-meta {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-main);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color var(--transition-fast);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* =========================================
   5. Header & Navigation
   ========================================= */
.navbar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    height: var(--header-height);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    font-weight: 500;
    color: var(--text-main);
    position: relative;
}

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

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

/* Mobile Menu Toggle */
.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-main);
}

/* =========================================
   6. Hero Section
   ========================================= */
.hero {
    padding-top: var(--header-height);
    min-height: 80vh;
    display: flex;
    align-items: center;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('https://images.unsplash.com/photo-1450778869180-41d0601e046e?auto=format&fit=crop&w=1920');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    color: white !important;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
    color: white;
}

/* =========================================
   7. Footer
   ========================================= */
.footer {
    background: var(--text-main);
    color: white;
    padding: 4rem 0 2rem;
    margin-top: auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-title {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--text-light);
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    color: var(--text-light);
}

/* =========================================
   8. Responsive Design
   ========================================= */
/* =========================================
   8. Responsive Design
   ========================================= */
@media (max-width: 1024px) {
    .admin-sidebar {
        transform: translateX(-100%);
        box-shadow: none;
    }

    .admin-sidebar.active {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }

    .admin-main {
        margin-left: 0;
    }

    .admin-header {
        padding: 0 1.5rem;
    }
}

@media (max-width: 768px) {

    /* Navigation */
    .mobile-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 2rem;
        border-bottom: 1px solid var(--border-color);
        transform: translateY(-150%);
        transition: transform var(--transition-normal);
        z-index: 999;
        max-height: calc(100vh - var(--header-height));
        overflow-y: auto;
    }

    .nav-menu.active {
        transform: translateY(0);
        box-shadow: var(--shadow-lg);
    }

    /* Typography */
    .hero-title {
        font-size: 2.5rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    /* Layout */
    .section {
        padding: 3rem 0;
    }

    .grid,
    .grid-2,
    .grid-3,
    .grid-4,
    .grid-5 {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }

    /* Pet Details Specific */
    .pet-details-grid {
        grid-template-columns: 1fr !important;
    }

    .detail-card.sticky {
        position: static;
    }

    /* Admin */
    .admin-content {
        padding: 1rem;
    }

    .stat-card {
        margin-bottom: 1rem;
    }

    .table-responsive {
        border: 1px solid var(--border-color);
        border-radius: var(--radius-md);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .section {
        padding: 2rem 0;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .flex {
        flex-wrap: wrap;
    }

    /* Prevent iOS zoom */
    input,
    select,
    textarea {
        font-size: 16px !important;
    }
}

/* =========================================
   9. My Posts Styles (Migrated)
   ========================================= */
.page-header {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('https://images.unsplash.com/photo-1450778869180-41d0601e046e?auto=format&fit=crop&w=1920');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 100px 0;
    text-align: center;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.pet-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.pet-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.pet-image-wrapper {
    position: relative;
    padding-top: 75%;
    /* 4:3 Aspect Ratio */
    overflow: hidden;
}

.pet-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.status-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.status-approved {
    background: var(--success);
}

.status-pending {
    background: var(--warning);
}

.status-rejected {
    background: var(--error);
}

.status-adopted {
    background: var(--primary-color);
}

.status-withdrawn {
    background: #6b7280;
}

.pet-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.pet-name {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.pet-location {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pet-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
    flex-wrap: wrap;
}

.btn-action {
    flex: 1;
    padding: 0.5rem;
    font-size: 0.9rem;
    border-radius: var(--radius-md);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.btn-view {
    background: var(--bg-body);
    color: var(--text-main);
}

.btn-view:hover {
    background: #e5e7eb;
}

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

.btn-adopt:hover {
    background: #166534;
}

.btn-withdraw {
    border-color: var(--border-color);
    color: var(--text-muted);
    background: white;
}

.btn-withdraw:hover {
    border-color: var(--error);
    color: var(--error);
}

/* Compact Pet Card */
.pet-card-compact .pet-content {
    padding: 1rem;
}

.pet-card-compact .pet-name {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.pet-card-compact .pet-location {
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.pet-card-compact .pet-actions {
    gap: 0.5rem;
}

.pet-card-compact .btn-action {
    padding: 0.4rem;
    font-size: 0.85rem;
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 400px;
    text-align: center;
}

/* =========================================
   9. Utilities / Helpers
   ========================================= */
.text-center {
    text-align: center;
}

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

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

.mb-4 {
    margin-bottom: 1rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mt-4 {
    margin-top: 1rem;
}

.text-primary {
    color: var(--primary-color);
}

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

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success {
    background: #dcfce7;
    color: #166534;
}

.badge-warning {
    background: #fef3c7;
    color: #92400e;
}

.badge-error {
    background: #fee2e2;
    color: #991b1b;
}

/* Dropdown Menu */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 200px;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-md);
    padding: 0.5rem 0;
    z-index: 1001;
    top: 100%;
    left: 0;
    border: 1px solid var(--border-color);
    animation: fadeIn 0.2s ease;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    color: var(--text-main);
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    display: block;
    transition: background-color 0.2s;
}

.dropdown-content a:hover {
    background-color: var(--bg-body);
    color: var(--primary-color);
}

.dropdown-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.dropdown-toggle::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 0.75rem;
    transition: transform 0.2s;
}

.dropdown:hover .dropdown-toggle::after {
    transform: rotate(180deg);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Dropdown */
@media (max-width: 768px) {
    .dropdown {
        width: 100%;
        display: block;
    }

    .dropdown-content {
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 1rem;
        display: none;
        animation: none;
    }

    .dropdown.active .dropdown-content {
        display: block;
    }

    .dropdown-toggle {
        width: 100%;
        justify-content: space-between;
        padding: 0.5rem 0;
    }
}

/* =========================================
   10. Admin Dashboard
   ========================================= */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
    width: 260px;
    background: white;
    border-right: 1px solid var(--border-color);
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-normal);
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99;
    display: none;
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-brand {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-nav {
    flex: 1;
    padding: 1.5rem 1rem;
    overflow-y: auto;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
    transition: all var(--transition-fast);
    font-weight: 500;
}

.sidebar-link:hover,
.sidebar-link.active {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.sidebar-link i {
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Main Content */
.admin-main {
    flex: 1;
    margin-left: 260px;
    background: var(--bg-body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.admin-header {
    height: var(--header-height);
    background: white;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 90;
}

.admin-content {
    padding: 2rem;
    flex: 1;
}

/* Admin Cards */
.stat-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-title {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-main);
}

.stat-meta {
    font-size: 0.875rem;
    color: var(--text-light);
}

/* Data Tables */
.table-container {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: var(--bg-body);
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.data-table tr:hover td {
    background: var(--bg-body);
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

/* Responsive Admin */
@media (max-width: 1024px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }

    .admin-sidebar.active {
        transform: translateX(0);
    }

    .admin-main {
        margin-left: 0;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 99;
    }

    .sidebar-overlay.active {
        display: block;
    }
}

/* =========================================
   11. Toast Notifications
   ========================================= */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: white;
    color: var(--text-main);
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 300px;
    max-width: 400px;
    transform: translateX(120%);
    transition: transform 0.3s ease;
    border-left: 4px solid transparent;
    animation: slideIn 0.3s forwards;
}

.toast.show {
    transform: translateX(0);
}

.toast.hide {
    transform: translateX(120%);
}

.toast-success {
    border-left-color: var(--success);
}

.toast-success .toast-icon {
    color: var(--success);
}

.toast-error {
    border-left-color: var(--error);
}

.toast-error .toast-icon {
    color: var(--error);
}

.toast-warning {
    border-left-color: var(--warning);
}

.toast-warning .toast-icon {
    color: var(--warning);
}

.toast-info {
    border-left-color: var(--info);
}

.toast-info .toast-icon {
    color: var(--info);
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.toast-message {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.toast-close {
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0;
    line-height: 1;
}

.toast-close:hover {
    color: var(--text-main);
}

@keyframes slideIn {
    from {
        transform: translateX(120%);
    }

    to {
        transform: translateX(0);
    }
}

/* =========================================
   12. Browse Pets Page Overhaul
   ========================================= */

/* Premium Pet Card */
.pet-card {
    background: #fff;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.pet-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.pet-card-image-container {
    position: relative;
    padding-top: 133.33%;
    /* 3:4 Aspect Ratio (4/3 * 100) */
    overflow: hidden;
    background-color: #f1f5f9;
}

.pet-card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.pet-card:hover .pet-card-image {
    transform: scale(1.05);
}

.pet-card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.pet-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    line-height: 1.3;
}

.pet-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.pet-card-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.pet-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

.pet-badge-light {
    background-color: #f1f5f9;
    color: #475569;
}

.pet-badge-success {
    background-color: #dcfce7;
    color: #166534;
}

.pet-badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.pet-badge-error {
    background-color: #fee2e2;
    color: #991b1b;
}

.pet-card-desc {
    color: var(--text-muted);
    font-size: 0.925rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.pet-card-footer {
    margin-top: auto;
}

/* Filter Sidebar Enhancements */
.filter-sidebar .card {
    border: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    border-radius: 1rem;
}

.filter-sidebar .form-label {
    font-weight: 600;
    color: var(--text-main);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    display: block;
}

.filter-sidebar .form-control {
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.2s;
    background-color: #f8fafc;
}

.filter-sidebar .form-control:focus {
    border-color: var(--primary-color);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
    outline: none;
}

.filter-sidebar .btn-primary {
    border-radius: 0.5rem;
    padding: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.025em;
    box-shadow: 0 4px 6px -1px rgba(13, 148, 136, 0.2);
}

.filter-sidebar .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 8px -1px rgba(13, 148, 136, 0.3);
}

/* =========================================
   10. Mobile Optimization (Enhanced)
   ========================================= */

/* Global Mobile Fixes */
@media (max-width: 768px) {
    :root {
        --header-height: 60px;
        --container-width: 100%;
    }

    body {
        font-size: 16px;
        /* Prevent zoom on iOS */
    }

    .container {
        padding: 0 1rem;
    }

    .section {
        padding: 2.5rem 0;
    }

    /* Typography Scaling */
    h1,
    .hero-title {
        font-size: 2rem !important;
        line-height: 1.2;
    }

    h2 {
        font-size: 1.5rem !important;
    }

    h3 {
        font-size: 1.25rem !important;
    }

    /* Navigation */
    .navbar {
        height: var(--header-height);
    }

    .nav-brand {
        font-size: 1.25rem;
    }

    .nav-menu {
        top: var(--header-height);
        padding: 1.5rem;
        gap: 1rem;
        background: white;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    }

    .nav-link {
        display: block;
        padding: 0.75rem 0;
        border-bottom: 1px solid var(--border-color);
        width: 100%;
    }

    .nav-link:last-child {
        border-bottom: none;
    }

    /* Auth Buttons in Nav */
    #auth-buttons {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
        margin-top: 1rem;
    }

    #auth-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    /* Hero Section */
    .hero {
        min-height: 60vh;
        padding-top: calc(var(--header-height) + 2rem);
        text-align: center;
    }

    .hero-content {
        padding: 0 1rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    /* Grids & Layouts */
    .grid,
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr !important;
        gap: 1.5rem;
    }

    /* Keep stats grid 2 columns on mobile */
    .grid-4 {
        grid-template-columns: 1fr 1fr !important;
        gap: 1rem;
    }

    /* Cards */
    .card {
        margin-bottom: 1rem;
    }

    .card-image-container {
        height: 200px;
        /* Fixed height for consistency */
    }

    /* Forms */
    .form-group {
        margin-bottom: 1rem;
    }

    .form-control {
        height: 48px;
        /* Larger touch target */
        font-size: 16px;
    }

    .btn {
        width: 100%;
        /* Full width buttons on mobile */
        height: 48px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    /* Flex Utilities */
    .flex-wrap-mobile {
        flex-wrap: wrap;
    }

    .flex.gap-4 {
        gap: 1rem;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-grid .flex {
        justify-content: center;
    }

    .footer-links li {
        margin-bottom: 1rem;
    }

    /* Tables (Admin/Dashboard) */
    .table-responsive {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        width: 100%;
        min-width: 600px;
        /* Force scroll if too narrow */
    }
}

/* Small Mobile (Phones) */
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem !important;
    }

    .btn {
        font-size: 0.95rem;
    }
}

/* Browse Pets Mobile Filters */
@media (max-width: 768px) {
    .mobile-only {
        display: block !important;
    }

    #filter-card {
        display: none;
    }

    #filter-card.active {
        display: block;
    }
}

/* Mobile Only Utility for Auth */
@media (max-width: 768px) {
    .mobile-only {
        display: flex !important;
    }
}

/* =========================================
   10. Admin Enhancements
   ========================================= */
.admin-filter-bar {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.filter-group {
    flex: 1;
    min-width: 200px;
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group-text {
    position: absolute;
    left: 1rem;
    color: var(--text-muted);
    pointer-events: none;
    z-index: 10;
}

.input-group .form-control {
    padding-left: 2.75rem;
    /* Space for icon */
    background-color: var(--bg-body);
    border-color: transparent;
    transition: all 0.2s;
}

.input-group .form-control:focus {
    background-color: white;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px var(--primary-light);
}

.input-group .form-control:hover {
    background-color: #f1f5f9;
}