* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: "Segoe UI", Arial, sans-serif;
}

body {
    background: #f8f5f1;
    color: #34403a;
}

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

.sidebar {
    width: 260px;
    background: #dce9df;
    padding: 28px 22px;
    border-right: 1px solid #cad8ce;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
}

.logo-icon {
    width: 48px;
    height: 48px;
    border-radius: 18px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 8px 20px rgba(63, 87, 72, 0.08);
}

.logo h2 {
    font-size: 20px;
    color: #34403a;
}

.logo p {
    font-size: 13px;
    color: #718277;
}

nav {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

nav a {
    text-decoration: none;
    color: #43564b;
    padding: 13px 16px;
    border-radius: 14px;
    transition: 0.2s ease;
    font-weight: 500;
}

nav a:hover {
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(63, 87, 72, 0.08);
}

.main-content {
    flex: 1;
    padding: 36px;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 26px;
}

.page-header h1 {
    font-size: 30px;
    color: #2f3d35;
    margin-bottom: 6px;
}

.page-header p {
    color: #76877d;
}

.card,
.form-card,
.qr-card,
.info-card,
.scanner-card,
.details-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 26px;
    box-shadow: 0 12px 30px rgba(70, 84, 75, 0.08);
    border: 1px solid #edf1ed;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 14px;
    color: #65766c;
    font-size: 14px;
    background: #f3f7f4;
}

td {
    padding: 15px 14px;
    border-bottom: 1px solid #eef2ef;
    color: #3f4f46;
}

tr:last-child td {
    border-bottom: none;
}

.empty {
    text-align: center;
    color: #8a9a91;
    padding: 30px;
}

.btn {
    display: inline-block;
    text-decoration: none;
    border: none;
    cursor: pointer;
    padding: 12px 18px;
    border-radius: 14px;
    font-weight: 600;
    font-size: 14px;
    transition: 0.2s ease;
}

.btn.primary {
    background: #8fb9a8;
    color: #ffffff;
}

.btn.primary:hover {
    background: #79a894;
}

.btn.light {
    background: #eef4ef;
    color: #4f6257;
}

.btn.light:hover {
    background: #e0ebe3;
}

.btn.small {
    padding: 8px 12px;
    background: #edf5ef;
    color: #507263;
}

.status {
    padding: 7px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.status.available {
    background: #e4f5ea;
    color: #49815c;
}

.status.not-available {
    background: #fae8e6;
    color: #b0605a;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 22px;
}

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

.form-group.full {
    grid-column: 1 / -1;
}

label {
    color: #53675c;
    font-weight: 600;
    font-size: 14px;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #dbe4dd;
    background: #fbfcfb;
    padding: 13px 14px;
    border-radius: 14px;
    outline: none;
    color: #34403a;
    font-size: 15px;
}

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

input:focus,
select:focus,
textarea:focus {
    border-color: #8fb9a8;
    box-shadow: 0 0 0 4px rgba(143, 185, 168, 0.16);
}

.form-actions {
    margin-top: 26px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

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

.alert.error {
    background: #fae8e6;
    color: #a14d46;
}

.qr-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 24px;
}

.qr-card {
    text-align: center;
}

#qrcode {
    width: 260px;
    height: 260px;
    margin: 0 auto 18px auto;
    padding: 14px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 8px 20px rgba(70, 84, 75, 0.08);
}

#qrcode img,
#qrcode canvas {
    width: 100%;
    height: 100%;
}

.muted {
    color: #7d8d84;
    margin-top: 6px;
}

.qr-actions {
    margin-top: 22px;
    display: flex;
    justify-content: center;
    gap: 12px;
}

.info-card h3 {
    margin-bottom: 20px;
    color: #34403a;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 15px 0;
    border-bottom: 1px solid #edf1ed;
}

.info-row span,
.description-box span,
.details-grid span {
    color: #7a8b81;
    font-size: 14px;
}

.info-row strong,
.details-grid strong {
    color: #34403a;
}

.description {
    margin-top: 20px;
    color: #55645c;
    line-height: 1.7;
}

.scanner-card {
    max-width: 650px;
}

#reader {
    width: 100%;
}

.scan-result {
    margin-top: 18px;
    padding: 14px;
    border-radius: 14px;
    background: #f2f7f3;
    color: #506359;
}

.details-card {
    max-width: 850px;
}

.details-main {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 26px;
}

.food-icon {
    width: 64px;
    height: 64px;
    border-radius: 22px;
    background: #edf5ef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.details-grid div {
    background: #f8faf8;
    border: 1px solid #eef2ef;
    padding: 18px;
    border-radius: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.description-box {
    background: #f8faf8;
    border: 1px solid #eef2ef;
    padding: 18px;
    border-radius: 18px;
    margin-top: 18px;
}

.description-box p {
    margin-top: 8px;
    color: #44534a;
    line-height: 1.7;
}

@media (max-width: 900px) {
    .app-shell {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .qr-layout,
    .form-grid,
    .details-grid {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }
}