.terminal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: transparent !important;
    pointer-events: none !important;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 0 45px 30px 0;
    z-index: 1000;
}

.sp-terminal-device {
    pointer-events: auto !important;
    width: 275px;
    background: linear-gradient(180deg, #2c2b33 0%, #201f25 35%, #18171d 100%);
    border-radius: 26px 26px 36px 36px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.9),
        0 6px 18px rgba(0, 0, 0, 0.7),
        inset 0 1px 2px rgba(255, 255, 255, 0.28),
        inset 0 -2px 4px rgba(0, 0, 0, 0.8);
    padding: 10px 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    user-select: none;
    position: relative;
    animation: spTerminalEnter 0.28s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease;
}

.sp-terminal-device.closing {
    animation: spTerminalExit 0.35s cubic-bezier(0.4, 0, 1, 1) forwards !important;
}

@keyframes spTerminalEnter {
    from {
        opacity: 0;
        transform: translateY(45px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes spTerminalExit {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateY(60px) scale(0.92);
    }
}

.sp-lcd-screen.power-off {
    background: #08070b !important;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.95) !important;
    transition: background 0.25s ease;
}

.sp-shutdown-icon {
    font-size: 1.8rem;
    color: #ef4444;
    animation: spShutdownPulse 1s infinite alternate;
    margin-bottom: 2px;
}

@keyframes spShutdownPulse {
    from { transform: scale(0.9); opacity: 0.6; }
    to { transform: scale(1.1); opacity: 1; filter: drop-shadow(0 0 6px rgba(239, 68, 68, 0.6)); }
}

.sp-printer-top {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding-top: 2px;
}

.sp-paper-slot {
    width: 160px;
    height: 4px;
    background: #0c0b0f;
    border-radius: 2px;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.95);
}

.sp-contactless-zone {
    color: rgba(255, 255, 255, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 38px;
}

.sp-contactless-icon {
    width: 44px;
    height: 32px;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
}

.sp-screen-casing {
    background: #0f0e13;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 6px 7px 7px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.85);
}

.sp-screen-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 4px;
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #94a3b8;
}

.sp-brand-left {
    color: #cbd5e1;
}

.sp-brand-right {
    font-weight: 900;
    color: #ffffff;
    letter-spacing: -0.02em;
}

.sp-lcd-screen {
    width: 100%;
    height: 195px;
    background: #0e4ea7;
    border-radius: 6px;
    padding: 6px 8px 5px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #ffffff;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 12px rgba(0, 0, 0, 0.4);
}

.sp-lcd-statusbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.58rem;
    font-weight: 700;
    color: #e2e8f0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
    padding-bottom: 3px;
}

.sp-lcd-status-left {
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 175px;
}

.sp-business-badge {
    font-size: 0.45rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 1px 4px;
    border-radius: 4px;
    background: rgba(37, 99, 235, 0.35);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #93c5fd;
}

.sp-lcd-status-right {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.64rem;
}

.sp-screen-views {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 0;
    padding-top: 2px;
}

.sp-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    animation: spFade 0.18s ease;
}

@keyframes spFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.sp-lcd-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 2px;
    margin: auto 0;
}

.sp-lcd-title {
    font-size: 0.64rem;
    font-weight: 800;
    color: #e0f2fe;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    line-height: 1.15;
}

.sp-merchant-name {
    font-size: 0.90rem;
    font-weight: 800;
    color: #ffffff;
}

.sp-lcd-label {
    font-size: 0.56rem;
    font-weight: 800;
    color: #cbd5e1;
    letter-spacing: 0.08em;
}

.sp-lcd-amount {
    font-size: 1.45rem;
    font-weight: 800;
    color: #ffffff;
    text-align: center;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.sp-lcd-sub {
    font-size: 0.62rem;
    color: #e0f2fe;
    text-align: center;
    font-weight: 600;
    line-height: 1.2;
    padding: 0 4px;
}

.sp-lcd-bottom-hint {
    font-size: 0.54rem;
    color: #bfdbfe;
    text-align: center;
    font-weight: 600;
    letter-spacing: 0.01em;
    padding-top: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sp-notes-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    width: 100%;
    margin-top: 4px;
}

.sp-note-chip {
    padding: 3px 2px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 6px;
    font-size: 0.58rem;
    font-weight: 700;
    color: #ffffff;
    cursor: pointer;
    text-align: center;
    transition: all 0.1s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sp-note-chip.active {
    background: #ffffff;
    color: #0b4396;
    border-color: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.sp-tips-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    width: 100%;
    margin-top: 6px;
}

.sp-tip-btn {
    padding: 6px 2px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 6px;
    font-size: 0.68rem;
    font-weight: 700;
    color: #ffffff;
    cursor: pointer;
    text-align: center;
    transition: all 0.1s ease;
}

.sp-tip-btn.active {
    background: #ffffff;
    color: #0b4396;
    border-color: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transform: scale(1.05);
}

.sp-receipt-icon {
    font-size: 1.6rem;
    color: #93c5fd;
    margin-bottom: 2px;
}

.sp-receipt-summary {
    background: rgba(0, 0, 0, 0.3);
    border: 1px dashed rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 0.65rem;
    color: #f1f5f9;
    font-weight: 600;
    max-width: 90%;
    word-break: break-word;
    margin: 4px 0;
    text-align: center;
}

.sp-radar-wave {
    font-size: 1.4rem;
    color: #ffffff;
    animation: spRadarPulse 1.6s infinite ease-in-out;
}

@keyframes spRadarPulse {
    0%, 100% { transform: scale(0.9); opacity: 0.7; }
    50% { transform: scale(1.15); opacity: 1; filter: drop-shadow(0 0 6px rgba(255,255,255,0.7)); }
}

.sp-methods-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 3px;
    max-height: 90px;
    overflow-y: auto;
}

.sp-methods-list::-webkit-scrollbar {
    display: none;
}

.sp-method-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 7px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 5px;
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.1s ease;
}

.sp-method-left {
    display: flex;
    align-items: center;
    gap: 6px;
}

.sp-method-num {
    font-size: 0.60rem;
    font-weight: 800;
    padding: 1px 4px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 3px;
}

.sp-method-item.active {
    background: #ffffff;
    color: #0b4396;
    border-color: #ffffff;
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.sp-method-item.active .sp-method-num {
    background: #0b4396;
    color: #ffffff;
}

.sp-method-item.sp-card-frozen {
    opacity: 0.6;
    border-color: rgba(239, 68, 68, 0.4);
    background: rgba(239, 68, 68, 0.1);
}

.sp-method-item.sp-card-frozen.active {
    background: rgba(239, 68, 68, 0.25);
    color: #fca5a5;
    border-color: #ef4444;
}

.sp-frozen-pill {
    font-size: 0.48rem;
    font-weight: 800;
    color: #f87171;
    background: rgba(239, 68, 68, 0.25);
    border: 1px solid rgba(239, 68, 68, 0.4);
    padding: 1px 4px;
    border-radius: 4px;
    letter-spacing: 0.05em;
}

.sp-pin-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 4px 0;
}

.sp-pin-dot {
    width: 26px;
    height: 30px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.15);
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #ffffff;
}

.sp-pin-dot.filled {
    background: #ffffff;
    color: #0b4396;
    border-color: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.sp-status-icon {
    font-size: 1.8rem;
    margin-bottom: 4px;
}

.sp-status-icon.loading {
    color: #ffffff;
    animation: spSpin 1s infinite linear;
}

@keyframes spSpin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.sp-status-icon.approved {
    color: #4ade80;
    filter: drop-shadow(0 0 8px rgba(74, 222, 128, 0.6));
}

.sp-status-icon.declined {
    color: #f87171;
    filter: drop-shadow(0 0 8px rgba(248, 113, 113, 0.6));
}

.sp-function-keys {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 0 2px;
}

.sp-fn-key {
    height: 28px;
    background: #0d0f17;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 9px;
    color: #cbd5e1;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    transition: all 0.12s ease;
}

.sp-fn-key:hover {
    background: #141724;
    border-color: rgba(255, 255, 255, 0.22);
    color: #ffffff;
}

.sp-fn-key:active {
    transform: scale(0.96);
    background: #08090e;
}

.sp-keypad-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-top: 4px;
}

.sp-num-key {
    height: 42px;
    border-radius: 10px;
    background: #0d0f17;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.45);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.12s ease;
    padding: 2px;
}

.sp-num-key span {
    font-size: 1.15rem;
    font-weight: 800;
    line-height: 1;
    color: #ffffff;
    letter-spacing: -0.01em;
}

.sp-num-key .key-sub {
    font-size: 0.46rem;
    font-weight: 700;
    color: #2563eb;
    letter-spacing: 0.06em;
    line-height: 1;
    margin-top: 2px;
}

.sp-num-key:hover {
    background: #151826;
    border-color: rgba(255, 255, 255, 0.22);
}

.sp-num-key:active {
    transform: scale(0.96);
    background: #090a10;
}

.sp-action-key {
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.12s ease;
    background: #0d0f17;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.45);
}

.sp-action-key.red {
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #ef4444;
}

.sp-action-key.red:hover {
    background: #171115;
    border-color: #ef4444;
    color: #f87171;
}

.sp-action-key.red:active {
    transform: scale(0.96);
    background: #0d0a0d;
}

.sp-action-key.red-alt {
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #ef4444;
}

.sp-action-key.red-alt:hover {
    background: #171115;
    border-color: #ef4444;
    color: #f87171;
}

.sp-action-key.red-alt:active {
    transform: scale(0.96);
    background: #0d0a0d;
}

.sp-action-key.yellow {
    border: 1px solid rgba(245, 158, 11, 0.35);
    color: #f59e0b;
}

.sp-action-key.yellow:hover {
    background: #18150f;
    border-color: #f59e0b;
    color: #fbbf24;
}

.sp-action-key.yellow:active {
    transform: scale(0.96);
    background: #0d0b07;
}

.sp-action-key.green {
    border: 1px solid rgba(37, 99, 235, 0.45);
    color: #2563eb;
}

.sp-action-key.green:hover {
    background: #0e1424;
    border-color: #3b82f6;
    color: #60a5fa;
}

.sp-action-key.green:active {
    transform: scale(0.96);
    background: #080c16;
}

.sp-text-danger {
    color: #ef4444 !important;
}

.sp-blocked-icon,
.sp-disconnected-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    margin: 0 auto 2px;
    animation: spPulseAlert 1.8s infinite ease-in-out;
}

.sp-blocked-icon {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.4);
    color: #f59e0b;
}

.sp-disconnected-icon {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #ef4444;
}

.sp-blocked-badge,
.sp-disconnected-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.48rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin: 1px auto 2px;
    line-height: 1.2;
}

.sp-blocked-badge {
    background: rgba(245, 158, 11, 0.2);
    border: 1px solid rgba(245, 158, 11, 0.45);
    color: #fbbf24;
}

.sp-disconnected-badge {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.45);
    color: #f87171;
}

@keyframes spPulseAlert {
    0%, 100% {
        transform: scale(1);
        opacity: 0.9;
    }
    50% {
        transform: scale(1.08);
        opacity: 1;
    }
}

