* { box-sizing: border-box; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
body { margin: 0; background-color: #f0f2f5; color: #333; }

/* SUCCESS POPUP OVERLAY */
.success-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(15, 23, 42, 0.85);
    display: flex; justify-content: center; align-items: center;
    z-index: 10000;
}
.success-card {
    background: #ffffff;
    padding: 35px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    text-align: center;
    width: 360px;
    animation: popIn 0.2s ease-out;
}
@keyframes popIn {
    0% { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
.success-icon {
    width: 70px; height: 70px;
    background: #dcfce7; color: #16a34a;
    border-radius: 50%; font-size: 40px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 15px auto; font-weight: bold;
}
.success-card h2 { margin: 0 0 5px 0; color: #0f172a; font-size: 24px; }
.success-method { color: #2563eb; font-weight: bold; margin: 0 0 20px 0; font-size: 16px; }
.success-details { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 12px; padding: 15px; }
.success-row { display: flex; justify-content: space-between; font-size: 16px; margin-bottom: 8px; color: #475569; }
.success-row.change { border-top: 2px dashed #cbd5e1; padding-top: 10px; margin-bottom: 0; color: #dc2626; font-size: 20px; }

/* MANUEL BELØB KNAP */
.btn-manual-add {
    background: #3b82f6; color: white; border: none;
    padding: 6px 12px; border-radius: 6px; font-size: 12px;
    font-weight: bold; cursor: pointer;
}
.btn-manual-add:active { background: #1d4ed8; }

/* PIN LOGIN SCREEN */
.pin-overlay {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    background: #1e293b;
    display: flex; justify-content: center; align-items: center;
    z-index: 9999;
}
.pin-card {
    background: #ffffff;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    text-align: center;
    width: 340px;
}
.pin-card h2 { margin-top: 0; color: #0f172a; font-size: 22px; }
.pin-card p { color: #64748b; font-size: 14px; margin-bottom: 20px; }
.pin-display {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 32px;
    letter-spacing: 12px;
    padding: 10px;
    margin-bottom: 20px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* STORT NUMMERTASTATUR (PIN-PAD & CASH-PAD) */
.pin-pad, .cash-pad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.pin-btn {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    font-size: 24px;
    font-weight: bold;
    padding: 18px 0;
    cursor: pointer;
    color: #1e293b;
    transition: background 0.1s;
}
.pin-btn:active { background: #cbd5e1; }
.pin-btn.clear { background: #fee2e2; color: #dc2626; border-color: #fca5a5; font-size: 20px; }
.pin-btn.submit { background: #dcfce7; color: #15803d; border-color: #86efac; font-size: 18px; }

/* KASSE / POS LAYOUT */
.pos-container { display: flex; height: 100vh; overflow: hidden; }

.pos-left { flex: 2; padding: 20px; overflow-y: auto; background: #f8fafc; border-right: 1px solid #e2e8f0; }
.top-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.user-info { font-weight: bold; color: #475569; }

.tabs { margin-bottom: 20px; display: flex; gap: 8px; flex-wrap: wrap; }
.tab-btn { padding: 12px 20px; font-size: 15px; font-weight: 600; cursor: pointer; border: 1px solid #cbd5e1; background: #fff; border-radius: 8px; color: #475569; }
.tab-btn.active { background: #2563eb; color: white; border-color: #2563eb; }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.product-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; text-align: center; padding: 12px; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.product-card:active { transform: scale(0.97); background: #f1f5f9; }
.product-card img { width: 100%; height: 75px; object-fit: contain; margin-bottom: 8px; }
.no-img { height: 75px; display: flex; align-items: center; justify-content: center; background: #f1f5f9; color: #94a3b8; font-size: 11px; margin-bottom: 8px; border-radius: 6px; }
.product-card h3 { font-size: 13px; margin: 0 0 4px 0; color: #1e293b; }
.product-card p { margin: 0; font-weight: bold; color: #16a34a; font-size: 14px; }

.pos-right { flex: 1; min-width: 360px; display: flex; flex-direction: column; background: #fff; box-shadow: -2px 0 10px rgba(0,0,0,0.05); overflow-y: auto; }
.cart-header { background: #0f172a; color: white; padding: 16px; font-size: 18px; text-align: center; font-weight: 600; }
.cart-items { flex: 1; min-height: 120px; overflow-y: auto; padding: 15px; }
.cart-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid #f1f5f9; font-size: 15px; }
.btn-del { background: #ef4444; color: white; border: none; border-radius: 6px; width: 28px; height: 28px; cursor: pointer; font-weight: bold; }

.cart-footer { padding: 20px; background: #f8fafc; border-top: 1px solid #e2e8f0; }
.total-row { display: flex; justify-content: space-between; font-size: 26px; font-weight: 800; color: #0f172a; margin-bottom: 15px; }

.calc-section { margin-bottom: 15px; padding: 15px; background: #fff; border: 1px solid #cbd5e1; border-radius: 12px; }
.calc-section label { font-size: 12px; color: #64748b; font-weight: bold; text-transform: uppercase; }
#cashReceived { width: 100%; padding: 10px; font-size: 26px; margin: 8px 0 12px 0; border: 1px solid #cbd5e1; border-radius: 8px; background: #f8fafc; font-weight: bold; text-align: right; color: #0f172a; }

.change-row { display: flex; justify-content: space-between; font-size: 20px; margin-top: 15px; color: #dc2626; font-weight: bold; }

.checkout-buttons { display: flex; flex-direction: row; gap: 10px; }
.checkout-buttons button { flex: 1; }
.btn-cash { background: #16a34a; color: white; border: none; padding: 18px 5px; font-size: 18px; font-weight: bold; border-radius: 8px; cursor: pointer; }
.btn-mobilepay { background: #2563eb; color: white; border: none; padding: 18px 5px; font-size: 18px; font-weight: bold; border-radius: 8px; cursor: pointer; }

/* ADMIN LAYOUT */
.admin-header { background: #0f172a; color: white; padding: 15px 30px; display: flex; justify-content: space-between; align-items: center; }
.admin-header h1 { margin: 0; font-size: 20px; }
.admin-nav { background: #1e293b; padding: 10px 30px; display: flex; gap: 20px; }
.admin-nav a { color: #94a3b8; text-decoration: none; font-weight: 600; font-size: 14px; padding: 6px 12px; border-radius: 6px; }
.admin-nav a.active, .admin-nav a:hover { color: white; background: #334155; }
.admin-container { padding: 30px; max-width: 1100px; margin: 0 auto; }

.card { background: white; padding: 24px; border-radius: 12px; border: 1px solid #e2e8f0; box-shadow: 0 1px 3px rgba(0,0,0,0.05); margin-bottom: 20px; }
table { width: 100%; border-collapse: collapse; margin-top: 15px; }
th, td { border-bottom: 1px solid #e2e8f0; padding: 12px; text-align: left; }
th { background-color: #f8fafc; color: #475569; font-size: 13px; text-transform: uppercase; }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 600; color: #334155; font-size: 14px; }
input[type="text"], input[type="number"], input[type="email"], select { padding: 10px; width: 100%; max-width: 400px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 15px; }
button.btn-primary { background: #2563eb; color: white; border: none; padding: 10px 20px; border-radius: 6px; font-weight: 600; cursor: pointer; }

@media (max-width: 768px) {
    .pos-container { flex-direction: column; height: auto; }
    .pos-left, .pos-right { flex: none; width: 100%; height: auto; }
}