/* Reusable module landing system for ERP-CV.BJAS.
   Scope: internal module landing pages only. POS /kasir stays fullscreen via body.pos-shell. */

body.internal-module-root-shell:not(.pos-shell) .page-content,
body.internal-module-root-shell:not(.pos-shell) .hris-clean-shell,
body.internal-module-root-shell:not(.pos-shell) .information-clean-shell {
    min-width: 0 !important;
    max-width: 100% !important;
}

body.internal-module-root-shell:not(.pos-shell) .module-shell {
    display: grid !important;
    grid-template-columns: 280px minmax(0, 1fr) !important;
    gap: 18px !important;
    min-width: 0 !important;
    max-width: 100% !important;
    align-items: stretch !important;
    padding: 18px 18px 24px 48px !important;
}

body.internal-module-root-shell:not(.pos-shell) .module-sidebar {
    min-width: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    align-self: stretch !important;
    background: #ffffff !important;
    border: 1px solid #dbe3ef !important;
    border-radius: 0 0 16px 0 !important;
    overflow: hidden !important;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.04) !important;
}

body.internal-module-root-shell:not(.pos-shell) .module-sidebar-card {
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: inherit !important;
    background: transparent !important;
    box-shadow: none !important;
}

body.internal-module-root-shell:not(.pos-shell) .module-sidebar-head {
    padding: 18px 20px 14px !important;
    border-bottom: 1px solid #e2e8f0 !important;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%) !important;
}

body.internal-module-root-shell:not(.pos-shell) .module-sidebar-kicker {
    display: block !important;
    color: #b7791f !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    letter-spacing: .16em !important;
    line-height: 1 !important;
    text-transform: uppercase !important;
}

body.internal-module-root-shell:not(.pos-shell) .module-sidebar-title {
    display: block !important;
    margin-top: 6px !important;
    color: #0f172a !important;
    font-size: 20px !important;
    font-weight: 950 !important;
    line-height: 1.1 !important;
}

body.internal-module-root-shell:not(.pos-shell) .module-sidebar-nav {
    display: grid !important;
    gap: 4px !important;
    padding: 12px 10px !important;
}

body.internal-module-root-shell:not(.pos-shell) .module-sidebar-link {
    min-height: 46px !important;
    padding: 9px 12px !important;
    border: 0 !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    background: transparent !important;
    color: #0f172a !important;
    text-decoration: none !important;
    font-size: 13.5px !important;
    font-weight: 850 !important;
    box-shadow: none !important;
}

body.internal-module-root-shell:not(.pos-shell) .module-sidebar-link:hover,
body.internal-module-root-shell:not(.pos-shell) .module-sidebar-link:focus-visible {
    background: #f8fafc !important;
    color: #0f2747 !important;
}

body.internal-module-root-shell:not(.pos-shell) .module-sidebar-link.is-active,
body.internal-module-root-shell:not(.pos-shell) .module-sidebar-link.active,
body.internal-module-root-shell:not(.pos-shell) .module-sidebar-link[aria-current="page"] {
    background: #eef4ff !important;
    color: #0f2747 !important;
    box-shadow: inset 3px 0 0 #0f2747 !important;
}

body.internal-module-root-shell:not(.pos-shell) .module-sidebar-icon {
    width: 26px !important;
    height: 26px !important;
    flex: 0 0 26px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

body.internal-module-root-shell:not(.pos-shell) .module-sidebar-icon img {
    width: 26px !important;
    height: 26px !important;
    object-fit: contain !important;
}

body.internal-module-root-shell:not(.pos-shell) .module-sidebar-link h2 {
    margin: 0 !important;
    color: inherit !important;
    font-size: 13.5px !important;
    font-weight: 850 !important;
    line-height: 1.1 !important;
}

body.internal-module-root-shell:not(.pos-shell) .module-sidebar-link small {
    display: none !important;
}

body.internal-module-root-shell:not(.pos-shell) .module-main {
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 0 !important;
}

body.internal-module-root-shell:not(.pos-shell) .module-landing-card {
    min-height: 520px !important;
    padding: 22px 24px !important;
    border: 1px solid #dbe3ef !important;
    border-radius: 18px !important;
    background: #ffffff !important;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.04) !important;
    overflow: visible !important;
}

body.internal-module-root-shell:not(.pos-shell) .module-hero {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 520px) !important;
    align-items: start !important;
    gap: 24px !important;
    max-width: none !important;
    padding: 0 0 18px !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

body.internal-module-root-shell:not(.pos-shell) .module-eyebrow {
    display: block !important;
    margin: 0 !important;
    color: #b7791f !important;
    font-size: 12px !important;
    font-weight: 900 !important;
    letter-spacing: .14em !important;
    line-height: 1 !important;
    text-transform: uppercase !important;
}

body.internal-module-root-shell:not(.pos-shell) .module-title {
    margin: 8px 0 0 !important;
    color: #0f172a !important;
    font-size: clamp(36px, 4vw, 48px) !important;
    font-weight: 950 !important;
    line-height: 1.04 !important;
    letter-spacing: -0.045em !important;
}

body.internal-module-root-shell:not(.pos-shell) .module-description {
    display: block !important;
    margin: 0 !important;
    max-width: 520px !important;
    justify-self: end !important;
    color: #475569 !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    line-height: 1.45 !important;
    text-align: right !important;
}

body.internal-module-root-shell:not(.pos-shell) .module-shortcut-grid,
body.internal-module-root-shell:not(.pos-shell) .wms-dashboard-quick-grid {
    margin-top: 24px !important;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 14px !important;
    max-width: 100% !important;
    align-items: stretch !important;
}

body.internal-module-root-shell:not(.pos-shell) .wms-dashboard-quick,
body.internal-module-root-shell:not(.pos-shell) .wms-dashboard-quick-grid {
    width: 100% !important;
}

body.internal-module-root-shell:not(.pos-shell) .module-shortcut-card,
body.internal-module-root-shell:not(.pos-shell) .wms-dashboard-quick-card {
    min-width: 0 !important;
    min-height: 148px !important;
    height: auto !important;
    padding: 16px !important;
    border: 1px solid #dbe3ef !important;
    border-radius: 14px !important;
    background: #ffffff !important;
    color: #0f172a !important;
    text-decoration: none !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    box-shadow: none !important;
    overflow: hidden !important;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease !important;
}

body.internal-module-root-shell:not(.pos-shell) .module-shortcut-card:hover,
body.internal-module-root-shell:not(.pos-shell) .module-shortcut-card:focus-visible,
body.internal-module-root-shell:not(.pos-shell) .wms-dashboard-quick-card:hover,
body.internal-module-root-shell:not(.pos-shell) .wms-dashboard-quick-card:focus-visible {
    border-color: #b8c7dc !important;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08) !important;
    transform: translateY(-1px) !important;
}

body.internal-module-root-shell:not(.pos-shell) .module-shortcut-top {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    min-width: 0 !important;
}

body.internal-module-root-shell:not(.pos-shell) .module-shortcut-icon,
body.internal-module-root-shell:not(.pos-shell) .wms-dashboard-quick-icon {
    width: 44px !important;
    height: 44px !important;
    flex: 0 0 44px !important;
    border: 1px solid #dbeafe !important;
    border-radius: 12px !important;
    background: #eff6ff !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

body.internal-module-root-shell:not(.pos-shell) .module-shortcut-icon img,
body.internal-module-root-shell:not(.pos-shell) .wms-dashboard-quick-icon img {
    width: 26px !important;
    height: 26px !important;
    object-fit: contain !important;
}

body.internal-module-root-shell:not(.pos-shell) .module-shortcut-badge {
    max-width: 120px !important;
    height: 26px !important;
    padding: 0 10px !important;
    border: 1px solid #dbe3ef !important;
    border-radius: 999px !important;
    background: #f8fafc !important;
    color: #475569 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 11px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

body.internal-module-root-shell:not(.pos-shell) .module-shortcut-body,
body.internal-module-root-shell:not(.pos-shell) .module-shortcut-copy {
    min-width: 0 !important;
    flex: 1 1 auto !important;
}

body.internal-module-root-shell:not(.pos-shell) .module-shortcut-title,
body.internal-module-root-shell:not(.pos-shell) .wms-dashboard-quick-card strong {
    display: block !important;
    margin: 0 !important;
    color: #0f172a !important;
    font-size: 16px !important;
    font-weight: 900 !important;
    line-height: 1.2 !important;
    letter-spacing: -0.025em !important;
}

body.internal-module-root-shell:not(.pos-shell) .module-shortcut-desc,
body.internal-module-root-shell:not(.pos-shell) .wms-dashboard-quick-card small {
    display: -webkit-box !important;
    margin: 6px 0 0 !important;
    max-width: 100% !important;
    color: #64748b !important;
    font-size: 12.75px !important;
    font-weight: 500 !important;
    line-height: 1.4 !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

body.internal-module-root-shell:not(.pos-shell) .module-shortcut-footer {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    margin-top: auto !important;
}

body.internal-module-root-shell:not(.pos-shell) .module-shortcut-action {
    min-height: 28px !important;
    padding: 0 10px !important;
    border: 1px solid #fed7aa !important;
    border-radius: 999px !important;
    background: #fff7ed !important;
    color: #c2410c !important;
    display: inline-flex !important;
    align-items: center !important;
    font-size: 12px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
}

body.internal-module-root-shell:not(.pos-shell) .module-shortcut-arrow,
body.internal-module-root-shell:not(.pos-shell) .wms-dashboard-quick-arrow {
    position: static !important;
    margin-left: auto !important;
    color: #64748b !important;
    font-size: 22px !important;
    font-weight: 900 !important;
    line-height: 1 !important;
}

body.internal-module-root-shell:not(.pos-shell) .wms-dashboard-quick-arrow {
    align-self: flex-end !important;
    margin-top: auto !important;
}

body.internal-module-root-shell:not(.pos-shell) .content-card.is-featured,
body.internal-module-root-shell:not(.pos-shell) .internal-hub-card.is-featured {
    grid-column: auto !important;
}

body.internal-module-root-shell:not(.pos-shell) .information-policy-badge:not(.module-shortcut-badge),
body.internal-module-root-shell:not(.pos-shell) .wms-dashboard-quick-badge {
    display: none !important;
}

body.pos-shell .module-shell,
body.pos-shell .module-sidebar,
body.pos-shell .module-landing-card {
    display: none !important;
}

@media (min-width: 769px) and (max-width: 1200px) {
    body.internal-module-root-shell:not(.pos-shell) .module-shell {
        grid-template-columns: 240px minmax(0, 1fr) !important;
        gap: 14px !important;
        padding: 16px 14px 22px !important;
    }

    body.internal-module-root-shell:not(.pos-shell) .module-title {
        font-size: 36px !important;
    }

    body.internal-module-root-shell:not(.pos-shell) .module-shortcut-grid,
    body.internal-module-root-shell:not(.pos-shell) .wms-dashboard-quick-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 900px) {
    body.internal-module-root-shell:not(.pos-shell) .module-hero {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    body.internal-module-root-shell:not(.pos-shell) .module-description {
        max-width: 100% !important;
        justify-self: stretch !important;
        text-align: left !important;
    }
}

@media (max-width: 768px) {
    body.internal-module-root-shell:not(.pos-shell) .module-shell {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 12px !important;
        padding: 12px 0 18px !important;
    }

    body.internal-module-root-shell:not(.pos-shell) .module-sidebar {
        margin: 0 12px !important;
        border-radius: 14px !important;
    }

    body.internal-module-root-shell:not(.pos-shell) .module-sidebar-nav {
        max-height: 280px !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    body.internal-module-root-shell:not(.pos-shell) .module-sidebar-link {
        min-height: 42px !important;
        padding: 8px 10px !important;
        gap: 10px !important;
    }

    body.internal-module-root-shell:not(.pos-shell) .module-main {
        margin: 0 12px !important;
    }

    body.internal-module-root-shell:not(.pos-shell) .module-landing-card {
        min-height: auto !important;
        padding: 18px 16px !important;
        border-radius: 16px !important;
    }

    body.internal-module-root-shell:not(.pos-shell) .module-hero {
        padding-bottom: 14px !important;
    }

    body.internal-module-root-shell:not(.pos-shell) .module-title {
        margin-top: 10px !important;
        font-size: 32px !important;
        letter-spacing: -0.035em !important;
    }

    body.internal-module-root-shell:not(.pos-shell) .module-description {
        font-size: 13.5px !important;
    }

    body.internal-module-root-shell:not(.pos-shell) .module-shortcut-grid,
    body.internal-module-root-shell:not(.pos-shell) .wms-dashboard-quick-grid {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
        margin-top: 16px !important;
    }

    body.internal-module-root-shell:not(.pos-shell) .module-shortcut-card,
    body.internal-module-root-shell:not(.pos-shell) .wms-dashboard-quick-card {
        min-height: 132px !important;
        padding: 14px !important;
        gap: 10px !important;
    }

    body.internal-module-root-shell:not(.pos-shell) .module-shortcut-icon,
    body.internal-module-root-shell:not(.pos-shell) .wms-dashboard-quick-icon {
        width: 42px !important;
        height: 42px !important;
        flex-basis: 42px !important;
    }

    body.internal-module-root-shell:not(.pos-shell) .module-shortcut-title,
    body.internal-module-root-shell:not(.pos-shell) .wms-dashboard-quick-card strong {
        font-size: 16px !important;
    }

    body.internal-module-root-shell:not(.pos-shell) .module-shortcut-desc,
    body.internal-module-root-shell:not(.pos-shell) .wms-dashboard-quick-card small {
        font-size: 12.5px !important;
    }
}

/* Final specificity guard:
   legacy internal module CSS also targets .information-policy-card/.content-card
   with !important grid rules. This scoped guard makes module landing shortcuts
   keep the safe top/body/footer flex layout without touching sidebar or POS. */
html[data-theme] body.internal-module-shell.internal-module-root-shell:not(.pos-shell) .module-shortcut-grid > .module-shortcut-card,
body.internal-module-shell.internal-module-root-shell:not(.pos-shell) .module-shortcut-grid > .module-shortcut-card {
    min-height: 148px !important;
    height: auto !important;
    padding: 16px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    overflow: hidden !important;
}

html[data-theme] body.internal-module-shell.internal-module-root-shell:not(.pos-shell) .module-shortcut-card > .module-shortcut-top,
body.internal-module-shell.internal-module-root-shell:not(.pos-shell) .module-shortcut-card > .module-shortcut-top {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    min-width: 0 !important;
    width: 100% !important;
}

html[data-theme] body.internal-module-shell.internal-module-root-shell:not(.pos-shell) .module-shortcut-card > .module-shortcut-body,
body.internal-module-shell.internal-module-root-shell:not(.pos-shell) .module-shortcut-card > .module-shortcut-body {
    display: block !important;
    min-width: 0 !important;
    width: 100% !important;
    flex: 1 1 auto !important;
}

html[data-theme] body.internal-module-shell.internal-module-root-shell:not(.pos-shell) .module-shortcut-card > .module-shortcut-footer,
body.internal-module-shell.internal-module-root-shell:not(.pos-shell) .module-shortcut-card > .module-shortcut-footer {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 8px !important;
    width: 100% !important;
    margin-top: auto !important;
}

html[data-theme] body.internal-module-shell.internal-module-root-shell:not(.pos-shell) .module-shortcut-card .module-shortcut-title,
body.internal-module-shell.internal-module-root-shell:not(.pos-shell) .module-shortcut-card .module-shortcut-title {
    display: block !important;
    margin: 0 !important;
    position: static !important;
}

html[data-theme] body.internal-module-shell.internal-module-root-shell:not(.pos-shell) .module-shortcut-card .module-shortcut-desc,
body.internal-module-shell.internal-module-root-shell:not(.pos-shell) .module-shortcut-card .module-shortcut-desc {
    margin: 6px 0 0 !important;
    position: static !important;
}

html[data-theme] body.internal-module-shell.internal-module-root-shell:not(.pos-shell) .module-shortcut-card .module-shortcut-arrow,
body.internal-module-shell.internal-module-root-shell:not(.pos-shell) .module-shortcut-card .module-shortcut-arrow {
    position: static !important;
    margin-left: auto !important;
}

@media (max-width: 768px) {
    html[data-theme] body.internal-module-shell.internal-module-root-shell:not(.pos-shell) .module-shortcut-grid > .module-shortcut-card,
    body.internal-module-shell.internal-module-root-shell:not(.pos-shell) .module-shortcut-grid > .module-shortcut-card {
        min-height: 132px !important;
        padding: 14px !important;
        gap: 10px !important;
    }
}
