﻿
/* =========================================================
   TRAINING CENTER - MAINTENANCE UI FRAMEWORK
   CLEANED / ORGANIZED MASTER CSS
========================================================= */

/* =========================================================
   LAYOUT
========================================================= */

.mp-shell {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 18px 40px;
}

.mp-page-spacing {
    margin-bottom: 24px;
}

.mp-full-height {
    height: 100%;
}


/* =========================================================
   CARD SYSTEM
========================================================= */

.mp-card {
    background: #fff;
    border: 1px solid #dfe6ee;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(16,24,40,.06);
    overflow: hidden;
}

.mp-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid #eef1f4;
    background: #fff;
}

.mp-card-body {
    padding: 20px;
}

.mp-card-footer {
    padding: 16px 20px;
    border-top: 1px solid #eef1f4;
}


/* =========================================================
   TYPOGRAPHY
========================================================= */

.mp-page-title {
    font-size: 24px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

.mp-page-subtitle,
.mp-section-sub,
.mp-help {
    color: #667085;
}

.mp-page-subtitle {
    font-size: 14px;
    margin-top: 4px;
}

.mp-section-title {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

.mp-section-sub {
    font-size: 13px;
    margin-top: 4px;
}

.mp-label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #344054;
}

.mp-message {
    min-height: 24px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 18px;
}


/* =========================================================
   TOP BAR / ACTION BAR
========================================================= */

.mp-topbar,
.mp-actionbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.mp-actionbar {
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid #eef1f4;
}

.mp-topbar-actions,
.mp-action-left,
.mp-action-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}


/* =========================================================
   PANELS
========================================================= */

.mp-panel,
.mp-panel-danger,
.mp-panel-success,
.mp-panel-warning {
    padding: 14px;
    border-radius: 14px;
}

.mp-panel {
    border: 1px solid #eef1f4;
    background: #f8fafc;
}

.mp-panel-danger {
    border: 1px solid #f3d1d6;
    background: #fff5f5;
    color: #842029;
}

.mp-panel-success {
    border: 1px solid #b7e4c7;
    background: #f0fff4;
    color: #1b4332;
}

.mp-panel-warning {
    border: 1px solid #ffe69c;
    background: #fff8db;
    color: #664d03;
}


/* =========================================================
   FORM HELPERS
========================================================= */

.mp-form-group {
    margin-bottom: 20px;
}

.mp-form-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.mp-form-grow {
    flex: 1 1 auto;
}

.mp-form-fixed-sm {
    flex: 0 0 220px;
}

.mp-form-fixed-md {
    flex: 0 0 320px;
}


/* =========================================================
   LIST ITEMS
========================================================= */

.mp-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid #dfe6ee;
    border-radius: 10px;
    background: #f8fafc;
    transition: background-color .15s ease;
}

    .mp-list-item:hover {
        background: #eef4ff;
    }

.mp-list-actions {
    display: flex;
    gap: 6px;
}


/* =========================================================
   TREE VIEW
========================================================= */

.mp-tree-wrap {
    padding: 14px;
    border: 1px solid #eef1f4;
    border-radius: 14px;
    background: #f8fafc;
}

.mp-tree-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #0f172a;
}

/* Node layout */
.mp-tree-wrap a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    line-height: 24px;
}

/* Selection */
.tv-selected a {
    background: #0d6efd !important;
    color: #fff !important;
    border-radius: 6px;
    padding: 2px 6px;
}

/* Icon sizing */
.mp-tree-wrap svg {
    width: 24px !important;
    height: 24px !important;
}

/* Row spacing */
.mp-tree-wrap table tr td {
    vertical-align: middle;
    padding: 4px 0;
}


/* =========================================================
   SELECT LIST (QUIZ / ITEMS)
========================================================= */

.mp-select-list {
    border: 1px solid #eef1f4;
    border-radius: 12px;
    overflow-y: auto;
    background: #fff;
}

.mp-select-item {
    padding: .75rem 1rem;
    border-bottom: 1px solid #f1f3f5;
    cursor: pointer;
}

    .mp-select-item:last-child {
        border-bottom: none;
    }

    .mp-select-item.active {
        background: #eef5ff;
        border-left: 4px solid #0d6efd;
    }


/* =========================================================
   RADIO LIST (UNIFIED)
========================================================= */

.mp-radio-list {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    align-items: center;
}

    .mp-radio-list input[type="radio"] {
        margin-right: 6px;
        transform: scale(1.1);
        accent-color: #0d6efd;
    }

    .mp-radio-list label {
        margin-right: 18px;
        font-weight: 600;
        color: #344054;
    }


/* =========================================================
   BUTTON STATES
========================================================= */

.btn.active {
    background: #0d6efd !important;
    color: #fff !important;
    border-color: #0d6efd !important;
}

.mp-mode-btn {
    white-space: nowrap;
}


/* =========================================================
   UTILITIES
========================================================= */

.mp-rounded-light {
    border-radius: 10px !important;
}

.mp-danger-text {
    color: #b42318;
    font-weight: 600;
}

.mp-success-text {
    color: #146c43;
    font-weight: 600;
}

.mp-warning-text {
    color: #997404;
    font-weight: 600;
}


/* =========================================================
   COLORED HEADER SUPPORT
========================================================= */

.mp-card-header[style],
.mp-card-header.bg-primary,
.mp-card-header.bg-success,
.mp-card-header.bg-danger,
.mp-card-header.bg-dark {
    color: #fff;
}

    .mp-card-header[style] .mp-section-title,
    .mp-card-header[style] .mp-section-sub,
    .mp-card-header.bg-primary .mp-section-title,
    .mp-card-header.bg-success .mp-section-title,
    .mp-card-header.bg-danger .mp-section-title,
    .mp-card-header.bg-dark .mp-section-title {
        color: #fff !important;
    }


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 767.98px) {

    .mp-shell {
        padding: 18px 10px 28px;
    }

    .mp-topbar {
        align-items: flex-start;
    }

    .mp-topbar-actions,
    .mp-action-left,
    .mp-action-right {
        width: 100%;
    }

    .mp-mode-btn {
        width: 100%;
    }

    .mp-actionbar {
        flex-direction: column;
        align-items: stretch;
    }

    .mp-form-row {
        flex-direction: column;
    }

    .mp-form-fixed-sm,
    .mp-form-fixed-md {
        flex: 1 1 auto;
    }
}
