* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    background: #f4f6fb;
    color: #1f2937;
}

a {
    text-decoration: none;
    color: inherit;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 24px;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.login-header h1 {
    margin: 0 0 8px;
    font-size: 28px;
}

.login-header p {
    margin: 0 0 24px;
    color: #6b7280;
}

.login-form label {
    display: block;
    margin-bottom: 16px;
}

.login-form span {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    color: #4b5563;
}

.login-form input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 15px;
}

.login-form input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.login-form .remember-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    cursor: pointer;
    user-select: none;
}

.login-form .remember-row input[type="checkbox"] {
    width: auto;
    margin: 0;
    cursor: pointer;
}

.login-form .remember-row span {
    margin: 0;
    font-size: 14px;
    color: #4b5563;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    transition: 0.2s ease;
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.btn-primary {
    width: 100%;
    background: #667eea;
    color: #fff;
    font-size: 16px;
    padding: 12px;
}

.btn-primary:hover {
    background: #5a6fd6;
}

.btn-secondary {
    background: #e5e7eb;
    color: #111827;
}

.btn-secondary:hover {
    background: #d1d5db;
}

.btn-danger {
    background: #ef4444;
    color: #fff;
}

.btn-danger:hover {
    background: #dc2626;
}

.alert {
    padding: 12px 14px;
    border-radius: 10px;
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-error {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.topbar {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 10;
}

.topbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand h1 {
    margin: 0;
    font-size: 22px;
}

.user-badge {
    display: inline-block;
    margin-top: 4px;
    font-size: 13px;
    color: #6b7280;
}

.topbar-actions {
    display: flex;
    gap: 10px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 20px 40px;
}

.summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.summary-item {
    background: #fff;
    border-radius: 12px;
    padding: 18px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.05);
}

.summary-item .label {
    display: block;
    color: #6b7280;
    font-size: 13px;
    margin-bottom: 8px;
}

.summary-item strong {
    font-size: 22px;
}

.category-section {
    margin-bottom: 28px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
}

.product-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
    display: flex;
    flex-direction: column;
}

.product-image {
    height: 180px;
    background: #f3f4f6;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-placeholder {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
}

.product-body {
    padding: 16px;
}

.product-body h3 {
    margin: 0 0 12px;
    font-size: 16px;
    line-height: 1.4;
}

.product-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 8px;
}

.price {
    color: #ef4444;
    font-weight: 700;
    font-size: 16px;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.tag {
    background: #eef2ff;
    color: #4338ca;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 999px;
}

@media (max-width: 768px) {
    .summary {
        grid-template-columns: 1fr;
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .topbar-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}
