:root {
    --bg: #f4f7fb;
    --panel: #ffffff;
    --panel-soft: #f8fbff;
    --text: #243047;
    --muted: #6f7d95;
    --line: #dce5f1;
    --blue: #4f83f1;
    --blue-dark: #3568d4;
    --orange: #ff8c42;
    --orange-dark: #ff781f;
    --red: #d64545;
    --green: #1f9d63;
    --shadow: 0 18px 45px rgba(41, 72, 116, 0.10);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: radial-gradient(circle at top, #ffffff 0%, var(--bg) 58%, #edf3fb 100%);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    line-height: 1.5;
}

a {
    color: var(--blue-dark);
    text-decoration: none;
}

img {
    max-width: 100%;
}

.page-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 16px auto 32px;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 20px 26px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text);
}

.brand img {
    width: 132px;
    height: auto;
    display: block;
}

.brand span {
    font-size: 26px;
    font-weight: 850;
    letter-spacing: -0.04em;
}

.main-nav {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 17px;
    font-weight: 650;
}

.main-nav a {
    color: var(--text);
}

.nav-donation {
    background: var(--orange);
    color: #ffffff !important;
    padding: 11px 20px;
    border-radius: 999px;
    font-weight: 800;
    box-shadow: 0 10px 22px rgba(255, 140, 66, 0.28);
    transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.nav-donation:hover {
    background: var(--orange-dark);
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(255, 140, 66, 0.34);
}

main {
    margin-top: 32px;
}

.hero,
.card,
.panel {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: var(--shadow);
}

.hero {
    text-align: center;
    padding: 52px 36px;
}

.hero-logo {
    width: 300px;
    max-width: 78%;
    margin-bottom: 20px;
}

.hero h1 {
    margin: 0 0 18px;
    font-size: clamp(40px, 6vw, 60px);
    line-height: 1.02;
    letter-spacing: -0.07em;
}

.hero p {
    max-width: 820px;
    margin: 0 auto 24px;
    font-size: 19px;
    color: var(--text);
}

.hero-actions,
.actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.button,
button {
    display: inline-block;
    border: 0;
    border-radius: 999px;
    padding: 12px 20px;
    background: var(--blue);
    color: #ffffff;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(79, 131, 241, 0.26);
}

.button.secondary,
button.secondary {
    background: #ffffff;
    color: var(--blue-dark);
    border: 1px solid #cbdaf7;
    box-shadow: none;
}

.button.orange,
button.orange {
    background: var(--orange);
    box-shadow: 0 10px 22px rgba(255, 140, 66, 0.28);
}

.button.danger,
button.danger {
    background: var(--red);
    box-shadow: none;
}

.features-grid,
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.card,
.panel {
    padding: 24px;
}

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

.muted {
    color: var(--muted);
}

.form-page {
    max-width: 640px;
    margin: 0 auto;
}

form.card {
    display: grid;
    gap: 16px;
}

label {
    display: grid;
    gap: 7px;
    font-weight: 750;
}

input,
textarea,
select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 13px 14px;
    background: #ffffff;
    color: var(--text);
    font: inherit;
}

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

.alert,
.success {
    border-radius: 18px;
    padding: 14px 16px;
    margin-bottom: 18px;
    font-weight: 650;
}

.alert {
    background: #fff0f0;
    border: 1px solid #ffc9c9;
    color: #9e2f2f;
}

.success {
    background: #ecfff5;
    border: 1px solid #bcebd4;
    color: #13754a;
}

.search-bar {
    display: flex;
    gap: 12px;
    margin: 20px 0;
}

.search-bar input {
    margin: 0;
}

.box-card {
    display: grid;
    gap: 10px;
}

.box-card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    border-radius: 18px;
    border: 1px solid var(--line);
}

.box-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.public-box {
    max-width: 820px;
    margin: 0 auto;
}

.items-list {
    white-space: pre-wrap;
    background: var(--panel-soft);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 18px;
}

.qr-label {
    max-width: 480px;
    margin: 0 auto;
    text-align: center;
}

.qr-label img.qr {
    width: 280px;
    height: 280px;
}

.donation-card {
    max-width: 680px;
    margin: 0 auto;
    text-align: center;
}

.donation-card .logo {
    width: 240px;
    margin-bottom: 12px;
}

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

table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 18px;
    overflow: hidden;
}

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

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

.site-footer {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    color: var(--muted);
    margin-top: 32px;
    padding: 20px 4px;
    font-size: 14px;
}

@media (max-width: 780px) {
    .site-header {
        align-items: flex-start;
        flex-direction: column;
        border-radius: 22px;
    }

    .brand img {
        width: 108px;
    }

    .brand span {
        font-size: 22px;
    }

    .main-nav {
        justify-content: flex-start;
        gap: 12px;
    }

    .hero {
        padding: 34px 20px;
    }

    .search-bar {
        flex-direction: column;
    }
}

@media print {
    body {
        background: #ffffff;
    }

    .site-header,
    .site-footer,
    .no-print {
        display: none !important;
    }

    .page-shell {
        width: 100%;
        margin: 0;
    }

    .card,
    .panel,
    .hero {
        box-shadow: none;
        border: 1px solid #999999;
    }
}
