/* ProScribe AI - Dark Mode Only - Professional Design */
/* High Contrast, Clean, Corporate Look */

:root {
    /* Professional Dark Theme Colors */
    --bg-primary: #0f1419;
    --bg-secondary: #1a1f2e;
    --bg-tertiary: #242b3d;
    --bg-card: #1e2433;
    
    /* Text Colors - High Contrast */
    --text-primary: #ffffff;
    --text-secondary: #e2e8f0;
    --text-muted: #94a3b8;
    --text-disabled: #64748b;
    
    /* Brand Colors */
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --primary-light: #60a5fa;
    
    /* Accent Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #06b6d4;
    
    /* Border & Divider */
    --border-color: #334155;
    --border-light: #475569;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

/* Global Styles */
* {
    box-sizing: border-box;
}

body {
    background: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
}

/* Fix all input fields */
input, textarea, select {
    background: var(--bg-tertiary) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    padding: 0.75rem 1rem !important;
    border-radius: 8px !important;
    transition: all 0.2s ease;
}

input:focus, textarea:focus, select:focus {
    background: var(--bg-secondary) !important;
    border-color: var(--primary) !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

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

/* Fix all buttons */
.btn, button {
    font-weight: 500;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    transition: all 0.2s ease;
    border: none;
}

.btn-primary, button.btn-primary {
    background: var(--primary) !important;
    color: white !important;
    border: none !important;
}

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

.btn-secondary {
    background: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
}

.btn-secondary:hover {
    background: var(--bg-secondary) !important;
    border-color: var(--border-light) !important;
}

/* Cards */
.card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 12px !important;
    box-shadow: var(--shadow-sm) !important;
    color: var(--text-primary) !important;
}

.card-header {
    background: var(--bg-tertiary) !important;
    border-bottom: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    padding: 1.25rem 1.5rem !important;
}

.card-body {
    padding: 1.5rem !important;
    color: var(--text-primary) !important;
}

/* Dashboard Stats Cards */
.stat-card, .stats-card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 12px !important;
    padding: 1.5rem !important;
    transition: all 0.2s ease;
}

.stat-card:hover {
    border-color: var(--primary) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-number, .stat-value {
    font-size: 2.5rem !important;
    font-weight: 700 !important;
    color: var(--text-primary) !important;
    line-height: 1 !important;
}

.stat-label {
    color: var(--text-muted) !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    margin-top: 0.5rem !important;
}

/* Navigation */
.navbar {
    background: var(--bg-secondary) !important;
    border-bottom: 1px solid var(--border-color) !important;
    backdrop-filter: blur(10px);
}

.nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--text-primary) !important;
}

.nav-link.active {
    color: var(--primary) !important;
}

/* Dropdown Menus */
.dropdown-menu {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px !important;
    box-shadow: var(--shadow-lg) !important;
    padding: 0.5rem !important;
}

.dropdown-item {
    color: var(--text-primary) !important;
    padding: 0.75rem 1rem !important;
    border-radius: 6px !important;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
}

.dropdown-divider {
    border-color: var(--border-color) !important;
    margin: 0.5rem 0 !important;
}

/* Tables */
.table {
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

.table thead th {
    background: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
    font-weight: 600 !important;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    padding: 1rem !important;
}

.table tbody td {
    background: var(--bg-card) !important;
    color: var(--text-secondary) !important;
    border-color: var(--border-color) !important;
    padding: 1rem !important;
}

.table tbody tr:hover td {
    background: var(--bg-tertiary) !important;
}

/* Badges */
.badge {
    font-weight: 600 !important;
    padding: 0.5rem 0.75rem !important;
    border-radius: 6px !important;
    font-size: 0.75rem !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

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

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

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

.badge.bg-danger {
    background: var(--danger) !important;
    color: white !important;
}

/* Forms */
.form-label {
    color: var(--text-primary) !important;
    font-weight: 600 !important;
    margin-bottom: 0.5rem !important;
    font-size: 0.875rem !important;
}

.form-control {
    background: var(--bg-tertiary) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: 8px !important;
}

.form-control:focus {
    background: var(--bg-secondary) !important;
    border-color: var(--primary) !important;
    color: var(--text-primary) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

.form-select {
    background: var(--bg-tertiary) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e") !important;
}

.form-check-input {
    background-color: var(--bg-tertiary) !important;
    border-color: var(--border-color) !important;
}

.form-check-input:checked {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.form-check-label {
    color: var(--text-secondary) !important;
}

/* Alerts */
.alert {
    border-radius: 8px !important;
    border: 1px solid !important;
    padding: 1rem 1.25rem !important;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1) !important;
    border-color: var(--success) !important;
    color: var(--success) !important;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1) !important;
    border-color: var(--danger) !important;
    color: var(--danger) !important;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1) !important;
    border-color: var(--warning) !important;
    color: var(--warning) !important;
}

.alert-info {
    background: rgba(6, 182, 212, 0.1) !important;
    border-color: var(--info) !important;
    color: var(--info) !important;
}

/* Modal */
.modal-content {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 12px !important;
    color: var(--text-primary) !important;
}

.modal-header {
    border-bottom: 1px solid var(--border-color) !important;
    background: var(--bg-tertiary) !important;
}

.modal-footer {
    border-top: 1px solid var(--border-color) !important;
    background: var(--bg-tertiary) !important;
}

.modal-title {
    color: var(--text-primary) !important;
}

.btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* Text Colors */
.text-muted {
    color: var(--text-muted) !important;
}

.text-primary {
    color: var(--primary) !important;
}

.text-success {
    color: var(--success) !important;
}

.text-warning {
    color: var(--warning) !important;
}

.text-danger {
    color: var(--danger) !important;
}

/* Links */
a {
    color: var(--primary) !important;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-light) !important;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 6px;
    border: 2px solid var(--bg-primary);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-light);
}

/* Loading States */
.spinner-border {
    border-color: var(--primary) !important;
    border-right-color: transparent !important;
}

/* Progress Bars */
.progress {
    background: var(--bg-tertiary) !important;
    border-radius: 8px !important;
    height: 8px !important;
}

.progress-bar {
    background: var(--primary) !important;
    border-radius: 8px !important;
}

/* Tooltips */
.tooltip-inner {
    background: var(--bg-card) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
    box-shadow: var(--shadow-md);
}

/* List Groups */
.list-group-item {
    background: var(--bg-card) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

.list-group-item:hover {
    background: var(--bg-tertiary) !important;
}

/* Pagination */
.pagination .page-link {
    background: var(--bg-card) !important;
    border-color: var(--border-color) !important;
    color: var(--text-primary) !important;
}

.pagination .page-link:hover {
    background: var(--bg-tertiary) !important;
    border-color: var(--border-light) !important;
}

.pagination .page-item.active .page-link {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
}

/* Breadcrumb */
.breadcrumb {
    background: transparent !important;
}

.breadcrumb-item {
    color: var(--text-muted) !important;
}

.breadcrumb-item.active {
    color: var(--text-primary) !important;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--text-muted) !important;
}

/* Tabs */
.nav-tabs {
    border-bottom-color: var(--border-color) !important;
}

.nav-tabs .nav-link {
    color: var(--text-muted) !important;
    border-color: transparent !important;
}

.nav-tabs .nav-link:hover {
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

.nav-tabs .nav-link.active {
    background: var(--bg-card) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) var(--border-color) var(--bg-card) !important;
}

/* Fix specific dashboard elements */
.quick-actions .action-card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    padding: 1.5rem !important;
    border-radius: 12px !important;
    transition: all 0.2s ease;
}

.quick-actions .action-card:hover {
    border-color: var(--primary) !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Icon colors */
.icon-primary {
    color: var(--primary) !important;
}

.icon-success {
    color: var(--success) !important;
}

.icon-warning {
    color: var(--warning) !important;
}

.icon-danger {
    color: var(--danger) !important;
}

/* Ensure high contrast everywhere */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary) !important;
    font-weight: 700 !important;
}

p {
    color: var(--text-secondary) !important;
}

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