/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #00bcd4;
    /* Cyan vibrante */
    --primary-dark: #0097a7;
    --primary-light: rgba(0, 188, 212, 0.1);
    /* Fundo para ativos */
    --sidebar-bg: #00bcd4;
    /* Sidebar Cyan Sólida */
    --bg-main: #f0f9fa;
    /* Fundo sutil */
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --accent-orange: #ff9800;
    --accent-yellow: #facc15;
    --accent-purple: #a855f7;
    --radius-lg: 22px;
    --shadow-soft: 0 4px 20px rgba(0, 188, 212, 0.08), 0 0 1px rgba(0, 0, 0, 0.05);

    /* Glass Effects */
    --glass-cyan: rgba(0, 188, 212, 0.08);
    --glass-pink: rgba(236, 72, 153, 0.08);
    --glass-purple: rgba(168, 85, 247, 0.08);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
}

/* App Container */
.app-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-right: none;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.05);
    overflow-y: auto;
    scrollbar-width: none;
    /* Firefox */
}

.sidebar::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Edge */
}

.sidebar.active {
    transform: translateX(0);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.2);
}

@media (min-width: 768px) {
    .sidebar {
        position: relative;
        transform: translateX(0) !important;
        flex-shrink: 0;
    }
}

.sidebar-header {
    padding: 32px 24px;
    border-bottom: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon {
    font-size: 32px;
}

.logo-text {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: #ffffff;
}

.toggle-sidebar {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-sidebar:hover {
    background: rgba(255, 255, 255, 0.2);
}

.toggle-sidebar i {
    transition: transform 0.3s;
}

.sidebar.collapsed .toggle-sidebar i {
    transform: rotate(180deg);
}

.close-sidebar {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    display: none;
}

@media (max-width: 767px) {
    .close-sidebar {
        display: block;
    }

    .toggle-sidebar {
        display: none;
    }
}

@media (min-width: 768px) {
    .toggle-sidebar {
        display: flex;
    }
}

/* Collapsed Sidebar State */
.sidebar.collapsed {
    width: 70px;
}

.sidebar.collapsed .logo-text,
.sidebar.collapsed .nav-item span:not(.nav-icon),
.sidebar.collapsed .sidebar-footer,
.sidebar.collapsed .sidebar-user-profile {
    display: none;
}

.sidebar.collapsed .logo-container {
    justify-content: center;
}

.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 14px;
    margin: 4px 8px;
    width: calc(100% - 16px);
}

.sidebar.collapsed .nav-item:hover {
    transform: translateX(0);
}

.sidebar.collapsed .sidebar-header {
    padding: 32px 12px;
    flex-direction: column;
    gap: 12px;
}

.sidebar-nav {
    flex: 1;
    padding: 32px 16px;
    overflow-y: auto;
    scrollbar-width: none;
    /* Firefox */
}

.sidebar-nav::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Edge */
}

.nav-menu {
    list-style: none;
}

.nav-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 14px;
    margin: 4px 16px;
    width: calc(100% - 32px);
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    transform: translateX(4px);
}

.nav-item.active {
    background: #ffffff;
    color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .nav-item {
        min-height: 52px;
        margin: 8px 12px;
        width: calc(100% - 24px);
    }
}

.nav-icon {
    font-size: 20px;
}

.hardware-section {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid var(--gray-200);
}

.hardware-title {
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gray-500);
    padding: 0 16px;
    margin-bottom: 16px;
}

.hardware-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hardware-item {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 16px;
    background: none;
    border: none;
    color: var(--gray-600);
    cursor: pointer;
    transition: color 0.2s;
}

.hardware-item:hover {
    color: var(--gray-900);
}

.hardware-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hardware-icon {
    font-size: 16px;
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--slate-600);
}

.status-indicator.connected {
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
}

.status-indicator.connecting {
    background: #eab308;
    animation: pulse 1s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.hardware-note {
    font-size: 10px;
    color: #64748b;
    padding: 8px 16px;
    font-style: italic;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--slate-700);
    text-align: center;
    font-size: 12px;
    color: #64748b;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 20;
}

@media (max-width: 767px) {
    .sidebar-overlay.active {
        display: block;
    }
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
}

.mobile-header {
    display: none;
    padding: 16px;
    background: white;
    border-bottom: 1px solid var(--gray-200);
    align-items: center;
    gap: 8px;
}

@media (max-width: 767px) {
    .mobile-header {
        display: flex;
    }
}

.menu-button {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    color: var(--gray-600);
}

.mobile-title {
    font-weight: bold;
    color: var(--gray-800);
}

.page-content {
    flex: 1;
    overflow: auto;
    padding: 16px;
}

@media (min-width: 768px) {
    .page-content {
        padding: 32px;
    }
}

.content-wrapper {
    max-width: 1280px;
    margin: 0 auto;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

.page-title {
    font-size: 24px;
    font-weight: bold;
    color: var(--gray-800);
    margin-bottom: 24px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 16px;
}

.header-actions {
    display: flex;
    gap: 8px;
}

.filter-chip {
    padding: 8px 24px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.05em;
    text-transform: uppercase;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.filter-chip:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-1px);
}

.filter-chip.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(0, 188, 212, 0.3);
}

/* Specific chip colors */
.filter-chip[data-breed="Nelore"].active {
    background: #ff9800;
    border-color: #ff9800;
    box-shadow: 0 4px 15px rgba(255, 152, 0, 0.3);
}

.filter-chip[data-breed="Mestiço"].active {
    background: #2196f3;
    border-color: #2196f3;
    box-shadow: 0 4px 15px rgba(33, 150, 243, 0.3);
}

.filter-chip[data-breed="Outros"].active {
    background: #607d8b;
    border-color: #607d8b;
    box-shadow: 0 4px 15px rgba(96, 125, 139, 0.3);
}

/* Buttons */
.btn-primary {
    background: var(--brand-600);
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.btn-primary:hover {
    background: var(--brand-700);
}

.btn-secondary {
    background: white;
    color: var(--gray-700);
    padding: 8px 16px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: var(--gray-100);
}

.btn-danger {
    background: #dc2626;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-danger:hover {
    background: #b91c1c;
}

/* KPI Cards */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.kpi-card {
    background: #ffffff;
    padding: 24px;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0, 188, 212, 0.05);
    transition: transform 0.3s, box-shadow 0.3s;
}

.kpi-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 188, 212, 0.1);
}

.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 16px;
}

.kpi-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-500);
}

.kpi-value {
    font-size: 24px;
    font-weight: bold;
    color: var(--gray-800);
    margin-top: 4px;
}

.kpi-icon {
    padding: 8px;
    border-radius: 8px;
    font-size: 20px;
}

.kpi-icon.blue {
    background: #dbeafe;
    color: #2563eb;
}

.kpi-icon.orange {
    background: #fed7aa;
    color: #ea580c;
}

.kpi-icon.green {
    background: #d1fae5;
    color: #059669;
}

.kpi-footer {
    font-size: 12px;
    color: var(--gray-500);
}

/* Charts */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

.chart-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--gray-100);
}

.chart-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 16px;
}

/* Search Box */
.search-box {
    position: relative;
    margin-bottom: 24px;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 20px;
}

.search-box input {
    width: 100%;
    padding: 12px 16px 12px 40px;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    font-size: 14px;
    color: var(--gray-900);
}

.search-box input:focus {
    outline: none;
    border-color: var(--brand-500);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

/* Tables Premium */
.table-container {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0, 188, 212, 0.05);
    overflow-x: auto;
    margin-top: 16px;
    -webkit-overflow-scrolling: touch;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
    /* Garante que o scroll lateral apareça em telas pequenas */
}

.data-table thead {
    background: #f8fafc;
    border-bottom: 2px solid #f1f5f9;
}

.data-table th {
    padding: 16px 24px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #64748b;
    text-align: left;
}

.data-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: all 0.2s;
    border-left: 4px solid transparent;
}

.data-table tbody tr:hover {
    background: rgba(0, 188, 212, 0.02);
    transform: translateX(4px);
}

/* Row modifiers by Gender/Status */
.data-table tr.row-male {
    border-left-color: #00bcd4;
}

.data-table tr.row-female {
    border-left-color: #ec4899;
}

.data-table td {
    padding: 16px 24px;
    font-size: 14px;
    color: #334155;
}

/* Animal Detail - Ficha Técnica Premium */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.info-card {
    background: white;
    padding: 24px;
    border-radius: 22px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0, 188, 212, 0.05);
}

.info-card-title {
    font-size: 18px;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f1f5f9;
}

.info-card-title.cyan {
    border-bottom-color: rgba(0, 188, 212, 0.2);
}

.info-card-title.pink {
    border-bottom-color: rgba(236, 72, 153, 0.2);
}

.info-card-title.orange {
    border-bottom-color: rgba(255, 152, 0, 0.2);
}

.detail-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.detail-stat-item {
    background: #f8fafc;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1px solid #f1f5f9;
}

.detail-stat-label {
    display: block;
    font-size: 10px;
    font-weight: 800;
    color: #94a3b8;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.detail-stat-value {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
}

/* Performance Metrics */
.performance-card {
    background: rgba(0, 188, 212, 0.05);
    border: 1px solid rgba(0, 188, 212, 0.1);
    padding: 20px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s;
}

.performance-card:hover {
    background: rgba(0, 188, 212, 0.08);
    transform: translateY(-2px);
}

.performance-icon {
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #00bcd4;
    box-shadow: 0 4px 12px rgba(0, 188, 212, 0.15);
}

.data-table tbody tr {
    border-bottom: 1px solid var(--gray-100);
    transition: background 0.2s;
}

.data-table tbody tr:hover {
    background: var(--gray-50);
}

.data-table td {
    padding: 16px 24px;
    color: var(--gray-900);
}

.text-right {
    text-align: right;
}

/* Batches Grid */
.batches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.batch-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--gray-200);
    padding: 24px;
    position: relative;
    transition: box-shadow 0.2s;
}

.batch-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.batch-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 16px;
}

.batch-card-actions {
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.2s;
}

.batch-card:hover .batch-card-actions {
    opacity: 1;
}

.batch-icon {
    width: 48px;
    height: 48px;
    background: var(--brand-100);
    color: var(--brand-700);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.batch-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--gray-800);
    margin-bottom: 4px;
}

.batch-badge {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
    background: var(--gray-100);
    padding: 2px 8px;
    border-radius: 4px;
}

.batch-desc {
    color: var(--gray-600);
    font-size: 14px;
    margin-bottom: 16px;
}

.batch-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--gray-100);
    font-size: 14px;
    color: var(--gray-500);
}

.batch-count {
    font-weight: bold;
    color: var(--brand-600);
    background: var(--brand-50);
    padding: 4px 12px;
    border-radius: 999px;
}

/* Category Stats */
.category-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.category-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--gray-100);
    transition: border-color 0.2s;
}

.category-card:hover {
    border-color: var(--brand-300);
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 12px;
}

.category-icon {
    width: 40px;
    height: 40px;
    background: var(--brand-50);
    color: var(--brand-600);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.category-count {
    text-align: right;
}

.category-count-value {
    font-size: 24px;
    font-weight: 900;
    color: var(--gray-800);
}

.category-count-label {
    font-size: 10px;
    color: var(--gray-400);
    text-transform: uppercase;
    font-weight: bold;
}

.category-name {
    font-weight: bold;
    color: var(--gray-700);
    margin-bottom: 16px;
}

.category-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.category-stat-box {
    background: var(--brand-50);
    padding: 8px;
    border-radius: 8px;
    border: 1px solid var(--brand-100);
}

.category-stat-label {
    font-size: 10px;
    color: var(--brand-600);
    text-transform: uppercase;
    font-weight: 900;
    display: block;
}

.category-stat-value {
    font-weight: 900;
    color: var(--brand-700);
    font-size: 18px;
}

.category-sex-bar {
    display: flex;
    width: 100%;
    background: var(--gray-100);
    height: 6px;
    border-radius: 999px;
    overflow: hidden;
    margin-top: 8px;
}

.category-sex-bar-male {
    height: 100%;
    background: #60a5fa;
}

.category-sex-bar-female {
    height: 100%;
    background: #f472b6;
}

/* Animal Detail View */
.detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.back-button {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--gray-600);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background 0.2s;
}

.back-button:hover {
    background: var(--gray-200);
}

.detail-subtitle {
    color: var(--gray-500);
    font-size: 14px;
}

.detail-stats {
    margin-left: auto;
    display: flex;
    gap: 8px;
}

.stat-box {
    background: white;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid var(--gray-200);
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 12px;
    color: var(--gray-500);
    text-transform: uppercase;
    font-weight: bold;
}

.stat-value {
    font-weight: bold;
    font-size: 18px;
    color: var(--brand-600);
    display: block;
    margin-top: 4px;
}

.stat-value.red {
    color: #dc2626;
}

/* Tabs */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--gray-200);
    overflow-x: auto;
    margin-bottom: 24px;
}

.tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    background: none;
    border-bottom: 2px solid transparent;
    font-weight: 500;
    font-size: 14px;
    color: var(--gray-500);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.tab:hover {
    color: var(--gray-700);
    background: var(--gray-50);
}

.tab.active {
    border-bottom-color: var(--brand-600);
    color: var(--brand-600);
    background: var(--brand-50);
}

.tab-content {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--gray-100);
    min-height: 400px;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* Status Grid */
.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.status-card {
    background: white;
    padding: 20px;
    border-radius: 16px;
    border-left: 4px solid;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 16px;
}

.status-card.green {
    border-left-color: #22c55e;
}

.status-card.red {
    border-left-color: #dc2626;
}

.status-card.gray {
    border-left-color: var(--gray-400);
}

.status-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.status-card.green .status-icon {
    background: #dcfce7;
    color: #22c55e;
}

.status-card.red .status-icon {
    background: #fee2e2;
    color: #dc2626;
}

.status-card.gray .status-icon {
    background: var(--gray-100);
    color: var(--gray-500);
}

.status-label {
    font-size: 10px;
    font-weight: 900;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    line-height: 1;
    margin-bottom: 4px;
}

.status-value {
    font-size: 24px;
    font-weight: 900;
    color: var(--gray-800);
    line-height: 1;
}

/* Finance Grid */
.finance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.finance-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--gray-100);
}

.finance-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-500);
}

.finance-value {
    font-size: 24px;
    font-weight: bold;
    margin-top: 4px;
}

.finance-value.green {
    color: #22c55e;
}

.finance-value.red {
    color: #dc2626;
}

.finance-value.blue {
    color: #2563eb;
}

/* Inventory Grid */
.inventory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.inventory-card {
    background: white;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--gray-100);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.inventory-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.inventory-icon {
    width: 48px;
    height: 48px;
    background: #dbeafe;
    color: #2563eb;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.inventory-details h3 {
    font-weight: bold;
    color: var(--gray-800);
    margin-bottom: 4px;
}

.inventory-details p {
    font-size: 14px;
    color: var(--gray-500);
    text-transform: capitalize;
}

.inventory-quantity {
    text-align: right;
}

.inventory-quantity-value {
    font-size: 20px;
    font-weight: bold;
    color: var(--gray-900);
}

.inventory-quantity-unit {
    font-size: 14px;
    font-weight: normal;
    color: var(--gray-500);
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 50;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content.large {
    max-width: 600px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--gray-100);
    background: var(--gray-50);
    border-radius: 12px 12px 0 0;
}

.modal-header h3 {
    font-weight: bold;
    color: var(--gray-800);
}

.modal-subtitle {
    font-size: 12px;
    color: var(--gray-400);
    font-weight: bold;
    margin-top: 4px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--gray-400);
    cursor: pointer;
    padding: 4px;
}

.modal-close:hover {
    color: var(--gray-600);
}

.modal-form {
    padding: 24px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-900);
    margin-bottom: 4px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    background: white;
    border: 2px solid #cbd5e1;
    /* Bordas mais nítidas (Slate-300) */
    border-radius: 10px;
    font-size: 14px;
    color: var(--gray-900);
    font-family: inherit;
    transition: all 0.2s ease;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.05);
    /* Sombra interna para profundidade */
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    /* Cyan vibrante no foco */
    box-shadow: 0 0 0 4px rgba(0, 188, 212, 0.15), inset 0 1px 2px rgba(0, 0, 0, 0.02);
    background: #fdfdfd;
}

.form-group small {
    display: block;
    font-size: 10px;
    color: #64748b;
    margin-top: 4px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.form-section {
    margin-bottom: 16px;
    padding: 16px;
    background: #f8fafc;
    /* Fundo cinza azulado muito claro */
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.section-label {
    display: block;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    color: var(--gray-500);
    margin-bottom: 8px;
}

.radio-group {
    display: flex;
    gap: 16px;
}

.radio-group.horizontal {
    gap: 8px;
}

.radio-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--gray-900);
}

.radio-option {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.radio-option input[type="radio"]:checked+span,
.radio-option:has(input[type="radio"]:checked) {
    background: #dcfce7;
    border-color: #22c55e;
    color: #15803d;
    font-weight: bold;
}

.radio-group input[type="radio"] {
    margin: 0;
}

.input-with-icon {
    position: relative;
}

.input-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-300);
    font-size: 18px;
}

.input-with-prefix {
    position: relative;
}

.input-with-prefix>span {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-500);
    font-size: 14px;
}

.input-with-prefix input {
    padding-left: 36px;
}

.capture-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--brand-100);
    color: var(--brand-700);
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 4px;
}

.capture-btn:hover {
    background: var(--brand-200);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-200);
}

/* Sales Modal */
.sales-modal-content {
    padding: 32px;
}

.sales-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    border: 2px solid transparent;
    border-radius: 24px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 32px;
}

.action-btn.blue {
    background: #dbeafe;
    color: #2563eb;
}

.action-btn.blue:hover {
    border-color: #2563eb;
    transform: scale(1.05);
}

.action-btn.red {
    background: #fee2e2;
    color: #dc2626;
}

.action-btn.red:hover {
    border-color: #dc2626;
    transform: scale(1.05);
}

.action-btn span:last-child {
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    margin-top: 8px;
}

.alert-box {
    display: flex;
    gap: 16px;
    padding: 24px;
    border-radius: 16px;
    border: 1px solid;
    margin-bottom: 24px;
}

.alert-box.red {
    background: #fee2e2;
    border-color: #fecaca;
    color: #991b1b;
}

.alert-box.red h4 {
    font-weight: 900;
    text-transform: uppercase;
    font-size: 12px;
    margin-bottom: 4px;
}

.alert-box.red p {
    font-size: 12px;
}

.form-actions {
    display: flex;
    gap: 8px;
}

.form-actions button {
    flex: 1;
}

/* Weight Chart Container */
.weight-chart-container {
    display: flex;
    gap: 24px;
    margin-bottom: 32px;
}

.weight-chart {
    flex: 1;
    height: 256px;
    background: var(--gray-50);
    border-radius: 8px;
    padding: 8px;
    border: 1px solid var(--gray-100);
}

.weight-form-panel {
    width: 320px;
    background: var(--gray-50);
    padding: 16px;
    border-radius: 8px;
    border: 1px solid var(--gray-200);
    height: fit-content;
}

/* Health Records */
.health-records {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.health-record {
    display: flex;
    align-items: center;
    padding: 12px;
    background: #dbeafe;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
}

.health-record-icon {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2563eb;
    font-size: 20px;
    margin-right: 12px;
}

.health-record-info h4 {
    font-weight: bold;
    color: #1e40af;
    margin-bottom: 2px;
}

.health-record-info p {
    font-size: 12px;
    color: #2563eb;
}

/* Milk Chart */
.milk-chart-container {
    display: flex;
    gap: 24px;
    margin-bottom: 24px;
}

.milk-chart {
    flex: 1;
    height: 256px;
    background: var(--gray-50);
    border-radius: 8px;
    padding: 8px;
    border: 1px solid var(--gray-100);
}

/* Reproduction Panel */
.repro-panel {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.repro-card {
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid;
}

.repro-card.pink {
    background: #fdf2f8;
    border-color: #fce7f3;
}

.repro-card.gray {
    background: var(--gray-50);
    border-color: var(--gray-200);
}

.repro-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 24px;
}

.repro-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.repro-card.pink .repro-icon {
    background: #fce7f3;
    color: #ec4899;
}

.repro-card.gray .repro-icon {
    background: var(--gray-200);
    color: var(--gray-500);
}

.repro-status {
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
}

.repro-status.prenha {
    background: #ec4899;
    color: white;
}

.repro-status.vazia {
    background: var(--gray-200);
    color: var(--gray-600);
}

.repro-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.repro-stat-box {
    background: white;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #fce7f3;
    text-align: center;
}

.repro-stat-label {
    font-size: 10px;
    color: var(--gray-500);
    text-transform: uppercase;
    font-weight: 900;
    display: block;
}

.repro-stat-value {
    font-size: 20px;
    font-weight: 900;
    line-height: 1;
    margin-top: 4px;
}

.repro-progress {
    background: white;
    padding: 16px;
    border-radius: 12px;
    border: 1px solid #fce7f3;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.repro-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: end;
    margin-bottom: 8px;
}

.repro-progress-bar {
    width: 100%;
    height: 14px;
    background: var(--gray-100);
    border-radius: 999px;
    border: 1px solid var(--gray-50);
    overflow: hidden;
    margin-bottom: 8px;
}

.repro-progress-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 1s ease-out;
}

.repro-progress-fill.pink {
    background: #ec4899;
}

.repro-progress-fill.red {
    background: #dc2626;
}

.repro-progress-markers {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    padding: 0 4px;
}

.repro-progress-marker {
    width: 4px;
    height: 12px;
    border-radius: 2px;
    background: var(--gray-200);
}

.repro-progress-marker.active {
    background: #ec4899;
}

.repro-progress-marker.final {
    background: #ec4899;
    box-shadow: 0 0 0 2px #fce7f3;
}

.repro-alert {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    margin-top: 16px;
}

.repro-alert.orange {
    background: #fed7aa;
    border: 1px solid #fdba74;
    color: #9a3412;
}

.repro-alert.red {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.repro-alert-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.repro-alert-text {
    font-size: 12px;
    font-weight: 900;
}

/* Birth History Table */
.birth-history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 32px;
}

.birth-history-table thead {
    background: var(--gray-50);
}

.birth-history-table th {
    padding: 16px 24px;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gray-500);
    text-align: left;
}

.birth-history-table tbody tr {
    border-bottom: 1px solid var(--gray-100);
}

.birth-history-table tbody tr:hover {
    background: var(--gray-50);
}

.birth-history-table td {
    padding: 16px 24px;
    color: var(--gray-900);
}

.birth-type-badge {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.birth-type-badge.success {
    background: #dcfce7;
    color: #15803d;
}

.birth-type-badge.danger {
    background: #fee2e2;
    color: #991b1b;
}

/* Genealogy */
.genealogy-section {
    margin-bottom: 32px;
}

.genealogy-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--gray-800);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.genealogy-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.genealogy-card {
    padding: 16px;
    border-radius: 12px;
    border-left: 4px solid;
    cursor: pointer;
    transition: all 0.2s;
}

.genealogy-card.blue {
    background: #dbeafe;
    border-left-color: #2563eb;
}

.genealogy-card.pink {
    background: #fdf2f8;
    border-left-color: #ec4899;
}

.genealogy-card.gray {
    background: var(--gray-50);
    border-left-color: var(--gray-300);
    opacity: 0.5;
}

.genealogy-card:hover:not(.gray) {
    background: #bfdbfe;
}

.genealogy-card.pink:hover:not(.gray) {
    background: #fce7f3;
}

.genealogy-label {
    font-size: 12px;
    text-transform: uppercase;
    font-weight: 900;
    color: var(--gray-500);
    margin-bottom: 4px;
}

.genealogy-value {
    font-size: 18px;
    font-weight: bold;
    color: var(--gray-800);
}

.genealogy-current {
    display: flex;
    justify-content: center;
    margin: 24px 0;
}

.genealogy-current-box {
    background: var(--brand-50);
    border: 2px solid var(--brand-200);
    padding: 16px 32px;
    border-radius: 999px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.genealogy-current-label {
    font-size: 12px;
    color: var(--brand-600);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.genealogy-current-value {
    font-size: 24px;
    font-weight: bold;
    color: var(--gray-800);
    margin-top: 4px;
}

.genealogy-offspring-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}

.genealogy-offspring-card {
    background: white;
    border: 1px solid var(--gray-200);
    padding: 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: box-shadow 0.2s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.genealogy-offspring-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.genealogy-offspring-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.genealogy-offspring-badge {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 999px;
    font-weight: 900;
}

.genealogy-offspring-badge.male {
    background: #dbeafe;
    color: #2563eb;
}

.genealogy-offspring-badge.female {
    background: #fdf2f8;
    color: #ec4899;
}

/* Weight History Table */
.weight-history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 32px;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    overflow: hidden;
}

.weight-history-table thead {
    background: var(--gray-50);
}

.weight-history-table th {
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-600);
    text-align: left;
}

.weight-history-table tbody tr {
    border-bottom: 1px solid var(--gray-100);
}

.weight-history-table tbody tr:hover {
    background: var(--gray-50);
}

.weight-history-table td {
    padding: 12px 16px;
    color: var(--gray-900);
}

.weight-diff {
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

.weight-diff.positive {
    color: #22c55e;
}

.weight-diff.negative {
    color: #dc2626;
}

.weight-diff.neutral {
    color: var(--gray-500);
}

/* Empty States */
.empty-state {
    padding: 48px;
    text-align: center;
    color: var(--gray-400);
    border: 2px dashed var(--gray-300);
    border-radius: 12px;
    background: white;
}

.empty-state-icon {
    font-size: 48px;
    opacity: 0.2;
    margin-bottom: 12px;
}

.empty-state-text {
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {

    .kpi-grid,
    .charts-grid,
    .finance-grid,
    .status-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .weight-chart-container,
    .milk-chart-container {
        flex-direction: column;
    }

    .weight-form-panel {
        width: 100%;
    }

    .repro-panel {
        grid-template-columns: 1fr;
    }

    .genealogy-grid {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        grid-template-columns: 1fr;
    }

    /* Melhore o espaçamento em mobile */
    .page-content {
        padding: 16px 12px;
    }

    /* Reduz o zoom em 15% para aproveitar mais a tela */
    .app-container {
        zoom: 0.85;
        width: 117.6%;
        /* Compensação para o zoom (1 / 0.85 ≈ 1.176) */
        height: 117.6vh;
    }

    /* Ajuste para garantir que nada transborde horizontalmente após o zoom */
    body {
        overflow-x: hidden;
    }

    .page-header {
        flex-direction: column;
        align-items: stretch;
    }

    .header-actions {
        flex-wrap: wrap;
    }

    .filter-chip {
        padding: 6px 16px;
        font-size: 10px;
    }

    .kpi-card {
        padding: 16px;
    }

    /* Melhore as modais em mobile */
    .modal-content {
        max-width: 100%;
        margin: 0;
        border-radius: 16px 16px 0 0;
        position: fixed;
        bottom: 0;
        max-height: 85vh;
    }

    .modal {
        align-items: flex-end;
        padding: 0;
    }

    /* Aumentar tamanhos de toque */
    button,
    .btn-primary,
    .btn-secondary,
    .btn-danger,
    input,
    select,
    .nav-item {
        min-height: 48px;
    }

    .sidebar {
        width: 85%;
        max-width: 300px;
    }

    .modal-form {
        padding: 20px 16px 40px;
        /* Mais espaço embaixo para teclados mobile */
    }
}

/* =========================================================
   Premium Theme Enhancements (visual only, no layout changes)
   ========================================================= */

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
}

.app-container {
    backdrop-filter: blur(24px);
}



/* Main header + content */
.mobile-header {
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: var(--surface-blur);
}

.page-content {
    padding-top: 24px;
}

.page-title {
    font-size: 26px;
    letter-spacing: -0.02em;
}

/* Buttons - softer + more premium */
.btn-primary {
    background: var(--primary);
    box-shadow: 0 4px 14px rgba(6, 182, 212, 0.39);
    border-radius: 14px;
    color: white;
    font-weight: 700;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(6, 182, 212, 0.23);
}

.btn-secondary {
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: var(--surface-blur);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.btn-secondary:hover {
    background: rgba(249, 250, 251, 0.95);
    box-shadow: 0 6px 14px rgba(148, 163, 184, 0.35);
    transform: translateY(-1px);
}

.btn-danger {
    border-radius: 999px;
    box-shadow: 0 12px 26px rgba(239, 68, 68, 0.5);
}

/* Card surfaces (dashboard, tables, etc.) */
.kpi-card,
.chart-card,
.finance-card,
.inventory-card,
.table-container,
.tab-content,
.batch-card,
.category-card {
    padding: 16px;
    border-radius: 14px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.category-card:hover {
    transform: translateY(-2px);
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.category-icon {
    font-size: 20px;
    background: #f1f5f9;
    padding: 8px;
    border-radius: 10px;
}

.category-count {
    text-align: right;
}

.category-count-value {
    font-size: 18px;
    font-weight: 800;
    color: #1e293b;
    line-height: 1;
}

.category-count-label {
    font-size: 9px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.category-name {
    font-size: 14px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 12px;
}

.category-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}

.category-stat-box {
    background: #f8fafc;
    padding: 8px;
    border-radius: 8px;
    border: 1px solid rgba(226, 232, 240, 0.5);
}

.category-stat-label {
    display: block;
    font-size: 9px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.category-stat-value {
    font-size: 15px;
    font-weight: 800;
    color: #1e293b;
}

.category-stat-unit {
    font-size: 10px;
    font-weight: 600;
    color: #94a3b8;
}

/* Nova seção de Ganho */
.category-gain-box {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-gain-label {
    font-size: 10px;
    font-weight: 700;
    color: #059669;
}

.category-gain-value {
    font-size: 12px;
    font-weight: 800;
    color: #047857;
}

.category-sex-header {
    margin-top: 8px;
    margin-bottom: 4px;
}

.category-sex-bar {
    height: 4px;
    border-radius: 2px;
}

/* Valor Total do Rebanho - Card Destacado */
.valor-total-card {
    background: linear-gradient(135deg, #00bcd4 0%, #0097a7 100%);
    border: none;
    border-radius: 24px;
    padding: 32px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 188, 212, 0.2);
    color: #ffffff;
}

.valor-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 16px;
}

.valor-header .kpi-icon {
    font-size: 32px;
}

.valor-header .kpi-label {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-700);
    margin: 0;
}

.valor-principal {
    font-size: 48px;
    font-weight: 900;
    color: #ffffff;
    margin: 8px 0;
    line-height: 1;
}

@media (max-width: 768px) {
    .valor-principal {
        font-size: 32px;
    }

    .valor-total-card {
        padding: 24px 16px;
    }
}

.valor-header .kpi-label {
    color: rgba(255, 255, 255, 0.9);
}

.valor-detalhes {
    color: rgba(255, 255, 255, 0.8);
}

.valor-detalhes {
    font-size: 14px;
    color: var(--gray-600);
    font-weight: 500;
    margin-top: 12px;
}

/* Responsivo */
@media (max-width: 1024px) {
    .cotacoes-grid {
        grid-template-columns: 1fr;
    }

    .metricas-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .charts-grid {
        grid-template-columns: 1fr !important;
        gap: 16px;
    }

    .chart-card {
        padding: 16px;
    }

    .chart-title {
        font-size: 16px;
    }
}

@media (max-width: 640px) {
    .valor-total-card {
        padding: 24px;
    }

    .valor-principal {
        font-size: 32px;
    }
}

/* === Premium Detail Stats Cards === */
.detail-stats-premium {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    max-width: 100%;
}

@media (max-width: 768px) {
    .detail-stats-premium {
        gap: 12px;
    }
}

.stat-card-header {
    flex: 1;
    min-width: 280px;
    background: white;
    padding: 24px;
    border-radius: 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(226, 232, 240, 0.8);
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card-header:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

.stat-header-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-label {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: #64748b;
    text-transform: uppercase;
}

.stat-main-value {
    font-size: 42px;
    font-weight: 900;
    line-height: 1;
    color: #16a34a;
    /* Green for weight */
}

.stat-main-value.red {
    color: #ef4444;
    /* Red for cost */
}

.stat-header-details {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border-radius: 12px;
    padding: 12px;
    gap: 12px;
}

.stat-detail-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.stat-detail-item span {
    font-size: 16px;
    font-weight: 800;
    color: #1e293b;
}

.stat-detail-item label {
    font-size: 9px;
    font-weight: 700;
    color: #94a3b8;
    margin-top: 2px;
}

.stat-separator {
    width: 1px;
    height: 24px;
    background: #e2e8f0;
}

@media (max-width: 640px) {
    .stat-main-value {
        font-size: 32px;
    }

    .stat-card-header {
        min-width: 100%;
    }
}

/* === Ranking Page Styles === */
.ranking-dashboard {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.ranking-stat-card {
    background: white;
    padding: 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0, 0, 0, 0.02);
    display: flex;
    align-items: center;
    gap: 16px;
    border-left: 6px solid var(--sidebar-bg);
    /* Teal accent */
}

.ranking-stat-card.blue {
    border-left-color: var(--primary);
}

.ranking-stat-card.orange {
    border-left-color: var(--accent-orange);
}

.ranking-stat-icon {
    font-size: 28px;
    color: var(--sidebar-bg);
}

.ranking-stat-card.blue .ranking-stat-icon {
    color: var(--primary);
}

.ranking-stat-card.orange .ranking-stat-icon {
    color: var(--accent-orange);
}

.ranking-stat-info label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ranking-stat-info span {
    font-size: 24px;
    font-weight: 800;
    color: #1e293b;
}

.tag-ready-to-sell {
    background: #ecfdf5;
    color: #0d9488;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    border: 1px solid #99f6e4;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 10px rgba(13, 148, 136, 0.1);
}

@keyframes bounce-soft {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-2px);
    }
}

/* === Ocultar Abas Removidas === */
.tab[data-tab="genealogy"],
.tab[data-tab="health"],
.tab[data-tab="finance"],
#tab-genealogy,
#tab-health,
#tab-finance {
    display: none !important;
}

/* Batch Cards Premium */
.batch-card {
    background: white;
    padding: 24px;
    border-radius: 22px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0, 188, 212, 0.05);
    display: flex;
    flex-direction: column;
    gap: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.batch-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 188, 212, 0.12);
    border-color: rgba(0, 188, 212, 0.2);
}

.batch-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: var(--primary);
    opacity: 0.8;
}

.batch-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.batch-card-icon {
    width: 44px;
    height: 44px;
    background: rgba(0, 188, 212, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--primary);
}

.batch-card-title {
    font-size: 18px;
    font-weight: 800;
    color: #1e293b;
}

.batch-card-badge {
    background: #f1f5f9;
    color: #64748b;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.batch-card-desc {
    font-size: 13px;
    color: #64748b;
    line-height: 1.5;
    margin: 0;
}

.batch-card-footer {
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.batch-card-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: #334155;
}

.batch-card-stat i {
    color: #94a3b8;
}

/* Estilos Vibrantes para Linhas de Tabela */
.row-male {
    background-color: rgba(0, 188, 212, 0.02) !important;
    border-left: 4px solid #00bcd4 !important;
}

.row-female {
    background-color: rgba(236, 72, 153, 0.02) !important;
    border-left: 4px solid #ec4899 !important;
}

tbody tr {
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.02) !important;
    transform: scale(1.002);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.02);
}

/* Zebra striping suave para melhorar leitura */
tbody tr:nth-child(even):not(.row-male):not(.row-female) {
    background-color: #f8fafc;
}

/* Ajuste nas Tabelas para visual "Glass" */
.table-container {
    background: white;
    border-radius: 20px;
    padding: 10px;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

table thead th {
    background: #f1f5f9;
    color: #475569;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    padding: 15px 20px;
}