﻿/* ============================================================
   MEEK KNIT LTD ERP
   FINAL MAIN DASHBOARD
   Bootstrap 3 / AdminLTE compatible
   ============================================================ */

.mk-dashboard {
    --mk-dark: #17191c;
    --mk-dark-2: #24211b;
    --mk-gold: #c99a2e;
    --mk-gold-dark: #a87816;
    --mk-gold-light: #e7c66c;
    --mk-bg: #f4f6f8;
    --mk-white: #ffffff;
    --mk-text: #252932;
    --mk-muted: #7d8794;
    --mk-border: #e5e8ed;
    width: 100%;
    max-width: 100%;
    min-height: calc(100vh - 50px);
    margin: 0;
    padding: 20px;
    overflow-x: hidden;
    box-sizing: border-box;
    background: radial-gradient( circle at 0 0, rgba(201,154,46,.05), transparent 26% ), linear-gradient( 180deg, #f8f9fb 0%, #f3f5f7 100% );
    color: var(--mk-text);
    font-family: "Segoe UI", Arial, sans-serif;
}


    .mk-dashboard *,
    .mk-dashboard *::before,
    .mk-dashboard *::after {
        box-sizing: border-box;
    }


/* ============================================================
   IMPORTANT: PREVENT HORIZONTAL OVERFLOW
   ============================================================ */

.content-wrapper:has(.mk-dashboard),
.content:has(.mk-dashboard) {
    overflow-x: hidden;
}

.mk-dashboard section,
.mk-dashboard div,
.mk-dashboard a {
    min-width: 0;
}


/* ============================================================
   HERO
   ============================================================ */

.mk-hero {
    position: relative;
    width: 100%;
    max-width: 100%;
    min-height: 215px;
    margin: 0 0 26px;
    overflow: hidden;
    border-radius: 18px;
    background: radial-gradient( circle at 87% 20%, rgba(214,170,65,.25), transparent 27% ), radial-gradient( circle at 60% 120%, rgba(255,255,255,.08), transparent 40% ), linear-gradient( 135deg, #121416 0%, #1b1e22 55%, #29251d 100% );
    box-shadow: 0 12px 35px rgba(25,30,38,.14);
}


    .mk-hero::before {
        content: "";
        position: absolute;
        width: 420px;
        height: 420px;
        right: -100px;
        top: -170px;
        border: 1px solid rgba(232,195,94,.12);
        border-radius: 50%;
    }


    .mk-hero::after {
        content: "";
        position: absolute;
        width: 280px;
        height: 280px;
        right: 190px;
        bottom: -210px;
        border-radius: 50%;
        background: rgba(215,173,63,.05);
    }


.mk-hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 100%;
    min-height: 215px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 30px 42px;
}


.mk-hero-left {
    flex: 1 1 auto;
    width: auto;
    min-width: 0;
}


.mk-small-title {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    margin-bottom: 10px;
    color: var(--mk-gold-light);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 2.5px;
}


    .mk-small-title i {
        flex: 0 0 auto;
        color: #e1b84f;
        font-size: 6px;
    }


.mk-hero h1 {
    max-width: 100%;
    margin: 0;
    color: #ffffff;
    font-size: 35px;
    font-weight: 300;
    line-height: 1.2;
    overflow-wrap: break-word;
    word-break: normal;
}


    .mk-hero h1 span {
        color: #e3bb50;
        font-weight: 700;
    }


.mk-hero-left > p {
    max-width: 100%;
    margin: 8px 0 20px;
    color: #adb4bc;
    font-size: 14px;
    font-weight: 400;
    overflow-wrap: break-word;
}


.mk-hero-info {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    max-width: 100%;
}


.mk-info-item {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 13px;
    border: 1px solid rgba(255,255,255,.09);
    border-radius: 30px;
    background: rgba(255,255,255,.045);
    color: #c8ced4;
    font-size: 11px;
}


    .mk-info-item i {
        color: #dab14a;
    }


/* ============================================================
   BRAND
   ============================================================ */

.mk-hero-right {
    flex: 0 0 190px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}


.mk-brand-box {
    width: 190px;
    max-width: 100%;
    text-align: center;
}


.mk-brand-letter {
    width: 82px;
    height: 82px;
    margin: 0 auto 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 18px;
    color: #171717;
    background: linear-gradient( 145deg, #f8df88 0%, #c48c19 48%, #efd16d 100% );
    font-family: Georgia, "Times New Roman", serif;
    font-size: 55px;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 10px 25px rgba(0,0,0,.25), inset 0 1px 1px rgba(255,255,255,.65);
}


.mk-brand-name {
    color: #e2bf62;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.4px;
}


.mk-brand-subtitle {
    margin-top: 3px;
    color: #868d95;
    font-size: 8px;
    letter-spacing: 1px;
    text-transform: uppercase;
}


/* ============================================================
   SECTION HEADING
   ============================================================ */

.mk-section-heading {
    width: 100%;
    max-width: 100%;
    margin: 0 0 18px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 15px;
}


.mk-section-label {
    display: block;
    margin-bottom: 3px;
    color: #ad8423;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.8px;
}


.mk-section-heading h2 {
    margin: 0;
    color: #262b33;
    font-size: 23px;
    font-weight: 700;
}


.mk-section-heading p {
    margin: 4px 0 0;
    color: #8b939d;
    font-size: 12px;
}


.mk-status {
    flex: 0 0 auto;
    min-height: 34px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border: 1px solid #e4e7eb;
    border-radius: 25px;
    background: #ffffff;
    color: #67717e;
    font-size: 11px;
    box-shadow: 0 3px 10px rgba(0,0,0,.03);
}


.mk-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #20ad69;
    box-shadow: 0 0 0 4px rgba(32,173,105,.12);
}


/* ============================================================
   MODULE GRID
   ============================================================ */

.mk-module-grid {
    width: 100%;
    max-width: 100%;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
}


/* ============================================================
   MODULE CARD
   ============================================================ */

.mk-module-card {
    position: relative;
    width: 100%;
    min-width: 0;
    min-height: 255px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 19px;
    border: 1px solid var(--mk-border);
    border-radius: 16px;
    background: #ffffff;
    color: #252932 !important;
    text-decoration: none !important;
    box-shadow: 0 6px 20px rgba(22,29,37,.05);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}


    .mk-module-card::before {
        content: "";
        position: absolute;
        width: 120px;
        height: 120px;
        right: -50px;
        top: -50px;
        border-radius: 50%;
        opacity: .07;
        transition: transform .3s ease, opacity .3s ease;
    }


    .mk-module-card:hover,
    .mk-module-card:focus {
        outline: none;
        color: #252932 !important;
        text-decoration: none !important;
        transform: translateY(-6px);
        box-shadow: 0 18px 38px rgba(22,29,37,.12);
    }


        .mk-module-card:hover::before {
            transform: scale(1.6);
            opacity: .11;
        }


/* ============================================================
   CARD TOP
   ============================================================ */

.mk-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 22px;
}


.mk-icon-box {
    flex: 0 0 60px;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    background: #f5f6f8;
}


    .mk-icon-box img {
        display: block;
        max-width: 39px;
        max-height: 39px;
        width: auto;
        height: auto;
        object-fit: contain;
    }


.mk-card-arrow {
    flex: 0 0 31px;
    width: 31px;
    height: 31px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f4f5f7;
    color: #88919c;
    font-size: 11px;
    transition: background .25s ease, color .25s ease, transform .25s ease;
}


.mk-module-card:hover .mk-card-arrow {
    transform: translateX(3px);
}


/* ============================================================
   CARD BODY
   ============================================================ */

.mk-card-body {
    flex: 1 1 auto;
    min-width: 0;
}


.mk-module-no {
    display: block;
    margin-bottom: 5px;
    color: #adb3bb;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1px;
}


.mk-card-body h3 {
    margin: 0 0 9px;
    color: #20242a;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: break-word;
}


.mk-card-body p {
    margin: 0;
    color: #828b96;
    font-size: 12px;
    line-height: 1.55;
    overflow-wrap: break-word;
}


/* ============================================================
   CARD FOOTER
   ============================================================ */

.mk-card-footer {
    margin-top: 17px;
    padding-top: 13px;
    border-top: 1px solid #eef0f3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 11px;
    font-weight: 600;
}


    .mk-card-footer i {
        transition: transform .2s ease;
    }


.mk-module-card:hover .mk-card-footer i {
    transform: translateX(4px);
}


/* ============================================================
   CARD COLORS
   ============================================================ */

/* Merchandising */

.mk-merchandising::before {
    background: #d15353;
}

.mk-merchandising .mk-icon-box {
    background: #fff0f0;
}

.mk-merchandising .mk-card-footer {
    color: #c64f4f;
}

.mk-merchandising:hover {
    border-color: #eba3a3;
}

    .mk-merchandising:hover .mk-card-arrow {
        background: #d25353;
        color: #ffffff;
    }


/* Inventory */

.mk-inventory::before {
    background: #149763;
}

.mk-inventory .mk-icon-box {
    background: #ebf8f2;
}

.mk-inventory .mk-card-footer {
    color: #16875b;
}

.mk-inventory:hover {
    border-color: #88c9aa;
}

    .mk-inventory:hover .mk-card-arrow {
        background: #16945f;
        color: #ffffff;
    }


/* Supply Chain */

.mk-supply::before {
    background: #d39a28;
}

.mk-supply .mk-icon-box {
    background: #fff7e7;
}

.mk-supply .mk-card-footer {
    color: #aa7914;
}

.mk-supply:hover {
    border-color: #e4bf6c;
}

    .mk-supply:hover .mk-card-arrow {
        background: #cf9829;
        color: #ffffff;
    }


/* Commercial */

.mk-commercial::before {
    background: #3477d7;
}

.mk-commercial .mk-icon-box {
    background: #edf5ff;
}

.mk-commercial .mk-card-footer {
    color: #3972c4;
}

.mk-commercial:hover {
    border-color: #94b9eb;
}

    .mk-commercial:hover .mk-card-arrow {
        background: #3978d6;
        color: #ffffff;
    }


/* Accounts */

.mk-accounts::before {
    background: #7055c4;
}

.mk-accounts .mk-icon-box {
    background: #f2effc;
}

.mk-accounts .mk-card-footer {
    color: #6852b3;
}

.mk-accounts:hover {
    border-color: #b6a7e4;
}

    .mk-accounts:hover .mk-card-arrow {
        background: #7057c2;
        color: #ffffff;
    }


/* ============================================================
   BOTTOM INFORMATION PANEL
   ============================================================ */

.mk-bottom-panel {
    width: 100%;
    max-width: 100%;
    min-height: 72px;
    margin: 20px 0 0;
    padding: 13px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    border: 1px solid #e6e9ed;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 5px 18px rgba(26,35,50,.04);
}


.mk-bottom-left {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}


.mk-bottom-icon {
    flex: 0 0 43px;
    width: 43px;
    height: 43px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: #f8f2e4;
    color: #b48723;
    font-size: 18px;
}


.mk-bottom-left h4 {
    margin: 0 0 3px;
    color: #30353b;
    font-size: 13px;
    font-weight: 700;
}


.mk-bottom-left p {
    margin: 0;
    color: #969da6;
    font-size: 11px;
    overflow-wrap: break-word;
}


.mk-bottom-right {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
}


.mk-bottom-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #747d88;
    font-size: 11px;
}


    .mk-bottom-item i {
        color: #b68c29;
    }


/* ============================================================
   ADMINLTE COMPATIBILITY
   ============================================================ */

.content-wrapper .mk-dashboard {
    overflow: hidden;
}


.mk-dashboard a:hover,
.mk-dashboard a:focus {
    text-decoration: none;
}


.mk-dashboard img {
    max-width: 100%;
    border: 0;
}


/* ============================================================
   DESKTOP / LARGE SCREEN
   ============================================================ */

@media (min-width: 1600px) {

    .mk-dashboard {
        padding: 24px 30px 35px;
    }

    .mk-module-grid {
        gap: 20px;
    }

    .mk-module-card {
        min-height: 270px;
        padding: 22px;
    }
}


/* ============================================================
   LAPTOP
   ============================================================ */

@media (max-width: 1399px) {

    .mk-module-grid {
        grid-template-columns: repeat(3, minmax(0,1fr));
    }
}


/* ============================================================
   TABLET
   ============================================================ */

@media (max-width: 991px) {

    .mk-dashboard {
        padding: 14px;
    }

    .mk-hero-content {
        padding: 27px;
    }

    .mk-hero h1 {
        font-size: 29px;
    }

    .mk-brand-letter {
        width: 70px;
        height: 70px;
        font-size: 47px;
    }

    .mk-module-grid {
        grid-template-columns: repeat(2, minmax(0,1fr));
    }

    .mk-bottom-panel {
        align-items: flex-start;
        flex-direction: column;
        gap: 13px;
    }
}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 767px) {

    html,
    body {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }


    .content-wrapper,
    .right-side {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }


    .content {
        width: 100% !important;
        max-width: 100% !important;
        padding: 8px !important;
        overflow-x: hidden !important;
    }


    .content-header {
        display: none !important;
    }


    .mk-dashboard {
        width: 100%;
        max-width: 100%;
        min-height: auto;
        padding: 0;
        overflow: hidden;
    }


    /* Hide old layout footer only on main dashboard */

    body:has(.mk-dashboard) #footer,
    body:has(.mk-dashboard) .main-footer {
        display: none !important;
    }


    .mk-hero {
        width: 100%;
        max-width: 100%;
        min-height: auto;
        margin: 0 0 22px;
        border-radius: 16px;
    }


        .mk-hero::before {
            width: 260px;
            height: 260px;
            right: -145px;
            top: -100px;
        }


        .mk-hero::after {
            display: none;
        }


    .mk-hero-content {
        width: 100%;
        max-width: 100%;
        min-height: auto;
        display: block;
        padding: 28px 22px;
    }


    .mk-hero-left {
        width: 100%;
        max-width: 100%;
    }


    .mk-hero-right {
        display: none;
    }


    .mk-small-title {
        display: flex;
        width: 100%;
        font-size: 9px;
        letter-spacing: 2px;
        white-space: normal;
    }


    .mk-hero h1 {
        width: 100%;
        max-width: 100%;
        font-size: 28px;
        line-height: 1.25;
        white-space: normal;
        overflow-wrap: break-word;
    }


        .mk-hero h1 span {
            display: inline;
        }


    .mk-hero-left > p {
        width: 100%;
        margin-bottom: 18px;
        font-size: 13px;
        line-height: 1.5;
        white-space: normal;
    }


    .mk-hero-info {
        width: 100%;
        display: flex;
        align-items: stretch;
        flex-direction: column;
        gap: 8px;
    }


    .mk-info-item {
        width: fit-content;
        max-width: 100%;
    }


    .mk-section-heading {
        width: 100%;
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
        padding: 0 4px;
        margin-bottom: 18px;
    }


        .mk-section-heading h2 {
            font-size: 21px;
            line-height: 1.25;
        }


        .mk-section-heading p {
            font-size: 12px;
            line-height: 1.45;
        }


    .mk-status {
        display: none;
    }


    .mk-module-grid {
        width: 100%;
        max-width: 100%;
        display: grid;
        grid-template-columns: minmax(0,1fr);
        gap: 14px;
    }


    .mk-module-card {
        width: 100%;
        max-width: 100%;
        min-height: 245px;
        padding: 20px;
        border-radius: 16px;
        transform: none !important;
    }


        .mk-module-card:hover {
            transform: none !important;
        }


    .mk-card-top {
        margin-bottom: 20px;
    }


    .mk-icon-box {
        flex-basis: 58px;
        width: 58px;
        height: 58px;
    }


    .mk-card-body h3 {
        font-size: 18px;
    }


    .mk-card-body p {
        font-size: 12px;
    }


    .mk-bottom-panel {
        width: 100%;
        max-width: 100%;
        min-height: auto;
        margin: 18px 0 15px;
        padding: 13px 15px;
        align-items: flex-start;
        flex-direction: column;
        gap: 10px;
    }


    .mk-bottom-left {
        width: 100%;
    }


    .mk-bottom-right {
        display: none;
    }


    .mk-bottom-left h4 {
        font-size: 12px;
    }


    .mk-bottom-left p {
        font-size: 10px;
    }
}


/* ============================================================
   VERY SMALL MOBILE
   ============================================================ */

@media (max-width: 420px) {

    .content {
        padding: 6px !important;
    }


    .mk-hero-content {
        padding: 25px 20px;
    }


    .mk-hero h1 {
        font-size: 25px;
    }


    .mk-small-title {
        font-size: 8px;
        letter-spacing: 1.7px;
    }


    .mk-module-card {
        min-height: 235px;
        padding: 18px;
    }


    .mk-icon-box {
        flex-basis: 55px;
        width: 55px;
        height: 55px;
    }


        .mk-icon-box img {
            max-width: 35px;
            max-height: 35px;
        }
}


/* ============================================================
   FALLBACK FOR BROWSERS WITHOUT :has()
   Main dashboard footer is hidden through this selector when
   the layout places #footer after .content-wrapper.
   ============================================================ */

@media (max-width: 767px) {

    .content-wrapper:has(.mk-dashboard) ~ #footer,
    .content-wrapper:has(.mk-dashboard) ~ .main-footer {
        display: none !important;
    }
}
