/* ============================================
   TAILWIND CSS THEME FOR BOOTSTRAP 5
   This file overrides Bootstrap 5 defaults to match Tailwind's design system
   ============================================ */

/* Import Tailwind's default font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap');

/* ==================== ROOT VARIABLES OVERRIDE ==================== */
:root {
    /* Tailwind Color Palette */
    --bs-blue: #3b82f6;
    /* Tailwind Blue 500 */
    --bs-indigo: #6366f1;
    /* Tailwind Indigo 500 */
    --bs-purple: #a855f7;
    /* Tailwind Purple 500 */
    --bs-pink: #ec4899;
    /* Tailwind Pink 500 */
    --bs-red: #ef4444;
    /* Tailwind Red 500 */
    --bs-orange: #f97316;
    /* Tailwind Orange 500 */
    --bs-yellow: #eab308;
    /* Tailwind Yellow 500 */
    --bs-green: #22c55e;
    /* Tailwind Green 500 */
    --bs-teal: #14b8a6;
    /* Tailwind Teal 500 */
    --bs-cyan: #06b6d4;
    /* Tailwind Cyan 500 */

    /* Grayscale */
    --bs-gray: #6b7280;
    /* Tailwind Gray 500 */
    --bs-gray-dark: #374151;
    /* Tailwind Gray 700 */
    --bs-gray-100: #f3f4f6;
    --bs-gray-200: #e5e7eb;
    --bs-gray-300: #d1d5db;
    --bs-gray-400: #9ca3af;
    --bs-gray-500: #6b7280;
    --bs-gray-600: #4b5563;
    --bs-gray-700: #374151;
    --bs-gray-800: #1f2937;
    --bs-gray-900: #111827;

    /* Primary/Secondary using Tailwind colors */
    --bs-primary: #3b82f6;
    /* Tailwind Blue 500 */
    --bs-primary-rgb: 59, 130, 246;
    --bs-secondary: #64748b;
    /* Tailwind Slate 500 */
    --bs-secondary-rgb: 100, 116, 139;
    --bs-success: #22c55e;
    /* Tailwind Green 500 */
    --bs-success-rgb: 34, 197, 94;
    --bs-info: #06b6d4;
    /* Tailwind Cyan 500 */
    --bs-info-rgb: 6, 182, 212;
    --bs-warning: #eab308;
    /* Tailwind Yellow 500 */
    --bs-warning-rgb: 234, 179, 8;
    --bs-danger: #ef4444;
    /* Tailwind Red 500 */
    --bs-danger-rgb: 239, 68, 68;
    --bs-light: #f9fafb;
    /* Tailwind Gray 50 */
    --bs-light-rgb: 249, 250, 251;
    --bs-dark: #111827;
    /* Tailwind Gray 900 */
    --bs-dark-rgb: 17, 24, 39;

    /* Tailwind Border Radius */
    --bs-border-radius: 0.375rem;
    /* Tailwind rounded-md */
    --bs-border-radius-sm: 0.25rem;
    /* Tailwind rounded */
    --bs-border-radius-lg: 0.5rem;
    /* Tailwind rounded-lg */
    --bs-border-radius-xl: 0.75rem;
    /* Tailwind rounded-xl */
    --bs-border-radius-2xl: 1rem;
    /* Tailwind rounded-2xl */
    --bs-border-radius-pill: 9999px;
    /* Tailwind rounded-full */

    /* Tailwind Typography */
    --bs-body-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --bs-body-font-size: 1rem;
    --bs-body-font-weight: 400;
    --bs-body-line-height: 1.5;
    --bs-body-color: #111827;
    /* Tailwind Gray 900 */
    --bs-body-bg: #ffffff;

    /* Tailwind Shadows */
    --bs-box-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --bs-box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --bs-box-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    /* Border Colors */
    --bs-border-color: #e5e7eb;
    /* Tailwind Gray 200 */
    --bs-border-width: 1px;
}

/* ==================== BODY & TYPOGRAPHY ==================== */
body {
    font-family: var(--bs-body-font-family);
    font-size: var(--bs-body-font-size);
    font-weight: var(--bs-body-font-weight);
    line-height: var(--bs-body-line-height);
    color: var(--bs-body-color);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Headings with tighter letter spacing (Tailwind style) */
h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3,
.h4,
.h5,
.h6 {
    font-weight: 700;
    letter-spacing: -0.025em;
    /* Tailwind's tight tracking */
    color: #111827;
    line-height: 1.2;
}

h1,
.h1 {
    font-size: 2.25rem;
}

/* Tailwind text-4xl */
h2,
.h2 {
    font-size: 1.875rem;
}

/* Tailwind text-3xl */
h3,
.h3 {
    font-size: 1.5rem;
}

/* Tailwind text-2xl */
h4,
.h4 {
    font-size: 1.25rem;
}

/* Tailwind text-xl */
h5,
.h5 {
    font-size: 1.125rem;
}

/* Tailwind text-lg */
h6,
.h6 {
    font-size: 1rem;
}

/* Tailwind text-base */

/* ==================== BUTTONS ==================== */
.btn {
    font-weight: 500;
    letter-spacing: 0;
    border-radius: var(--bs-border-radius);
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
}

.btn:hover {
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    transform: translateY(-1px);
}

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

/* Primary Button */
.btn-primary {
    background-color: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background-color: #2563eb;
    /* Blue 600 */
}

.btn-primary:active {
    background-color: #1d4ed8;
    /* Blue 700 */
}

/* Secondary Button */
.btn-secondary {
    background-color: #64748b;
    color: white;
}

.btn-secondary:hover {
    background-color: #475569;
    /* Slate 600 */
}

/* Success Button */
.btn-success {
    background-color: #22c55e;
    color: white;
}

.btn-success:hover {
    background-color: #16a34a;
    /* Green 600 */
}

/* Danger Button */
.btn-danger {
    background-color: #ef4444;
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
    /* Red 600 */
}

/* Warning Button */
.btn-warning {
    background-color: #eab308;
    color: #111827;
}

.btn-warning:hover {
    background-color: #ca8a04;
    /* Yellow 600 */
}

/* Info Button */
.btn-info {
    background-color: #06b6d4;
    color: white;
}

.btn-info:hover {
    background-color: #0891b2;
    /* Cyan 600 */
}

/* Outline Buttons */
.btn-outline-primary {
    color: #3b82f6;
    border: 1px solid #3b82f6;
    background-color: transparent;
}

.btn-outline-primary:hover {
    background-color: #3b82f6;
    color: white;
}

/* Button Sizes */
.btn-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    border-radius: 0.25rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.125rem;
    border-radius: 0.5rem;
}

/* ==================== CARDS ==================== */
.card {
    border-radius: var(--bs-border-radius-lg);
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

.card-header {
    background-color: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem 1.25rem;
    font-weight: 600;
    color: #111827;
}

.card-body {
    padding: 1.25rem;
}

.card-footer {
    background-color: #f9fafb;
    border-top: 1px solid #e5e7eb;
    padding: 1rem 1.25rem;
}

/* ==================== FORMS ==================== */
.form-control,
.form-select {
    border-radius: var(--bs-border-radius);
    border: 1px solid #d1d5db;
    /* Gray 300 */
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: #111827;
    transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.form-control:focus,
.form-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

.form-control::placeholder {
    color: #9ca3af;
    /* Gray 400 */
}

.form-label {
    font-weight: 500;
    color: #374151;
    /* Gray 700 */
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

/* ==================== ALERTS ==================== */
.alert {
    border-radius: var(--bs-border-radius-lg);
    border: 1px solid;
    padding: 1rem;
    font-size: 0.875rem;
}

.alert-primary {
    background-color: #dbeafe;
    /* Blue 100 */
    border-color: #93c5fd;
    /* Blue 300 */
    color: #1e40af;
    /* Blue 800 */
}

.alert-success {
    background-color: #d1fae5;
    /* Green 100 */
    border-color: #6ee7b7;
    /* Green 300 */
    color: #065f46;
    /* Green 800 */
}

.alert-danger {
    background-color: #fee2e2;
    /* Red 100 */
    border-color: #fca5a5;
    /* Red 300 */
    color: #991b1b;
    /* Red 800 */
}

.alert-warning {
    background-color: #fef3c7;
    /* Yellow 100 */
    border-color: #fcd34d;
    /* Yellow 300 */
    color: #92400e;
    /* Yellow 800 */
}

.alert-info {
    background-color: #cffafe;
    /* Cyan 100 */
    border-color: #67e8f9;
    /* Cyan 300 */
    color: #155e75;
    /* Cyan 800 */
}

/* ==================== BADGES ==================== */
.badge {
    font-weight: 500;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    border-radius: var(--bs-border-radius);
    letter-spacing: 0.025em;
}

/* ==================== NAVIGATION ==================== */
.navbar {
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

.nav-link {
    color: #6b7280;
    font-weight: 500;
    transition: color 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover {
    color: #111827;
}

.nav-link.active {
    color: #3b82f6;
}

/* ==================== MODALS ==================== */
.modal-content {
    border-radius: var(--bs-border-radius-lg);
    border: none;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

.modal-header {
    border-bottom: 1px solid #e5e7eb;
    padding: 1.25rem;
}

.modal-footer {
    border-top: 1px solid #e5e7eb;
    padding: 1.25rem;
}

.modal-title {
    font-weight: 600;
    color: #111827;
}

/* ==================== TABLES ==================== */
.table {
    font-size: 0.875rem;
}

.table thead th {
    font-weight: 600;
    color: #374151;
    background-color: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: #f9fafb;
}

.table-hover tbody tr:hover {
    background-color: #f3f4f6;
}

/* ==================== DROPDOWNS ==================== */
.dropdown-menu {
    border-radius: var(--bs-border-radius-lg);
    border: 1px solid #e5e7eb;
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    padding: 0.5rem;
}

.dropdown-item {
    border-radius: var(--bs-border-radius);
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: #374151;
    transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.dropdown-item:hover {
    background-color: #f3f4f6;
    color: #111827;
}

.dropdown-item.active {
    background-color: #3b82f6;
    color: white;
}

/* ==================== PAGINATION ==================== */
.pagination {
    gap: 0.25rem;
}

.page-link {
    border-radius: var(--bs-border-radius);
    border: 1px solid #e5e7eb;
    color: #374151;
    font-weight: 500;
    transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0 0.125rem;
}

.page-link:hover {
    background-color: #f3f4f6;
    border-color: #d1d5db;
    color: #111827;
}

.page-item.active .page-link {
    background-color: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

/* ==================== BREADCRUMBS ==================== */
.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 1rem;
}

.breadcrumb-item {
    font-size: 0.875rem;
}

.breadcrumb-item a {
    color: #6b7280;
    text-decoration: none;
}

.breadcrumb-item a:hover {
    color: #3b82f6;
}

.breadcrumb-item.active {
    color: #111827;
    font-weight: 500;
}

/* ==================== PROGRESS BARS ==================== */
.progress {
    height: 0.5rem;
    border-radius: 9999px;
    background-color: #e5e7eb;
}

.progress-bar {
    border-radius: 9999px;
    transition: width 300ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==================== SPINNERS ==================== */
.spinner-border,
.spinner-grow {
    color: #3b82f6;
}

/* ==================== LIST GROUPS ==================== */
.list-group-item {
    border: 1px solid #e5e7eb;
    color: #374151;
    transition: all 150ms cubic-bezier(0.4, 0, 0.2, 1);
}

.list-group-item:first-child {
    border-top-left-radius: var(--bs-border-radius-lg);
    border-top-right-radius: var(--bs-border-radius-lg);
}

.list-group-item:last-child {
    border-bottom-left-radius: var(--bs-border-radius-lg);
    border-bottom-right-radius: var(--bs-border-radius-lg);
}

.list-group-item:hover {
    background-color: #f9fafb;
}

.list-group-item.active {
    background-color: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

/* ==================== ACCORDION ==================== */
.accordion-button {
    font-weight: 500;
    color: #111827;
    background-color: #f9fafb;
}

.accordion-button:not(.collapsed) {
    background-color: #dbeafe;
    color: #1e40af;
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ==================== HOMEPAGE UTILITIES ==================== */
.transition-all {
    transition: all 0.3s ease;
}

.hover-shadow:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, .08) !important;
}

.icon-wrapper {
    transition: all 0.3s ease;
}

.hover-shadow:hover .icon-wrapper {
    transform: scale(1.1);
}

.section-title {
    position: relative;
    padding-bottom: 10px;
}

.section-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 4px;
    background-color: #0d6efd;
    border-radius: 2px;
}

.icon-wrapper i {
    color: #FFFFFF;
}