/**
 * Professional Design System for Petcard
 * Modern, clean, business-focused aesthetic
 * Optimized for professional animal therapy practice management
 */

/* ============================================
   CSS VARIABLES - Professional Color Palette
   ============================================ */
:root {
    /* Primary Colors - Professional Blue/Gray */
    --primary-50: #F0F4F8;
    --primary-100: #D9E2EC;
    --primary-200: #BCCCDC;
    --primary-300: #9FB3C8;
    --primary-400: #829AB1;
    --primary-500: #627D98;
    --primary-600: #486581;
    --primary-700: #334E68;
    --primary-800: #243B53;
    --primary-900: #102A43;

    /* Accent Colors */
    --accent-blue: #2C5282;
    --accent-teal: #0D9488;
    --accent-green: #047857;
    --accent-orange: #C05621;
    --accent-red: #C53030;

    /* Neutral Grays */
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;

    /* Semantic Colors */
    --success: #047857;
    --warning: #D97706;
    --error: #DC2626;
    --info: #0284C7;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Plus Jakarta Sans', 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', monospace;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;

    /* Shadows */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   BASE STYLES
   ============================================ */
body {
    font-family: var(--font-sans);
    color: var(--gray-800);
    background-color: var(--gray-50);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.2;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

/* ============================================
   NAVIGATION
   ============================================ */
.navbar {
    background: linear-gradient(135deg, var(--primary-800) 0%, var(--primary-700) 100%);
    box-shadow: var(--shadow-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.navbar-brand {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.5rem;
    color: white !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    transition: all var(--transition-base);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
}

.navbar .nav-link:hover {
    color: white !important;
    background-color: rgba(255, 255, 255, 0.1);
}

.navbar .badge {
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    padding: 0.375rem 0.75rem;
    font-weight: 600;
    font-size: 0.875rem;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    background: white;
    border-right: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
}

.sidebar .nav-link {
    color: var(--gray-700);
    font-weight: 500;
    padding: 0.75rem 1rem;
    margin: 0.25rem 0.5rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar .nav-link:hover {
    background-color: var(--gray-100);
    color: var(--primary-700);
}

.sidebar .nav-link.active {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
    color: white;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.sidebar .nav-link i {
    font-size: 1.25rem;
    width: 1.5rem;
    text-align: center;
}

/* ============================================
   CARDS
   ============================================ */
.card {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    background: white;
    transition: all var(--transition-base);
    overflow: hidden;
}

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

.card-header {
    background: linear-gradient(135deg, var(--gray-50) 0%, white 100%);
    border-bottom: 2px solid var(--gray-200);
    font-weight: 700;
    color: var(--gray-900);
    padding: 1.25rem 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
    padding: 1rem 1.5rem;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    font-weight: 600;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    border: none;
    box-shadow: var(--shadow-xs);
    font-size: 0.9375rem;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

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

.btn-primary {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-700) 0%, var(--primary-800) 100%);
}

.btn-secondary {
    background: white;
    color: var(--gray-700);
    border: 2px solid var(--gray-300);
}

.btn-secondary:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
    color: var(--gray-900);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--error) 0%, #B91C1C 100%);
    color: white;
}

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

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

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1.125rem;
}

/* ============================================
   FORMS
   ============================================ */
.form-control,
.form-select {
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-md);
    padding: 0.625rem 1rem;
    font-size: 0.9375rem;
    transition: all var(--transition-base);
    background-color: white;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-600);
    box-shadow: 0 0 0 3px rgba(72, 101, 129, 0.1);
    outline: none;
}

.form-label {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    font-size: 0.9375rem;
}

.form-text {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.invalid-feedback {
    color: var(--error);
    font-size: 0.875rem;
}

/* ============================================
   TABLES
   ============================================ */
.table {
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    background: linear-gradient(135deg, var(--gray-50) 0%, white 100%);
    color: var(--gray-900);
    font-weight: 700;
    padding: 1rem 1.25rem;
    border-bottom: 2px solid var(--gray-200);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table tbody tr {
    transition: all var(--transition-base);
    border-bottom: 1px solid var(--gray-200);
}

.table tbody tr:hover {
    background-color: var(--gray-50);
}

.table tbody td {
    padding: 1rem 1.25rem;
    color: var(--gray-700);
    vertical-align: middle;
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8125rem;
    letter-spacing: 0.025em;
}

.badge.bg-success {
    background-color: var(--success) !important;
}

.badge.bg-warning {
    background-color: var(--warning) !important;
}

.badge.bg-danger {
    background-color: var(--error) !important;
}

.badge.bg-info {
    background-color: var(--info) !important;
}

.badge.bg-primary {
    background-color: var(--primary-600) !important;
}

.badge.bg-secondary {
    background-color: var(--gray-500) !important;
}

/* ============================================
   STATS CARDS (DASHBOARD)
   ============================================ */
.stat-card {
    border-left: 4px solid var(--primary-600);
    transition: all var(--transition-base);
}

.stat-card:hover {
    border-left-width: 6px;
    transform: translateX(2px);
}

.stat-card .card-body {
    padding: 1.5rem;
}

.stat-card .text-xs {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-600);
}

.stat-card .h5 {
    font-size: 2rem;
    font-weight: 800;
    color: var(--gray-900);
    font-family: var(--font-display);
}

.stat-card i {
    opacity: 0.85;
}

/* ============================================
   ALERTS
   ============================================ */
.alert {
    border-radius: var(--radius-lg);
    border: none;
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-sm);
}

.alert-success {
    background-color: #D1FAE5;
    color: #065F46;
}

.alert-warning {
    background-color: #FEF3C7;
    color: #92400E;
}

.alert-danger {
    background-color: #FEE2E2;
    color: #991B1B;
}

.alert-info {
    background-color: #DBEAFE;
    color: #1E40AF;
}

/* ============================================
   LIST GROUPS
   ============================================ */
.list-group-item {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
    transition: all var(--transition-base);
}

.list-group-item:hover {
    background-color: var(--gray-50);
    transform: translateX(4px);
}

.list-group-item-action:active {
    background-color: var(--primary-50);
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination .page-link {
    color: var(--primary-600);
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-md);
    margin: 0 0.25rem;
    font-weight: 600;
    transition: all var(--transition-base);
}

.pagination .page-link:hover {
    background-color: var(--primary-50);
    border-color: var(--primary-600);
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-700) 100%);
    border-color: var(--primary-600);
}

/* ============================================
   TOOLTIPS & POPOVERS
   ============================================ */
.tooltip-inner {
    background-color: var(--gray-900);
    border-radius: var(--radius-md);
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

/* ============================================
   BREADCRUMBS
   ============================================ */
.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 1.5rem;
}

.breadcrumb-item {
    color: var(--gray-600);
    font-size: 0.9375rem;
}

.breadcrumb-item.active {
    color: var(--gray-900);
    font-weight: 600;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--gray-400);
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    background: linear-gradient(135deg, var(--gray-100) 0%, white 100%);
    border-top: 2px solid var(--gray-200);
    color: var(--gray-600);
}

footer a {
    color: var(--gray-700);
    text-decoration: none;
    transition: color var(--transition-base);
    font-weight: 500;
}

footer a:hover {
    color: var(--primary-600);
}

/* ============================================
   UTILITIES
   ============================================ */
.text-primary {
    color: var(--primary-600) !important;
}

.text-muted {
    color: var(--gray-500) !important;
}

.bg-light {
    background-color: var(--gray-50) !important;
}

.border-top,
.border-bottom,
.border-start,
.border-end {
    border-color: var(--gray-200) !important;
}

/* ============================================
   LOADING STATES
   ============================================ */
.spinner-border {
    border-color: var(--primary-200);
    border-right-color: var(--primary-600);
}

/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */
@media (max-width: 768px) {
    h1 { font-size: 1.875rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }

    .card-body {
        padding: 1.25rem;
    }

    .table thead th,
    .table tbody td {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn var(--transition-base) ease-out;
}

/* ============================================
   FOCUS VISIBLE (ACCESSIBILITY)
   ============================================ */
*:focus-visible {
    outline: 2px solid var(--primary-600);
    outline-offset: 2px;
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .sidebar,
    .navbar,
    footer,
    .btn {
        display: none !important;
    }

    body {
        background: white;
    }

    .card {
        box-shadow: none;
        border: 1px solid var(--gray-300);
    }
}
