:root {
    --bg: #f4efe6;
    --panel: rgba(255, 251, 246, 0.88);
    --card: rgba(255, 255, 255, 0.8);
    --panel-strong: #fffaf1;
    --ink: #21160d;
    --muted: #7a6654;
    --line: rgba(90, 68, 52, 0.14);
    --accent: #cf5f2e;
    --accent-deep: #9d4310;
    --accent-soft: rgba(210, 106, 41, 0.12);
    --danger: #943d2d;
    --shadow: 0 24px 70px rgba(92, 60, 27, 0.14);
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}

body {
    margin: 0;
    min-height: 100vh;
    font: 16px/1.5 "Segoe UI", sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(255, 205, 78, 0.18), transparent 24%),
        radial-gradient(circle at right 18%, rgba(85, 139, 209, 0.14), transparent 28%),
        linear-gradient(180deg, #f7f2eb 0%, #f0e5d5 100%);
}

body > * {
    min-width: 0;
}

button,
input,
select,
textarea {
    font: inherit;
}

.shell {
    width: min(1400px, calc(100% - 32px));
    max-width: calc(100vw - 32px);
    margin: 24px auto 40px;
    overflow-x: clip;
}

.shell > *,
.hero > *,
.panel > *,
.panel-body > * {
    min-width: 0;
}

.hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding: 28px;
    border-radius: 28px;
    background: linear-gradient(135deg, rgba(255, 249, 240, 0.9), rgba(247, 232, 212, 0.9));
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.6);
}

.hero-copy {
    display: grid;
    gap: 10px;
}

.hero h1,
.hero-copy h1 {
    margin: 0;
    font-size: clamp(28px, 4vw, 40px);
    line-height: 0.95;
    letter-spacing: -0.04em;
}

.hero-copy p {
    margin: 0;
    color: var(--muted);
}

.brand-lockup {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-lockup img {
    width: 84px;
    height: 84px;
    flex: 0 0 auto;
}

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

.button {
    appearance: none;
    border: 0;
    border-radius: 18px;
    padding: 12px 18px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button-primary {
    color: white;
    background: linear-gradient(135deg, #d0622f, #b94a2a);
    box-shadow: 0 16px 34px rgba(186, 78, 40, 0.24);
}

.button-secondary {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid var(--line);
}

.panel {
    background: var(--panel);
    border: 1px solid rgba(255, 255, 255, 0.62);
    border-radius: 32px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.panel-body {
    padding: 24px;
}

.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
}

.panel-head h2 {
    margin: 0;
    font-size: 22px;
}

.flash {
    margin-bottom: 18px;
    padding: 14px 18px;
    border-radius: 18px;
    background: rgba(217, 255, 227, 0.85);
    border: 1px solid rgba(91, 173, 117, 0.26);
}

.flash-error {
    background: rgba(255, 236, 236, 0.86);
    border-color: rgba(209, 105, 95, 0.26);
}

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

.profile-menu {
    position: relative;
}

.profile-menu summary {
    list-style: none;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--line);
    box-shadow: 0 10px 26px rgba(84, 50, 23, 0.08);
    color: inherit;
    cursor: pointer;
    transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.profile-menu summary::-webkit-details-marker {
    display: none;
}

.profile-menu summary:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(84, 50, 23, 0.12);
    background: rgba(255, 255, 255, 0.88);
}

.profile-avatar {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    background: rgba(210, 106, 41, 0.14);
    color: var(--accent-deep);
    border: 1px solid rgba(210, 106, 41, 0.14);
    overflow: hidden;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-copy {
    display: grid;
    gap: 2px;
}

.profile-copy small {
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 11px;
}

.profile-copy strong {
    font-size: 18px;
    line-height: 1.1;
}

.profile-menu-panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 220px;
    padding: 10px;
    border-radius: 22px;
    background: rgba(255, 252, 247, 0.96);
    border: 1px solid var(--line);
    box-shadow: 0 18px 40px rgba(84, 50, 23, 0.16);
    backdrop-filter: blur(14px);
    display: grid;
    gap: 8px;
    z-index: 30;
}

.profile-menu-link {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid transparent;
    background: rgba(255, 255, 255, 0.74);
    color: var(--ink);
    text-decoration: none;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.16s ease, transform 0.16s ease, border-color 0.16s ease;
}

.profile-menu-link:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.96);
    border-color: var(--line);
}

.profile-menu-link-danger {
    color: var(--danger);
    border-color: rgba(148, 61, 45, 0.16);
    background: rgba(148, 61, 45, 0.08);
}

@media (max-width: 760px) {
    body {
        padding: 0;
    }

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

    .hero,
    .hero-actions,
    .panel-head {
        flex-direction: column;
        align-items: stretch;
    }
}

