/* ==========================================================================
   Psych Tutor — design tokens, base elements & shared components
   ========================================================================== */

:root {
    --plum-950: #230615;
    --plum-900: #2E0A20;
    --plum-800: #3B0B28;
    --plum-700: #4B1235;
    --plum-600: #5D1B43;
    --berry-700: #86113E;
    --berry: #A6194F;
    --berry-500: #BE2360;
    --rose: #D6336C;
    --rose-400: #E5588B;
    --pink: #F49CC1;
    --pink-300: #F8B9D4;
    --pink-200: #FBD3E4;
    --pink-100: #FDE7F0;
    --blush: #FDF4F8;
    --lilac: #F5F1FA;
    --page: #F5F0F7;
    --paper: #FFFFFF;
    --line: #F0DFE8;
    --line-strong: #E7CCD9;
    --ink: #251325;
    --ink-soft: #4A3448;
    --muted: #7C6878;
    --muted-light: #9A8694;
    --gold: #F4B740;
    --green: #15845A;
    --green-soft: #E9F8F0;
    --amber: #A96A12;
    --amber-soft: #FDF5E6;
    --red: #B63145;
    --red-soft: #FDEEF1;
    --purple: #7B5AA6;
    --radius-xl: 30px;
    --radius-lg: 24px;
    --radius: 18px;
    --radius-sm: 12px;
    --shadow-soft: 0 16px 44px rgba(64, 12, 38, .07);
    --shadow-card: 0 10px 30px rgba(64, 12, 38, .06);
    --shadow-lift: 0 24px 60px rgba(64, 12, 38, .14);
    --serif: "Playfair Display", Georgia, "Times New Roman", serif;
    --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--sans);
    font-size: 15px;
    line-height: 1.65;
    color: var(--ink);
    background:
        radial-gradient(1000px 600px at 8% -10%, #FCE9F2 0, transparent 55%),
        radial-gradient(900px 650px at 100% 12%, #F1EAFB 0, transparent 58%),
        var(--page);
    min-height: 100vh;
}
html.no-scroll, body.no-scroll { overflow: hidden; }

h1, h2, h3, h4, h5 {
    margin: 0 0 .5em;
    color: var(--plum-800);
    font-weight: 700;
    line-height: 1.18;
    letter-spacing: -.015em;
}
h1, h2, .serif { font-family: var(--serif); letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
h2 { font-size: clamp(1.7rem, 2.6vw, 2.3rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.02rem; }
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }
a { color: var(--berry); text-decoration: none; transition: color .18s ease, opacity .18s ease; }
a:hover { color: var(--berry-700); }
img { max-width: 100%; height: auto; display: block; }
ul, ol { margin: 0 0 1rem; padding-left: 1.2rem; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
strong, b { font-weight: 700; }
small { font-size: .86em; }
::selection { background: var(--pink-200); color: var(--plum-900); }

:focus-visible {
    outline: 3px solid rgba(214, 51, 108, .38);
    outline-offset: 2px;
    border-radius: 6px;
}

.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}
.container-narrow { max-width: 860px; }
.site-main { min-height: 55vh; padding-bottom: 40px; }
.section { padding: 34px 0; }
.section-tight { padding: 20px 0; }

.skip-link {
    position: absolute; left: 16px; top: -60px; z-index: 2000;
    background: var(--plum-800); color: #fff; padding: 10px 16px;
    border-radius: 0 0 10px 10px; font-weight: 600;
}
.skip-link:focus { top: 0; color: #fff; }

/* ---------- branded page loader ---------- */
.page-loader {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    color: #fff;
    background:
        radial-gradient(circle at 50% 34%, rgba(166, 25, 79, .4), transparent 46%),
        linear-gradient(155deg, var(--plum-800) 0%, var(--plum-950) 100%);
    transition: opacity .4s ease, visibility .4s ease;
    animation: pageLoaderFallback .35s ease 8s forwards;
}
.page-loader.is-done {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.page-loader-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transform: translateY(-5vh);
}
.page-loader-mark {
    position: relative;
    width: 74px;
    height: 74px;
    display: grid;
    place-items: center;
    margin-bottom: 20px;
}
.page-loader-mark img {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .35);
    box-shadow: 0 12px 34px rgba(0, 0, 0, .35);
}
.page-loader-orbit {
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, .16);
    border-top-color: var(--pink-300);
    animation: pageLoaderSpin .9s linear infinite;
}
.page-loader-name {
    font-family: var(--serif);
    font-size: 27px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -.01em;
}
.page-loader-tagline {
    margin-top: 5px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .3em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .55);
}
.page-loader-bar {
    width: 148px;
    height: 3px;
    margin-top: 22px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
}
.page-loader-bar span {
    display: block;
    width: 42%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--pink-300), #fff);
    animation: pageLoaderSweep 1.15s cubic-bezier(.65, 0, .35, 1) infinite;
}
@keyframes pageLoaderSpin {
    to { transform: rotate(360deg); }
}
@keyframes pageLoaderSweep {
    0% { transform: translateX(-120%); }
    100% { transform: translateX(320%); }
}
@keyframes pageLoaderFallback {
    to { opacity: 0; visibility: hidden; pointer-events: none; }
}
@media (prefers-reduced-motion: reduce) {
    .page-loader-orbit { opacity: .6; animation: none; }
    .page-loader-bar span { width: 100%; animation: none; }
}
@media print {
    .page-loader { display: none !important; }
}

.icon { width: 1.15em; height: 1.15em; display: inline-block; vertical-align: -.18em; flex: none; }
.icon-lg { width: 22px; height: 22px; }
.text-berry { color: var(--berry); }
.text-muted { color: var(--muted); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.mb-0 { margin-bottom: 0; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 34px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.full { width: 100%; }
.nowrap { white-space: nowrap; }
.hide { display: none !important; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    line-height: 1;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--berry);
}
.eyebrow::before {
    content: "";
    width: 22px;
    height: 2px;
    background: var(--pink);
    border-radius: 99px;
}
.eyebrow.no-line::before { display: none; }

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
}
.section-head h2 { margin: 0; }
.section-head p { color: var(--muted); margin: 6px 0 0; max-width: 580px; }
.section-link {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 13px; font-weight: 700; white-space: nowrap;
}
.section-link .icon { transition: transform .18s ease; }
.section-link:hover .icon { transform: translateX(3px); }

.section-title-center {
    display: flex; align-items: center; justify-content: center; gap: 22px;
    margin-bottom: 30px; text-align: center;
}
.section-title-center::before,
.section-title-center::after {
    content: ""; height: 1px; width: min(150px, 18vw);
    background: linear-gradient(90deg, transparent, var(--line-strong));
}
.section-title-center::after { background: linear-gradient(90deg, var(--line-strong), transparent); }
.section-title-center h2 { margin: 0; }

/* ---------- buttons ---------- */
.btn {
    --btn-bg: var(--berry);
    --btn-color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 12px 22px;
    border-radius: 999px;
    border: 1.5px solid transparent;
    background: var(--btn-bg);
    color: var(--btn-color);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.15;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease, color .18s ease;
    white-space: nowrap;
}
.btn .icon { width: 1.1em; height: 1.1em; }
.btn:hover { transform: translateY(-1px); color: var(--btn-color); }
.btn:active { transform: translateY(0); }
.btn-primary {
    background: linear-gradient(135deg, var(--berry-500) 0%, var(--berry) 55%, var(--berry-700) 100%);
    color: #fff;
    box-shadow: 0 12px 26px rgba(166, 25, 79, .24);
}
.btn-primary:hover { background: linear-gradient(135deg, var(--berry) 0%, var(--berry-700) 100%); box-shadow: 0 16px 32px rgba(166, 25, 79, .3); }
.btn-dark { background: var(--plum-800); color: #fff; box-shadow: 0 12px 26px rgba(46, 10, 32, .18); }
.btn-dark:hover { background: var(--plum-950); }
.btn-outline { background: #fff; border-color: var(--pink-300); color: var(--berry); }
.btn-outline:hover { background: var(--blush); border-color: var(--pink); color: var(--berry-700); }
.btn-outline-light { background: transparent; border-color: rgba(255,255,255,.45); color: #fff; }
.btn-outline-light:hover { background: rgba(255,255,255,.1); color: #fff; border-color: #fff; }
.btn-light { background: #fff; color: var(--plum-800); }
.btn-light:hover { background: var(--blush); color: var(--berry); }
.btn-soft { background: var(--pink-100); color: var(--berry); }
.btn-soft:hover { background: var(--pink-200); }
.btn-ghost { background: transparent; color: var(--muted); border-color: transparent; }
.btn-ghost:hover { color: var(--berry); background: var(--blush); }
.btn-danger { background: var(--red-soft); color: var(--red); border-color: #F6C9D0; }
.btn-danger:hover { background: #FADFE4; }
.btn-success { background: var(--green); color: #fff; }
.btn-sm { padding: 9px 16px; font-size: 13px; }
.btn-xs { padding: 7px 12px; font-size: 12px; }
.btn-lg { padding: 15px 27px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-icon { width: 40px; height: 40px; padding: 0; border-radius: 50%; }
.btn[disabled], .btn.is-disabled { opacity: .55; pointer-events: none; }

.link-arrow { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 13.5px; }
.link-arrow .icon { transition: transform .18s ease; }
.link-arrow:hover .icon { transform: translateX(3px); }

/* ---------- badges ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 999px;
    font-size: 11px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: .02em;
    white-space: nowrap;
}
.badge .icon { width: 12px; height: 12px; }
.badge-green { background: var(--green-soft); color: var(--green); }
.badge-amber { background: var(--amber-soft); color: var(--amber); }
.badge-rose { background: var(--pink-100); color: var(--berry); }
.badge-plum { background: #EFE6F5; color: var(--purple); }
.badge-red { background: var(--red-soft); color: var(--red); }
.badge-grey { background: #F3EFF4; color: var(--muted); }
.badge-pink { background: var(--pink-200); color: var(--berry-700); }
.badge-white { background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.16); }
.badge-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---------- avatars & stars ---------- */
.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    overflow: hidden;
    flex: none;
    border: 2px solid #fff;
    box-shadow: 0 4px 14px rgba(64, 12, 38, .12);
    background: var(--pink-100);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: .02em;
    color: var(--plum-800);
    user-select: none;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { border-width: 3px; font-size: 22px; }
.av-1 { background: linear-gradient(145deg, #F9D7E6, #EFA3C4); color: #6B1238; }
.av-2 { background: linear-gradient(145deg, #E7DFF7, #BBA7E0); color: #3D2165; }
.av-3 { background: linear-gradient(145deg, #FBE7D6, #EFB58F); color: #6B2E17; }
.av-4 { background: linear-gradient(145deg, #DCEFF2, #9BCDDB); color: #19505C; }
.av-5 { background: linear-gradient(145deg, #F4E5C6, #DEBB72); color: #5C4214; }
.av-6 { background: linear-gradient(145deg, #E3EEDD, #A9C89A); color: #305125; }
.avatar-stack { display: inline-flex; align-items: center; }
.avatar-stack .avatar { margin-left: -9px; }
.avatar-stack .avatar:first-child { margin-left: 0; }

.stars { display: inline-flex; position: relative; line-height: 1; letter-spacing: 1px; font-size: 14px; vertical-align: -.1em; }
.stars-base { color: #ECDAE2; white-space: nowrap; }
.stars-fill { position: absolute; left: 0; top: 0; overflow: hidden; color: var(--gold); white-space: nowrap; }
.rating-line { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.rating-line strong { color: var(--ink); }
.rating-line .stars { font-size: 13px; }

/* ---------- icon buttons, notification & user menu ---------- */
.icon-btn {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #fff;
    color: var(--ink-soft);
    transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}
.icon-btn:hover { background: var(--blush); border-color: var(--pink-200); color: var(--berry); transform: translateY(-1px); }
.notif-btn { position: relative; }
.notif-dot {
    position: absolute; top: -3px; right: -2px; min-width: 18px; height: 18px;
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0 4px; border-radius: 999px;
    background: var(--berry); color: #fff;
    font-size: 9.5px; font-weight: 800; border: 2px solid #fff;
}

.user-menu { position: relative; }
.user-menu summary {
    display: flex; align-items: center; gap: 7px;
    list-style: none; cursor: pointer;
    padding: 3px 4px 3px 3px; border-radius: 999px;
    transition: background .18s ease;
}
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover { background: var(--blush); }
.user-menu-name { font-size: 12.5px; font-weight: 600; color: var(--ink); max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu summary .chev { width: 14px; height: 14px; color: var(--muted); transition: transform .18s ease; }
.user-menu[open] summary .chev { transform: rotate(180deg); }
.user-menu-panel {
    position: absolute; right: 0; top: calc(100% + 10px); z-index: 80;
    width: 238px; background: #fff; border: 1px solid var(--line);
    border-radius: 16px; box-shadow: var(--shadow-lift); padding: 8px;
    animation: menuPop .16s ease;
}
@keyframes menuPop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.user-menu-head { padding: 10px 11px 11px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.user-menu-head strong { display: block; font-size: 13.5px; color: var(--plum-800); }
.user-menu-head span { font-size: 11.5px; color: var(--muted); }
.user-menu-panel a, .menu-logout {
    display: flex; align-items: center; gap: 9px; width: 100%;
    padding: 9px 11px; border-radius: 9px;
    font-size: 13px; font-weight: 500; color: var(--ink-soft);
    background: none; border: none; text-align: left;
}
.user-menu-panel a:hover, .menu-logout:hover { background: var(--blush); color: var(--berry); }
.user-menu-panel .icon { width: 16px; height: 16px; color: var(--muted); }
.user-menu-panel .menu-count { margin-left: auto; background: var(--berry); color: #fff; border-radius: 999px; font-size: 10px; padding: 1px 6px; }
.user-menu-panel form { margin: 4px 0 0; border-top: 1px solid var(--line); padding-top: 5px; }

/* ---------- forms ---------- */
.form-field { margin-bottom: 17px; }
.form-field > label, .field-label {
    display: block; margin-bottom: 7px;
    font-size: 12.5px; font-weight: 600; color: var(--ink-soft);
}
.form-field > label .req { color: var(--berry); }
.form-control {
    width: 100%; min-height: 48px; padding: 12px 15px;
    border: 1.5px solid var(--line); border-radius: 12px;
    background: #fff; color: var(--ink);
    font-size: 14px; line-height: 1.4;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
    appearance: none;
}
.form-control::placeholder { color: #B5A3AF; }
.form-control:hover { border-color: var(--line-strong); }
.form-control:focus {
    outline: none; border-color: var(--pink); background: #FFFCFD;
    box-shadow: 0 0 0 4px rgba(244, 156, 193, .16);
}
textarea.form-control { min-height: 110px; resize: vertical; }
select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237C6878' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 13px center;
    padding-right: 40px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-hint { font-size: 11.5px; color: var(--muted); margin: 6px 0 0; line-height: 1.5; }
.form-error { font-size: 12px; color: var(--red); margin: 6px 0 0; font-weight: 500; }
.form-control.is-invalid, .form-control.is-invalid:focus { border-color: var(--red); box-shadow: 0 0 0 3px rgba(166,25,79,.12); }
.input-wrap { position: relative; }
.input-wrap > .icon {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    width: 18px; height: 18px; color: var(--muted-light); pointer-events: none;
}
.input-wrap .form-control { padding-left: 43px; }
.input-wrap.has-toggle .form-control { padding-right: 46px; }
.input-wrap .pw-toggle {
    position: absolute; right: 7px; top: 50%; transform: translateY(-50%);
    width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
    border: none; background: none; color: var(--muted); border-radius: 50%;
}
.input-wrap .pw-toggle:hover { background: var(--blush); color: var(--berry); }
.input-wrap .pw-toggle .icon { width: 18px; height: 18px; }

.checkbox-line { display: flex; align-items: flex-start; gap: 9px; font-size: 12.5px; color: var(--ink-soft); line-height: 1.5; cursor: pointer; }
.checkbox-line input { width: 16px; height: 16px; margin: 1px 0 0; accent-color: var(--berry); flex: none; }
.checkbox-line a { font-weight: 600; }
.form-divider { display: flex; align-items: center; gap: 12px; color: var(--muted-light); font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; margin: 18px 0; }
.form-divider::before, .form-divider::after { content: ""; height: 1px; background: var(--line); flex: 1; }

.notice {
    display: flex; gap: 11px; align-items: flex-start;
    border-radius: 13px; padding: 13px 15px;
    font-size: 12.8px; line-height: 1.55;
    background: var(--blush); border: 1px solid var(--line);
    color: var(--ink-soft);
}
.notice .icon { width: 18px; height: 18px; margin-top: 1px; flex: none; color: var(--berry); }
.notice-info { background: #F5F2FB; border-color: #E8DEF5; }
.notice-warning { background: var(--amber-soft); border-color: #F4E4C1; color: #7C5510; }
.notice-warning .icon { color: var(--amber); }
.notice-success { background: var(--green-soft); border-color: #D2F0E1; color: #116B49; }
.notice-success .icon { color: var(--green); }
.notice-danger { background: var(--red-soft); border-color: #F5CDD5; color: #8E2336; }
.notice-danger .icon { color: var(--red); }

/* ---------- flash messages ---------- */
.flash-container { position: relative; z-index: 20; }
.flash-stack { display: grid; gap: 9px; margin: 18px 0 0; }
.flash {
    display: flex; align-items: flex-start; gap: 11px;
    padding: 13px 15px; border-radius: 13px;
    background: #fff; border: 1px solid var(--line);
    box-shadow: var(--shadow-card);
    font-size: 13px; line-height: 1.55; color: var(--ink-soft);
    animation: flashIn .25s ease;
}
@keyframes flashIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: none; } }
.flash > .icon { width: 18px; height: 18px; margin-top: 1px; flex: none; }
.flash-success { background: var(--green-soft); border-color: #C9EBD9; }
.flash-success > .icon { color: var(--green); }
.flash-error { background: var(--red-soft); border-color: #F3C9D2; }
.flash-error > .icon { color: var(--red); }
.flash-warning { background: var(--amber-soft); border-color: #F2E1BD; }
.flash-warning > .icon { color: var(--amber); }
.flash-info { background: #F5F1FA; border-color: #E7DCF2; }
.flash-info > .icon { color: var(--purple); }
.flash-close { margin-left: auto; border: none; background: none; color: var(--muted); padding: 2px; display: inline-flex; }
.flash-close .icon { width: 16px; height: 16px; }
.flash-close:hover { color: var(--berry); }

/* ---------- iziToast brand theme ---------- */
.iziToast.psych-toast {
    border-radius: 14px;
    border: 1px solid var(--line);
    box-shadow: 0 18px 46px rgba(35, 6, 21, .16);
    font-family: var(--sans);
}
.iziToast.psych-toast .iziToast-title { font-size: 12.5px; font-weight: 700; letter-spacing: .01em; }
.iziToast.psych-toast .iziToast-message { font-size: 12.5px; line-height: 1.55; }
.iziToast.psych-toast .iziToast-message a { color: var(--berry); text-decoration: underline; font-weight: 600; }
.iziToast.psych-toast .iziToast-progressbar > div { border-radius: 99px; }

/* ---------- confirmation modal ---------- */
.confirm-backdrop {
    position: fixed; inset: 0; z-index: 4000;
    display: flex; align-items: center; justify-content: center;
    padding: 22px;
    background: rgba(35, 6, 21, .58);
    -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
    opacity: 0; transition: opacity .18s ease;
}
.confirm-backdrop[hidden] { display: none; }
.confirm-backdrop.is-visible { opacity: 1; }
.confirm-dialog {
    width: min(440px, 100%);
    display: grid; grid-template-columns: 46px minmax(0, 1fr);
    align-items: start; gap: 14px 16px;
    padding: 24px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 20px;
    box-shadow: 0 30px 80px rgba(35, 6, 21, .32);
    transform: translateY(10px) scale(.97);
    transition: transform .18s ease;
}
.confirm-backdrop.is-visible .confirm-dialog { transform: none; }
.confirm-badge {
    width: 46px; height: 46px; border-radius: 14px;
    display: grid; place-items: center;
    background: var(--pink-100); color: var(--berry);
}
.confirm-badge .icon { width: 22px; height: 22px; }
.confirm-dialog[data-tone="danger"] .confirm-badge { background: var(--red-soft); color: var(--red); }
.confirm-dialog[data-tone="danger"] .confirm-actions [data-confirm-ok] { background: var(--red); border-color: var(--red); color: #fff; }
.confirm-dialog[data-tone="danger"] .confirm-actions [data-confirm-ok]:hover { background: #9F243A; border-color: #9F243A; }
.confirm-copy h3 { font-family: var(--serif); font-size: 21px; margin: 0 0 5px; }
.confirm-copy p { font-size: 13px; color: var(--muted); line-height: 1.6; margin: 0; overflow-wrap: anywhere; }
.confirm-copy-input { margin-top: 12px; font-size: 12px; }
.confirm-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.confirm-actions .btn { min-width: 96px; }
@media (max-width: 520px) {
    .confirm-dialog { padding: 20px; }
    .confirm-actions { flex-direction: column-reverse; }
    .confirm-actions .btn { width: 100%; }
}

/* ---------- empty state ---------- */
.empty-state {
    text-align: center; padding: 48px 24px;
    background: #fff; border: 1px dashed var(--line-strong);
    border-radius: var(--radius); color: var(--muted);
}
.empty-state .empty-icon {
    width: 64px; height: 64px; margin: 0 auto 14px;
    display: grid; place-items: center; border-radius: 50%;
    background: var(--blush); color: var(--berry);
}
.empty-state .empty-icon .icon { width: 28px; height: 28px; }
.empty-state h3 { margin-bottom: 5px; }
.empty-state p { max-width: 420px; margin: 0 auto 16px; font-size: 13px; }

/* ---------- tables (shared) ---------- */
.table-wrap { overflow-x: auto; border-radius: 14px; border: 1px solid var(--line); background: #fff; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
    text-align: left; padding: 12px 14px; white-space: nowrap;
    background: #FCF7FA; color: var(--muted);
    font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
    border-bottom: 1px solid var(--line);
}
.table td { padding: 13px 14px; border-bottom: 1px solid #F8EFF3; vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: #FEFAFB; }
.table .cell-main { display: block; font-weight: 600; color: var(--ink); }
.table .cell-sub { display: block; font-size: 11.5px; color: var(--muted); }

/* ---------- skeleton / loading ---------- */
.skeleton { background: linear-gradient(90deg, #F5ECF2 25%, #FBF6F9 37%, #F5ECF2 63%); background-size: 400% 100%; animation: shimmer 1.4s ease infinite; border-radius: 8px; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* ---------- misc shared components ---------- */
.divider { height: 1px; background: var(--line); margin: 20px 0; }
.pill-row { display: flex; flex-wrap: wrap; gap: 7px; }
.pill {
    display: inline-flex; align-items: center; gap: 6px;
    background: var(--blush); border: 1px solid var(--line);
    color: var(--ink-soft); border-radius: 999px;
    padding: 5px 10px; font-size: 11px; font-weight: 600;
}
.avatar-name { display: flex; align-items: center; gap: 10px; }
.avatar-name .name { font-weight: 600; font-size: 13.5px; color: var(--ink); line-height: 1.3; }
.avatar-name .sub { font-size: 11.5px; color: var(--muted); }

.alert-bar {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    background: var(--pink-100); border: 1px solid var(--pink-200);
    border-radius: 13px; padding: 12px 15px;
    color: var(--berry-700); font-size: 12.5px; font-weight: 500;
}
.alert-bar .icon { width: 17px; height: 17px; }
.alert-bar a { font-weight: 700; text-decoration: underline; }

.progress-steps { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.progress-step {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 11.5px; font-weight: 600; color: var(--muted);
}
.progress-step span {
    width: 21px; height: 21px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: #F4EDF2; color: var(--muted); font-size: 10px; font-weight: 800;
}
.progress-step.is-active { color: var(--berry); }
.progress-step.is-active span { background: var(--berry); color: #fff; }
.progress-step.is-done span { background: var(--green-soft); color: var(--green); }
.progress-step-sep { width: 16px; height: 1px; background: var(--line-strong); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}
