* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    background: #fff;
    min-height: 100vh;
    font-family: 'Segoe UI', sans-serif;
    color: #333;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

.container { max-width: 960px; margin: 0 auto; padding: 1.5rem; }
h1 { text-align: center; margin-bottom: 1.5rem; font-size: 1.5rem; color: #0654ba; }

/* Auth banner */
.auth-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: #fef9e7;
    border: 1px solid #f0c040;
    border-radius: 8px;
    color: #856404;
    font-weight: bold;
    font-size: 0.95rem;
}

.auth-banner button {
    background: #0654ba;
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
}

/* Toolbar */
.toolbar {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    align-items: center;
}

.toolbar .status {
    margin-left: auto;
    font-size: 0.9rem;
    color: #888;
}

.toolbar .status.ok { color: #16a34a; }

/* Buttons */
button {
    padding: 0.7rem 1.2rem;
    border: none;
    border-radius: 8px;
    background: #0654ba;
    color: #fff;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}
button:hover { background: #0543a0; }
button:disabled {
    background: #aaa;
    cursor: not-allowed;
}

/* Item list */
.item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.75rem;
    margin-bottom: 0.25rem;
    border-bottom: 1px solid #eee;
}
.item:hover { background: #f5f8fd; }

.item img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.item .no-img {
    width: 48px;
    height: 48px;
    background: #eee;
    border-radius: 6px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bbb;
    font-size: 0.7rem;
}

.item .title {
    flex: 1;
    font-size: 1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.item .price {
    font-size: 1rem;
    font-weight: bold;
    width: 100px;
    text-align: right;
    flex-shrink: 0;
}

.item .qty {
    font-size: 0.95rem;
    font-weight: bold;
    width: 60px;
    text-align: center;
    flex-shrink: 0;
}
.item .qty.zero { color: #dc2626; }

.item a {
    color: #0654ba;
    text-decoration: none;
    font-size: 0.95rem;
    flex-shrink: 0;
}
.item a:hover { text-decoration: underline; }

.item .zero-btn {
    padding: 0.45rem 0.9rem;
    font-size: 0.85rem;
    background: #f3f4f6;
    color: #dc2626;
    border: 1px solid #dc2626;
}
.item .zero-btn:hover { background: #fde8ec; }
.item .zero-btn:disabled {
    background: #f3f4f6;
    color: #aaa;
    border-color: #ccc;
}

/* Empty state */
.empty {
    text-align: center;
    padding: 3rem;
    color: #888;
    font-size: 1.1rem;
}

/* Loading spinner */
.loading {
    text-align: center;
    padding: 2rem;
    color: #888;
}

/* Count */
.count {
    text-align: center;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #888;
}

/* Mobile */
@media (max-width: 600px) {
    .container { padding: 1rem; }
    h1 { font-size: 1.3rem; margin-bottom: 1rem; }

    .toolbar { flex-wrap: wrap; }

    .item {
        flex-wrap: wrap;
        gap: 0.5rem 0.75rem;
        padding: 0.75rem 0.5rem;
    }
    .item img, .item .no-img { width: 44px; height: 44px; }
    .item .title {
        flex-basis: calc(100% - 56px);
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .item .price { width: auto; text-align: left; }
    .item .qty { width: auto; text-align: left; }
    .item a { font-size: 0.9rem; }
    .item .zero-btn { margin-left: auto; }
}
