*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
}

html, body {
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    margin: 0;
    padding: 0;
    overflow: hidden;
    overscroll-behavior: none;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: #0b1a30;
}

.kiosk-app {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background-color: #0b1a30;
}

/* ==========================================================================
   SCREEN 1: FACTORY ECOSYSTEM OVERVIEW
   ========================================================================== */
.kiosk-screen-1 {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 4vh 7vw;
    box-sizing: border-box;
    overflow: hidden;
    z-index: 1;
}

.kiosk-s1-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
    -webkit-user-drag: none;
}

.kiosk-s1-logo {
    position: absolute;
    top: 4vh;
    left: 7vw;
    z-index: 10;
    height: 9vh;
    width: auto;
    object-fit: contain;
    -webkit-user-drag: none;
    pointer-events: none;
}

.kiosk-s1-header {
    position: relative;
    z-index: 5;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4vh;
    flex-shrink: 0;
}

.kiosk-s1-title {
    font-size: 6vh;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.01em;
    background: linear-gradient(90deg, #243C90 0%, #2087EB 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #243C90;
}

.kiosk-s1-subtitle {
    font-size: 3.2vh;
    font-weight: 400;
    line-height: 1.25;
    letter-spacing: -0.005em;
    background: linear-gradient(90deg, #1A74CC 0%, #0C3B60 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #1A74CC;
}

.kiosk-s1-btn-group {
    position: relative;
    z-index: 5;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.kiosk-s1-btn-group--top {
    gap: 1.6vw;
    margin-top: 2vh;
}

.kiosk-s1-btn-group--bottom {
    gap: 1.4vw;
    bottom: 11.5vh;
}

.kiosk-btn {
    background: transparent;
    border: none;
    outline: none;
    cursor: pointer;
    padding: 0;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s cubic-bezier(0.2, 0.8, 0.4, 1), filter 0.15s ease;
    -webkit-user-drag: none;
    touch-action: manipulation;
}

.kiosk-btn:active {
    transform: scale(0.95);
    filter: brightness(1.08);
}

.kiosk-s1-btn-group--top .kiosk-btn img {
    height: 12vh;
    width: auto;
    object-fit: contain;
    display: block;
    -webkit-user-drag: none;
    pointer-events: none;
}

.kiosk-s1-btn-group--bottom .kiosk-btn img {
    height: 11.5vh;
    width: auto;
    object-fit: contain;
    display: block;
    -webkit-user-drag: none;
    pointer-events: none;
}

.kiosk-s1-factory-wrap {
    position: relative;
    z-index: 3;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.4vh 0;
    top: -6vh;
    height: 67vh;
    width: auto;
}

.kiosk-s1-factory-img {
    max-height: 100%;
    max-width: 86vw;
    height: auto;
    width: auto;
    object-fit: contain;
    display: block;
    -webkit-user-drag: none;
    pointer-events: none;
}

/* ==========================================================================
   SCREEN 2: SOLUTION DETAIL (TAB - PANEL ARCHITECTURE)
   ========================================================================== */
.kiosk-screen-2 {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: none;
    z-index: 10;
}

.kiosk-app[data-current-screen="2"] .kiosk-screen-1 {
    display: none;
}

.kiosk-app[data-current-screen="2"] .kiosk-screen-2 {
    display: block;
}

.kiosk-solution-unit {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: none;
    overflow: hidden;
}

/* Kích hoạt giải pháp tương ứng theo data-active-solution */
.kiosk-app[data-active-solution="3s-erp"] .kiosk-solution-unit[data-solution-id="3s-erp"],
.kiosk-app[data-active-solution="3s-ifactory"] .kiosk-solution-unit[data-solution-id="3s-ifactory"],
.kiosk-app[data-active-solution="3s-ai-force"] .kiosk-solution-unit[data-solution-id="3s-ai-force"],
.kiosk-app[data-active-solution="3s-wms"] .kiosk-solution-unit[data-solution-id="3s-wms"],
.kiosk-app[data-active-solution="3s-sps"] .kiosk-solution-unit[data-solution-id="3s-sps"],
.kiosk-app[data-active-solution="3s-f-insight"] .kiosk-solution-unit[data-solution-id="3s-f-insight"] {
    display: block;
}

.kiosk-s2-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
    -webkit-user-drag: none;
}

.kiosk-s2-body {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: stretch;
    justify-content: flex-start; /* NEO TĨNH BÊN TRÁI: Giữ cố định vị trí Tab Card */
    gap: 5vw;
    padding: 12.5vh 8vw;
    box-sizing: border-box;
}

/* ==========================================================================
   CỘT TRÁI: TAB CARD
   ========================================================================== */
.kiosk-s2-tab-card {
    width: 34vw;
    height: 100%;
    background: #ffffff;
    border-radius: 28px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.22);
    display: flex;
    flex-direction: column;
    padding: 3.2vh 3vw;
    box-sizing: border-box;
    overflow: hidden;
    flex-shrink: 0;
}

.kiosk-s2-tab-header {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.kiosk-back-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid #E2E8F0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    margin-bottom: 1.5vh;
    transition: transform 0.15s ease, background-color 0.15s ease;
}

.kiosk-back-btn:active {
    transform: scale(0.92);
    background-color: #F1F5F9;
}

.kiosk-s2-logo-wrap {
    height: 5vh;
    margin-bottom: 1.2vh;
}

.kiosk-s2-logo {
    max-height: 100%;
    width: auto;
    object-fit: contain;
}

.kiosk-s2-tagline {
    font-size: 1.85vh;
    font-weight: 700;
    color: #1E293B;
    margin-bottom: 1.5vh;
    line-height: 1.25;
}

.kiosk-s2-desc {
    font-size: 1.4vh;
    line-height: 1.55;
    color: #64748B;
    margin-bottom: 3.5vh;
}

/* Vùng Grid cuộn nội bộ */
.kiosk-s2-grid-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 6px;
    margin-right: -6px;
}

.kiosk-s2-grid-scroll::-webkit-scrollbar {
    width: 5px;
}

.kiosk-s2-grid-scroll::-webkit-scrollbar-track {
    background: transparent;
}

.kiosk-s2-grid-scroll::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 4px;
}

.kiosk-s2-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.kiosk-mod-item {
    background: #f9f8fd;
    border: 1.5px solid #E2E8F0;
    border-radius: 14px;
    padding: 1.6vh 0.6vw;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    outline: none;
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.4, 1);
}

.kiosk-mod-item:active {
    transform: scale(0.96);
}

.kiosk-mod-icon-wrap {
    width: auto;
    height: 4.1vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5vh;
}

.kiosk-mod-icon {
    height: 100%;
    object-fit: contain;
}

.kiosk-mod-icon--active {
    display: none;
}

.kiosk-mod-name {
    font-size: 1.2vh;
    font-weight: 700;
    line-height: 1.2;
    color: #2c6481;
}

/* Trạng thái Active của Module Item */
.kiosk-mod-item.is-active {
    border-color: #2087EB;
    box-shadow: 0 8px 18px rgba(32, 135, 235, 0.35);
    background: linear-gradient(135deg, rgb(44, 173, 241) 0%, rgb(24, 111, 199) 100%);
}

.kiosk-mod-item.is-active .kiosk-mod-icon--inactive {
    display: none;
}

.kiosk-mod-item.is-active .kiosk-mod-icon--active {
    display: block;
}

.kiosk-mod-item.is-active .kiosk-mod-name {
    color: #FFFFFF;
}

/* ==========================================================================
   CỘT PHẢI: PANEL CARD
   ========================================================================== */
.kiosk-s2-panel-card {
    flex: 1;
    min-width: 0;
    height: 100%;
    background: #FFFFFF;
    border-radius: 28px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.22);
    padding: 8vh 3vw 2vh;
    box-sizing: border-box;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

/* Chỉ hiện Panel Card khi có module được kích hoạt */
.kiosk-app:not([data-active-module=""]) .kiosk-s2-panel-card {
    display: flex;
}

.kiosk-panel-item {
    display: none;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

.kiosk-panel-item.is-active {
    display: flex;
}

.kiosk-panel-header {
    flex-shrink: 0;
    margin-bottom: 3vh;
}

.kiosk-panel-title {
    font-size: 2.4vh;
    font-weight: 700;
    color: #6a6969;
    line-height: 1.25;
}

/* Danh sách tính năng */
.kiosk-panel-features {
    flex-shrink: 0;
    margin-bottom: 2.5vh;
}

.kiosk-panel-features:empty {
    display: none !important;
}

.kiosk-feat-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column; gap: 0.5vh;
}

.kiosk-feat-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.kiosk-feat-icon {
    flex-shrink: 0;
    display: inline-flex;
    margin-top: 2px;
}

.kiosk-feat-text {
    font-size: clamp(14px, 1.65vh, 18px);
    line-height: 1.45;
    color: #334155;
}

.kiosk-feat-hl {
    font-weight: 700;
    color: #0F172A;
}

/* Slider ảnh cảm ứng CSS Scroll Snap */
.kiosk-panel-slider-wrap {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.kiosk-slider-track {
    flex: 1;
    min-height: 0;
    width: 100%;
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    border-radius: 12px;
}

.kiosk-slider-track::-webkit-scrollbar {
    display: none;
}

.kiosk-slider-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.kiosk-slider-slide img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    -webkit-user-drag: none;
    pointer-events: none;
}

/* Dots Indicator */
.kiosk-slider-dots {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding-top: 2vh;
}

.kiosk-dot-btn {
    width: 1.1vh;
    height: 1.1vh;
    border-radius: 5px;
    background: #acacac;
    border: none;
    padding: 0;
    cursor: pointer;
    outline: none;
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.4, 1);
}

.kiosk-dot-btn.is-active {
    width: 4.8vh;
    background: #0d5797;
    border-radius: 6px;
}

/* ==========================================================================
   SCREEN 3: CUSTOMER SHOWCASE
   ========================================================================== */
.kiosk-screen-3 {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: none;
    z-index: 10;
}

.kiosk-app[data-current-screen="3"] .kiosk-screen-1,
.kiosk-app[data-current-screen="3"] .kiosk-screen-2 {
    display: none;
}

.kiosk-app[data-current-screen="3"] .kiosk-screen-3 {
    display: block;
}

.kiosk-s3-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    pointer-events: none;
    -webkit-user-drag: none;
}

.kiosk-s3-body {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 12.5vh 8vw;
    box-sizing: border-box;
}

.kiosk-s3-card {
    width: 100%;
    height: 100%;
    background: #ffffff;
    border-radius: 28px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.22);
    display: flex;
    flex-direction: column;
    padding: 3.2vh 3vw 2vh;
    box-sizing: border-box;
    overflow: hidden;
}

.kiosk-s3-header {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 1.5vh;
}

.kiosk-s3-title {
    font-size: 2.8vh;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.01em;
    color: #1A5499;
}

.kiosk-s3-img-wrap {
    flex: 1;
    min-height: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.kiosk-s3-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    pointer-events: none;
    -webkit-user-drag: none;
}