﻿/* ========================================================================
   MHS Modern — sistema de diseño compartido para el backoffice
   Paleta turquesa #4f7f80 (consistente con landing y carrito)
   ======================================================================== */

:root {
    --mhs-primary: #4f7f80;
    --mhs-primary-dark: #3a6263;
    --mhs-primary-light: #eef7f7;
    --mhs-text: #1f4f5a;
    --mhs-muted: #6d6d6d;
    --mhs-border: #eef0f2;
    --mhs-bg-soft: #f4f6f8;
    --mhs-bg-card: #fff;
    --mhs-radius: 10px;
    --mhs-shadow: 0 2px 8px rgba(0,0,0,0.05);
    --mhs-shadow-hover: 0 8px 24px rgba(79, 127, 128, 0.15);
}

/* ----- Header de página con breadcrumb ----- */
.mhs-page-header {
    background: #fff;
    padding: 22px 28px;
    border-bottom: 1px solid var(--mhs-border);
    margin: 0;
}

.mhs-page-header h2 {
    color: var(--mhs-text);
    font-weight: 700;
    font-size: 22px;
    margin: 0 0 4px;
    line-height: 1.2;
}

.mhs-page-header .breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
    font-size: 12px;
    color: var(--mhs-muted);
    list-style: none;
}

.mhs-page-header .breadcrumb > li {
    display: inline-block;
}

.mhs-page-header .breadcrumb > li + li:before {
    content: "/";
    padding: 0 8px;
    color: #c7ccd1;
}

.mhs-page-header .breadcrumb a {
    color: var(--mhs-primary);
    text-decoration: none;
}

    .mhs-page-header .breadcrumb a:hover {
        color: var(--mhs-primary-dark);
        text-decoration: underline;
    }

.mhs-page-header .breadcrumb .active strong,
.mhs-page-header .breadcrumb .active {
    color: var(--mhs-text);
    font-weight: 600;
}

/* ----- Contenedor principal ----- */
.mhs-content {
    padding: 24px 28px;
    background: var(--mhs-bg-soft);
    min-height: calc(100vh - 60px - 70px); /* viewport - topbar - header */
}

/* ----- Card base ----- */
.mhs-card {
    background: var(--mhs-bg-card);
    border-radius: var(--mhs-radius);
    box-shadow: var(--mhs-shadow);
    margin-bottom: 18px;
    overflow: hidden;
}

    .mhs-card .mhs-card-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 16px 20px;
        border-bottom: 1px solid var(--mhs-border);
    }

        .mhs-card .mhs-card-header h5,
        .mhs-card .mhs-card-header h4 {
            margin: 0;
            color: var(--mhs-text);
            font-weight: 700;
            font-size: 15px;
        }

        .mhs-card .mhs-card-header small {
            color: var(--mhs-muted);
            font-weight: 400;
            font-size: 12px;
        }

    .mhs-card .mhs-card-body {
        padding: 22px 24px;
    }

        .mhs-card .mhs-card-body > h2:first-child,
        .mhs-card .mhs-card-body > h3:first-child {
            color: var(--mhs-text);
            font-weight: 700;
            font-size: 18px;
            margin: 0 0 6px;
        }

        .mhs-card .mhs-card-body > p:first-of-type {
            color: var(--mhs-muted);
            font-size: 14px;
            margin-bottom: 18px;
        }

/* ----- Toolbar de acciones ----- */
.mhs-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

/* ----- Botones ----- */
.btn-mhs {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 6px;
    border: none;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none !important;
    transition: all .2s ease;
    line-height: 1;
    font-family: inherit;
}

    .btn-mhs.primary {
        background: var(--mhs-primary);
        color: #fff !important;
    }

        .btn-mhs.primary:hover {
            background: var(--mhs-primary-dark);
            color: #fff !important;
            transform: translateY(-1px);
        }

    .btn-mhs.secondary {
        background: transparent;
        color: var(--mhs-primary) !important;
        border: 1.5px solid var(--mhs-primary);
    }

        .btn-mhs.secondary:hover {
            background: var(--mhs-primary);
            color: #fff !important;
        }

    .btn-mhs.warn {
        background: #f0ad4e;
        color: #1a1a1a !important;
    }

        .btn-mhs.warn:hover {
            background: #e09c3d;
            color: #1a1a1a !important;
        }

    .btn-mhs.success {
        background: #5cb85c;
        color: #fff !important;
    }

        .btn-mhs.success:hover {
            background: #4ca64c;
            color: #fff !important;
        }

    .btn-mhs.danger {
        background: transparent;
        color: #d9534f !important;
        border: 1.5px solid #d9534f;
    }

        .btn-mhs.danger:hover {
            background: #d9534f;
            color: #fff !important;
        }

    .btn-mhs.danger-solid {
        background: #d9534f;
        color: #fff !important;
    }

        .btn-mhs.danger-solid:hover {
            background: #c9302c;
            color: #fff !important;
        }

    .btn-mhs.sm {
        padding: 6px 12px;
        font-size: 12px;
    }

    .btn-mhs.lg {
        padding: 13px 24px;
        font-size: 14px;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .btn-mhs:disabled,
    .btn-mhs.disabled {
        opacity: .55;
        cursor: not-allowed;
        transform: none !important;
    }

/* ----- Forms ----- */
.mhs-form .form-group {
    margin-bottom: 14px;
}

.mhs-form label,
.mhs-form .control-label {
    color: var(--mhs-text);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    display: block;
}

.mhs-form .form-control,
.mhs-form input[type="text"],
.mhs-form input[type="email"],
.mhs-form input[type="password"],
.mhs-form input[type="number"],
.mhs-form input[type="tel"],
.mhs-form input[type="date"],
.mhs-form select,
.mhs-form textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #e1e4e7;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    background: #fff;
    color: var(--mhs-text);
    transition: border-color .2s ease, box-shadow .2s ease;
    font-family: inherit;
    box-shadow: none;
    height: auto;
}

    .mhs-form .form-control:focus,
    .mhs-form input:focus,
    .mhs-form select:focus,
    .mhs-form textarea:focus {
        border-color: var(--mhs-primary);
        box-shadow: 0 0 0 3px rgba(79, 127, 128, 0.12);
        outline: none;
    }

.mhs-form textarea {
    min-height: 90px;
    resize: vertical;
}

/* ----- Tablas ----- */
.mhs-card .table {
    margin-bottom: 0;
}

    .mhs-card .table thead th {
        background: #f9fafb;
        color: var(--mhs-text);
        font-weight: 700;
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 0.6px;
        border: none;
        border-bottom: 2px solid var(--mhs-border);
        padding: 12px 10px;
    }

    .mhs-card .table tbody td {
        color: #333;
        padding: 12px 10px;
        vertical-align: middle;
        font-size: 13.5px;
    }

    .mhs-card .table tbody tr:hover {
        background: #fafbfc;
    }

    .mhs-card .table tfoot th {
        background: #f9fafb;
        color: var(--mhs-muted);
        font-weight: 600;
        font-size: 11px;
        text-transform: uppercase;
        padding: 10px;
        border-top: 1px solid var(--mhs-border);
    }

/* DataTables overrides */
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
    border: 1.5px solid #e1e4e7 !important;
    border-radius: 6px !important;
    padding: 6px 10px !important;
    font-size: 13px !important;
    box-shadow: none !important;
    height: auto !important;
}

    .dataTables_wrapper .dataTables_filter input:focus,
    .dataTables_wrapper .dataTables_length select:focus {
        border-color: var(--mhs-primary) !important;
        box-shadow: 0 0 0 3px rgba(79, 127, 128, 0.12) !important;
    }

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 6px !important;
    color: var(--mhs-text) !important;
    border: 1px solid var(--mhs-border) !important;
}

    .dataTables_wrapper .dataTables_paginate .paginate_button.current,
    .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
        background: var(--mhs-primary) !important;
        color: #fff !important;
        border-color: var(--mhs-primary) !important;
    }

    .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
        background: var(--mhs-primary-light) !important;
        color: var(--mhs-text) !important;
        border-color: var(--mhs-primary) !important;
    }

/* ----- Wizard steps (para Generador) ----- */
.wizard > .steps {
    margin-bottom: 18px;
}

    .wizard > .steps > ul > li.current > a,
    .wizard > .steps > ul > li.current > a:hover {
        background: var(--mhs-primary) !important;
        color: #fff !important;
        border-radius: 6px;
    }

    .wizard > .steps > ul > li.done > a {
        background: var(--mhs-primary-light) !important;
        color: var(--mhs-primary) !important;
        border-radius: 6px;
    }

    .wizard > .steps > ul > li.disabled > a {
        background: #f9fafb !important;
        color: var(--mhs-muted) !important;
        border-radius: 6px;
    }

.wizard > .actions a,
.wizard > .actions a:hover {
    border-radius: 6px !important;
    padding: 8px 18px !important;
    font-weight: 600 !important;
}

.wizard > .actions > ul > li > a {
    background: var(--mhs-primary) !important;
    border: none !important;
}

/* ----- Alertas ----- */
.alert-mhs {
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 13px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.4;
    margin-bottom: 14px;
}

    .alert-mhs i {
        font-size: 18px;
        flex-shrink: 0;
        margin-top: 1px;
    }

    .alert-mhs.alert-info-mhs {
        background: #e8f0f7;
        border-left: 4px solid #4a90c2;
        color: #1d4a73;
    }

        .alert-mhs.alert-info-mhs i {
            color: #4a90c2;
        }

    .alert-mhs.alert-success-mhs {
        background: #e8f6ef;
        border-left: 4px solid #2e7d4f;
        color: #1f5a37;
    }

        .alert-mhs.alert-success-mhs i {
            color: #2e7d4f;
        }

    .alert-mhs.alert-danger-mhs {
        background: #fdecea;
        border-left: 4px solid #d9534f;
        color: #8a2a26;
    }

        .alert-mhs.alert-danger-mhs i {
            color: #d9534f;
        }

    .alert-mhs.alert-warn-mhs {
        background: #fff8e6;
        border-left: 4px solid #f0ad4e;
        color: #6b4a00;
    }

        .alert-mhs.alert-warn-mhs i {
            color: #f0ad4e;
        }

/* ----- Cards de dashboard ----- */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}

.dash-card {
    background: var(--mhs-bg-card);
    border-radius: 12px;
    box-shadow: var(--mhs-shadow);
    padding: 24px 18px;
    text-align: center;
    text-decoration: none !important;
    color: var(--mhs-text) !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 180px;
    transition: all .25s ease;
    border: 1px solid var(--mhs-border);
    position: relative;
    overflow: hidden;
}

    .dash-card:before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: linear-gradient(90deg, var(--mhs-primary), #6ba3a4);
        opacity: 0;
        transition: opacity .25s ease;
    }

    .dash-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--mhs-shadow-hover);
        color: var(--mhs-text) !important;
        text-decoration: none !important;
        border-color: var(--mhs-primary);
    }

        .dash-card:hover:before {
            opacity: 1;
        }

    .dash-card .dash-icon {
        width: 56px;
        height: 56px;
        border-radius: 50%;
        background: var(--mhs-primary-light);
        color: var(--mhs-primary);
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 24px;
        margin-bottom: 14px;
        transition: all .25s ease;
    }

    .dash-card:hover .dash-icon {
        background: var(--mhs-primary);
        color: #fff;
        transform: scale(1.05);
    }

    .dash-card .dash-title {
        font-weight: 700;
        font-size: 14px;
        line-height: 1.3;
        margin: 0 0 6px;
        letter-spacing: 0.2px;
    }

    .dash-card .dash-link {
        color: var(--mhs-muted);
        font-size: 11px;
        text-transform: uppercase;
        letter-spacing: 1px;
        font-weight: 600;
    }

/* ----- Override del wrapper original de Inspinia ----- */
#page-wrapper.gray-bg {
    background: var(--mhs-bg-soft) !important;
}

.wrapper-content {
    padding: 0 !important;
}

/* ----- Responsive ----- */
@media (max-width: 768px) {
    .mhs-page-header {
        padding: 16px 18px;
    }

    .mhs-content {
        padding: 16px 18px;
    }

    .mhs-card .mhs-card-body {
        padding: 16px;
    }

    .mhs-card .mhs-card-header {
        padding: 12px 16px;
    }

    .mhs-actions {
        gap: 6px;
    }

    .btn-mhs {
        padding: 9px 14px;
        font-size: 12px;
    }

    .dashboard-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .dash-card {
        min-height: 150px;
        padding: 18px 12px;
    }
}
