* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f6f7fb;
    color: #1d1d1d;
}

.app-shell {
    min-height: 100vh;
}

.topbar {
    background: #111827;
    color: #fff;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.brand {
    font-size: 20px;
    font-weight: bold;
}

.top-nav {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.top-nav a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
}

.container {
    max-width: 1100px;
    margin: 30px auto;
    padding: 0 16px 40px;
}

.card {
    background: #fff;
    border-radius: 14px;
    padding: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.06);
    margin-bottom: 20px;
}

.page-title {
    margin: 0 0 10px;
    font-size: 28px;
}

.muted {
    color: #6b7280;
}

.grid {
    display: grid;
    gap: 16px;
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.location-card {
    border: 1px solid #ececec;
    border-radius: 12px;
    padding: 18px;
    background: #fff;
}

.location-card h3 {
    margin-top: 0;
}

.btn {
    display: inline-block;
    padding: 12px 18px;
    border: none;
    border-radius: 10px;
    background: #111827;
    color: #fff;
    text-decoration: none;
    cursor: pointer;
    font-weight: bold;
}

.btn-secondary {
    background: #374151;
}

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

.btn-success {
    background: #059669;
}

.btn-warning {
    background: #d97706;
}

.btn-danger {
    background: #dc2626;
}

.actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.info-badge {
    display: inline-block;
    margin-top: 8px;
    background: #f3f4f6;
    color: #111827;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 13px;
}

.product-row {
    display: grid;
    grid-template-columns: 90px 1.5fr 120px 140px 140px;
    gap: 14px;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding: 16px 0;
}

.product-row.order-row {
    grid-template-columns: 90px 1.7fr 120px 160px;
}

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

.product-image {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 10px;
    background: #f1f1f1;
    border: 1px solid #eaeaea;
}

.product-name {
    font-weight: bold;
    margin-bottom: 6px;
}

.product-meta {
    font-size: 13px;
    color: #6b7280;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

input[type="text"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 14px;
}

textarea {
    min-height: 90px;
    resize: vertical;
}

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

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

th, td {
    border-bottom: 1px solid #ececec;
    text-align: left;
    padding: 12px;
    vertical-align: top;
}

th {
    background: #f9fafb;
}

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

.alert-success {
    background: #dcfce7;
    color: #166534;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
}

.header-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

@media (max-width: 820px) {
    .product-row,
    .product-row.order-row {
        grid-template-columns: 1fr;
    }

    .product-image {
        width: 90px;
        height: 90px;
    }
}