﻿:root
{
    --primary: #d97706;
    --primary-light: #3b82f6;
    --primary-dark: #1d4ed8;
    --success: #059669;
    --warning: #d97706;
    --danger: #dc2626;
    --info: #0891b2;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #374151; /* ADA compliant on white */
    --gray-700: #1f2937; /* ADA compliant on white */
    --gray-800: #111827; /* ADA compliant on white */
    --gray-900: #030712; /* ADA compliant on white */
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --ring: 0 0 0 3px rgb(37 99 235 / 0.2);
}

body
{
    background-color: var(--gray-50);
    color: var(--gray-900); /* Much darker for better contrast */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Header styling */
.dashboard-header
{
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-radius: 0 0 1rem 1rem;
}

.dashboard-title
{
    font-size: 1.875rem;
    font-weight: 700;
    margin: 0;
    color: white; /* Explicit white for contrast */
}

.dashboard-subtitle
{
    opacity: 0.95; /* Slightly higher opacity for better contrast */
    margin-top: 0.5rem;
    color: white;
}

/* Modern stats cards */
.stats-card
{
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-300); /* Darker border */
    transition: all 0.2s ease;
    margin-bottom: 1.5rem;
}

    .stats-card:hover
    {
        transform: translateY(-2px);
        box-shadow: var(--shadow-lg);
    }

.stat-number
{
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    line-height: 1;
}

.stat-label
{
    color: var(--gray-700); /* Much darker for ADA compliance */
    font-size: 0.875rem;
    font-weight: 600; /* Bolder weight for better readability */
    margin-top: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.stat-primary
{
    color: var(--primary);
}

.stat-success
{
    color: var(--success);
}

.stat-warning
{
    color: var(--warning);
}

.stat-info
{
    color: var(--info);
}

.stat-danger
{
    color: var(--danger);
}

/* Modern tabs */
.modern-tabs
{
    border: none;
    background: white;
    border-radius: 0.75rem;
    padding: 0.25rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
    border: 1px solid var(--gray-300);
}

    .modern-tabs .nav-tabs
    {
        border: none;
        margin: 0;
    }

        .modern-tabs .nav-tabs > li
        {
            margin: 0;
        }

            .modern-tabs .nav-tabs > li > a
            {
                border: none;
                border-radius: 0.5rem;
                padding: 0.75rem 1.5rem;
                font-weight: 600; /* Bolder for better readability */
                color: var(--gray-700); /* ADA compliant dark text */
                transition: all 0.2s ease;
                margin: 0;
            }

                .modern-tabs .nav-tabs > li.active > a,
                .modern-tabs .nav-tabs > li > a:hover
                {
                    background: var(--primary);
                    color: white;
                    box-shadow: var(--shadow-sm);
                }

                .modern-tabs .nav-tabs > li > a:focus
                {
                    outline: 2px solid var(--primary);
                    outline-offset: 2px;
                }

/* Content cards */
.content-card
{
    background: white;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-300); /* Darker border */
    overflow: hidden;
}

.content-card-header
{
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-300); /* Darker border */
    background: var(--gray-50);
}

.content-card-title
{
    font-size: 1.125rem;
    font-weight: 700; /* Bolder */
    margin: 0;
    color: var(--gray-900);
}

.content-card-body
{
    padding: 0;
}

/* Modern search */
.modern-search
{
    position: relative;
}

    .modern-search input
    {
        border: 2px solid var(--gray-400); /* Darker, thicker border */
        border-radius: 0.5rem;
        padding: 0.75rem 1rem 0.75rem 2.5rem;
        font-size: 0.875rem;
        transition: all 0.2s ease;
        background: white;
        color: var(--gray-900);
    }

        .modern-search input:focus
        {
            outline: none;
            border-color: var(--primary);
            box-shadow: var(--ring);
        }

        .modern-search input::placeholder
        {
            color: var(--gray-600); /* ADA compliant placeholder */
        }

    .modern-search .search-icon
    {
        position: absolute;
        left: 0.75rem;
        top: 50%;
        transform: translateY(-50%);
        color: var(--gray-600); /* Darker icon */
        pointer-events: none;
    }

/* Modern buttons */
.btn-modern
{
    border-radius: 0.5rem;
    font-weight: 600; /* Bolder text */
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

    .btn-modern:hover
    {
        transform: translateY(-1px);
        box-shadow: var(--shadow);
        text-decoration: none;
    }

    .btn-modern:focus
    {
        outline: 2px solid var(--gray-900);
        outline-offset: 2px;
    }

.btn-primary-modern
{
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

    .btn-primary-modern:hover
    {
        background: var(--primary-dark);
        color: white;
        border-color: var(--primary-dark);
    }

.btn-success-modern
{
    background: var(--success);
    color: white;
    border-color: var(--success);
}

    .btn-success-modern:hover
    {
        background: #047857;
        color: white;
    }

.btn-danger-modern
{
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

    .btn-danger-modern:hover
    {
        background: #b91c1c;
        color: white;
    }

.btn-default
{
    background: white;
    color: var(--gray-800);
    border: 2px solid var(--gray-400);
}

    .btn-default:hover
    {
        background: var(--gray-50);
        color: var(--gray-900);
        border-color: var(--gray-500);
    }

/* Modern table */
.modern-table
{
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

    .modern-table th
    {
        background: var(--gray-100);
        padding: 1rem 1.5rem;
        font-weight: 700; /* Bolder headers */
        font-size: 0.875rem;
        color: var(--gray-900); /* Much darker */
        text-transform: uppercase;
        letter-spacing: 0.025em;
        border-bottom: 2px solid var(--gray-300); /* Thicker border */
    }

    .modern-table td
    {
        padding: 1rem 1.5rem;
        border-bottom: 1px solid var(--gray-300); /* Darker border */
        vertical-align: middle;
        color: var(--gray-900); /* Dark text */
    }

    .modern-table tbody tr:hover
    {
        background: var(--gray-100); /* Slightly darker hover */
    }

    .modern-table tbody tr:last-child td
    {
        border-bottom: none;
    }

/* Modern badges - with better contrast */
.badge-modern
{
    padding: 0.375rem 0.875rem; /* Slightly larger for better readability */
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700; /* Bolder text */
    text-transform: uppercase;
    letter-spacing: 0.025em;
    border: 1px solid transparent;
}

.badge-success
{
    background: var(--success);
    color: white;
    border-color: var(--success);
}

.badge-info
{
    background: var(--info);
    color: white;
    border-color: var(--info);
}

.badge-warning
{
    background: var(--warning);
    color: white;
    border-color: var(--warning);
}

.badge-danger
{
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

.badge-gray
{
    background: var(--gray-700);
    color: white;
    border-color: var(--gray-700);
}

/* Modern modals */
.modal-content
{
    border: 2px solid var(--gray-300);
    border-radius: 0.75rem;
    box-shadow: var(--shadow-lg);
}

.modal-header
{
    background: var(--gray-100);
    border-bottom: 2px solid var(--gray-300);
    border-radius: 0.75rem 0.75rem 0 0;
    padding: 1.5rem;
}

.modal-title
{
    font-weight: 700;
    color: var(--gray-900);
}

.modal-body
{
    padding: 1.5rem;
    color: var(--gray-900);
}

.modal-footer
{
    background: var(--gray-100);
    border-top: 2px solid var(--gray-300);
    border-radius: 0 0 0.75rem 0.75rem;
    padding: 1.5rem;
}

/* Form styling */
.form-group label
{
    font-weight: 600;
    color: var(--gray-900); /* Much darker */
    margin-bottom: 0.5rem;
    display: block;
}

.form-control
{
    border: 2px solid var(--gray-400); /* Darker, thicker border */
    border-radius: 0.5rem;
    padding: 0.75rem;
    transition: all 0.2s ease;
    color: var(--gray-900);
    background: white;
}

    .form-control:focus
    {
        border-color: var(--primary);
        box-shadow: var(--ring);
        outline: none;
    }

    .form-control::placeholder
    {
        color: var(--gray-600); /* ADA compliant placeholder */
    }

.text-muted, .help-block
{
    color: var(--gray-700); /* Much darker for ADA compliance */
    font-size: 0.875rem;
}

/* Loading states */
.loading
{
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-700); /* Darker text */
    font-weight: 500;
}

/* Links */
a
{
    color: var(--primary);
    text-decoration: underline;
}

    a:hover
    {
        color: var(--primary-dark);
        text-decoration: underline;
    }

    a:focus
    {
        outline: 2px solid var(--primary);
        outline-offset: 2px;
    }

/* Error alerts */
.alert-danger
{
    background: #fef2f2;
    border: 2px solid var(--danger);
    color: var(--gray-900); /* Dark text for contrast */
    font-weight: 500;
}

@keyframes spin
{
    from
    {
        transform: rotate(0deg);
    }

    to
    {
        transform: rotate(360deg);
    }
}

.spinning
{
    animation: spin 1s linear infinite;
}

/* Animation keyframes */
@keyframes slideIn
{
    from
    {
        transform: translateX(100%);
        opacity: 0;
    }

    to
    {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Modern alert styling */
.modern-alert
{
    animation: slideIn 0.3s ease;
}

/* Responsive adjustments */
@media (max-width: 768px)
{
    .dashboard-header
    {
        padding: 1.5rem 0;
    }

    .stats-card
    {
        margin-bottom: 1rem;
    }

    .content-card-header
    {
        padding: 1rem;
    }
}
