* { box-sizing: border-box; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    background: #f5f6f8;
    color: #222;
}
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

/* Nav bar */
.topnav {
    background: #1e293b;
    color: #fff;
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}
.topnav-brand { font-weight: 700; font-size: 1.1rem; }
.topnav-links a {
    color: #cbd5e1;
    text-decoration: none;
    margin-right: 16px;
    padding: 6px 10px;
    border-radius: 6px;
}
.topnav-links a.active, .topnav-links a:hover { background: #334155; color: #fff; }
.topnav-user { font-size: 0.9rem; color: #cbd5e1; }
.topnav-user a { color: #93c5fd; }

/* Auth pages */
.auth-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.auth-box {
    background: #fff;
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    width: 320px;
}
.auth-box input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
}
.auth-box button {
    width: 100%;
    padding: 12px;
    background: #16a34a;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
}

/* POS tiles */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 10px;
    margin-bottom: 24px;
}
.tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px 10px;
    cursor: pointer;
    text-align: center;
    min-height: 80px;
    position: relative;
    user-select: none;
}
.tile input { position: absolute; opacity: 0; }
.tile:has(input:checked) {
    border-color: #16a34a;
    background: #f0fdf4;
}
.tile-name { font-weight: 600; margin-bottom: 4px; }
.tile-price { color: #666; font-size: 0.9rem; }

.qty-row { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.qty-row button {
    width: 44px; height: 44px;
    font-size: 1.3rem;
    border-radius: 8px;
    border: 1px solid #ccc;
    background: #fff;
    cursor: pointer;
}
.qty-row input {
    width: 70px;
    height: 44px;
    text-align: center;
    font-size: 1.1rem;
    border: 1px solid #ccc;
    border-radius: 8px;
}

.complete-btn {
    width: 100%;
    padding: 16px;
    background: #16a34a;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1.15rem;
    font-weight: 700;
    cursor: pointer;
}
.complete-btn:active { background: #15803d; }

/* Summary page */
.tabs { margin-bottom: 16px; }
.tabs a {
    display: inline-block;
    padding: 8px 16px;
    text-decoration: none;
    color: #333;
    border: 1px solid #ccc;
    border-radius: 6px;
    margin-right: 8px;
}
.tabs a.active { background: #1e293b; color: #fff; border-color: #1e293b; }

.filter-row { margin-bottom: 20px; display: flex; gap: 10px; align-items: center; }
.filter-row input, .filter-row select { padding: 8px; border-radius: 6px; border: 1px solid #ccc; }
.filter-row button { padding: 8px 16px; border-radius: 6px; border: none; background: #1e293b; color: #fff; cursor: pointer; }

.stat-row { display: flex; gap: 14px; margin: 16px 0 28px; flex-wrap: wrap; }
.stat-box {
    background: #fff;
    border-radius: 10px;
    padding: 16px 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    flex: 1;
    min-width: 140px;
}
.stat-label { color: #666; font-size: 0.85rem; margin-bottom: 6px; }
.stat-value { font-size: 1.6rem; font-weight: 700; }

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 24px;
}
.data-table th, .data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    text-align: left;
}
.data-table th { background: #f1f5f9; }

/* Manage page forms */
.inline-form { display: flex; gap: 6px; align-items: center; }
.price-input { width: 80px; padding: 4px; }
.add-form {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    background: #fff;
    padding: 14px;
    border-radius: 8px;
    margin-bottom: 32px;
}
.add-form input, .add-form select { padding: 8px; border: 1px solid #ccc; border-radius: 6px; }
.add-form button { padding: 8px 16px; background: #1e293b; color: #fff; border: none; border-radius: 6px; cursor: pointer; }

.success { color: #15803d; background: #f0fdf4; padding: 10px 14px; border-radius: 6px; }
.error { color: #b91c1c; background: #fef2f2; padding: 10px 14px; border-radius: 6px; }

button { font-family: inherit; }
