/* ============================================
   BOOTSTRAP COMPATIBILITY LAYER
   Maps Bootstrap classes to NTS theme system
   
   Created: February 2026
   Purpose: Allow gradual migration from Bootstrap
   
   NOTE: This is a TEMPORARY file. As you migrate
   components to use native NTS classes, you can
   remove mappings from here.
   ============================================ */

/* ============================================
   FLEXBOX UTILITIES
   ============================================ */
.d-flex { display: flex; }
.d-inline-flex { display: inline-flex; }
.d-none { display: none; }
.d-block { display: block; }
.d-inline-block { display: inline-block; }
.d-grid { display: grid; }

.flex-row { flex-direction: row; }
.flex-column { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-nowrap { flex-wrap: nowrap; }
.flex-grow-1 { flex-grow: 1; }
.flex-shrink-0 { flex-shrink: 0; }

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

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

.align-self-start { align-self: flex-start; }
.align-self-end { align-self: flex-end; }
.align-self-center { align-self: center; }

/* ============================================
   SPACING UTILITIES
   Bootstrap uses: m-{size}, p-{size}, etc.
   Sizes: 0, 1 (0.25rem), 2 (0.5rem), 3 (1rem), 4 (1.5rem), 5 (3rem)
   ============================================ */

/* Margin All */
.m-0 { margin: 0; }
.m-1 { margin: 0.25rem; }
.m-2 { margin: 0.5rem; }
.m-3 { margin: 1rem; }
.m-4 { margin: 1.5rem; }
.m-5 { margin: 3rem; }
.m-auto { margin: auto; }

/* Margin Top */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }
.mt-auto { margin-top: auto; }

/* Margin Bottom */
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }
.mb-auto { margin-bottom: auto; }

/* Margin Start (Left in LTR) */
.ms-0 { margin-left: 0; }
.ms-1 { margin-left: 0.25rem; }
.ms-2 { margin-left: 0.5rem; }
.ms-3 { margin-left: 1rem; }
.ms-4 { margin-left: 1.5rem; }
.ms-5 { margin-left: 3rem; }
.ms-auto { margin-left: auto; }

/* Margin End (Right in LTR) */
.me-0 { margin-right: 0; }
.me-1 { margin-right: 0.25rem; }
.me-2 { margin-right: 0.5rem; }
.me-3 { margin-right: 1rem; }
.me-4 { margin-right: 1.5rem; }
.me-5 { margin-right: 3rem; }
.me-auto { margin-right: auto; }

/* Margin X (Horizontal) */
.mx-0 { margin-left: 0; margin-right: 0; }
.mx-1 { margin-left: 0.25rem; margin-right: 0.25rem; }
.mx-2 { margin-left: 0.5rem; margin-right: 0.5rem; }
.mx-3 { margin-left: 1rem; margin-right: 1rem; }
.mx-4 { margin-left: 1.5rem; margin-right: 1.5rem; }
.mx-5 { margin-left: 3rem; margin-right: 3rem; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* Margin Y (Vertical) */
.my-0 { margin-top: 0; margin-bottom: 0; }
.my-1 { margin-top: 0.25rem; margin-bottom: 0.25rem; }
.my-2 { margin-top: 0.5rem; margin-bottom: 0.5rem; }
.my-3 { margin-top: 1rem; margin-bottom: 1rem; }
.my-4 { margin-top: 1.5rem; margin-bottom: 1.5rem; }
.my-5 { margin-top: 3rem; margin-bottom: 3rem; }
.my-auto { margin-top: auto; margin-bottom: auto; }

/* Padding All */
.p-0 { padding: 0; }
.p-1 { padding: 0.25rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 1rem; }
.p-4 { padding: 1.5rem; }
.p-5 { padding: 3rem; }

/* Padding Top */
.pt-0 { padding-top: 0; }
.pt-1 { padding-top: 0.25rem; }
.pt-2 { padding-top: 0.5rem; }
.pt-3 { padding-top: 1rem; }
.pt-4 { padding-top: 1.5rem; }
.pt-5 { padding-top: 3rem; }

/* Padding Bottom */
.pb-0 { padding-bottom: 0; }
.pb-1 { padding-bottom: 0.25rem; }
.pb-2 { padding-bottom: 0.5rem; }
.pb-3 { padding-bottom: 1rem; }
.pb-4 { padding-bottom: 1.5rem; }
.pb-5 { padding-bottom: 3rem; }

/* Padding Start (Left in LTR) */
.ps-0 { padding-left: 0; }
.ps-1 { padding-left: 0.25rem; }
.ps-2 { padding-left: 0.5rem; }
.ps-3 { padding-left: 1rem; }
.ps-4 { padding-left: 1.5rem; }
.ps-5 { padding-left: 3rem; }

/* Padding End (Right in LTR) */
.pe-0 { padding-right: 0; }
.pe-1 { padding-right: 0.25rem; }
.pe-2 { padding-right: 0.5rem; }
.pe-3 { padding-right: 1rem; }
.pe-4 { padding-right: 1.5rem; }
.pe-5 { padding-right: 3rem; }

/* Padding X (Horizontal) */
.px-0 { padding-left: 0; padding-right: 0; }
.px-1 { padding-left: 0.25rem; padding-right: 0.25rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 1rem; padding-right: 1rem; }
.px-4 { padding-left: 1.5rem; padding-right: 1.5rem; }
.px-5 { padding-left: 3rem; padding-right: 3rem; }

/* Padding Y (Vertical) */
.py-0 { padding-top: 0; padding-bottom: 0; }
.py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 1rem; padding-bottom: 1rem; }
.py-4 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-5 { padding-top: 3rem; padding-bottom: 3rem; }

/* Gap */
.gap-0 { gap: 0; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 1rem; }
.gap-4 { gap: 1.5rem; }
.gap-5 { gap: 3rem; }

/* ============================================
   TEXT UTILITIES
   ============================================ */
.text-start { text-align: left; }
.text-center { text-align: center; }
.text-end { text-align: right; }

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

.text-wrap { white-space: normal; }
.text-nowrap { white-space: nowrap; }
.text-truncate { 
    overflow: hidden; 
    text-overflow: ellipsis; 
    white-space: nowrap; 
}

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

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

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

/* Text Colors - Theme Aware */
.text-primary { color: var(--theme-text-primary, #1e293b); }
.text-secondary { color: var(--theme-text-secondary, #475569); }
.text-muted { color: var(--theme-text-muted, #94a3b8); }
.text-danger { color: var(--theme-text-danger, #dc2626); }
.text-success { color: var(--theme-text-success, #15803d); }
.text-warning { color: var(--theme-text-warning, #b45309); }
.text-info { color: var(--theme-text-info, #0369a1); }
.text-white { color: #ffffff; }
.text-black { color: #000000; }
.text-body { color: var(--theme-text-primary, #1e293b); }

/* ============================================
   SIZING UTILITIES
   ============================================ */
.w-25 { width: 25%; }
.w-50 { width: 50%; }
.w-75 { width: 75%; }
.w-100 { width: 100%; }
.w-auto { width: auto; }

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

.mw-100 { max-width: 100%; }
.mh-100 { max-height: 100%; }

.min-vw-100 { min-width: 100vw; }
.min-vh-100 { min-height: 100vh; }
.vw-100 { width: 100vw; }
.vh-100 { height: 100vh; }

/* ============================================
   BORDER UTILITIES
   ============================================ */
.border { border: 1px solid var(--theme-border, #e2e8f0); }
.border-0 { border: 0; }
.border-top { border-top: 1px solid var(--theme-border, #e2e8f0); }
.border-end { border-right: 1px solid var(--theme-border, #e2e8f0); }
.border-bottom { border-bottom: 1px solid var(--theme-border, #e2e8f0); }
.border-start { border-left: 1px solid var(--theme-border, #e2e8f0); }

.border-primary { border-color: var(--theme-primary, #3b82f6) !important; }
.border-secondary { border-color: var(--theme-secondary, #64748b) !important; }
.border-success { border-color: var(--theme-text-success, #15803d) !important; }
.border-danger { border-color: var(--theme-text-danger, #dc2626) !important; }
.border-warning { border-color: var(--theme-text-warning, #b45309) !important; }
.border-info { border-color: var(--theme-text-info, #0369a1) !important; }

.rounded { border-radius: 0.375rem; }
.rounded-0 { border-radius: 0; }
.rounded-1 { border-radius: 0.25rem; }
.rounded-2 { border-radius: 0.375rem; }
.rounded-3 { border-radius: 0.5rem; }
.rounded-4 { border-radius: 0.75rem; }
.rounded-5 { border-radius: 1rem; }
.rounded-circle { border-radius: 50%; }
.rounded-pill { border-radius: 50rem; }

/* ============================================
   BACKGROUND UTILITIES
   ============================================ */
.bg-primary { background-color: var(--theme-primary, #3b82f6); }
.bg-secondary { background-color: var(--theme-secondary, #64748b); }
.bg-success { background-color: var(--theme-text-success, #15803d); }
.bg-danger { background-color: var(--theme-text-danger, #dc2626); }
.bg-warning { background-color: var(--theme-text-warning, #b45309); }
.bg-info { background-color: var(--theme-text-info, #0369a1); }
.bg-light { background-color: var(--theme-surface-secondary, #f8fafc); }
.bg-dark { background-color: #1e293b; }
.bg-white { background-color: #ffffff; }
.bg-transparent { background-color: transparent; }
.bg-body { background-color: var(--theme-bg, #ffffff); }

/* ============================================
   POSITION UTILITIES
   ============================================ */
.position-static { position: static; }
.position-relative { position: relative; }
.position-absolute { position: absolute; }
.position-fixed { position: fixed; }
.position-sticky { position: sticky; }

.top-0 { top: 0; }
.top-50 { top: 50%; }
.top-100 { top: 100%; }
.bottom-0 { bottom: 0; }
.bottom-50 { bottom: 50%; }
.bottom-100 { bottom: 100%; }
.start-0 { left: 0; }
.start-50 { left: 50%; }
.start-100 { left: 100%; }
.end-0 { right: 0; }
.end-50 { right: 50%; }
.end-100 { right: 100%; }

.translate-middle { transform: translate(-50%, -50%); }
.translate-middle-x { transform: translateX(-50%); }
.translate-middle-y { transform: translateY(-50%); }

/* ============================================
   VISIBILITY & OVERFLOW
   ============================================ */
.visible { visibility: visible; }
.invisible { visibility: hidden; }

.overflow-auto { overflow: auto; }
.overflow-hidden { overflow: hidden; }
.overflow-visible { overflow: visible; }
.overflow-scroll { overflow: scroll; }
.overflow-x-auto { overflow-x: auto; }
.overflow-x-hidden { overflow-x: hidden; }
.overflow-y-auto { overflow-y: auto; }
.overflow-y-hidden { overflow-y: hidden; }

/* ============================================
   BUTTONS - Theme Integrated
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.btn:disabled,
.btn.disabled {
    opacity: 0.65;
    pointer-events: none;
}

.btn-primary {
    background: var(--theme-primary, #3b82f6);
    border-color: var(--theme-primary, #3b82f6);
    color: #ffffff;
}

.btn-primary:hover:not(:disabled) {
    background: var(--theme-primary-hover, #2563eb);
    border-color: var(--theme-primary-hover, #2563eb);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--theme-shadow-color, rgba(59, 130, 246, 0.3));
}

.btn-secondary {
    background: var(--theme-secondary, #64748b);
    border-color: var(--theme-secondary, #64748b);
    color: #ffffff;
}

.btn-secondary:hover:not(:disabled) {
    background: #475569;
    border-color: #475569;
}

.btn-success {
    background: var(--theme-text-success, #15803d);
    border-color: var(--theme-text-success, #15803d);
    color: #ffffff;
}

.btn-success:hover:not(:disabled) {
    background: #166534;
    border-color: #166534;
}

.btn-danger {
    background: var(--theme-text-danger, #dc2626);
    border-color: var(--theme-text-danger, #dc2626);
    color: #ffffff;
}

.btn-danger:hover:not(:disabled) {
    background: #b91c1c;
    border-color: #b91c1c;
}

.btn-warning {
    background: var(--theme-text-warning, #d97706);
    border-color: var(--theme-text-warning, #d97706);
    color: #ffffff;
}

.btn-warning:hover:not(:disabled) {
    background: #b45309;
    border-color: #b45309;
}

.btn-info {
    background: var(--theme-text-info, #0284c7);
    border-color: var(--theme-text-info, #0284c7);
    color: #ffffff;
}

.btn-info:hover:not(:disabled) {
    background: #0369a1;
    border-color: #0369a1;
}

.btn-light {
    background: var(--theme-surface-secondary, #f1f5f9);
    border-color: var(--theme-border, #e2e8f0);
    color: var(--theme-text-primary, #1e293b);
}

.btn-light:hover:not(:disabled) {
    background: var(--theme-border, #e2e8f0);
}

.btn-dark {
    background: #1e293b;
    border-color: #1e293b;
    color: #ffffff;
}

.btn-dark:hover:not(:disabled) {
    background: #0f172a;
    border-color: #0f172a;
}

.btn-outline-primary {
    background: transparent;
    border-color: var(--theme-primary, #3b82f6);
    color: var(--theme-primary, #3b82f6);
}

.btn-outline-primary:hover:not(:disabled) {
    background: var(--theme-primary, #3b82f6);
    color: #ffffff;
}

.btn-outline-secondary {
    background: transparent;
    border-color: var(--theme-secondary, #64748b);
    color: var(--theme-secondary, #64748b);
}

.btn-outline-secondary:hover:not(:disabled) {
    background: var(--theme-secondary, #64748b);
    color: #ffffff;
}

.btn-outline-danger {
    background: transparent;
    border-color: var(--theme-text-danger, #dc2626);
    color: var(--theme-text-danger, #dc2626);
}

.btn-outline-danger:hover:not(:disabled) {
    background: var(--theme-text-danger, #dc2626);
    color: #ffffff;
}

.btn-link {
    background: transparent;
    border-color: transparent;
    color: var(--theme-primary, #3b82f6);
    text-decoration: none;
    padding: 0;
}

.btn-link:hover {
    color: var(--theme-primary-hover, #2563eb);
    text-decoration: underline;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: 8px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1.1rem;
    border-radius: 12px;
}

.btn-block {
    display: flex;
    width: 100%;
}

/* ============================================
   FORM CONTROLS - Theme Integrated
   ============================================ */
.form-control {
    display: block;
    width: 100%;
    padding: 10px 14px;
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--theme-text-primary, #1e293b);
    background-color: var(--theme-input-bg, #ffffff);
    background-clip: padding-box;
    border: 1px solid var(--theme-input-border, #d1d5db);
    border-radius: 10px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
    color: var(--theme-text-primary, #1e293b);
    background-color: var(--theme-input-bg, #ffffff);
    border-color: var(--theme-input-focus, #3b82f6);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.form-control:disabled,
.form-control[readonly] {
    background-color: var(--theme-surface-secondary, #f8fafc);
    opacity: 0.7;
}

.form-control::placeholder {
    color: var(--theme-text-muted, #94a3b8);
    opacity: 1;
}

.form-control-sm {
    padding: 6px 10px;
    font-size: 0.85rem;
    border-radius: 8px;
}

.form-control-lg {
    padding: 14px 18px;
    font-size: 1.1rem;
    border-radius: 12px;
}

.form-label {
    display: inline-block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--theme-text-primary, #1e293b);
}

.form-text {
    margin-top: 0.25rem;
    font-size: 0.85rem;
    color: var(--theme-text-muted, #94a3b8);
}

.form-group {
    margin-bottom: 1rem;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 1.5rem;
    padding-left: 0;
    margin-bottom: 0.5rem;
}

.form-check-input {
    width: 1.1em;
    height: 1.1em;
    margin: 0;
    vertical-align: middle;
    background-color: var(--theme-input-bg, #ffffff);
    border: 1px solid var(--theme-input-border, #d1d5db);
    border-radius: 4px;
    cursor: pointer;
}

.form-check-input:checked {
    background-color: var(--theme-primary, #3b82f6);
    border-color: var(--theme-primary, #3b82f6);
}

.form-check-label {
    color: var(--theme-text-primary, #1e293b);
    cursor: pointer;
}

.form-select {
    display: block;
    width: 100%;
    padding: 10px 40px 10px 14px;
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--theme-text-primary, #1e293b);
    background-color: var(--theme-input-bg, #ffffff);
    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='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px 12px;
    border: 1px solid var(--theme-input-border, #d1d5db);
    border-radius: 10px;
    appearance: none;
    cursor: pointer;
}

.form-select:focus {
    border-color: var(--theme-input-focus, #3b82f6);
    outline: 0;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.input-group {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    width: 100%;
}

.input-group > .form-control,
.input-group > .form-select {
    position: relative;
    flex: 1 1 auto;
    width: 1%;
    min-width: 0;
}

.input-group-text {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--theme-text-secondary, #475569);
    text-align: center;
    white-space: nowrap;
    background-color: var(--theme-surface-secondary, #f8fafc);
    border: 1px solid var(--theme-input-border, #d1d5db);
    border-radius: 10px;
}

/* ============================================
   ALERTS - Theme Integrated  
   ============================================ */
.alert {
    position: relative;
    padding: 16px 20px;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 12px;
}

.alert-primary {
    color: var(--theme-primary, #1d4ed8);
    background-color: rgba(59, 130, 246, 0.1);
    border-color: rgba(59, 130, 246, 0.2);
}

.alert-secondary {
    color: var(--theme-text-secondary, #475569);
    background-color: rgba(100, 116, 139, 0.1);
    border-color: rgba(100, 116, 139, 0.2);
}

.alert-success {
    color: var(--theme-text-success, #15803d);
    background-color: rgba(22, 163, 74, 0.1);
    border-color: rgba(22, 163, 74, 0.2);
}

.alert-danger {
    color: var(--theme-text-danger, #dc2626);
    background-color: rgba(220, 38, 38, 0.1);
    border-color: rgba(220, 38, 38, 0.2);
}

.alert-warning {
    color: var(--theme-text-warning, #b45309);
    background-color: rgba(217, 119, 6, 0.1);
    border-color: rgba(217, 119, 6, 0.2);
}

.alert-info {
    color: var(--theme-text-info, #0369a1);
    background-color: rgba(14, 165, 233, 0.1);
    border-color: rgba(14, 165, 233, 0.2);
}

/* ============================================
   CARDS - Theme Integrated
   ============================================ */
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: var(--theme-surface, #ffffff);
    background-clip: border-box;
    border: 1px solid var(--theme-border, #e2e8f0);
    border-radius: 12px;
}

.card-header {
    padding: 16px 20px;
    margin-bottom: 0;
    background-color: var(--theme-surface-secondary, #f8fafc);
    border-bottom: 1px solid var(--theme-border, #e2e8f0);
}

.card-header:first-child {
    border-radius: calc(12px - 1px) calc(12px - 1px) 0 0;
}

.card-body {
    flex: 1 1 auto;
    padding: 20px;
}

.card-title {
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: var(--theme-text-primary, #1e293b);
}

.card-subtitle {
    margin-top: -0.375rem;
    margin-bottom: 0.5rem;
    color: var(--theme-text-muted, #94a3b8);
}

.card-text {
    color: var(--theme-text-secondary, #475569);
}

.card-text:last-child {
    margin-bottom: 0;
}

.card-footer {
    padding: 16px 20px;
    background-color: var(--theme-surface-secondary, #f8fafc);
    border-top: 1px solid var(--theme-border, #e2e8f0);
}

.card-footer:last-child {
    border-radius: 0 0 calc(12px - 1px) calc(12px - 1px);
}

/* ============================================
   TABLES - Theme Integrated
   ============================================ */
.table {
    width: 100%;
    margin-bottom: 1rem;
    color: var(--theme-text-primary, #1e293b);
    vertical-align: top;
    border-color: var(--theme-border, #e2e8f0);
}

.table > thead {
    vertical-align: bottom;
}

.table > thead > tr > th {
    padding: 12px 16px;
    font-weight: 600;
    color: var(--theme-text-secondary, #475569);
    background-color: var(--theme-surface-secondary, #f8fafc);
    border-bottom: 2px solid var(--theme-border, #e2e8f0);
    text-align: left;
}

.table > tbody > tr > td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--theme-border, #e2e8f0);
}

.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

.table-hover > tbody > tr:hover {
    background-color: var(--theme-link-hover-bg, rgba(0, 0, 0, 0.04));
}

.table-bordered {
    border: 1px solid var(--theme-border, #e2e8f0);
}

.table-bordered > thead > tr > th,
.table-bordered > tbody > tr > td {
    border: 1px solid var(--theme-border, #e2e8f0);
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ============================================
   BADGES - Theme Integrated
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 9999px;
}

.badge-primary,
.bg-primary.badge { 
    background-color: var(--theme-primary, #3b82f6); 
    color: #ffffff;
}

.badge-secondary,
.bg-secondary.badge { 
    background-color: var(--theme-secondary, #64748b); 
    color: #ffffff;
}

.badge-success,
.bg-success.badge { 
    background-color: var(--theme-text-success, #15803d); 
    color: #ffffff;
}

.badge-danger,
.bg-danger.badge { 
    background-color: var(--theme-text-danger, #dc2626); 
    color: #ffffff;
}

.badge-warning,
.bg-warning.badge { 
    background-color: var(--theme-text-warning, #d97706); 
    color: #ffffff;
}

.badge-info,
.bg-info.badge { 
    background-color: var(--theme-text-info, #0284c7); 
    color: #ffffff;
}

/* ============================================
   GRID SYSTEM (Simplified)
   ============================================ */
.container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

.container-fluid {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.col {
    flex: 1 0 0%;
    padding-right: 15px;
    padding-left: 15px;
}

.col-auto {
    flex: 0 0 auto;
    width: auto;
    padding-right: 15px;
    padding-left: 15px;
}

/* Column sizes */
.col-1 { flex: 0 0 auto; width: 8.333333%; padding-right: 15px; padding-left: 15px; }
.col-2 { flex: 0 0 auto; width: 16.666667%; padding-right: 15px; padding-left: 15px; }
.col-3 { flex: 0 0 auto; width: 25%; padding-right: 15px; padding-left: 15px; }
.col-4 { flex: 0 0 auto; width: 33.333333%; padding-right: 15px; padding-left: 15px; }
.col-5 { flex: 0 0 auto; width: 41.666667%; padding-right: 15px; padding-left: 15px; }
.col-6 { flex: 0 0 auto; width: 50%; padding-right: 15px; padding-left: 15px; }
.col-7 { flex: 0 0 auto; width: 58.333333%; padding-right: 15px; padding-left: 15px; }
.col-8 { flex: 0 0 auto; width: 66.666667%; padding-right: 15px; padding-left: 15px; }
.col-9 { flex: 0 0 auto; width: 75%; padding-right: 15px; padding-left: 15px; }
.col-10 { flex: 0 0 auto; width: 83.333333%; padding-right: 15px; padding-left: 15px; }
.col-11 { flex: 0 0 auto; width: 91.666667%; padding-right: 15px; padding-left: 15px; }
.col-12 { flex: 0 0 auto; width: 100%; padding-right: 15px; padding-left: 15px; }

/* Medium breakpoint (768px+) */
@media (min-width: 768px) {
    .col-md-1 { flex: 0 0 auto; width: 8.333333%; }
    .col-md-2 { flex: 0 0 auto; width: 16.666667%; }
    .col-md-3 { flex: 0 0 auto; width: 25%; }
    .col-md-4 { flex: 0 0 auto; width: 33.333333%; }
    .col-md-5 { flex: 0 0 auto; width: 41.666667%; }
    .col-md-6 { flex: 0 0 auto; width: 50%; }
    .col-md-7 { flex: 0 0 auto; width: 58.333333%; }
    .col-md-8 { flex: 0 0 auto; width: 66.666667%; }
    .col-md-9 { flex: 0 0 auto; width: 75%; }
    .col-md-10 { flex: 0 0 auto; width: 83.333333%; }
    .col-md-11 { flex: 0 0 auto; width: 91.666667%; }
    .col-md-12 { flex: 0 0 auto; width: 100%; }
    .col-md-auto { flex: 0 0 auto; width: auto; }
}

/* Large breakpoint (992px+) */
@media (min-width: 992px) {
    .col-lg-1 { flex: 0 0 auto; width: 8.333333%; }
    .col-lg-2 { flex: 0 0 auto; width: 16.666667%; }
    .col-lg-3 { flex: 0 0 auto; width: 25%; }
    .col-lg-4 { flex: 0 0 auto; width: 33.333333%; }
    .col-lg-5 { flex: 0 0 auto; width: 41.666667%; }
    .col-lg-6 { flex: 0 0 auto; width: 50%; }
    .col-lg-7 { flex: 0 0 auto; width: 58.333333%; }
    .col-lg-8 { flex: 0 0 auto; width: 66.666667%; }
    .col-lg-9 { flex: 0 0 auto; width: 75%; }
    .col-lg-10 { flex: 0 0 auto; width: 83.333333%; }
    .col-lg-11 { flex: 0 0 auto; width: 91.666667%; }
    .col-lg-12 { flex: 0 0 auto; width: 100%; }
    .col-lg-auto { flex: 0 0 auto; width: auto; }
}

/* Small breakpoint (576px+) */
@media (min-width: 576px) {
    .col-sm-1 { flex: 0 0 auto; width: 8.333333%; }
    .col-sm-2 { flex: 0 0 auto; width: 16.666667%; }
    .col-sm-3 { flex: 0 0 auto; width: 25%; }
    .col-sm-4 { flex: 0 0 auto; width: 33.333333%; }
    .col-sm-5 { flex: 0 0 auto; width: 41.666667%; }
    .col-sm-6 { flex: 0 0 auto; width: 50%; }
    .col-sm-7 { flex: 0 0 auto; width: 58.333333%; }
    .col-sm-8 { flex: 0 0 auto; width: 66.666667%; }
    .col-sm-9 { flex: 0 0 auto; width: 75%; }
    .col-sm-10 { flex: 0 0 auto; width: 83.333333%; }
    .col-sm-11 { flex: 0 0 auto; width: 91.666667%; }
    .col-sm-12 { flex: 0 0 auto; width: 100%; }
    .col-sm-auto { flex: 0 0 auto; width: auto; }
}

/* Extra large breakpoint (1200px+) */
@media (min-width: 1200px) {
    .col-xl-1 { flex: 0 0 auto; width: 8.333333%; }
    .col-xl-2 { flex: 0 0 auto; width: 16.666667%; }
    .col-xl-3 { flex: 0 0 auto; width: 25%; }
    .col-xl-4 { flex: 0 0 auto; width: 33.333333%; }
    .col-xl-5 { flex: 0 0 auto; width: 41.666667%; }
    .col-xl-6 { flex: 0 0 auto; width: 50%; }
    .col-xl-7 { flex: 0 0 auto; width: 58.333333%; }
    .col-xl-8 { flex: 0 0 auto; width: 66.666667%; }
    .col-xl-9 { flex: 0 0 auto; width: 75%; }
    .col-xl-10 { flex: 0 0 auto; width: 83.333333%; }
    .col-xl-11 { flex: 0 0 auto; width: 91.666667%; }
    .col-xl-12 { flex: 0 0 auto; width: 100%; }
    .col-xl-auto { flex: 0 0 auto; width: auto; }
}

/* ============================================
   MISC UTILITIES
   ============================================ */
.clearfix::after {
    display: block;
    clear: both;
    content: "";
}

.float-start { float: left; }
.float-end { float: right; }
.float-none { float: none; }

.opacity-0 { opacity: 0; }
.opacity-25 { opacity: 0.25; }
.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }
.opacity-100 { opacity: 1; }

.shadow { box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15); }
.shadow-sm { box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075); }
.shadow-lg { box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175); }
.shadow-none { box-shadow: none; }

.cursor-pointer { cursor: pointer; }
.user-select-none { user-select: none; }

/* Screen reader only */
.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;
}

/* ============================================
   LIST UTILITIES
   ============================================ */
.list-unstyled {
    padding-left: 0;
    list-style: none;
}

.list-inline {
    padding-left: 0;
    list-style: none;
}

.list-inline-item {
    display: inline-block;
}

.list-inline-item:not(:last-child) {
    margin-right: 0.5rem;
}

/* ============================================
   LINK UTILITIES
   ============================================ */
a {
    color: var(--theme-link, #3b82f6);
    text-decoration: none;
}

a:hover {
    color: var(--theme-link-hover, #2563eb);
}

.link-primary { color: var(--theme-primary, #3b82f6); }
.link-secondary { color: var(--theme-secondary, #64748b); }
.link-success { color: var(--theme-text-success, #15803d); }
.link-danger { color: var(--theme-text-danger, #dc2626); }
.link-warning { color: var(--theme-text-warning, #b45309); }
.link-info { color: var(--theme-text-info, #0369a1); }

/* ============================================
   CLOSE BUTTON
   ============================================ */
.btn-close {
    box-sizing: content-box;
    width: 1em;
    height: 1em;
    padding: 0.25em 0.25em;
    color: currentColor;
    background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat;
    border: 0;
    border-radius: 0.25rem;
    opacity: 0.5;
    cursor: pointer;
}

.btn-close:hover {
    opacity: 0.75;
}

/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */
@media (max-width: 575.98px) {
    .d-sm-none { display: none !important; }
}

@media (min-width: 576px) {
    .d-sm-block { display: block !important; }
    .d-sm-flex { display: flex !important; }
    .d-sm-none { display: none !important; }
}

@media (min-width: 768px) {
    .d-md-block { display: block !important; }
    .d-md-flex { display: flex !important; }
    .d-md-none { display: none !important; }
}

@media (min-width: 992px) {
    .d-lg-block { display: block !important; }
    .d-lg-flex { display: flex !important; }
    .d-lg-none { display: none !important; }
}

@media (min-width: 1200px) {
    .d-xl-block { display: block !important; }
    .d-xl-flex { display: flex !important; }
    .d-xl-none { display: none !important; }
}
