:root {
    --bg: #0f172a;
    --card: #1e293b;
    --primary: #fbbf24;
    --text: #f8fafc;
    --text-dim: #94a3b8;
    --accent: #f59e0b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
}

.container {
    padding: 20px;
    max-width: 500px;
    margin: 0 auto;
}

.screen {
    display: none;
    min-height: 100vh;
}

.screen.active {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* LOGIN SCREEN */
#login-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #020617 100%);
}

.login-card {
    width: 90%;
    max-width: 400px;
    background: var(--card);
    padding: 40px 30px;
    border-radius: 24px;
    text-align: center;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.05);
}

.logo {
    font-size: 42px;
    font-weight: 900;
    letter-spacing: -2px;
    color: var(--primary);
    margin-bottom: 20px;
}

h2 { font-size: 24px; margin-bottom: 8px; }
p { color: var(--text-dim); font-size: 14px; margin-bottom: 30px; }

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-dim);
}

.input-group input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    transition: 0.3s;
}

.input-group input:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.1);
}

button {
    cursor: pointer;
    transition: 0.3s;
}

#btn-login {
    width: 100%;
    padding: 16px;
    background: var(--primary);
    color: #000;
    border: none;
    border-radius: 12px;
    font-weight: 800;
    font-size: 16px;
    margin-top: 10px;
}

#btn-login:active { transform: scale(0.98); }

/* DASHBOARD */
header {
    background: var(--card);
    padding: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 500px;
    margin: 0 auto;
}

.logo-small { font-weight: 900; color: var(--primary); font-size: 20px; }
.btn-logout { background: transparent; border: none; color: var(--text-dim); font-size: 18px; }

.welcome-section { margin: 30px 0; }
.welcome-section h1 { font-size: 28px; }

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--card);
    padding: 20px;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
}

.stat-card.highlight {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

.stat-card.highlight .stat-label,
.stat-card.highlight .stat-value {
    color: #000;
}

.stat-label { font-size: 11px; color: var(--text-dim); text-transform: uppercase; font-weight: 700; margin-bottom: 8px; }
.stat-value { font-size: 20px; font-weight: 900; }

.action-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 40px;
}

.btn-primary {
    background: var(--primary);
    color: #000;
    border: none;
    padding: 18px;
    border-radius: 16px;
    font-weight: 800;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-secondary {
    background: #334155;
    color: white;
    border: none;
    padding: 18px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.recent-sales h3 { font-size: 18px; margin-bottom: 15px; }
.empty-state {
    padding: 40px;
    text-align: center;
    color: var(--text-dim);
    background: rgba(255,255,255,0.02);
    border: 2px dashed #334155;
    border-radius: 20px;
    font-size: 14px;
}

/* MODALS */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(8px);
    z-index: 100;
    align-items: center;
    justify-content: center;
}

.modal.active { display: flex; }

.modal-content {
    background: var(--card);
    width: 90%;
    max-width: 400px;
    border-radius: 24px;
    padding: 30px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.modal-header h2 { font-size: 20px; margin: 0; }
.modal-header button { background: transparent; border: none; color: var(--text-dim); font-size: 30px; line-height: 1; }

.modal-body label { display: block; margin-bottom: 8px; font-size: 13px; color: var(--text-dim); font-weight: 600; }
.modal-body input {
    width: 100%;
    padding: 15px;
    background: #0f172a;
    border: 1px solid #334155;
    border-radius: 12px;
    color: white;
    margin-bottom: 20px;
}

.text-center { text-align: center; }
#qr-container img {
    width: 200px;
    height: 200px;
    margin: 0 auto 20px;
    border: 10px solid white;
    border-radius: 10px;
}

.copy-label { font-size: 12px; color: var(--text-dim); margin-bottom: 8px; }
.copy-box {
    background: #0f172a;
    padding: 15px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border: 1px solid #334155;
    cursor: pointer;
}

.copy-box span {
    font-family: monospace;
    font-size: 12px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80%;
}

.success-hint { font-size: 12px; color: #4ade80; }
