/*
 * ============================================================================
 * Kasi Mattress Admin
 * ----------------------------------------------------------------------------
 * File: assets/css/admin.css
 * Purpose: Global Admin Shell + Shared Admin UI
 * Version: 2.0.0
 * ============================================================================
 *
 * RESPONSIBILITIES
 *
 *     This stylesheet controls the shared administrator interface:
 *
 *         - CSS variables
 *         - Global reset
 *         - Admin application shell
 *         - Topbar
 *         - Sidebar
 *         - Main content area
 *         - Page headers
 *         - Shared buttons
 *         - Shared cards
 *         - Shared tables
 *         - Shared badges/statuses
 *         - Shared alerts
 *         - Shared empty states
 *         - Shared form controls
 *         - Responsive behaviour
 *
 * MODULE-SPECIFIC STYLES DO NOT BELONG HERE.
 *
 * Examples:
 *
 *     administrators.css
 *     products.css
 *     customers.css
 *     quotes.css
 *     invoices.css
 *
 * IMPORTANT
 *
 *     PHP/HTML markup should use the class names defined here.
 *     Do not create competing versions of the same shared component.
 *
 * ============================================================================
 */


/* ==========================================================================
   DESIGN TOKENS
   ========================================================================== */

:root {

    --km-navy: #0F4C81;
    --km-navy-dark: #0A365B;

    --km-gold: #F4A300;

    --km-white: #FFFFFF;

    --km-page-bg: #F5F7FA;

    --km-sidebar-bg: #FFFFFF;
    --km-card-bg: #FFFFFF;

    --km-text: #1F2937;
    --km-heading: #172231;
    --km-muted: #6B7280;
    --km-light-text: #929CAA;

    --km-border: #E4E9EE;
    --km-border-light: #EEF1F4;

    --km-success: #31A46C;
    --km-success-bg: #ECFDF3;
    --km-success-text: #166534;

    --km-warning: #F59E0B;
    --km-warning-bg: #FFFBEB;
    --km-warning-text: #92400E;

    --km-danger: #DC2626;
    --km-danger-bg: #FEF2F2;
    --km-danger-text: #991B1B;

    --km-info-bg: #EAF2F8;

    --km-sidebar-width: 255px;
    --km-topbar-height: 72px;

    --km-radius: 12px;
    --km-radius-sm: 8px;
    --km-radius-xs: 6px;

    --km-shadow-sm:
        0 1px 2px rgba(15, 23, 42, 0.04);

    --km-shadow:
        0 8px 24px rgba(15, 23, 42, 0.05);

}


/* ==========================================================================
   RESET
   ========================================================================== */

*,
*::before,
*::after {

    box-sizing: border-box;

}


html {

    min-height: 100%;

}


body {

    min-height: 100vh;

    margin: 0;

    background: var(--km-page-bg);

    color: var(--km-text);

    font-family: "Inter", sans-serif;

    -webkit-font-smoothing: antialiased;

    text-rendering: optimizeLegibility;

}


button,
input,
textarea,
select {

    font: inherit;

}


button {

    cursor: pointer;

}


img {

    max-width: 100%;

    height: auto;

}


a {

    color: inherit;

}


.km-admin-app a {

    text-decoration: none;

}


.km-admin-app a:hover,
.km-admin-app a:focus,
.km-admin-app a:active {

    text-decoration: none;

}


/* ==========================================================================
   ADMIN APPLICATION
   ========================================================================== */

.km-admin-app {

    min-height: 100vh;

}


/* ==========================================================================
   TOPBAR
   ========================================================================== */

.km-admin-topbar {

    position: sticky;

    top: 0;

    z-index: 100;

    width: 100%;

    height: var(--km-topbar-height);

    display: flex;

    align-items: center;

    justify-content: space-between;

    padding: 0 28px;

    border-bottom: 1px solid var(--km-border);

    background: var(--km-white);

}


/* ==========================================================================
   TOPBAR LEFT
   ========================================================================== */

.km-topbar-left {

    display: flex;

    align-items: center;

    gap: 16px;

    min-width: 0;

}


/* ==========================================================================
   BRAND
   ========================================================================== */

.km-admin-brand {

    display: flex;

    align-items: center;

    gap: 11px;

    min-width: 0;

}


.km-admin-brand-mark {

    width: 38px;
    height: 38px;

    display: grid;

    place-items: center;

    flex: 0 0 38px;

    border-radius: 9px;

    background: var(--km-navy);

    color: var(--km-white);

    font-family: "Poppins", sans-serif;

    font-size: 12px;

    font-weight: 700;

    line-height: 1;

}


.km-admin-brand-text {

    min-width: 0;

}


.km-admin-brand-name {

    display: block;

    color: var(--km-navy);

    font-family: "Poppins", sans-serif;

    font-size: 15px;

    font-weight: 700;

    line-height: 1.2;

}


.km-admin-brand-label {

    display: block;

    margin-top: 2px;

    color: var(--km-muted);

    font-size: 10px;

    font-weight: 500;

    line-height: 1.2;

}


/* ==========================================================================
   TOPBAR RIGHT
   ========================================================================== */

.km-topbar-right {

    display: flex;

    align-items: center;

    gap: 24px;

    min-width: 0;

}


/* ==========================================================================
   PORTAL STATUS
   ========================================================================== */

.km-topbar-status {

    display: flex;

    align-items: center;

    gap: 7px;

    color: var(--km-muted);

    font-size: 11px;

    font-weight: 500;

    white-space: nowrap;

}


.km-status-dot {

    width: 7px;
    height: 7px;

    flex: 0 0 7px;

    border-radius: 50%;

    background: var(--km-success);

    box-shadow:
        0 0 0 3px rgba(49, 164, 108, 0.10);

}


/* ==========================================================================
   TOPBAR USER
   ========================================================================== */

.km-topbar-user {

    display: flex;

    align-items: center;

    gap: 10px;

    min-width: 0;

}


.km-user-avatar {

    width: 36px;
    height: 36px;

    display: grid;

    place-items: center;

    flex: 0 0 36px;

    border-radius: 50%;

    background: #EAF1F7;

    color: var(--km-navy);

    font-size: 12px;

    font-weight: 700;

}


.km-user-details {

    min-width: 0;

}


.km-user-details strong,
.km-user-details span {

    display: block;

    overflow: hidden;

    white-space: nowrap;

    text-overflow: ellipsis;

}


.km-user-details strong {

    color: var(--km-heading);

    font-size: 12px;

    font-weight: 600;

}


.km-user-details span {

    margin-top: 2px;

    color: var(--km-muted);

    font-size: 10px;

}


/* ==========================================================================
   LOGOUT
   ========================================================================== */

.km-topbar-logout {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    min-height: 34px;

    padding: 7px 10px;

    border: 0;

    border-radius: var(--km-radius-xs);

    background: transparent;

    color: var(--km-navy);

    font-size: 12px;

    font-weight: 600;

    line-height: 1;

    text-decoration: none;

    transition:
        background-color 150ms ease,
        color 150ms ease;

}


.km-topbar-logout:hover {

    background: #F2F6F9;

    color: var(--km-navy-dark);

    text-decoration: none;

}


.km-topbar-logout:focus-visible {

    outline: 3px solid rgba(15, 76, 129, 0.16);

    outline-offset: 2px;

}


/* ==========================================================================
   MOBILE MENU BUTTON
   ========================================================================== */

.km-mobile-menu-button {

    display: none;

    width: 38px;
    height: 38px;

    align-items: center;

    justify-content: center;

    flex-direction: column;

    gap: 4px;

    flex: 0 0 38px;

    padding: 0;

    border: 1px solid var(--km-border);

    border-radius: var(--km-radius-sm);

    background: var(--km-white);

    transition:
        background-color 150ms ease,
        border-color 150ms ease;

}


.km-mobile-menu-button:hover {

    background: #F8FAFC;

    border-color: #CBD5DF;

}


.km-mobile-menu-button span {

    width: 16px;
    height: 2px;

    border-radius: 2px;

    background: var(--km-navy);

}


/* ==========================================================================
   ADMIN BODY
   ========================================================================== */

.km-admin-body {

    display: flex;

    min-height:
        calc(100vh - var(--km-topbar-height));

}


/* ==========================================================================
   SIDEBAR
   ========================================================================== */

.km-admin-sidebar {

    position: sticky;

    top: var(--km-topbar-height);

    width: var(--km-sidebar-width);

    height:
        calc(100vh - var(--km-topbar-height));

    flex: 0 0 var(--km-sidebar-width);

    display: flex;

    flex-direction: column;

    justify-content: space-between;

    border-right: 1px solid var(--km-border);

    background: var(--km-sidebar-bg);

    overflow-y: auto;

    overflow-x: hidden;

}


/* ==========================================================================
   SIDEBAR NAVIGATION
   ========================================================================== */

.km-sidebar-navigation {

    padding: 24px 14px;

}


.km-sidebar-section {

    margin-bottom: 27px;

}


.km-sidebar-section:last-child {

    margin-bottom: 0;

}


.km-sidebar-section-title {

    display: block;

    margin: 0 12px 9px;

    color: #A0A8B3;

    font-size: 9px;

    font-weight: 700;

    line-height: 1.3;

    letter-spacing: 0.12em;

    text-transform: uppercase;

}


/* ==========================================================================
   SIDEBAR LINKS
   ========================================================================== */

.km-sidebar-link {

    width: 100%;

    min-height: 42px;

    display: flex;

    align-items: center;

    gap: 11px;

    margin: 2px 0;

    padding: 9px 11px;

    border: 0;

    border-radius: var(--km-radius-sm);

    background: transparent;

    color: #596575;

    font-size: 12px;

    font-weight: 500;

    line-height: 1.3;

    text-align: left;

    text-decoration: none;

    transition:
        background-color 150ms ease,
        color 150ms ease;

}


.km-sidebar-link:hover {

    background: #F2F6F9;

    color: var(--km-navy);

    text-decoration: none;

}


.km-sidebar-link:focus-visible {

    outline: 3px solid rgba(15, 76, 129, 0.12);

    outline-offset: 1px;

}


.km-sidebar-link-active {

    background: #EAF2F8;

    color: var(--km-navy);

    font-weight: 600;

}


/* ==========================================================================
   SIDEBAR ICONS
   ========================================================================== */

.km-sidebar-icon {

    width: 19px;
    height: 19px;

    display: grid;

    place-items: center;

    flex: 0 0 19px;

}


.km-sidebar-icon svg {

    width: 17px;
    height: 17px;

    fill: none;

    stroke: currentColor;

    stroke-width: 1.7;

    stroke-linecap: round;

    stroke-linejoin: round;

}


/* ==========================================================================
   SIDEBAR USER
   ========================================================================== */

.km-sidebar-user {

    display: flex;

    align-items: center;

    gap: 10px;

    padding: 17px;

    border-top: 1px solid var(--km-border);

    background: var(--km-white);

}


.km-sidebar-user-avatar {

    width: 34px;
    height: 34px;

    display: grid;

    place-items: center;

    flex: 0 0 34px;

    border-radius: 50%;

    background: #EAF1F7;

    color: var(--km-navy);

    font-size: 11px;

    font-weight: 700;

}


.km-sidebar-user-info {

    min-width: 0;

    flex: 1;

}


.km-sidebar-user-info strong,
.km-sidebar-user-info span {

    display: block;

    overflow: hidden;

    white-space: nowrap;

    text-overflow: ellipsis;

}


.km-sidebar-user-info strong {

    color: var(--km-heading);

    font-size: 11px;

    font-weight: 600;

}


.km-sidebar-user-info span {

    margin-top: 2px;

    color: var(--km-muted);

    font-size: 9px;

}


.km-sidebar-user-status {

    width: 7px;
    height: 7px;

    flex: 0 0 7px;

    border-radius: 50%;

    background: var(--km-success);

}


/* ==========================================================================
   MAIN CONTENT
   ========================================================================== */

.km-admin-main {

    min-width: 0;

    flex: 1;

    padding: 34px;

}


/* ==========================================================================
   PAGE HEADER
   ========================================================================== */

.km-page-header {

    display: flex;

    align-items: flex-end;

    justify-content: space-between;

    gap: 30px;

    margin-bottom: 30px;

}


.km-page-header-content {

    min-width: 0;

}


.km-page-eyebrow {

    display: block;

    margin-bottom: 7px;

    color: var(--km-gold);

    font-size: 10px;

    font-weight: 700;

    line-height: 1.3;

    letter-spacing: 0.12em;

    text-transform: uppercase;

}


.km-page-header h1 {

    margin: 0;

    color: var(--km-heading);

    font-family: "Poppins", sans-serif;

    font-size: 29px;

    font-weight: 600;

    line-height: 1.2;

    letter-spacing: -0.02em;

}


.km-page-header p {

    max-width: 720px;

    margin: 8px 0 0;

    color: var(--km-muted);

    font-size: 13px;

    line-height: 1.6;

}


.km-page-header-action {

    flex: 0 0 auto;

}


/* ==========================================================================
   SHARED BUTTONS
   ========================================================================== */

.km-button {

    min-height: 40px;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 7px;

    padding: 0 16px;

    border: 1px solid transparent;

    border-radius: 7px;

    font-size: 11px;

    font-weight: 600;

    line-height: 1;

    text-decoration: none;

    white-space: nowrap;

    transition:
        background-color 150ms ease,
        border-color 150ms ease,
        color 150ms ease,
        box-shadow 150ms ease;

}


.km-button:hover,
.km-button:focus,
.km-button:active {

    text-decoration: none;

}


.km-button:focus-visible {

    outline: 3px solid rgba(15, 76, 129, 0.14);

    outline-offset: 2px;

}


.km-button-primary {

    border-color: var(--km-navy);

    background: var(--km-navy);

    color: var(--km-white);

}


.km-button-primary:hover {

    border-color: var(--km-navy-dark);

    background: var(--km-navy-dark);

    color: var(--km-white);

}


.km-button-secondary {

    border-color: var(--km-border);

    background: var(--km-white);

    color: var(--km-heading);

}


.km-button-secondary:hover {

    border-color: #CBD5DF;

    background: #F8FAFC;

}


.km-button-danger {

    border-color: var(--km-danger);

    background: var(--km-danger);

    color: var(--km-white);

}


.km-button-danger:hover {

    border-color: #B91C1C;

    background: #B91C1C;

    color: var(--km-white);

}


.km-button-ghost {

    border-color: transparent;

    background: transparent;

    color: var(--km-navy);

}


.km-button-ghost:hover {

    background: #F2F6F9;

    color: var(--km-navy-dark);

}


/* ==========================================================================
   SHARED ADMIN BUTTON ALIAS
   ========================================================================== */

.km-admin-button {

    min-height: 40px;

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 7px;

    padding: 0 16px;

    border: 1px solid var(--km-navy);

    border-radius: 7px;

    background: var(--km-navy);

    color: var(--km-white);

    font-size: 11px;

    font-weight: 600;

    line-height: 1;

    text-decoration: none;

    white-space: nowrap;

    transition:
        background-color 150ms ease,
        border-color 150ms ease;

}


.km-admin-button:hover {

    border-color: var(--km-navy-dark);

    background: var(--km-navy-dark);

    color: var(--km-white);

    text-decoration: none;

}


.km-admin-button:focus-visible {

    outline: 3px solid rgba(15, 76, 129, 0.14);

    outline-offset: 2px;

}


/* ==========================================================================
   SHARED CARDS
   ========================================================================== */

.km-admin-card {

    min-width: 0;

    border: 1px solid var(--km-border);

    border-radius: var(--km-radius);

    background: var(--km-card-bg);

    box-shadow: var(--km-shadow-sm);

}


.km-admin-card-header {

    display: flex;

    align-items: flex-start;

    justify-content: space-between;

    gap: 20px;

    padding: 20px;

    border-bottom: 1px solid var(--km-border);

}


.km-admin-card-header h2 {

    margin: 0;

    color: var(--km-heading);

    font-family: "Poppins", sans-serif;

    font-size: 15px;

    font-weight: 600;

    line-height: 1.4;

}


.km-admin-card-header p {

    margin: 5px 0 0;

    color: var(--km-muted);

    font-size: 11px;

    line-height: 1.5;

}


.km-admin-card-body {

    padding: 20px;

}


/* ==========================================================================
   SHARED TABLES
   ========================================================================== */

.km-admin-table-wrap {

    width: 100%;

    overflow-x: auto;

    -webkit-overflow-scrolling: touch;

}


.km-admin-table {

    width: 100%;

    min-width: 720px;

    border-collapse: collapse;

    border-spacing: 0;

}


.km-admin-table th {

    padding: 12px 16px;

    border-bottom: 1px solid var(--km-border);

    background: #FAFBFC;

    color: var(--km-muted);

    font-size: 10px;

    font-weight: 700;

    line-height: 1.4;

    text-align: left;

    text-transform: uppercase;

    letter-spacing: 0.05em;

    white-space: nowrap;

}


.km-admin-table td {

    padding: 16px;

    border-bottom: 1px solid var(--km-border-light);

    color: var(--km-text);

    font-size: 12px;

    line-height: 1.5;

    vertical-align: middle;

}


.km-admin-table tbody tr {

    transition:
        background-color 150ms ease;

}


.km-admin-table tbody tr:hover {

    background: #FAFCFE;

}


.km-admin-table tbody tr:last-child td {

    border-bottom: 0;

}


.km-table-secondary {

    display: block;

    margin-top: 3px;

    color: var(--km-muted);

    font-size: 10px;

    line-height: 1.4;

    overflow-wrap: anywhere;

}


.km-table-actions {

    display: flex;

    align-items: center;

    justify-content: flex-start;

    gap: 8px;

    white-space: nowrap;

}


.km-table-actions a {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    min-height: 30px;

    padding: 5px 9px;

    border: 1px solid var(--km-border);

    border-radius: 6px;

    background: var(--km-white);

    color: var(--km-navy);

    font-size: 10px;

    font-weight: 600;

    line-height: 1;

    text-decoration: none;

    transition:
        background-color 150ms ease,
        border-color 150ms ease,
        color 150ms ease;

}


.km-table-actions a:hover {

    border-color: #CBD5DF;

    background: #F2F6F9;

    color: var(--km-navy-dark);

    text-decoration: none;

}


.km-table-actions a:focus-visible {

    outline: 3px solid rgba(15, 76, 129, 0.12);

    outline-offset: 1px;

}


/* ==========================================================================
   STATUS BADGES
   ========================================================================== */

.km-status {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    min-height: 26px;

    padding: 4px 9px;

    border-radius: 999px;

    font-size: 10px;

    font-weight: 700;

    line-height: 1.2;

    white-space: nowrap;

}


.km-status-active {

    background: var(--km-success-bg);

    color: var(--km-success-text);

}


.km-status-inactive {

    background: #F3F4F6;

    color: #4B5563;

}


.km-status-suspended {

    background: var(--km-danger-bg);

    color: var(--km-danger-text);

}


/* ==========================================================================
   SHARED ALERTS
   ========================================================================== */

.km-alert {

    display: flex;

    flex-direction: column;

    gap: 4px;

    margin-bottom: 20px;

    padding: 14px 16px;

    border: 1px solid transparent;

    border-radius: var(--km-radius-sm);

    font-size: 13px;

    line-height: 1.55;

}


.km-alert strong {

    font-weight: 700;

}


.km-alert-success {

    border-color: #BBF7D0;

    background: var(--km-success-bg);

    color: var(--km-success-text);

}


.km-alert-error {

    border-color: #FECACA;

    background: var(--km-danger-bg);

    color: var(--km-danger-text);

}


.km-alert-warning {

    border-color: #FDE68A;

    background: var(--km-warning-bg);

    color: var(--km-warning-text);

}


.km-alert-info {

    border-color: #BFDBFE;

    background: #EFF6FF;

    color: #1E40AF;

}


/* ==========================================================================
   SHARED EMPTY STATE
   ========================================================================== */

.km-admin-empty {

    min-height: 220px;

    display: flex;

    align-items: center;

    justify-content: center;

    flex-direction: column;

    gap: 8px;

    padding: 40px 24px;

    text-align: center;

}


.km-admin-empty h3 {

    margin: 0;

    color: var(--km-heading);

    font-family: "Poppins", sans-serif;

    font-size: 17px;

    font-weight: 600;

    line-height: 1.4;

}


.km-admin-empty p {

    max-width: 520px;

    margin: 0;

    color: var(--km-muted);

    font-size: 12px;

    line-height: 1.6;

}


/* ==========================================================================
   SHARED FORMS
   ========================================================================== */

.km-form {

    width: 100%;

}


.km-form-grid {

    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 20px;

}


.km-form-field {

    min-width: 0;

}


.km-form-field-full {

    grid-column: 1 / -1;

}


.km-form-field label {

    display: block;

    margin-bottom: 7px;

    color: var(--km-heading);

    font-size: 12px;

    font-weight: 600;

    line-height: 1.4;

}


.km-form-field input,
.km-form-field select,
.km-form-field textarea {

    display: block;

    width: 100%;

    min-height: 42px;

    padding: 9px 12px;

    border: 1px solid #D1D5DB;

    border-radius: var(--km-radius-sm);

    background: var(--km-white);

    color: var(--km-text);

    font: inherit;

    font-size: 13px;

    line-height: 1.4;

    outline: none;

    transition:
        border-color 150ms ease,
        box-shadow 150ms ease,
        background-color 150ms ease;

}


.km-form-field textarea {

    min-height: 120px;

    resize: vertical;

}


.km-form-field input::placeholder,
.km-form-field textarea::placeholder {

    color: #9CA3AF;

}


.km-form-field input:hover,
.km-form-field select:hover,
.km-form-field textarea:hover {

    border-color: #B8BEC7;

}


.km-form-field input:focus,
.km-form-field select:focus,
.km-form-field textarea:focus {

    border-color: var(--km-navy);

    box-shadow:
        0 0 0 3px rgba(15, 76, 129, 0.10);

}


.km-form-field input:disabled,
.km-form-field select:disabled,
.km-form-field textarea:disabled {

    background: #F3F4F6;

    color: #6B7280;

    cursor: not-allowed;

}


.km-form-help {

    display: block;

    margin-top: 6px;

    color: var(--km-muted);

    font-size: 11px;

    line-height: 1.5;

}


.km-form-error {

    display: block;

    margin-top: 6px;

    color: var(--km-danger-text);

    font-size: 11px;

    line-height: 1.5;

}


/* ==========================================================================
   FORM ACTIONS
   ========================================================================== */

.km-form-actions {

    display: flex;

    align-items: center;

    justify-content: flex-end;

    gap: 10px;

    margin-top: 24px;

    padding-top: 20px;

    border-top: 1px solid var(--km-border);

}


/* ==========================================================================
   DASHBOARD STATISTICS
   ========================================================================== */

.km-stat-grid {

    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 16px;

    margin-bottom: 20px;

}


.km-stat-card {

    min-width: 0;

    padding: 20px;

    border: 1px solid var(--km-border);

    border-radius: var(--km-radius);

    background: var(--km-card-bg);

    box-shadow: var(--km-shadow-sm);

}


.km-stat-card-top {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 10px;

}


.km-stat-label {

    color: var(--km-muted);

    font-size: 11px;

    font-weight: 500;

}


.km-stat-icon {

    width: 30px;

    height: 30px;

    display: grid;

    place-items: center;

    border-radius: 7px;

    background: #EDF3F8;

    color: var(--km-navy);

    font-size: 10px;

    font-weight: 700;

}


.km-stat-value {

    display: block;

    margin-top: 14px;

    color: var(--km-heading);

    font-family: "Poppins", sans-serif;

    font-size: 25px;

    font-weight: 600;

    line-height: 1.2;

}


.km-stat-meta {

    display: block;

    margin-top: 5px;

    color: var(--km-light-text);

    font-size: 9px;

}


/* ==========================================================================
   DASHBOARD GRID
   ========================================================================== */

.km-dashboard-grid {

    display: grid;

    grid-template-columns:
        minmax(0, 1.45fr)
        minmax(280px, 0.75fr);

    gap: 20px;

}


.km-dashboard-card {

    min-width: 0;

    border: 1px solid var(--km-border);

    border-radius: var(--km-radius);

    background: var(--km-card-bg);

    box-shadow: var(--km-shadow-sm);

}


/* ==========================================================================
   DASHBOARD CARD HEADER
   ========================================================================== */

.km-card-header {

    display: flex;

    align-items: flex-start;

    justify-content: space-between;

    gap: 20px;

    padding: 20px;

    border-bottom: 1px solid var(--km-border);

}


.km-card-eyebrow {

    display: block;

    margin-bottom: 5px;

    color: var(--km-gold);

    font-size: 9px;

    font-weight: 700;

    letter-spacing: 0.10em;

    text-transform: uppercase;

}


.km-card-header h2 {

    margin: 0;

    color: var(--km-heading);

    font-family: "Poppins", sans-serif;

    font-size: 15px;

    font-weight: 600;

}


.km-card-action {

    padding: 4px 7px;

    border: 0;

    border-radius: 5px;

    background: transparent;

    color: var(--km-navy);

    font-size: 10px;

    font-weight: 600;

    text-decoration: none;

}


.km-card-action:hover {

    background: #F2F6F9;

    color: var(--km-navy-dark);

    text-decoration: none;

}


/* ==========================================================================
   ACTIVITY
   ========================================================================== */

.km-activity-list {

    padding: 4px 20px;

}


.km-activity-item {

    display: flex;

    align-items: center;

    gap: 12px;

    padding: 15px 0;

    border-bottom: 1px solid var(--km-border-light);

}


.km-activity-item:last-child {

    border-bottom: 0;

}


.km-activity-icon {

    width: 32px;

    height: 32px;

    display: grid;

    place-items: center;

    flex: 0 0 32px;

    border-radius: 8px;

    background: #EDF3F8;

    color: var(--km-navy);

    font-size: 10px;

    font-weight: 700;

}


.km-activity-content {

    min-width: 0;

    flex: 1;

}


.km-activity-content strong {

    display: block;

    color: var(--km-heading);

    font-size: 11px;

    font-weight: 600;

}


.km-activity-content span {

    display: block;

    margin-top: 3px;

    overflow: hidden;

    color: var(--km-muted);

    font-size: 10px;

    white-space: nowrap;

    text-overflow: ellipsis;

}


.km-activity-item time {

    flex: 0 0 auto;

    color: var(--km-light-text);

    font-size: 9px;

}


/* ==========================================================================
   QUICK ACTIONS
   ========================================================================== */

.km-quick-actions {

    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 10px;

    padding: 20px;

}


.km-quick-action {

    min-height: 90px;

    display: flex;

    align-items: flex-start;

    justify-content: center;

    flex-direction: column;

    gap: 9px;

    padding: 14px;

    border: 1px solid var(--km-border);

    border-radius: 9px;

    background: var(--km-white);

    color: var(--km-heading);

    font-size: 10px;

    font-weight: 600;

    text-align: left;

    text-decoration: none;

    transition:
        border-color 150ms ease,
        background-color 150ms ease;

}


.km-quick-action:hover {

    border-color: #B9C9D6;

    background: #F8FAFC;

    color: var(--km-heading);

    text-decoration: none;

}


.km-quick-action-icon {

    width: 25px;

    height: 25px;

    display: grid;

    place-items: center;

    border-radius: 6px;

    background: #EAF2F8;

    color: var(--km-navy);

    font-size: 16px;

    font-weight: 500;

}


/* ==========================================================================
   MODULE PAGE SUPPORT
   ========================================================================== */

.km-module-page {

    width: 100%;

}


.km-module-header {

    display: flex;

    align-items: flex-end;

    justify-content: space-between;

    gap: 30px;

    margin-bottom: 30px;

}


.km-module-header h1 {

    margin: 0;

    color: var(--km-heading);

    font-family: "Poppins", sans-serif;

    font-size: 29px;

    font-weight: 600;

    line-height: 1.2;

    letter-spacing: -0.02em;

}


.km-module-header p {

    max-width: 680px;

    margin: 8px 0 0;

    color: var(--km-muted);

    font-size: 13px;

    line-height: 1.65;

}


.km-module-placeholder {

    min-height: 220px;

    display: flex;

    align-items: center;

    justify-content: center;

    flex-direction: column;

    gap: 9px;

    padding: 40px;

    border: 1px dashed #CBD5DF;

    border-radius: var(--km-radius);

    background: rgba(255, 255, 255, 0.65);

    text-align: center;

}


.km-module-placeholder strong {

    color: var(--km-heading);

    font-family: "Poppins", sans-serif;

    font-size: 16px;

    font-weight: 600;

}


.km-module-placeholder span {

    max-width: 520px;

    color: var(--km-muted);

    font-size: 11px;

    line-height: 1.6;

}


/* ==========================================================================
   FOOTER
   ========================================================================== */

.km-admin-footer {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

    padding: 25px 2px 4px;

    color: #9AA4B2;

    font-size: 9px;

}


/* ==========================================================================
   TABLET
   ========================================================================== */

@media (max-width: 1150px) {

    .km-stat-grid {

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

    }


    .km-dashboard-grid {

        grid-template-columns: 1fr;

    }

}


/* ==========================================================================
   MOBILE
   ========================================================================== */

@media (max-width: 800px) {

    :root {

        --km-topbar-height: 64px;

    }


    .km-admin-topbar {

        padding: 0 18px;

    }


    .km-mobile-menu-button {

        display: flex;

    }


    .km-topbar-status,
    .km-user-details {

        display: none;

    }


    .km-topbar-right {

        gap: 8px;

    }


    .km-topbar-logout {

        display: none;

    }


    .km-admin-sidebar {

        position: fixed;

        top: var(--km-topbar-height);

        left: 0;

        z-index: 90;

        width: var(--km-sidebar-width);

        height:
            calc(100vh - var(--km-topbar-height));

        transform: translateX(-100%);

        box-shadow:
            10px 0 30px rgba(15, 76, 129, 0.10);

        transition:
            transform 180ms ease;

    }


    .km-admin-sidebar.km-sidebar-open {

        transform: translateX(0);

    }


    .km-admin-main {

        width: 100%;

        padding: 25px 18px;

    }


    .km-page-header {

        align-items: flex-start;

        flex-direction: column;

        gap: 18px;

    }


    .km-page-header-action {

        width: 100%;

    }


    .km-page-header-action .km-button,
    .km-page-header-action .km-admin-button {

        width: 100%;

    }


    .km-form-grid {

        grid-template-columns: 1fr;

    }


    .km-form-field-full {

        grid-column: auto;

    }


    .km-form-actions {

        flex-direction: column-reverse;

        align-items: stretch;

    }


    .km-form-actions .km-button,
    .km-form-actions .km-admin-button {

        width: 100%;

    }

}


/* ==========================================================================
   SMALL MOBILE
   ========================================================================== */

@media (max-width: 520px) {

    .km-stat-grid {

        grid-template-columns: 1fr;

    }


    .km-quick-actions {

        grid-template-columns: 1fr;

    }


    .km-admin-brand-label {

        display: none;

    }


    .km-admin-footer {

        align-items: flex-start;

        flex-direction: column;

        gap: 5px;

    }


    .km-admin-main {

        padding: 22px 15px;

    }


    .km-page-header h1 {

        font-size: 25px;

    }


    .km-admin-card-header {

        padding: 17px;

    }


    .km-admin-card-body {

        padding: 17px;

    }

}


/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {

        scroll-behavior: auto !important;

        transition-duration: 0.01ms !important;

        animation-duration: 0.01ms !important;

        animation-iteration-count: 1 !important;

    }

}
