/**
 * Individuals Tab and Detail Modal Styles
 *
 * Styling for the two-tier modal system:
 * - Individuals tab within farm management modal
 * - Nested individual detail modal (z-index: 20000)
 */

/* ==========================================
   INDIVIDUALS TAB STYLES
   ========================================== */

.individuals-tab-container {
    padding: 0;
    background: #fff;
    min-height: 400px;
}

/* Sub-tabs for Plants | Animals | Equipment */
.individuals-subtabs {
    display: flex;
    border-bottom: 2px solid #e9ecef;
    background: #f8f9fa;
    padding: 0 15px;
}

.individuals-subtab-btn {
    padding: 12px 20px;
    border: none;
    background: transparent;
    color: #6c757d;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.individuals-subtab-btn:hover {
    color: #198754;
    background: rgba(25, 135, 84, 0.05);
}

.individuals-subtab-btn.active {
    color: #198754;
}

.individuals-subtab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: #198754;
    border-radius: 3px 3px 0 0;
}

.individuals-subtab-btn i {
    font-size: 14px;
}

/* Toolbar */
.individuals-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 15px;
    background: #fff;
    border-bottom: 1px solid #e9ecef;
    align-items: center;
}

.individuals-search {
    flex: 1;
    min-width: 200px;
    max-width: 300px;
}

.individuals-search .search-input {
    width: 100%;
    padding: 8px 12px 8px 36px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.individuals-search .search-input:focus {
    border-color: #198754;
    box-shadow: 0 0 0 3px rgba(25, 135, 84, 0.15);
    outline: none;
}

.individuals-search .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

.individuals-filters {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.individuals-filters select {
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
    min-width: 120px;
}

.individuals-filters select:focus {
    border-color: #198754;
    outline: none;
}

.individuals-actions {
    display: flex;
    gap: 8px;
    margin-left: auto;
}

/* Grid Layout */
.individuals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
    padding: 15px;
}

/* Individual Card */
.individual-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.individual-card:hover {
    border-color: #198754;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.individual-card.selected {
    border-color: #198754;
    background: rgba(25, 135, 84, 0.05);
}

.individual-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.individual-code {
    font-weight: 600;
    font-size: 16px;
    color: #212529;
}

.individual-checkbox {
    position: absolute;
    top: 12px;
    right: 12px;
}

.individual-checkbox input {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.individual-card-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.individual-detail {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #6c757d;
}

.individual-detail-label {
    color: #6c757d;
}

.individual-detail-value {
    color: #212529;
    font-weight: 500;
}

.individual-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge.status-active,
.status-badge.status-growing,
.status-badge.status-planted {
    background: #d1e7dd;
    color: #0a5c36;
}

.status-badge.status-harvested,
.status-badge.status-sold {
    background: #cff4fc;
    color: #055160;
}

.status-badge.status-deceased,
.status-badge.status-removed,
.status-badge.status-decommissioned {
    background: #f8d7da;
    color: #842029;
}

.status-badge.status-transferred {
    background: #fff3cd;
    color: #664d03;
}

.status-badge.status-diseased {
    background: #f5c6cb;
    color: #721c24;
}

/* Stage Badges */
.stage-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
}

.stage-badge.stage-planted {
    background: #e8f5e9;
    color: #2e7d32;
}

.stage-badge.stage-growing {
    background: #e3f2fd;
    color: #1565c0;
}

.stage-badge.stage-flowering {
    background: #fce4ec;
    color: #c2185b;
}

.stage-badge.stage-fruiting {
    background: #fff3e0;
    color: #e65100;
}

.stage-badge.stage-harvested {
    background: #f3e5f5;
    color: #7b1fa2;
}

/* Condition Badges */
.condition-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.condition-badge.condition-new {
    background: #d1e7dd;
    color: #0a5c36;
}

.condition-badge.condition-good {
    background: #cff4fc;
    color: #055160;
}

.condition-badge.condition-fair {
    background: #fff3cd;
    color: #664d03;
}

.condition-badge.condition-poor {
    background: #f8d7da;
    color: #842029;
}

.condition-badge.condition-out_of_service {
    background: #e2e3e5;
    color: #41464b;
}

/* Table View */
.individuals-table {
    width: 100%;
    border-collapse: collapse;
}

.individuals-table th,
.individuals-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.individuals-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.individuals-table tr:hover {
    background: rgba(25, 135, 84, 0.03);
    cursor: pointer;
}

.individuals-table .select-col {
    width: 40px;
}

/* Pagination */
.individuals-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
}

.pagination-info {
    font-size: 14px;
    color: #6c757d;
}

.pagination-buttons {
    display: flex;
    gap: 5px;
}

.pagination-buttons button {
    padding: 6px 12px;
    border: 1px solid #ced4da;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.pagination-buttons button:hover:not(:disabled) {
    border-color: #198754;
    color: #198754;
}

.pagination-buttons button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-buttons button.active {
    background: #198754;
    color: #fff;
    border-color: #198754;
}

/* Bulk Actions Bar */
.bulk-actions-bar {
    display: none;
    position: sticky;
    bottom: 0;
    background: #212529;
    color: #fff;
    padding: 12px 20px;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
}

.bulk-actions-bar.show {
    display: flex;
}

.bulk-actions-bar .selected-count {
    font-weight: 500;
}

.bulk-actions-bar .bulk-buttons {
    display: flex;
    gap: 10px;
}

.bulk-actions-bar button {
    padding: 6px 16px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    font-size: 14px;
}

.bulk-actions-bar .btn-bulk-action {
    background: #198754;
    color: #fff;
}

.bulk-actions-bar .btn-bulk-cancel {
    background: transparent;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Empty State */
.individuals-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    color: #6c757d;
}

.individuals-empty i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.individuals-empty h4 {
    margin-bottom: 8px;
    color: #495057;
}

.individuals-empty p {
    margin-bottom: 20px;
}

/* Loading State */
.individuals-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
}

/* ==========================================
   INDIVIDUAL DETAIL MODAL STYLES
   ========================================== */

.individual-detail-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 19999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.individual-detail-overlay.show {
    opacity: 1;
    visibility: visible;
}

.individual-detail-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    z-index: 20000;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.individual-detail-modal.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

body.individual-modal-open {
    overflow: hidden;
}

/* Modal Header */
.individual-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
    border-radius: 12px 12px 0 0;
}

.individual-detail-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.individual-type-badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.individual-type-badge.badge-plant {
    background: #d4edda;
    color: #155724;
}

.individual-type-badge.badge-animal {
    background: #fff3cd;
    color: #856404;
}

.individual-type-badge.badge-equipment-unit {
    background: #cce5ff;
    color: #004085;
}

.individual-detail-title h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.individual-detail-actions {
    display: flex;
    gap: 8px;
}

.individual-detail-actions .btn {
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-close {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #6c757d;
    transition: all 0.2s;
}

.btn-close:hover {
    background: #e9ecef;
    color: #212529;
}

/* Modal Tabs */
.individual-detail-tabs {
    border-bottom: 1px solid #e9ecef;
    background: #fff;
    overflow-x: auto;
}

.individual-tab-list {
    display: flex;
    padding: 0 10px;
    min-width: max-content;
}

.individual-tab-btn {
    padding: 12px 16px;
    border: none;
    background: transparent;
    color: #6c757d;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
    white-space: nowrap;
    transition: color 0.2s;
}

.individual-tab-btn:hover {
    color: #198754;
}

.individual-tab-btn.active {
    color: #198754;
}

.individual-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #198754;
}

.individual-tab-btn i {
    font-size: 12px;
}

/* Modal Content */
.individual-detail-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
}

/* Loading Overlay */
.individual-detail-loading {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

/* ==========================================
   OVERVIEW TAB STYLES
   ========================================== */

.overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.overview-section {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
}

.overview-section.full-width {
    grid-column: 1 / -1;
}

.overview-section h4 {
    margin: 0 0 12px 0;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    color: #6c757d;
    font-size: 13px;
}

.detail-value {
    color: #212529;
    font-weight: 500;
    font-size: 13px;
    text-align: right;
}

.notes-text {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #495057;
}

/* ==========================================
   CHILD RECORDS SECTION STYLES
   ========================================== */

.child-records-section {
    margin-bottom: 24px;
}

.child-records-section:last-child {
    margin-bottom: 0;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.section-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #212529;
}

/* Timeline Styles */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e9ecef;
}

.timeline-item {
    position: relative;
    padding-bottom: 20px;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -26px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #198754;
    border: 2px solid #fff;
    box-shadow: 0 0 0 2px #e9ecef;
}

.timeline-item.current .timeline-marker {
    background: #0d6efd;
}

.timeline-content {
    background: #f8f9fa;
    padding: 12px 16px;
    border-radius: 8px;
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.timeline-date {
    font-size: 12px;
    color: #6c757d;
}

.timeline-notes {
    font-size: 13px;
    color: #495057;
    margin-top: 8px;
}

/* Cards Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
}

.event-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 12px;
    border-left: 4px solid #6c757d;
}

.event-card.severity-low {
    border-left-color: #ffc107;
}

.event-card.severity-medium {
    border-left-color: #fd7e14;
}

.event-card.severity-high {
    border-left-color: #dc3545;
}

.event-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.event-type {
    font-weight: 600;
    font-size: 13px;
}

.event-date {
    font-size: 12px;
    color: #6c757d;
}

.event-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.severity-badge {
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    text-transform: uppercase;
    background: #e9ecef;
    color: #495057;
}

.event-action {
    font-size: 12px;
    color: #6c757d;
    margin-top: 8px;
    font-style: italic;
}

/* Tables */
.table {
    width: 100%;
    margin-bottom: 0;
}

.table-sm th,
.table-sm td {
    padding: 8px 12px;
    font-size: 13px;
}

.table thead th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #e9ecef;
}

.table tbody tr:hover {
    background: rgba(25, 135, 84, 0.03);
}

.overdue-row {
    background: #fff5f5;
}

.text-danger {
    color: #dc3545;
}

.text-success {
    color: #198754;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.empty-state.small {
    padding: 20px;
}

.empty-state i {
    font-size: 32px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.empty-state p {
    margin: 0;
    font-size: 14px;
}

/* ==========================================
   FINANCIAL SUMMARY STYLES
   ========================================== */

.financial-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.summary-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}

.summary-card .label {
    display: block;
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 4px;
    text-transform: uppercase;
}

.summary-card .value {
    font-size: 20px;
    font-weight: 600;
}

.summary-card.costs .value {
    color: #dc3545;
}

.summary-card.revenue .value {
    color: #198754;
}

.summary-card.profit .value {
    color: #198754;
}

.summary-card.loss .value {
    color: #dc3545;
}

.type-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    text-transform: uppercase;
}

.type-badge.cost {
    background: #f8d7da;
    color: #721c24;
}

.type-badge.revenue {
    background: #d4edda;
    color: #155724;
}

/* ==========================================
   DOCUMENTS GRID STYLES
   ========================================== */

.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
}

.document-card {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
}

.document-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e9ecef;
    border-radius: 8px;
    color: #6c757d;
}

.document-info {
    flex: 1;
    min-width: 0;
}

.document-name {
    display: block;
    font-weight: 500;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.document-type {
    font-size: 11px;
    color: #6c757d;
}

/* ==========================================
   ACTIVITY LOG STYLES
   ========================================== */

.activity-timeline {
    border-left: 2px solid #e9ecef;
    padding-left: 20px;
    margin-left: 10px;
}

.activity-item {
    position: relative;
    padding-bottom: 16px;
}

.activity-item::before {
    content: '';
    position: absolute;
    left: -25px;
    top: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6c757d;
}

.activity-time {
    font-size: 11px;
    color: #6c757d;
    margin-bottom: 4px;
}

.activity-content {
    font-size: 13px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.activity-action {
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    background: #e9ecef;
}

.activity-action.action-create {
    background: #d4edda;
    color: #155724;
}

.activity-action.action-update {
    background: #cce5ff;
    color: #004085;
}

.activity-action.action-delete {
    background: #f8d7da;
    color: #721c24;
}

.activity-field {
    color: #495057;
}

.old-value {
    text-decoration: line-through;
    color: #dc3545;
}

.new-value {
    color: #198754;
}

.activity-actor {
    font-size: 11px;
    color: #6c757d;
    font-style: italic;
    margin-top: 4px;
}

/* ==========================================
   OFFSPRING & LINEAGE STYLES
   ========================================== */

.offspring-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}

.offspring-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.offspring-card:hover {
    background: #e9ecef;
}

.relationship-badge {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 10px;
    text-transform: uppercase;
    background: #cce5ff;
    color: #004085;
    margin-bottom: 6px;
}

.offspring-details {
    display: block;
    font-size: 12px;
    color: #6c757d;
    margin-top: 4px;
}

/* Lineage Link */
.lineage-link {
    color: #0d6efd;
    text-decoration: none;
}

.lineage-link:hover {
    text-decoration: underline;
}

/* ==========================================
   MOVEMENT PATH STYLES
   ========================================== */

.movement-path {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
}

.from-location,
.to-location {
    padding: 4px 10px;
    background: #e9ecef;
    border-radius: 4px;
    font-size: 13px;
}

.to-location {
    background: #d4edda;
    color: #155724;
}

.movement-reason {
    font-size: 12px;
    color: #6c757d;
    margin-top: 6px;
}

/* ==========================================
   IDENTIFICATION CARD STYLES
   ========================================== */

.identification-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
}

.identification-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.identification-body {
    padding: 12px;
}

.identification-date {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 8px;
}

.confidence-bar {
    position: relative;
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

.confidence-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #ffc107, #198754);
    border-radius: 10px;
    transition: width 0.3s;
}

.confidence-bar span {
    position: relative;
    z-index: 1;
    display: block;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    line-height: 20px;
}

/* ==========================================
   SUMMARY ROWS
   ========================================== */

.harvest-summary,
.usage-summary {
    margin-top: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
    font-size: 14px;
}

/* ==========================================
   QUICK FORM MODAL
   ========================================== */

.quick-form-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 30000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-form-content {
    background: #fff;
    border-radius: 8px;
    padding: 24px;
    width: 90%;
    max-width: 400px;
}

.quick-form-content h4 {
    margin: 0 0 20px 0;
    font-size: 18px;
}

.quick-form-content .form-group {
    margin-bottom: 16px;
}

.quick-form-content label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 13px;
}

.quick-form-content .form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 6px;
    font-size: 14px;
}

.quick-form-content .form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* ==========================================
   MOBILE RESPONSIVE STYLES
   ========================================== */

@media (max-width: 768px) {
    /* Individuals Tab */
    .individuals-subtabs {
        overflow-x: auto;
        padding: 0 10px;
    }

    .individuals-subtab-btn {
        padding: 10px 14px;
        font-size: 13px;
    }

    .individuals-subtab-btn .tab-label {
        display: none;
    }

    .individuals-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .individuals-search {
        max-width: none;
    }

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

    .individuals-filters select {
        flex: 1;
        min-width: 0;
    }

    .individuals-actions {
        justify-content: flex-end;
        margin-left: 0;
    }

    .individuals-grid {
        grid-template-columns: 1fr;
    }

    /* Detail Modal - Full Screen Drawer */
    .individual-detail-modal {
        position: fixed;
        top: auto;
        left: 0;
        right: 0;
        bottom: 0;
        transform: translateY(100%);
        width: 100%;
        max-width: none;
        max-height: 95vh;
        border-radius: 20px 20px 0 0;
    }

    .individual-detail-modal.show {
        transform: translateY(0);
    }

    .individual-detail-header {
        border-radius: 20px 20px 0 0;
    }

    .individual-detail-title {
        flex-wrap: wrap;
        gap: 8px;
    }

    .individual-detail-title h3 {
        font-size: 16px;
    }

    .individual-detail-actions {
        flex-wrap: wrap;
        justify-content: flex-end;
    }

    .individual-detail-actions .btn span {
        display: none;
    }

    .individual-tab-list {
        padding: 0 5px;
    }

    .individual-tab-btn {
        padding: 10px 12px;
        font-size: 12px;
    }

    .individual-tab-btn .tab-label {
        display: none;
    }

    .individual-detail-content {
        padding: 16px;
    }

    .overview-grid {
        grid-template-columns: 1fr;
    }

    .financial-summary {
        grid-template-columns: 1fr;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .documents-grid {
        grid-template-columns: 1fr;
    }

    .offspring-grid {
        grid-template-columns: 1fr 1fr;
    }

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

@media (max-width: 480px) {
    .individuals-subtab-btn {
        padding: 8px 12px;
    }

    .individual-card {
        padding: 12px;
    }

    .individual-code {
        font-size: 14px;
    }

    .bulk-actions-bar {
        flex-direction: column;
        gap: 10px;
        padding: 10px 15px;
    }

    .bulk-buttons {
        width: 100%;
        justify-content: stretch;
    }

    .bulk-buttons button {
        flex: 1;
    }

    .offspring-grid {
        grid-template-columns: 1fr;
    }
}
