/* Custom CSS for UK HR & Payroll Management System - White & Blue Theme */

/* Root Variables for White & Blue Theme */
:root {
    --primary-blue: #0d6efd;
    --light-blue: #cfe2ff;
    --dark-blue: #084298;
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --medium-gray: #6c757d;
    --border-gray: #dee2e6;
    --text-dark: #212529;
    --text-muted: #6c757d;
}

/* Base body styles */
body {
    background-color: var(--white);
    color: var(--text-dark);
}

/* Container and layout */
.container-fluid {
    background-color: var(--light-gray);
    min-height: 100vh;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

/* Ensure all text is readable */
.card-body, .card-text, .card-title, p, span, div, .lead, 
h1, h2, h3, h4, h5, h6, .display-1, .display-2, .display-3, .display-4, 
.display-5, .display-6, .list-group-item, .alert, .btn {
    color: var(--text-dark) !important;
}

.text-muted, .card-subtitle, .small, .text-secondary {
    color: var(--text-muted) !important;
}

/* Specific fix for descriptions and content areas */
.container-fluid p, .container-fluid span, .container-fluid div,
.card p, .card span, .card div, .alert p, .alert span {
    color: var(--text-dark) !important;
}

/* Navbar styling */
.navbar-brand {
    color: white !important;
    font-weight: 700;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    margin-right: auto;
}

.navbar-light .navbar-nav .nav-link {
    color: white !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: color 0.15s ease-in-out;
}

.navbar-light .navbar-nav .nav-link:hover {
    color: var(--light-blue) !important;
}

.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.1);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Card styling */
.card {
    background-color: var(--white);
    border: 1px solid var(--border-gray);
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    transition: box-shadow 0.15s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: var(--light-gray);
    border-bottom: 1px solid var(--border-gray);
    color: var(--text-dark);
}

/* Form styling */
.form-label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.form-control, .form-select {
    background-color: var(--white);
    border: 1px solid var(--border-gray);
    color: var(--text-dark);
}

.form-control:focus, .form-select:focus {
    background-color: var(--white);
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
    color: var(--text-dark);
}

/* Button styling */
.btn-primary {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
    color: white;
}

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

/* Table styling */
.table {
    background-color: var(--white);
    color: var(--text-dark);
}

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

.table th {
    border-top: none;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-dark);
    background-color: var(--light-gray);
}

.table td {
    color: var(--text-dark);
}

/* Alert styling */
.alert {
    border: none;
    border-radius: 0.5rem;
}

.alert-info {
    background-color: var(--light-blue);
    color: var(--dark-blue);
    border-left: 4px solid var(--primary-blue);
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

.alert-success {
    background-color: #d1e7dd;
    color: #0f5132;
    border-left: 4px solid #198754;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

/* Dropdown styling */
.dropdown-menu {
    background-color: var(--white);
    border: 1px solid var(--border-gray);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.dropdown-item {
    color: var(--text-dark);
    transition: background-color 0.15s ease-in-out;
}

.dropdown-item:hover {
    background-color: var(--light-gray);
    color: var(--text-dark);
}

/* Modal styling */
.modal-content {
    background-color: var(--white);
    border: 1px solid var(--border-gray);
}

.modal-header {
    border-bottom: 1px solid var(--border-gray);
    background-color: var(--light-gray);
}

.modal-footer {
    border-top: 1px solid var(--border-gray);
    background-color: var(--light-gray);
}

/* Avatar circles for employee initials */
.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 14px;
    background-color: var(--primary-blue);
    color: white;
}

/* Status badge improvements */
.badge {
    font-size: 0.75em;
    padding: 0.375rem 0.5rem;
}

/* Button group improvements */
.btn-group-sm > .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Progress bars for performance ratings */
.progress {
    height: 8px;
    background-color: var(--border-gray);
}

.progress-bar {
    transition: width 0.6s ease;
    background-color: var(--primary-blue);
}

/* NI number formatting */
.ni-number {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    letter-spacing: 0.05em;
}

/* Currency formatting */
.currency {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* Dashboard specific styles */
.dashboard-stat-card {
    transition: transform 0.2s ease-in-out;
    background-color: var(--white);
}

.dashboard-stat-card:hover {
    transform: translateY(-2px);
}

.stat-icon {
    opacity: 0.8;
}

/* Performance rating colors */
.performance-excellent {
    color: #198754;
}

.performance-good {
    color: var(--primary-blue);
}

.performance-average {
    color: #ffc107;
}

.performance-poor {
    color: #dc3545;
}

/* Attendance status colors */
.attendance-present {
    background-color: #198754;
}

.attendance-late {
    background-color: #ffc107;
}

.attendance-absent {
    background-color: #dc3545;
}

.attendance-sick {
    background-color: #dc3545;
}

.attendance-leave {
    background-color: var(--primary-blue);
}

/* Employee profile enhancements */
.employee-profile-header {
    background: linear-gradient(135deg, var(--primary-blue), var(--dark-blue));
    color: white;
    border-radius: 0.5rem 0.5rem 0 0;
}

.employee-quick-stats {
    background-color: var(--light-gray);
    border-radius: 0.375rem;
    padding: 1rem;
}

/* Payroll calculation display */
.payroll-calculation {
    background-color: var(--light-blue);
    border: 1px solid var(--primary-blue);
    border-radius: 0.5rem;
    padding: 1rem;
}

.payroll-gross {
    color: #198754;
    font-weight: 700;
}

.payroll-deductions {
    color: #dc3545;
}

.payroll-net {
    color: #198754;
    font-weight: 700;
    font-size: 1.25rem;
}

/* Site management styles */
.site-card {
    border-left: 4px solid var(--primary-blue);
}

.site-employee-count {
    background-color: var(--primary-blue);
    color: white;
    border-radius: 50%;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* Reports dashboard styles */
.report-summary-card {
    background: linear-gradient(135deg, var(--light-gray), var(--white));
    border: 1px solid var(--border-gray);
}

.hmrc-compliance-indicator {
    color: #198754;
    font-weight: 600;
}

/* Quick action buttons */
.quick-action-btn {
    border-radius: 0.5rem;
    padding: 1rem;
    text-align: center;
    transition: all 0.2s ease-in-out;
    text-decoration: none;
    display: block;
    background-color: var(--white);
    border: 1px solid var(--border-gray);
    color: var(--text-dark);
}

.quick-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.1);
    color: var(--primary-blue);
}

/* Subscription status indicators */
.subscription-active {
    color: #198754;
}

.subscription-trial {
    color: var(--primary-blue);
}

.subscription-expired {
    color: #dc3545;
}

/* GDPR compliance indicators */
.gdpr-compliant {
    color: #198754;
}

.gdpr-warning {
    color: #ffc107;
}

/* Form validation styles */
.is-invalid {
    border-color: #dc3545;
}

.is-valid {
    border-color: #198754;
}

.invalid-feedback {
    color: #dc3545;
    font-size: 0.875rem;
}

.valid-feedback {
    color: #198754;
    font-size: 0.875rem;
}

/* Loading states */
.loading-skeleton {
    background: linear-gradient(90deg, var(--light-gray) 25%, var(--border-gray) 50%, var(--light-gray) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Focus styles for accessibility */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

/* WhatsApp button styling */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: white;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 100;
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    text-decoration: none;
    color: white;
    background-color: #1fcc5f;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* WhatsApp features section styling */
.whatsapp-feature {
    padding: 1rem;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease;
}

.whatsapp-feature:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.2);
}

/* Responsive improvements */
@media (max-width: 768px) {
    .table-responsive {
        font-size: 0.875rem;
    }
    
    .btn-group-sm > .btn {
        padding: 0.125rem 0.25rem;
        font-size: 0.65rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .avatar-circle {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        font-size: 25px;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid var(--border-gray);
    }
    
    .btn {
        display: none;
    }
    
    .table {
        font-size: 0.875rem;
    }
    
    .whatsapp-float {
        display: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid var(--text-dark);
    }
    
    .btn {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}