/* =========================================================
       SARI ROTI BRANDED THEME (CLEAN WHITE & #0D2772 NAV/CTA)
       ========================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
}

.stp-11 {
  box-sizing: border-box;
}

      .stp-11 ::selection {
        background: #0D2772;
        color: #ffffff;
      }

      :root {
        --brand-blue: #0D2772;
        --brand-blue-hover: #14358a;
        --brand-blue-light: #EFF6FF;
        --brand-yellow: #F9A01B;
        --brand-yellow-light: #FEF3C7;
        --brand-red: #E31B23;

        --bg: #FFFFFF;
        --surface: #FFFFFF;
        --elevated: #F8FAFC;
        --elevated-hover: #F1F5F9;
        --elevated-border: #E2E8F0;

        --green: #10B981;
        --teal: #0D2772;
        --white: #0F172A;
        --muted: #64748B;
        --border: #E2E8F0;
        --border-focus: #0D2772;
        --text: #0F172A;
        --amber: #D97706;
        --rose: #EF4444;
      }

      body {
        background: var(--bg);
        color: var(--text);
        font-family:
          'Work Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
          Arial, sans-serif;
        min-height: 100vh;
        display: flex;
        flex-direction: column;
        overflow-x: clip;
        user-select: none;
        -webkit-tap-highlight-color: transparent;
      }

      /* Kiosk Touch UX Optimizations */
      .touch-btn {
        touch-action: manipulation;
        user-select: none;
        transition: all 0.15s ease-out;
        cursor: pointer;
      }
      .touch-btn:active {
        transform: scale(0.97);
      }

      /* Topbar Navigation - Official Sari Roti Blue (#0D2772) */
      .kiosk-topbar {
        min-height: 72px;
        height: auto;
        background: #0D2772;
        border-bottom: 2px solid #091D54;
        box-shadow: 0 4px 18px rgba(13, 39, 114, 0.22);
        padding: 10px 24px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-shrink: 0;
        z-index: 30;
        gap: 12px;
        box-sizing: border-box;
      }

      .brand-group {
        display: flex;
        align-items: center;
        gap: 14px;
        min-width: 0;
      }

      .brand-logo {
        height: 50px;
        width: auto;
        object-fit: contain;
        padding: 2px 4px;
        border-radius: 8px;
        box-shadow: none;
        display: block;
        flex-shrink: 0;
      }

      .kiosk-meta {
        display: flex;
        flex-direction: column;
        min-width: 0;
      }

      .kiosk-title {
        font-size: 14px;
        font-weight: 800;
        color: #ffffff;
        display: flex;
        align-items: center;
        gap: 10px;
        letter-spacing: 0.02em;
        white-space: nowrap;
      }

      .kiosk-tag {
        font-size: 10px;
        padding: 2px 8px;
        border-radius: 12px;
        background: rgba(16, 185, 129, 0.2);
        color: #34D399;
        border: 1px solid rgba(52, 211, 153, 0.4);
        font-family: ui-monospace, monospace;
        font-weight: 700;
      }

      .kiosk-subtitle {
        font-size: 11px;
        color: rgba(255, 255, 255, 0.8);
        margin-top: 1px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 480px;
      }

      .top-actions {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-shrink: 0;
      }

      .btn-aux {
        width: 44px;
        height: 44px;
        padding: 0;
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.12);
        border: 1px solid rgba(255, 255, 255, 0.22);
        color: #ffffff;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
      }
      .btn-aux:hover {
        background: rgba(255, 255, 255, 0.24);
        color: #ffffff;
      }

      .btn-help {
        background: #F9A01B;
        border-color: #EAA43A;
        color: #0D2772;
      }
      .btn-help:hover {
        background: #fbbf24;
      }

      /* =========================================================
       STEPPER CONTAINER & STEPPER STYLES (.stp-11)
       ========================================================= */
      .stp-11 {
        flex: 1;
        display: flex;
        flex-direction: column;
        width: 100%;
        padding: 0;
        gap: 0;
        min-height: 0;
        background: #ffffff;
      }

      /* ─ Step Rail ─ */
      .stp-11__rail {
        display: flex;
        border-bottom: 2px solid #E2E8F0;
        background: #F8FAFC;
        flex-shrink: 0;
        overflow-x: auto;
        scrollbar-width: none;
        -ms-overflow-style: none;
      }

      .stp-11__rail::-webkit-scrollbar {
        display: none;
      }

      .stp-11__rail-item {
        flex: 1 1 0;
        min-width: 0;
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 16px 20px;
        position: relative;
        border-right: 1px solid #E2E8F0;
        cursor: default;
        pointer-events: none;
        user-select: none;
        background: #F8FAFC;
        transition: background 0.2s;
      }

      .stp-11__rail-item:last-child {
        border-right: none;
      }

      .stp-11__rail-item.active {
        background: #EFF6FF;
      }

      .stp-11__rail-item.active::after {
        content: "";
        position: absolute;
        bottom: -2px;
        left: 0;
        right: 0;
        height: 3px;
        background: #0D2772;
      }

      .stp-11__rail-num {
        width: 34px;
        height: 34px;
        border-radius: 10px;
        flex-shrink: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 13px;
        font-weight: 800;
        background: #E2E8F0;
        color: #64748B;
        border: 1.5px solid #CBD5E1;
        transition: all 0.3s;
      }

      .stp-11__rail-item.done .stp-11__rail-num {
        background: #10B981;
        color: #ffffff;
        border-color: #10B981;
        box-shadow: none;
      }

      .stp-11__rail-item.active .stp-11__rail-num {
        background: #0D2772;
        color: #ffffff;
        border-color: #0D2772;
        box-shadow: none;
      }

      .stp-11__rail-text {
        min-width: 0;
      }

      .stp-11__rail-label {
        font-size: 13px;
        font-weight: 700;
        color: #64748B;
        white-space: nowrap;
        transition: color 0.3s;
      }

      .stp-11__rail-item.done .stp-11__rail-label {
        color: #0F172A;
      }

      .stp-11__rail-item.active .stp-11__rail-label {
        color: #0D2772;
        font-weight: 800;
      }

      .stp-11__rail-sublabel {
        font-size: 11px;
        color: #64748B;
        display: none;
        margin-top: 1px;
      }

      .stp-11__rail-item.active .stp-11__rail-sublabel {
        display: block;
        color: #D97706;
        font-weight: 700;
      }

      /* ─ Body & Panes ─ */
      .stp-11__body {
        padding: 28px 36px;
        flex: 1;
        display: flex;
        flex-direction: column;
        background: #FFFFFF;
        overflow-y: auto;
      }

      .stp-11__pane {
        display: none;
      }

      .stp-11__pane.active {
        display: block;
        animation: stp-11-in 0.3s ease;
      }

      @keyframes stp-11-in {
        from {
          opacity: 0;
          transform: translateX(10px);
        }
        to {
          opacity: 1;
          transform: none;
        }
      }

      .stp-11__pane-head {
        margin-bottom: 24px;
      }

      .stp-11__pane-title {
        font-size: 22px;
        font-weight: 800;
        color: #0D2772;
        letter-spacing: -0.01em;
      }

      .stp-11__pane-desc {
        font-size: 14px;
        color: #64748B;
        margin-top: 6px;
      }

      /* Touch Input Fields */
      .stp-11__field {
        margin-bottom: 16px;
        width: 100%;
      }

      .stp-11__fl {
        font-size: 12px;
        font-weight: 700;
        color: #334155;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        margin-bottom: 8px;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        text-align: left;
      }

      .stp-11__in {
        width: 100%;
        height: 56px;
        box-sizing: border-box;
        padding: 0 20px;
        background: #FFFFFF;
        border: 2px solid #CBD5E1;
        border-radius: 12px;
        color: #0F172A;
        font-size: 17px;
        font-weight: 600;
        outline: none;
        transition:
          border-color 0.2s,
          box-shadow 0.2s;
        font-family: inherit;
        text-align: left;
      }

      .stp-11__in:focus {
        border-color: #0D2772;
        box-shadow: 0 0 0 4px rgba(13, 39, 114, 0.14);
      }

      /* Plate 3-Box Input System */

      .plate-boxes-row {
        display: flex;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 12px;
      }

      .plate-box {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
      }

      .plate-box--code {
        width: 115px;
        flex: 0 0 115px;
      }

      .plate-box--number {
        width: 160px;
        flex: 0 0 160px;
      }

      .plate-box--suffix {
        width: 130px;
        flex: 0 0 130px;
      }

      .plate-box-title {
        display: none;
      }

      .plate-box .plate-input {
        width: 100%;
        height: 56px;
        box-sizing: border-box;
        padding: 0 10px;
        font-family: ui-monospace, "SF Mono", Menlo, Monaco, Consolas, monospace;
        font-size: 22px;
        font-weight: 800;
        letter-spacing: 0.12em;
        text-align: center;
        text-transform: uppercase;
        color: var(--amber);
        background: #FFFFFF;
        border: 2px solid #CBD5E1;
        border-radius: 12px;
        transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
      }

      .plate-box .plate-input::placeholder {
        color: #94A3B8;
        font-weight: 500;
        opacity: 0.7;
      }

      .plate-box .plate-input:focus,
      .plate-box .plate-input.in-active-kb {
        border-color: #0D2772;
        color: #0D2772;
        box-shadow: 0 0 0 4px rgba(13, 39, 114, 0.14);
        transform: translateY(-1px);
      }

      .plate-box-hint {
        font-size: 11px;
        font-weight: 700;
        color: #64748B;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        user-select: none;
        text-align: left;
      }

      .plate-box-dash {
        height: 56px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 18px;
        font-weight: 900;
        color: #94A3B8;
        user-select: none;
      }

      .stp-11__form-vertical,
      .stp-11__row2 {
        display: flex;
        flex-direction: column;
        gap: 20px;
        max-width: 100%;
        width: 100%;
        margin: 0;
        align-items: stretch;
      }

      .stp-11__grid-2 {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 24px;
        width: 100%;
        box-sizing: border-box;
        align-items: start;
      }

      @media (max-width: 820px) {
        .stp-11__grid-2 {
          grid-template-columns: 1fr;
          gap: 16px;
        }
      }

      /* Pills & Aux Buttons */
      .preset-container {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-top: 12px;
        flex-wrap: wrap;
      }

      .preset-pill {
        background: #FFFFFF;
        border: 1.5px solid #CBD5E1;
        color: #0D2772;
        font-size: 12px;
        font-weight: 700;
        padding: 8px 16px;
        border-radius: 10px;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        transition: all 0.2s;
      }
      .preset-pill:hover {
        background: #EFF6FF;
        border-color: #0D2772;
        color: #0D2772;
      }

      /* Document Scanner Feed Visual */
      .scanner-box {
        background: #F8FAFC;
        border: 2px dashed #CBD5E1;
        border-radius: 16px;
        padding: 20px 24px;
        text-align: center;
        position: relative;
        overflow: hidden;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-height: 160px;
      }

      .scanner-laser {
        position: absolute;
        left: 0;
        right: 0;
        height: 3px;
        background: linear-gradient(
          90deg,
          transparent,
          #0D2772,
          #38BDF8,
          transparent
        );
        box-shadow: 0 0 16px rgba(13, 39, 114, 0.6);
        display: none;
      }

      @keyframes laserAnim {
        0% {
          top: 5%;
          opacity: 0.6;
        }
        50% {
          top: 90%;
          opacity: 1;
        }
        100% {
          top: 5%;
          opacity: 0.6;
        }
      }

      .laser-active {
        display: block;
        animation: laserAnim 2.2s infinite ease-in-out;
      }

      /* Stepper Items (Pane 3) */
      .items-list-container {
        display: flex;
        flex-direction: column;
        gap: 12px;
      }

      .item-card {
        background: #FFFFFF;
        border: 1.5px solid #E2E8F0;
        border-radius: 14px;
        padding: 16px 20px;
        margin-bottom: 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        box-shadow: 0 2px 8px rgba(13, 39, 114, 0.04);
      }

      .item-meta {
        display: flex;
        align-items: center;
        gap: 16px;
      }

      .item-icon {
        font-size: 26px;
        width: 52px;
        height: 52px;
        border-radius: 12px;
        background: #F8FAFC;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 1.5px solid #E2E8F0;
        overflow: hidden;
        flex-shrink: 0;
      }

      .item-product-thumb {
        width: 100%;
        height: 100%;
        object-fit: contain;
        display: block;
      }

      .item-name {
        font-size: 16px;
        font-weight: 700;
        color: #0F172A;
      }

      .item-sub {
        font-size: 12px;
        color: #64748B;
        font-family: ui-monospace, monospace;
        margin-top: 3px;
      }

      .item-stepper-ctrl {
        display: flex;
        align-items: center;
        gap: 8px;
      }

      .btn-step-round {
        width: 44px;
        height: 44px;
        border-radius: 12px;
        background: #F1F5F9;
        border: 1.5px solid #CBD5E1;
        color: #0D2772;
        font-size: 22px;
        font-weight: 800;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: all 0.15s;
      }
      .btn-step-round:hover {
        background: #E2E8F0;
        border-color: #0D2772;
        color: #0D2772;
      }
      .btn-step-round:active {
        transform: scale(0.92);
      }

      .stepper-val {
        width: 58px;
        height: 44px;
        background: #EFF6FF;
        border: 2px solid #0D2772;
        border-radius: 10px;
        font-size: 20px;
        font-family: ui-monospace, monospace;
        font-weight: 800;
        color: #0D2772;
        display: flex;
        align-items: center;
        justify-content: center;
      }

      /* AI Conveyor Camera & Live Scanning Widget */
      .ai-conveyor-card {
        background: #0B1938;
        border: 2px solid #1E3A8A;
        border-radius: 16px;
        padding: 16px 20px;
        margin-bottom: 20px;
        color: #FFFFFF;
        box-shadow: 0 4px 20px rgba(11, 25, 56, 0.25);
        overflow: hidden;
        position: relative;
      }

      .conveyor-top-bar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 12px;
        flex-wrap: wrap;
        gap: 10px;
      }

      .conveyor-status-indicator {
        display: flex;
        align-items: center;
        gap: 10px;
      }

      .status-pulse-dot {
        width: 12px;
        height: 12px;
        border-radius: 50%;
        background: #10B981;
        display: inline-block;
        box-shadow: 0 0 0 rgba(16, 185, 129, 0.6);
        animation: pulseDot 1.5s infinite;
      }

      .status-pulse-dot.running {
        background: #F9A01B;
        box-shadow: 0 0 0 rgba(249, 160, 27, 0.6);
        animation: pulseDotAmber 1.2s infinite;
      }

      @keyframes pulseDot {
        0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
        70% { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
        100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
      }

      @keyframes pulseDotAmber {
        0% { box-shadow: 0 0 0 0 rgba(249, 160, 27, 0.8); }
        70% { box-shadow: 0 0 0 10px rgba(249, 160, 27, 0); }
        100% { box-shadow: 0 0 0 0 rgba(249, 160, 27, 0); }
      }

      .conveyor-status-label {
        font-size: 13px;
        font-weight: 800;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        color: #F8FAFC;
      }

      .conveyor-actions {
        display: flex;
        gap: 8px;
      }

      .btn-conveyor-action {
        background: rgba(255, 255, 255, 0.12);
        border: 1px solid rgba(255, 255, 255, 0.25);
        color: #FFFFFF;
        font-size: 12px;
        font-weight: 700;
        padding: 6px 14px;
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.15s ease;
      }

      .btn-conveyor-action:hover {
        background: rgba(255, 255, 255, 0.22);
        border-color: #38BDF8;
        color: #38BDF8;
      }

      /* Prominent Start Scan CTA in Top Bar */
      .btn-start-scan-cta {
        background: linear-gradient(135deg, #10B981, #059669);
        color: #FFFFFF;
        font-size: 13px;
        font-weight: 700;
        padding: 8px 18px;
        border-radius: 10px;
        border: 1px solid #34D399;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        box-shadow: 0 0 16px rgba(16, 185, 129, 0.4);
        transition: all 0.2s ease;
      }

      .btn-start-scan-cta:hover {
        background: linear-gradient(135deg, #059669, #047857);
        transform: translateY(-1px);
        box-shadow: 0 4px 20px rgba(16, 185, 129, 0.6);
      }

      .btn-start-scan-cta:active {
        transform: scale(0.95);
      }

      /* Animated Conveyor Stage */
      .conveyor-stage {
        background: #061129;
        border: 1px solid #1E293B;
        border-radius: 12px;
        padding: 14px 18px;
        position: relative;
        overflow: hidden;
        margin-bottom: 12px;
      }

      .conveyor-camera-unit {
        display: flex;
        flex-direction: column;
        align-items: center;
        position: relative;
        z-index: 2;
      }

      .camera-head {
        background: #1E293B;
        border: 1.5px solid #38BDF8;
        border-radius: 8px;
        padding: 4px 14px;
        display: flex;
        align-items: center;
        gap: 8px;
        box-shadow: 0 0 12px rgba(56, 189, 248, 0.3);
      }

      .camera-title {
        font-size: 10px;
        font-weight: 800;
        letter-spacing: 0.08em;
        color: #38BDF8;
      }

      .camera-lens-eye {
        width: 10px;
        height: 10px;
        border-radius: 50%;
        background: #EF4444;
        box-shadow: 0 0 8px #EF4444;
        animation: lensBlink 1.8s infinite;
      }

      @keyframes lensBlink {
        0%, 100% { opacity: 1; transform: scale(1); }
        50% { opacity: 0.4; transform: scale(0.85); }
      }

      /* Laser Scan Beam */
      .camera-beam-cone {
        width: 140px;
        height: 48px;
        background: linear-gradient(180deg, rgba(56, 189, 248, 0.45) 0%, rgba(56, 189, 248, 0.05) 100%);
        clip-path: polygon(35% 0%, 65% 0%, 100% 100%, 0% 100%);
        position: relative;
        margin-top: 2px;
        overflow: hidden;
      }

      .camera-beam-line {
        position: absolute;
        left: 0;
        right: 0;
        height: 2px;
        background: #38BDF8;
        box-shadow: 0 0 8px #38BDF8;
        animation: scanDown 1.4s ease-in-out infinite alternate;
      }

      @keyframes scanDown {
        0% { top: 0%; opacity: 0.3; }
        100% { top: 95%; opacity: 1; }
      }

      /* Conveyor Belt Track */
      .conveyor-track {
        height: 38px;
        background: #111827;
        border: 2px solid #374151;
        border-radius: 8px;
        position: relative;
        overflow: hidden;
        display: flex;
        align-items: center;
        margin-top: -6px;
      }

      .conveyor-stripes {
        position: absolute;
        inset: 0;
        background: repeating-linear-gradient(
          -45deg,
          #1F2937,
          #1F2937 12px,
          #111827 12px,
          #111827 24px
        );
        animation: conveyorMove 1s linear infinite;
      }

      @keyframes conveyorMove {
        from { background-position: 0 0; }
        to { background-position: 48px 0; }
      }

      .conveyor-track.paused .conveyor-stripes {
        animation-play-state: paused;
      }

      /* Moving Bread Items Flow */
      .conveyor-items-stream {
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        z-index: 3;
        pointer-events: none;
      }

      .conveyor-bread-float {
        position: absolute;
        font-size: 22px;
        filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
        transition: transform 0.2s ease;
      }

      /* Standby Banner with Start CTA inside Conveyor Stage */
      .conveyor-standby-banner {
        margin-top: 14px;
        background: rgba(15, 23, 42, 0.75);
        border: 1.5px dashed rgba(56, 189, 248, 0.45);
        border-radius: 12px;
        padding: 12px 18px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        flex-wrap: wrap;
        backdrop-filter: blur(4px);
      }

      .standby-desc {
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 13px;
        color: #E2E8F0;
        font-weight: 500;
        flex: 1;
        min-width: 240px;
      }

      .standby-badge {
        background: rgba(56, 189, 248, 0.15);
        color: #38BDF8;
        border: 1px solid rgba(56, 189, 248, 0.4);
        font-size: 11px;
        font-weight: 800;
        padding: 3px 8px;
        border-radius: 6px;
        letter-spacing: 0.05em;
        flex-shrink: 0;
      }

      .btn-start-scan-stage {
        background: linear-gradient(135deg, #10B981, #059669);
        color: #FFFFFF;
        font-size: 14px;
        font-weight: 800;
        padding: 10px 22px;
        border-radius: 10px;
        border: 1px solid #34D399;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        transition: all 0.2s ease;
        box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
        font-family: inherit;
      }

      .btn-start-scan-stage:hover {
        background: linear-gradient(135deg, #059669, #047857);
        transform: translateY(-1px);
        box-shadow: 0 6px 18px rgba(16, 185, 129, 0.6);
      }

      .btn-start-scan-stage:active {
        transform: scale(0.96);
      }

      /* Scan Ticker */
      .conveyor-ticker {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        margin-top: 10px;
        font-size: 13px;
        font-weight: 600;
        color: #E2E8F0;
      }

      .conveyor-ticker-highlight {
        color: #FDE047;
        font-weight: 800;
        font-family: ui-monospace, monospace;
      }

      /* Progress Bar */
      .conveyor-progress-wrapper {
        margin-top: 8px;
      }

      .conveyor-progress-track {
        width: 100%;
        height: 8px;
        background: rgba(255, 255, 255, 0.15);
        border-radius: 4px;
        overflow: hidden;
      }

      .conveyor-progress-fill {
        height: 100%;
        background: linear-gradient(90deg, #38BDF8, #10B981);
        border-radius: 4px;
        width: 0%;
        transition: width 0.25s ease-out;
      }

      .conveyor-progress-info {
        display: flex;
        justify-content: space-between;
        font-size: 11px;
        color: #94A3B8;
        font-weight: 600;
        margin-top: 6px;
      }

      /* Scanning Highlight Pulse on Item Cards */
      .item-card.item-scanning {
        border-color: #10B981 !important;
        background: #F0FDF4 !important;
        box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25) !important;
        transform: scale(1.01);
        transition: all 0.2s ease;
      }

      .item-name-row {
        display: flex;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
      }

      .badge-ai-ok {
        background: #ECFDF5;
        color: #059669;
        border: 1px solid #A7F3D0;
        font-size: 11px;
        font-weight: 700;
        padding: 2px 8px;
        border-radius: 6px;
      }

      .badge-edited {
        background: #FEF3C7;
        color: #D97706;
        border: 1px solid #FDE68A;
        font-size: 11px;
        font-weight: 700;
        padding: 2px 8px;
        border-radius: 6px;
      }

      .item-actions-group {
        display: flex;
        align-items: center;
        gap: 10px;
      }

      .btn-edit-product {
        width: 44px;
        height: 44px;
        padding: 0;
        border-radius: 12px;
        background: #EFF6FF;
        border: 1.5px solid #BFDBFE;
        color: #0D2772;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        transition: all 0.15s ease;
        flex-shrink: 0;
      }

      .btn-edit-product:hover {
        background: #0D2772;
        color: #FFFFFF;
        border-color: #0D2772;
      }

      .btn-edit-product:active {
        transform: scale(0.92);
      }

      .items-list-footer {
        margin-top: 14px;
      }

      .btn-add-item {
        width: 100%;
        padding: 14px 20px;
        border: 2px dashed #CBD5E1;
        border-radius: 14px;
        background: #F8FAFC;
        color: #0D2772;
        font-size: 14px;
        font-weight: 700;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        transition: all 0.2s ease;
      }

      .btn-add-item:hover {
        background: #EFF6FF;
        border-color: #0D2772;
        color: #0D2772;
      }

      /* Modal Styling */
      .modal-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.65);
        backdrop-filter: blur(5px);
        z-index: 1000;
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.25s ease;
        padding: 16px;
      }

      .modal-backdrop.show {
        opacity: 1;
        pointer-events: auto;
      }

      .modal-card {
        background: #FFFFFF;
        border-radius: 20px;
        width: 100%;
        max-width: 540px;
        box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
        overflow: hidden;
        transform: translateY(20px) scale(0.97);
        transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
        display: flex;
        flex-direction: column;
        max-height: 90vh;
      }

      .modal-backdrop.show .modal-card {
        transform: translateY(0) scale(1);
      }

      .modal-header {
        background: #0D2772;
        color: #FFFFFF;
        padding: 18px 24px;
        display: flex;
        align-items: center;
        justify-content: space-between;
      }

      .modal-title {
        font-size: 18px;
        font-weight: 800;
      }

      .modal-subtitle {
        font-size: 12px;
        color: #93C5FD;
        margin-top: 3px;
      }

      .modal-close-btn {
        background: rgba(255, 255, 255, 0.15);
        border: none;
        color: #FFFFFF;
        font-size: 16px;
        width: 32px;
        height: 32px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: background 0.15s;
      }

      .modal-close-btn:hover {
        background: rgba(255, 255, 255, 0.3);
      }

      .modal-body {
        padding: 22px 24px;
        display: flex;
        flex-direction: column;
        gap: 16px;
        overflow-y: auto;
      }

      .modal-field {
        display: flex;
        flex-direction: column;
        gap: 6px;
      }

      .modal-label {
        font-size: 12px;
        font-weight: 700;
        color: #334155;
        text-transform: uppercase;
        letter-spacing: 0.05em;
      }

      .preset-catalog-chips {
        display: flex;
        flex-wrap: wrap;
        gap: 6px;
        max-height: 120px;
        overflow-y: auto;
        padding: 6px;
        background: #F8FAFC;
        border: 1px solid #CBD5E1;
        border-radius: 10px;
      }

      /* Custom Variant Select with Image */
      .custom-variant-select {
        position: relative;
        width: 100%;
      }

      .variant-select-trigger {
        width: 100%;
        background: #FFFFFF;
        border: 2px solid #CBD5E1;
        border-radius: 14px;
        padding: 10px 16px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        cursor: pointer;
        transition: all 0.2s ease;
        text-align: left;
      }

      .variant-select-trigger:focus,
      .custom-variant-select.open .variant-select-trigger {
        border-color: #0D2772;
        box-shadow: 0 0 0 4px rgba(13, 39, 114, 0.14);
      }

      .variant-trigger-left {
        display: flex;
        align-items: center;
        gap: 14px;
        min-width: 0;
      }

      .variant-thumb-img {
        width: 48px;
        height: 48px;
        object-fit: contain;
        border-radius: 10px;
        background: #F8FAFC;
        border: 1.5px solid #E2E8F0;
        flex-shrink: 0;
        padding: 2px;
      }

      .variant-trigger-info {
        display: flex;
        flex-direction: column;
        gap: 2px;
        min-width: 0;
      }

      .variant-trigger-title {
        font-size: 15px;
        font-weight: 700;
        color: #0F172A;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }

      .variant-trigger-sub {
        font-size: 12px;
        color: #64748B;
        font-family: ui-monospace, monospace;
        font-weight: 600;
      }

      .variant-chevron-icon {
        color: #64748B;
        flex-shrink: 0;
        transition: transform 0.2s ease;
      }

      .custom-variant-select.open .variant-chevron-icon {
        transform: rotate(180deg);
        color: #0D2772;
      }

      /* Options Dropdown Menu */
      .variant-options-menu {
        position: absolute;
        top: calc(100% + 6px);
        left: 0;
        right: 0;
        background: #FFFFFF;
        border: 2px solid #CBD5E1;
        border-radius: 14px;
        box-shadow: 0 12px 32px rgba(13, 39, 114, 0.16);
        z-index: 100;
        max-height: 250px;
        overflow-y: auto;
        padding: 6px;
        display: none;
      }

      .custom-variant-select.open .variant-options-menu {
        display: flex;
        flex-direction: column;
        gap: 4px;
      }

      .variant-option-item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px 14px;
        border-radius: 10px;
        cursor: pointer;
        transition: all 0.15s ease;
        border: 1.5px solid transparent;
      }

      .variant-option-item:hover {
        background: #F1F5F9;
      }

      .variant-option-item.selected {
        background: #EFF6FF;
        border-color: #BFDBFE;
      }

      .variant-option-img {
        width: 44px;
        height: 44px;
        object-fit: contain;
        border-radius: 8px;
        background: #FFFFFF;
        border: 1px solid #E2E8F0;
        flex-shrink: 0;
        padding: 2px;
      }

      .variant-option-text {
        flex: 1;
        min-width: 0;
      }

      .variant-option-title {
        font-size: 14px;
        font-weight: 700;
        color: #0F172A;
      }

      .variant-option-sub {
        font-size: 11px;
        color: #64748B;
        font-family: ui-monospace, monospace;
        margin-top: 2px;
      }

      .variant-option-check {
        font-size: 16px;
        font-weight: 800;
        color: #0D2772;
        opacity: 0;
        transition: opacity 0.15s ease;
      }

      .variant-option-item.selected .variant-option-check {
        opacity: 1;
      }

      .modal-row-2 {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
      }

      .modal-in {
        padding: 12px 14px;
        font-size: 15px;
      }

      .modal-qty-ctrl {
        display: flex;
        align-items: center;
        gap: 12px;
      }

      .modal-qty-input {
        width: 80px;
        height: 44px;
        border: 2px solid #0D2772;
        border-radius: 10px;
        text-align: center;
        font-size: 20px;
        font-weight: 800;
        font-family: ui-monospace, monospace;
        color: #0D2772;
        outline: none;
      }

      .modal-qty-unit {
        font-size: 14px;
        font-weight: 700;
        color: #64748B;
      }

      .modal-footer {
        padding: 16px 24px;
        background: #F8FAFC;
        border-top: 1px solid #E2E8F0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
      }

      .btn-modal-danger {
        width: 44px;
        height: 44px;
        padding: 0;
        background: #FEE2E2;
        border: 1.5px solid #FCA5A5;
        color: #DC2626;
        border-radius: 12px;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        transition: all 0.15s;
        flex-shrink: 0;
      }

      .btn-modal-danger:hover {
        background: #DC2626;
        color: #FFFFFF;
        border-color: #DC2626;
      }

      .btn-modal-danger:active {
        transform: scale(0.92);
      }

      .btn-modal-cancel {
        background: #FFFFFF;
        border: 1px solid #CBD5E1;
        color: #64748B;
        font-size: 13px;
        font-weight: 700;
        padding: 10px 16px;
        border-radius: 10px;
        cursor: pointer;
      }

      .btn-modal-save {
        background: #0D2772;
        border: 1px solid #0D2772;
        color: #FFFFFF;
        font-size: 13px;
        font-weight: 700;
        padding: 10px 20px;
        border-radius: 10px;
        cursor: pointer;
        transition: all 0.15s;
      }

      .btn-modal-save:hover {
        background: #14358a;
      }

      /* Review Table (Pane 4) */
      .stp-11__review {
        display: grid;
        gap: 12px;
      }

      .stp-11__review-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px 20px;
        background: #F8FAFC;
        border-radius: 12px;
        border: 1.5px solid #E2E8F0;
      }

      .stp-11__review-key {
        font-size: 13px;
        color: #64748B;
        font-weight: 600;
      }

      .stp-11__review-val {
        font-size: 15px;
        color: #0F172A;
        font-weight: 700;
      }

      /* Stepper Footer Navigation */
      .stp-11__foot {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 20px 36px;
        border-top: 2px solid #E2E8F0;
        background: #FFFFFF;
        flex-shrink: 0;
        position: sticky;
        bottom: 0;
        z-index: 50;
        box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.08);
      }

      .stp-11__step-text {
        font-size: 14px;
        color: #64748B;
        font-weight: 600;
      }

      .stp-11__step-text strong {
        color: #0D2772;
        font-weight: 800;
      }

      .stp-11__foot-btns {
        display: flex;
        gap: 12px;
      }

      .stp-11__btn {
        padding: 14px 28px;
        border-radius: 12px;
        border: none;
        font-size: 14px;
        font-weight: 500;
        cursor: pointer;
        transition: all 0.2s;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        font-family: inherit;
        box-shadow: none;
      }

      .stp-11__btn--ghost {
        background: #F1F5F9;
        border: 1.5px solid #CBD5E1;
        color: #334155;
        box-shadow: none;
      }

      .stp-11__btn--ghost:hover {
        background: #E2E8F0;
        color: #0F172A;
        box-shadow: none;
      }

      /* Call to Action Buttons: #0D2772 - not bold, no shadow */
      .stp-11__btn--primary {
        background: #0D2772;
        color: #FFFFFF;
        font-weight: 500;
        box-shadow: none;
      }

      .stp-11__btn--primary:hover {
        background: #14358a;
        transform: translateY(-1px);
        box-shadow: none;
        color: #FFFFFF;
      }

      /* Notification & Toast */
      .toast-pill {
        position: fixed;
        bottom: 24px;
        right: 24px;
        background: #0D2772;
        border: 1px solid #14358a;
        color: #FFFFFF;
        padding: 14px 22px;
        border-radius: 12px;
        box-shadow: 0 10px 30px rgba(13, 39, 114, 0.35);
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 14px;
        font-weight: 700;
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.3s ease;
        pointer-events: none;
        z-index: 150;
      }
      .toast-pill.show {
        opacity: 1;
        transform: translateY(0);
      }

      /* Kiosk Virtual Touch Keyboard */
      .kiosk-keyboard {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #EDF2F7;
        border: none;
        box-shadow: 0 -16px 40px rgba(13, 39, 114, 0.18);
        padding: 16px 20px 20px;
        z-index: 120;
        transform: translateY(110%);
        transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
        display: flex;
        flex-direction: column;
        gap: 8px;
        max-width: 980px;
        margin: 0 auto;
        border-top-left-radius: 20px;
        border-top-right-radius: 20px;
        user-select: none;
      }

      .kiosk-keyboard.show {
        transform: translateY(0);
      }

      .kiosk-kb-rows {
        display: flex;
        flex-direction: column;
        gap: 6px;
      }

      .kiosk-kb-row {
        display: flex;
        gap: 6px;
        justify-content: center;
        width: 100%;
      }

      .kb-key {
        flex: 1;
        min-width: 0;
        height: 52px;
        border-radius: 10px;
        background: #FFFFFF;
        border: none;
        color: #0F172A;
        font-size: 18px;
        font-weight: 700;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        user-select: none;
        touch-action: manipulation;
        transition: all 0.1s ease;
        box-shadow: none;
      }

      .kb-key:hover {
        background: #F8FAFC;
      }

      .kb-key:active {
        background: #0D2772;
        color: #ffffff;
        transform: scale(0.95);
      }

      .kb-key--wide {
        flex: 1.6;
        background: #E2E8F0;
        color: #334155;
        font-size: 13px;
        font-weight: 800;
        border: none;
      }

      .kb-key--backspace {
        flex: 1.6;
        background: #FEE2E2;
        border: none;
        color: #DC2626;
        font-size: 20px;
      }

      .kb-key--space {
        flex: 4;
        font-size: 13px;
        color: #64748B;
        letter-spacing: 0.1em;
        border: none;
      }

      .kb-key--action {
        flex: 2;
        background: #0D2772;
        color: #ffffff;
        border: none;
        font-size: 14px;
        font-weight: 500;
        box-shadow: none;
      }
      .kb-key--action:hover {
        background: #14358a;
      }

      .kb-key--caps.active {
        background: #0D2772;
        color: #ffffff;
        border: none;
      }

      .stp-11__body.kb-active {
        padding-bottom: 300px;
      }

      .in-active-kb {
        border-color: #0D2772 !important;
        box-shadow: 0 0 0 4px rgba(13, 39, 114, 0.18) !important;
      }

      @media (prefers-reduced-motion: reduce) {
        .stp-11__pane.active {
          animation: none;
        }
        .kiosk-keyboard {
          transition: none;
        }
      }

/* Hide animation scan section when scanning is completed */
.ai-conveyor-card.is-hidden {
  display: none !important;
}

/* =========================================================
   TOPBAR NAVIGATION TABS & BADGES
   ========================================================= */
.kiosk-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.1);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.kiosk-nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 9px;
  color: rgba(255, 255, 255, 0.85);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  background: transparent;
  transition: all 0.2s ease;
  user-select: none;
}

.kiosk-nav-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.15);
}

.kiosk-nav-btn.active {
  background: #ffffff;
  color: #0D2772;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
  font-weight: 700;
}

.nav-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
  font-family: ui-monospace, monospace;
}

.kiosk-nav-btn.active .nav-badge {
  background: #0D2772;
  color: #ffffff;
}

/* History button grouped in row with Refresh & FAQ buttons */
.btn-top-history {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.2s ease;
  user-select: none;
}

.btn-top-history:hover {
  background: rgba(255, 255, 255, 0.24);
  color: #ffffff;
}

.btn-top-history:active {
  transform: scale(0.97);
}

.btn-top-history .nav-badge {
  background: #ffffff;
  color: #0D2772;
  font-weight: 800;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 10px;
  font-family: ui-monospace, monospace;
}

.btn-top-history.active {
  background: #ffffff;
  color: #0D2772;
  border-color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.btn-top-history.active .nav-badge {
  background: #0D2772;
  color: #ffffff;
}

/* =========================================================
   HISTORICAL INPUT PAGE STYLES (history.html)
   ========================================================= */
.history-page-main {
  flex: 1;
  background: #FFFFFF;
  padding: 28px 36px 60px;
  overflow-y: auto;
  width: 100%;
  box-sizing: border-box;
}

.history-page-container {
  width: 100%;
  max-width: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-sizing: border-box;
}

.history-header-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.history-title-text h1 {
  font-size: 20px;
  font-weight: 800;
  color: #0D2772;
  display: flex;
  align-items: center;
  gap: 10px;
}

.history-title-text p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 3px;
}

/* Filter Bar - Clean Flex (No Overlapping Elements) */
.history-filter-bar {
  background: #ffffff;
  border: 1.5px solid #E2E8F0;
  border-radius: 14px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  box-sizing: border-box;
  box-shadow: 0 2px 8px rgba(13, 39, 114, 0.04);
}

.history-filter-left {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.history-search-box {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
}

.history-search-input {
  width: 100%;
  min-width: 0;
  height: 42px;
  padding: 0 16px;
  border: 1.5px solid #CBD5E1;
  border-radius: 10px;
  font-size: 13px;
  color: #0F172A;
  background: #F8FAFC;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.history-search-input:focus {
  border-color: #0D2772;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(13, 39, 114, 0.12);
}

.history-select {
  flex-shrink: 0;
  height: 42px;
  padding: 0 14px;
  border: 1.5px solid #CBD5E1;
  border-radius: 10px;
  font-size: 13px;
  color: #0F172A;
  background: #F8FAFC;
  outline: none;
  font-weight: 500;
  cursor: pointer;
  min-width: 160px;
  box-sizing: border-box;
  transition: border-color 0.15s ease;
}

.history-select:focus {
  border-color: #0D2772;
  background: #ffffff;
}

.history-actions-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* History Table Card */
.history-table-card {
  background: #ffffff;
  border: 1.5px solid #E2E8F0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.history-table-responsive {
  width: 100%;
  overflow-x: auto;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.history-table thead th {
  background: #EFF6FF;
  color: #0D2772;
  padding: 14px 16px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 800;
  border-bottom: 2px solid #BFDBFE;
  white-space: nowrap;
}

.history-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid #F1F5F9;
  vertical-align: middle;
}

.history-table tbody tr:last-child td {
  border-bottom: none;
}

.history-table-row:hover td {
  background: #F8FAFC;
}

/* Chips and Badges */
.history-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 320px;
}

.history-item-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
  border-radius: 6px;
  font-size: 11px;
  color: #334155;
  white-space: nowrap;
}

.badge-blank-cn {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  background: #FEF3C7;
  color: #D97706;
  border: 1px solid #FDE68A;
}

.badge-verified-cn {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 6px;
  background: #DCFCE7;
  color: #16A34A;
  border: 1px solid #BBF7D0;
}

.status-badge-sap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  background: #DCFCE7;
  color: #16A34A;
  font-size: 11px;
  font-weight: 700;
}

.status-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #16A34A;
}

.btn-action-slip {
  padding: 7px 12px;
  border-radius: 8px;
  background: #EFF6FF;
  border: 1.5px solid #BFDBFE;
  color: #0D2772;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-action-slip:hover {
  background: #0D2772;
  color: #ffffff;
  border-color: #0D2772;
}

.history-empty {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  color: #64748B;
}

.history-empty-icon {
  font-size: 42px;
  margin-bottom: 12px;
}

/* =========================================================
   DASHBOARD MONITORING STYLES (dashboard.html)
   ========================================================= */
.dash-page-main {
  flex: 1;
  background: #F8FAFC;
  padding: 24px 32px 60px;
  overflow-y: auto;
  width: 100%;
  box-sizing: border-box;
}

.dash-page-container {
  width: 100%;
  max-width: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-sizing: border-box;
}

/* Dashboard Header Strip */
.dash-header-strip {
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: 14px;
  padding: 18px 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  box-shadow: 0 2px 8px rgba(13, 39, 114, 0.04);
}

.dash-title-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.dash-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.dash-title-text {
  font-size: 20px;
  font-weight: 800;
  color: #0D2772;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.dash-live-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 20px;
  background: #DCFCE7;
  color: #15803D;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  border: 1px solid #BBF7D0;
}

.dash-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #16A34A;
  box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.7);
  animation: pulse-green 1.8s infinite;
}

@keyframes pulse-green {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(22, 163, 74, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}

.dash-subtitle-text {
  font-size: 13px;
  color: #64748B;
  margin: 0;
}

.dash-controls-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.dash-clock-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 10px;
  background: #EFF6FF;
  border: 1.5px solid #BFDBFE;
  color: #0D2772;
  font-size: 12px;
  font-weight: 700;
  font-family: ui-monospace, "SF Mono", monospace;
  white-space: nowrap;
}

.dash-select {
  height: 42px;
  padding: 0 14px;
  border: 1.5px solid #CBD5E1;
  border-radius: 10px;
  font-size: 13px;
  color: #0F172A;
  background: #F8FAFC;
  outline: none;
  font-weight: 600;
  cursor: pointer;
  box-sizing: border-box;
  transition: border-color 0.15s ease;
}

.dash-select:focus {
  border-color: #0D2772;
  background: #FFFFFF;
}

.btn-dash-action {
  height: 42px;
  padding: 0 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-dash-primary {
  background: #0D2772;
  color: #FFFFFF;
  border: none;
}
.btn-dash-primary:hover {
  background: #14358a;
}

.btn-dash-outline {
  background: #FFFFFF;
  color: #0D2772;
  border: 1.5px solid #CBD5E1;
}
.btn-dash-outline:hover {
  background: #EFF6FF;
  border-color: #0D2772;
}

/* KPI Cards Grid */
.dash-kpis-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.dash-kpi-card {
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 2px 8px rgba(13, 39, 114, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.dash-kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(13, 39, 114, 0.08);
}


.dash-kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dash-kpi-title {
  font-size: 12px;
  font-weight: 700;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dash-kpi-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: #F1F5F9;
  border: 1px solid #E2E8F0;
}

.dash-kpi-val {
  font-size: 30px;
  font-weight: 900;
  color: #0D2772;
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-family: ui-monospace, "SF Mono", monospace;
}

.dash-kpi-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #64748B;
  flex-wrap: wrap;
}

.dash-kpi-pill {
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
}

.dash-kpi-pill--up {
  background: #DCFCE7;
  color: #16A34A;
}

.dash-kpi-pill--neutral {
  background: #EFF6FF;
  color: #0D2772;
}

.dash-kpi-bar {
  height: 6px;
  background: #E2E8F0;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 4px;
}

.dash-kpi-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: linear-gradient(90deg, #0D2772, #2563EB);
  transition: width 0.6s ease;
}

.dash-kpi-bar-fill--green {
  background: linear-gradient(90deg, #059669, #10B981);
}

.dash-kpi-bar-fill--amber {
  background: linear-gradient(90deg, #D97706, #F9A01B);
}

/* Section Headers */
.dash-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 6px;
}

.dash-section-title {
  font-size: 17px;
  font-weight: 800;
  color: #0D2772;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.dash-section-sub {
  font-size: 12px;
  color: #64748B;
  margin: 2px 0 0;
}

/* Multi-Booth Telemetry Grid */
.dash-booths-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.dash-booth-card {
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 2px 8px rgba(13, 39, 114, 0.04);
  position: relative;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.dash-booth-card:hover {
  border-color: #BFDBFE;
  box-shadow: 0 4px 14px rgba(13, 39, 114, 0.08);
}

.dash-booth-card.active-lane {
  border-color: #0D2772;
  box-shadow: 0 0 0 1px #0D2772, 0 4px 14px rgba(13, 39, 114, 0.1);
}

.dash-booth-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.dash-booth-name {
  font-size: 13px;
  font-weight: 800;
  color: #0D2772;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dash-booth-badge {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.dash-booth-badge--scanning {
  background: #DCFCE7;
  color: #16A34A;
  border: 1px solid #BBF7D0;
}

.dash-booth-badge--standby {
  background: #FEF3C7;
  color: #D97706;
  border: 1px solid #FDE68A;
}

.dash-booth-badge--completed {
  background: #EFF6FF;
  color: #1D4ED8;
  border: 1px solid #BFDBFE;
}

.dash-booth-badge--maint {
  background: #F1F5F9;
  color: #64748B;
  border: 1px solid #CBD5E1;
}

/* Booth Mini Stage Visual */
.dash-booth-stage {
  background: #061129;
  border: 1px solid #1E293B;
  border-radius: 10px;
  padding: 10px 12px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dash-booth-stage-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  font-weight: 800;
  color: #38BDF8;
  letter-spacing: 0.05em;
}

.dash-booth-track {
  height: 26px;
  background: #111827;
  border-radius: 6px;
  position: relative;
  overflow: hidden;
  border: 1px solid #334155;
  display: flex;
  align-items: center;
  padding: 0 8px;
}

.dash-booth-stripes {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 12px,
    rgba(56, 189, 248, 0.22) 12px,
    rgba(56, 189, 248, 0.22) 20px
  );
  animation: miniConveyor 2s linear infinite;
}

.dash-booth-stripes.paused {
  animation: none;
  background-image: repeating-linear-gradient(
    90deg,
    transparent,
    transparent 12px,
    rgba(255, 255, 255, 0.08) 12px,
    rgba(255, 255, 255, 0.08) 20px
  );
}

@keyframes miniConveyor {
  from { background-position: 0 0; }
  to { background-position: 40px 0; }
}

.dash-booth-bread-stream {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 12px;
  font-size: 14px;
}

.dash-booth-meta-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
}

.dash-booth-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px dashed #F1F5F9;
}

.dash-booth-meta-row:last-child {
  border-bottom: none;
}

.dash-booth-meta-k {
  color: #64748B;
  font-weight: 500;
}

.dash-booth-meta-v {
  font-weight: 700;
  color: #0F172A;
  font-family: inherit;
}

.dash-booth-meta-v.mono {
  font-family: ui-monospace, "SF Mono", monospace;
  color: #0D2772;
}

.dash-booth-footer {
  margin-top: auto;
  padding-top: 8px;
}

.dash-booth-btn {
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  border: 1.5px solid #CBD5E1;
  background: #F8FAFC;
  color: #0D2772;
  transition: all 0.15s ease;
  cursor: pointer;
}

.dash-booth-btn:hover {
  background: #EFF6FF;
  border-color: #0D2772;
  color: #0D2772;
}

.dash-booth-btn.primary {
  background: #0D2772;
  color: #FFFFFF;
  border-color: #0D2772;
}

.dash-booth-btn.primary:hover {
  background: #14358a;
}

/* Analytics Grid (Top SKU & Top Asal Toko 2 Columns) */
.dash-analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.dash-chart-card {
  background: #FFFFFF;
  border: 1.5px solid #E2E8F0;
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 2px 8px rgba(13, 39, 114, 0.04);
}

.dash-chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.dash-chart-title {
  font-size: 15px;
  font-weight: 800;
  color: #0D2772;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.dash-chart-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 11px;
  font-weight: 700;
  color: #64748B;
}

.dash-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dash-legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dash-chart-svg-wrap {
  width: 100%;
  height: 220px;
  position: relative;
}

.dash-chart-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* SKU Distribution List */
.dash-sku-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.dash-sku-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dash-sku-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.dash-sku-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: #0F172A;
}

.dash-sku-qty {
  font-weight: 800;
  color: #0D2772;
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 13px;
}

.dash-sku-bar-wrap {
  height: 8px;
  background: #F1F5F9;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #E2E8F0;
}

.dash-sku-bar {
  height: 100%;
  border-radius: 6px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* DC Leaderboard */
.dash-dc-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dash-dc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  border-radius: 10px;
  gap: 12px;
}

.dash-dc-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.dash-dc-rank {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: #EFF6FF;
  color: #0D2772;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #BFDBFE;
  flex-shrink: 0;
}

.dash-dc-name {
  font-size: 13px;
  font-weight: 700;
  color: #0F172A;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-dc-qty {
  font-size: 13px;
  font-weight: 800;
  color: #0D2772;
  font-family: ui-monospace, "SF Mono", monospace;
  flex-shrink: 0;
}

/* Split Pane Header (e.g. Step 3 Title + Total Badge) */
.stp-11__pane-head--split {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

/* =========================================================
   COMPREHENSIVE RESPONSIVE DESIGN FOR KIOSK & VARIOUS SCREENS
   ========================================================= */

/* Desktop / Compact Laptops & Tablets Landscape (<= 1024px) */
@media (max-width: 1024px) {
  .kiosk-topbar {
    padding: 8px 20px;
  }
  .kiosk-subtitle {
    max-width: 340px;
  }
  .stp-11__body {
    padding: 22px 24px;
  }
  .stp-11__foot {
    padding: 16px 24px;
  }
  .stp-11__rail-item {
    padding: 12px 14px;
    gap: 10px;
  }
  .stp-11__rail-num {
    width: 30px;
    height: 30px;
    font-size: 12px;
  }
  .stp-11__rail-label {
    font-size: 12px;
  }
  .dash-kpis-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dash-booths-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dash-analytics-grid {
    grid-template-columns: 1fr;
  }
}

/* Medium Tablets & Narrow Windows (<= 820px) */
@media (max-width: 820px) {
  .kiosk-topbar {
    min-height: 64px;
    padding: 8px 16px;
    gap: 10px;
  }
  .brand-group {
    gap: 10px;
  }
  .brand-logo {
    height: 42px;
  }
  .kiosk-title {
    font-size: 13px;
  }
  .kiosk-subtitle {
    max-width: 240px;
  }
  .btn-top-history {
    height: 40px;
    padding: 0 12px;
    font-size: 12px;
  }
  .btn-aux {
    width: 40px;
    height: 40px;
  }

  .stp-11__rail-item {
    padding: 10px 10px;
    gap: 8px;
  }
  .stp-11__rail-num {
    width: 26px;
    height: 26px;
    font-size: 11px;
    border-radius: 8px;
  }
  .stp-11__rail-label {
    font-size: 11.5px;
  }
  .stp-11__rail-sublabel {
    display: none !important;
  }

  .stp-11__body {
    padding: 18px 18px;
  }
  .stp-11__grid-2 {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  /* Plate 3-box input adaptability */
  .plate-boxes-row {
    width: 100%;
    gap: 6px;
  }
  .plate-box--code {
    flex: 1 1 25%;
    width: auto;
  }
  .plate-box--number {
    flex: 2 1 45%;
    width: auto;
  }
  .plate-box--suffix {
    flex: 1 1 25%;
    width: auto;
  }
  .plate-box .plate-input {
    height: 50px;
    font-size: 19px;
    padding: 0 6px;
    letter-spacing: 0.08em;
  }

  /* Conveyor components */
  .conveyor-top-bar {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .conveyor-standby-banner {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 10px;
  }
  .standby-desc {
    min-width: 0;
    justify-content: center;
    font-size: 12px;
  }
  .btn-start-scan-stage {
    width: 100%;
    justify-content: center;
  }
  .conveyor-stage {
    padding: 12px 14px;
  }

  /* Step 4 Review */
  .stp-11__review-row {
    padding: 12px 16px;
  }

  /* Footer */
  .stp-11__foot {
    padding: 14px 18px;
  }
  .stp-11__btn {
    padding: 12px 20px;
    font-size: 13px;
  }

  /* History Page */
  .history-filter-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .history-filter-left {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
  }
  .history-select {
    width: 100%;
  }
  .history-actions-right {
    width: 100%;
    justify-content: flex-end;
  }
  .history-table-card {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .dash-page-main {
    padding: 18px 18px 50px;
  }
  .dash-header-strip {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }
  .dash-controls-group {
    width: 100%;
    justify-content: flex-start;
  }
}

/* Mobile & Small Tablet Portrait (<= 640px) */
@media (max-width: 640px) {
  .kiosk-topbar {
    min-height: 58px;
    padding: 6px 12px;
  }
  .brand-logo {
    height: 36px;
  }
  .kiosk-subtitle {
    display: none;
  }
  .kiosk-title {
    font-size: 12px;
    gap: 6px;
  }
  .kiosk-tag {
    font-size: 9px;
    padding: 1px 6px;
  }
  .btn-top-text {
    display: none;
  }
  .btn-top-history {
    padding: 0 10px;
    height: 38px;
  }
  .btn-aux {
    width: 38px;
    height: 38px;
  }

  /* Stepper Rail: scrollable on very small screens so nothing is clipped */
  .stp-11__rail {
    justify-content: flex-start;
  }
  .stp-11__rail-item {
    flex: 0 0 auto;
    min-width: 110px;
    padding: 10px 10px;
  }

  .stp-11__pane-head--split {
    flex-direction: column;
    gap: 12px;
    align-items: stretch;
  }
  .stp-11__body {
    padding: 16px 14px;
  }
  .stp-11__pane-title {
    font-size: 18px;
  }
  .stp-11__pane-desc {
    font-size: 12.5px;
  }
  .stp-11__fl {
    font-size: 11px;
  }
  .stp-11__in {
    height: 48px;
    font-size: 15px;
  }

  /* Virtual Keyboard */
  .kiosk-keyboard {
    padding: 10px 10px 14px;
    border-radius: 16px 16px 0 0;
  }
  .kb-key {
    height: 42px;
    font-size: 15px;
    border-radius: 8px;
  }
  .kb-key--wide {
    font-size: 11px;
  }
  .kiosk-kb-row,
  .kiosk-kb-rows {
    gap: 4px;
  }

  /* Items List (Step 3) */
  .item-card {
    padding: 12px;
    gap: 10px;
  }
  .item-icon {
    width: 44px;
    height: 44px;
    font-size: 22px;
  }
  .item-name {
    font-size: 14px;
  }
  .btn-step-round {
    width: 38px;
    height: 38px;
  }
  .stepper-val {
    width: 30px;
    font-size: 15px;
  }
  .items-list-footer {
    flex-wrap: wrap;
  }
  .items-list-footer .stp-11__btn {
    flex: 1;
    min-width: 140px;
    justify-content: center;
  }

  /* Step 4 Review */
  .stp-11__review-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    padding: 12px 14px;
  }
  .stp-11__review-key {
    font-size: 12px;
  }
  .stp-11__review-val {
    font-size: 14px;
  }

  /* Modal */
  .modal-card {
    max-width: 95vw;
    margin: 8px;
  }
  .modal-header {
    padding: 14px 16px;
  }
  .modal-body {
    padding: 14px 16px;
  }
  .modal-footer {
    padding: 12px 16px;
    flex-wrap: wrap;
    gap: 8px;
  }
  .modal-row-2 {
    grid-template-columns: 1fr;
  }
  .dash-kpis-grid {
    grid-template-columns: 1fr;
  }
  .dash-booths-grid {
    grid-template-columns: 1fr;
  }
  .dash-controls-group {
    flex-direction: column;
    align-items: stretch;
  }
  .dash-controls-group .dash-select,
  .dash-controls-group .btn-dash-action,
  .dash-clock-tag {
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
  }
}

/* Small Smartphone (<= 440px) */
@media (max-width: 440px) {
  .stp-11__foot {
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px;
  }
  .stp-11__foot-btns {
    width: 100%;
    justify-content: stretch;
  }
  .stp-11__foot-btns .stp-11__btn {
    flex: 1;
    justify-content: center;
    padding: 10px 14px;
  }
  .plate-box .plate-input {
    height: 44px;
    font-size: 16px;
    letter-spacing: 0.04em;
  }
}

/* Printable Digital Slip Styles */
@media print {
  body * {
    visibility: hidden;
  }
  #history-slip-modal,
  #history-slip-modal .modal-card,
  #history-slip-modal .modal-card * {
    visibility: visible;
  }
  #history-slip-modal {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: auto;
    background: transparent;
    display: block !important;
  }
  #history-slip-modal .modal-card {
    box-shadow: none !important;
    border: none !important;
    max-width: 100% !important;
    width: 100% !important;
  }
  .modal-footer,
  .modal-close-btn {
    display: none !important;
  }
}
