﻿@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Brand Colors - Higher contrast */
    --primary: #2563EB;
    --primary-hover: #1D4ED8;
    --primary-light: rgba(37, 99, 235, 0.12);
    --primary-border: rgba(37, 99, 235, 0.18);
    --primary-color: #2563EB;
    --primary-color-detail: #2563EB;
    --primary-focus: rgba(37, 99, 235, 0.4);
    /* Success Colors - Enhanced visibility */
    --success: #059669;
    --success-hover: #047857;
    --success-light: rgba(5, 150, 105, 0.12);
    --success-border: rgba(5, 150, 105, 0.18);
    --success-color: #059669;
    --success-bg: rgba(5, 150, 105, 0.12);
    --success-focus: rgba(5, 150, 105, 0.4);
    /* Warning Colors - Improved contrast */
    --warning: #D97706;
    --warning-hover: #B45309;
    --warning-light: rgba(217, 119, 6, 0.12);
    --warning-border: rgba(217, 119, 6, 0.18);
    --warning-focus: rgba(217, 119, 6, 0.4);
    /* Danger Colors - Better visibility */
    --danger: #DC2626;
    --danger-hover: #B91C1C;
    --danger-light: rgba(220, 38, 38, 0.12);
    --danger-border: rgba(220, 38, 38, 0.18);
    --danger-focus: rgba(220, 38, 38, 0.4);
    /* Background Colors - More contrast */
    --body-bg: #F8FAFC;
    --sidebar-bg: #FFFFFF;
    --content-bg: #FFFFFF;
    --input-bg: #F1F5F9;
    --hover-bg: rgba(15, 23, 42, 0.04);
    --active-bg: rgba(15, 23, 42, 0.08);
    /* Text Colors - Enhanced readability */
    --text-primary: #0F172A;
    --text-secondary: #334155;
    --text-muted: #64748B;
    --text-light: #94A3B8;
    --text-heading: #0F172A;
    /* Border Colors */
    --border-color: #E2E8F0;
    --border-hover: #CBD5E1;
    --border-focus: #2563EB;
    /* Shadows - Refined depth */
    --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.05);
    --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 4px 8px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 8px 16px rgba(15, 23, 42, 0.1);
    --shadow-xl: 0 12px 24px rgba(15, 23, 42, 0.12);
}

/* Dark Theme - Enhanced contrast */
.theme-dark {
    --body-bg: #0F172A;
    --sidebar-bg: #1E293B;
    --content-bg: #1E293B;
    --input-bg: #2D3748;
    --hover-bg: rgba(255, 255, 255, 0.06);
    --active-bg: rgba(255, 255, 255, 0.1);
    --text-primary: #F8FAFC;
    --text-secondary: #E2E8F0;
    --text-muted: #CBD5E1;
    --text-light: #94A3B8;
    --text-heading: #F8FAFC;
    --border-color: rgba(226, 232, 240, 0.1);
    --border-hover: rgba(226, 232, 240, 0.2);
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.35);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.45);
    --shadow-xl: 0 12px 24px rgba(0, 0, 0, 0.5);
}

/* Typography Enhancements */
html {
    font-size: 16px;
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: var(--body-bg);
    color: var(--text-primary);
    transition: background-color 0.2s ease, color 0.2s ease;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-heading);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: -0.025em;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.25rem;
}

h2 {
    font-size: 1.875rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1.125rem;
}

h6 {
    font-size: 1rem;
}

/* Button Refinements */
.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-weight: 500;
    font-size: 0.9375rem;
    line-height: 1.5;
    border-radius: 0.5rem;
    border: 1px solid transparent;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    user-select: none;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1);
}

    .btn-primary:hover {
        background-color: var(--primary-hover);
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(15, 23, 42, 0.12);
    }

    .btn-primary:active {
        transform: translateY(0);
        box-shadow: 0 1px 2px rgba(15, 23, 42, 0.1);
    }

/* Form Control Enhancements */
.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.9375rem;
    line-height: 1.5;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    background-color: var(--input-bg);
    color: var(--text-primary);
    transition: all 0.2s ease;
}

    .form-control:hover {
        border-color: var(--border-hover);
    }

    .form-control:focus {
        outline: none;
        border-color: var(--border-focus);
        box-shadow: 0 0 0 4px var(--primary-light);
    }

/* Table Refinements */
.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 1.5rem;
}

    .table th {
        font-weight: 600;
        font-size: 0.875rem;
        padding: 1rem 1.25rem;
        background-color: var(--body-bg);
        border-bottom: 2px solid var(--border-color);
        color: var(--text-secondary);
    }

    .table td {
        padding: 1rem 1.25rem;
        border-bottom: 1px solid var(--border-color);
        vertical-align: middle;
        color: var(--text-primary);
    }

    .table tr:hover {
        background-color: var(--hover-bg);
    }

/* Card Enhancements */
.card {
    background-color: var(--content-bg);
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    overflow: hidden;
}

    .card:hover {
        transform: translateY(-2px);
        box-shadow: var(--shadow-lg);
    }

.card-header {
    padding: 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--content-bg);
}

.card-body {
    padding: 1.25rem;
}

/* Alert Refinements */
.alert {
    position: relative;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert-success {
    background-color: var(--success-light);
    border-color: var(--success-border);
    color: var(--success);
}

.alert-danger {
    background-color: var(--danger-light);
    border-color: var(--danger-border);
    color: var(--danger);
}

/* Badge Enhancements */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.5;
    border-radius: 9999px;
    letter-spacing: 0.025em;
}

.badge-primary {
    background-color: var(--primary-light);
    color: var(--primary);
}

/* Input Group Refinements */
.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

    .input-group .form-control {
        position: relative;
        flex: 1 1 auto;
    }

.input-group-text {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background-color: var(--input-bg);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
}

/* Focus Ring */
.focus-ring {
    outline: none;
}

    .focus-ring:focus-visible {
        box-shadow: 0 0 0 4px var(--primary-focus);
    }

/* Transition Utilities */
.transition-all {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.transition-transform {
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Scrollbar Refinements */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background-color: transparent;
}

::-webkit-scrollbar-thumb {
    background-color: var(--text-muted);
    border-radius: 4px;
}

    ::-webkit-scrollbar-thumb:hover {
        background-color: var(--text-secondary);
    }
