* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f7;
    color: #1d1d1f;
    min-height: 100vh;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 24px 16px;
}

h1 {
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    color: #10679d;
    margin-bottom: 4px;
}

h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 16px;
}

.subtitle {
    text-align: center;
    color: #86868b;
    font-size: 14px;
    margin-bottom: 24px;
}

/* Join Form */
.join-form {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.join-form input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d2d2d7;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 10px;
    -webkit-appearance: none;
}

.join-form input:focus {
    outline: none;
    border-color: #10679d;
    box-shadow: 0 0 0 3px rgba(16, 103, 157, 0.15);
}

.btn {
    display: block;
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background: #10679d;
    color: white;
}

.btn-primary:disabled {
    background: #a0c4d8;
    cursor: default;
}

.btn-primary:not(:disabled):active {
    background: #0d5580;
}

/* Restaurant Header */
.restaurant-header {
    text-align: center;
    padding: 16px 0;
    margin-bottom: 8px;
}

.restaurant-header .name {
    font-size: 22px;
    font-weight: 700;
}

.restaurant-header .code {
    font-size: 13px;
    color: #86868b;
    margin-top: 4px;
}

/* Items List */
.items-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.items-card .section-title {
    padding: 14px 16px 8px;
    font-size: 13px;
    font-weight: 600;
    color: #86868b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.item-row {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: background 0.15s;
}

.item-row:last-child {
    border-bottom: none;
}

.item-row:active {
    background: #f5f5f7;
}

.item-row.claimed {
    background: rgba(16, 103, 157, 0.05);
}

.item-row .check {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #d2d2d7;
    margin-right: 12px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.item-row.claimed .check {
    background: #10679d;
    border-color: #10679d;
}

.item-row.claimed .check::after {
    content: '✓';
    color: white;
    font-size: 14px;
    font-weight: 700;
}

.item-name {
    flex: 1;
    font-size: 15px;
}

.item-price {
    font-size: 15px;
    font-weight: 500;
    color: #86868b;
    margin-left: 8px;
    font-variant-numeric: tabular-nums;
}

.claim-dots {
    display: flex;
    margin-left: 8px;
    gap: 0;
}

.claim-dot {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #10679d;
    color: white;
    font-size: 9px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: -4px;
    border: 2px solid white;
}

.claim-dot:first-child {
    margin-left: 0;
}

/* Status */
.status-bar {
    text-align: center;
    padding: 12px;
    font-size: 13px;
    color: #86868b;
}

.status-bar.finalized {
    color: #10679d;
    font-weight: 600;
}

/* Loading */
.loading {
    text-align: center;
    padding: 60px 20px;
    color: #86868b;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e0e0e0;
    border-top-color: #10679d;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Error */
.error {
    text-align: center;
    padding: 40px 20px;
    color: #ff3b30;
}

/* Participants */
.participants {
    background: white;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.participants .section-title {
    font-size: 13px;
    font-weight: 600;
    color: #86868b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
}

.participant-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
}

.participant-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #10679d;
    color: white;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.participant-name {
    font-size: 14px;
}

.participant-venmo {
    font-size: 12px;
    color: #86868b;
}
