﻿/* === ALMAMOVET MODERN PREMIUM DESIGN === */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    /* 🎨 Vibrant Color Palette */
    --primary: #7c3aed;
    --primary-light: #a78bfa;
    --primary-hover: #6d28d9;
    --primary-dark: #5b21b6;

    --secondary: #ec4899;
    --secondary-light: #f472b6;

    --accent: #06b6d4;
    --accent-light: #22d3ee;

    --success: #10b981;
    --success-light: #34d399;

    --warning: #f59e0b;
    --warning-light: #fbbf24;

    --danger: #ef4444;
    --danger-light: #f87171;

    --info: #3b82f6;
    --info-light: #60a5fa;

    /* 🌟 Backgrounds */
    --bg-base: #f8fafc;
    --bg-surface: #ffffff;
    --bg-elevated: #f1f5f9;
    --bg-card: rgba(255, 255, 255, 0.85);

    /* Text Colors */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #7c3aed 0%, #a855f7 50%, #ec4899 100%);
    --gradient-secondary: linear-gradient(135deg, #ec4899 0%, #f472b6 100%);
    --gradient-accent: linear-gradient(135deg, #06b6d4 0%, #3b82f6 100%);
    --gradient-bg: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);

    /* Glass Effect */
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: 1px solid rgba(255, 255, 255, 0.6);

    /* Spacing & Layout */
    --radius-sm: 8px;
    --radius: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.15);
    --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.2);
    --shadow-primary: 0 8px 24px rgba(124, 58, 237, 0.35);
    --shadow-glow: 0 0 40px rgba(124, 58, 237, 0.2);

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Transitions */
    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET & BASE ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background: var(--bg-base);
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(124, 58, 237, 0.08), transparent),
        radial-gradient(ellipse 60% 40% at 100% 100%, rgba(236, 72, 153, 0.06), transparent);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

a:hover {
    color: var(--primary);
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-elevated);
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* ===== CONTAINER ===== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ===== HEADER ===== */
.header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.header::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    opacity: 0.5;
}

.header-content {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.header h1 {
    font-size: 1.75rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    letter-spacing: -0.02em;
}

.header h1 i {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 8px rgba(124, 58, 237, 0.3));
}

.header p {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
}

/* ===== NAV MENU ===== */
.nav-menu {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.nav-link {
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition);
    border-radius: inherit;
}

.nav-link:hover {
    color: var(--primary);
    background: rgba(124, 58, 237, 0.08);
    transform: translateY(-2px);
}

.nav-link.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-primary);
}

.nav-link i {
    font-size: 1rem;
}

/* ===== MAIN CONTENT ===== */
.main-content {
    padding: 2rem 0;
    min-height: calc(100vh - 80px);
}

.main-content>h2 {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

/* ===== CARDS ===== */
.card,
.animal-card,
.dashboard-section,
.empty-state,
.auth-card,
.form-section {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 2rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.card::before,
.animal-card::before,
.dashboard-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0.9;
}

.card:hover,
.animal-card:hover,
.dashboard-section:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    border-color: rgba(124, 58, 237, 0.2);
}

.dashboard-section h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.dashboard-section h3 i {
    color: var(--primary);
    font-size: 1.1rem;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 1.75rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    gap: 0.6rem;
    letter-spacing: 0.01em;
    font-family: var(--font-sans);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(255, 255, 255, 0.2), transparent);
    opacity: 0;
    transition: var(--transition);
}

.btn:hover::before {
    opacity: 1;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-primary);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 32px rgba(124, 58, 237, 0.45);
}

.btn-secondary {
    background: white;
    color: var(--text-primary);
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    background: var(--bg-elevated);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-info {
    background: #eff6ff;
    color: var(--info);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.btn-info:hover {
    background: var(--info);
    color: white;
    border-color: var(--info);
}

.btn-success {
    background: #ecfdf5;
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.btn-success:hover {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: #fef2f2;
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    background: var(--danger);
    color: white;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

/* ===== FORMS ===== */
input,
select,
textarea {
    width: 100%;
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    border: 1px solid #e2e8f0;
    background: white;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    margin-bottom: 1.25rem;
    color: var(--text-primary);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1);
    transform: translateY(-1px);
}

label {
    display: block;
    margin-bottom: 0.6rem;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 3rem;
}

/* ===== ANIMAL SELECTOR ===== */
.animal-selector {
    margin-bottom: 2rem;
}

.animal-selector h2 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.animal-list select {
    margin-bottom: 0;
}

.header-actions {
    margin-top: 1rem;
}

/* ===== ANIMAL CARD ===== */
.animal-info {
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

.animal-photo,
.animal-photo-placeholder {
    width: 120px;
    height: 120px;
    border-radius: var(--radius-lg);
    object-fit: cover;
    border: 3px solid var(--primary);
    box-shadow: var(--shadow-primary);
    transition: var(--transition);
}

.animal-photo-placeholder {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 2.5rem;
}

.animal-card:hover .animal-photo,
.animal-card:hover .animal-photo-placeholder {
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(124, 58, 237, 0.4);
}

.animal-details {
    flex: 1;
    min-width: 250px;
}

.animal-details h3 {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.animal-details p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.5rem;
}

.animal-details p i {
    color: var(--primary);
    width: 20px;
    text-align: center;
}

.animal-details p strong {
    color: var(--text-primary);
    font-weight: 600;
    min-width: 110px;
}

.animal-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

/* ===== RECORD ITEMS ===== */
.records-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.record-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    background: white;
    border-radius: var(--radius);
    transition: var(--transition);
    border: 1px solid #f1f5f9;
    gap: 1rem;
    box-shadow: var(--shadow-xs);
}

.record-item:hover {
    background: #fafbfc;
    border-color: rgba(124, 58, 237, 0.2);
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}

.record-info {
    flex: 1;
}

.record-info strong {
    display: block;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.record-date,
.record-last,
.record-next,
.record-dosage {
    color: var(--text-secondary);
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.record-last i,
.record-next i {
    font-size: 0.8rem;
}

.record-actions {
    display: flex;
    gap: 0.5rem;
}

.record-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--success);
    font-weight: 600;
    font-size: 0.875rem;
}

/* ===== ALERTS & REMINDERS ===== */
.alerts-section {
    margin-bottom: 1.5rem;
}

.alerts-section h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--warning);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.reminders-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.reminder-item {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    background: #fef3c7;
    border: 1px solid #fbbf24;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.reminder-item.alert-warning {
    color: #92400e;
}

.reminder-content strong {
    color: #b45309;
    font-weight: 700;
}

.reminder-content p {
    color: #78350f;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* ===== GRID LAYOUTS ===== */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.animal-card-grid {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: var(--glass-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow);
}

.animal-card-grid:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.animal-card-grid img,
.animal-card-grid .animal-photo-placeholder {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid #f1f5f9;
}

.card-content {
    padding: 1.5rem;
    flex-grow: 1;
}

.card-content h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
}

.card-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0.25rem 0;
}

.card-actions {
    padding: 1.25rem;
    display: flex;
    gap: 0.75rem;
    background: rgba(248, 250, 252, 0.8);
    border-top: 1px solid #f1f5f9;
}

.card-actions .btn {
    flex: 1;
    padding: 0.6rem;
    font-size: 0.85rem;
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-state h2 {
    font-size: 1.75rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.empty-state p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.empty-state a {
    color: var(--primary);
    font-weight: 600;
}

.empty-state a:hover {
    text-decoration: underline;
}

.no-data,
.no-animals {
    color: var(--text-muted);
    font-style: italic;
    padding: 1rem 0;
}

/* ===== MOBILE NAV ===== */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    padding: 0.75rem 1rem;
    z-index: 1000;
    justify-content: space-around;
    box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.08);
}

.mobile-nav::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    opacity: 0.5;
}

.mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 600;
    gap: 0.35rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    transition: var(--transition);
}

.mobile-nav-item i {
    font-size: 1.35rem;
}

.mobile-nav-item.active {
    color: var(--primary);
    background: rgba(124, 58, 237, 0.1);
}

.mobile-nav-item:hover {
    color: var(--primary);
}

/* ===== CALENDAR ===== */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #e2e8f0;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.calendar-day-header {
    background: var(--gradient-primary);
    color: white;
    padding: 1rem 0.5rem;
    text-align: center;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.calendar-day {
    background: white;
    padding: 0.75rem;
    min-height: 120px;
    position: relative;
    transition: var(--transition);
}

.calendar-day:hover {
    background: #fafbfc;
}

.calendar-day.empty {
    background: #f8fafc;
    opacity: 0.6;
}

.calendar-day.today {
    background: #fef3c7;
    border: 2px solid var(--warning);
}

.calendar-day.today .day-number {
    background: var(--warning);
    color: white;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
}

.day-number {
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.event-pill {
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
    margin-bottom: 0.3rem;
    color: white;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
}

.event-pill:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-sm);
}

/* ===== HISTORY TIMELINE ===== */
.history-timeline {
    position: relative;
    padding: 1rem 0;
}

.history-timeline::before {
    content: '';
    position: absolute;
    left: 21px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--primary) 0%, var(--secondary) 100%);
    opacity: 0.3;
}

.history-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    transition: var(--transition);
}

.history-item:hover {
    transform: translateX(8px);
}

.history-marker {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
    z-index: 2;
    color: var(--primary);
    font-size: 1.1rem;
    flex-shrink: 0;
    border: 2px solid var(--primary);
    transition: var(--transition);
}

.history-item:hover .history-marker {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-primary);
}

.history-item[data-type="vaccination"] .history-marker {
    color: #a78bfa;
    border-color: #8b5cf6;
}

.history-item[data-type="vaccination"]:hover .history-marker {
    background: #8b5cf6;
    color: white;
}

.history-item[data-type="deworming"] .history-marker {
    color: var(--success);
    border-color: var(--success);
}

.history-item[data-type="deworming"]:hover .history-marker {
    background: var(--success);
    color: white;
}

.history-item[data-type="medication"] .history-marker {
    color: var(--info);
    border-color: var(--info);
}

.history-item[data-type="medication"]:hover .history-marker {
    background: var(--info);
    color: white;
}

.history-content {
    flex-grow: 1;
    background: white;
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius);
    border: 1px solid #f1f5f9;
    transition: var(--transition);
    box-shadow: var(--shadow-xs);
}

.history-item:hover .history-content {
    background: #fafbfc;
    border-color: rgba(124, 58, 237, 0.2);
    box-shadow: var(--shadow-sm);
}

.history-content h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.history-content p.date {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.history-content .subtext {
    background: var(--bg-elevated);
    display: inline-block;
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    border: 1px solid #e2e8f0;
}

.history-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px dashed #e2e8f0;
    font-size: 0.85rem;
}

.history-details p {
    margin: 0;
    color: var(--text-secondary);
}

.history-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    justify-content: flex-end;
}

/* ===== FILTER TABS ===== */
.filter-tabs {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 2rem;
    overflow-x: auto;
    padding: 0.25rem;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.filter-tabs::-webkit-scrollbar {
    display: none;
}

.tab-button {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-full);
    border: 1px solid #e2e8f0;
    background: white;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
}

.tab-button:hover {
    background: var(--bg-elevated);
    border-color: var(--primary);
    color: var(--primary);
}

.tab-button.active {
    background: var(--gradient-primary);
    color: white;
    border-color: transparent;
    box-shadow: var(--shadow-primary);
}

/* ===== TABLES ===== */
.w-100 {
    width: 100% !important;
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 1rem 0;
    border-radius: var(--radius);
    overflow: hidden;
}

.table th {
    text-align: left;
    padding: 1.25rem;
    background: var(--bg-elevated);
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #e2e8f0;
}

.table td {
    padding: 1.25rem;
    border-bottom: 1px solid #f1f5f9;
    color: var(--text-primary);
    vertical-align: middle;
    background: white;
}

.table tr:last-child td {
    border-bottom: none;
}

.table tr:hover td {
    background: #fafbfc;
}

.badge {
    padding: 0.4rem 0.85rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
}

/* ===== ANIMATIONS ===== */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.dashboard-section,
.animal-card,
.history-item {
    animation: slideUp 0.5s ease-out forwards;
}

.dashboard-section:nth-child(1) {
    animation-delay: 0.05s;
}

.dashboard-section:nth-child(2) {
    animation-delay: 0.1s;
}

.dashboard-section:nth-child(3) {
    animation-delay: 0.15s;
}

.dashboard-section:nth-child(4) {
    animation-delay: 0.2s;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .nav-menu {
        display: none;
    }

    .header {
        padding: 1rem;
    }
}

@media (max-width: 768px) {
    body {
        padding-bottom: 80px;
    }

    .container {
        padding: 0 1rem;
    }

    .header {
        justify-content: center;
    }

    .header h1 {
        font-size: 1.35rem;
    }

    .mobile-nav {
        display: flex;
    }

    .card,
    .animal-card,
    .dashboard-section,
    .auth-card {
        padding: 1.5rem;
        margin-bottom: 1rem;
    }

    .animal-info {
        flex-direction: column;
        text-align: center;
    }

    .animal-details {
        min-width: unset;
    }

    .animal-details p {
        justify-content: center;
    }

    .animal-actions {
        justify-content: center;
    }

    .record-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .record-actions {
        width: 100%;
    }

    .record-actions .btn {
        flex: 1;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .main-content {
        padding: 1rem 0;
    }
}

@media (max-width: 600px) {
    .calendar-day {
        min-height: 60px;
        padding: 0.4rem;
    }

    .calendar-day-header {
        padding: 0.5rem 0.25rem;
        font-size: 0.65rem;
    }

    .day-number {
        font-size: 0.75rem;
    }

    .event-pill span {
        display: none;
    }

    .event-pill {
        height: 8px;
        padding: 0;
        border-radius: var(--radius-full);
        width: 8px;
        display: inline-block;
        margin-right: 2px;
    }

    .history-timeline::before {
        left: 16px;
    }

    .history-item {
        gap: 1rem;
    }

    .history-marker {
        width: 34px;
        height: 34px;
        font-size: 0.9rem;
    }

    .history-content {
        padding: 1rem;
    }
}

/* ===== UTILITIES ===== */
.text-primary {
    color: var(--primary) !important;
}

.text-success {
    color: var(--success) !important;
}

.text-warning {
    color: var(--warning) !important;
}

.text-danger {
    color: var(--danger) !important;
}

.text-info {
    color: var(--info) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

.bg-success {
    background: #ecfdf5 !important;
}

.bg-warning {
    background: #fef3c7 !important;
}

.bg-danger {
    background: #fef2f2 !important;
}

.bg-info {
    background: #eff6ff !important;
}

.mt-1 {
    margin-top: 0.5rem;
}

.mt-2 {
    margin-top: 1rem;
}

.mt-3 {
    margin-top: 1.5rem;
}

.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 1.5rem;
}

.text-center {
    text-align: center;
}

.flex {
    display: flex;
}

.flex-wrap {
    flex-wrap: wrap;
}

.gap-1 {
    gap: 0.5rem;
}

.gap-2 {
    gap: 1rem;
}

.gap-3 {
    gap: 1.5rem;
}

/* ===== FORM STYLES ===== */
.form-section {
    position: relative;
}

.form-section h3 {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.form-section h3 i {
    color: var(--primary);
}

.form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

/* Fieldset styles */
fieldset {
    border: none;
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    background: rgba(248, 250, 252, 0.3);
}

legend {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    padding: 0 0.75rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Radio button groups */
.form-group label input[type=radio] {
    width: auto;
    margin-right: 0.5rem;
    margin-bottom: 0;
    padding: 0;
}

.form-group label:has(input[type=radio]) {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.form-group label:has(input[type=radio]):hover {
    background: #f8fafc;
    border-color: var(--primary);
}

.form-group label:has(input[type=radio]:checked) {
    background: rgba(124, 58, 237, 0.08);
    border-color: var(--primary);
    color: var(--primary);
    font-weight: 600;
}

/* Form actions */
.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid #f1f5f9;
}

.form-actions .btn {
    flex: 1;
}

/* Alert styles */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert::before {
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 1.25rem;
}

.alert-success {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.alert-success::before {
    content: '\\f058';
    color: #10b981;
}

.alert-error {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.alert-error::before {
    content: '\\f06a';
    color: #ef4444;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fbbf24;
}

.alert-warning::before {
    content: '\\f071';
    color: #f59e0b;
}

.alert-info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

.alert-info::before {
    content: '\\f05a';
    color: #3b82f6;
}

/* File input styling */
input[type=file] {
    padding: 0.75rem;
    border: 2px dashed #e2e8f0;
    background: #f8fafc;
    cursor: pointer;
}

input[type=file]:hover {
    border-color: var(--primary);
    background: rgba(124, 58, 237, 0.05);
}

input[type=file]:focus {
    border-style: solid;
}

/* Responsive form styles */
@media (max-width: 768px) {
    .form-section {
        padding: 1.5rem;
    }

    .form-actions {
        flex-direction: column;
    }

    fieldset {
        border: none;
        border-radius: var(--radius);
        padding: 1.5rem;
        margin-bottom: 1.5rem;
        background: rgba(248, 250, 252, 0.3);
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Dodatkowe poprawki dla �adniejszych formularzy */
.form-section {
    box-shadow: var(--shadow);
}

.form-section::before {
    opacity: 1;
}

fieldset {
    box-shadow: none !important;
    border: none !important;
}

legend {
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

/* Usu� outline z focusowanych element�w */
input:focus,
select:focus,
textarea:focus,
button:focus {
    outline: none !important;
}

/* �adniejsze radio buttons */
input[type="radio"] {
    accent-color: var(--primary);
    width: 18px;
    height: 18px;
}

/* Style dla bie��cego zdj�cia w formularzu edycji */
.current-photo {
    margin-bottom: 1rem;
    text-align: center;
}

.current-photo img {
    max-width: 200px !important;
    max-height: 200px !important;
    width: 200px !important;
    height: 200px !important;
    object-fit: cover !important;
    border-radius: var(--radius) !important;
    border: 3px solid var(--primary) !important;
    box-shadow: var(--shadow) !important;
    display: block !important;
    margin: 0 auto !important;
}

/* Style dla bieżącego zdjęcia w formularzu edycji */
.form-group .current-photo {
    margin-bottom: 1rem;
    text-align: center;
}

.form-group .current-photo img {
    max-width: 200px !important;
    max-height: 200px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain !important;
    border-radius: 16px !important;
    border: 3px solid #7c3aed !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1) !important;
    display: block !important;
    margin: 0 auto 1rem auto !important;
}

.form-group .current-photo p {
    margin-top: 0.5rem;
    color: #475569;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
}
/* Photo upload options & Camera integration */
.photo-upload-options {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.photo-upload-options .btn {
    flex: 1;
    min-width: 150px;
}

#cameraControls {
    display: flex;
    justify-content: center;
}

#photoPreview img {
    display: block;
    margin: 0 auto;
}
