/* 
   Bootstrap to Pico CSS Compatibility Layer v2
   Mapea clases de Bootstrap a estilos nativos de Pico CSS
*/

/* =========================================
   1. GRID SYSTEM (12 Columns)
   ========================================= */
.container,
.container-fluid {
    width: 100%;
    padding-right: var(--pico-spacing);
    padding-left: var(--pico-spacing);
    margin-right: auto;
    margin-left: auto;
}

@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: calc(var(--pico-spacing) * -0.5);
    margin-left: calc(var(--pico-spacing) * -0.5);
}

.row>* {
    padding-right: calc(var(--pico-spacing) * 0.5);
    padding-left: calc(var(--pico-spacing) * 0.5);
    width: 100%;
}

/* Columnas base (Mobile first) */
.col-1 {
    width: 8.333333%;
}

.col-2 {
    width: 16.666667%;
}

.col-3 {
    width: 25%;
}

.col-4 {
    width: 33.333333%;
}

.col-5 {
    width: 41.666667%;
}

.col-6 {
    width: 50%;
}

.col-7 {
    width: 58.333333%;
}

.col-8 {
    width: 66.666667%;
}

.col-9 {
    width: 75%;
}

.col-10 {
    width: 83.333333%;
}

.col-11 {
    width: 91.666667%;
}

.col-12 {
    width: 100%;
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    .col-md-1 {
        width: 8.333333%;
        flex: 0 0 8.333333%;
    }

    .col-md-2 {
        width: 16.666667%;
        flex: 0 0 16.666667%;
    }

    .col-md-3 {
        width: 25%;
        flex: 0 0 25%;
    }

    .col-md-4 {
        width: 33.333333%;
        flex: 0 0 33.333333%;
    }

    .col-md-5 {
        width: 41.666667%;
        flex: 0 0 41.666667%;
    }

    .col-md-6 {
        width: 50%;
        flex: 0 0 50%;
    }

    .col-md-7 {
        width: 58.333333%;
        flex: 0 0 58.333333%;
    }

    .col-md-8 {
        width: 66.666667%;
        flex: 0 0 66.666667%;
    }

    .col-md-9 {
        width: 75%;
        flex: 0 0 75%;
    }

    .col-md-10 {
        width: 83.333333%;
        flex: 0 0 83.333333%;
    }

    .col-md-11 {
        width: 91.666667%;
        flex: 0 0 91.666667%;
    }

    .col-md-12 {
        width: 100%;
        flex: 0 0 100%;
    }
}

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    .col-lg-1 {
        width: 8.333333%;
        flex: 0 0 8.333333%;
    }

    .col-lg-2 {
        width: 16.666667%;
        flex: 0 0 16.666667%;
    }

    .col-lg-3 {
        width: 25%;
        flex: 0 0 25%;
    }

    .col-lg-4 {
        width: 33.333333%;
        flex: 0 0 33.333333%;
    }

    .col-lg-5 {
        width: 41.666667%;
        flex: 0 0 41.666667%;
    }

    .col-lg-6 {
        width: 50%;
        flex: 0 0 50%;
    }

    .col-lg-7 {
        width: 58.333333%;
        flex: 0 0 58.333333%;
    }

    .col-lg-8 {
        width: 66.666667%;
        flex: 0 0 66.666667%;
    }

    .col-lg-9 {
        width: 75%;
        flex: 0 0 75%;
    }

    .col-lg-10 {
        width: 83.333333%;
        flex: 0 0 83.333333%;
    }

    .col-lg-11 {
        width: 91.666667%;
        flex: 0 0 91.666667%;
    }

    .col-lg-12 {
        width: 100%;
        flex: 0 0 100%;
    }
}

/* =========================================
   2. TABS
   ========================================= */
.nav-tabs {
    display: flex;
    flex-wrap: wrap;
    padding-left: 0;
    margin-bottom: 0;
    list-style: none;
    border-bottom: 1px solid var(--pico-muted-border-color);
}

.nav-tabs .nav-item {
    margin-bottom: -1px;
}

.nav-tabs .nav-link {
    display: block;
    padding: 0.5rem 1rem;
    text-decoration: none;
    border: 1px solid transparent;
    border-top-left-radius: var(--pico-border-radius);
    border-top-right-radius: var(--pico-border-radius);
    color: var(--pico-primary);
    background: transparent;
    cursor: pointer;
}

.nav-tabs .nav-link:hover {
    border-color: var(--pico-muted-border-color) var(--pico-muted-border-color) #fff;
}

.nav-tabs .nav-link.active {
    color: var(--pico-color);
    background-color: var(--pico-background-color);
    border-color: var(--pico-muted-border-color) var(--pico-muted-border-color) var(--pico-background-color);
}

.tab-content>.tab-pane {
    display: none;
    padding: var(--pico-spacing);
    border: 1px solid var(--pico-muted-border-color);
    border-top: none;
}

.tab-content>.active {
    display: block;
}

/* =========================================
   3. ACCORDIONS (Collapse)
   ========================================= */
.accordion {
    margin-bottom: var(--pico-spacing);
}

.card-header .btn-link {
    width: 100%;
    text-align: left;
    text-decoration: none;
    padding: 0;
    color: var(--pico-primary);
    background: none;
    border: none;
    font-weight: bold;
}

.collapse {
    display: none;
}

.collapse.show {
    display: block;
}

.collapsing {
    position: relative;
    height: 0;
    overflow: hidden;
    transition: height 0.35s ease;
}

/* =========================================
   4. BUTTONS & UTILITIES
   ========================================= */
.btn {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    border: 1px solid transparent;
}

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

.btn-secondary {
    background-color: var(--pico-secondary-background);
    color: white;
}

.btn-danger {
    background-color: var(--pico-del-color);
    color: white;
}

.btn-success {
    background-color: var(--pico-ins-color);
    color: white;
}

.btn-info {
    background-color: #17a2b8;
    color: white;
}

.btn-warning {
    background-color: #ffc107;
    color: black;
}

.btn-light {
    background-color: #f8f9fa;
    color: black;
    border-color: #ddd;
}

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

.btn-xs {
    padding: 0.1rem 0.3rem;
    font-size: 0.75rem;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

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

.text-right {
    text-align: right !important;
}

.text-left {
    text-align: left !important;
}

.pull-right {
    float: right !important;
}

.pull-left {
    float: left !important;
}

.d-none {
    display: none !important;
}

.d-block {
    display: block !important;
}

.d-flex {
    display: flex !important;
}

.m-0 {
    margin: 0 !important;
}

.mt-0 {
    margin-top: 0 !important;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.p-0 {
    padding: 0 !important;
}

/* Cards */
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: var(--pico-card-background-color);
    background-clip: border-box;
    border: 1px solid var(--pico-card-border-color);
    border-radius: 0.25rem;
    margin-bottom: 1rem;
}

.card-body {
    flex: 1 1 auto;
    padding: 1.25rem;
}

.card-header {
    padding: 0.75rem 1.25rem;
    margin-bottom: 0;
    background-color: rgba(0, 0, 0, .03);
    border-bottom: 1px solid rgba(0, 0, 0, .125);
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    outline: 0;
    z-index: 1050;
    background: rgba(0, 0, 0, 0.5);
}

.modal.show {
    overflow-x: hidden;
    overflow-y: auto;
    display: block;
}

.modal-dialog {
    position: relative;
    width: auto;
    margin: 0.5rem;
    pointer-events: none;
}

.modal-content {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    pointer-events: auto;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid rgba(0, 0, 0, .2);
    border-radius: 0.3rem;
    outline: 0;
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid #e9ecef;
    border-top-left-radius: 0.3rem;
    border-top-right-radius: 0.3rem;
}

.modal-body {
    position: relative;
    flex: 1 1 auto;
    padding: 1rem;
}

.modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 1rem;
    border-top: 1px solid #e9ecef;
}

@media (min-width: 576px) {
    .modal-dialog {
        max-width: 500px;
        margin: 1.75rem auto;
    }
}

@media (min-width: 992px) {
    .modal-lg {
        max-width: 800px;
    }
}

/* =========================================
   5. TAILWIND COMPATIBILITY (tw-*)
   ========================================= */
.tw-flex {
    display: flex;
}

.tw-items-center {
    align-items: center;
}

.tw-justify-between {
    justify-content: space-between;
}

.tw-justify-center {
    justify-content: center;
}

.tw-mt-0 {
    margin-top: 0 !important;
}

.tw-mb-0 {
    margin-bottom: 0 !important;
}

.tw-mr-1\.5 {
    margin-right: 0.375rem;
}

.tw-mr-3 {
    margin-right: 0.75rem;
}

.tw-ml-3 {
    margin-left: 0.75rem;
}

.tw-font-semibold {
    font-weight: 600;
}

.tw-text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.tw-text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.tw-w-5 {
    width: 1.25rem;
}

.tw-h-5 {
    height: 1.25rem;
}

.tw-text-neutral-500 {
    color: #737373;
}

.tw-text-neutral-300 {
    color: #d4d4d4;
}

.tw-border-r {
    border-right-width: 1px;
}

.tw-border-solid {
    border-style: solid;
}

.tw-border-neutral-300 {
    border-color: #d4d4d4;
}

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

/* =========================================
   6. EXTRA BOOTSTRAP UTILITIES
   ========================================= */
.text-dark {
    color: #343a40 !important;
}

.text-muted {
    color: #6c757d !important;
}

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

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

.text-info {
    color: #17a2b8 !important;
}

.mbot15 {
    margin-bottom: 15px !important;
}

/* Support for col-xs-* (Bootstrap 3 legacy) */
.col-xs-1 {
    width: 8.333333%;
    flex: 0 0 8.333333%;
}

.col-xs-2 {
    width: 16.666667%;
    flex: 0 0 16.666667%;
}

.col-xs-3 {
    width: 25%;
    flex: 0 0 25%;
}

.col-xs-4 {
    width: 33.333333%;
    flex: 0 0 33.333333%;
}

.col-xs-5 {
    width: 41.666667%;
    flex: 0 0 41.666667%;
}

.col-xs-6 {
    width: 50%;
    flex: 0 0 50%;
}

.col-xs-7 {
    width: 58.333333%;
    flex: 0 0 58.333333%;
}

.col-xs-8 {
    width: 66.666667%;
    flex: 0 0 66.666667%;
}

.col-xs-9 {
    width: 75%;
    flex: 0 0 75%;
}

.col-xs-10 {
    width: 83.333333%;
    flex: 0 0 83.333333%;
}

.col-xs-11 {
    width: 91.666667%;
    flex: 0 0 91.666667%;
}

.col-xs-12 {
    width: 100%;
    flex: 0 0 100%;
}

/* =========================================
   7. LOGIN PAGE COMPATIBILITY (Tailwind & Forms)
   ========================================= */
.tw-bg-neutral-100 {
    background-color: #f5f5f5;
}

.tw-max-w-md {
    max-width: 28rem;
}

.tw-mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.tw-pt-24 {
    padding-top: 6rem;
}

.tw-relative {
    position: relative;
}

.tw-z-20 {
    z-index: 20;
}

.tw-text-2xl {
    font-size: 1.5rem;
    line-height: 2rem;
}

.tw-text-neutral-800 {
    color: #262626;
}

.tw-mb-5 {
    margin-bottom: 1.25rem;
}

.tw-bg-white {
    background-color: #fff;
}

.tw-mx-2 {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
}

.tw-py-6 {
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.tw-px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.tw-shadow {
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.tw-rounded-lg {
    border-radius: 0.5rem;
}

@media (min-width: 640px) {
    .sm\:tw-mx-6 {
        margin-left: 1.5rem;
        margin-right: 1.5rem;
    }

    .sm\:tw-px-8 {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* Form Group Fix for Login */
.login_admin .form-group {
    margin-bottom: 1rem;
}

.login_admin label {
    display: block;
    margin-bottom: 0.5rem;
}

.login_admin input[type="email"],
.login_admin input[type="password"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
}