/* Enhanced Color System */
:root {
    /* Primary Colors */
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-200: #bfdbfe;
    --primary-300: #93c5fd;
    --primary-400: #60a5fa;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --primary-800: #1e40af;
    --primary-900: #1e3a8a;
    
    /* Accent Colors */
    --accent-50: #f0f9ff;
    --accent-100: #e0f2fe;
    --accent-200: #bae6fd;
    --accent-300: #7dd3fc;
    --accent-400: #38bdf8;
    --accent-500: #0ea5e9;
    --accent-600: #0284c7;
    --accent-700: #0369a1;
    --accent-800: #075985;
    --accent-900: #0c4a6e;
    
    /* Success Colors */
    --success-50: #f0fdf4;
    --success-100: #dcfce7;
    --success-200: #bbf7d0;
    --success-300: #86efac;
    --success-400: #4ade80;
    --success-500: #22c55e;
    --success-600: #16a34a;
    --success-700: #15803d;
    --success-800: #166534;
    --success-900: #14532d;
    
    /* Warning Colors */
    --warning-50: #fffbeb;
    --warning-100: #fef3c7;
    --warning-200: #fde68a;
    --warning-300: #fcd34d;
    --warning-400: #fbbf24;
    --warning-500: #f59e0b;
    --warning-600: #d97706;
    --warning-700: #b45309;
    --warning-800: #92400e;
    --warning-900: #78350f;
    
    /* Error Colors */
    --error-50: #fef2f2;
    --error-100: #fee2e2;
    --error-200: #fecaca;
    --error-300: #fca5a5;
    --error-400: #f87171;
    --error-500: #ef4444;
    --error-600: #dc2626;
    --error-700: #b91c1c;
    --error-800: #991b1b;
    --error-900: #7f1d1d;
}

/* Text Utilities */
.text-primary { color: var(--primary-color) !important; }
.text-primary-light { color: var(--primary-300) !important; }
.text-primary-dark { color: var(--primary-700) !important; }

.text-accent { color: var(--accent-color) !important; }
.text-accent-light { color: var(--accent-300) !important; }
.text-accent-dark { color: var(--accent-700) !important; }

.text-success { color: var(--success-color) !important; }
.text-success-light { color: var(--success-300) !important; }
.text-success-dark { color: var(--success-700) !important; }

.text-warning { color: var(--warning-color) !important; }
.text-warning-light { color: var(--warning-300) !important; }
.text-warning-dark { color: var(--warning-700) !important; }

.text-error { color: var(--error-color) !important; }
.text-error-light { color: var(--error-300) !important; }
.text-error-dark { color: var(--error-700) !important; }

.text-ugx { color: var(--ugx-color) !important; }
.text-muted { color: var(--gray-600) !important; }

/* Background Utilities */
.bg-primary { background-color: var(--primary-color) !important; }
.bg-primary-light { background-color: var(--primary-100) !important; }
.bg-primary-dark { background-color: var(--primary-800) !important; }

.bg-accent { background-color: var(--accent-color) !important; }
.bg-accent-light { background-color: var(--accent-100) !important; }
.bg-accent-dark { background-color: var(--accent-800) !important; }

.bg-success { background-color: var(--success-color) !important; }
.bg-success-light { background-color: var(--success-100) !important; }
.bg-success-dark { background-color: var(--success-800) !important; }

.bg-warning { background-color: var(--warning-color) !important; }
.bg-warning-light { background-color: var(--warning-100) !important; }
.bg-warning-dark { background-color: var(--warning-800) !important; }

.bg-error { background-color: var(--error-color) !important; }
.bg-error-light { background-color: var(--error-100) !important; }
.bg-error-dark { background-color: var(--error-800) !important; }

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%) !important;
}

.bg-gradient-success {
    background: linear-gradient(135deg, var(--success-400) 0%, var(--success-600) 100%) !important;
}

.bg-gradient-warning {
    background: linear-gradient(135deg, var(--warning-400) 0%, var(--warning-600) 100%) !important;
}

.bg-gradient-error {
    background: linear-gradient(135deg, var(--error-400) 0%, var(--error-600) 100%) !important;
}

/* Enhanced Button Styles */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

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

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-700) 0%, var(--accent-700) 100%);
    color: white;
}

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-800);
}

.btn-secondary:hover {
    background: var(--gray-300);
    color: var(--gray-900);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-500) 0%, var(--success-600) 100%);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, var(--success-600) 0%, var(--success-700) 100%);
    color: white;
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-500) 0%, var(--warning-600) 100%);
    color: white;
}

.btn-warning:hover {
    background: linear-gradient(135deg, var(--warning-600) 0%, var(--warning-700) 100%);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--error-500) 0%, var(--error-600) 100%);
    color: white;
}

.btn-danger:hover {
    background: linear-gradient(135deg, var(--error-600) 0%, var(--error-700) 100%);
    color: white;
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

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

.btn-outline-secondary {
    background: transparent;
    color: var(--gray-600);
    border: 2px solid var(--gray-300);
}

.btn-outline-secondary:hover {
    background: var(--gray-100);
    color: var(--gray-800);
}

/* Button Sizes */
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

.btn-xl {
    padding: 1.25rem 2.5rem;
    font-size: 1.125rem;
}

/* Button Shapes */
.btn-rounded {
    border-radius: 2rem;
}

.btn-square {
    border-radius: 0.25rem;
}

.btn-circle {
    border-radius: 50%;
    width: 48px;
    height: 48px;
    padding: 0;
}

/* Loading States */
.btn-loading {
    position: relative;
    color: transparent !important;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Card Enhancements */
.card {
    background: var(--white);
    border-radius: var(--card-radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    transition: all 0.3s ease;
    overflow: hidden;
}

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

.card-header {
    padding: 1.5rem;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1.5rem;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
}

.card-gradient {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
}

.card-gradient .card-header,
.card-gradient .card-footer {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Spacing Utilities */
.m-0 { margin: 0 !important; }
.m-1 { margin: 0.25rem !important; }
.m-2 { margin: 0.5rem !important; }
.m-3 { margin: 1rem !important; }
.m-4 { margin: 1.5rem !important; }
.m-5 { margin: 3rem !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }
.mt-5 { margin-top: 3rem !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 3rem !important; }

.p-0 { padding: 0 !important; }
.p-1 { padding: 0.25rem !important; }
.p-2 { padding: 0.5rem !important; }
.p-3 { padding: 1rem !important; }
.p-4 { padding: 1.5rem !important; }
.p-5 { padding: 3rem !important; }

.pt-0 { padding-top: 0 !important; }
.pt-1 { padding-top: 0.25rem !important; }
.pt-2 { padding-top: 0.5rem !important; }
.pt-3 { padding-top: 1rem !important; }
.pt-4 { padding-top: 1.5rem !important; }
.pt-5 { padding-top: 3rem !important; }

.pb-0 { padding-bottom: 0 !important; }
.pb-1 { padding-bottom: 0.25rem !important; }
.pb-2 { padding-bottom: 0.5rem !important; }
.pb-3 { padding-bottom: 1rem !important; }
.pb-4 { padding-bottom: 1.5rem !important; }
.pb-5 { padding-bottom: 3rem !important; }

/* Display Utilities */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-inline { display: inline !important; }
.d-inline-block { display: inline-block !important; }
.d-flex { display: flex !important; }
.d-grid { display: grid !important; }

/* Flex Utilities */
.flex-row { flex-direction: row !important; }
.flex-column { flex-direction: column !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-nowrap { flex-wrap: nowrap !important; }

.justify-content-start { justify-content: flex-start !important; }
.justify-content-end { justify-content: flex-end !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-around { justify-content: space-around !important; }

.align-items-start { align-items: flex-start !important; }
.align-items-end { align-items: flex-end !important; }
.align-items-center { align-items: center !important; }
.align-items-stretch { align-items: stretch !important; }

.flex-grow-1 { flex-grow: 1 !important; }
.flex-shrink-0 { flex-shrink: 0 !important; }

/* Grid Utilities */
.grid-cols-1 { grid-template-columns: repeat(1, 1fr) !important; }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr) !important; }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr) !important; }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr) !important; }
.grid-cols-auto { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important; }

.gap-1 { gap: 0.25rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }
.gap-4 { gap: 1.5rem !important; }
.gap-5 { gap: 3rem !important; }

/* Position Utilities */
.position-relative { position: relative !important; }
.position-absolute { position: absolute !important; }
.position-fixed { position: fixed !important; }
.position-sticky { position: sticky !important; }

/* Shadow Utilities */
.shadow-none { box-shadow: none !important; }
.shadow-sm { box-shadow: var(--shadow-sm) !important; }
.shadow { box-shadow: var(--shadow-md) !important; }
.shadow-lg { box-shadow: var(--shadow-lg) !important; }
.shadow-xl { box-shadow: var(--shadow-xl) !important; }

/* Border Utilities */
.border { border: 1px solid var(--gray-200) !important; }
.border-0 { border: 0 !important; }
.border-top { border-top: 1px solid var(--gray-200) !important; }
.border-bottom { border-bottom: 1px solid var(--gray-200) !important; }
.border-left { border-left: 1px solid var(--gray-200) !important; }
.border-right { border-right: 1px solid var(--gray-200) !important; }

.border-primary { border-color: var(--primary-color) !important; }
.border-success { border-color: var(--success-color) !important; }
.border-warning { border-color: var(--warning-color) !important; }
.border-danger { border-color: var(--error-color) !important; }

.rounded { border-radius: 0.5rem !important; }
.rounded-sm { border-radius: 0.25rem !important; }
.rounded-lg { border-radius: var(--card-radius) !important; }
.rounded-xl { border-radius: 1.5rem !important; }
.rounded-full { border-radius: 50% !important; }
.rounded-pill { border-radius: 50rem !important; }

/* Text Utilities */
.text-left { text-align: left !important; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }

.text-uppercase { text-transform: uppercase !important; }
.text-lowercase { text-transform: lowercase !important; }
.text-capitalize { text-transform: capitalize !important; }

.fw-light { font-weight: 300 !important; }
.fw-normal { font-weight: 400 !important; }
.fw-medium { font-weight: 500 !important; }
.fw-semibold { font-weight: 600 !important; }
.fw-bold { font-weight: 700 !important; }

.fs-1 { font-size: 2.5rem !important; }
.fs-2 { font-size: 2rem !important; }
.fs-3 { font-size: 1.75rem !important; }
.fs-4 { font-size: 1.5rem !important; }
.fs-5 { font-size: 1.25rem !important; }
.fs-6 { font-size: 1rem !important; }

.lh-1 { line-height: 1 !important; }
.lh-sm { line-height: 1.25 !important; }
.lh-base { line-height: 1.5 !important; }
.lh-lg { line-height: 2 !important; }

/* Width and Height */
.w-25 { width: 25% !important; }
.w-50 { width: 50% !important; }
.w-75 { width: 75% !important; }
.w-100 { width: 100% !important; }
.w-auto { width: auto !important; }

.h-25 { height: 25% !important; }
.h-50 { height: 50% !important; }
.h-75 { height: 75% !important; }
.h-100 { height: 100% !important; }
.h-auto { height: auto !important; }

/* Overflow */
.overflow-hidden { overflow: hidden !important; }
.overflow-auto { overflow: auto !important; }
.overflow-scroll { overflow: scroll !important; }

/* Cursor */
.cursor-pointer { cursor: pointer !important; }
.cursor-default { cursor: default !important; }
.cursor-not-allowed { cursor: not-allowed !important; }

/* Opacity */
.opacity-0 { opacity: 0 !important; }
.opacity-25 { opacity: 0.25 !important; }
.opacity-50 { opacity: 0.5 !important; }
.opacity-75 { opacity: 0.75 !important; }
.opacity-100 { opacity: 1 !important; }

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

.fade-out {
    animation: fadeOut 0.5s ease-in-out;
}

.slide-in-up {
    animation: slideInUp 0.5s ease-out;
}

.slide-in-down {
    animation: slideInDown 0.5s ease-out;
}

.zoom-in {
    animation: zoomIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive Utilities */
@media (max-width: 576px) {
    .d-sm-none { display: none !important; }
    .d-sm-block { display: block !important; }
    .d-sm-flex { display: flex !important; }
    
    .text-sm-center { text-align: center !important; }
    .text-sm-left { text-align: left !important; }
    
    .flex-sm-column { flex-direction: column !important; }
    .flex-sm-row { flex-direction: row !important; }
}

@media (max-width: 768px) {
    .d-md-none { display: none !important; }
    .d-md-block { display: block !important; }
    .d-md-flex { display: flex !important; }
    
    .text-md-center { text-align: center !important; }
    .text-md-left { text-align: left !important; }
    
    .flex-md-column { flex-direction: column !important; }
    .flex-md-row { flex-direction: row !important; }
}

@media (max-width: 992px) {
    .d-lg-none { display: none !important; }
    .d-lg-block { display: block !important; }
    .d-lg-flex { display: flex !important; }
    
    .text-lg-center { text-align: center !important; }
    .text-lg-left { text-align: left !important; }
    
    .flex-lg-column { flex-direction: column !important; }
    .flex-lg-row { flex-direction: row !important; }
}