/* Care at Home Dashboard Styles */

:root {
    --primary-blue: #0097b2;
    --secondary-blue: #007a91;
    --light-blue: #e0f6fb;
    --success-green: #10B981;
    --warning-yellow: #F59E0B;
    --danger-red: #EF4444;
    --light-gray: #F8FAFC;
    --medium-gray: #64748B;
    --dark-gray: #1E293B;
    --border-color: #E2E8F0;
    --care-primary: #0097b2;
    --care-secondary: #007a91;
    --primary-color: #0097b2;
}

/* NUCLEAR OPTION - REMOVE ALL TABLE BORDERS */
* {
    --bs-border-width: 0 !important;
    --bs-table-border-color: transparent !important;
}

/* Bootstrap 5 specific table border removal */
.table,
.table * {
    border: none !important;
    border-width: 0 !important;
    border-color: transparent !important;
}

.table > :not(caption) > * > *,
.table > thead > tr > th,
.table > thead > tr > td,
.table > tbody > tr > th,
.table > tbody > tr > td,
.table > tfoot > tr > th,
.table > tfoot > tr > td {
    border-bottom-width: 0 !important;
    border-top-width: 0 !important;
    border-left-width: 0 !important;
    border-right-width: 0 !important;
    border: none !important;
}

/* Target specific Bootstrap table classes */
.table-bordered,
.table-bordered > :not(caption) > *,
.table-bordered > :not(caption) > * > * {
    border-width: 0 !important;
}

.table-hover > tbody > tr:hover > * {
    border-color: transparent !important;
}

/* Override any remaining table styles */
table, th, td, tr, thead, tbody, tfoot {
    border: none !important;
    border-collapse: separate !important;
}

/* Specifically target table headers */
thead th, thead td, th, .table th, .table thead th {
    border-bottom: none !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
    border-width: 0 !important;
    border-color: transparent !important;
    border-style: none !important;
}

/* Global Styles */
body {
    font-family: 'Calibri', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f6fa;
    color: #2c3e50;
    line-height: 1.6;
}

/* Ensure Calibri is applied to all text elements */
* {
    font-family: 'Calibri', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Main Content */
.main-content {
    padding-bottom: 80px;
    min-height: calc(100vh - 200px);
}

/* Header Styles */
.header-section {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    padding: 5px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    min-height: 60px;
    overflow: hidden;
}

.logo-section {
    color: white;
    min-height: 60px;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
}

.carelogr-logo {
    width: 200px !important;
    height: 60px !important;
    object-fit: contain !important;
    display: block !important;
    /* Fixed size - all logos will appear exactly the same size */
}

.carelogr-logo-login {
    max-width: 400px;
    width: 100%;
    height: 150px;
    object-fit: contain;
    margin-bottom: 1.5rem;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.logo-icon {
    font-size: 2rem;
}

.logo-text {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
}

.logo-text small {
    font-size: 10px;
    opacity: 0.8;
}

/* Navigation Styles */
.nav-section {
    min-height: 40px;
    display: flex !important;
    align-items: center !important;
}

.nav-section .nav-pills .nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    background: transparent !important;
    border-radius: 8px !important;
    padding: 8px 15px !important;
    margin: 0 3px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    border: none !important;
    white-space: nowrap !important;
}

.nav-section .nav-pills .nav-link:hover {
    color: white;
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-section .nav-pills .nav-link.active {
    color: white;
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* User Section */
.user-section {
    display: flex;
    align-items: center;
    color: white;
}

.notification-icon {
    font-size: 1.2rem;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.notification-icon:hover {
    transform: scale(1.1);
}

.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.avatar-circle:hover {
    transform: scale(1.05);
}

/* Dashboard Styles */
.dashboard-header {
    margin-bottom: 30px;
}

.dashboard-badge {
    background-color: var(--primary-blue);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    display: inline-block;
    margin-bottom: 10px;
}

.dashboard-title {
    color: white;
    font-size: 2.5rem;
    font-weight: 600;
    margin: 0;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Statistics Cards */
.stat-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    height: 120px;
    border: 1px solid var(--border-color);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.stat-icon {
    background: var(--light-blue);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    flex-shrink: 0;
}

.stat-icon i {
    font-size: 1.5rem;
    color: var(--primary-blue);
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--medium-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

/* Page Headers */
.page-header h1 {
    color: var(--dark-gray);
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.page-header p {
    color: var(--medium-gray);
    margin-bottom: 0;
}

/* Table Styles */
.table-section {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.table-section .table {
    margin-bottom: 0;
}

.table-section .table th {
    background-color: var(--light-gray);
    color: var(--dark-gray);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-color);
    padding: 15px 12px;
}

.table-section .table td {
    padding: 12px;
    vertical-align: middle;
    border-bottom: 1px solid #f1f3f4;
    font-size: 14px;
}

.table-section .table tr:hover {
    background-color: rgba(74, 108, 247, 0.02);
}

.table-section .table tr:last-child td {
    border-bottom: none;
}

/* Shift Information Styling */
.shift-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.shift-type {
    background-color: var(--success-green);
    color: white;
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    display: inline-block;
    width: fit-content;
}

.shift-time {
    font-size: 11px;
    color: var(--medium-gray);
    font-weight: 500;
}

/* Table Controls */
.table-info {
    font-size: 14px;
    color: var(--medium-gray);
}

.table-controls .form-select {
    font-size: 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 6px 12px;
}

/* Schedule Cards */
.schedule-section {
    margin-top: 20px;
}

.schedule-card {
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    overflow: hidden;
}

.schedule-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.schedule-header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    color: white;
    padding: 15px 20px;
}

.schedule-header h6 {
    margin: 0;
    font-weight: 600;
}

.schedule-body {
    padding: 20px;
}

.schedule-body > div {
    margin-bottom: 12px;
}

.schedule-body > div:last-child {
    margin-bottom: 0;
}

.business-unit, .job-title {
    font-size: 14px;
    color: var(--dark-gray);
}

.business-unit i, .job-title i {
    color: var(--primary-blue);
    width: 16px;
}

.shift-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f1f3f4;
}

.space-info {
    font-size: 13px;
    color: var(--medium-gray);
}

.space-info i {
    color: var(--danger-red);
}

.schedule-footer {
    padding: 15px 20px;
    background-color: var(--light-gray);
    border-top: 1px solid #f1f3f4;
}

.assignment-status .badge {
    font-size: 12px;
    padding: 6px 10px;
}

/* Badges and Status */
.badge {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
}

.badge i {
    margin-right: 3px;
}

/* Buttons */
.btn {
    border-radius: 6px;
    font-weight: 500;
    padding: 6px 12px;
    font-size: 13px;
    transition: all 0.3s ease;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 12px;
}

.btn-outline-primary {
    color: var(--primary-blue);
    border-color: var(--primary-blue);
}

.btn-outline-primary:hover {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
}

.btn-outline-primary.active {
    background-color: #5a6268 !important;
    border-color: #545b62 !important;
    color: white !important;
}

.btn-outline-primary.active:hover {
    background-color: #5a6268 !important;
    border-color: #545b62 !important;
    color: white !important;
}

.btn-outline-primary.active:focus {
    background-color: #5a6268 !important;
    border-color: #545b62 !important;
    color: white !important;
    box-shadow: 0 0 0 0.2rem rgba(90, 98, 104, 0.5) !important;
}

.btn-outline-secondary {
    color: var(--medium-gray);
    border-color: var(--medium-gray);
}

.btn-outline-success {
    color: var(--success-green);
    border-color: var(--success-green);
}

/* Pagination */
.pagination {
    margin-top: 20px;
}

.pagination .page-link {
    color: var(--primary-blue);
    border: 1px solid var(--border-color);
    padding: 8px 12px;
    font-size: 14px;
}

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

.pagination .page-item.active .page-link {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
}

/* Sortable Table Headers */
.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: color 0.3s ease;
}

.sortable:hover {
    color: var(--primary-blue);
}

.sortable:after {
    content: '\f0dc';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.3;
    font-size: 10px;
}

.sortable:hover:after {
    opacity: 0.6;
}

/* Responsive Design */

/* Large Desktop - More space for navigation */
@media (min-width: 1400px) {
    .nav-section .nav-pills .nav-link {
        padding: 8px 18px !important;
        font-size: 14px;
    }
}

/* Medium Desktop - Compact but readable navigation */
@media (max-width: 1399px) and (min-width: 1200px) {
    .nav-section .nav-pills .nav-link {
        padding: 6px 12px !important;
        font-size: 13px;
        margin: 0 2px !important;
    }
}

/* Small Desktop - Very compact navigation */
@media (max-width: 1199px) and (min-width: 992px) {
    .nav-section .nav-pills .nav-link {
        padding: 4px 6px !important;
        font-size: 11px;
        margin: 0 1px !important;
    }
    
    /* Adjust column layout for better navigation space */
    .header-section .col-md-3:first-child {
        flex: 0 0 18%;
        max-width: 18%;
    }
    
    .header-section .col-md-6 {
        flex: 0 0 64%;
        max-width: 64%;
    }
    
    .header-section .col-md-3:last-child {
        flex: 0 0 18%;
        max-width: 18%;
    }
}

/* Extra compact for screens between 992px and 1100px */
@media (max-width: 1100px) and (min-width: 992px) {
    .nav-section .nav-pills .nav-link {
        padding: 3px 5px !important;
        font-size: 10px;
        margin: 0 0px !important;
    }
    
    .header-section .col-md-3:first-child {
        flex: 0 0 16%;
        max-width: 16%;
    }
    
    .header-section .col-md-6 {
        flex: 0 0 68%;
        max-width: 68%;
    }
    
    .header-section .col-md-3:last-child {
        flex: 0 0 16%;
        max-width: 16%;
    }
}

@media (max-width: 768px) {
    .header-section {
        padding: 10px 0;
    }
    
    .logo-section {
        margin-bottom: 10px;
    }
    
    .nav-section {
        margin-bottom: 10px;
    }
    
    .nav-section .nav-pills .nav-link {
        padding: 6px 10px;
        font-size: 13px;
    }
    
    .user-section {
        justify-content: center;
    }
    
    .dashboard-title {
        font-size: 1.8rem;
    }
    
    .stat-card {
        padding: 20px;
        height: auto;
        flex-direction: column;
        text-align: center;
    }
    
    .stat-icon {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .stat-value {
        font-size: 2rem;
    }
    
    .schedule-card {
        margin-bottom: 15px;
    }
    
    .shift-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .table-responsive {
        border-radius: 0;
    }
    
    .table-section .table td,
    .table-section .table th {
        padding: 8px 6px;
        font-size: 13px;
    }
}

@media (max-width: 576px) {
    .nav-section .nav-pills {
        flex-wrap: wrap;
        gap: 5px;
    }
    
    .nav-section .nav-pills .nav-link {
        flex: 1;
        min-width: calc(50% - 2.5px);
        text-align: center;
        padding: 8px 6px;
        font-size: 12px;
    }
    
    .dashboard-title {
        font-size: 1.5rem;
    }
    
    .page-header h1 {
        font-size: 1.5rem;
    }
    
    .stat-value {
        font-size: 1.8rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading States */
.loading {
    position: relative;
}

.loading:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

/* Dropdown Menu Fixes - Don't interfere with custom dropdowns */
.dropdown-menu:not(.custom-dropdown-menu) {
    z-index: 9999 !important;
    position: absolute !important;
    display: none;
    min-width: 200px !important;
    padding: 8px 0 !important;
    margin: 2px 0 0 !important;
    font-size: 14px !important;
    color: #212529 !important;
    text-align: left !important;
    list-style: none !important;
    background-color: #fff !important;
    background-clip: padding-box !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    border-radius: 8px !important;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175) !important;
}

.dropdown-menu.show {
    display: block !important;
}

.dropdown-menu-end {
    right: 0 !important;
    left: auto !important;
}

/* User dropdown specific fixes */
.header-section .dropdown {
    position: relative !important;
}

.header-section .dropdown-menu {
    position: absolute !important;
    top: 100% !important;
    right: 0 !important;
    left: auto !important;
    z-index: 9999 !important;
    transform: none !important;
    will-change: auto !important;
}

/* Ensure header section doesn't clip dropdowns */
.header-section {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    padding: 5px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 20px;
    min-height: 60px;
    overflow: visible !important; /* Changed from hidden to visible */
    position: relative !important;
    z-index: 100 !important;
}

/* User section positioning */
.user-section {
    position: relative !important;
    z-index: 200 !important;
}

/* Dropdown items styling */
.dropdown-item {
    display: block !important;
    width: 100% !important;
    padding: 8px 16px !important;
    clear: both !important;
    font-weight: 400 !important;
    color: #212529 !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    background-color: transparent !important;
    border: 0 !important;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out !important;
}

.dropdown-item:hover,
.dropdown-item:focus {
    color: #16181b !important;
    background-color: #f8f9fa !important;
}

.dropdown-divider {
    height: 0 !important;
    margin: 8px 0 !important;
    overflow: hidden !important;
    border-top: 1px solid #dee2e6 !important;
}

.dropdown-header {
    display: block !important;
    padding: 8px 16px !important;
    margin-bottom: 0 !important;
    font-size: 12px !important;
    color: #6c757d !important;
    white-space: nowrap !important;
}

/* Training status boxes */
.status-box {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: help;
}

.status-box.status-none,
.status-box.status-not_completed {
    background-color: #6c757d;
}

.status-box.status-expired {
    background-color: #dc3545;
}

.status-box.status-due-soon {
    background-color: #ffc107;
}

.status-box.status-current {
    background-color: #28a745;
}

/* Legend boxes */
.legend-box {
    width: 25px;
    height: 25px;
    border-radius: 5px;
    display: inline-block;
    vertical-align: middle;
}

.legend-box.status-none {
    background-color: #6c757d;
}

.legend-box.status-expired {
    background-color: #dc3545;
}

.legend-box.status-due-soon {
    background-color: #ffc107;
}

.legend-box.status-current {
    background-color: #28a745;
}

/* Overview Page Styles */
.overview-tabs .nav-tabs {
    border-bottom: 2px solid var(--border-color);
}

.overview-tabs .nav-link {
    color: var(--medium-gray);
    border: none;
    border-bottom: 3px solid transparent;
    background: none;
    font-weight: 500;
    padding: 12px 24px;
}

.overview-tabs .nav-link.active {
    color: var(--primary-color);
    background: none;
    border-bottom-color: var(--primary-color);
}

.overview-tabs .nav-link:hover {
    color: var(--primary-color);
    border-color: transparent;
}

/* Compliance Status Indicators */
.compliance-status {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 5px;
}

.compliance-status.critical {
    background-color: var(--danger-red);
    color: white;
}

.compliance-status.perfect {
    background-color: var(--success-green);
    color: white;
}

/* Card Improvements */
.card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
}

/* Status Filter Styles */
.status-filters {
    margin-bottom: 20px;
}

.status-filter-btn {
    border: 1px solid var(--border-color);
    background: white;
    color: var(--medium-gray);
    padding: 8px 16px;
    margin-right: 10px;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.status-filter-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.status-filter-btn:hover {
    background-color: var(--light-blue);
    color: var(--primary-color);
    text-decoration: none;
}

/* Customer/Workforce Table Styles */
.table-actions {
    display: flex;
    gap: 5px;
}

.btn-action {
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 4px;
}

/* Branch Selector */
.branch-selector {
    position: absolute;
    top: 20px;
    right: 20px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 8px 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Add Customer Form */
.add-customer-form {
    background: white;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dark-gray);
}

.form-control {
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 14px;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

/* Chart Container Improvements */
.chart-container {
    position: relative;
    height: 300px;
}

canvas {
    max-height: 100% !important;
}

/* Enhanced Stat Cards */
.stat-card.bg-light {
    background-color: #f8f9fa !important;
    border: 1px solid var(--border-color);
    padding: 30px 20px;
}

.stat-value.display-4 {
    font-size: 3rem;
    color: var(--primary-color) !important;
}

.stat-value.display-4.fw-bold {
    color: var(--primary-color) !important;
}

/* Print Styles */
@media print {
    .header-section,
    .pagination,
    .btn,
    .overview-tabs {
        display: none !important;
    }
    
    .main-content {
        margin: 0;
        padding: 0;
    }
    
    .table-section,
    .card {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .stat-card {
        break-inside: avoid;
    }
}

/* Modern Customer Profile Styles */
.customer-profile-header .customer-avatar {
    position: relative;
}

.customer-detail-badge {
    background: rgba(239, 37, 135, 0.1);
    border: 1px solid rgba(239, 37, 135, 0.2);
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 0.9rem;
    color: #495057;
    white-space: nowrap;
}

.rounded-4 {
    border-radius: 1rem !important;
}

/* Soft Badge Colors */
.bg-success-soft {
    background-color: rgba(40, 167, 69, 0.15) !important;
}

.bg-danger-soft {
    background-color: rgba(220, 53, 69, 0.15) !important;
}

.bg-warning-soft {
    background-color: rgba(255, 193, 7, 0.15) !important;
}

.bg-secondary-soft {
    background-color: rgba(108, 117, 125, 0.15) !important;
}

.bg-primary-soft {
    background-color: rgba(239, 37, 135, 0.15) !important;
}

/* Fee Cards */
.fee-card {
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.fee-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.fee-header {
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.fee-rate h3 {
    font-size: 2rem;
    font-weight: 700;
}

/* Tab Navigation Override */
.customer-tabs-section .nav-tabs .nav-link {
    border: none;
    background: transparent;
    color: #666;
    padding: 12px 20px;
    margin: 0 4px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.customer-tabs-section .nav-tabs .nav-link:hover {
    background: rgba(239, 37, 135, 0.1);
    color: var(--primary-blue);
    border: none;
}

.customer-tabs-section .nav-tabs .nav-link.active {
    background: var(--primary-blue);
    color: white;
    border: none;
}

/* Registration Banner */
.registration-length-banner .card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

/* Activity List */
.activity-item {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.activity-item:last-child {
    border-bottom: none;
}

/* Mobile Customer Profile Optimizations */
@media (max-width: 768px) {
    .customer-detail-badge {
        font-size: 0.8rem;
        padding: 6px 12px;
        margin-bottom: 8px;
    }
    
    .fee-details-section .col-lg-4 {
        margin-bottom: 1rem;
    }
    
    .customer-tabs-section .nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .customer-tabs-section .nav-tabs .nav-link {
        padding: 10px 16px;
        white-space: nowrap;
        font-size: 0.9rem;
    }
    
    .customer-profile-header h1 {
        font-size: 1.5rem;
    }
    
    .customer-avatar .avatar-circle {
        width: 80px !important;
        height: 80px !important;
        font-size: 1.5rem !important;
    }
}

@media (max-width: 576px) {
    .fee-details-section .row .col-lg-4 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .customer-detail-badge {
        display: block !important;
        text-align: center;
        margin-bottom: 0.5rem !important;
    }
    
    .customer-tabs-section .nav-tabs .nav-link {
        font-size: 0.8rem;
        padding: 8px 12px;
    }
}

/* PRN Medication Styling */
.prn-section {
    border-radius: 3px;
}

.prn-column {
    border-radius: 3px;
}

.prn-med-entry {
    transition: all 0.2s ease;
    font-size: 0.7rem;
}

.prn-med-entry:hover {
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.prn-med-compact {
    transition: all 0.2s ease;
    max-width: 250px;
}

.prn-med-compact:hover {
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.btn-xs {
    font-size: 0.65rem;
    padding: 2px 6px;
    line-height: 1.2;
}

/* Compact PRN styling for matrix view */
.prn-column .btn {
    font-size: 0.55rem !important;
    padding: 1px 3px !important;
    line-height: 1;
}

/* Compact eMAR matrix styling */
.medication-matrix {
    font-size: 0.75rem;
}

.medication-matrix th {
    padding: 6px !important;
    font-size: 0.75rem !important;
}

.medication-matrix td {
    padding: 4px !important;
    font-size: 0.7rem !important;
    vertical-align: middle;
}

.medication-entry {
    font-size: 0.85rem !important;
    margin-bottom: 2px !important;
    border: none !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.quick-actions .btn {
    font-size: 0.75rem !important;
    padding: 4px 6px !important;
    margin: 1px !important;
}

.customer-cell {
    padding: 6px !important;
}

.time-slot-cell {
    padding: 4px !important;
}

/* Animated audit count badges */
.audit-count-badge {
    animation: pulse-attention 1.5s ease-in-out 2;
    box-shadow: 0 0 0 rgba(255, 193, 7, 0.4);
}

/* Make exclamation mark super visible */
.audit-exclamation {
    color: #dc3545 !important;
    font-weight: 900 !important;
    font-size: 1.2em !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

@keyframes pulse-attention {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7);
    }
    50% {
        transform: scale(1.15);
        box-shadow: 0 0 0 8px rgba(255, 193, 7, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0);
    }
}

/* Alternative bouncing animation for navigation badge */
.audit-nav-badge {
    animation: bounce-gentle 1.5s ease-in-out 2;
}

@keyframes bounce-gentle {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) scale(1);
    }
    40% {
        transform: translateY(-4px) scale(1.1);
    }
    60% {
        transform: translateY(-2px) scale(1.05);
    }
}

/* eMAR Matrix traffic light button overrides - restore original colors */
.med-status .btn-success {
    background-color: #198754 !important;
    border-color: #198754 !important;
    color: white !important;
}

.med-status .btn-danger {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
    color: white !important;
}

.med-status .btn-warning {
    background-color: #ffc107 !important;
    border-color: #ffc107 !important;
    color: #000 !important;
}

/* Matrix Table System - CSS Grid Based Tables */
.matrix-table-container {
    display: grid;
    gap: 0;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    overflow: hidden;
    margin-bottom: 1rem;
}

.matrix-table-container.cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.matrix-table-container.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.matrix-table-container.cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

.matrix-table-container.cols-5 {
    grid-template-columns: repeat(5, 1fr);
}

.matrix-table-container.cols-6 {
    grid-template-columns: repeat(6, 1fr);
}

.matrix-table-container.cols-7 {
    grid-template-columns: repeat(7, 1fr);
}

.matrix-table-container.cols-8 {
    grid-template-columns: repeat(8, 1fr);
}

.matrix-table-container.cols-9 {
    grid-template-columns: repeat(9, 1fr);
}

.matrix-table-container.cols-10 {
    grid-template-columns: 250px repeat(9, 140px);
}

.matrix-table-container.cols-11 {
    grid-template-columns: 250px repeat(10, 140px);
}

.matrix-table-container.cols-12 {
    grid-template-columns: 250px repeat(11, 140px);
}

.matrix-table-container.cols-13 {
    grid-template-columns: 250px repeat(12, 140px);
}

.matrix-table-container.cols-14 {
    grid-template-columns: 250px repeat(13, 140px);
}

.matrix-table-container.cols-15 {
    grid-template-columns: 250px repeat(14, 140px);
}

.matrix-table-cell {
    padding: 0.75rem;
    border-right: 1px solid #dee2e6;
    border-bottom: 1px solid #dee2e6;
    background-color: white;
    display: flex;
    align-items: center;
    min-height: 50px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.matrix-table-cell:last-of-type,
.matrix-table-cell:nth-last-child(-n+1) {
    border-right: none;
}

.matrix-table-cell.header-cell {
    background-color: #6c757d !important;
    color: white !important;
    font-weight: 600;
    text-align: center;
    justify-content: center;
    border-color: #5a6268;
}

/* Remove bottom border from last row cells */
.matrix-table-container.cols-2 .matrix-table-cell:nth-last-child(-n+2):not(.header-cell) {
    border-bottom: none;
}

.matrix-table-container.cols-3 .matrix-table-cell:nth-last-child(-n+3):not(.header-cell) {
    border-bottom: none;
}

.matrix-table-container.cols-4 .matrix-table-cell:nth-last-child(-n+4):not(.header-cell) {
    border-bottom: none;
}

.matrix-table-container.cols-5 .matrix-table-cell:nth-last-child(-n+5):not(.header-cell) {
    border-bottom: none;
}

.matrix-table-container.cols-6 .matrix-table-cell:nth-last-child(-n+6):not(.header-cell) {
    border-bottom: none;
}

.matrix-table-container.cols-7 .matrix-table-cell:nth-last-child(-n+7):not(.header-cell) {
    border-bottom: none;
}

.matrix-table-container.cols-8 .matrix-table-cell:nth-last-child(-n+8):not(.header-cell) {
    border-bottom: none;
}

.matrix-table-container.cols-9 .matrix-table-cell:nth-last-child(-n+9):not(.header-cell) {
    border-bottom: none;
}

/* Responsive matrix tables */
@media (max-width: 768px) {
    .matrix-table-container {
        grid-template-columns: 1fr !important;
    }
    
    .matrix-table-cell {
        border-right: none;
        border-bottom: 1px solid #dee2e6;
    }
    
    .matrix-table-cell.header-cell {
        background-color: #495057 !important;
        color: white !important;
        justify-content: flex-start;
        text-align: left;
    }
}

/* HR Document management specific styles */
.document-card {
    transition: transform 0.2s ease-in-out;
}

.document-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.document-upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 0.5rem;
    padding: 2rem;
    text-align: center;
    transition: border-color 0.3s ease;
}

.document-upload-area:hover {
    border-color: #6c757d;
}

/* Matrix Grid System - Used by recruitment and training matrices */
.recruitment-matrix-container,
.training-matrix-container {
    overflow-x: auto !important;
    overflow-y: visible !important;
    padding: 20px;
    max-width: 100vw;
    position: relative;
}

.matrix-grid {
    display: grid !important;
    grid-template-columns: 250px repeat(9, 150px) !important;
    gap: 1px;
    background-color: #e9ecef;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    min-width: 1600px !important; /* Force width larger than viewport */
    width: max-content;
}

/* Frozen column for staff names */
.recruitment-matrix-container {
    position: relative;
    overflow-x: auto;
    overflow-y: visible;
    padding: 20px;
}

.matrix-grid .matrix-cell:first-child,
.matrix-grid .matrix-cell:nth-child(10n+1) {
    position: sticky;
    left: 0;
    z-index: 10;
    background-color: #f8f9fa;
    border-right: 2px solid #667eea;
}

.matrix-grid .matrix-cell:first-child {
    z-index: 20;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.matrix-cell {
    background-color: white;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60px;
    border-right: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
}

.matrix-cell.name-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: bold;
    justify-content: flex-start;
    padding-left: 20px;
}

.matrix-cell.step-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-weight: bold;
    text-align: center;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.matrix-cell.name-cell {
    background-color: #f8f9fa;
    justify-content: flex-start;
    padding-left: 15px;
    border-right: 2px solid #667eea;
}

.matrix-cell.step-cell {
    background-color: white;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.matrix-cell.step-cell:hover {
    background-color: #f8f9fa;
}

.matrix-cell.step-cell.training-readonly {
    cursor: default;
}

.matrix-cell.step-cell.training-readonly:hover {
    background-color: white;
}

/* =================================================
   PLATFORM-WIDE LAYOUT CONSISTENCY
   ================================================= */

/* 1. Consistent outer page padding - all pages get the same breathing room */
.main-content > .container-fluid {
    padding-left: 1.75rem;
    padding-right: 1.75rem;
    padding-top: 1.5rem;
    padding-bottom: 2.5rem;
}

/* 2. Pages that wrap their own content in a container-fluid lose the
      inner duplicate padding so nothing is squashed or over-indented */
.main-content > .container-fluid > .container-fluid {
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 0 !important;
}

/* 3. Standard page header — used on every main page */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 1.25rem;
    margin-bottom: 1.75rem;
    border-bottom: 2px solid #f0f2f5;
}

.page-header-left {
    flex: 1;
    min-width: 0;
}

.page-header-left h1,
.page-header > h1 {
    font-size: 1.6rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.3rem;
    line-height: 1.3;
}

.page-header-left h1 i,
.page-header > h1 i {
    color: var(--primary-color, #6c757d);
    font-size: 1.4rem;
}

.page-header-left .page-subtitle,
.page-header .page-subtitle {
    color: #6c757d;
    font-size: 0.875rem;
    margin-bottom: 0;
    line-height: 1.4;
}

.page-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    padding-top: 0.3rem;
    flex-wrap: wrap;
}

/* 4. Consistent card styling across the entire platform */
.card {
    border: 1px solid #e9ecef !important;
    border-radius: 0.625rem !important;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.07) !important;
}

.card:hover {
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1) !important;
}

/* Only apply the default light header to cards without an inline background */
.card-header:not([style*="background"]) {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.card-header {
    padding: 0.875rem 1.25rem !important;
    font-weight: 600;
}

.card-header h5,
.card-header h6 {
    margin-bottom: 0 !important;
    font-weight: 600;
}

.card-body {
    padding: 1.25rem;
}

/* 5. Mobile responsiveness for the new layout */
@media (max-width: 768px) {
    .main-content > .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
        padding-top: 1rem;
        padding-bottom: 1.5rem;
    }

    .page-header {
        flex-direction: column;
        gap: 0.875rem;
        padding-bottom: 1rem;
        margin-bottom: 1.25rem;
    }

    .page-header-left h1,
    .page-header > h1 {
        font-size: 1.35rem;
    }

    .page-header-actions {
        width: 100%;
    }
}
