﻿/* Professional InnoFurn Portal Styling */
:root {
    --primary-blue: #0066cc;
    --primary-dark: #004499;
    --primary-light: #3385d6;
    --secondary-gray: #6c757d;
    --light-gray: #f8f9fa;
    --border-color: #e9ecef;
    --success-green: #28a745;
    --warning-orange: #fd7e14;
    --danger-red: #dc3545;
    --text-dark: #2c3e50;
    --text-muted: #6c757d;
    --shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
    color: var(--text-dark);
}

/* Professional Cards */
.professional-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    margin: 0.5rem;
}

    .professional-card:hover {
        box-shadow: var(--shadow-lg);
        transform: translateY(-2px);
    }

.professional-card-header {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-dark));
    color: white;
    padding: 1.5rem;
    border-radius: 12px 12px 0 0;
    border-bottom: none;
}

.professional-card-body {
    padding: 2rem;
}

/* Professional Buttons */
.btn-professional {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
}

.btn-professional-primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-dark));
    color: white;
}

    .btn-professional-primary:hover {
        background: linear-gradient(135deg, var(--primary-dark), var(--primary-blue));
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
        color: white;
    }

.btn-professional-success {
    background: linear-gradient(135deg, var(--success-green), #20c997);
    color: white;
}

    .btn-professional-success:hover {
        background: linear-gradient(135deg, #20c997, var(--success-green));
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
        color: white;
    }

.btn-professional-secondary {
    background: var(--secondary-gray);
    color: white;
}

    .btn-professional-secondary:hover {
        background: #5a6268;
        transform: translateY(-2px);
        color: white;
    }

/* Professional Form Elements */
.form-control-professional {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
    font-size: 1rem;
}

    .form-control-professional:focus {
        border-color: var(--primary-blue);
        box-shadow: 0 0 0 0.2rem rgba(0, 102, 204, 0.25);
    }

.form-label-professional {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

/* Profile Picture Selection */
.profile-picture-selection {
    background: var(--light-gray);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.profile-avatar-option {
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 12px;
    padding: 0.5rem;
    text-align: center;
}

    .profile-avatar-option:hover {
        background: rgba(0, 102, 204, 0.1);
        transform: scale(1.05);
    }

    .profile-avatar-option input[type="radio"] {
        display: none;
    }

        .profile-avatar-option input[type="radio"]:checked + img {
            border: 3px solid var(--primary-blue);
            box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.2);
        }

.current-profile-display {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    text-align: center;
    box-shadow: var(--shadow);
}

/* Professional Info Display */
.info-row {
    display: flex;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f3f4;
}

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

.info-label {
    font-weight: 600;
    color: var(--text-dark);
    min-width: 150px;
    font-size: 0.9rem;
}

.info-value {
    color: var(--text-muted);
    flex: 1;
    font-size: 0.9rem;
}

    .info-value.not-set {
        font-style: italic;
        color: #adb5bd;
    }

/* Professional Navigation */
.navbar-professional {
    background: white !important;
    box-shadow: var(--shadow);
    padding: 1rem 0;
}

.navbar-brand-professional {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-blue) !important;
}

.nav-link-professional {
    font-weight: 500;
    color: var(--text-dark) !important;
    padding: 0.5rem 1rem !important;
    border-radius: 6px;
    transition: all 0.3s ease;
}

    .nav-link-professional:hover {
        background: rgba(0, 102, 204, 0.1);
        color: var(--primary-blue) !important;
    }

/* MOBILE RESPONSIVENESS */

/* Mobile First - Small devices (landscape phones, 576px and up) */
@media (max-width: 575.98px) {
    .container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .professional-card {
        margin: 0.25rem;
        border-radius: 8px;
    }

    .professional-card-header {
        padding: 1rem;
        border-radius: 8px 8px 0 0;
    }

        .professional-card-header h4 {
            font-size: 1.1rem;
        }

        .professional-card-header p {
            font-size: 0.85rem;
        }

    .professional-card-body {
        padding: 1rem;
    }

    .profile-picture-selection {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }

    .current-profile-display img {
        width: 80px !important;
        height: 80px !important;
    }

    .profile-avatar-option img {
        width: 50px !important;
        height: 50px !important;
    }

    .info-row {
        flex-direction: column;
        align-items: flex-start;
        padding: 0.5rem 0;
    }

    .info-label {
        min-width: auto;
        margin-bottom: 0.25rem;
        font-size: 0.85rem;
    }

    .info-value {
        font-size: 0.85rem;
    }

    .btn-professional {
        width: 100%;
        margin-bottom: 0.5rem;
        padding: 0.875rem 1rem;
        min-width: auto;
    }

    .form-control-professional {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .form-label-professional {
        font-size: 0.9rem;
    }

    /* Stack buttons vertically on mobile */
    .text-center .btn-professional {
        display: block;
        width: 100%;
    }

        .text-center .btn-professional:not(:last-child) {
            margin-bottom: 0.75rem;
            margin-right: 0;
        }

    /* Mobile avatar selection grid */
    .profile-avatar-option {
        padding: 0.25rem;
    }

    /* Reduce margins on mobile */
    h5 {
        font-size: 1rem;
        margin-bottom: 0.75rem !important;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .professional-card-body {
        padding: 1.5rem;
    }

    .current-profile-display img {
        width: 100px !important;
        height: 100px !important;
    }

    .profile-avatar-option img {
        width: 60px !important;
        height: 60px !important;
    }

    .btn-professional {
        min-width: 120px;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .current-profile-display img {
        width: 120px !important;
        height: 120px !important;
    }

    .profile-avatar-option img {
        width: 65px !important;
        height: 65px !important;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 992px) {
    .current-profile-display img {
        width: 150px !important;
        height: 150px !important;
    }

    .profile-avatar-option img {
        width: 70px !important;
        height: 70px !important;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn-professional {
        padding: 1rem 1.5rem;
        min-height: 48px; /* Minimum touch target size */
    }

    .profile-avatar-option {
        padding: 0.75rem;
        min-height: 48px;
        min-width: 48px;
    }

    .form-control-professional {
        min-height: 48px;
        padding: 0.875rem 1rem;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .professional-card {
        border-width: 0.5px;
    }
}

/* Landscape orientation on mobile */
@media (max-width: 767.98px) and (orientation: landscape) {
    .professional-card-header {
        padding: 0.75rem 1rem;
    }

    .professional-card-body {
        padding: 1rem;
    }

    .current-profile-display img {
        width: 70px !important;
        height: 70px !important;
    }
}

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

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --text-dark: #ffffff;
        --text-muted: #b3b3b3;
        --light-gray: #2d3748;
        --border-color: #4a5568;
    }

    body {
        background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
        color: var(--text-dark);
    }

    .professional-card {
        background: #2d3748;
        border-color: var(--border-color);
    }

    .form-control-professional {
        background: #4a5568;
        border-color: var(--border-color);
        color: white;
    }

}

/* Alert Styling */
.alert-custom {
    border-radius: 8px;
    border: 1px solid;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    position: relative;
    animation: slideDown 0.3s ease-out;
    box-shadow: var(--shadow);
}

.alert-success-custom {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-error-custom {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-info-custom {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-icon {
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

.navbar-brand {
    font-weight: 700;
    color: var(--primary-blue) !important;
    font-size: 1.5rem;
}

.navbar {
    box-shadow: var(--shadow);
    background: white !important;
    padding: 1rem 0;
}

.btn-close {
    font-size: 0.75rem;
}

/* Mobile alert improvements */
@media (max-width: 575.98px) {
    .alert-custom {
        padding: 0.75rem 1rem;
        margin: 0.5rem;
        border-radius: 6px;
    }

    .alert-icon {
        font-size: 1rem;
    }
}


/* Time Clock Specific Styles */
.current-time-display {
    text-align: center;
}

.time-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    backdrop-filter: blur(10px);
}

.status-indicator {
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    display: inline-block;
    color: white;
    font-size: 0.9rem;
    animation: pulse-status 2s infinite;
}

@keyframes pulse-status {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

.time-action-button {
    width: 100%;
    height: 120px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: white;
    padding: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: inherit;
    position: relative;
    overflow: hidden;
}

    .time-action-button:hover:not(.disabled) {
        transform: translateY(-4px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
        color: inherit;
        text-decoration: none;
    }

    .time-action-button.clock-in:not(.disabled) {
        border-color: var(--success-green);
        background: linear-gradient(135deg, #ffffff, #f0fff4);
    }

    .time-action-button.clock-in:hover:not(.disabled) {
        background: var(--success-green);
        color: white;
    }

    .time-action-button.clock-out:not(.disabled) {
        border-color: var(--danger-red);
        background: linear-gradient(135deg, #ffffff, #fff5f5);
    }

    .time-action-button.clock-out:hover:not(.disabled) {
        background: var(--danger-red);
        color: white;
    }

    .time-action-button.break-start:not(.disabled),
    .time-action-button.break-end:not(.disabled) {
        border-color: var(--warning-orange);
        background: linear-gradient(135deg, #ffffff, #fff8f0);
    }

    .time-action-button.break-start:hover:not(.disabled),
    .time-action-button.break-end:hover:not(.disabled) {
        background: var(--warning-orange);
        color: white;
    }

    .time-action-button.lunch-start:not(.disabled),
    .time-action-button.lunch-end:not(.disabled) {
        border-color: #6f42c1;
        background: linear-gradient(135deg, #ffffff, #f8f5ff);
    }

    .time-action-button.lunch-start:hover:not(.disabled),
    .time-action-button.lunch-end:hover:not(.disabled) {
        background: #6f42c1;
        color: white;
    }

    .time-action-button.disabled {
        opacity: 0.4;
        cursor: not-allowed;
        transform: none !important;
        box-shadow: none !important;
    }

.action-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.action-title {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.action-subtitle {
    font-size: 0.75rem;
    opacity: 0.7;
}

.timeline-section {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.timeline-header {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    color: var(--text-dark);
}

.timeline-body {
    padding: 1.5rem;
    max-height: 400px;
    overflow-y: auto;
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    background: #f8f9fa;
    border-left: 4px solid var(--border-color);
    transition: all 0.2s ease;
}

    .timeline-item:hover {
        background: var(--light-gray);
        border-left-color: var(--primary-blue);
    }

    .timeline-item.clock-in {
        border-left-color: var(--success-green);
    }

    .timeline-item.clock-out {
        border-left-color: var(--danger-red);
    }

    .timeline-item.break {
        border-left-color: var(--warning-orange);
    }

    .timeline-item.lunch {
        border-left-color: #6f42c1;
    }

.timeline-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    color: white;
    font-size: 1rem;
    flex-shrink: 0;
}

    .timeline-icon.clock-in {
        background: var(--success-green);
    }

    .timeline-icon.clock-out {
        background: var(--danger-red);
    }

    .timeline-icon.break {
        background: var(--warning-orange);
    }

    .timeline-icon.lunch {
        background: #6f42c1;
    }

.timeline-content {
    flex: 1;
}

.timeline-title {
    font-weight: 600;
    margin: 0 0 0.25rem 0;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.timeline-time {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0 0 0.25rem 0;
}

.timeline-notes {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: italic;
    margin: 0;
}

.empty-timeline {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
}

    .empty-timeline i {
        font-size: 4rem;
        margin-bottom: 1rem;
        opacity: 0.3;
    }

/* Time Clock Mobile Responsiveness */
@media (max-width: 767.98px) {
    .time-action-button {
        height: 100px;
        padding: 0.75rem;
    }

    .action-icon {
        font-size: 1.5rem;
        margin-bottom: 0.25rem;
    }

    .action-title {
        font-size: 0.8rem;
    }

    .action-subtitle {
        font-size: 0.7rem;
    }

    .timeline-body {
        padding: 1rem;
        max-height: 300px;
    }

    .timeline-item {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .timeline-icon {
        width: 32px;
        height: 32px;
        margin-right: 0.75rem;
        font-size: 0.9rem;
    }

    .time-badge {
        font-size: 1rem;
        padding: 0.4rem 0.8rem;
    }
}


/* Admin Dashboard Specific Styles */
.dashboard-time {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    opacity: 0.9;
}

.metric-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    height: 100%;
    position: relative;
    overflow: hidden;
}

    .metric-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-lg);
    }

    .metric-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: var(--primary-blue);
    }

    .metric-card.metric-blue::before {
        background: var(--primary-blue);
    }

    .metric-card.metric-green::before {
        background: var(--success-green);
    }

    .metric-card.metric-orange::before {
        background: var(--warning-orange);
    }

    .metric-card.metric-purple::before {
        background: #6f42c1;
    }

.metric-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: white;
}

.metric-blue .metric-icon {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-dark));
}

.metric-green .metric-icon {
    background: linear-gradient(135deg, var(--success-green), #20c997);
}

.metric-orange .metric-icon {
    background: linear-gradient(135deg, var(--warning-orange), #f39c12);
}

.metric-purple .metric-icon {
    background: linear-gradient(135deg, #6f42c1, #563d7c);
}

.metric-value {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0;
    line-height: 1;
}

.metric-label {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0.5rem 0;
}

.metric-change {
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

    .metric-change.positive {
        color: var(--success-green);
    }

    .metric-change.negative {
        color: var(--danger-red);
    }

    .metric-change.neutral {
        color: var(--text-muted);
    }

.section-header {
    padding: 1.5rem 1.5rem 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
}

    .section-header h5 {
        color: var(--text-dark);
        font-weight: 600;
    }

.employee-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

.employee-card {
    background: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
}

    .employee-card:hover {
        background: var(--light-blue);
        border-color: var(--primary-blue);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 102, 204, 0.15);
    }

.employee-avatar img {
    width: 50px;
    height: 50px;
    object-fit: cover;
}

.employee-info {
    flex: 1;
}

.employee-name {
    font-weight: 600;
    margin: 0;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.employee-role {
    color: var(--text-muted);
    margin: 0.25rem 0;
    font-size: 0.85rem;
}

.employee-number {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.status-badge {
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    display: inline-flex;
    align-items: center;
}

    .status-badge.working {
        background: var(--success-green);
        animation: pulse-working 2s infinite;
    }

@keyframes pulse-working {
    0% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(40, 167, 69, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
    }
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.dashboard-action-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

    .dashboard-action-card:hover {
        border-color: var(--primary-blue);
        transform: translateY(-3px);
        box-shadow: 0 6px 20px rgba(0, 102, 204, 0.15);
        text-decoration: none;
        color: inherit;
    }

    .dashboard-action-card .action-icon {
        width: 50px;
        height: 50px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto 0.75rem;
        font-size: 1.2rem;
        color: white;
    }

.action-icon.blue {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-dark));
}

.action-icon.green {
    background: linear-gradient(135deg, var(--success-green), #20c997);
}

.action-icon.orange {
    background: linear-gradient(135deg, var(--warning-orange), #f39c12);
}

.action-icon.purple {
    background: linear-gradient(135deg, #6f42c1, #563d7c);
}

.action-icon.brown {
    background: linear-gradient(135deg, #8b4513, #a0522d);
}

.action-icon.red {
    background: linear-gradient(135deg, var(--danger-red), #c82333);
}

.action-title {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    color: var(--text-dark);
}

.action-subtitle {
    color: var(--text-muted);
    font-size: 0.75rem;
    line-height: 1.2;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

    .empty-state i {
        font-size: 3rem;
        margin-bottom: 1rem;
        opacity: 0.3;
    }

    .empty-state h6 {
        color: var(--text-muted);
        font-weight: 600;
    }

/* Dashboard Mobile Responsiveness */
@media (max-width: 767.98px) {
    .metric-card {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .metric-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
        margin-bottom: 0.75rem;
    }

    .metric-value {
        font-size: 1.8rem;
    }

    .metric-label {
        font-size: 0.85rem;
    }

    .employee-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .employee-card {
        padding: 0.75rem;
    }

    .employee-avatar img {
        width: 40px;
        height: 40px;
    }

    .action-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .dashboard-action-card {
        padding: 0.75rem;
    }

        .dashboard-action-card .action-icon {
            width: 40px;
            height: 40px;
            font-size: 1rem;
            margin-bottom: 0.5rem;
        }

    .action-title {
        font-size: 0.8rem;
    }

    .action-subtitle {
        font-size: 0.7rem;
    }

    .section-header {
        padding: 1rem;
    }

    .professional-card-body {
        padding: 1rem;
    }
}

@media (max-width: 575.98px) {
    .action-grid {
        grid-template-columns: 1fr;
    }

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


/* Employee Directory Specific Styles */
.filter-card {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.3s ease;
    display: block;
    box-shadow: var(--shadow);
    height: 100%;
}

    .filter-card:hover {
        text-decoration: none;
        color: var(--text-dark);
        transform: translateY(-2px);
        box-shadow: var(--shadow-lg);
    }

    .filter-card.active {
        border-color: var(--primary-blue);
        background: linear-gradient(135deg, var(--primary-blue), var(--primary-dark));
        color: white;
        transform: translateY(-2px);
        box-shadow: var(--shadow-lg);
    }

.filter-card-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.filter-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

    .filter-icon.active {
        background: linear-gradient(135deg, var(--success-green), #20c997);
    }

    .filter-icon.inactive {
        background: linear-gradient(135deg, var(--danger-red), #e74c3c);
    }

    .filter-icon.all {
        background: linear-gradient(135deg, var(--primary-blue), var(--primary-dark));
    }

.filter-card.active .filter-icon {
    background: rgba(255, 255, 255, 0.2);
}

.filter-info h3 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    line-height: 1;
}

.filter-info p {
    margin: 0.25rem 0 0 0;
    font-weight: 500;
    font-size: 0.9rem;
}

.employee-table {
    border: none;
}

    .employee-table thead th {
        background: linear-gradient(135deg, #f8f9fa, #e9ecef);
        border: none;
        color: var(--text-dark);
        font-weight: 600;
        padding: 1rem;
        font-size: 0.9rem;
        border-bottom: 2px solid var(--border-color);
    }

    .employee-table tbody td {
        padding: 1rem;
        border: none;
        border-bottom: 1px solid #f1f3f4;
        vertical-align: middle;
    }

.employee-row {
    transition: all 0.2s ease;
}

    .employee-row:hover {
        background: var(--light-gray);
    }

    .employee-row.inactive {
        background: #fef2f2;
        opacity: 0.8;
    }

        .employee-row.inactive:hover {
            background: #fecaca;
        }

.employee-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.employee-avatar-small {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

    .employee-avatar-small img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.initials-fallback {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-dark));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
}

.employee-details {
    flex: 1;
}

.employee-name {
    font-weight: 600;
    margin: 0;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.employee-number {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.contact-info .email {
    font-size: 0.9rem;
    color: var(--text-dark);
}

.contact-info .phone {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.role-badge {
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    display: inline-block;
}

    .role-badge.employee {
        background: var(--primary-blue);
    }

    .role-badge.carpenter {
        background: #8b4513;
    }

    .role-badge.logistics {
        background: var(--warning-orange);
    }

    .role-badge.hr {
        background: #6f42c1;
    }

    .role-badge.admin {
        background: var(--danger-red);
    }

    .role-badge.superadmin {
        background: #1a202c;
    }

.status-badge {
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

    .status-badge.active {
        background: var(--success-green);
    }

    .status-badge.inactive {
        background: var(--danger-red);
    }

.join-date {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-dark));
    color: white;
    border-bottom: none;
}

    .modal-header .btn-close {
        filter: invert(1);
    }

.modal-body h6 {
    color: var(--primary-blue);
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

/* Employee Directory Mobile Responsiveness */
@media (max-width: 767.98px) {
    .filter-card-content {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }

    .filter-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .filter-info h3 {
        font-size: 1.5rem;
    }

    .filter-info p {
        font-size: 0.85rem;
    }

    .employee-table {
        font-size: 0.85rem;
    }

        .employee-table thead th {
            padding: 0.75rem 0.5rem;
            font-size: 0.8rem;
        }

        .employee-table tbody td {
            padding: 0.75rem 0.5rem;
        }

    .employee-avatar-small {
        width: 40px;
        height: 40px;
    }

    .initials-fallback {
        font-size: 0.8rem;
    }

    .employee-name {
        font-size: 0.85rem;
    }

    .employee-number {
        font-size: 0.75rem;
    }

    .contact-info .email {
        font-size: 0.8rem;
    }

    .role-badge,
    .status-badge {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }
}

@media (max-width: 575.98px) {
    .table-responsive {
        font-size: 0.8rem;
    }

    .employee-info {
        gap: 0.5rem;
    }

    .employee-avatar-small {
        width: 35px;
        height: 35px;
    }

    .employee-table thead th,
    .employee-table tbody td {
        padding: 0.5rem 0.25rem;
    }

    .filter-card {
        padding: 1rem;
    }
}


/* Pending Users Specific Styles */
.pending-count .badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
}

.pending-users-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 1.5rem;
}

.pending-user-card {
    background: white;
    border: 2px solid var(--warning-orange);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

    .pending-user-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-lg);
        border-color: var(--primary-blue);
    }

.pending-user-header {
    background: linear-gradient(135deg, #fff8f0, #fef3e2);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.user-avatar-container {
    position: relative;
}

.user-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid white;
    box-shadow: var(--shadow);
    position: relative;
}

.initials-display {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--warning-orange), #f39c12);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.5rem;
}

.pending-indicator {
    position: absolute;
    bottom: -5px;
    right: -5px;
    width: 24px;
    height: 24px;
    background: var(--warning-orange);
    border-radius: 50%;
    border: 2px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.7rem;
    animation: pulse-pending 2s infinite;
}

@keyframes pulse-pending {
    0% {
        box-shadow: 0 0 0 0 rgba(253, 126, 20, 0.7);
    }

    70% {
        box-shadow: 0 0 0 6px rgba(253, 126, 20, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(253, 126, 20, 0);
    }
}

.user-header-info {
    flex: 1;
}

.user-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 0.5rem 0;
}

.registration-date {
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
}

.pending-user-body {
    padding: 1.5rem;
}

.user-details-section {
    margin-bottom: 2rem;
}

.section-title {
    color: var(--primary-blue);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.detail-row {
    display: flex;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f3f4;
}

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

.detail-label {
    font-weight: 600;
    color: var(--text-dark);
    min-width: 140px;
    font-size: 0.85rem;
}

.detail-value {
    color: var(--text-muted);
    flex: 1;
    font-size: 0.9rem;
}

.approval-section {
    background: #f8f9fa;
    padding: 1.5rem;
    margin: -1.5rem -1.5rem 0 -1.5rem;
    border-top: 1px solid var(--border-color);
}

.role-selection label {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.role-selection select {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

    .role-selection select:focus {
        outline: none;
        border-color: var(--primary-blue);
        box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
    }

.action-buttons {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.75rem;
    align-items: center;
}

    .action-buttons .btn {
        font-weight: 600;
        font-size: 0.85rem;
        padding: 0.75rem 1.25rem;
    }

.btn-outline-danger {
    border: 2px solid var(--danger-red);
    color: var(--danger-red);
    background: white;
}

    .btn-outline-danger:hover {
        background: var(--danger-red);
        color: white;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
    }

/* Pending Users Mobile Responsiveness */
@media (max-width: 767.98px) {
    .pending-users-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .pending-user-header {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }

    .user-avatar {
        width: 60px;
        height: 60px;
    }

    .initials-display {
        font-size: 1.2rem;
    }

    .pending-indicator {
        width: 20px;
        height: 20px;
        font-size: 0.6rem;
    }

    .user-name {
        font-size: 1.1rem;
    }

    .registration-date {
        font-size: 0.85rem;
    }

    .pending-user-body {
        padding: 1rem;
    }

    .detail-row {
        flex-direction: column;
        align-items: flex-start;
        padding: 0.5rem 0;
    }

    .detail-label {
        min-width: auto;
        margin-bottom: 0.25rem;
        font-size: 0.8rem;
    }

    .detail-value {
        font-size: 0.85rem;
    }

    .approval-section {
        padding: 1rem;
        margin: -1rem -1rem 0 -1rem;
    }

    .action-buttons {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

        .action-buttons .btn {
            width: 100%;
            padding: 0.875rem 1rem;
            font-size: 0.9rem;
        }

    .section-title {
        font-size: 0.9rem;
    }
}

@media (max-width: 575.98px) {
    .pending-user-card {
        margin: 0.25rem;
        border-radius: 8px;
    }

    .pending-user-header {
        padding: 0.75rem;
    }

    .pending-user-body {
        padding: 0.75rem;
    }

    .approval-section {
        padding: 0.75rem;
        margin: -0.75rem -0.75rem 0 -0.75rem;
    }

    .user-name {
        font-size: 1rem;
    }
}

/* MOBILE FIXES - White on White Issues */

/* Fix Mobile Navigation */
@media (max-width: 991.98px) {
    .navbar-toggler {
        border: 2px solid var(--primary-blue) !important;
        padding: 0.5rem !important;
    }

    .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='%23004499' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
    }

    .navbar-collapse {
        background: white !important;
        border: 2px solid var(--primary-blue) !important;
        border-radius: 8px !important;
        margin-top: 1rem !important;
        padding: 1rem !important;
        box-shadow: var(--shadow-lg) !important;
    }

    .navbar-nav .nav-link {
        color: var(--primary-blue) !important;
        font-weight: 600 !important;
        padding: 0.75rem 1rem !important;
        border-radius: 6px !important;
        margin-bottom: 0.5rem !important;
        border: 1px solid var(--border-color) !important;
        background: #f8f9fa !important;
    }

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

        .navbar-nav .nav-link i {
            color: inherit !important;
        }
}

/* Fix Mobile Text Visibility */
@media (max-width: 767.98px) {
    /* Ensure all text is visible on mobile */
    body {
        color: var(--text-dark) !important;
    }

    /* Fix card text */
    .professional-card {
        color: var(--text-dark) !important;
    }

    .professional-card-body {
        color: var(--text-dark) !important;
    }

    /* Fix form labels and inputs */
    .form-label,
    .form-label-professional {
        color: var(--text-dark) !important;
    }

    .form-control,
    .form-control-professional {
        color: var(--text-dark) !important;
        background: white !important;
        border: 2px solid var(--border-color) !important;
    }

    /* Fix table text */
    .employee-table {
        color: var(--text-dark) !important;
    }

        .employee-table thead th {
            color: var(--text-dark) !important;
            background: #f8f9fa !important;
        }

        .employee-table tbody td {
            color: var(--text-dark) !important;
            background: white !important;
        }

    /* Fix info rows */
    .info-row {
        color: var(--text-dark) !important;
    }

    .info-label {
        color: var(--text-dark) !important;
    }

    .info-value {
        color: var(--text-muted) !important;
    }

    /* Fix timeline items */
    .timeline-item {
        color: var(--text-dark) !important;
        background: white !important;
    }

    .timeline-title {
        color: var(--text-dark) !important;
    }

    .timeline-time {
        color: var(--text-muted) !important;
    }

    /* Fix metric cards */
    .metric-card {
        color: var(--text-dark) !important;
        background: white !important;
    }

    .metric-value {
        color: var(--text-dark) !important;
    }

    .metric-label {
        color: var(--text-muted) !important;
    }

    /* Fix employee cards */
    .employee-card {
        background: white !important;
        color: var(--text-dark) !important;
    }

    .employee-name {
        color: var(--text-dark) !important;
    }

    /* Fix section headers */
    .section-header {
        color: var(--text-dark) !important;
        background: #f8f9fa !important;
    }

        .section-header h5 {
            color: var(--text-dark) !important;
        }

    /* Fix filter cards */
    .filter-card {
        color: var(--text-dark) !important;
        background: white !important;
    }

    .filter-info h3,
    .filter-info p {
        color: inherit !important;
    }

    /* Fix pending user cards */
    .pending-user-card {
        background: white !important;
        color: var(--text-dark) !important;
    }

    .user-name {
        color: var(--text-dark) !important;
    }

    .detail-label {
        color: var(--text-dark) !important;
    }

    .detail-value {
        color: var(--text-muted) !important;
    }

    /* Fix small text elements */
    small, .small {
        color: var(--text-muted) !important;
    }

    /* Fix button text */
    .btn {
        color: inherit !important;
    }

    .btn-professional {
        color: white !important;
    }

    /* Fix alert text */
    .alert-custom {
        color: inherit !important;
    }

    /* Override any dark mode or problematic styles on mobile */
    * {
        color: inherit !important;
    }

    /* Specific mobile container fixes */
    .container,
    .container-fluid {
        background: transparent !important;
    }

    /* Mobile-specific background fixes */
    body {
        background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%) !important;
    }
}

/* Extra small devices - ensure everything is readable */
@media (max-width: 575.98px) {
    /* Force readable text colors */
    .professional-card-header {
        color: white !important;
    }

    .professional-card-body {
        background: white !important;
        color: var(--text-dark) !important;
    }

    /* Fix any remaining white text issues */
    p, span, div, h1, h2, h3, h4, h5, h6 {
        color: inherit !important;
    }

    /* Ensure form elements are readable */
    input, select, textarea {
        background: white !important;
        color: var(--text-dark) !important;
        border: 2px solid var(--border-color) !important;
    }
}
/* Fix Mobile Navigation Text for Logged Out Users */
@media (max-width: 991.98px) {
    /* Ensure all nav text is visible */
    .navbar-nav .nav-link {
        font-size: 1rem !important;
        display: flex !important;
        align-items: center !important;
    }

        .navbar-nav .nav-link i {
            margin-right: 0.5rem !important;
            font-size: 1.1rem !important;
        }

    /* Remove the ::after content that was duplicating text */
}

/* Alternative fix - Force show all hidden spans on mobile */
@media (max-width: 767.98px) {
    .d-none.d-sm-inline,
    .d-none.d-md-inline {
        display: inline !important;
    }

    .d-md-none {
        display: inline !important;
    }

    /* Ensure navbar text is always visible on mobile */
    .navbar-nav .nav-link .d-none {
        display: inline !important;
    }
}


/* Fix Mobile Form Input Text Visibility */
@media (max-width: 767.98px) {
    /* Force visible text in all form inputs */
    input[type="email"],
    input[type="password"],
    input[type="text"],
    input[type="date"],
    input[type="tel"],
    textarea,
    select {
        color: #000000 !important;
        background-color: #ffffff !important;
        border: 2px solid var(--border-color) !important;
        -webkit-text-fill-color: #000000 !important;
        -webkit-opacity: 1 !important;
        opacity: 1 !important;
    }

    /* Fix autofill styles */
    input:-webkit-autofill,
    input:-webkit-autofill:hover,
    input:-webkit-autofill:focus,
    input:-webkit-autofill:active {
        -webkit-box-shadow: 0 0 0 30px white inset !important;
        -webkit-text-fill-color: #000000 !important;
        background-color: white !important;
        color: #000000 !important;
    }

    /* Fix placeholder text */
    input::placeholder,
    textarea::placeholder {
        color: #6c757d !important;
        opacity: 1 !important;
    }

    /* Fix focus states */
    input:focus,
    textarea:focus,
    select:focus {
        color: #000000 !important;
        background-color: #ffffff !important;
        border-color: var(--primary-blue) !important;
        outline: none !important;
        box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1) !important;
    }
}

/* Fix Footer Spacing on Mobile */
@media (max-width: 767.98px) {
    /* Add proper spacing before footer */
    .footer {
        margin-top: 3rem !important;
        padding: 2rem 0 !important;
    }

    /* Add bottom padding to main content */
    main[role="main"] {
        padding-bottom: 3rem !important;
        margin-bottom: 2rem !important;
    }

    /* Ensure login/register cards have proper spacing */
    .professional-card {
        margin-bottom: 2rem !important;
    }

    /* Add extra space for mobile forms */
    .container {
        padding-bottom: 2rem !important;
    }

    .container-fluid {
        padding-bottom: 2rem !important;
    }
}

/* Extra small devices - additional form fixes */
@media (max-width: 575.98px) {
    /* Ensure form inputs are always readable */
    .form-control,
    .form-control-professional,
    .form-select {
        font-size: 16px !important; /* Prevents zoom on iOS */
        color: #000000 !important;
        background: white !important;
        border: 2px solid #dee2e6 !important;
        padding: 12px 15px !important;
    }

    /* Fix label visibility */
    .form-label,
    .form-label-professional,
    label {
        color: #000000 !important;
        font-weight: 600 !important;
        margin-bottom: 8px !important;
    }

    /* Add more space around forms */
    .professional-card-body {
        padding: 1.5rem 1rem !important;
        margin-bottom: 2rem !important;
    }

    /* Footer spacing for very small screens */
    .footer {
        margin-top: 4rem !important;
    }

    main[role="main"] {
        padding-bottom: 4rem !important;
    }
}


/* Dashboard Mobile Fixes */
@media (max-width: 767.98px) {
    /* Fix white text issues on dashboard */
    .professional-card-header {
        color: white !important;
    }

        .professional-card-header h4,
        .professional-card-header p {
            color: white !important;
        }

    .professional-card-body {
        background: white !important;
        color: var(--text-dark) !important;
    }

        .professional-card-body h5,
        .professional-card-body h6,
        .professional-card-body p,
        .professional-card-body div {
            color: var(--text-dark) !important;
        }

    /* Fix section headers */
    .section-header {
        background: #f8f9fa !important;
        color: var(--text-dark) !important;
        padding: 1rem !important;
    }

        .section-header h5 {
            color: var(--text-dark) !important;
            font-size: 1rem !important;
        }

        .section-header small {
            color: var(--text-muted) !important;
        }

    /* Fix Quick Actions Grid - 2 per row on mobile */
    .action-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem !important;
    }

    .dashboard-action-card {
        padding: 0.75rem !important;
        min-height: 100px !important;
    }

        .dashboard-action-card .action-icon {
            width: 35px !important;
            height: 35px !important;
            font-size: 1rem !important;
            margin-bottom: 0.5rem !important;
        }

    .action-title {
        font-size: 0.75rem !important;
        line-height: 1.2 !important;
    }

    .action-subtitle {
        font-size: 0.65rem !important;
        line-height: 1.1 !important;
    }
}

/* Fix Employee Cards with Missing Images */
.employee-card {
    background: white !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 10px !important;
    padding: 1rem !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
    margin-bottom: 0.75rem !important;
}

    .employee-card:hover {
        background: #f8f9fa !important;
        border-color: var(--primary-blue) !important;
        transform: translateY(-2px) !important;
        box-shadow: 0 4px 12px rgba(0, 102, 204, 0.15) !important;
    }

/* Better Employee Avatar with Fallback */
.employee-avatar {
    width: 50px !important;
    height: 50px !important;
    border-radius: 50% !important;
    position: relative !important;
    flex-shrink: 0 !important;
    overflow: hidden !important;
}

    .employee-avatar img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        border-radius: 50% !important;
    }

    /* Fallback for missing employee images */
    .employee-avatar::after {
        content: attr(data-initials);
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(135deg, var(--primary-blue), var(--primary-dark));
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
        font-size: 1rem;
        border-radius: 50%;
    }

    .employee-avatar img:not([src]),
    .employee-avatar img[src=""],
    .employee-avatar img[src*="default-avatar"] {
        display: none;
    }

.employee-info {
    flex: 1 !important;
    color: var(--text-dark) !important;
}

.employee-name {
    font-weight: 600 !important;
    margin: 0 !important;
    color: var(--text-dark) !important;
    font-size: 0.95rem !important;
}

.employee-role {
    color: var(--text-muted) !important;
    margin: 0.25rem 0 !important;
    font-size: 0.85rem !important;
}

.employee-number {
    color: var(--text-muted) !important;
    font-size: 0.8rem !important;
}

/* Fix Employee Status Badge */
.employee-status .status-badge {
    background: var(--success-green) !important;
    color: white !important;
    padding: 0.25rem 0.75rem !important;
    border-radius: 20px !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.25rem !important;
}

/* Dashboard Spacing Improvements */
@media (max-width: 767.98px) {
    /* Better spacing for metric cards */
    .metric-card {
        margin-bottom: 1rem !important;
        padding: 1.25rem !important;
    }

    /* Better spacing for employee grid */
    .employee-grid {
        grid-template-columns: 1fr !important;
        gap: 0.75rem !important;
        padding: 1rem !important;
    }

    /* Fix dashboard header spacing */
    .professional-card {
        margin-bottom: 1.5rem !important;
    }

    /* Fix empty state styling */
    .empty-state {
        text-align: center !important;
        padding: 2rem 1rem !important;
        color: var(--text-muted) !important;
        background: white !important;
    }

        .empty-state h6 {
            color: var(--text-dark) !important;
            font-weight: 600 !important;
            margin-bottom: 0.5rem !important;
        }

        .empty-state p {
            color: var(--text-muted) !important;
        }
}

/* Extra fixes for very small screens */
@media (max-width: 575.98px) {
    .action-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 0.5rem !important;
    }

    .dashboard-action-card {
        padding: 0.5rem !important;
        min-height: 90px !important;
    }

    .employee-card {
        padding: 0.75rem !important;
        gap: 0.75rem !important;
    }

    .employee-avatar {
        width: 40px !important;
        height: 40px !important;
    }

        .employee-avatar::after {
            font-size: 0.8rem !important;
        }
}


/* Fix Employee Avatar Sizing - URGENT */
.employee-avatar-wrapper {
    width: 50px !important;
    height: 50px !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
    position: relative !important;
}

.employee-avatar-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border-radius: 50% !important;
    display: block !important;
}

.employee-avatar-initials {
    width: 100% !important;
    height: 100% !important;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-dark)) !important;
    color: white !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 700 !important;
    font-size: 1rem !important;
    border-radius: 50% !important;
}

/* Simple Employee Card Design - Clean and Mobile Friendly */
.employee-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
    padding: 1rem !important;
}

.employee-card {
    background: white !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important;
    padding: 1rem !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
}

    .employee-card:hover {
        border-color: var(--primary-blue) !important;
        box-shadow: 0 4px 8px rgba(0, 102, 204, 0.1) !important;
    }

.employee-card-content {
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
}

.employee-avatar-wrapper {
    width: 45px !important;
    height: 45px !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    flex-shrink: 0 !important;
    border: 2px solid #f0f0f0 !important;
}

.employee-avatar-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.employee-avatar-initials {
    width: 100% !important;
    height: 100% !important;
    background: var(--primary-blue) !important;
    color: white !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
}

.employee-info {
    flex: 1 !important;
}

.employee-name {
    color: var(--text-dark) !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    margin: 0 0 0.25rem 0 !important;
}

.employee-role {
    color: var(--text-muted) !important;
    font-size: 0.8rem !important;
    margin: 0 0 0.25rem 0 !important;
}

.employee-number {
    color: var(--text-muted) !important;
    font-size: 0.75rem !important;
    margin: 0 !important;
}

.employee-status {
    flex-shrink: 0 !important;
}

.status-badge.working {
    background: #28a745 !important;
    color: white !important;
    padding: 0.3rem 0.6rem !important;
    border-radius: 12px !important;
    font-size: 0.7rem !important;
    font-weight: 500 !important;
    display: inline-block !important;
}

/* Mobile Design */
@media (max-width: 767.98px) {
    .employee-grid {
        padding: 0.75rem !important;
        gap: 0.5rem !important;
    }

    .employee-card {
        padding: 0.75rem !important;
    }

    .employee-card-content {
        gap: 0.75rem !important;
    }

    .employee-avatar-wrapper {
        width: 40px !important;
        height: 40px !important;
    }

    .employee-avatar-initials {
        font-size: 0.8rem !important;
    }

    .employee-name {
        font-size: 0.9rem !important;
    }

    .employee-role {
        font-size: 0.75rem !important;
    }

    .employee-number {
        font-size: 0.7rem !important;
    }

    .status-badge.working {
        padding: 0.25rem 0.5rem !important;
        font-size: 0.65rem !important;
    }
}

/* Fix ALL White Text Issues on Mobile Dashboard */
@media (max-width: 767.98px) {
    /* Force all dashboard text to be visible */
    .professional-card-header * {
        color: white !important;
    }

    .professional-card-body * {
        color: var(--text-dark) !important;
    }

    /* Fix section headers specifically */
    .section-header {
        background: #f8f9fa !important;
    }

        .section-header h5 {
            color: var(--text-dark) !important;
        }

        .section-header small {
            color: var(--text-muted) !important;
        }

    /* Fix metric cards */
    .metric-card {
        background: white !important;
    }

    .metric-value {
        color: var(--text-dark) !important;
    }

    .metric-label {
        color: var(--text-muted) !important;
    }

    .metric-change {
        color: inherit !important;
    }

        .metric-change.positive {
            color: var(--success-green) !important;
        }

        .metric-change.neutral {
            color: var(--text-muted) !important;
        }

    /* Fix dashboard time */
    .dashboard-time {
        color: white !important;
    }

    /* Fix employee section title */
    .section-header .d-flex h5 {
        color: var(--text-dark) !important;
    }

    /* Fix all text in professional cards */
    .professional-card h1,
    .professional-card h2,
    .professional-card h3,
    .professional-card h4,
    .professional-card h5,
    .professional-card h6 {
        color: var(--text-dark) !important;
    }

    .professional-card p,
    .professional-card div,
    .professional-card span {
        color: var(--text-dark) !important;
    }

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

    /* Fix badge colors */
    .badge {
        color: white !important;
    }

    /* Fix employee info */
    .employee-name {
        color: var(--text-dark) !important;
    }

    .employee-role {
        color: var(--text-muted) !important;
    }

    .employee-number {
        color: var(--text-muted) !important;
    }

    /* Fix action card text */
    .dashboard-action-card .action-title {
        color: var(--text-dark) !important;
    }

    .dashboard-action-card .action-subtitle {
        color: var(--text-muted) !important;
    }

    /* Override any problematic inherited colors */
    .container-fluid,
    .row,
    .col-12,
    .col-lg-8,
    .col-lg-4 {
        color: var(--text-dark) !important;
    }

    /* Specific fixes for dashboard sections */
    div:contains("Employees Currently at Work") {
        color: var(--text-dark) !important;
    }

    /* Fix any remaining white text */
    * {
        text-shadow: none !important;
    }

    /* Force readable text everywhere */
    body * {
        color: inherit !important;
    }

    /* Exception: Keep header text white */
    .professional-card-header,
    .professional-card-header *:not(.btn) {
        color: white !important;
    }

    /* Exception: Keep white text on colored backgrounds */
    .status-badge,
    .badge,
    .btn-primary,
    .btn-success {
        color: white !important;
    }
}

/* Emergency fix for any remaining visibility issues */
@media (max-width: 575.98px) {
    /* Force black text on light backgrounds */
    .professional-card-body {
        background: white !important;
        color: #000000 !important;
    }

        .professional-card-body * {
            color: #000000 !important;
        }

    .section-header {
        background: #f8f9fa !important;
        color: #000000 !important;
    }

        .section-header * {
            color: #000000 !important;
        }

    /* Metric cards */
    .metric-card {
        background: white !important;
        color: #000000 !important;
    }

        .metric-card * {
            color: #000000 !important;
        }

    /* Employee cards */
    .employee-card {
        background: white !important;
        color: #000000 !important;
    }

        .employee-card * {
            color: #000000 !important;
        }

    /* Action cards */
    .dashboard-action-card {
        background: white !important;
        color: #000000 !important;
    }

        .dashboard-action-card * {
            color: #000000 !important;
        }
}

/* Profile Page Fixes */
.profile-avatar-large {
    width: 150px;
    height: 150px;
    margin: 0 auto;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    border: 4px solid #f0f0f0;
    box-shadow: var(--shadow);
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.profile-initials-large {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-blue), var(--primary-dark));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 3rem;
    border-radius: 50%;
}

.current-profile-display {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.profile-name {
    color: var(--text-dark) !important;
    font-weight: 600;
}

.profile-role {
    color: var(--text-muted) !important;
}

.profile-emp-number {
    color: var(--text-muted) !important;
}

.section-title {
    color: var(--primary-blue) !important;
    font-weight: 600;
}

.emergency-title {
    color: var(--danger-red) !important;
}

.action-buttons-section {
    border-top: 1px solid var(--border-color);
}

/* Fix Profile Page Mobile Text Issues */
@media (max-width: 767.98px) {
    /* Force all profile text to be visible */
    .professional-card-header {
        color: white !important;
    }

        .professional-card-header h4,
        .professional-card-header p {
            color: white !important;
        }

    .professional-card-body {
        background: white !important;
        color: var(--text-dark) !important;
    }

        /* Fix all text in profile body */
        .professional-card-body h5,
        .professional-card-body h6,
        .professional-card-body p,
        .professional-card-body div,
        .professional-card-body span {
            color: var(--text-dark) !important;
        }

        .professional-card-body small {
            color: var(--text-muted) !important;
        }

    /* Fix info labels and values */
    .info-label {
        color: var(--text-dark) !important;
    }

    .info-value {
        color: var(--text-muted) !important;
    }

        .info-value.not-set {
            color: #adb5bd !important;
            font-style: italic;
        }

    /* Fix section titles */
    .section-title {
        color: var(--primary-blue) !important;
    }

    .emergency-title {
        color: var(--danger-red) !important;
    }

    /* Fix profile display */
    .current-profile-display {
        background: white !important;
        color: var(--text-dark) !important;
    }

    .profile-name {
        color: var(--text-dark) !important;
    }

    .profile-role {
        color: var(--text-muted) !important;
    }

    .profile-emp-number {
        color: var(--text-muted) !important;
    }

    /* Mobile avatar sizing */
    .profile-avatar-large {
        width: 120px;
        height: 120px;
    }

    .profile-initials-large {
        font-size: 2.5rem;
    }

    /* Mobile info rows */
    .info-row {
        flex-direction: column;
        align-items: flex-start;
        padding: 0.5rem 0;
    }

    .info-label {
        min-width: auto;
        margin-bottom: 0.25rem;
        font-size: 0.85rem;
        font-weight: 600;
    }

    .info-value {
        font-size: 0.9rem;
    }

    /* Mobile buttons */
    .btn-professional {
        width: 100%;
        margin-bottom: 0.5rem;
    }

        .btn-professional:last-child {
            margin-bottom: 0;
        }
}

/* Extra small screens */
@media (max-width: 575.98px) {
    .profile-avatar-large {
        width: 100px;
        height: 100px;
    }

    .profile-initials-large {
        font-size: 2rem;
    }

    .current-profile-display {
        padding: 1rem;
    }

    .professional-card-body {
        padding: 1rem;
    }

        /* Force black text on very small screens */
        .professional-card-body * {
            color: #000000 !important;
        }

    .text-muted,
    .profile-role,
    .profile-emp-number,
    .info-value {
        color: #6c757d !important;
    }

        .info-value.not-set {
            color: #adb5bd !important;
        }

    .section-title {
        color: var(--primary-blue) !important;
    }

    .emergency-title {
        color: var(--danger-red) !important;
    }
}


/* Time Clock Mobile Text Visibility Fixes */
@media (max-width: 767.98px) {
    /* Fix time clock header */
    .professional-card-header {
        color: white !important;
    }

        .professional-card-header h4,
        .professional-card-header p {
            color: white !important;
        }

    .time-badge {
        color: white !important;
    }

    .status-indicator {
        color: white !important;
    }

    /* Fix time clock body */
    .professional-card-body {
        background: white !important;
        color: var(--text-dark) !important;
    }

    /* Fix time action buttons text */
    .time-action-button {
        color: var(--text-dark) !important;
        background: white !important;
    }

        .time-action-button .action-title {
            color: var(--text-dark) !important;
        }

        .time-action-button .action-subtitle {
            color: var(--text-muted) !important;
        }

        /* Fix disabled button text */
        .time-action-button.disabled {
            color: var(--text-muted) !important;
        }

            .time-action-button.disabled .action-title {
                color: var(--text-muted) !important;
            }

            .time-action-button.disabled .action-subtitle {
                color: #adb5bd !important;
            }

    /* Fix timeline section */
    .timeline-section {
        background: white !important;
    }

    .timeline-header {
        background: #f8f9fa !important;
        color: var(--text-dark) !important;
    }

    .timeline-body {
        background: white !important;
        color: var(--text-dark) !important;
    }

    .timeline-item {
        background: #f8f9fa !important;
        color: var(--text-dark) !important;
    }

    .timeline-title {
        color: var(--text-dark) !important;
    }

    .timeline-time {
        color: var(--text-muted) !important;
    }

    .timeline-notes {
        color: var(--text-muted) !important;
    }

    /* Fix empty timeline */
    .empty-timeline {
        color: var(--text-muted) !important;
        background: white !important;
    }

        .empty-timeline h6 {
            color: var(--text-dark) !important;
        }

        .empty-timeline p {
            color: var(--text-muted) !important;
        }

    /* Fix current time display */
    .current-time-display {
        color: white !important;
    }

    #timeDisplay,
    #dateDisplay {
        color: white !important;
    }

    /* Fix button hover states on mobile */
    .time-action-button:hover:not(.disabled) {
        color: white !important;
    }

        .time-action-button:hover:not(.disabled) .action-title,
        .time-action-button:hover:not(.disabled) .action-subtitle {
            color: white !important;
        }
}

/* Extra small screens */
@media (max-width: 575.98px) {
    /* Force all time clock text to be visible */
    .professional-card-body * {
        color: var(--text-dark) !important;
    }

    /* Keep header text white */
    .professional-card-header * {
        color: white !important;
    }

    /* Keep button text readable */
    .time-action-button {
        background: white !important;
        color: #000000 !important;
        border: 2px solid var(--border-color) !important;
    }

        .time-action-button .action-title {
            color: #000000 !important;
        }

        .time-action-button .action-subtitle {
            color: #6c757d !important;
        }

    /* Timeline text */
    .timeline-header {
        background: #f8f9fa !important;
        color: #000000 !important;
    }

    .timeline-item {
        background: #f8f9fa !important;
        color: #000000 !important;
    }

    .timeline-title {
        color: #000000 !important;
    }

    .timeline-time,
    .timeline-notes {
        color: #6c757d !important;
    }

    /* Empty state */
    .empty-timeline {
        background: white !important;
        color: #6c757d !important;
    }

        .empty-timeline h6 {
            color: #000000 !important;
        }

    /* Disabled buttons */
    .time-action-button.disabled {
        background: #f8f9fa !important;
        color: #adb5bd !important;
    }

        .time-action-button.disabled .action-title,
        .time-action-button.disabled .action-subtitle {
            color: #adb5bd !important;
        }
}

/* Employee Directory Mobile Text Visibility Fixes */
@media (max-width: 767.98px) {
    /* Fix employee directory header */
    .professional-card-header {
        color: white !important;
    }

        .professional-card-header h4,
        .professional-card-header p {
            color: white !important;
        }

    /* Fix filter cards */
    .filter-card {
        background: white !important;
        color: var(--text-dark) !important;
        border: 2px solid var(--border-color) !important;
    }

        .filter-card.active {
            color: white !important;
        }

    .filter-info h3,
    .filter-info p {
        color: inherit !important;
    }

    /* Fix employee table */
    .employee-table {
        background: white !important;
        color: var(--text-dark) !important;
    }

        .employee-table thead th {
            background: #f8f9fa !important;
            color: var(--text-dark) !important;
        }

        .employee-table tbody td {
            background: white !important;
            color: var(--text-dark) !important;
        }

        .employee-table tbody tr {
            background: white !important;
        }

            .employee-table tbody tr:hover {
                background: #f8f9fa !important;
            }

            .employee-table tbody tr.inactive {
                background: #fef2f2 !important;
            }

                .employee-table tbody tr.inactive:hover {
                    background: #fecaca !important;
                }

    /* Fix employee info */
    .employee-name {
        color: var(--text-dark) !important;
    }

    .employee-number {
        color: var(--text-muted) !important;
    }

    .contact-info .email {
        color: var(--text-dark) !important;
    }

    .contact-info .phone {
        color: var(--text-muted) !important;
    }

    .join-date {
        color: var(--text-muted) !important;
    }

    /* Fix role badges - keep them colored */
    .role-badge {
        color: white !important;
    }

    /* Fix status badges - keep them colored */
    .status-badge {
        color: white !important;
    }

    /* Fix initials fallback */
    .initials-fallback {
        background: linear-gradient(135deg, var(--primary-blue), var(--primary-dark)) !important;
        color: white !important;
    }

    /* Fix modal content */
    .modal-body {
        background: white !important;
        color: var(--text-dark) !important;
    }

        .modal-body h6 {
            color: var(--primary-blue) !important;
        }

        .modal-body p,
        .modal-body div {
            color: var(--text-dark) !important;
        }

        .modal-body label {
            color: var(--text-dark) !important;
        }

    /* Fix form elements */
    .form-select,
    .form-control {
        background: white !important;
        color: var(--text-dark) !important;
        border: 2px solid var(--border-color) !important;
    }

    /* Fix buttons */
    .btn {
        color: inherit !important;
    }

    .btn-professional {
        color: white !important;
    }

    .btn-outline-primary {
        color: var(--primary-blue) !important;
        background: white !important;
    }

    .btn-outline-danger {
        color: var(--danger-red) !important;
        background: white !important;
    }
}

/* Extra small screens */
@media (max-width: 575.98px) {
    /* Force all employee directory text to be visible */
    .professional-card-body {
        background: white !important;
        color: #000000 !important;
    }

        .professional-card-body * {
            color: #000000 !important;
        }

    /* Keep header text white */
    .professional-card-header * {
        color: white !important;
    }

    /* Table text */
    .table {
        background: white !important;
        color: #000000 !important;
    }

        .table thead th {
            background: #f8f9fa !important;
            color: #000000 !important;
        }

        .table tbody td {
            background: white !important;
            color: #000000 !important;
        }

    /* Employee info */
    .employee-name {
        color: #000000 !important;
    }

    .employee-number {
        color: #6c757d !important;
    }

    .contact-info .email {
        color: #000000 !important;
    }

    .contact-info .phone {
        color: #6c757d !important;
    }

    .join-date {
        color: #6c757d !important;
    }

    /* Filter cards */
    .filter-card {
        background: white !important;
        color: #000000 !important;
    }

        .filter-card.active {
            color: white !important;
        }

    .filter-info h3,
    .filter-info p {
        color: inherit !important;
    }

    /* Keep badges colored */
    .role-badge,
    .status-badge {
        color: white !important;
    }

    /* Modal fixes */
    .modal-content {
        background: white !important;
        color: #000000 !important;
    }

    .modal-body {
        background: white !important;
        color: #000000 !important;
    }

        .modal-body * {
            color: #000000 !important;
        }

        .modal-body h6 {
            color: var(--primary-blue) !important;
        }

    /* Form elements */
    .form-control,
    .form-select {
        background: white !important;
        color: #000000 !important;
        border: 2px solid #dee2e6 !important;
    }

    .form-label,
    label {
        color: #000000 !important;
    }
}