/* ==========================================================================
   Kasi Mattress Admin
   ----------------------------------------------------------------------------
   File: assets/css/dashboard.css
   Module: Dashboard
   Version: 2.0.0
   ==========================================================================

   PURPOSE
       Dashboard-specific presentation only.

   ARCHITECTURE
       - Global typography remains in admin.css / main.css.
       - This file does NOT style generic h1, h2, h3 or p elements.
       - Dashboard elements use dashboard-specific classes.
       - No inline styles are required.
       - No JavaScript styling is required.

   DESIGN
       - Clean
       - Compact
       - Professional
       - Subtle
       - Kasi Mattress navy / gold
       - Navigation-focused
       - Mobile-first

   ========================================================================== */


/* ==========================================================================
   DASHBOARD ROOT
   ========================================================================== */

.km-dashboard {
    width: 100%;
    min-width: 0;
}


/* ==========================================================================
   WELCOME / PAGE HEADER
   ========================================================================== */

.km-dashboard-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 24px;

    margin-bottom: 24px;
}


.km-dashboard-header-content {
    min-width: 0;
}


.km-dashboard-eyebrow {
    display: block;

    margin-bottom: 6px;

    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.3;

    letter-spacing: 0.08em;
    text-transform: uppercase;

    color: #0f4c81;
}


.km-dashboard-title {
    margin: 0;

    font-size: 1.65rem;
    font-weight: 700;
    line-height: 1.2;

    color: #333333;
}


.km-dashboard-description {
    margin: 7px 0 0;

    max-width: 620px;

    font-size: 0.84rem;
    font-weight: 400;
    line-height: 1.5;

    color: #707982;
}


/* ==========================================================================
   HEADER META
   ========================================================================== */

.km-dashboard-header-meta {
    flex: 0 0 auto;
}


.km-dashboard-date {
    display: inline-flex;
    align-items: center;

    min-height: 32px;

    padding: 6px 10px;

    background: #ffffff;

    border: 1px solid #e4e8ec;
    border-radius: 7px;

    font-size: 0.72rem;
    font-weight: 500;

    color: #737b83;

    white-space: nowrap;
}


/* ==========================================================================
   WELCOME USER
   ========================================================================== */

.km-dashboard-welcome {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 28px;
}


.km-dashboard-welcome-content {
    min-width: 0;
}


.km-dashboard-welcome-title {
    margin: 0;

    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.25;

    color: #333333;
}


.km-dashboard-welcome-message {
    margin: 5px 0 0;

    font-size: 0.8rem;
    line-height: 1.45;

    color: #737b83;
}


/* ==========================================================================
   USER STATUS
   ========================================================================== */

.km-dashboard-user-status {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    flex: 0 0 auto;

    padding: 7px 11px;

    background: #f7faf8;

    border: 1px solid #dfe9e3;
    border-radius: 7px;

    font-size: 0.72rem;
    font-weight: 600;

    color: #3f6850;
}


.km-dashboard-user-status::before {
    content: "";

    width: 7px;
    height: 7px;

    flex: 0 0 7px;

    background: #4f8a64;

    border-radius: 50%;
}


/* ==========================================================================
   OVERVIEW SECTION
   ========================================================================== */

.km-dashboard-overview {
    width: 100%;
}


.km-dashboard-overview-header {
    margin-bottom: 12px;
}


.km-dashboard-overview-title {
    margin: 0;

    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;

    color: #333333;
}


.km-dashboard-overview-description {
    margin: 4px 0 0;

    font-size: 0.76rem;
    line-height: 1.4;

    color: #7a8289;
}


/* ==========================================================================
   DASHBOARD PARAGRAPH
   ==========================================================================

   Dashboard-specific paragraph class.

   IMPORTANT:
       We intentionally do not style generic <p> elements.

   ========================================================================== */

.km-dashboard-paragraph {
    margin: 0;

    font-size: 0.74rem;
    font-weight: 400;
    line-height: 1.45;

    color: #737b83;
}


/* ==========================================================================
   OVERVIEW GRID
   ========================================================================== */

.km-dashboard-overview-grid {
    display: grid;

    /*
     * The cards naturally become:
     *
     *     6 across on wide screens
     *     4 across on medium screens
     *     3 across on smaller desktop/tablet widths
     *
     * The minimum width prevents cards from becoming excessively narrow.
     */

    grid-template-columns:
        repeat(auto-fit, minmax(175px, 1fr));

    gap: 12px;

    width: 100%;
}


/* ==========================================================================
   NAVIGATION CARD
   ========================================================================== */

.km-dashboard-navigation-card {
    position: relative;

    display: flex;
    flex-direction: column;

    min-width: 0;
    min-height: 118px;

    padding: 15px 16px;

    background: #ffffff;

    border: 1px solid #e3e7eb;
    border-radius: 9px;

    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.025);

    text-decoration: none;

    overflow: hidden;

    transition:
        transform 180ms ease,
        border-color 180ms ease,
        box-shadow 180ms ease;
}


/* ==========================================================================
   CARD TOP ACCENT
   ========================================================================== */

.km-dashboard-navigation-card::before {
    content: "";

    position: absolute;

    top: 0;
    left: 16px;
    right: 16px;

    height: 2px;

    background: transparent;

    border-radius:
        0 0 2px 2px;

    transition:
        background-color 180ms ease;
}


/* ==========================================================================
   CARD HOVER
   ========================================================================== */

.km-dashboard-navigation-card:hover {
    transform: translateY(-1px);

    border-color: rgba(15, 76, 129, 0.18);

    box-shadow:
        0 5px 14px rgba(15, 76, 129, 0.06);
}


.km-dashboard-navigation-card:hover::before {
    background: #f4a300;
}


/* ==========================================================================
   CARD FOCUS
   ========================================================================== */

.km-dashboard-navigation-card:focus-visible {
    outline: 3px solid rgba(244, 163, 0, 0.22);
    outline-offset: 2px;
}


/* ==========================================================================
   CARD ICON
   ========================================================================== */

.km-dashboard-navigation-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 30px;
    height: 30px;

    flex: 0 0 30px;

    margin-bottom: 9px;

    background: rgba(15, 76, 129, 0.055);

    border: 1px solid rgba(15, 76, 129, 0.07);
    border-radius: 7px;

    font-size: 0.67rem;
    font-weight: 700;
    line-height: 1;

    color: #0f4c81;

    transition:
        background-color 180ms ease,
        color 180ms ease;
}


/* ==========================================================================
   ICON HOVER
   ========================================================================== */

.km-dashboard-navigation-card:hover
.km-dashboard-navigation-card-icon {
    background: #0f4c81;

    color: #ffffff;
}


/* ==========================================================================
   CARD CONTENT
   ========================================================================== */

.km-dashboard-navigation-card-content {
    display: flex;
    flex-direction: column;

    min-width: 0;

    flex: 1;
}


/* ==========================================================================
   CARD TITLE
   ========================================================================== */

.km-dashboard-navigation-card-title {
    margin: 0 0 4px;

    padding-right: 22px;

    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.3;

    color: #333333;
}


/* ==========================================================================
   CARD PARAGRAPH
   ========================================================================== */

.km-dashboard-navigation-card
.km-dashboard-paragraph {
    max-width: 260px;
}


/* ==========================================================================
   CARD ARROW
   ========================================================================== */

.km-dashboard-navigation-card-arrow {
    position: absolute;

    right: 10px;
    bottom: 9px;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 20px;
    height: 20px;

    border-radius: 50%;

    font-size: 0.74rem;
    font-weight: 600;
    line-height: 1;

    color: #a1a9b0;

    transition:
        background-color 180ms ease,
        color 180ms ease,
        transform 180ms ease;
}


/* ==========================================================================
   ARROW HOVER
   ========================================================================== */

.km-dashboard-navigation-card:hover
.km-dashboard-navigation-card-arrow {
    background: rgba(244, 163, 0, 0.10);

    color: #f4a300;

    transform: translateX(2px);
}


/* ==========================================================================
   OPTIONAL CARD FOOTER
   ========================================================================== */

.km-dashboard-navigation-card-footer {
    display: flex;
    align-items: center;

    margin-top: auto;
    padding-top: 8px;
}


.km-dashboard-navigation-card-link {
    font-size: 0.68rem;
    font-weight: 600;

    color: #0f4c81;

    text-decoration: none;
}


.km-dashboard-navigation-card-link:hover {
    color: #f4a300;
}


/* ==========================================================================
   OPTIONAL SECTION DIVIDER
   ========================================================================== */

.km-dashboard-section-divider {
    width: 100%;
    height: 1px;

    margin: 24px 0;

    background: #e8ebee;
}


/* ==========================================================================
   SMALL SUPPORTING NOTE
   ========================================================================== */

.km-dashboard-note {
    margin: 12px 0 0;

    font-size: 0.7rem;
    line-height: 1.45;

    color: #8a9299;
}


/* ==========================================================================
   TABLET
   ========================================================================== */

@media (max-width: 1100px) {

    .km-dashboard-overview-grid {
        grid-template-columns:
            repeat(4, minmax(0, 1fr));
    }

}


/* ==========================================================================
   SMALL DESKTOP / LARGE TABLET
   ========================================================================== */

@media (max-width: 900px) {

    .km-dashboard-overview-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }


    .km-dashboard-header {
        align-items: flex-start;
    }

}


/* ==========================================================================
   TABLET
   ========================================================================== */

@media (max-width: 767px) {

    .km-dashboard-header {
        flex-direction: column;

        align-items: flex-start;

        gap: 12px;

        margin-bottom: 20px;
    }


    .km-dashboard-title {
        font-size: 1.45rem;
    }


    .km-dashboard-description {
        font-size: 0.8rem;
    }


    .km-dashboard-header-meta {
        width: 100%;
    }


    .km-dashboard-date {
        font-size: 0.68rem;
    }


    .km-dashboard-welcome {
        flex-direction: column;

        align-items: flex-start;

        gap: 12px;
    }


    .km-dashboard-welcome-title {
        font-size: 1.2rem;
    }


    .km-dashboard-user-status {
        font-size: 0.69rem;
    }


    .km-dashboard-overview-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 10px;
    }


    .km-dashboard-navigation-card {
        min-height: 112px;

        padding: 14px 15px;
    }


    .km-dashboard-navigation-card-icon {
        width: 29px;
        height: 29px;

        flex-basis: 29px;

        margin-bottom: 8px;
    }


    .km-dashboard-navigation-card-title {
        font-size: 0.82rem;
    }


    .km-dashboard-paragraph {
        font-size: 0.71rem;
        line-height: 1.4;
    }

}


/* ==========================================================================
   SMALL MOBILE
   ========================================================================== */

@media (max-width: 480px) {

    .km-dashboard-overview-grid {
        grid-template-columns:
            1fr;
    }


    .km-dashboard-navigation-card {
        min-height: 102px;

        padding: 13px 14px;
    }


    .km-dashboard-navigation-card-icon {
        width: 28px;
        height: 28px;

        flex-basis: 28px;
    }


    .km-dashboard-navigation-card-title {
        font-size: 0.81rem;
    }


    .km-dashboard-paragraph {
        max-width: 280px;

        font-size: 0.7rem;
    }

}


/* ==========================================================================
   VERY SMALL MOBILE
   ========================================================================== */

@media (max-width: 360px) {

    .km-dashboard-title {
        font-size: 1.35rem;
    }


    .km-dashboard-overview-grid {
        gap: 8px;
    }


    .km-dashboard-navigation-card {
        min-height: 98px;

        padding: 12px 13px;
    }

}


/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {

    .km-dashboard-navigation-card,
    .km-dashboard-navigation-card-icon,
    .km-dashboard-navigation-card-arrow {
        transition: none;
    }

}
