:root {
    --bg-base: #f5f2e8;
    --bg-soft: #fffaf0;
    --surface: #ffffff;
    --surface-alt: #f8f5ec;
    --text-main: #23351f;
    --text-muted: #5f6f59;
    --accent: #2f8f46;
    --accent-soft: #dcf2de;
    --line: #d8decf;
    --shadow: 0 14px 32px rgba(35, 53, 31, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 20% 10%, #fff5dc 0%, transparent 40%),
        radial-gradient(circle at 80% 90%, #e5f7e7 0%, transparent 35%),
        var(--bg-base);
    color: var(--text-main);
}

.app-shell {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

.sidebar {
    background: linear-gradient(180deg, #1f4726 0%, #2e6a38 100%);
    color: #edf8ef;
    padding: 2rem 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.brand-kicker {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.74rem;
    opacity: 0.9;
}

.brand h1 {
    margin: 0.45rem 0 0;
    font-size: 1.5rem;
    line-height: 1.25;
}

.menu {
    display: grid;
    gap: 0.7rem;
}

.menu-link {
    text-decoration: none;
    color: #f4fff4;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.7rem;
    padding: 0.78rem 0.9rem;
    font-weight: 600;
    transition: transform 0.2s ease, background 0.2s ease;
}

.menu-link:hover,
.menu-link:focus {
    transform: translateX(3px);
    background: rgba(255, 255, 255, 0.16);
}

.menu-link.is-active {
    background: rgba(255, 255, 255, 0.22);
}

.sidebar-footer {
    margin-top: auto;
    font-size: 0.92rem;
    opacity: 0.9;
}

.content {
    padding: 2rem;
}

.topbar {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 1rem;
    box-shadow: var(--shadow);
    padding: 1.4rem;
}

.topbar h2 {
    margin: 0;
    font-size: 1.55rem;
}

.topbar p {
    margin: 0.45rem 0 0;
    color: var(--text-muted);
}

.modules-grid {
    margin-top: 1.3rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.module-card {
    background: var(--surface-alt);
    border: 1px solid var(--line);
    border-radius: 1rem;
    padding: 1.15rem;
}

.module-tag {
    display: inline-block;
    margin-bottom: 0.65rem;
    background: var(--accent-soft);
    color: #1d5f2e;
    font-weight: 700;
    padding: 0.3rem 0.55rem;
    border-radius: 999px;
    font-size: 0.74rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.module-card h3 {
    margin: 0;
    font-size: 1.15rem;
}

.module-card p {
    margin: 0.6rem 0 0;
    color: var(--text-muted);
    line-height: 1.5;
}

.slot-area {
    margin-top: 1.3rem;
    background: var(--surface);
    border: 1px dashed var(--line);
    border-radius: 1rem;
    min-height: 200px;
    padding: 1rem;
}

.pos-grid,
.pos-lists {
    display: grid;
    gap: 1rem;
}

.pos-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 1rem;
}

.pos-lists {
    grid-template-columns: 1fr;
}

.pos-card {
    background: var(--surface-alt);
    border: 1px solid var(--line);
    border-radius: 0.9rem;
    padding: 1rem;
}

.pos-card h3 {
    margin: 0;
}

.pos-help {
    margin: 0.45rem 0 1rem;
    color: var(--text-muted);
}

.pos-form label {
    display: block;
    font-weight: 700;
    margin-bottom: 0.45rem;
}

.pos-inline {
    display: flex;
    gap: 0.6rem;
}

.pos-inline input {
    flex: 1;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 0.55rem;
    padding: 0.65rem 0.7rem;
    font: inherit;
}

.pos-inline button {
    border: 0;
    border-radius: 0.55rem;
    background: var(--accent);
    color: #fff;
    padding: 0.65rem 0.95rem;
    font-weight: 700;
    cursor: pointer;
}

.scale-box {
    border-radius: 0.8rem;
    border: 1px solid #bfdabf;
    background: #ecf9ed;
    padding: 0.9rem;
}

.scale-weight {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
}

.scale-price,
.scale-total {
    margin: 0.3rem 0 0;
}

.scale-total {
    font-weight: 700;
}

.pos-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border-radius: 0.7rem;
    overflow: hidden;
}

.pos-table th,
.pos-table td {
    text-align: left;
    padding: 0.7rem 0.65rem;
    border-bottom: 1px solid var(--line);
    font-size: 0.95rem;
}

.pos-table th {
    background: #eef4e7;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.pos-table tbody tr:last-child td {
    border-bottom: 0;
}

@media (max-width: 900px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        gap: 1.2rem;
        padding: 1.2rem;
    }

    .modules-grid {
        grid-template-columns: 1fr;
    }

    .content {
        padding: 1.2rem;
    }

    .pos-grid {
        grid-template-columns: 1fr;
    }

    .pos-inline {
        flex-direction: column;
    }
}
