/* Showsafe Breeding Manager Pro - Responsive Web App CSS */

:root {
    /* Colors */
    --primary: #be185d;
    --primary-dark: #9d174d;
    --primary-light: #f472b6;
    --secondary: #7c3aed;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;

    /* Neutrals */
    --white: #ffffff;
    --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;

    /* Layout */
    --header-height: 60px;
    --bottom-nav-height: 70px;
    --side-nav-width: 250px;
    --side-nav-collapsed: 70px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.1);

    /* Borders */
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Transitions */
    --transition: all 0.2s ease;
}

/* Dark Mode */
[data-theme="dark"] {
    --white: #1f2937;
    --gray-50: #111827;
    --gray-100: #1f2937;
    --gray-200: #374151;
    --gray-300: #4b5563;
    --gray-400: #6b7280;
    --gray-500: #9ca3af;
    --gray-600: #d1d5db;
    --gray-700: #e5e7eb;
    --gray-800: #f3f4f6;
    --gray-900: #f9fafb;
}

/* Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--gray-100);
    color: var(--gray-800);
    line-height: 1.5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Splash Screen */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.splash-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.splash-content {
    text-align: center;
    color: white;
}

.splash-logo {
    width: 280px;
    height: 280px;
    object-fit: contain;
    margin-bottom: 0.25rem;
    border-radius: 32px;
}

.splash-content h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

.splash-loader {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    margin: 0 auto;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Auth Screen */
.auth-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
    max-width: 400px;
    margin: 0 auto;
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo {
    width: 240px;
    height: 240px;
    object-fit: contain;
    margin-bottom: 0.25rem;
    border-radius: 32px;
}

.auth-header h1 {
    font-size: 1.5rem;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--gray-500);
    font-size: 0.9rem;
}

.auth-form {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.auth-switch {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--gray-500);
}

.auth-switch a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.auth-legal {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
    text-align: center;
    font-size: 0.8125rem;
    color: var(--gray-500);
    line-height: 1.6;
}

.auth-legal a {
    color: var(--primary);
    text-decoration: none;
}

.auth-legal a:hover {
    text-decoration: underline;
}

.demo-access {
    margin-top: 1.5rem;
}

/* Form Elements */
.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="date"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    background: var(--white);
    color: var(--gray-800);
    transition: var(--transition);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(190, 24, 93, 0.1);
}

/* Password Input with Toggle */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    padding-right: 3rem;
}

.password-toggle {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    color: var(--gray-500);
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.password-toggle:hover {
    color: var(--primary);
}

.password-toggle i {
    font-size: 1.1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--gray-300);
    color: var(--gray-700);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

/* Trial/Subscription Banners */
.trial-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    z-index: 100;
}

.trial-banner span {
    flex: 1;
}

.trial-banner .btn {
    flex-shrink: 0;
}

.trial-info {
    background: linear-gradient(90deg, var(--primary-light), var(--primary));
    color: white;
}

.trial-info .btn-outline {
    color: white;
    border-color: rgba(255,255,255,0.5);
}

.trial-info .btn-outline:hover {
    background: rgba(255,255,255,0.2);
}

.trial-warning {
    background: linear-gradient(90deg, #f59e0b, #d97706);
    color: white;
}

.trial-expired {
    background: linear-gradient(90deg, #ef4444, #dc2626);
    color: white;
}

.trial-expired .btn-primary {
    background: white;
    color: #dc2626;
}

.trial-expired .btn-primary:hover {
    background: #fef2f2;
}

/* Tier badges */
.tier-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.tier-trial {
    background: var(--primary-light);
    color: var(--primary);
}

.tier-expired {
    background: #fef2f2;
    color: #dc2626;
}

.tier-breeder {
    background: #dbeafe;
    color: #1d4ed8;
}

.tier-farm {
    background: #d1fae5;
    color: #059669;
}

.tier-pro {
    background: linear-gradient(90deg, #8b5cf6, #6366f1);
    color: white;
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    background: transparent;
    color: var(--gray-600);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: var(--transition);
    position: relative;
}

.btn-icon:hover {
    background: var(--gray-200);
}

/* App Header */
.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1rem;
    z-index: 100;
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 9px;
    background: var(--danger);
    color: white;
    position: absolute;
    top: 2px;
    right: 2px;
}

.badge-success {
    background: var(--success);
    color: white;
    position: static;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
}

.badge-primary {
    background: var(--primary);
    color: white;
    position: static;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
}

.badge-warning {
    background: var(--warning);
    color: #1f2937;
    position: static;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
}

.badge-info {
    background: #3b82f6;
    color: white;
    position: static;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
}

/* Side Navigation */
.side-nav {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--side-nav-width);
    background: var(--white);
    border-right: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transform: translateX(-100%);
    transition: var(--transition);
}

.side-nav.open {
    transform: translateX(0);
}

.nav-header {
    padding: 0.4rem 0.6rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.nav-logo {
    width: 79px;
    height: 79px;
    object-fit: contain;
    border-radius: 8px;
}

.nav-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    line-height: 1.2;
}

.nav-menu {
    list-style: none;
    padding: 0.15rem 0;
    flex: 1;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.7rem 1.1rem;
    color: var(--gray-600);
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.035rem;
}

.nav-item i {
    font-size: 1.08rem;
    width: 20px;
}

.nav-item:hover {
    background: var(--gray-100);
    color: var(--primary);
}

.nav-item.active {
    background: rgba(190, 24, 93, 0.1);
    color: var(--primary);
    border-right: 3px solid var(--primary);
}

.nav-item i {
    font-size: 1.38rem;
    width: 26px;
}

.nav-footer {
    margin-top: auto;
    border-top: 1px solid var(--gray-200);
}

/* Main Content */
.main-content {
    margin-top: var(--header-height);
    margin-bottom: var(--bottom-nav-height);
    padding: 1.5rem;
    min-height: calc(100vh - var(--header-height) - var(--bottom-nav-height));
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-nav-height);
    background: var(--white);
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding-bottom: env(safe-area-inset-bottom, 0);
    z-index: 100;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    color: var(--gray-500);
    font-size: 0.7rem;
    cursor: pointer;
    transition: var(--transition);
}

.bottom-nav-item i {
    font-size: 1.5rem;
}

.bottom-nav-item.active {
    color: var(--primary);
}

/* Pages */
.page {
    display: none;
}

.page.active {
    display: block;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.page-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.pink { background: rgba(190, 24, 93, 0.1); color: var(--primary); }
.stat-icon.purple { background: rgba(124, 58, 237, 0.1); color: var(--secondary); }
.stat-icon.green { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.stat-icon.orange { background: rgba(245, 158, 11, 0.1); color: var(--warning); }

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
}

.stat-label {
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* Cards */
.card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1rem;
    overflow: hidden;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--gray-100);
}

.card-header h2,
.card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-900);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-body {
    padding: 1.25rem;
}

/* Filter Tabs */
.filter-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.filter-tab {
    padding: 0.625rem 1.25rem;
    border: none;
    background: var(--gray-200);
    color: var(--gray-600);
    border-radius: var(--radius-xl);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: var(--transition);
}

.filter-tab.active {
    background: var(--primary);
    color: white;
}

/* Horse Cards Grid */
.horses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.horse-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: var(--transition);
}

.horse-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.horse-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.horse-avatar {
    width: 50px;
    height: 50px;
    border-radius: var(--radius-sm);
    background: var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
}

.horse-avatar.mare { background: rgba(244, 114, 182, 0.2); }
.horse-avatar.stallion { background: rgba(59, 130, 246, 0.2); }

.horse-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-900);
}

.horse-breed {
    font-size: 0.8rem;
    color: var(--gray-500);
}

.horse-details {
    display: flex;
    gap: 1.5rem;
    font-size: 0.85rem;
    color: var(--gray-600);
}

/* Pregnancy Card */
.pregnancy-card {
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-bottom: 0.75rem;
}

.pregnancy-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.pregnancy-mare {
    font-weight: 600;
    color: var(--gray-900);
}

.pregnancy-status {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-xl);
    font-size: 0.75rem;
    font-weight: 500;
}

.pregnancy-status.confirmed { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.pregnancy-status.unknown { background: rgba(245, 158, 11, 0.1); color: var(--warning); }

.pregnancy-progress {
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.pregnancy-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 4px;
    transition: width 0.5s ease;
}

.pregnancy-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--gray-500);
}

/* Milestone List */
.milestone-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-100);
}

.milestone-item:last-child {
    border-bottom: none;
}

.milestone-date {
    min-width: 50px;
    text-align: center;
}

.milestone-day {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.milestone-month {
    font-size: 0.7rem;
    color: var(--gray-500);
    text-transform: uppercase;
}

.milestone-info h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
}

.milestone-info p {
    font-size: 0.8rem;
    color: var(--gray-500);
}

/* Calculator */
.calculator-container {
    max-width: 600px;
    margin: 0 auto;
}

.calc-results {
    margin-top: 1.5rem;
}

.calc-status {
    background: var(--white);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.calc-day {
    font-size: 4rem;
    font-weight: 700;
    color: var(--primary);
}

.calc-due {
    font-size: 1rem;
    color: var(--gray-600);
    margin-top: 0.5rem;
}

.calc-progress {
    margin: 1.5rem 0;
}

.calc-progress-bar {
    height: 12px;
    background: var(--gray-200);
    border-radius: 6px;
    overflow: hidden;
}

.calc-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 6px;
}

.calc-progress-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* Settings */
.settings-list .card {
    margin-bottom: 1rem;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--gray-100);
    border-radius: var(--radius-sm);
    margin: 0.25rem 0;
    cursor: pointer;
    transition: var(--transition);
}

.setting-item:hover {
    background: var(--gray-50);
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-item.sub-setting {
    padding-left: 1.5rem;
    background: var(--gray-50);
}

.setting-item.sub-setting:hover {
    background: var(--gray-100);
}

.setting-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.setting-info span {
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.setting-info small {
    color: var(--gray-500);
    font-size: 0.8rem;
}

.setting-master {
    background: linear-gradient(135deg, var(--primary-light) 0%, transparent 100%);
    border: 2px solid var(--primary);
    border-radius: var(--radius);
    padding: 1rem;
}

.setting-master:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-light) 100%);
}

.setting-group {
    margin: 1rem 0;
}

.setting-group-header {
    font-weight: 600;
    color: var(--gray-600);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.5rem 0;
    border-bottom: 2px solid var(--gray-200);
    margin-bottom: 0.5rem;
}

/* Toggle Switch */
.toggle {
    position: relative;
    display: inline-block;
    width: 54px;
    height: 30px;
    flex-shrink: 0;
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gray-400);
    border: 2px solid var(--gray-500);
    border-radius: 30px;
    transition: all 0.3s ease;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 2px;
    bottom: 2px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Hover state */
.toggle:hover .toggle-slider {
    border-color: var(--gray-600);
}

.toggle:hover .toggle-slider:before {
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* Focus state for accessibility */
.toggle input:focus + .toggle-slider {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Checked state - green for ON */
.toggle input:checked + .toggle-slider {
    background: #10b981;
    border-color: #059669;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.toggle input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

/* Unchecked state - subtle red/gray for OFF */
.toggle-slider {
    background: #9ca3af;
    border-color: #6b7280;
}

/* Dark mode adjustments */
[data-theme="dark"] .toggle-slider {
    background: #4b5563;
    border-color: #6b7280;
}

[data-theme="dark"] .toggle input:checked + .toggle-slider {
    background: #10b981;
    border-color: #059669;
}

[data-theme="dark"] .setting-item.sub-setting {
    background: var(--gray-100);
}

[data-theme="dark"] .setting-item.sub-setting:hover {
    background: var(--gray-200);
}

/* Loading Placeholder */
.loading-placeholder {
    text-align: center;
    padding: 2rem;
    color: var(--gray-500);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--gray-500);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.1rem;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

/* Toast Notifications */
#toast-container {
    position: fixed;
    top: calc(var(--header-height) + 1rem);
    right: 1rem;
    z-index: 99999; /* Higher than any modal */
    max-width: calc(100vw - 2rem);
    pointer-events: none;
}

.toast {
    background: var(--gray-800);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    box-shadow: var(--shadow-lg);
    animation: slideIn 0.3s ease;
    pointer-events: auto;
    max-width: 350px;
    word-wrap: break-word;
}

.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
.toast.info { background: var(--primary); }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Exam Form Styles */
.exam-form .form-section {
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-bottom: 1rem;
}

.exam-form .form-section h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 500px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.mt-1 {
    margin-top: 0.5rem;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 10500;
    animation: fadeIn 0.2s ease;
}

.modal {
    background: var(--white);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.modal-header h3 {
    font-size: 1.125rem;
    font-weight: 600;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--gray-100);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    border-top: 1px solid var(--gray-200);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Desktop Styles */
@media (min-width: 768px) {
    .app-header {
        left: var(--side-nav-width);
    }

    .side-nav {
        transform: translateX(0);
    }

    .main-content {
        margin-left: var(--side-nav-width);
        margin-bottom: 0;
    }

    .bottom-nav {
        display: none;
    }

    #menu-toggle {
        display: none;
    }

    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Large Desktop */
@media (min-width: 1200px) {
    .main-content {
        padding: 2rem 3rem;
    }

    .horses-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ============================================
   NEW FEATURES - Pedigree, Marketplace,
   Messaging, Media Gallery, Semen Lab
   ============================================ */

/* Pedigree Tree Visualization */
.pedigree-container {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.5rem;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.pedigree-tree {
    display: flex;
    justify-content: center;
    min-width: 600px;
    padding: 1rem 0;
}

.pedigree-level {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.5rem;
}

.pedigree-node {
    background: var(--gray-50);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    min-width: 140px;
    max-width: 180px;
    position: relative;
    transition: var(--transition);
}

.pedigree-node:hover {
    border-color: var(--primary);
    transform: scale(1.02);
}

.pedigree-node.subject {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    min-width: 180px;
}

.pedigree-node.sire {
    border-color: var(--info);
    background: rgba(59, 130, 246, 0.05);
}

.pedigree-node.dam {
    border-color: var(--primary-light);
    background: rgba(244, 114, 182, 0.05);
}

.pedigree-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--gray-900);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pedigree-node.subject .pedigree-name {
    color: white;
}

.pedigree-meta {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.pedigree-node.subject .pedigree-meta {
    color: rgba(255,255,255,0.8);
}

.pedigree-connector {
    display: flex;
    align-items: center;
    width: 40px;
}

.pedigree-line {
    width: 100%;
    height: 2px;
    background: var(--gray-300);
}

.pedigree-line-v {
    width: 2px;
    background: var(--gray-300);
}

/* Compatibility Score */
.compatibility-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-xl);
    font-size: 0.875rem;
    font-weight: 600;
}

.compatibility-badge.excellent { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.compatibility-badge.good { background: rgba(59, 130, 246, 0.1); color: var(--info); }
.compatibility-badge.fair { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.compatibility-badge.poor { background: rgba(239, 68, 68, 0.1); color: var(--danger); }

.inbreeding-meter {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
}

.inbreeding-bar {
    flex: 1;
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
}

.inbreeding-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.inbreeding-fill.low { background: var(--success); }
.inbreeding-fill.moderate { background: var(--warning); }
.inbreeding-fill.high { background: var(--danger); }

/* Breeding Suggestions */
.suggestions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.suggestion-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--transition);
}

.suggestion-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.suggestion-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.suggestion-score {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

/* Marketplace Styles */
.marketplace-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--white);
    border-radius: var(--radius);
}

.marketplace-filters select,
.marketplace-filters input {
    padding: 0.625rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    min-width: 140px;
}

.marketplace-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.25rem;
}

.listing-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: var(--transition);
}

.listing-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.listing-image {
    position: relative;
    height: 180px;
    background: var(--gray-200);
    overflow: hidden;
}

.listing-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.listing-image .no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--gray-400);
    font-size: 3rem;
}

.listing-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.25rem 0.75rem;
    background: var(--primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: var(--radius-xl);
    text-transform: uppercase;
}

.listing-save {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
    transition: var(--transition);
}

.listing-save:hover,
.listing-save.saved {
    color: var(--danger);
}

.listing-content {
    padding: 1.25rem;
}

.listing-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.listing-breed {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-bottom: 0.75rem;
}

.listing-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.listing-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: var(--gray-500);
}

.listing-meta span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.featured-badge {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #78350f;
}

/* Listing Detail */
.listing-detail {
    max-width: 1000px;
    margin: 0 auto;
}

.listing-detail-header {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.listing-detail-gallery {
    flex: 1;
}

.listing-detail-info {
    flex: 1;
}

.listing-detail-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.listing-detail-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
}

.listing-contact-form {
    background: var(--gray-50);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-top: 1.5rem;
}

/* Messaging/Chat Styles */
.messages-container {
    display: flex;
    height: calc(100vh - var(--header-height) - var(--bottom-nav-height) - 3rem);
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
}

.conversations-list {
    width: 320px;
    border-right: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
}

.conversations-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.conversations-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.conversations-search {
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--gray-100);
}

.conversations-search input {
    width: 100%;
    padding: 0.625rem 1rem;
    border-radius: var(--radius-xl);
    border: 1px solid var(--gray-200);
    font-size: 0.875rem;
}

.conversation-items {
    flex: 1;
    overflow-y: auto;
}

.conversation-item {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: var(--transition);
    border-bottom: 1px solid var(--gray-100);
}

.conversation-item:hover {
    background: var(--gray-50);
}

.conversation-item.active {
    background: rgba(190, 24, 93, 0.05);
    border-left: 3px solid var(--primary);
}

.conversation-item.unread {
    background: rgba(190, 24, 93, 0.03);
}

.conversation-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--primary-dark);
    flex-shrink: 0;
}

.conversation-info {
    flex: 1;
    min-width: 0;
}

.conversation-name {
    font-weight: 600;
    color: var(--gray-900);
    font-size: 0.95rem;
    margin-bottom: 0.25rem;
}

.conversation-preview {
    font-size: 0.85rem;
    color: var(--gray-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conversation-item.unread .conversation-preview {
    color: var(--gray-700);
    font-weight: 500;
}

.conversation-meta {
    text-align: right;
    font-size: 0.75rem;
    color: var(--gray-400);
}

.conversation-unread-badge {
    display: inline-block;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--primary);
    color: white;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    text-align: center;
    line-height: 20px;
    margin-top: 0.25rem;
}

.chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chat-user-name {
    font-weight: 600;
    color: var(--gray-900);
}

.chat-user-status {
    font-size: 0.8rem;
    color: var(--gray-500);
}

.chat-actions {
    display: flex;
    gap: 0.5rem;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    display: flex;
    gap: 0.75rem;
    max-width: 75%;
}

.message.sent {
    flex-direction: row-reverse;
    margin-left: auto;
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.message-content {
    background: var(--gray-100);
    padding: 0.75rem 1rem;
    border-radius: var(--radius);
    border-top-left-radius: 4px;
}

.message.sent .message-content {
    background: var(--primary);
    color: white;
    border-radius: var(--radius);
    border-top-right-radius: 4px;
}

.message-text {
    font-size: 0.95rem;
    line-height: 1.4;
}

.message-time {
    font-size: 0.7rem;
    color: var(--gray-400);
    margin-top: 0.25rem;
}

.message.sent .message-time {
    color: rgba(255,255,255,0.7);
}

.chat-input-area {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--gray-200);
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
}

.chat-input-area textarea {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    resize: none;
    min-height: 44px;
    max-height: 120px;
    font-size: 0.95rem;
}

.chat-send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: var(--transition);
}

.chat-send-btn:hover {
    background: var(--primary-dark);
}

/* Empty Chat State */
.chat-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
    text-align: center;
    padding: 2rem;
}

.chat-empty i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Media Gallery */
.media-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.media-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--gray-200);
    cursor: pointer;
}

.media-item img,
.media-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.media-item.primary {
    grid-column: span 2;
    grid-row: span 2;
}

.media-item-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.media-item:hover .media-item-overlay {
    opacity: 1;
}

.media-item-actions {
    display: flex;
    gap: 0.5rem;
}

.media-item-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-700);
    transition: var(--transition);
}

.media-item-btn:hover {
    background: white;
    color: var(--primary);
}

.media-primary-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.7rem;
    font-weight: 600;
}

.media-video-badge {
    position: absolute;
    bottom: 0.5rem;
    right: 0.5rem;
    background: rgba(0,0,0,0.7);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-upload-zone {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
}

.media-upload-zone:hover {
    border-color: var(--primary);
    background: rgba(190, 24, 93, 0.02);
}

.media-upload-zone i {
    font-size: 2.5rem;
    color: var(--gray-400);
    margin-bottom: 0.75rem;
}

.media-upload-zone p {
    color: var(--gray-500);
    font-size: 0.9rem;
}

.media-limits {
    font-size: 0.8rem;
    color: var(--gray-400);
    margin-top: 0.5rem;
}

/* Horse Detail Page with Tabs */
.horse-detail-header {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.horse-detail-image {
    width: 200px;
    height: 200px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--gray-200);
    flex-shrink: 0;
}

.horse-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.horse-detail-info {
    flex: 1;
}

.horse-detail-name {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 0.5rem;
}

.horse-detail-tabs {
    display: flex;
    gap: 0.25rem;
    border-bottom: 2px solid var(--gray-200);
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

.horse-detail-tab {
    padding: 0.875rem 1.5rem;
    border: none;
    background: transparent;
    color: var(--gray-500);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    white-space: nowrap;
}

.horse-detail-tab:hover {
    color: var(--gray-700);
}

.horse-detail-tab.active {
    color: var(--primary);
}

.horse-detail-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
}

.horse-tab-content {
    display: none;
}

.horse-tab-content.active {
    display: block;
}

/* Semen Lab Styles */
.semen-collections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1rem;
}

@media (max-width: 360px) {
    .semen-collections-grid {
        grid-template-columns: 1fr;
    }
}

.semen-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

/* Fix inline styles overflow */
.semen-card .semen-stats {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.5rem !important;
}

.semen-card .semen-actions {
    flex-wrap: wrap !important;
    gap: 0.5rem !important;
}

.semen-card .semen-actions .btn {
    flex: 1 1 auto;
    min-width: 70px;
    justify-content: center;
    font-size: 0.75rem !important;
    padding: 0.4rem 0.5rem !important;
}

.semen-card .semen-actions .btn i {
    margin-right: 0.25rem;
}

/* Hide button text on very small cards, show only icons */
@media (max-width: 380px) {
    .semen-card .semen-actions .btn {
        min-width: 40px;
        padding: 0.4rem !important;
    }
    .semen-card .semen-actions .btn i + span,
    .semen-card .semen-actions .btn:not(:has(span)) {
        font-size: 0;
    }
    .semen-card .semen-actions .btn i {
        font-size: 1rem;
        margin-right: 0;
    }
}

.semen-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.semen-stallion {
    font-weight: 600;
    color: var(--gray-900);
    font-size: 1rem;
}

.semen-date {
    font-size: 0.8rem;
    color: var(--gray-500);
}

.semen-quality {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-xl);
    font-size: 0.75rem;
    font-weight: 600;
}

.semen-quality.excellent { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.semen-quality.good { background: rgba(59, 130, 246, 0.1); color: var(--info); }
.semen-quality.fair { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.semen-quality.poor { background: rgba(239, 68, 68, 0.1); color: var(--danger); }

.semen-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-top: 1rem;
}

.semen-stat {
    background: var(--gray-50);
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    text-align: center;
}

.semen-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
}

.semen-stat-label {
    font-size: 0.7rem;
    color: var(--gray-500);
    text-transform: uppercase;
}

/* Inventory Table */
.inventory-table {
    width: 100%;
    border-collapse: collapse;
}

.inventory-table th,
.inventory-table td {
    padding: 0.875rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-100);
}

.inventory-table th {
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.8rem;
    text-transform: uppercase;
    background: var(--gray-50);
}

.inventory-table tbody tr:hover {
    background: var(--gray-50);
}

.inventory-status {
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
}

.inventory-status.available { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.inventory-status.reserved { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.inventory-status.sold { background: rgba(124, 58, 237, 0.1); color: var(--secondary); }
.inventory-status.used { background: rgba(107, 114, 128, 0.1); color: var(--gray-500); }

/* Analytics/Charts */
.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.chart-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.chart-card h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.chart-placeholder {
    height: 200px;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
}

/* More Menu */
.more-menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
}

.more-menu-item {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.5rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.more-menu-item:hover {
    border-color: var(--primary);
}

.more-menu-item i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.more-menu-item span {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--gray-700);
}

/* Notification Badge in Nav */
.nav-item .nav-badge {
    margin-left: auto;
    background: var(--danger);
    color: white;
    padding: 0.125rem 0.5rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
}

/* Quick Action FAB */
.fab-container {
    position: fixed;
    bottom: calc(var(--bottom-nav-height) + 1rem);
    right: 1rem;
    z-index: 95;
}

.fab {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: var(--transition);
}

.fab:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

/* Mobile responsive adjustments */
@media (max-width: 767px) {
    .messages-container {
        flex-direction: column;
    }

    .conversations-list {
        width: 100%;
        height: auto;
        max-height: 40vh;
        border-right: none;
        border-bottom: 1px solid var(--gray-200);
    }

    .conversations-list.hidden {
        display: none;
    }

    .chat-area.hidden {
        display: none;
    }

    .chat-back-btn {
        display: flex;
    }

    .horse-detail-header {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .listing-detail-header {
        flex-direction: column;
    }

    .pedigree-tree {
        min-width: 500px;
    }

    .marketplace-grid {
        grid-template-columns: 1fr;
    }

    .fab-container {
        bottom: calc(var(--bottom-nav-height) + 0.75rem);
        right: 0.75rem;
    }
}

@media (min-width: 768px) {
    .chat-back-btn {
        display: none;
    }

    .fab-container {
        bottom: 2rem;
        right: 2rem;
    }
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton-title {
    height: 1.5rem;
    width: 60%;
    margin-bottom: 0.75rem;
}

.skeleton-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================
   HORSE PROFILE MODAL STYLES
   ============================================ */

/* Full Screen Modal */
.fullscreen-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fullscreen-modal.open {
    opacity: 1;
}

.fullscreen-modal-content {
    width: 95%;
    max-width: 900px;
    max-height: 90vh;
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow-y: auto;
    overflow-x: hidden;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.fullscreen-modal.open .fullscreen-modal-content {
    transform: translateY(0);
}

/* Horse Profile Modal */
.horse-profile-modal {
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.horse-profile-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
}

.horse-profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    flex-shrink: 0;
    border: 3px solid rgba(255, 255, 255, 0.3);
    overflow: hidden;
}

.horse-profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.horse-profile-title {
    flex: 1;
}

.horse-profile-title h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.horse-profile-title p {
    opacity: 0.9;
    font-size: 0.95rem;
}

.horse-profile-title .reg-badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    margin-top: 0.5rem;
}

.horse-profile-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.horse-profile-actions .btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
}

.horse-profile-actions .btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.horse-profile-actions .btn-primary {
    background: white;
    color: var(--primary);
}

.horse-profile-actions .btn-primary:hover {
    background: rgba(255, 255, 255, 0.9);
}

/* Profile Content */
.horse-profile-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
}

.profile-section {
    margin-bottom: 1.5rem;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    padding: 1rem;
}

.profile-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.profile-field {
    background: var(--surface);
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-200);
}

.profile-field label {
    display: block;
    font-size: 0.75rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.profile-field span {
    font-weight: 500;
    color: var(--gray-900);
}

/* Pedigree Tree (Profile) */
.horse-profile-content .pedigree-tree {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.pedigree-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.pedigree-item {
    background: var(--surface);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-200);
    min-width: 120px;
}

.pedigree-item label {
    display: block;
    font-size: 0.7rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pedigree-item span {
    font-weight: 600;
    color: var(--gray-900);
}

.pedigree-item.small {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
}

.pedigree-grandparents {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Status Badges */
.status-badge, .health-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: capitalize;
}

.status-badge.maiden { background: #e0f2fe; color: #0369a1; }
.status-badge.open { background: #dcfce7; color: #15803d; }
.status-badge.cycling { background: #fef3c7; color: #b45309; }
.status-badge.bred { background: #ede9fe; color: #7c3aed; }
.status-badge.in_foal { background: #fce7f3; color: #be185d; }
.status-badge.foaled { background: #d1fae5; color: #047857; }
.status-badge.barren { background: #fee2e2; color: #b91c1c; }
.status-badge.retired { background: #f3f4f6; color: #6b7280; }

.health-badge.excellent { background: #dcfce7; color: #15803d; }
.health-badge.good { background: #dbeafe; color: #1d4ed8; }
.health-badge.fair { background: #fef3c7; color: #b45309; }
.health-badge.poor { background: #fee2e2; color: #b91c1c; }

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.stat-card {
    background: var(--surface);
    padding: 1rem;
    border-radius: var(--radius-sm);
    text-align: center;
    border: 1px solid var(--gray-200);
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-card .stat-label {
    font-size: 0.75rem;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-note {
    text-align: center;
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-top: 0.75rem;
}

/* Stallion Fertility Display */
.fertility-overview {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.conception-rate-display {
    text-align: center;
    padding: 1.5rem 2rem;
    border-radius: var(--radius-md);
    background: var(--surface);
    border: 2px solid var(--gray-200);
}

.conception-rate-display .rate-value {
    font-size: 2.5rem;
    font-weight: 700;
}

.conception-rate-display .rate-label {
    font-size: 0.85rem;
    color: var(--gray-500);
    text-transform: uppercase;
}

.conception-rate-display.excellent { border-color: #22c55e; }
.conception-rate-display.excellent .rate-value { color: #22c55e; }

.conception-rate-display.good { border-color: #3b82f6; }
.conception-rate-display.good .rate-value { color: #3b82f6; }

.conception-rate-display.fair { border-color: #f59e0b; }
.conception-rate-display.fair .rate-value { color: #f59e0b; }

.conception-rate-display.poor { border-color: #ef4444; }
.conception-rate-display.poor .rate-value { color: #ef4444; }

/* Mare/Stallion Section Colors */
.mare-section { border-left: 4px solid #ec4899; }
.stallion-section { border-left: 4px solid #3b82f6; }

/* History Table */
.history-table {
    overflow-x: auto;
}

.history-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.history-table th,
.history-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.history-table th {
    background: var(--gray-100);
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.history-table tr:hover {
    background: var(--gray-50);
}

/* Notes Content */
.notes-content {
    background: var(--surface);
    padding: 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-200);
    white-space: pre-wrap;
    line-height: 1.6;
}

/* Edit Form Styles */
.edit-horse-form .form-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.edit-horse-form .form-section:last-child {
    border-bottom: none;
}

.edit-horse-form .form-section h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 1rem;
}

.edit-horse-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.edit-horse-form .form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.edit-horse-form .form-check input {
    width: 18px;
    height: 18px;
}

/* Horse Card Clickable */
.horse-card {
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.horse-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Responsive */
@media (max-width: 768px) {
    .horse-profile-header {
        flex-direction: column;
        text-align: center;
    }

    .horse-profile-actions {
        width: 100%;
        justify-content: center;
    }

    .profile-grid {
        grid-template-columns: 1fr 1fr;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .edit-horse-form .form-row {
        grid-template-columns: 1fr;
    }

    .pedigree-row {
        flex-direction: column;
    }

    .pedigree-grandparents {
        flex-direction: row;
    }

    .fullscreen-modal-content {
        width: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
}

/* ==========================================
   REPORTS & ANALYTICS STYLES
   ========================================== */

/* Reports Toolbar */
.reports-toolbar {
    background: var(--white);
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}

.date-range-picker {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.date-range-picker .form-group {
    margin-bottom: 0;
    flex: 1;
    min-width: 140px;
}

.date-range-picker label {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-bottom: 0.25rem;
    display: block;
}

.date-range-picker .btn {
    flex-shrink: 0;
}

/* Report Tabs */
.report-tabs {
    margin-bottom: 1.5rem;
    overflow-x: auto;
    scrollbar-width: none;
}

.report-tabs::-webkit-scrollbar {
    display: none;
}

.report-tab-content {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* KPI Grid */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.kpi-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.kpi-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.kpi-icon.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.kpi-icon.primary {
    background: rgba(190, 24, 93, 0.1);
    color: var(--primary);
}

.kpi-icon.warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.kpi-icon.info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info);
}

.kpi-content {
    display: flex;
    flex-direction: column;
}

.kpi-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1;
}

.kpi-label {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
}

.kpi-trend {
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: 0.25rem;
}

.kpi-trend.positive {
    color: var(--success);
}

.kpi-trend.negative {
    color: var(--danger);
}

/* Chart Cards */
.charts-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1rem;
}

.chart-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.chart-card.full-width {
    grid-column: span 2;
}

.chart-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--gray-100);
}

.chart-header h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--gray-800);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.chart-header h3 i {
    color: var(--primary);
}

.chart-body {
    padding: 1rem;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chart-body canvas {
    max-height: 300px;
    width: 100% !important;
}

/* Report Summary Cards */
.report-summary-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.summary-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.25rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--gray-300);
}

.summary-card.success {
    border-left-color: var(--success);
}

.summary-card.primary {
    border-left-color: var(--primary);
}

.summary-card.warning {
    border-left-color: var(--warning);
}

.summary-card.danger {
    border-left-color: var(--danger);
}

.summary-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1;
}

.summary-label {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-top: 0.5rem;
}

/* View Toggle */
.view-toggle {
    display: flex;
    gap: 0.25rem;
    background: var(--gray-100);
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    width: fit-content;
    margin-bottom: 1rem;
}

.view-btn {
    padding: 0.5rem 0.75rem;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    color: var(--gray-500);
    transition: var(--transition);
}

.view-btn:hover {
    color: var(--gray-700);
}

.view-btn.active {
    background: var(--white);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

/* Data Display Views */
.data-display {
    min-height: 200px;
}

.data-display.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.data-display.list-view .data-row {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid var(--gray-100);
    gap: 1rem;
}

.data-display.list-view .data-row:hover {
    background: var(--gray-50);
}

/* Data Table */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-100);
}

.data-table th {
    font-weight: 600;
    color: var(--gray-600);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--gray-50);
}

.data-table tbody tr:hover {
    background: var(--gray-50);
}

.data-table .rating-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.data-table .rating-badge.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.data-table .rating-badge.primary {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info);
}

.data-table .rating-badge.warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.data-table .rating-badge.danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.data-table .rating-badge.secondary {
    background: var(--gray-100);
    color: var(--gray-500);
}

/* Data Table Container for scrolling */
.data-table-container {
    overflow-x: auto;
}

/* Bulk Actions */
.bulk-actions {
    display: flex;
    gap: 0.5rem;
}

/* Data Card (for grid view) */
.data-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1rem;
    transition: var(--transition);
}

.data-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.data-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.data-card-title {
    font-weight: 600;
    color: var(--gray-900);
}

.data-card-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.data-card-stat {
    text-align: center;
    padding: 0.5rem;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
}

.data-card-stat-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
}

.data-card-stat-label {
    font-size: 0.7rem;
    color: var(--gray-500);
}

/* Header Actions */
.page-header .header-actions {
    display: flex;
    gap: 0.5rem;
}

/* Advanced Filters */
.advanced-filters {
    background: var(--white);
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    display: none;
}

.advanced-filters.show {
    display: block;
}

.filter-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-row .form-group {
    flex: 1;
    min-width: 150px;
    margin-bottom: 0;
}

/* Checkbox Selection */
.select-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Mobile Responsive for Reports */
@media (max-width: 1024px) {
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .charts-row {
        grid-template-columns: 1fr;
    }

    .chart-card.full-width {
        grid-column: span 1;
    }

    .report-summary-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .kpi-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .kpi-card {
        padding: 1rem;
    }

    .kpi-icon {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    .kpi-value {
        font-size: 1.5rem;
    }

    .report-summary-cards {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .summary-value {
        font-size: 1.5rem;
    }

    .date-range-picker {
        flex-direction: column;
    }

    .date-range-picker .form-group {
        width: 100%;
    }

    .page-header .header-actions {
        position: absolute;
        right: 1rem;
    }

    .data-table {
        font-size: 0.85rem;
    }

    .data-table th,
    .data-table td {
        padding: 0.5rem;
    }

    .view-toggle {
        margin-left: auto;
        margin-right: auto;
    }
}

/* ===== EXAM TABS & COMPREHENSIVE REPRODUCTIVE UI ===== */
.exam-tabs {
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.exam-tabs .filter-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.exam-tab-content {
    display: none;
}

.exam-tab-content.active {
    display: block;
}

.exam-section-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 992px) {
    .exam-section-grid {
        grid-template-columns: 1fr;
    }
}

/* AI Recommendation Card */
.recommendation-card {
    border-left: 4px solid var(--primary);
}

.recommendation-card .card-header h3 {
    color: var(--primary);
}

.recommendation-display {
    padding: 1rem;
}

.recommendation-action {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.recommendation-action.breed_now {
    color: var(--success);
}

.recommendation-action.breed_soon {
    color: #f59e0b;
}

.recommendation-action.wait,
.recommendation-action.monitor {
    color: var(--secondary);
}

.recommendation-timing {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.recommendation-reasoning {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem 0;
}

.recommendation-reasoning li {
    padding: 0.25rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.recommendation-reasoning li::before {
    content: "•";
    position: absolute;
    left: 0.5rem;
    color: var(--primary);
}

.hormone-treatment-card {
    background: #fef3c7;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.hormone-treatment-card h5 {
    margin: 0 0 0.5rem 0;
    color: #92400e;
}

.confidence-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.confidence-badge.high {
    background: #dcfce7;
    color: #166534;
}

.confidence-badge.medium {
    background: #fef3c7;
    color: #92400e;
}

.confidence-badge.low {
    background: #fee2e2;
    color: #991b1b;
}

/* Visual Ovary Diagram */
.ovary-diagram-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 100%);
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.ovary-side {
    flex: 1;
    text-align: center;
}

.ovary-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.ovary-visual {
    margin-bottom: 1rem;
}

.ovary-shape {
    width: 80px;
    height: 60px;
    background: linear-gradient(145deg, #f8b4d9 0%, #f472b6 100%);
    border-radius: 50%;
    margin: 0 auto;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.1);
}

.follicle-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: #1e1b4b;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.follicle-indicator.large {
    width: 30px;
    height: 30px;
    background: #312e81;
}

.follicle-indicator.preovulatory {
    width: 40px;
    height: 40px;
    background: #4338ca;
    box-shadow: 0 0 10px rgba(67, 56, 202, 0.5);
}

.uterus-visual {
    flex: 1.2;
    text-align: center;
}

.uterus-shape {
    width: 120px;
    height: 80px;
    background: linear-gradient(145deg, #fda4af 0%, #fb7185 100%);
    border-radius: 0 0 50% 50%;
    margin: 0 auto 1rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.uterus-label {
    color: white;
    font-weight: 600;
    font-size: 0.8rem;
}

.edema-value {
    display: inline-block;
    width: 40px;
    text-align: center;
    font-weight: 600;
    color: var(--primary);
}

/* Toggle Switch */
.toggle-switch {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toggle-switch input[type="checkbox"] {
    width: 40px;
    height: 22px;
    appearance: none;
    background: #e5e7eb;
    border-radius: 11px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s;
}

.toggle-switch input[type="checkbox"]::before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.toggle-switch input[type="checkbox"]:checked {
    background: var(--primary);
}

.toggle-switch input[type="checkbox"]:checked::before {
    transform: translateX(18px);
}

/* Teasing Score Buttons */
.teasing-score-input,
.libido-score-input {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.score-btn {
    padding: 0.5rem 1rem;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.score-btn:hover {
    border-color: var(--primary);
    background: #fdf2f8;
}

.score-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Behavioral Checklist */
.behavioral-checklist {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 0.5rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: #f9fafb;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.checkbox-item:hover {
    background: #f3f4f6;
}

.checkbox-item input[type="checkbox"] {
    accent-color: var(--primary);
}

/* APGAR Calculator */
.apgar-calculator {
    background: #f0fdf4;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
}

.apgar-calculator h4 {
    margin-top: 0;
    color: #166534;
}

.apgar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.apgar-item label {
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    display: block;
}

.apgar-score-display {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #bbf7d0;
}

.apgar-value {
    font-size: 2rem;
    font-weight: 700;
    color: #166534;
}

.apgar-status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.apgar-status.good {
    background: #dcfce7;
    color: #166534;
}

.apgar-status.moderate {
    background: #fef3c7;
    color: #92400e;
}

.apgar-status.critical {
    background: #fee2e2;
    color: #991b1b;
}

/* Heat Cycle Calendar */
.cycle-calendar {
    min-height: 300px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.calendar-nav {
    display: flex;
    gap: 0.5rem;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.calendar-day-header {
    text-align: center;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-secondary);
    padding: 0.5rem;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.calendar-day:hover {
    background: #fdf2f8;
}

.calendar-day.other-month {
    color: #d1d5db;
}

.calendar-day.today {
    border: 2px solid var(--primary);
}

.calendar-day.heat {
    background: #fce7f3;
    color: var(--primary);
    font-weight: 600;
}

.calendar-day.ovulation {
    background: var(--primary);
    color: white;
}

.calendar-day.bred {
    background: #dcfce7;
    color: #166534;
}

.heat-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    margin-top: 2px;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    justify-content: flex-end;
}

/* Form Range Slider */
.form-range {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    appearance: none;
    cursor: pointer;
}

.form-range::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary);
    border-radius: 50%;
    cursor: pointer;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .ovary-diagram-container {
        flex-direction: column;
        align-items: center;
    }

    .ovary-side,
    .uterus-visual {
        width: 100%;
        max-width: 200px;
    }

    .apgar-grid {
        grid-template-columns: 1fr;
    }

    .behavioral-checklist {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
    }

    .teasing-score-input,
    .libido-score-input {
        flex-wrap: wrap;
    }

    .score-btn {
        flex: 1;
        min-width: 60px;
    }
}

/* Calendar cells for heat cycle calendar */
.cal-header {
    text-align: center;
    font-weight: 600;
    font-size: 0.75rem;
    color: var(--gray-500);
    padding: 0.5rem;
    text-transform: uppercase;
}

.cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
    border-radius: 6px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.cal-day:hover {
    background: #fce7f3;
}

.cal-day.empty {
    background: transparent;
    cursor: default;
}

.cal-day.today {
    background: var(--primary);
    color: white;
    font-weight: 600;
}

/* Exam section grid layout */
.exam-section-grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .exam-section-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Recommendation card styling */
.recommendation-card {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

.recommendation-card .card-header {
    border-bottom: 1px solid #bae6fd;
}

/* Hormone treatment card */
.hormone-treatment-card {
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 8px;
    padding: 0.75rem;
}

/* Data table styling */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.data-table th,
.data-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.data-table th {
    font-weight: 600;
    color: var(--gray-600);
    background: #f9fafb;
}

.data-table tbody tr:hover {
    background: #fdf2f8;
}

/* Rating badge */
.rating-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
}

.rating-badge.satisfactory,
.rating-badge.excellent,
.rating-badge.good {
    background: #dcfce7;
    color: #166534;
}

.rating-badge.questionable,
.rating-badge.fair {
    background: #fef3c7;
    color: #92400e;
}

.rating-badge.unsatisfactory,
.rating-badge.poor,
.rating-badge.critical {
    background: #fee2e2;
    color: #991b1b;
}

/* Teasing badge */
.teasing-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.teasing-badge.score-0,
.teasing-badge.score-1 {
    background: #fee2e2;
    color: #991b1b;
}

.teasing-badge.score-2 {
    background: #fef3c7;
    color: #92400e;
}

.teasing-badge.score-3,
.teasing-badge.score-4 {
    background: #dcfce7;
    color: #166534;
}

/* APGAR badge */
.apgar-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

.apgar-badge.score-good {
    background: #dcfce7;
    color: #166534;
}

.apgar-badge.score-fair {
    background: #fef3c7;
    color: #92400e;
}

.apgar-badge.score-poor {
    background: #fee2e2;
    color: #991b1b;
}

/* Exam tabs styling */
.exam-tabs {
    margin-bottom: 1.5rem;
}

.exam-tab-content {
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Loading and error states */
.loading-placeholder {
    text-align: center;
    padding: 2rem;
    color: var(--gray-500);
}

.error-state {
    text-align: center;
    padding: 1rem;
    color: #dc2626;
}

/* Spin animation for loading */
.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ==========================================
   ALERTS DASHBOARD
   ========================================== */

.alerts-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.alert-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
}

.alert-card.critical {
    border-top: 4px solid #dc2626;
}

.alert-card.warning {
    border-top: 4px solid #f59e0b;
}

.alert-card.info {
    border-top: 4px solid #3b82f6;
}

.alert-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.alert-header i {
    font-size: 1.25rem;
}

.alert-card.critical .alert-header i { color: #dc2626; }
.alert-card.warning .alert-header i { color: #f59e0b; }
.alert-card.info .alert-header i { color: #3b82f6; }

.alert-count {
    margin-left: auto;
    background: #e5e7eb;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.875rem;
}

.alert-card.critical .alert-count { background: #fee2e2; color: #dc2626; }
.alert-card.warning .alert-count { background: #fef3c7; color: #92400e; }
.alert-card.info .alert-count { background: #dbeafe; color: #1d4ed8; }

.alert-list {
    max-height: 300px;
    overflow-y: auto;
}

.alert-item {
    display: flex;
    gap: 0.75rem;
    padding: 1rem;
    border-bottom: 1px solid #f3f4f6;
}

.alert-item:last-child {
    border-bottom: none;
}

.alert-item i {
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.alert-content p {
    margin: 0.25rem 0 0;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.empty-alert {
    padding: 2rem;
    text-align: center;
    color: var(--gray-400);
}

/* Timeline */
.milestone-timeline {
    padding: 1rem 0;
}

.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e5e7eb;
}

.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
    padding-left: 1rem;
}

.timeline-marker {
    position: absolute;
    left: -1.75rem;
    top: 0.25rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #3b82f6;
    border: 2px solid white;
    box-shadow: 0 0 0 2px #3b82f6;
}

.timeline-marker.foaling {
    background: #ec4899;
    box-shadow: 0 0 0 2px #ec4899;
}

.timeline-item.overdue .timeline-marker {
    background: #dc2626;
    box-shadow: 0 0 0 2px #dc2626;
}

.timeline-item.urgent .timeline-marker {
    background: #f59e0b;
    box-shadow: 0 0 0 2px #f59e0b;
}

.timeline-date {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.timeline-title {
    font-weight: 600;
}

.timeline-desc {
    font-size: 0.875rem;
    color: var(--gray-600);
}

/* Foaling Watch */
.foaling-watch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.foaling-watch-item {
    background: #f9fafb;
    border-radius: 8px;
    padding: 1rem;
    border-left: 4px solid #3b82f6;
}

.foaling-watch-item.soon {
    border-color: #f59e0b;
    background: #fffbeb;
}

.foaling-watch-item.urgent {
    border-color: #dc2626;
    background: #fef2f2;
}

.watch-mare {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.watch-mare i {
    color: var(--primary);
}

.watch-details {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.watch-countdown {
    grid-column: 2;
    grid-row: 1 / 3;
    font-size: 1.25rem;
    font-weight: 700;
    color: #3b82f6;
    align-self: center;
}

.watch-countdown.critical {
    color: #dc2626;
}

/* Recommendation badges */
.rec-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.rec-badge.urgent {
    background: #fee2e2;
    color: #dc2626;
}

.rec-badge.soon {
    background: #fef3c7;
    color: #92400e;
}

.rec-badge.monitor {
    background: #dbeafe;
    color: #1d4ed8;
}

.rec-badge.wait {
    background: #f3f4f6;
    color: #6b7280;
}

/* ==========================================
   SEMEN MANAGEMENT
   ========================================== */

.inventory-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

/* Tank Cards */
.storage-tanks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.tank-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
}

.tank-card.cooler {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

.tank-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.tank-header i {
    font-size: 1.5rem;
    color: #0ea5e9;
}

.tank-header h4 {
    margin: 0;
    font-size: 1rem;
}

.tank-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.tank-stat {
    text-align: center;
}

.tank-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
}

.tank-label {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.tank-level {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.level-fill {
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #16a34a);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.tank-temp {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.temp-status {
    margin-left: auto;
    padding: 0.125rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

.temp-status.good {
    background: #dcfce7;
    color: #166534;
}

.temp-status.warning {
    background: #fef3c7;
    color: #92400e;
}

.temp-status.critical {
    background: #fee2e2;
    color: #991b1b;
}

/* Storage Map Grid */
.storage-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.storage-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.row-label {
    width: 24px;
    font-weight: 600;
    color: var(--gray-500);
    text-align: center;
}

.storage-cell {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.storage-cell.empty {
    background: #f3f4f6;
    color: var(--gray-400);
}

.storage-cell.occupied {
    background: #3b82f6;
    color: white;
}

.storage-cell.expiring {
    background: #f59e0b;
    color: white;
}

.storage-cell:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.storage-legend {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    font-size: 0.875rem;
}

.legend-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    margin-right: 0.25rem;
    vertical-align: middle;
}

.legend-dot.empty { background: #f3f4f6; }
.legend-dot.occupied { background: #3b82f6; }
.legend-dot.expiring { background: #f59e0b; }

/* Expiration Timeline */
.expiration-timeline {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.expiration-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: #f9fafb;
    border-radius: 8px;
    border-left: 4px solid #3b82f6;
}

.expiration-item.soon {
    border-color: #f59e0b;
    background: #fffbeb;
}

.expiration-item.urgent {
    border-color: #dc2626;
    background: #fef2f2;
}

.exp-stallion {
    font-weight: 600;
    flex: 1;
}

.exp-details {
    display: flex;
    gap: 1rem;
    color: var(--gray-500);
    font-size: 0.875rem;
}

.exp-date {
    font-weight: 600;
    color: #3b82f6;
}

.expiration-item.urgent .exp-date {
    color: #dc2626;
}

/* Low Stock Alert */
.low-stock-alert {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: #fef2f2;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.low-stock-alert i {
    color: #dc2626;
}

.low-stock-alert button {
    margin-left: auto;
}

/* Loss Analysis */
.loss-summary {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
}

.loss-stat {
    text-align: center;
}

.loss-value {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #dc2626;
}

.loss-label {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.breakdown-bars {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.breakdown-item {
    display: grid;
    grid-template-columns: 120px 1fr 40px;
    gap: 0.75rem;
    align-items: center;
    font-size: 0.875rem;
}

.breakdown-item .bar {
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.breakdown-item .fill {
    height: 100%;
    background: #dc2626;
    border-radius: 4px;
}

/* Help Text */
.help-text {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 1rem;
}

/* Badge Variants */
.badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge.danger {
    background: #fee2e2;
    color: #dc2626;
}

.badge.warning {
    background: #fef3c7;
    color: #92400e;
}

.badge.success {
    background: #dcfce7;
    color: #166534;
}

/* Status Badge */
.status-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: capitalize;
}

.status-badge.pending {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.shipped,
.status-badge.delivered {
    background: #dcfce7;
    color: #166534;
}

.status-badge.cancelled {
    background: #fee2e2;
    color: #dc2626;
}

/* Text colors */
.text-success { color: #16a34a; }
.text-warning { color: #d97706; }
.text-danger { color: #dc2626; }

/* Responsive */
@media (max-width: 768px) {
    .alerts-dashboard {
        grid-template-columns: 1fr;
    }

    .storage-tanks-grid {
        grid-template-columns: 1fr;
    }

    .foaling-watch-grid {
        grid-template-columns: 1fr;
    }

    .storage-cell {
        width: 32px;
        height: 32px;
        font-size: 0.625rem;
    }
}

/* ==========================================
   POST-BREEDING & UTERINE CULTURE TABS
   ========================================== */

.section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1.5rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--gray-200);
    font-size: 1rem;
    color: var(--text);
}

.section-title i {
    color: var(--primary);
}

/* Assessment Options */
.assessment-options,
.interpretation-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.assessment-option,
.interpretation-option {
    cursor: pointer;
}

.assessment-option input,
.interpretation-option input {
    display: none;
}

.assessment-badge,
.interpretation-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.assessment-option input:checked + .assessment-badge,
.interpretation-option input:checked + .interpretation-badge {
    border-color: currentColor;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.assessment-badge.good,
.interpretation-badge.good,
.assessment-badge.normal {
    background: #dcfce7;
    color: #166534;
}

.assessment-badge.fair,
.interpretation-badge.fair {
    background: #e0f2fe;
    color: #0369a1;
}

.assessment-badge.warning,
.interpretation-badge.warning {
    background: #fef3c7;
    color: #92400e;
}

.assessment-badge.danger,
.interpretation-badge.danger,
.assessment-badge.concern {
    background: #fee2e2;
    color: #991b1b;
}

/* Toggle Group */
.toggle-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.toggle-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.toggle-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

/* Culture Status Indicator */
.culture-status-indicator {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    background: #f9fafb;
}

.culture-status-indicator .status-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.status-icon.pending {
    background: #fef3c7;
    color: #92400e;
}

.status-icon.good {
    background: #dcfce7;
    color: #166534;
}

.status-icon.fair {
    background: #e0f2fe;
    color: #0369a1;
}

.status-icon.warning {
    background: #fed7aa;
    color: #c2410c;
}

.status-icon.danger {
    background: #fee2e2;
    color: #991b1b;
}

/* Culture Badge */
.culture-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.culture-badge.pending {
    background: #fef3c7;
    color: #92400e;
}

.culture-badge.no_growth {
    background: #dcfce7;
    color: #166534;
}

.culture-badge.light_growth {
    background: #e0f2fe;
    color: #0369a1;
}

.culture-badge.moderate_growth {
    background: #fed7aa;
    color: #c2410c;
}

.culture-badge.heavy_growth {
    background: #fee2e2;
    color: #991b1b;
}

/* Interpretation Badge in Tables */
.interpretation-badge.normal {
    background: #dcfce7;
    color: #166534;
}

.interpretation-badge.contamination {
    background: #f3f4f6;
    color: #6b7280;
}

.interpretation-badge.subclinical {
    background: #fef3c7;
    color: #92400e;
}

.interpretation-badge.endometritis,
.interpretation-badge.fungal {
    background: #fee2e2;
    color: #991b1b;
}

/* Team & Client Management Styles */
.team-list, .clients-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.team-member-card, .client-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
}

.team-member-card.pending {
    opacity: 0.7;
    border-style: dashed;
}

.member-avatar, .client-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 600;
    flex-shrink: 0;
}

.member-avatar.pending {
    background: var(--text-muted);
}

.member-info, .client-info {
    flex: 1;
    min-width: 0;
}

.member-name, .client-name {
    font-weight: 600;
}

.member-email, .client-email {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.member-actions {
    display: flex;
    gap: 0.5rem;
}

/* API Keys Styles */
.api-keys-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.api-key-card code {
    background: var(--bg);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
}

/* Upgrade Prompt */
.upgrade-prompt {
    text-align: center;
    padding: 3rem;
}

.upgrade-prompt i {
    font-size: 4rem;
    color: var(--text-muted);
    opacity: 0.5;
}

.upgrade-prompt h3 {
    margin-top: 1rem;
}

.upgrade-prompt p {
    color: var(--text-muted);
    margin: 0.5rem 0;
}

/* Clients Grid */
.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.client-card {
    cursor: pointer;
    transition: all 0.2s;
}

.client-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.client-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.client-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* Utility classes */
.ml-2 { margin-left: 0.5rem; }
.ml-1 { margin-left: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.stats-mini { font-size: 0.875rem; color: var(--text-muted); }

/* ==========================================
   INVOICES STYLES
   ========================================== */
.invoices-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.invoice-card {
    cursor: pointer;
    transition: all 0.2s;
}

.invoice-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.invoice-info {
    display: flex;
    flex-direction: column;
}

.invoice-number {
    font-size: 1rem;
    color: var(--text-primary);
}

.invoice-client {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.invoice-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.invoice-amounts {
    display: flex;
    flex-direction: column;
}

.invoice-total {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.invoice-balance {
    font-size: 0.875rem;
    color: var(--warning);
}

.invoice-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.invoice-meta i {
    margin-right: 0.25rem;
}

.invoice-actions {
    display: flex;
    gap: 0.5rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.invoice-item-row {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.invoice-item-row:last-child {
    border-bottom: none;
}

/* Invoice detail table */
.invoice-detail .data-table {
    width: 100%;
    border-collapse: collapse;
}

.invoice-detail .data-table th,
.invoice-detail .data-table td {
    padding: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.invoice-detail .data-table tfoot td {
    border-bottom: none;
    padding-top: 0.75rem;
}

/* ==========================================
   COMMAND PALETTE (Innovative Navigation)
   ========================================== */
#command-palette-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    z-index: 10000;
}

.command-palette-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 10000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 15vh;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.command-palette {
    background: #ffffff;
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 600px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    animation: slideDown 0.15s ease-out;
    position: relative;
    z-index: 10001;
}

[data-theme="dark"] .command-palette {
    background: #1f2937;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.command-palette-input {
    display: flex;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.command-palette-input i {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-right: 0.75rem;
}

.command-palette-input input {
    flex: 1;
    background: transparent;
    border: none;
    font-size: 1.1rem;
    color: var(--text-primary);
    outline: none;
}

.command-palette-input input::placeholder {
    color: var(--text-muted);
}

.command-palette-input kbd {
    background: var(--bg);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
}

.command-palette-results {
    max-height: 400px;
    overflow-y: auto;
    padding: 0.5rem;
}

.command-palette-group {
    padding: 0.5rem 0;
}

.command-palette-group-title {
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.command-palette-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.1s;
    color: #1f2937;
    background: transparent;
}

[data-theme="dark"] .command-palette-item {
    color: #f3f4f6;
}

.command-palette-item:hover,
.command-palette-item.active {
    background: var(--primary);
    color: white !important;
}

.command-palette-item:hover i,
.command-palette-item.active i {
    color: white !important;
}

.command-palette-item:hover .subtitle,
.command-palette-item.active .subtitle {
    color: rgba(255,255,255,0.8) !important;
}

.command-palette-item i {
    font-size: 1.1rem;
    color: #6b7280;
    width: 24px;
    text-align: center;
}

[data-theme="dark"] .command-palette-item i {
    color: #9ca3af;
}

.command-palette-item-text {
    flex: 1;
}

.command-palette-item-text .title {
    font-weight: 500;
    color: inherit;
}

.command-palette-item-text .subtitle {
    font-size: 0.8rem;
    color: #6b7280;
}

[data-theme="dark"] .command-palette-item-text .subtitle {
    color: #9ca3af;
}

.command-palette-item kbd {
    background: rgba(255,255,255,0.2);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.7rem;
}

.command-palette-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.command-palette-footer kbd {
    background: var(--bg);
    padding: 0.15rem 0.35rem;
    border-radius: 3px;
    margin: 0 0.25rem;
}

/* Quick Actions Floating Button */
.quick-actions-btn {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    box-shadow: 0 4px 14px rgba(190, 24, 93, 0.4);
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.2s;
}

.quick-actions-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(190, 24, 93, 0.5);
}

.quick-actions-menu {
    position: fixed;
    bottom: 160px;
    right: 20px;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    z-index: 100;
    min-width: 200px;
    animation: fadeInUp 0.15s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.quick-actions-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    cursor: pointer;
    transition: all 0.1s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.quick-actions-menu-item:hover {
    background: var(--bg);
}

.quick-actions-menu-item i {
    color: var(--primary);
    font-size: 1.1rem;
    width: 20px;
}

@media (max-width: 768px) {
    .command-palette {
        margin: 0 1rem;
        max-height: 80vh;
    }

    .quick-actions-btn {
        bottom: 80px;
        right: 16px;
        width: 50px;
        height: 50px;
    }
}

/* ========================================
   Notification Settings Styles
   ======================================== */

#notification-settings-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#notification-settings-card .card-header h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--border);
}

.setting-item:last-child {
    border-bottom: none;
}

.setting-item.setting-master {
    padding: 1rem;
    background: linear-gradient(135deg, #fdf2f8 0%, #faf5ff 100%);
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.setting-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.setting-info span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.setting-info small {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.setting-group {
    margin: 1.5rem 0;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.setting-group-header {
    background: var(--bg);
    padding: 0.75rem 1rem;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border);
}

.setting-item.sub-setting {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
}

.setting-item.sub-setting .setting-info span {
    font-weight: 400;
}

#email-notification-types {
    transition: opacity 0.2s, max-height 0.3s;
}

#email-notification-types.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.quiet-hours-times {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.quiet-hours-times input[type="time"] {
    width: auto;
    padding: 0.375rem 0.5rem;
}

#quiet-hours-times {
    display: none;
}

#pref-quiet-hours:checked ~ .quiet-hours-times,
.quiet-hours-enabled #quiet-hours-times {
    display: flex;
}

.setting-actions {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Toggle styles specific to settings */
.setting-item .toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.setting-item .toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.setting-item .toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e5e7eb;
    border-radius: 26px;
    transition: 0.3s;
}

.setting-item .toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.setting-item .toggle input:checked + .toggle-slider {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
}

.setting-item .toggle input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

.setting-item select.form-control-sm {
    width: auto;
    min-width: 120px;
    padding: 0.375rem 2rem 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* Notification Settings Loading State */
#notif-settings-loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}

/* Push Notification Enable Button */
#enable-push-btn {
    white-space: nowrap;
}

#enable-push-btn.enabled {
    background: #10b981;
    border-color: #10b981;
}

/* Dark mode support */
[data-theme="dark"] .setting-item.setting-master {
    background: linear-gradient(135deg, rgba(190,24,93,0.15) 0%, rgba(124,58,237,0.15) 100%);
}

[data-theme="dark"] .setting-group-header {
    background: rgba(255,255,255,0.05);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .setting-item {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .setting-info {
        flex: 1;
        min-width: 200px;
    }

    .quiet-hours-times {
        width: 100%;
        justify-content: flex-start;
    }

    .setting-item select.form-control-sm {
        min-width: 100px;
    }

    .setting-actions {
        flex-direction: column;
    }

    .setting-actions .btn {
        width: 100%;
    }
}

/* ========================================
   Help & Support Page Styles
   ======================================== */

.help-support-container {
    max-width: 800px;
    margin: 0 auto;
}

/* Quick Help Grid */
.quick-help-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.quick-help-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.25rem 1rem;
    background: var(--bg);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s;
    text-align: center;
}

.quick-help-item:hover {
    background: linear-gradient(135deg, #fdf2f8 0%, #faf5ff 100%);
    transform: translateY(-2px);
}

.quick-help-item i {
    font-size: 1.75rem;
    color: var(--primary);
}

.quick-help-item span {
    font-size: 0.85rem;
    font-weight: 500;
}

/* Rating Section */
.rating-card .card-body {
    text-align: center;
}

.rating-intro {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.rating-stars {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.star-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    transition: transform 0.2s;
}

.star-btn i {
    font-size: 2.5rem;
    color: #d1d5db;
    transition: color 0.2s;
}

.star-btn:hover i,
.star-btn.active i {
    color: #fbbf24;
}

.star-btn.active i {
    font-weight: 700;
}

.star-btn:hover {
    transform: scale(1.1);
}

.rating-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.rating-feedback {
    margin-top: 1.5rem;
    text-align: left;
}

.rating-success,
.feature-success,
.support-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 2rem;
    background: linear-gradient(135deg, #dcfce7 0%, #d1fae5 100%);
    border-radius: var(--radius);
    margin-top: 1rem;
}

.rating-success i,
.feature-success i,
.support-success i {
    font-size: 3rem;
    color: #10b981;
}

.rating-success p,
.feature-success p,
.support-success p {
    font-weight: 500;
    color: #065f46;
    margin: 0;
}

/* Feature Request Section */
.feature-intro {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.feature-request-card .form-group {
    margin-bottom: 1rem;
}

/* Contact Section */
.contact-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact-option {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--bg);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s;
}

.contact-option:hover {
    background: linear-gradient(135deg, #fdf2f8 0%, #faf5ff 100%);
}

.contact-option i {
    font-size: 1.5rem;
    color: var(--primary);
}

.contact-option div {
    display: flex;
    flex-direction: column;
}

.contact-option strong {
    font-size: 0.9rem;
}

.contact-option span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.support-form-toggle {
    text-align: center;
    margin-bottom: 1.5rem;
}

#support-form {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

/* FAQ Section */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.faq-item {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 1rem;
    background: var(--bg);
    border: none;
    cursor: pointer;
    text-align: left;
    font-weight: 500;
    color: var(--text-primary);
    transition: background 0.2s;
}

.faq-question:hover {
    background: linear-gradient(135deg, #fdf2f8 0%, #faf5ff 100%);
}

.faq-question i {
    transition: transform 0.3s;
    color: var(--text-muted);
}

.faq-item.open .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    display: none;
    padding: 1rem;
    background: white;
    border-top: 1px solid var(--border);
}

.faq-item.open .faq-answer {
    display: block;
}

.faq-answer p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* App Info */
.app-info {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted);
}

.app-info p {
    margin: 0.25rem 0;
}

.app-version {
    font-size: 0.8rem;
}

.app-copyright {
    font-size: 0.75rem;
}

/* Dark mode support for Help page */
[data-theme="dark"] .quick-help-item:hover,
[data-theme="dark"] .contact-option:hover,
[data-theme="dark"] .faq-question:hover {
    background: rgba(190, 24, 93, 0.1);
}

[data-theme="dark"] .rating-success,
[data-theme="dark"] .feature-success,
[data-theme="dark"] .support-success {
    background: rgba(16, 185, 129, 0.15);
}

/* Mobile responsive for Help page */
@media (max-width: 768px) {
    .quick-help-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .star-btn i {
        font-size: 2rem;
    }

    .contact-options {
        grid-template-columns: 1fr;
    }
}
