:root {
    --primary: #f25b05;
    --primary-light: #fff0e8;
    --secondary: #ffae00;
    --success: #16a34a;
    --info: #1675df;
    --warning: #b85f00;
    --danger: #c53d3d;
    --accent-purple: #7041d8;
    --page-background: #fff9f1;
    --card-background: #ffffff;
    --text-main: #191827;
    --text-muted: #746964;
    --border: #eadfd5;
    --border-radius: 1.15rem;
    --shadow: 0 0.7rem 2rem rgb(86 54 33 / 11%);
    --content-width: 86rem;
    --focus-ring: 0 0 0 3px rgb(232 93 36 / 25%);
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; }
body {
    margin: 0;
    min-width: 20rem;
    background: var(--page-background);
    color: var(--text-main);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 1rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
}
h1, h2, h3, h4 { margin-top: 0; line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3rem); }
h2 { font-size: clamp(1.45rem, 3vw, 2rem); }
h3 { font-size: 1.15rem; }
p { margin-block: 0.6rem; }
a { color: var(--primary); text-underline-offset: 0.2em; }
.container { width: min(100% - 2rem, var(--content-width)); margin-inline: auto; padding-block: 2.5rem 4rem; }
.text-muted { color: var(--text-muted); }
.eyebrow { display: block; margin-bottom: 0.4rem; color: var(--primary); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }
.page-heading, .staff-page-heading { margin-bottom: 1.5rem; }
.page-heading h1, .staff-page-heading h1 { margin-bottom: 0.35rem; }

.card { background: var(--card-background); border: 1px solid var(--border); border-radius: var(--border-radius); box-shadow: var(--shadow); }
.card-title { margin-bottom: 0.75rem; }
.card-body { padding: 1rem; }

button, .btn, input, textarea, select { font: inherit; }
button, .btn {
    min-height: 2.75rem;
    border: 1px solid transparent;
    border-radius: 0.75rem;
    cursor: pointer;
    font-weight: 700;
    transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}
button, .btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.65rem 1rem; text-decoration: none; }
button, .btn-primary { background: var(--primary); color: #fff; }
button:hover, .btn-primary:hover { background: #ca4815; }
.btn-secondary { background: #fff; border-color: var(--border); color: var(--text-main); }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-ghost { background: transparent; border-color: currentColor; color: var(--primary); }
.btn-block { width: 100%; }
button:disabled, .btn:disabled { cursor: wait; opacity: 0.58; }
button:focus-visible, .btn:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible { outline: none; box-shadow: var(--focus-ring); }

label { color: var(--text-main); font-weight: 650; }
input:not([type="checkbox"]):not([type="radio"]), textarea, select {
    width: 100%;
    min-height: 2.85rem;
    margin-top: 0.3rem;
    padding: 0.7rem 0.8rem;
    border: 1px solid #cdbfb4;
    border-radius: 0.7rem;
    background: #fff;
    color: var(--text-main);
    font-size: 1rem;
}
textarea { min-height: 7rem; resize: vertical; }
input[type="checkbox"] { width: 1.2rem; height: 1.2rem; accent-color: var(--primary); }
.alert { padding: 0.8rem 1rem; border-radius: 0.75rem; }
.alert-error { background: #fff0f0; border: 1px solid #efb1b1; color: #8d2929; }
.alert-error ul, .errorlist { margin: 0; padding: 0; list-style: none; }

.brand { display: inline-flex; align-items: center; gap: 0.7rem; color: inherit; text-decoration: none; }
.phoenix-logo { width: 5rem; height: 5rem; flex: 0 0 auto; object-fit: contain; filter: drop-shadow(0 0.45rem 0.55rem rgb(185 63 25 / 22%)); }
.brand-mark { display: grid; width: 5rem; height: 5rem; flex: 0 0 auto; place-items: center; background: linear-gradient(145deg, #fff2ad, var(--secondary) 48%, var(--primary)); border: 0.3rem solid rgb(255 255 255 / 75%); border-radius: 50%; box-shadow: 0 0.55rem 1.25rem rgb(199 78 20 / 24%); font-size: 2.75rem; }
.brand small, .brand strong { display: block; }
.brand small { color: var(--text-muted); font-size: 0.86rem; letter-spacing: 0.03em; }
.brand strong { color: var(--primary); font-size: clamp(2rem, 4vw, 2.75rem); line-height: 1; }
.site-header { position: relative; isolation: isolate; overflow: hidden; background: linear-gradient(180deg, #eaf8ff 0, #f8fcff 76%, #eef8e9 100%); border-bottom: 1px solid #cfe2c6; box-shadow: 0 0.2rem 1rem rgb(86 54 33 / 7%); }
.site-header::before { content: ""; position: absolute; z-index: -1; top: 2.8rem; left: 39%; width: 7rem; height: 1.8rem; background: rgb(255 255 255 / 82%); border-radius: 5rem; box-shadow: -2.2rem 0.7rem 0 -0.4rem rgb(255 255 255 / 72%), 2.6rem 0.5rem 0 -0.25rem rgb(255 255 255 / 78%); }
.header-decoration { position: absolute; z-index: 0; right: clamp(10rem, 18vw, 17rem); bottom: 4.25rem; width: 14rem; height: 7rem; pointer-events: none; }
.header-decoration::before { content: ""; position: absolute; top: 0; left: 0.3rem; width: 5rem; height: 5rem; background: radial-gradient(circle, #ffc928 0 43%, transparent 45%), repeating-conic-gradient(from -2deg, #ffd64a 0 2.5deg, transparent 2.5deg 30deg); border-radius: 50%; filter: drop-shadow(0 0.15rem 0.2rem rgb(255 191 0 / 18%)); }
.header-decoration::after { content: ""; position: absolute; right: 0; bottom: -0.35rem; width: 10.5rem; height: 4.4rem; background: radial-gradient(ellipse at 12% 93%, #9bd56d 0 21%, transparent 22%), radial-gradient(ellipse at 28% 78%, #70c762 0 25%, transparent 26%), radial-gradient(ellipse at 48% 88%, #3ead75 0 29%, transparent 30%), radial-gradient(ellipse at 68% 72%, #63bf67 0 26%, transparent 27%), radial-gradient(ellipse at 88% 91%, #249b73 0 24%, transparent 25%); filter: drop-shadow(0 0.25rem 0.15rem rgb(49 133 79 / 12%)); }
.site-header-inner { position: relative; z-index: 1; width: min(100% - 2rem, var(--content-width)); margin-inline: auto; display: grid; grid-template-columns: minmax(18rem, 1fr) auto auto; align-items: center; gap: clamp(1.5rem, 5vw, 5rem); padding-block: 2rem 2.4rem; }
.contact-list { display: grid; gap: 0.55rem; padding: 0.8rem 1rem; color: var(--text-main); font-size: 1rem; font-weight: 650; background: rgb(255 255 255 / 68%); border: 1px solid rgb(255 255 255 / 82%); border-radius: 1rem; }
.staff-context { display: grid; gap: 0.15rem; padding: 0.75rem 1rem; background: rgb(255 255 255 / 70%); border: 1px solid rgb(255 255 255 / 85%); border-radius: 1rem; }
.staff-context span { color: var(--primary); font-weight: 800; }
.staff-context small { color: var(--text-muted); }
.user-summary { position: relative; display: grid; gap: 0.1rem; min-width: 10rem; padding: 0.75rem 0.9rem 0.75rem 3.6rem; background: rgb(255 255 255 / 88%); border: 1px solid rgb(255 255 255 / 92%); border-radius: 1rem; box-shadow: 0 0.35rem 1rem rgb(86 54 33 / 8%); text-align: left; }
.user-summary::before { content: "●"; position: absolute; left: 0.8rem; top: 50%; display: grid; width: 2.25rem; height: 2.25rem; place-items: center; transform: translateY(-50%); background: #fff0df; border-radius: 50%; color: var(--primary); font-size: 1.2rem; }
.user-summary small, .user-summary span { color: var(--text-muted); font-size: 0.82rem; }
.top-nav { display: flex; align-items: stretch; gap: 0.35rem; overflow-x: auto; scrollbar-width: thin; }
.top-nav a, .top-nav button { flex: 0 0 auto; min-height: 3.6rem; padding: 0.85rem 1.35rem; border: 0; border-radius: 0.85rem; background: transparent; color: inherit; font-weight: 750; text-decoration: none; white-space: nowrap; }
.top-nav a:hover, .top-nav button:hover { background: rgb(255 255 255 / 18%); }
.unified-top-nav { position: relative; z-index: 2; width: min(100% - 2rem, var(--content-width)); margin: 0 auto 0.8rem; justify-content: space-around; padding: 0.55rem; background: linear-gradient(105deg, #ff5a00, #ff7900 62%, #ffad00); border-radius: 1.1rem; box-shadow: 0 0.55rem 1.2rem rgb(195 73 20 / 20%); }
.unified-top-nav a, .unified-top-nav button { color: #fff; }
.unified-top-nav a.active { background: #fff; color: var(--primary); box-shadow: 0 0.2rem 0.65rem rgb(100 40 15 / 16%); }
.unified-top-nav .logout-form { margin-left: auto; }
.unified-top-nav .logout-form button { border: 1px solid rgb(255 255 255 / 55%); }
.site-footer { padding: 1.5rem 1rem; border-top: 1px solid var(--border); color: var(--text-muted); text-align: center; }

.login-page { background: radial-gradient(circle at top, #ffe5c7 0, var(--page-background) 40rem); }
.login-page .container { display: grid; min-height: calc(100vh - 5rem); place-items: center; }
.login-page .site-footer { border: 0; }
.login-card { width: min(100%, 28rem); padding: clamp(1.25rem, 5vw, 2.25rem); }
.login-brand { display: grid; justify-items: center; margin-bottom: 1.5rem; text-align: center; }
.login-brand .phoenix-logo { width: 6rem; height: 6rem; margin-bottom: 0.65rem; }
.login-brand small, .login-brand strong { display: block; }
.login-brand small { color: var(--text-muted); }
.login-brand strong { color: var(--primary); font-size: 2rem; }
.login-card h1 { margin-bottom: 0.25rem; text-align: center; }
.login-card > p { text-align: center; }
.login-form p { margin-block: 1rem; }

.save-status { display: inline-flex; min-height: 1.7rem; align-items: center; margin-left: 0.35rem; color: var(--text-muted); font-size: 0.85rem; font-weight: 750; }
.save-status:not(:empty) { padding: 0.2rem 0.5rem; border-radius: 99rem; background: var(--primary-light); }
.save-status-success { background: #e7f7ee !important; color: var(--success); }
.save-status-error { background: #fff0f0 !important; color: var(--danger); }
.save-status-pending { background: #fff5df !important; color: var(--warning); }

@media (max-width: 40rem) {
    .container { width: min(100% - 1rem, var(--content-width)); padding-block: 1.25rem 2rem; }
    .site-header-inner { width: min(100% - 1rem, var(--content-width)); align-items: flex-start; }
    .site-header-inner { grid-template-columns: 1fr; gap: 0.8rem; padding-block: 1.2rem 1.5rem; }
    .site-header::before { display: none; }
    .header-decoration { display: none; }
    .brand-mark { width: 4.25rem; height: 4.25rem; font-size: 2.25rem; }
    .phoenix-logo { width: 3.5rem; height: 3.5rem; }
    .login-brand .phoenix-logo { width: 4.75rem; height: 4.75rem; }
    .contact-list { border-top: 1px solid var(--border); padding-top: 0.7rem; }
    .user-summary { text-align: left; }
    .user-summary { width: 100%; }
    .top-nav a, .top-nav button { min-height: 2.9rem; padding-inline: 0.8rem; }
}
