:root {
    --green: #174c3c;
    --green-dark: #10382d;
    --green-light: #e7f2eb;
    --lime: #c7e870;
    --ink: #17251e;
    --muted: #5e6c64;
    --line: #dce5df;
    --background: #f7f9f6;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--ink);
    font-family: "Segoe UI", Arial, sans-serif;
    line-height: 1.55;
}

a {
    color: var(--green);
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    font-size: clamp(2.1rem, 4vw, 3.8rem);
    line-height: 1.12;
    letter-spacing: -0.035em;
}

h2 {
    font-size: clamp(1.45rem, 2.4vw, 2rem);
    line-height: 1.2;
}

.container {
    width: min(1140px, calc(100% - 40px));
    margin: 0 auto;
}

.narrow {
    max-width: 800px;
}

.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--line);
}

.header-content,
.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.header-content {
    min-height: 76px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--ink);
    font-size: 1rem;
    font-weight: 800;
    text-decoration: none;
}

.brand-mark {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 10px;
    background: var(--green);
    color: var(--white);
    font-size: 1.4rem;
}

nav {
    display: flex;
    gap: 24px;
}

nav a {
    color: var(--muted);
    font-weight: 600;
    text-decoration: none;
}

nav a:hover,
.back-link:hover {
    color: var(--green);
}

.hero {
    padding: 86px 0;
    background: var(--green-dark);
    color: var(--white);
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr;
    align-items: center;
    gap: 70px;
}

.hero h1 {
    max-width: 680px;
}

.lead {
    max-width: 620px;
    color: #d8e8dd;
    font-size: 1.2rem;
}

.lead-dark {
    max-width: 760px;
    color: var(--muted);
    font-size: 1.1rem;
}

.eyebrow {
    color: #48936a;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.hero .eyebrow {
    color: var(--lime);
}

.hero-card {
    padding: 34px;
    border: 1px solid #638b73;
    border-radius: 22px;
    background: #20513d;
}

.hero-card h2 {
    margin-bottom: 12px;
}

.hero-card p,
.hero-card small {
    color: #d8e8dd;
}

.hero-card-icon {
    display: block;
    margin-bottom: 22px;
    color: var(--lime);
    font-size: 3.5rem;
    line-height: 1;
}

.hero-card-line {
    height: 1px;
    margin: 26px 0 18px;
    background: #638b73;
}

.section {
    padding: 74px 0;
}

.section-soft {
    background: var(--green-light);
}

.panel,
.info-card {
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--white);
    box-shadow: 0 10px 30px rgba(20, 50, 30, 0.04);
}

.panel p:last-child {
    margin-bottom: 0;
}

.three-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 28px;
}

.step-number {
    color: #408b61;
    font-weight: 800;
}

.info-card h3 {
    margin: 12px 0 8px;
}

.info-card p {
    margin-bottom: 0;
    color: var(--muted);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: 9px;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
}

.button-primary,
.button-small {
    background: var(--green);
    color: var(--white);
}

.button-primary:hover,
.button-small:hover {
    background: var(--green-dark);
}

.button-light {
    background: var(--lime);
    color: var(--green-dark);
}

.button-outline {
    border-color: var(--green);
    background: var(--white);
    color: var(--green);
}

.button-small {
    min-height: 38px;
    padding: 6px 12px;
    font-size: 0.9rem;
}

.full-width {
    width: 100%;
}

.field-label {
    display: block;
    margin: 16px 0 6px;
    font-weight: 700;
}

.field-help,
.muted {
    color: var(--muted);
    font-size: 0.93rem;
}

input,
select {
    width: 100%;
    min-height: 43px;
    padding: 9px 11px;
    border: 1px solid #b8c8bd;
    border-radius: 8px;
    background: var(--white);
    color: var(--ink);
    font: inherit;
}

input:focus,
select:focus {
    outline: 2px solid #8ecba2;
    outline-offset: 1px;
}

.upload-form {
    margin-top: 24px;
}

.upload-form .button {
    margin-top: 10px;
}

.notice {
    margin: 22px 0;
    padding: 14px 18px;
    border-radius: 9px;
    font-weight: 600;
}

.notice-error {
    border: 1px solid #e7aaaa;
    background: #fff0f0;
    color: #8a2424;
}

.notice-warning {
    border: 1px solid #e8d7a4;
    background: #fff9e7;
    color: #67531d;
}

.notice-success {
    border: 1px solid #abd4b8;
    background: #ecf8ef;
    color: #216440;
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    font-weight: 700;
    text-decoration: none;
}

.work-grid,
.admin-grid {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    align-items: start;
    gap: 24px;
    margin-top: 30px;
}

.admin-grid {
    grid-template-columns: 1fr 1.2fr;
}

.result-image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
    background: #e8eee9;
}

.image-panel {
    position: sticky;
    top: 18px;
}

.material-row {
    display: grid;
    grid-template-columns: 1.35fr 1fr 34px;
    align-items: end;
    gap: 10px;
    margin-bottom: 12px;
}

.material-row .field-label {
    font-size: 0.87rem;
}

.remove-button {
    height: 43px;
    border: 0;
    background: transparent;
    color: #9a3030;
    cursor: pointer;
    font-size: 1.8rem;
}

.divider {
    margin: 28px 0;
    border: 0;
    border-top: 1px solid var(--line);
}

form > .full-width {
    margin-top: 20px;
}

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

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

th,
td {
    padding: 12px 9px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 0.78rem;
    text-transform: uppercase;
}

.total-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin: 20px 0;
    font-size: 1.25rem;
}

.action-stack {
    display: grid;
    gap: 12px;
    margin-top: 22px;
}

.action-stack form {
    margin: 0;
}

.price-row {
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
}

.price-row label {
    display: block;
    margin-bottom: 6px;
    font-weight: 700;
}

.price-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.price-controls input {
    max-width: 150px;
}

.confirmation-panel {
    text-align: center;
}

.confirmation-icon {
    display: inline-grid;
    width: 70px;
    height: 70px;
    margin-bottom: 20px;
    place-items: center;
    border-radius: 50%;
    background: var(--green-light);
    color: var(--green);
    font-size: 2.5rem;
}

.confirmation-panel .lead-dark {
    margin-right: auto;
    margin-left: auto;
}

.order-details {
    margin: 28px 0;
    padding: 20px;
    border-radius: 12px;
    background: var(--background);
    text-align: left;
}

.site-footer {
    padding: 28px 0;
    border-top: 1px solid var(--line);
    background: var(--white);
    color: var(--muted);
    font-size: 0.9rem;
}

@media (max-width: 800px) {
    .hero-grid,
    .three-columns,
    .work-grid,
    .admin-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 60px 0;
    }

    .image-panel {
        position: static;
    }
}

@media (max-width: 560px) {
    .header-content,
    .footer-content {
        align-items: flex-start;
        flex-direction: column;
        padding: 16px 0;
    }

    .brand {
        font-size: 0.88rem;
    }

    .section {
        padding: 48px 0;
    }

    .panel,
    .info-card {
        padding: 20px;
    }

    .material-row {
        grid-template-columns: 1fr 34px;
    }

    .material-row > div:first-child {
        grid-column: 1;
    }

    .material-row > div:nth-child(2) {
        grid-column: 1;
    }

    .material-row .remove-button {
        grid-column: 2;
        grid-row: 2;
    }
}