@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

:root {
    --pp-ivory: #f8f6f0; --pp-surface: #fffefa; --pp-green: #245747;
    --pp-green-dark: #173e32; --pp-green-soft: #e8efe8; --pp-coral: #b85846;
    --pp-coral-soft: #f8eae2; --pp-text: #243b33; --pp-muted: #627169;
    --pp-border: #dce2d8; --pp-radius: 18px; --pp-shadow: 0 6px 24px #243b3306;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--pp-ivory); color: var(--pp-text); font: 16px/1.6 ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif; }
a { color: var(--pp-green); text-underline-offset: 4px; }
a:hover { color: var(--pp-green-dark); }
button, input, select, textarea { font: inherit; }
button, a, summary, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--pp-coral); outline-offset: 4px; }
h1, h2, h3, h4, h5 { color: var(--pp-text); line-height: 1.2; font-weight: 650; letter-spacing: -.035em; overflow-wrap: anywhere; }
h1 { font-size: clamp(2.1rem, 4vw, 3rem); margin: 0 0 .7rem; }
h2 { font-size: 1.45rem; margin: 0 0 1rem; }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; }
.eyebrow { color: var(--pp-coral); font-size: .76rem; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; margin-bottom: .8rem; }
.muted, .text-secondary, .text-muted { color: var(--pp-muted) !important; }
.skip-link { position: fixed; left: 1rem; top: -100px; padding: .7rem 1rem; z-index: 100; background: white; }
.skip-link:focus { top: 1rem; }
.app-header { background: var(--pp-surface); border-bottom: 1px solid var(--pp-border); }
.header-inner { max-width: 1184px; padding: 1.1rem 2rem; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand { display: inline-flex; gap: .7rem; align-items: center; color: var(--pp-green); text-decoration: none; font-size: 1.15rem; font-weight: 750; letter-spacing: -.04em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 36px; height: 36px; border-radius: 12px; display: inline-grid; place-items: center; background: var(--pp-green); color: #fffefa; font-size: 1.5rem; }
.primary-nav { display: flex; align-items: center; gap: .5rem; }
.primary-nav .nav-link { padding: .6rem 1rem; color: var(--pp-muted); border-radius: 10px; font-weight: 600; text-decoration: none; }
.primary-nav .nav-link:hover, .primary-nav .nav-link.active { color: var(--pp-green); background: var(--pp-green-soft); }
.mobile-toggle { display: none; }
.account-menu { position: relative; margin-left: .8rem; }
.account-menu summary { cursor: pointer; padding: .6rem .8rem; border-radius: 10px; font-weight: 600; }
.account-links { position: absolute; top: 100%; right: 0; min-width: 190px; padding: .5rem; background: var(--pp-surface); border: 1px solid var(--pp-border); border-radius: 12px; box-shadow: 0 8px 24px #243b3314; z-index: 20; }
.account-links a { display: block; padding: .6rem; text-decoration: none; border-radius: 8px; }
.account-links a:hover { background: var(--pp-green-soft); }
.app-content { max-width: 1120px; margin: auto; padding: 3.5rem 2rem 5rem; min-height: calc(100vh - 180px); }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; margin-bottom: 2.5rem; }
.page-heading p { color: var(--pp-muted); max-width: 40rem; margin-bottom: 0; }
.page-heading .btn { flex-shrink: 0; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.section-heading h2 { margin-bottom: 0; }
.section-space { margin-top: 2.5rem; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; }
.card, .wish-card, .person-card, .empty-state, .editor-panel, .settings-panel { background: var(--pp-surface); border: 1px solid var(--pp-border); border-radius: var(--pp-radius); box-shadow: var(--pp-shadow); }
.person-card { padding: 1.5rem; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; }
.person-card h3 { margin: .4rem 0 0; }
.person-card p { color: var(--pp-muted); font-size: .9rem; margin-bottom: .7rem; }
.person-card .btn { margin-top: auto; }
.avatar { display: inline-grid; place-items: center; height: 48px; width: 48px; flex: 0 0 48px; border-radius: 50%; color: var(--pp-green); background: var(--pp-green-soft); font-weight: 700; }
.birthday-card { background: #f3eee4; border-color: #e8dfcf; }
.birthday-card .avatar { color: #894334; background: #f1ddd0; }
.birthday-date { color: #894334; font-weight: 650; font-size: .85rem; }
.badge-pill { display: inline-block; border-radius: 100px; padding: .25rem .7rem; color: var(--pp-green); background: var(--pp-green-soft); font-size: .8rem; font-weight: 600; letter-spacing: 0; vertical-align: middle; }
.wish-list { display: grid; gap: 1rem; list-style: none; padding: 0; margin: 0; }
.wish-card { padding: 1.5rem; }
.wish-row { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; }
.wish-copy { min-width: 0; flex: 1; }
.wish-copy h2, .wish-copy h3 { font-size: 1.15rem; margin-bottom: .5rem; }
.wish-meta { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; color: var(--pp-muted); font-size: .9rem; }
.wish-sort { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin-bottom: 1rem; }
.wish-sort select { width: auto; }
.reservation-note { color: var(--pp-green); font-size: .9rem; margin: .7rem 0 0; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; border-radius: 10px; padding: .65rem 1rem; min-height: 44px; font-weight: 650; font-size: .9rem; line-height: 1.4; white-space: normal; text-decoration: none; transition: background-color .15s, border-color .15s; cursor: pointer; }
.btn-primary { color: white; background: var(--pp-green); border: 1px solid var(--pp-green); }
.btn-primary:hover, .btn-primary:focus, .btn-primary:active { color: white !important; background: var(--pp-green-dark) !important; border-color: var(--pp-green-dark) !important; }
.btn-secondary, .btn-outline-primary, .btn-outline-secondary { background: transparent; border: 1px solid #b8c6ba; color: var(--pp-green); }
.btn-secondary:hover, .btn-outline-primary:hover, .btn-outline-secondary:hover { background: var(--pp-green-soft); border-color: var(--pp-green); color: var(--pp-green); }
.btn-quiet { color: var(--pp-muted); border: 1px solid transparent; background: transparent; }
.btn-quiet:hover { background: var(--pp-green-soft); color: var(--pp-green); }
.btn-danger, .btn-outline-danger { background: #fff2ed; color: #963b2f; border: 1px solid #d3a094; }
.btn-danger:hover, .btn-outline-danger:hover { background: #963b2f; color: white; border-color: #963b2f; }
.btn:disabled, .btn:disabled:hover, .btn:disabled:focus, .btn:disabled:active { color: #62686b !important; background: #e5e7e9 !important; border-color: #c4c9cd !important; opacity: 1; box-shadow: none; cursor: not-allowed; }
.btn:focus-visible { box-shadow: none; outline: 3px solid var(--pp-coral); outline-offset: 4px; }
.editor-panel, .settings-panel { padding: 2rem; margin-bottom: 1.5rem; }
.editor-panel h2 { margin-bottom: 1.5rem; }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) 120px; gap: 1.2rem; }
.field { margin-bottom: 1.2rem; }
.field-wide { grid-column: 1 / -1; }
label, .form-label { display: block; font-weight: 600; margin-bottom: .4rem; }
input:not([type=checkbox]):not([type=radio]):not([type=submit]):not([type=hidden]), select, textarea, .form-control { width: 100%; max-width: 100%; min-height: 46px; padding: .65rem .8rem; color: var(--pp-text); background: #fffefa; border: 1px solid #b8c6ba; border-radius: 9px; font-size: 1rem; box-shadow: none; }
input:focus, select:focus, textarea:focus, .form-control:focus { border-color: var(--pp-green); box-shadow: 0 0 0 3px #24574718; background: white; color: var(--pp-text); }
input[type=checkbox], input[type=radio] { accent-color: var(--pp-green); width: 18px; height: 18px; vertical-align: middle; margin-right: .4rem; }
input[disabled] { background: #eeeee7 !important; }
.form-group { margin-bottom: 1.2rem; }
.validation-message, .text-danger, .validation-summary-errors { color: #963b2f !important; font-size: .9rem; }
.invalid { border-color: #963b2f !important; }
.validation-summary-valid, .field-validation-valid { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.feedback { padding: .9rem 1.1rem; border-radius: 10px; margin: 1rem 0; overflow-wrap: anywhere; }
.feedback-error { background: #fbece6; color: #87372b; border: 1px solid #e3b8a9; }
.feedback-success, .alert-success { background: var(--pp-green-soft); color: var(--pp-green-dark); border: 1px solid #b8c6ba; }
.loading-state { padding: 2rem; color: var(--pp-muted); text-align: center; }
.empty-state { text-align: center; padding: 3rem 1.5rem; }
.empty-state h2 { font-size: 1.25rem; }
.empty-state p { color: var(--pp-muted); max-width: 30rem; margin: 0 auto 1rem; }
.empty-symbol { font-size: 2rem; display: block; color: var(--pp-coral); margin-bottom: .8rem; }
.request-row { display: flex; align-items: center; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--pp-border); }
.request-row:last-child { border-bottom: 0; }
.request-name { flex: 1; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.request-panel { padding: 1.5rem; background: var(--pp-surface); border: 1px solid var(--pp-border); border-radius: var(--pp-radius); }
.settings-panel { max-width: 640px; }
.birthday-fields { display: grid; grid-template-columns: 1fr 110px; gap: 1rem; }
.app-footer { max-width: 1120px; margin: auto; padding: 1.5rem 2rem; border-top: 1px solid var(--pp-border); display: flex; gap: .7rem; align-items: center; color: var(--pp-muted); font-size: .8rem; }
.app-footer .brand-mark { background: transparent; color: var(--pp-coral); height: auto; width: auto; }
.app-footer > span:last-child { margin-left: auto; }
.identity-content { max-width: 1120px; margin: auto; padding: 3rem 2rem 4rem; min-height: calc(100vh - 180px); }
.auth-shell { max-width: 520px; margin: 0 auto; }
.auth-intro { text-align: center; margin-bottom: 1.8rem; }
.auth-intro h1 { font-size: 2.25rem; }
.auth-intro p { color: var(--pp-muted); }
.auth-panel { padding: 2rem; background: var(--pp-surface); border: 1px solid var(--pp-border); border-radius: var(--pp-radius); box-shadow: var(--pp-shadow); }
.auth-panel > h1 { font-size: 1.8rem; }
.auth-panel .row { margin: 0; }
.auth-panel .row > [class*=col-] { flex: 0 0 100%; max-width: 100%; padding: 0; }
.auth-panel form .btn { margin-bottom: .4rem; }
.auth-panel p, .auth-panel a { overflow-wrap: anywhere; }
.auth-panel .checkbox label { font-weight: 400; }
.auth-panel hr { border-color: var(--pp-border); }
.account-settings .row { row-gap: 1.5rem; }
.account-settings .nav-pills { gap: .4rem; }
.account-settings .nav-pills .nav-link { color: var(--pp-green); border-radius: 9px; padding: .65rem .8rem; }
.account-settings .nav-pills .nav-link.active { background: var(--pp-green); color: white; }
.account-settings .settings-body { min-width: 0; background: var(--pp-surface); padding: 1.5rem; border: 1px solid var(--pp-border); border-radius: var(--pp-radius); }
.account-settings .settings-body h3 { margin-bottom: 1rem; }
#blazor-error-ui { display: none; position: fixed; bottom: 0; left: 0; width: 100%; padding: 1rem 3rem 1rem 1rem; background: #fbece6; color: #87372b; border-top: 1px solid #d3a094; z-index: 1000; }
#blazor-error-ui .dismiss { position: absolute; right: 1rem; top: .8rem; cursor: pointer; }
@media (max-width: 900px) { .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .header-inner { padding-inline: 1.5rem; } }
@media (max-width: 640px) {
    .header-inner { padding: 1rem; flex-wrap: wrap; gap: .8rem; }
    .brand { font-size: 1.05rem; }
    .mobile-toggle { display: inline-flex; }
    .primary-nav { display: none; width: 100%; align-items: stretch; flex-direction: column; padding-top: .5rem; }
    .primary-nav.is-open { display: flex; }
    .account-menu { margin-left: 0; }
    .account-links { position: static; box-shadow: none; margin-top: .3rem; }
    .app-content, .identity-content { padding: 2rem 1rem 3rem; }
    .page-heading { align-items: flex-start; flex-direction: column; margin-bottom: 2rem; }
    .card-grid { grid-template-columns: 1fr; }
    .wish-row { align-items: flex-start; flex-direction: column; gap: 1rem; }
    .wish-card, .person-card, .editor-panel, .settings-panel, .auth-panel { padding: 1.25rem; }
    .request-row { flex-wrap: wrap; }
    .request-row .actions { width: 100%; }
    .form-grid { grid-template-columns: 1fr; gap: 0; }
    .section-heading { align-items: flex-start; }
    .app-footer { padding: 1.2rem 1rem; flex-wrap: wrap; }
    .app-footer > span:last-child { width: 100%; margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; } }
