/* Tailwind bridge: replaces Bootstrap utility classes with Tailwind-style values.
   This keeps existing markup working while running without Bootstrap. */

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.25rem;
    border-radius: 0.375rem;
    border: 1px solid transparent;
    transition: all 150ms ease;
    cursor: pointer;
}
.btn:disabled,
.btn.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}
.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}
.btn-lg {
    padding: 0.75rem 1rem;
    font-size: 1rem;
}
.btn-primary {
    background-color: #4f46e5;
    border-color: #4338ca;
    color: #ffffff;
}
.btn-primary:hover:not(:disabled) { background-color: #4338ca; }
.btn-secondary {
    background-color: #f8fafc;
    border-color: #cbd5e1;
    color: #0f172a;
}
.btn-secondary:hover:not(:disabled) { background-color: #e2e8f0; }
.btn-success {
    background-color: #059669;
    border-color: #047857;
    color: #ffffff;
}
.btn-danger {
    background-color: #dc2626;
    border-color: #b91c1c;
    color: #ffffff;
}
.btn-warning {
    background-color: #f59e0b;
    border-color: #d97706;
    color: #0f172a;
}
.btn-info {
    background-color: #0ea5e9;
    border-color: #0284c7;
    color: #ffffff;
}
.btn-outline-secondary {
    background-color: #ffffff;
    border-color: #cbd5e1;
    color: #475569;
}
.btn-outline-secondary:hover:not(:disabled) { background-color: #f8fafc; }
.btn-outline-primary {
    background-color: #ffffff;
    border-color: #6366f1;
    color: #4338ca;
}
.btn-outline-primary:hover:not(:disabled) { background-color: #eef2ff; }
.btn-link {
    border: none;
    background: transparent;
    padding: 0;
    color: #4338ca;
    text-decoration: underline;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1rem;
    border-radius: 9999px;
}
.bg-light { background-color: #f8fafc !important; color: #0f172a; }
.text-muted { color: #64748b !important; }
.text-warning { color: #d97706 !important; }
.text-success { color: #059669 !important; }
.text-danger { color: #dc2626 !important; }
.text-info { color: #0ea5e9 !important; }

/* Layout helpers */
.d-flex { display: flex; }
.align-items-center { align-items: center; }
.justify-content-end { justify-content: flex-end; }
.justify-content-between { justify-content: space-between; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.mb-0 { margin-bottom: 0 !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 0.75rem !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: 0.75rem !important; }
.mt-4 { margin-top: 1rem !important; }
.ms-1 { margin-left: 0.25rem !important; }
.ms-2 { margin-left: 0.5rem !important; }
.me-1 { margin-right: 0.25rem !important; }
.me-2 { margin-right: 0.5rem !important; }
.p-3 { padding: 0.75rem !important; }
.w-100 { width: 100%; }

/* Alerts */
.alert {
    border-radius: 0.375rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
}
.alert-warning { background-color: #fffbeb; color: #92400e; border: 1px solid #fcd34d; }
.alert-info { background-color: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.alert-danger { background-color: #fef2f2; color: #b91c1c; border: 1px solid #fecdd3; }
.alert-success { background-color: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }

/* Form controls */
.form-control {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    color: #0f172a;
    background-color: #ffffff;
    transition: border-color 100ms ease, box-shadow 100ms ease;
}
.form-control:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
    outline: none;
}

/* Spinners */
.spinner-border {
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    vertical-align: text-bottom;
    border: 0.25em solid #e2e8f0;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.2em;
}
@keyframes spinner-border {
    to { transform: rotate(360deg); }
}
.visually-hidden,
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Close icon */
.btn-close {
    border: none;
    background: transparent;
    padding: 0.25rem;
    font-size: 1rem;
    line-height: 1;
    color: #475569;
    cursor: pointer;
}
.btn-close:hover { color: #0f172a; }
