/*
 * Enterprise Color Scheme - Optimized for Accessibility
 * Updated with WCAG AA compliant contrast ratios
 */

:root {
    /* Primary Colors - Dark Navy (Improved contrast) */
    --primary: #0A1628;
    --primary-dark: #050B14;
    --primary-light: #1C2F4A;
    --primary-lighter: #2A3F5F;

    /* Secondary Colors - Charcoal Grey (Darkened for better contrast) */
    --secondary: #1a252f;
    --secondary-dark: #0f161d;
    --secondary-light: #2C3E50;

    /* Accent Colors - Enhanced Gold (Better visibility) */
    --accent: #B8941F;  /* Darkened from #D4AF37 for better contrast */
    --accent-dark: #9A7C1A;
    --accent-light: #C9A534;

    /* Neutral Colors */
    --background: #f8fafc;
    --background-alt: #f1f5f9;
    --surface: #ffffff;
    --surface-hover: #f8fafc;

    /* Text Colors - Improved contrast ratios */
    --text-primary: #0A1628;  /* Using primary navy for maximum contrast */
    --text-secondary: #2C3E50;  /* Darkened from #475569 */
    --text-muted: #4A5568;  /* Darkened from #64748b */
    --text-light: #64748b;  /* Darkened from #94a3b8 */

    /* Border Colors */
    --border: #cbd5e1;  /* Slightly darker for visibility */
    --border-light: #e2e8f0;
    --border-dark: #94a3b8;

    /* Status Colors - Enhanced for accessibility */
    --success: #047857;  /* Darkened */
    --success-light: #059669;
    --success-bg: #d1fae5;

    --warning: #b45309;  /* Darkened */
    --warning-light: #d97706;
    --warning-bg: #fef3c7;

    --error: #b91c1c;  /* Darkened */
    --error-light: #dc2626;
    --error-bg: #fee2e2;

    --info: #0A1628;
    --info-light: #1C2F4A;
    --info-bg: #dbeafe;

    /* Shadows - Slightly more pronounced */
    --shadow-sm: 0 1px 2px 0 rgba(10, 22, 40, 0.08);
    --shadow: 0 1px 3px 0 rgba(10, 22, 40, 0.12), 0 1px 2px -1px rgba(10, 22, 40, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(10, 22, 40, 0.12), 0 2px 4px -2px rgba(10, 22, 40, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(10, 22, 40, 0.12), 0 4px 6px -4px rgba(10, 22, 40, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(10, 22, 40, 0.15), 0 8px 10px -6px rgba(10, 22, 40, 0.1);

    /* Radius */
    --radius-sm: 0.375rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;

    /* Fonts */
    --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
}

/* Marketing Site Colors Override */
:root {
    --primary-navy: #0A1628;
    --secondary-navy: #1C2F4A;
    --accent-gold: #B8941F;  /* Enhanced from #D4AF37 */
    --accent-silver: #94a3b8;  /* Darkened from #C0C0C0 */
    --soft-white: #F8F9FA;
    --charcoal: #1a252f;  /* Darkened from #2C3E50 */
    --slate-gray: #2C3E50;  /* Darkened from #4A5568 */
    --light-cream: #FEFEFE;
    --success-green: #047857;  /* Darkened from #2D7A3E */
    --border-subtle: #cbd5e1;  /* Darkened from #E1E4E8 */
}

/* Global Overrides */
body {
    background-color: var(--background);
    color: var(--text-primary);
    font-family: var(--font-primary);
}

/* Button Styles - Enhanced contrast */
.btn-primary,
button.btn-primary,
input[type=submit].btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius);
    font-weight: 600;  /* Increased from 500 */
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--surface);
    color: var(--text-primary);
    border: 2px solid var(--primary);  /* Increased border width */
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius);
    font-weight: 600;  /* Increased from 500 */
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.btn-success {
    background: var(--success);
    color: white;
    font-weight: 600;
}

.btn-success:hover {
    background: var(--success-light);
}

.btn-danger {
    background: var(--error);
    color: white;
    font-weight: 600;
}

.btn-danger:hover {
    background: var(--error-light);
}

/* Card Styles - Enhanced borders */
.card {
    background: var(--surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
}

.card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-dark);
}

/* Input Styles - Enhanced visibility */
input[type=text],
input[type=email],
input[type=password],
input[type=number],
input[type=url],
input[type=search],
textarea,
select {
    background: var(--surface);
    border: 1.5px solid var(--border);  /* Increased border width */
    border-radius: var(--radius);
    padding: 0.625rem 0.875rem;
    color: var(--text-primary);
    transition: all 0.2s;
    font-size: 1rem;
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
    opacity: 1;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    border-width: 2px;
    box-shadow: 0 0 0 3px rgba(10, 22, 40, 0.15);
}

/* Alert Styles - Enhanced contrast */
.alert {
    padding: 1rem;
    border-radius: var(--radius);
    border-left: 4px solid;
    margin-bottom: 1rem;
    font-weight: 500;
}

.alert-success {
    background: var(--success-bg);
    border-color: var(--success);
    color: #065f46;  /* Darker for better contrast */
}

.alert-warning {
    background: var(--warning-bg);
    border-color: var(--warning);
    color: #92400e;  /* Darker for better contrast */
}

.alert-error {
    background: var(--error-bg);
    border-color: var(--error);
    color: #991b1b;  /* Darker for better contrast */
}

.alert-info {
    background: var(--info-bg);
    border-color: var(--info);
    color: var(--info);
}

/* Link Styles - Enhanced visibility */
a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 500;
}

a:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

a:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Badge Styles - Enhanced contrast */
.badge {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;  /* Increased from 600 */
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.badge-primary {
    background: var(--primary);
    color: white;
}

.badge-success {
    background: var(--success);
    color: white;
}

.badge-warning {
    background: var(--warning);
    color: white;
}

.badge-error {
    background: var(--error);
    color: white;
}

/* Table Styles - Enhanced readability */
table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: var(--primary);
    color: white;
    font-weight: 700;  /* Increased from 600 */
    text-align: left;
    padding: 0.875rem 1rem;
    border-bottom: 2px solid var(--primary-dark);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--text-primary);
}

tr:hover {
    background: var(--background-alt);
}

/* Header Styles */
.header,
.main-content-header {
    background: var(--surface);
    border-bottom: 2px solid var(--border);  /* Increased border */
}

/* Modal Styles */
.modal {
    background: rgba(10, 22, 40, 0.85);  /* Darker overlay */
}

.modal-content {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border);
}

/* Loading/Spinner */
.spinner {
    border-color: var(--border-light);
    border-top-color: var(--primary);
    border-width: 3px;  /* Increased */
}

/* Status Colors - Enhanced visibility */
.status-active {
    color: var(--success);
    font-weight: 600;
}

.status-pending {
    color: var(--warning);
    font-weight: 600;
}

.status-inactive {
    color: var(--text-muted);
    font-weight: 500;
}

.status-error {
    color: var(--error);
    font-weight: 600;
}

/* Navigation - Enhanced contrast */
nav a,
.nav-links a {
    color: var(--text-secondary);
    font-weight: 600;  /* Increased from 500 */
}

nav a:hover,
.nav-links a:hover {
    color: var(--primary);
}

/* Headings - Ensured proper contrast */
h1, h2, h3, h4, h5, h6 {
    color: var(--primary);
    font-weight: 700;
}

/* Small text - Enhanced for readability */
small,
.text-sm {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Disabled states - Clear visual feedback */
button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: var(--background-alt);
    color: var(--text-muted);
}

/* Focus states for accessibility */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}
