/* Phone POS Scanner - Modern Design */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

:root {
    --bg-primary: #0c0f14;
    --bg-secondary: #151922;
    --bg-card: #1a1f29;
    --bg-elevated: #222831;
    --border: #2d3544;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent: #10b981;
    --accent-hover: #34d399;
    --accent-muted: rgba(16, 185, 129, 0.15);
    --success: #22c55e;
    --error: #ef4444;
    --error-muted: rgba(239, 68, 68, 0.15);
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --radius-xl: 24px;
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

* {
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    background-image: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(16, 185, 129, 0.08), transparent);
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all 0.2s ease;
}
.card:hover, .card:active {
    border-color: rgba(16, 185, 129, 0.3);
    box-shadow: 0 0 0 1px rgba(16, 185, 129, 0.1);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, #059669 100%);
    color: white;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
}
.btn-primary:hover, .btn-primary:active {
    background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

/* Inputs */
.input,
input.input,
select.input {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    transition: border-color 0.2s, box-shadow 0.2s;
}
.input:focus,
input.input:focus,
select.input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-muted);
}
.input::placeholder {
    color: var(--text-muted);
}
select.input {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.25em 1.25em;
    padding-right: 2.5rem;
}

/* Nav */
.nav-item {
    transition: all 0.2s ease;
    border-radius: var(--radius-md);
}
.nav-item.active {
    background: var(--accent-muted);
    color: var(--accent) !important;
}

/* Barcode scanner */
#reader {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}
#reader video {
    object-fit: cover !important;
}
#reader .qr-shaded-region {
    border-radius: 8px !important;
}

/* Safe area for notched phones */
.safe-area-pb {
    padding-bottom: max(0.5rem, env(safe-area-inset-bottom));
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-in {
    animation: fadeIn 0.3s ease forwards;
}

/* Receipt print styles */
@media print {
    body * { visibility: hidden; }
    #receipt-print-area, #receipt-print-area * { visibility: visible; }
    #receipt-print-area {
        position: absolute;
        left: 0; top: 0;
        width: 80mm !important;
        max-width: 80mm !important;
        font-family: 'Courier New', monospace !important;
        font-size: 12px !important;
        padding: 0; margin: 0;
        background: white !important;
        color: black !important;
    }
    body { background: white !important; }
    nav, header, .no-print, button { display: none !important; }
}
