:root {
    --bg: #f4efe7;
    --panel: rgba(255, 255, 255, 0.86);
    --panel-strong: #ffffff;
    --text: #1d1a17;
    --muted: #6a6158;
    --line: rgba(29, 26, 23, 0.08);
    --accent: #c96b37;
    --accent-dark: #96461d;
    --success: #2f8f57;
    --warning: #d49014;
    --danger: #c44a4a;
    --shadow: 0 24px 70px rgba(80, 49, 23, 0.14);
    --radius: 24px;
}

* {
    box-sizing: border-box;
    min-width: 0;
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(201, 107, 55, 0.18), transparent 32%),
        radial-gradient(circle at bottom right, rgba(74, 125, 88, 0.16), transparent 24%),
        linear-gradient(135deg, #f7f1ea 0%, #efe5d7 46%, #f7f3ef 100%);
    min-height: 100vh;
    overflow-x: hidden;
}

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

code {
    display: block;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
    white-space: normal;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(29, 26, 23, 0.06);
    line-height: 1.45;
}

p,
h1,
h2,
h3,
label,
span,
a,
div {
    overflow-wrap: anywhere;
}

.layout {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 24px 0 56px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.brand {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.brand--with-logo {
    align-items: flex-start;
}

.brand__logo {
    width: min(380px, 100%);
    max-width: 100%;
    height: auto;
    display: block;
    filter: drop-shadow(0 10px 24px rgba(80, 49, 23, 0.14));
}

.menu {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
}

.menu a,
.button,
button {
    border: 0;
    cursor: pointer;
    background: var(--panel);
    color: var(--text);
    padding: 12px 18px;
    border-radius: 999px;
    font-weight: 700;
    text-align: center;
    box-shadow: 0 8px 28px rgba(80, 49, 23, 0.08);
    transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.menu a:hover,
.button:hover,
button:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 34px rgba(80, 49, 23, 0.12);
}

.button--accent,
button.button--accent {
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff;
}

.button--ghost {
    background: rgba(255, 255, 255, 0.55);
}

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

.grid--dashboard {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.95fr);
}

.panel {
    background: var(--panel);
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
    padding: 24px;
    min-width: 0;
}

.hero {
    padding: 34px;
}

.hero h1,
.panel h2,
.panel h3 {
    margin-top: 0;
}

.hero__lead,
.muted,
.footer-note {
    color: var(--muted);
}

.flash {
    margin-bottom: 18px;
    padding: 14px 18px;
    border-radius: 18px;
    font-weight: 700;
}

.flash--success {
    background: rgba(47, 143, 87, 0.12);
    color: var(--success);
}

.flash--error {
    background: rgba(196, 74, 74, 0.12);
    color: var(--danger);
}

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

.stat {
    padding: 18px;
    border-radius: 20px;
    background: var(--panel-strong);
    border: 1px solid var(--line);
    min-width: 0;
}

.stat__label {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 10px;
}

.stat__value {
    font-size: 28px;
    font-weight: 800;
    line-height: 1.15;
    word-break: break-word;
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}

.card {
    background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(255,255,255,0.86));
    border-radius: 24px;
    padding: 22px;
    border: 1px solid var(--line);
    min-width: 0;
}

.card__price {
    font-size: 30px;
    font-weight: 800;
    margin: 10px 0;
    line-height: 1.1;
}

.card__meta {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.45;
}

.card__actions {
    margin-top: 20px;
}

.list {
    display: grid;
    gap: 14px;
}

.list-item {
    background: var(--panel-strong);
    border-radius: 20px;
    padding: 18px;
    border: 1px solid var(--line);
    line-height: 1.5;
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    max-width: 100%;
}

.status--pending {
    background: rgba(212, 144, 20, 0.12);
    color: var(--warning);
}

.status--paid {
    background: rgba(47, 143, 87, 0.12);
    color: var(--success);
}

.status--cancelled {
    background: rgba(196, 74, 74, 0.12);
    color: var(--danger);
}

.table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

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

th,
td {
    text-align: left;
    padding: 14px 12px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}

th {
    color: var(--muted);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

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

label {
    display: grid;
    gap: 8px;
    font-weight: 700;
}

input {
    width: 100%;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.92);
    border-radius: 16px;
    padding: 14px 16px;
    font-size: 16px;
    outline: none;
}

input:focus {
    border-color: rgba(201, 107, 55, 0.5);
    box-shadow: 0 0 0 4px rgba(201, 107, 55, 0.12);
}

.auth-shell {
    width: min(520px, calc(100% - 32px));
    margin: 48px auto;
}

.pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-start;
}
.section-stack {
    display: grid;
    gap: 18px;
}

.section-stack > * {
    margin: 0;
}

.section-stack--lg {
    gap: 24px;
}

.service-panel p + p {
    margin-top: 12px;
}

.card h3,
.list-item h3 {
    margin: 0;
}

.flash--info {
    background: rgba(31, 111, 235, 0.12);
    color: #1f6feb;
}

@media (max-width: 1024px) {
    .grid--dashboard {
        grid-template-columns: 1fr;
    }

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

    .menu {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 860px) {
    .layout {
        width: min(100%, calc(100% - 24px));
        padding: 16px 0 32px;
    }

    .panel,
    .hero {
        padding: 20px;
    }

    .brand__logo {
        width: min(300px, 100%);
    }

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

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

    .card__price,
    .stat__value {
        font-size: 24px;
    }
}

@media (max-width: 640px) {
    .layout {
        width: calc(100% - 16px);
    }

    .topbar {
        gap: 12px;
        margin-bottom: 16px;
    }

    .brand__logo {
        width: min(260px, 100%);
    }

    .menu {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .menu a,
    .button,
    button {
        width: 100%;
        padding: 12px 14px;
        font-size: 14px;
    }

    .hero h1 {
        font-size: 30px;
        line-height: 1.15;
    }

    .panel h2,
    .panel h3 {
        line-height: 1.2;
    }

    .auth-shell {
        width: calc(100% - 16px);
        margin: 24px auto;
    }

    .pill-row {
        flex-direction: column;
        align-items: stretch;
    }

    .pill-row .button,
    .pill-row a,
    .pill-row span {
        width: 100%;
        justify-content: center;
        text-align: center;
    }

    .table-wrap {
        margin: 0 -8px;
    }

    th,
    td {
        padding: 12px 10px;
        font-size: 13px;
    }
}
