/**
 * Tixomat POS – Dark Theme Stylesheet
 * Tablet-optimiertes Fullscreen-Interface für Vor-Ort-Ticketverkauf.
 * @since 1.29.0
 */

/* ── Variables ── */
:root {
    --pos-bg: #0f0f0f;
    --pos-surface: #1a1a1a;
    --pos-card: #252525;
    --pos-card-hover: #2f2f2f;
    --pos-border: #333;
    --pos-accent: #c8ff00;
    --pos-accent-dim: rgba(200,255,0,.15);
    --pos-accent-text: #000;
    --pos-text: #fff;
    --pos-text-muted: #999;
    --pos-text-dim: #666;
    --pos-success: #4ade80;
    --pos-success-dim: rgba(74,222,128,.15);
    --pos-danger: #ef4444;
    --pos-danger-dim: rgba(239,68,68,.15);
    --pos-warn: #eab308;
    --pos-cash: #22c55e;
    --pos-card-pay: #3b82f6;
    --pos-free: #a855f7;
    --pos-radius: 16px;
    --pos-radius-sm: 10px;
    --pos-radius-xs: 6px;
    --pos-transition: 200ms cubic-bezier(.4,0,.2,1);
    --pos-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --pos-font-display: 'Outfit', var(--pos-font);
}

/* ── Reset & Base ── */
#tix-pos-app {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: var(--pos-bg);
    color: var(--pos-text);
    font-family: var(--pos-font);
    font-size: 15px;
    line-height: 1.5;
    overflow: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#tix-pos-app * {
    box-sizing: border-box;
}

#tix-pos-app button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    outline: none;
    background: none;
    color: inherit;
}

#tix-pos-app input,
#tix-pos-app select {
    font-family: inherit;
    font-size: inherit;
    color: var(--pos-text);
    background: var(--pos-card);
    border: 1px solid var(--pos-border);
    border-radius: var(--pos-radius-xs);
    padding: 10px 14px;
    outline: none;
    transition: border-color var(--pos-transition);
}

#tix-pos-app input:focus,
#tix-pos-app select:focus {
    border-color: var(--pos-accent);
}

/* ── Screen Container ── */
.pos-screen {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 250ms ease, transform 250ms ease;
    pointer-events: none;
}

.pos-screen.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: all;
}

.pos-screen.exit {
    opacity: 0;
    transform: translateX(-40px);
}

/* ── PIN Login ── */
.pos-pin {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    height: 100%;
    padding: 40px;
}

.pos-pin-logo-img {
    max-width: 180px !important;
    height: auto !important;
    margin-bottom: 0;
}

.pos-pin-title {
    font-size: 18px;
    color: var(--pos-text-muted);
}

.pos-pin-dots {
    display: flex;
    gap: 16px;
}

.pos-pin-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--pos-border);
    transition: all var(--pos-transition);
}

.pos-pin-dot.filled {
    background: var(--pos-accent);
    border-color: var(--pos-accent);
    transform: scale(1.15);
}

.pos-pin-error {
    color: var(--pos-danger);
    font-size: 14px;
    min-height: 20px;
}

.pos-numpad {
    display: grid;
    grid-template-columns: repeat(3, 80px);
    gap: 12px;
}

.pos-numpad-btn {
    width: 80px;
    height: 64px;
    border-radius: var(--pos-radius-sm);
    background: var(--pos-card);
    font-size: 24px;
    font-weight: 600;
    font-family: var(--pos-font-display);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--pos-transition);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.pos-numpad-btn:active {
    transform: scale(0.93);
    background: var(--pos-card-hover);
}

.pos-numpad-btn.accent {
    background: var(--pos-accent);
    color: var(--pos-accent-text);
}

.pos-numpad-btn.accent:active {
    background: var(--pos-accent);
    filter: brightness(0.85);
}

.pos-numpad-btn.muted {
    background: transparent;
    color: var(--pos-text-muted);
    font-size: 18px;
}

@keyframes pos-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-12px); }
    40% { transform: translateX(10px); }
    60% { transform: translateX(-8px); }
    80% { transform: translateX(6px); }
}

.pos-pin-dots.shake {
    animation: pos-shake 400ms ease;
}

/* ── Topbar ── */
.pos-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 28px;
    background: var(--pos-surface);
    border-bottom: 1px solid var(--pos-border);
    min-height: 56px;
    flex-shrink: 0;
}

.pos-topbar-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pos-topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pos-back-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--pos-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: background var(--pos-transition);
}

.pos-back-btn:hover {
    background: var(--pos-card-hover);
}

.pos-topbar-title {
    font-family: var(--pos-font-display);
    font-size: 18px;
    font-weight: 600;
}

.pos-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: var(--pos-radius-xs);
    background: var(--pos-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all var(--pos-transition);
    position: relative;
}

.pos-icon-btn:hover {
    background: var(--pos-card-hover);
}

.pos-icon-btn.active {
    background: var(--pos-accent-dim);
    color: var(--pos-accent);
}

/* ── Statusbar ── */
.pos-statusbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 28px;
    background: var(--pos-surface);
    border-top: 1px solid var(--pos-border);
    font-size: 13px;
    color: var(--pos-text-muted);
    flex-shrink: 0;
    min-height: 48px;
}

.pos-statusbar-left,
.pos-statusbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.pos-status-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pos-status-value {
    color: var(--pos-text);
    font-weight: 600;
}

/* ── Event Select ── */
.pos-events {
    flex: 1;
    overflow-y: auto;
    padding: 24px 28px;
}

.pos-events-filter {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.pos-filter-btn {
    padding: 8px 18px;
    border-radius: 20px;
    background: var(--pos-card);
    font-size: 13px;
    font-weight: 500;
    transition: all var(--pos-transition);
}

.pos-filter-btn.active {
    background: var(--pos-accent);
    color: var(--pos-accent-text);
}

.pos-search {
    flex: 1;
    min-width: 200px;
    background: var(--pos-card);
    border: 1px solid var(--pos-border);
    border-radius: 20px;
    padding: 8px 18px;
    font-size: 13px;
}

.pos-events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.pos-event-card {
    background: var(--pos-card);
    border-radius: var(--pos-radius);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--pos-transition);
    border: 2px solid transparent;
}

.pos-event-card:hover {
    border-color: var(--pos-accent);
    transform: translateY(-2px);
}

.pos-event-card.today {
    border-color: var(--pos-accent);
}

.pos-event-img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    background: var(--pos-surface);
}

.pos-event-info {
    padding: 16px;
}

.pos-event-title {
    font-family: var(--pos-font-display);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pos-event-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    color: var(--pos-text-muted);
}

.pos-event-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    background: var(--pos-accent-dim);
    color: var(--pos-accent);
}

.pos-event-badge.today-badge {
    background: var(--pos-accent);
    color: var(--pos-accent-text);
}

.pos-no-events {
    text-align: center;
    padding: 60px 20px;
    color: var(--pos-text-muted);
    font-size: 16px;
}

/* ── Sale Screen ── */
.pos-sale {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 380px;
    overflow: hidden;
}

.pos-categories {
    padding: 24px 28px;
    overflow-y: auto;
}

.pos-cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}

.pos-cat-tile {
    background: var(--pos-card);
    border-radius: var(--pos-radius);
    padding: 20px;
    cursor: pointer;
    transition: all var(--pos-transition);
    display: flex;
    flex-direction: column;
    gap: 8px;
    border: 2px solid transparent;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    position: relative;
    overflow: hidden;
}

.pos-cat-tile:active {
    transform: scale(0.97);
}

.pos-cat-tile:hover {
    border-color: var(--pos-accent);
}

.pos-cat-tile.sold-out {
    opacity: 0.35;
    pointer-events: none;
}

.pos-cat-name {
    font-family: var(--pos-font-display);
    font-size: 17px;
    font-weight: 600;
}

.pos-cat-price {
    font-size: 22px;
    font-weight: 700;
    font-family: var(--pos-font-display);
    color: var(--pos-accent);
}

.pos-cat-stock {
    font-size: 12px;
    color: var(--pos-text-muted);
}

.pos-cat-sold-out {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    font-size: 14px;
    font-weight: 700;
    color: var(--pos-danger);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ── Cart ── */
.pos-cart {
    display: flex;
    flex-direction: column;
    background: var(--pos-surface);
    border-left: 1px solid var(--pos-border);
}

.pos-cart-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--pos-border);
    font-family: var(--pos-font-display);
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

#tix-pos-app .pos-cart-clear-btn {
    font-size: 12px;
    font-weight: 500;
    color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 6px;
    padding: 4px 10px;
    cursor: pointer;
    transition: all var(--pos-transition);
}

#tix-pos-app .pos-cart-clear-btn:hover {
    background: rgba(255, 107, 107, 0.2);
    border-color: rgba(255, 107, 107, 0.5);
}

.pos-cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 14px 20px;
}

.pos-cart-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 8px;
    border-radius: var(--pos-radius-xs);
    transition: background var(--pos-transition);
}

.pos-cart-item + .pos-cart-item {
    border-top: 1px solid var(--pos-border);
}

.pos-cart-item-info {
    flex: 1;
    min-width: 0;
}

.pos-cart-item-name {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pos-cart-item-price {
    font-size: 13px;
    color: var(--pos-text-muted);
}

.pos-cart-item-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pos-qty-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--pos-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    transition: all var(--pos-transition);
}

.pos-qty-btn:active {
    transform: scale(0.9);
}

.pos-qty-btn.remove {
    background: var(--pos-danger-dim);
    color: var(--pos-danger);
}

.pos-cart-qty {
    font-size: 16px;
    font-weight: 600;
    min-width: 28px;
    text-align: center;
}

.pos-cart-item-total {
    font-weight: 600;
    min-width: 70px;
    text-align: right;
}

.pos-cart-empty {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pos-text-dim);
    font-size: 14px;
}

/* ── Cart Footer ── */
.pos-cart-footer {
    padding: 18px 24px;
    border-top: 1px solid var(--pos-border);
}

.pos-coupon-row {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.pos-coupon-input {
    flex: 1;
    padding: 8px 12px;
    font-size: 13px;
    text-transform: uppercase;
}

.pos-coupon-btn {
    padding: 8px 14px;
    border-radius: var(--pos-radius-xs);
    background: var(--pos-card);
    font-size: 13px;
    font-weight: 500;
    transition: background var(--pos-transition);
}

.pos-coupon-btn:hover {
    background: var(--pos-card-hover);
}

.pos-customer-fields {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}

.pos-customer-fields input {
    padding: 8px 12px;
    font-size: 13px;
}

.pos-cart-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: var(--pos-font-display);
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 16px;
}

.pos-cart-total-value {
    color: var(--pos-accent);
}

#tix-pos-app .pos-pay-btn {
    width: 100%;
    padding: 16px;
    border-radius: var(--pos-radius-sm);
    background: var(--pos-accent);
    color: var(--pos-accent-text);
    font-family: var(--pos-font-display);
    font-size: 17px;
    font-weight: 700;
    transition: all var(--pos-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 2px solid transparent;
}

#tix-pos-app .pos-pay-btn:hover {
    background: var(--pos-accent);
    filter: brightness(0.85);
}

#tix-pos-app .pos-pay-btn:active {
    transform: scale(0.98);
}

#tix-pos-app .pos-pay-btn:disabled {
    background: var(--pos-card);
    color: var(--pos-text-dim);
    pointer-events: none;
    border: 2px solid var(--pos-border);
}

/* ── Payment Screen ── */
.pos-payment {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 32px;
    padding: 40px;
}

.pos-payment-amount {
    font-family: var(--pos-font-display);
    font-size: 48px;
    font-weight: 700;
}

.pos-payment-label {
    font-size: 16px;
    color: var(--pos-text-muted);
    margin-top: -20px;
}

.pos-payment-methods {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.pos-payment-btn {
    width: 200px;
    height: 140px;
    border-radius: var(--pos-radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-family: var(--pos-font-display);
    font-size: 18px;
    font-weight: 600;
    transition: all var(--pos-transition);
    border: 2px solid transparent;
}

.pos-payment-btn:active {
    transform: scale(0.95);
}

.pos-payment-btn.cash {
    background: rgba(34,197,94,.12);
    color: var(--pos-cash);
}
.pos-payment-btn.cash:hover {
    border-color: var(--pos-cash);
}

.pos-payment-btn.card {
    background: rgba(59,130,246,.12);
    color: var(--pos-card-pay);
}
.pos-payment-btn.card:hover {
    border-color: var(--pos-card-pay);
}

.pos-payment-btn.free {
    background: rgba(168,85,247,.12);
    color: var(--pos-free);
}
.pos-payment-btn.free:hover {
    border-color: var(--pos-free);
}

.pos-payment-icon {
    font-size: 36px;
}

/* ── Change Calculator ── */
.pos-change {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 40px;
    overflow-y: auto;
}

.pos-change-due {
    font-family: var(--pos-font-display);
    font-size: 20px;
    color: var(--pos-text-muted);
}

.pos-change-due strong {
    color: var(--pos-text);
    font-size: 32px;
}

.pos-change-given-label {
    font-size: 16px;
    color: var(--pos-text-muted);
}

.pos-change-given {
    font-family: var(--pos-font-display);
    font-size: 42px;
    font-weight: 700;
    min-height: 56px;
}

.pos-change-numpad {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.pos-numpad-btn.delete {
    background: var(--pos-danger-dim);
    color: var(--pos-danger);
    font-size: 20px;
}

.pos-numpad-btn.delete:active {
    background: var(--pos-danger);
    color: #fff;
}

.pos-change-clear-btn {
    padding: 8px 24px;
    border-radius: var(--pos-radius-xs);
    background: transparent;
    border: 1px solid var(--pos-border);
    color: var(--pos-text-muted);
    font-family: var(--pos-font);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--pos-transition);
}

.pos-change-clear-btn:hover {
    border-color: var(--pos-danger);
    color: var(--pos-danger);
    background: var(--pos-danger-dim);
}

.pos-change-clear-btn:active {
    transform: scale(0.95);
}

.pos-quick-amounts {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.pos-quick-btn {
    padding: 14px 28px;
    border-radius: var(--pos-radius-sm);
    background: var(--pos-card);
    border: 2px solid var(--pos-border);
    font-family: var(--pos-font-display);
    font-size: 18px;
    font-weight: 600;
    transition: all var(--pos-transition);
    display: flex;
    align-items: baseline;
    gap: 4px;
    min-width: 80px;
    justify-content: center;
}

.pos-quick-btn-value {
    font-size: 22px;
    font-weight: 700;
}

.pos-quick-btn-unit {
    font-size: 14px;
    color: var(--pos-text-muted);
    font-weight: 500;
}

.pos-quick-btn:active {
    transform: scale(0.95);
}

.pos-quick-btn:hover {
    border-color: var(--pos-accent);
    background: var(--pos-card-hover);
}

.pos-quick-btn.exact {
    background: var(--pos-accent-dim);
    color: var(--pos-accent);
    border-color: transparent;
    font-size: 15px;
}

.pos-quick-btn.exact:hover {
    border-color: var(--pos-accent);
}

.pos-change-result {
    font-family: var(--pos-font-display);
    font-size: 18px;
    color: var(--pos-text-muted);
}

.pos-change-result strong {
    font-size: 36px;
}

.pos-change-result.ok strong {
    color: var(--pos-success);
}

.pos-change-result.short strong {
    color: var(--pos-danger);
}

.pos-change-confirm {
    padding: 16px 48px;
    border-radius: var(--pos-radius-sm);
    background: var(--pos-cash);
    color: var(--pos-accent-text);
    font-family: var(--pos-font-display);
    font-size: 18px;
    font-weight: 700;
    transition: all var(--pos-transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.pos-change-confirm:disabled {
    opacity: 0.3;
    pointer-events: none;
}

.pos-change-confirm:active {
    transform: scale(0.97);
}

/* ── Success Screen ── */
.pos-success {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 40px;
    overflow-y: auto;
}

@keyframes pos-checkmark {
    0% { stroke-dashoffset: 48; }
    100% { stroke-dashoffset: 0; }
}

.pos-check-svg {
    width: 80px;
    height: 80px;
}

.pos-check-svg circle {
    fill: var(--pos-success-dim);
}

.pos-check-svg path {
    stroke: var(--pos-success);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: pos-checkmark 500ms ease 200ms forwards;
}

.pos-success-title {
    font-family: var(--pos-font-display);
    font-size: 28px;
    font-weight: 700;
}

.pos-success-subtitle {
    color: var(--pos-text-muted);
    font-size: 16px;
    margin-top: -12px;
}

.pos-tickets-list {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
    max-width: 700px;
}

.pos-ticket-card {
    background: var(--pos-card);
    border-radius: var(--pos-radius);
    padding: 20px;
    text-align: center;
    min-width: 200px;
}

.pos-ticket-qr {
    margin: 12px auto;
    width: 140px;
    height: 140px;
    background: #fff;
    border-radius: 8px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pos-ticket-qr canvas,
.pos-ticket-qr svg {
    max-width: 100%;
    max-height: 100%;
}

.pos-ticket-code {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: var(--pos-text-muted);
    margin-top: 8px;
    word-break: break-all;
}

.pos-ticket-cat {
    font-size: 13px;
    color: var(--pos-text-muted);
    margin-top: 4px;
}

.pos-success-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.pos-success-btn {
    padding: 12px 28px;
    border-radius: var(--pos-radius-sm);
    font-size: 15px;
    font-weight: 600;
    transition: all var(--pos-transition);
}

.pos-success-btn.primary {
    background: var(--pos-accent);
    color: var(--pos-accent-text);
}

.pos-success-btn.secondary {
    background: var(--pos-card);
}

.pos-success-btn:active {
    transform: scale(0.97);
}

/* Auto-Reset Progress Bar */
.pos-reset-bar {
    position: absolute;
    bottom: 48px;
    left: 0;
    height: 3px;
    background: var(--pos-accent);
    transition: width linear;
}

/* ── Report Screen ── */
.pos-report {
    flex: 1;
    overflow-y: auto;
    padding: 24px 28px;
}

.pos-report-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.pos-kpi {
    background: var(--pos-card);
    border-radius: var(--pos-radius);
    padding: 20px;
}

.pos-kpi-label {
    font-size: 13px;
    color: var(--pos-text-muted);
    margin-bottom: 6px;
}

.pos-kpi-value {
    font-family: var(--pos-font-display);
    font-size: 28px;
    font-weight: 700;
}

.pos-kpi-value.cash { color: var(--pos-cash); }
.pos-kpi-value.card { color: var(--pos-card-pay); }
.pos-kpi-value.free { color: var(--pos-free); }

.pos-report-section {
    background: var(--pos-card);
    border-radius: var(--pos-radius);
    padding: 20px;
    margin-bottom: 16px;
}

.pos-report-section h3 {
    font-family: var(--pos-font-display);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
}

/* Payment bars */
.pos-payment-bars {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pos-bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.pos-bar-label {
    width: 100px;
    font-size: 13px;
    color: var(--pos-text-muted);
}

.pos-bar-track {
    flex: 1;
    height: 28px;
    background: var(--pos-surface);
    border-radius: 6px;
    overflow: hidden;
}

.pos-bar-fill {
    height: 100%;
    border-radius: 6px;
    transition: width 500ms ease;
    display: flex;
    align-items: center;
    padding-left: 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--pos-accent-text);
}

.pos-bar-fill.cash { background: var(--pos-cash); }
.pos-bar-fill.card { background: var(--pos-card-pay); color: #fff; }
.pos-bar-fill.free { background: var(--pos-free); color: #fff; }

.pos-bar-amount {
    width: 90px;
    text-align: right;
    font-weight: 600;
    font-size: 14px;
}

/* Category table */
.pos-cat-table {
    width: 100%;
    border-collapse: collapse;
}

.pos-cat-table th {
    text-align: left;
    font-size: 12px;
    color: var(--pos-text-muted);
    font-weight: 500;
    padding: 8px 12px;
    border-bottom: 1px solid var(--pos-border);
}

.pos-cat-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--pos-border);
    font-size: 14px;
}

.pos-cat-table tr:last-child td {
    border-bottom: none;
}

/* Hourly chart */
.pos-hourly {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 120px;
    padding-top: 16px;
}

.pos-hour-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    height: 100%;
    justify-content: flex-end;
}

.pos-hour-bar {
    width: 100%;
    background: var(--pos-accent);
    border-radius: 4px 4px 0 0;
    transition: height 500ms ease;
    min-height: 2px;
}

.pos-hour-label {
    font-size: 10px;
    color: var(--pos-text-dim);
}

.pos-hour-value {
    font-size: 10px;
    color: var(--pos-text-muted);
    font-weight: 600;
}

/* ── Transactions ── */
.pos-transactions {
    flex: 1;
    overflow-y: auto;
    padding: 24px 28px;
}

.pos-tx-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pos-tx-item {
    background: var(--pos-card);
    border-radius: var(--pos-radius-sm);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: background var(--pos-transition);
}

.pos-tx-item:hover {
    background: var(--pos-card-hover);
}

.pos-tx-item.cancelled {
    opacity: 0.5;
    text-decoration: line-through;
}

.pos-tx-time {
    font-family: var(--pos-font-display);
    font-size: 16px;
    font-weight: 600;
    min-width: 50px;
}

.pos-tx-info {
    flex: 1;
    min-width: 0;
}

.pos-tx-items {
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pos-tx-customer {
    font-size: 12px;
    color: var(--pos-text-muted);
}

.pos-tx-amount {
    font-family: var(--pos-font-display);
    font-size: 16px;
    font-weight: 700;
    min-width: 80px;
    text-align: right;
}

.pos-tx-payment {
    padding: 3px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.pos-tx-payment.cash { background: rgba(34,197,94,.15); color: var(--pos-cash); }
.pos-tx-payment.card { background: rgba(59,130,246,.15); color: var(--pos-card-pay); }
.pos-tx-payment.free { background: rgba(168,85,247,.15); color: var(--pos-free); }

.pos-tx-void {
    padding: 6px 14px;
    border-radius: var(--pos-radius-xs);
    background: var(--pos-danger-dim);
    color: var(--pos-danger);
    font-size: 12px;
    font-weight: 600;
    transition: all var(--pos-transition);
}

.pos-tx-void:hover {
    background: var(--pos-danger);
    color: #fff;
}

.pos-tx-detail {
    display: none;
    padding: 12px 18px;
    background: var(--pos-surface);
    border-radius: 0 0 var(--pos-radius-sm) var(--pos-radius-sm);
    margin-top: -8px;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--pos-text-muted);
}

.pos-tx-detail.open {
    display: block;
}

/* ── SumUp Screen ── */
.pos-sumup {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 40px;
}

.pos-sumup-icon {
    font-size: 64px;
    line-height: 1;
}

.pos-sumup-title {
    font-family: var(--pos-font-display);
    font-size: 24px;
    font-weight: 700;
    text-align: center;
}

.pos-sumup-amount {
    font-family: var(--pos-font-display);
    font-size: 42px;
    font-weight: 700;
    color: var(--pos-card-pay);
}

.pos-sumup-hint {
    font-size: 16px;
    color: var(--pos-text-muted);
    text-align: center;
}

@keyframes pos-pulse-ring {
    0% { transform: scale(0.8); opacity: 0.6; }
    50% { transform: scale(1.2); opacity: 0.2; }
    100% { transform: scale(0.8); opacity: 0.6; }
}

.pos-sumup-pulse {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(59,130,246,.2);
    border: 3px solid var(--pos-card-pay);
    animation: pos-pulse-ring 2s ease-in-out infinite;
}

.pos-sumup-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.pos-sumup-cancel {
    padding: 12px 28px;
    border-radius: var(--pos-radius-sm);
    background: var(--pos-card);
    color: var(--pos-text);
    font-family: var(--pos-font-display);
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all var(--pos-transition);
}

.pos-sumup-cancel:hover {
    background: var(--pos-card-hover);
}

.pos-sumup-retry {
    padding: 12px 28px;
    border-radius: var(--pos-radius-sm);
    background: var(--pos-card-pay);
    color: #fff;
    font-family: var(--pos-font-display);
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all var(--pos-transition);
}

.pos-sumup-retry:hover {
    background: #2563eb;
}

/* ── Loading Spinner ── */
.pos-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

@keyframes pos-spin {
    to { transform: rotate(360deg); }
}

.pos-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--pos-border);
    border-top-color: var(--pos-accent);
    border-radius: 50%;
    animation: pos-spin 600ms linear infinite;
}

/* ── Toast ── */
.pos-toast {
    position: fixed;
    bottom: 64px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 12px 24px;
    border-radius: var(--pos-radius-sm);
    background: var(--pos-card);
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    transition: all 300ms ease;
    z-index: 1000;
    pointer-events: none;
    border: 1px solid var(--pos-border);
}

.pos-toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.pos-toast.success { border-color: var(--pos-success); color: var(--pos-success); }
.pos-toast.error { border-color: var(--pos-danger); color: var(--pos-danger); }

/* ── Modal / Email Dialog ── */
.pos-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    backdrop-filter: blur(4px);
}

.pos-modal {
    background: var(--pos-surface);
    border-radius: var(--pos-radius);
    padding: 28px;
    width: 400px;
    max-width: 90vw;
}

.pos-modal h3 {
    font-family: var(--pos-font-display);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
}

.pos-modal input {
    width: 100%;
    margin-bottom: 16px;
}

.pos-modal-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.pos-modal-btn {
    padding: 10px 22px;
    border-radius: var(--pos-radius-xs);
    font-weight: 600;
    font-size: 14px;
    transition: all var(--pos-transition);
}

.pos-modal-btn.primary {
    background: var(--pos-accent);
    color: var(--pos-accent-text);
}

.pos-modal-btn.cancel {
    background: var(--pos-card);
}

/* ── Print Styles ── */
@media print {
    body > *:not(#tix-pos-app) { display: none !important; }
    #tix-pos-app {
        position: static;
        color: var(--pos-accent-text);
        background: #fff;
    }
    .pos-topbar, .pos-statusbar, .pos-back-btn, .pos-icon-btn,
    .pos-success-actions, .pos-reset-bar { display: none !important; }
    .pos-report { padding: 0; }
    .pos-card, .pos-kpi, .pos-report-section {
        background: #fff;
        border: 1px solid #ddd;
    }
    .pos-kpi-value, .pos-bar-fill { color: #000 !important; }
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .pos-sale {
        grid-template-columns: 1fr;
    }
    .pos-cart {
        border-left: none;
        border-top: 1px solid var(--pos-border);
        max-height: 45vh;
    }
    .pos-payment-methods {
        flex-direction: column;
        align-items: center;
    }
    .pos-payment-btn {
        width: 100%;
        max-width: 280px;
        height: 100px;
    }
}

/* ── Admin bar hide ── */
#wpadminbar { display: none !important; }
html { margin-top: 0 !important; }
