* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

body {
    background-color: #f8fafc;
    color: #0f172a;
    line-height: 1.5;
}

.page-wrapper {
    max-width: 460px;
    margin: 32px auto;
    padding: 0 16px;
}

.brand-header {
    text-align: center;
    margin-bottom: 20px;
}

.water-badge {
    display: inline-block;
    background: #e0f2fe;
    color: #0369a1;
    font-weight: 700;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 8px;
}

.brand-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
}

.subtitle {
    font-size: 0.88rem;
    color: #64748b;
    margin-top: 4px;
}

.dispense-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.rule-banner {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    color: #0c4a6e;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 0.85rem;
    margin-bottom: 20px;
    text-align: center;
}

.field-group label {
    display: block;
    font-size: 0.86rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
}

.phone-input-wrap {
    display: flex;
    align-items: center;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    overflow: hidden;
    background: #ffffff;
    margin-bottom: 16px;
}

.phone-input-wrap:focus-within {
    border-color: #0284c7;
}

.country-code {
    background: #f1f5f9;
    color: #475569;
    font-weight: 600;
    padding: 12px 14px;
    border-right: 1px solid #cbd5e1;
    font-size: 1rem;
}

.phone-input-wrap input {
    width: 100%;
    border: none;
    outline: none;
    padding: 12px 14px;
    font-size: 1.1rem;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.btn-primary {
    width: 100%;
    background: #0284c7;
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 14px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.btn-primary:hover {
    background: #0369a1;
}

.btn-primary:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

.status-box {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 0.88rem;
}

.status-box.hidden {
    display: none;
}

.status-box.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.status-box.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.status-box.warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.steps-info {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.83rem;
    color: #475569;
}

.step-item span {
    width: 22px;
    height: 22px;
    background: #e0f2fe;
    color: #0284c7;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.site-footer {
    margin-top: 16px;
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #64748b;
}

.site-footer a {
    color: #0284c7;
    text-decoration: none;
    font-weight: 600;
}

/* Admin Styles */
.admin-container {
    max-width: 1040px;
    margin: 28px auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.admin-topbar {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.admin-topbar h1 {
    font-size: 1.3rem;
}

.admin-topbar p {
    font-size: 0.85rem;
    color: #64748b;
}

.btn-outline {
    padding: 8px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    text-decoration: none;
    color: #0f172a;
    font-size: 0.88rem;
    font-weight: 600;
}

.stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.stat-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px 20px;
}

.stat-card span {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 600;
}

.stat-card h2 {
    font-size: 1.65rem;
    color: #0284c7;
    margin-top: 4px;
}

.qr-section {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
}

.qr-card img {
    width: 150px;
    height: 150px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 6px;
}

.qr-details h3 {
    font-size: 1.05rem;
    margin-bottom: 6px;
}

.qr-details p {
    font-size: 0.86rem;
    color: #64748b;
    margin-bottom: 10px;
}

.url-box {
    background: #f1f5f9;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.82rem;
    color: #334155;
    word-break: break-all;
}

.table-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
}

.table-card h3 {
    margin-bottom: 14px;
    font-size: 1.05rem;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

th, td {
    text-align: left;
    padding: 11px 12px;
    border-bottom: 1px solid #f1f5f9;
}

th {
    background: #f8fafc;
    color: #475569;
    font-weight: 600;
}

.pill {
    font-size: 0.78rem;
    font-weight: 600;
}

.pill.dispensed { color: #059669; }
.pill.queued { color: #0284c7; }
