* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Inter, Arial, sans-serif;
    background: #f8f2ea;
    color: #3b2b25;
}

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

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 260px;
    min-height: 100vh;
    padding: 24px;
    background: #3a241e;
    color: #fff8ef;
}

.brand {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 32px;
}

.logo {
    width: 48px;
    height: 48px;
    border-radius: 18px;
    background: #d6a66a;
    color: #3a241e;
    display: grid;
    place-items: center;
    font-weight: 800;
}

.logo.big {
    margin: 0 auto 16px;
    width: 64px;
    height: 64px;
}

.brand h2 {
    margin: 0;
}

.brand p {
    margin: 3px 0 0;
    opacity: .75;
}

.sidebar nav {
    display: grid;
    gap: 8px;
}

.sidebar nav a {
    padding: 13px 14px;
    border-radius: 14px;
    background: rgba(255,255,255,.07);
}

.sidebar nav a:hover {
    background: rgba(255,255,255,.14);
}

.sidebar .logout {
    margin-top: 24px;
    background: rgba(255,120,120,.18);
}

.main {
    margin-left: 260px;
    padding: 32px;
}

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

.page-header h1 {
    margin: 0;
    font-size: 32px;
}

.page-header p {
    margin: 6px 0 0;
    color: #7c665b;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(140px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat,
.card,
.mini-card,
.meal-card {
    background: #fffaf4;
    border: 1px solid #ead8c1;
    border-radius: 22px;
    box-shadow: 0 10px 30px rgba(72, 45, 32, .07);
}

.stat {
    padding: 20px;
}

.stat span {
    display: block;
    color: #806b5f;
    font-size: 13px;
}

.stat strong {
    display: block;
    font-size: 30px;
    margin-top: 8px;
}

.card {
    padding: 24px;
    margin-bottom: 22px;
}

.card h2 {
    margin-top: 0;
}

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

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

th {
    text-align: left;
    color: #7c665b;
    font-size: 13px;
    padding: 14px;
    border-bottom: 1px solid #ead8c1;
}

td {
    padding: 14px;
    border-bottom: 1px solid #f0e3d4;
}

.badge {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 999px;
    background: #efe1cf;
    color: #5c4338;
    font-size: 12px;
    font-weight: 700;
}

.btn,
button {
    border: 0;
    background: #6e3b2e;
    color: white;
    padding: 12px 16px;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
}

.btn.small {
    padding: 8px 12px;
    font-size: 13px;
}

button.danger {
    background: #a83e3e;
}

form {
    display: grid;
    gap: 12px;
}

label {
    font-weight: 700;
    color: #5c4338;
}

input,
textarea,
select {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #e5cfb7;
    border-radius: 14px;
    background: #fffdf9;
    font: inherit;
}

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

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.detail-grid {
    display: grid;
    gap: 8px;
}

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

.mini-card {
    padding: 18px;
}

.package-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 12px;
}

.actions,
.inline-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.image-grid,
.meal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
}

.image-grid img,
.meal-card img {
    width: 100%;
    height: 150px;
    border-radius: 16px;
    object-fit: cover;
    border: 1px solid #ead8c1;
}

.meal-card {
    padding: 14px;
}

.meal-card h3 {
    margin: 10px 0 4px;
}

.meal-card p {
    margin: 0 0 8px;
    color: #806b5f;
    font-size: 13px;
}

.login-body {
    display: grid;
    place-items: center;
    min-height: 100vh;
    background: radial-gradient(circle at top left, #f2ddc4, #f8f2ea 50%, #fffaf4);
}

.login-card {
    width: min(420px, 92vw);
    background: #fffaf4;
    border: 1px solid #ead8c1;
    border-radius: 28px;
    padding: 34px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(72,45,32,.12);
}

.login-card form {
    margin-top: 24px;
    text-align: left;
}

.alert {
    background: #ffe3e3;
    color: #9f2929;
    padding: 12px;
    border-radius: 12px;
    margin-top: 16px;
}

.chat-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 22px;
}

.chat-list {
    max-height: 75vh;
    overflow-y: auto;
}

.chat-person {
    display: block;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid #ead8c1;
    margin-bottom: 10px;
    background: #fffdf9;
}

.chat-person span {
    display: block;
    color: #806b5f;
    font-size: 13px;
    margin-top: 4px;
}

.chat-window {
    min-height: 75vh;
    display: flex;
    flex-direction: column;
}

.messages {
    flex: 1;
    overflow-y: auto;
    display: grid;
    gap: 10px;
    padding: 12px 0;
}

.message {
    max-width: 70%;
    padding: 12px 14px;
    border-radius: 16px;
}

.message.inbound {
    background: #efe1cf;
    justify-self: start;
}

.message.outbound {
    background: #6e3b2e;
    color: white;
    justify-self: end;
}

.message p {
    margin: 0 0 6px;
}

.message small {
    opacity: .75;
}

.chat-form {
    display: flex;
    gap: 10px;
}

.chat-form input {
    flex: 1;
}

.empty-state {
    display: grid;
    place-items: center;
    flex: 1;
    color: #806b5f;
}

@media (max-width: 1000px) {
    .sidebar {
        position: static;
        width: 100%;
        min-height: auto;
    }

    .main {
        margin-left: 0;
        padding: 20px;
    }

    .stats-grid,
    .grid-2,
    .chat-layout {
        grid-template-columns: 1fr;
    }

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