/* ============================================================
   Kids Club — Shared Stylesheet
   Mobile-first → Tablet (640px) → Desktop (1024px)
   ============================================================ */

/* ─── Variables ─────────────────────────────────────────────── */
:root {
    --pink: #f472a3;
    --pink-light: #fff0f5;
    --pink-mid: #f8a5b5;
    --blue: #60cdf6;
    --blue-light: #eafaff;
    --white: #fdffff;
    --dark: #2d2d3a;
    --gray: #9b9bae;
    --gray-light: #f5f5fa;
    --success: #34c759;
    --danger: #ff3b30;
    --warning: #ff9500;
    --orange: #ff6b35;
    --gradient: linear-gradient(160deg, #fff5f8 0%, #f0f9ff 60%, #fff5f8 100%);
    --gradient-bg: linear-gradient(0deg, #f8a5b550, #f472a350 25%, #60cdf650);
    --gradient-hero: linear-gradient(135deg, #f8a5b5, #f472a3 25%, #60cdf6);
    --shadow-card: 0 2px 16px rgba(244, 114, 163, 0.1);
    --shadow-nav: 0 -2px 20px rgba(244, 114, 163, 0.12);
    --radius-card: 18px;
    --radius-btn: 50px;
    --topbar-h: 56px;
    --nav-h: 64px;
    --sidebar-w: 240px;
    --container: 480px;
}

/* ─── Reset & Base ──────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: "IBM Plex Sans Thai", sans-serif;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.55;
    color: var(--dark);
    background: var(--gradient-bg);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}
img {
    max-width: 100%;
    display: block;
}
button {
    cursor: pointer;
    font-family: inherit;
}
input,
select,
textarea {
    font-family: inherit;
}

/* ─── Layout ────────────────────────────────────────────────── */
.app-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Mobile: single column, bottom nav */
.main-content {
    flex: 1;
    width: 100%;
    padding-top: var(--topbar-h);
    padding-bottom: calc(var(--nav-h) + 8px);
}

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 16px 16px 0;
}

/* ─── Topbar ────────────────────────────────────────────────── */
.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--topbar-h);
    /* background: rgba(96,205,246,0.50); */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    /* border-bottom: 1px solid rgba(244,114,163,0.10); */
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 12px;
    z-index: 100;
}

.topbar-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 800;
    color: var(--pink);
    letter-spacing: -0.3px;
    text-decoration: none;
}

.topbar-logo-icon {
    font-size: 22px;
}

.topbar-spacer {
    flex: 1;
}

.topbar-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--pink-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--pink);
    text-decoration: none;
    position: relative;
    transition: background 0.2s;
}
.topbar-icon-btn:hover {
    background: #ffd6e7;
}

.topbar-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 16px;
    height: 16px;
    background: var(--danger);
    color: white;
    font-size: 9px;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.topbar-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--gradient-hero);
    color: white;
    font-size: 14px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    flex-shrink: 0;
}

/* ─── Bottom Navigation (mobile) ────────────────────────────── */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--nav-h);
    background: rgba(253, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid rgba(244, 114, 163, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-around;
    padding: 0 8px;
    z-index: 100;
    box-shadow: var(--shadow-nav);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 8px 12px;
    border-radius: 14px;
    text-decoration: none;
    color: var(--gray);
    font-size: 10px;
    font-weight: 600;
    transition: all 0.2s;
    min-width: 54px;
}
.nav-item:hover {
    color: var(--pink);
    background: var(--pink-light);
}
.nav-item.active {
    color: var(--pink);
}
.nav-item.active .nav-icon {
    background: var(--pink-light);
}

.nav-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: background 0.2s;
}

/* Checkin special button */
.nav-item.nav-checkin .nav-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--gradient-hero);
    font-size: 22px;
    box-shadow: 0 4px 16px rgba(244, 114, 163, 0.4);
    margin-top: -8px;
}
.nav-item.nav-checkin {
    color: var(--pink-light);
    font-weight: 700;
}

/* ─── Sidebar (desktop only) ─────────────────────────────────── */
.sidebar {
    display: none;
    width: var(--sidebar-w);
    height: 100vh;
    background: rgba(253, 255, 255, 0.7);
    border-right: 1px solid rgba(244, 114, 163, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 90;
    /* flex column: logo stays at top, nav scrolls */
    display: none;
    flex-direction: column;
    overflow: hidden;
}

/* Sticky logo at top of sidebar */
.sidebar-logo-wrap {
    flex-shrink: 0;
    padding: 20px 16px 16px;
    border-bottom: 1px solid rgba(244, 114, 163, 0.12);
    background: rgba(253, 255, 255, 0.98);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 2;
}

/* Scrollable nav area */
.sidebar-scroll {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px 16px 24px;
    /* Smooth scroll on touch */
    -webkit-overflow-scrolling: touch;
    /* Custom thin scrollbar */
    scrollbar-width: thin;
    scrollbar-color: rgba(244, 114, 163, 0.25) transparent;
}
.sidebar-scroll::-webkit-scrollbar {
    width: 4px;
}
.sidebar-scroll::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar-scroll::-webkit-scrollbar-thumb {
    background: rgba(244, 114, 163, 0.3);
    border-radius: 4px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    text-decoration: none;
    color: var(--gray);
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
}
.sidebar-item:hover {
    background: var(--pink-light);
    color: var(--pink);
}
.sidebar-item.active {
    background: var(--pink-light);
    color: var(--pink);
}
.sidebar-item .s-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
}

.sidebar-divider {
    height: 1px;
    background: rgba(244, 114, 163, 0.1);
    margin: 8px 0;
}

.sidebar-section-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--gray);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 4px 14px;
    margin-top: 8px;
}

/* ─── Cards ─────────────────────────────────────────────────── */
.card {
    background: white;
    border-radius: var(--radius-card);
    padding: 10px 16px;
    box-shadow: var(--shadow-card);
    margin-bottom: 12px;
}

.card-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--dark);
}

.section-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 16px 0 8px;
}

/* ─── Hero Card ──────────────────────────────────────────────── */
.hero-card {
    background: var(--gradient-hero);
    border-radius: 24px;
    padding: 20px;
    color: white;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(248, 165, 181, 0.4);
}
.hero-card::before {
    content: "";
    position: absolute;
    width: 140px;
    height: 140px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 50%;
    top: -40px;
    right: -30px;
}
.hero-card::after {
    content: "";
    position: absolute;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    bottom: -20px;
    left: 40px;
}

/* ─── Buttons ────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 24px;
    border-radius: var(--radius-btn);
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    border: none;
    transition: all 0.2s;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient-hero);
    color: white;
    box-shadow: 0 4px 16px rgba(244, 114, 163, 0.35);
}
.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(244, 114, 163, 0.45);
}
.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--blue-light);
    color: var(--blue);
    border: 1.5px solid rgba(96, 205, 246, 0.3);
}
.btn-secondary:hover {
    background: #d4f3ff;
}

.btn-outline {
    background: transparent;
    color: var(--pink);
    border: 1.5px solid var(--pink);
}
.btn-outline:hover {
    background: var(--pink-light);
}

.btn-danger {
    background: #fff0f0;
    color: var(--danger);
    border: 1.5px solid rgba(255, 59, 48, 0.2);
}
.btn-danger:hover {
    background: #ffe0e0;
}

.btn-block {
    width: 100%;
    display: flex;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ─── Forms ──────────────────────────────────────────────────── */
.form-group {
    margin-bottom: 14px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #e8ddf0;
    border-radius: 12px;
    font-size: 15px;
    font-family: inherit;
    color: var(--dark);
    background: white;
    outline: none;
    transition:
        border-color 0.2s,
        box-shadow 0.2s;
    appearance: none;
    -webkit-appearance: none;
}
.form-control:focus {
    border-color: var(--pink-mid);
    box-shadow: 0 0 0 3px rgba(248, 165, 181, 0.15);
}
.form-control::placeholder {
    color: #c0b8cc;
}

select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%239b9bae' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.form-error {
    font-size: 12px;
    color: var(--danger);
    margin-top: 4px;
}

/* ─── Alerts ─────────────────────────────────────────────────── */
.alert {
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 12px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.alert-success {
    background: #eafff3;
    color: #1a8a45;
    border: 1px solid #b6f0cc;
}
.alert-error {
    background: #fff0f0;
    color: var(--danger);
    border: 1px solid #ffc9c9;
}
.alert-warning {
    background: #fff8ed;
    color: #a05a00;
    border: 1px solid #fde5b0;
}
.alert-info {
    background: var(--blue-light);
    color: #0077a8;
    border: 1px solid #b8e8fc;
}

/* ─── Badges ─────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 10px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
}
.badge-pink {
    background: var(--pink-light);
    color: var(--pink);
}
.badge-blue {
    background: var(--blue-light);
    color: #0090cc;
}
.badge-green {
    background: #eafff3;
    color: #1a8a45;
}
.badge-orange {
    background: #fff4ec;
    color: var(--orange);
}
.badge-gray {
    background: var(--gray-light);
    color: var(--gray);
}

/* ─── Page Header (centered title, left back, right action) ──── */
.page-header {
    display: grid;
    grid-template-columns: 36px 1fr 36px;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    min-height: 36px;
}
.page-header > .page-header-left {
    justify-self: start;
}
.page-header > .page-header-right {
    justify-self: end;
}
.page-header h1 {
    font-size: 18px;
    font-weight: 800;
    color: white;
    text-align: center;
    margin: 0 auto;
    line-height: 1.25;
    grid-column: 2;

    /* max-content centered */
    width: max-content;
    max-width: 100%;
}

.page-header h1 .page-header-title {
    /* pill */
    padding: 6px 20px;
    border-radius: 50px;
    background: var(--gradient-hero);
}

.page-header h1 .page-header-sub {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: var(--gray);
    margin-top: 12px;
}
/* When only h1 is present (no slots), still center */
.page-header > h1:first-child:last-child {
    grid-column: 1 / -1;
}
.page-back-btn {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: white;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--dark);
    text-decoration: none;
    box-shadow: var(--shadow-card);
    flex-shrink: 0;
}
.page-header-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 12px;
    background: var(--pink);
    color: white;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    box-shadow: var(--shadow-card);
    gap: 4px;
    width: max-content;
}
.page-header-action:hover {
    filter: brightness(0.95);
}

/* ─── Emoji Avatar ───────────────────────────────────────────── */
.avatar-emoji {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--pink-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    flex-shrink: 0;
}

.avatar-emoji-lg {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    font-size: 40px;
}

/* ─── Quick Action Grid ──────────────────────────────────────── */
.quick-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.quick-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 8px;
    border-radius: 18px;
    text-decoration: none;
    color: var(--dark);
    text-align: center;
    transition:
        transform 0.15s,
        box-shadow 0.15s;

    /* gradient border */
    border: 2px solid transparent;
    background:
        linear-gradient(white, white) padding-box,
        var(--gradient-hero) border-box;

    box-shadow: var(--shadow-card);
}

.quick-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(244, 114, 163, 0.15);
}
.quick-item:active {
    transform: translateY(0);
}

.quick-icon {
    width: 72px;
    height: 72px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}
.quick-icon-pink {
    background: var(--pink-light);
}
.quick-icon-blue {
    background: var(--blue-light);
}
.quick-icon-green {
    background: #eafff3;
}
.quick-icon-orange {
    background: #fff4ec;
}

.quick-label {
    font-size: 12px;
    font-weight: 700;
    line-height: 1.3;
    margin-top: 2px;
}

.quick-desc {
    font-size: 10px;
    font-weight: 400;
    color: var(--gray);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ─── Scroll Row (horizontal scrollable menus) ──────────────── */
.scroll-row {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-bottom: 16px;
}
.scroll-row::-webkit-scrollbar {
    display: none;
}

.scroll-card {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 12px;
    min-width: 80px;
    background: white;
    border-radius: 18px;
    box-shadow: var(--shadow-card);
    text-decoration: none;
    color: var(--dark);
    text-align: center;
    transition: transform 0.15s;
    position: relative;
}
.scroll-card:hover {
    transform: translateY(-2px);
}

.scroll-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.scroll-card-label {
    font-size: 11px;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
}

.fav-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 12px;
    color: var(--gray);
    padding: 2px;
    line-height: 1;
    opacity: 0.5;
    transition: all 0.2s;
}
.fav-btn:hover,
.fav-btn.active {
    opacity: 1;
    color: var(--pink);
}

/* ─── Service Grid (Dashboard) ─────────────────────────────── */
.service-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}
.service-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 6px 10px;
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-card);
    text-decoration: none;
    color: var(--dark);
    transition: all 0.2s;
    border: 2px solid transparent;
}
.service-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(244, 114, 163, 0.15);
}
.service-item.is-fav {
    border-color: rgba(244, 114, 163, 0.25);
}
.service-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--dark); /* monochrome black icons — sidebar remains pink */
}
.service-icon i {
    color: var(--dark);
}
.service-icon img {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    object-fit: cover;
}
.service-label {
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    line-height: 1.3;
    color: var(--dark);
}
.fav-star {
    position: absolute;
    top: 3px;
    right: 3px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 10px;
    color: var(--gray-light);
    padding: 2px;
    line-height: 1;
    transition: all 0.2s;
}
.fav-star:hover,
.fav-star.active {
    color: var(--pink);
}

/* ─── Filter Chips / Tab Bar (shared pill-filter primitive) ─────
 * Used by: articles, doctors, rewards, dashboard etc.
 * Canonical names:  .filter-chips  >  .filter-chip
 * Legacy aliases:   .tab-bar       >  .tab-btn   (kept for JS hooks)
 * Legacy aliases:   .spec-filter   >  .spec-chip
 * Legacy aliases:   .cat-filter    >  .cat-chip
 */
.filter-chips,
.tab-bar,
.spec-filter,
.cat-filter {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 12px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.filter-chips::-webkit-scrollbar,
.tab-bar::-webkit-scrollbar,
.spec-filter::-webkit-scrollbar,
.cat-filter::-webkit-scrollbar {
    display: none;
}

.filter-chip,
.tab-btn,
.spec-chip,
.cat-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
    border: 1.5px solid #e8ddf0;
    background: white;
    color: var(--dark);
    transition: all 0.2s;
    flex-shrink: 0;
    cursor: pointer;
    font-family: inherit;
}
.filter-chip:hover:not(.active),
.tab-btn:hover:not(.active),
.spec-chip:hover:not(.active),
.cat-chip:hover:not(.active) {
    background: var(--pink-light);
    border-color: var(--pink);
    color: var(--pink);
}
.filter-chip.active,
.tab-btn.active,
.spec-chip.active,
.cat-chip.active {
    background: var(--pink);
    border-color: var(--pink);
    color: white;
}
.filter-chip-count {
    font-size: 11px;
    padding: 1px 7px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.08);
    color: inherit;
    font-weight: 700;
    margin-left: 2px;
}
.filter-chip.active .filter-chip-count {
    background: rgba(255, 255, 255, 0.3);
}

/* ─── Search Box (shared) ───────────────────────────────────── */
.search-box {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap; /* ป้องกันเลยขอบหน้าจอเมื่อ <select> มี native min-width กว้าง */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}
.search-box input {
    flex: 1 1 160px; /* ย่อได้ถึง 180px, ยืดเต็มที่เหลือ */
    min-width: 0; /* ปลดล็อกให้ flex shrink ลงได้ */
    padding: 10px 14px;
    border: 1.5px solid #e8ddf0;
    border-radius: 14px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    background: white;
    transition: border-color 0.15s;
    box-sizing: border-box;
}
.search-box input:focus {
    border-color: var(--pink-mid, var(--pink));
}
.search-box button {
    padding: 10px 16px;
    border: none;
    border-radius: 14px;
    background: var(--gradient-hero);
    color: white;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    flex-shrink: 0;
}
.search-box select {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
    padding: 10px 12px;
    border: 1.5px solid #e8ddf0;
    border-radius: 14px;
    font-size: 13px;
    font-family: inherit;
    background: white;
    outline: none;
    cursor: pointer;
    box-sizing: border-box;
}

/* ─── Member Card ────────────────────────────────────────────── */
.member-card {
    background: var(--gradient-hero);
    border-radius: 24px;
    padding: 20px;
    color: white;
    margin-bottom: 16px;
    position: relative;
    overflow: hidden;
}
.member-card::before {
    content: "";
    position: absolute;
    width: 140px;
    height: 140px;
    background: rgba(255, 255, 255, 0.07);
    border-radius: 50%;
    top: -40px;
    right: -30px;
}

.points-row {
    display: flex;
    gap: 12px;
    margin-top: 14px;
}
.point-box {
    flex: 1;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 14px;
    padding: 12px 14px;
    backdrop-filter: blur(6px);
}
.point-box-value {
    font-size: 26px;
    font-weight: 800;
    line-height: 1.1;
}
.point-box-label {
    font-size: 11px;
    opacity: 0.9;
    margin-top: 2px;
}

/* ─── Info Rows ──────────────────────────────────────────────── */
.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0e6ea;
    font-size: 14px;
    gap: 12px;
}
.info-row:last-child {
    border-bottom: none;
}
.info-label {
    color: var(--gray);
    flex-shrink: 0;
}
.info-value {
    font-weight: 600;
    text-align: right;
}

/* ─── Child Card ─────────────────────────────────────────────── */
.child-card {
    background: white;
    border-radius: var(--radius-card);
    padding: 14px;
    box-shadow: var(--shadow-card);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 14px;
}

/* ─── Reward Card ────────────────────────────────────────────── */
.reward-card {
    background: white;
    border-radius: var(--radius-card);
    padding: 14px;
    box-shadow: var(--shadow-card);
    margin-bottom: 10px;
    display: flex;
    gap: 14px;
    align-items: center;
}
.reward-icon {
    width: 56px;
    height: 56px;
    border-radius: 15px;
    background: var(--pink-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}
.reward-cost {
    font-size: 14px;
    font-weight: 800;
    color: var(--pink);
    white-space: nowrap;
}

/* ─── History Item ───────────────────────────────────────────── */
.history-item {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0e6ea;
}
.history-item:last-child {
    border-bottom: none;
}
.history-amount {
    font-size: 15px;
    font-weight: 700;
    margin-left: auto;
    white-space: nowrap;
}
.history-amount.earn {
    color: var(--success);
}
.history-amount.spend {
    color: var(--danger);
}
.history-amount.convert {
    color: var(--blue);
}

/* ─── Checkin Calendar ───────────────────────────────────────── */
.checkin-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}
.calendar-day {
    aspect-ratio: 1;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    background: var(--gray-light);
    color: var(--gray);
}
.calendar-day.checked {
    background: var(--pink-light);
    color: var(--pink);
}
.calendar-day.today {
    background: var(--pink);
    color: white;
}
.calendar-day.streaked {
    background: linear-gradient(135deg, #f8a5b5, #f472a3);
    color: white;
}

/* ─── Quiz Card ──────────────────────────────────────────────── */
.quiz-card {
    background: white;
    border-radius: var(--radius-card);
    padding: 16px;
    box-shadow: var(--shadow-card);
    margin-bottom: 12px;
    display: flex;
    gap: 14px;
    align-items: center;
    text-decoration: none;
    color: var(--dark);
    transition:
        transform 0.15s,
        box-shadow 0.15s;
}
.quiz-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(244, 114, 163, 0.15);
}
.quiz-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--blue-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
}

/* ─── Progress Bar ───────────────────────────────────────────── */
.progress-bar {
    height: 8px;
    background: var(--gray-light);
    border-radius: 4px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: var(--gradient-hero);
    border-radius: 4px;
    transition: width 0.4s;
}

/* ─── Empty State ────────────────────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 40px 16px;
}
.empty-state-icon {
    font-size: 52px;
    margin-bottom: 12px;
}
.empty-state-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 6px;
}
.empty-state-desc {
    font-size: 14px;
    color: var(--gray);
}

/* ─── Divider ────────────────────────────────────────────────── */
.divider {
    height: 1px;
    background: #f0e6ea;
    margin: 12px 0;
}

/* ─── Utility ────────────────────────────────────────────────── */
.text-pink {
    color: var(--pink);
}
.text-blue {
    color: var(--blue);
}
.text-gray {
    color: var(--gray);
}
.text-danger {
    color: var(--danger);
}
.text-success {
    color: var(--success);
}
.text-center {
    text-align: center;
}
.text-right {
    text-align: right;
}
.font-bold {
    font-weight: 700;
}
.font-800 {
    font-weight: 800;
}
.mt-0 {
    margin-top: 0;
}
.mt-4 {
    margin-top: 4px;
}
.mt-8 {
    margin-top: 8px;
}
.mt-12 {
    margin-top: 12px;
}
.mt-16 {
    margin-top: 16px;
}
.mb-0 {
    margin-bottom: 0;
}
.mb-8 {
    margin-bottom: 8px;
}
.mb-12 {
    margin-bottom: 12px;
}
.mb-16 {
    margin-bottom: 16px;
}
.d-flex {
    display: flex;
}
.align-center {
    align-items: center;
}
.gap-8 {
    gap: 8px;
}
.gap-12 {
    gap: 12px;
}
.gap-16 {
    gap: 16px;
}
.flex-1 {
    flex: 1;
}
.w-100 {
    width: 100%;
}
.hidden {
    display: none !important;
}

/* ─── Spinner ────────────────────────────────────────────────── */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(244, 114, 163, 0.2);
    border-top-color: var(--pink);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    display: inline-block;
}
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ─── Welcome Public Layout ──────────────────────────────────── */
.welcome-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--topbar-h);
    background: rgba(253, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(244, 114, 163, 0.1);
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 12px;
    z-index: 100;
}

.welcome-hero {
    padding-top: calc(var(--topbar-h) + 32px);
    padding-bottom: 32px;
    text-align: center;
    padding-left: 20px;
    padding-right: 20px;
}

.welcome-title {
    font-size: 32px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 12px;
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stats-row {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin: 24px 0;
}
.stat-item {
    text-align: center;
}
.stat-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--pink);
}
.stat-label {
    font-size: 12px;
    color: var(--gray);
}

.feature-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    max-width: 480px;
    margin: 0 auto 32px;
}

.feature-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: white;
    border-radius: var(--radius-card);
    padding: 16px;
    box-shadow: var(--shadow-card);
    text-align: center;
}
.feature-icon {
    width: 72px;
    height: 72px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
}
.feature-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}
.feature-desc {
    font-size: 12px;
    color: var(--gray);
}

/* ─── Responsive: Tablet ≥ 640px ─────────────────────────────── */
@media (min-width: 640px) {
    :root {
        --container: 600px;
    }
    .container {
        padding: 20px 20px 0;
    }
    .quick-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    .welcome-title {
        font-size: 40px;
    }
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
        max-width: 560px;
    }
    .card {
        padding: 20px;
    }
}

/* ─── Responsive: Desktop ≥ 1024px ──────────────────────────── */
@media (min-width: 1024px) {
    :root {
        --container: 860px;
    }

    /* Show sidebar, hide bottom nav */
    .sidebar {
        display: flex;
    }
    .topbar-logo-img {
        height: 100px !important;
    }
    .bottom-nav {
        display: none;
    }

    /* Push content right of sidebar */
    .main-content {
        margin-left: var(--sidebar-w);
        padding-bottom: 24px;
    }

    .topbar {
        left: var(--sidebar-w);
    }
    .topbar-logo {
        display: none;
    } /* logo is in sidebar on desktop */

    /* Wider container */
    .container {
        max-width: var(--container);
        padding: 24px 24px 0;
    }

    /* 2-column grids */
    .quick-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .two-col {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
    .three-col {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }

    /* Larger cards */
    .card {
        padding: 24px;
    }
    .welcome-title {
        font-size: 48px;
    }
    .feature-grid {
        grid-template-columns: repeat(4, 1fr);
        max-width: 900px;
    }
    .stats-row {
        gap: 48px;
    }
}

/* ─── Print ──────────────────────────────────────────────────── */
@media print {
    .topbar,
    .bottom-nav,
    .sidebar,
    .btn {
        display: none;
    }
    .main-content {
        margin: 0;
        padding: 0;
    }
}

/* ─── Toast Notifications ────────────────────────────────────── */
#kc-toast-container {
    position: fixed;
    top: calc(var(--topbar-h) + 12px);
    right: 16px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
    max-width: min(360px, calc(100vw - 32px));
}

.kc-toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.12),
        0 2px 8px rgba(0, 0, 0, 0.06);
    pointer-events: auto;
    transform: translateX(120%);
    opacity: 0;
    transition:
        transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
        opacity 0.3s ease;
    min-width: 240px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.kc-toast.show {
    transform: translateX(0);
    opacity: 1;
}
.kc-toast.hide {
    transform: translateX(120%);
    opacity: 0;
    transition:
        transform 0.3s ease,
        opacity 0.25s ease;
}

.kc-toast-success {
    background: rgba(234, 255, 243, 0.97);
    border: 1px solid #b6f0cc;
    color: #1a6e3a;
}
.kc-toast-error {
    background: rgba(255, 240, 240, 0.97);
    border: 1px solid #ffc9c9;
    color: #c0392b;
}
.kc-toast-warning {
    background: rgba(255, 248, 237, 0.97);
    border: 1px solid #fde5b0;
    color: #a05a00;
}
.kc-toast-info {
    background: rgba(234, 250, 255, 0.97);
    border: 1px solid #b8e8fc;
    color: #0077a8;
}

.kc-toast-icon {
    font-size: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}
.kc-toast-body {
    flex: 1;
}
.kc-toast-title {
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 1px;
}
.kc-toast-msg {
    font-size: 13px;
}
.kc-toast-close {
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.4;
    font-size: 14px;
    padding: 0;
    line-height: 1;
    color: inherit;
    flex-shrink: 0;
}
.kc-toast-close:hover {
    opacity: 0.8;
}

/* Progress bar inside toast */
.kc-toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    border-radius: 0 0 16px 16px;
    background: currentColor;
    opacity: 0.25;
    transition: width linear;
}

/* ─── Page Loading Overlay ───────────────────────────────────── */
#kc-loading {
    position: fixed;
    inset: 0;
    background: rgba(253, 255, 255, 0.88);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 99999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.25s ease,
        visibility 0.25s ease;
}
#kc-loading.active {
    opacity: 1;
    visibility: visible;
}

.kc-loading-ring {
    width: 56px;
    height: 56px;
    position: relative;
}
.kc-loading-ring::before,
.kc-loading-ring::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
}
.kc-loading-ring::before {
    border: 4px solid rgba(244, 114, 163, 0.15);
}
.kc-loading-ring::after {
    border: 4px solid transparent;
    border-top-color: var(--pink);
    border-right-color: var(--pink-mid);
    animation: spin 0.8s cubic-bezier(0.6, 0, 0.4, 1) infinite;
}

.kc-loading-dots {
    display: flex;
    gap: 6px;
}
.kc-loading-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--pink);
    animation: dot-bounce 1.2s ease-in-out infinite;
}
.kc-loading-dots span:nth-child(2) {
    animation-delay: 0.15s;
    background: var(--pink-mid);
}
.kc-loading-dots span:nth-child(3) {
    animation-delay: 0.3s;
    background: var(--blue);
}

@keyframes dot-bounce {
    0%,
    80%,
    100% {
        transform: translateY(0);
        opacity: 0.6;
    }
    40% {
        transform: translateY(-8px);
        opacity: 1;
    }
}

.kc-loading-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray);
}

/* ─── Top progress bar (NProgress-style) ────────────────────── */
#kc-nprogress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 999999;
    pointer-events: none;
}
#kc-nprogress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--pink), var(--blue));
    width: 0%;
    transition: width 0.2s ease;
    border-radius: 0 2px 2px 0;
    box-shadow: 0 0 8px var(--pink);
}

/* ─── Confirm Dialog ─────────────────────────────────────────── */
#kc-confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    z-index: 99998;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 0.2s,
        visibility 0.2s;
}
#kc-confirm-overlay.active {
    opacity: 1;
    visibility: visible;
}

#kc-confirm-box {
    background: white;
    border-radius: 24px;
    padding: 24px;
    max-width: 340px;
    width: 100%;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.18);
    transform: scale(0.9);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
#kc-confirm-overlay.active #kc-confirm-box {
    transform: scale(1);
}

.kc-confirm-icon {
    font-size: 40px;
    text-align: center;
    margin-bottom: 12px;
}
.kc-confirm-title {
    font-size: 16px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 6px;
}
.kc-confirm-msg {
    font-size: 13px;
    color: var(--gray);
    text-align: center;
    margin-bottom: 20px;
}
.kc-confirm-btns {
    display: flex;
    gap: 10px;
}
.kc-confirm-btns button {
    flex: 1;
}

/* ─── Button loading state ───────────────────────────────────── */
.btn-loading {
    pointer-events: none;
    opacity: 0.75;
}
.btn-loading::after {
    content: "";
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin-left: 8px;
    vertical-align: middle;
}

/* ─── Topbar logo image ───────────────────────────────────────── */
.topbar-logo-img {
    height: 32px;
    width: auto;
    object-fit: contain;
    border-radius: 6px;
}
.topbar-logo-hospital {
    height: 28px;
    width: auto;
    object-fit: contain;
    border-radius: 4px;
    opacity: 0.85;
}

/* ─── Background image support ───────────────────────────────── */
.has-bg-image {
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}
body.has-bg-image {
    background-color: transparent;
}
body.has-bg-image::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(253, 255, 255, 0.82);
    z-index: 0;
    pointer-events: none;
}
body.has-bg-image .app-wrapper {
    position: relative;
    z-index: 1;
}

/* ─── Child Avatar — circular, reusable everywhere ───────────── */
.child-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    overflow: hidden;
    background: var(--pink-light);
    flex-shrink: 0;
    line-height: 1;
}
.child-avatar-img,
.child-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}
.child-avatar-emoji {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 1em;
    line-height: 1;
}
.child-avatar-sm {
    width: 40px;
    height: 40px;
    font-size: 22px;
}
.child-avatar-md {
    width: 60px;
    height: 60px;
    font-size: 32px;
}
.child-avatar-lg {
    width: 140px;
    height: 140px;
    font-size: 72px;
    margin: 0 auto 12px;
    box-shadow: 0 4px 16px rgba(248, 165, 181, 0.2);
}

/* ─── Child Form — shared styles ─────────────────────────────── */
.child-form .form-fieldset {
    border: 1px solid #f0e6ea;
    border-radius: 14px;
    padding: 14px 16px 8px;
    margin-bottom: 16px;
    background: #fcfbfe;
    display: flex;
    flex-direction: column;
}
.child-form .form-legend {
    font-size: 13px;
    font-weight: 700;
    color: var(--pink);
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.child-form .form-legend i {
    font-size: 14px;
}
.child-form .form-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.child-form .form-row > .form-group {
    flex: 1;
    min-width: 140px;
}
.child-form .form-hint {
    font-size: 11px;
    color: var(--gray);
    margin-top: 4px;
}
.form-hint {
    font-size: 11px;
    color: var(--gray);
    margin-top: 4px;
}
.required-mark {
    color: var(--danger);
}
.child-form .required-mark {
    color: var(--danger);
}
.child-form .invalid-feedback {
    font-size: 11px;
    color: var(--danger);
    margin-top: 4px;
}
.child-form .is-invalid {
    border-color: var(--danger);
}

/* Avatar preview (in form) */
.child-form .avatar-preview {
    margin: 0 auto 12px;
}

/* Avatar tabs */
.avatar-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}
.avatar-tab {
    flex: 1;
    padding: 10px 8px;
    border-radius: 12px;
    border: 2px solid var(--gray-light);
    background: white;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    color: var(--dark);
}
.avatar-tab.active {
    border-color: var(--pink);
    background: var(--pink-light);
    color: var(--pink);
}
.avatar-tab i {
    margin-right: 4px;
}

/* Emoji picker */
.emoji-group-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--gray);
    margin: 8px 0 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.emoji-picker {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}
.emoji-opt {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 2px solid #f0e6ea;
    background: white;
    font-size: 22px;
    cursor: pointer;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}
.emoji-opt:hover {
    border-color: var(--pink-mid);
    transform: translateY(-1px);
}
.emoji-opt.selected {
    border-color: var(--pink);
    background: var(--pink-light);
}

/* Remove avatar toggle */
.remove-avatar-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    font-size: 12px;
    color: var(--danger);
    cursor: pointer;
}

/* Gender cards */
.gender-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.gender-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border: 2px solid #f0e6ea;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
    background: white;
}
.gender-card input[type="radio"] {
    accent-color: var(--pink);
}
.gender-card .gender-emoji {
    font-size: 22px;
}
.gender-card:hover {
    border-color: var(--pink-mid);
}
.gender-card.is-female {
    border-color: var(--pink);
    background: var(--pink-light);
}
.gender-card.is-male {
    border-color: var(--blue);
    background: var(--blue-light);
}
.gender-card.is-male input[type="radio"] {
    accent-color: var(--blue);
}

/* Reward banner (form top) */
.reward-banner {
    background: linear-gradient(135deg, var(--pink-light), var(--blue-light));
    border-radius: 16px;
    padding: 14px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.reward-banner-icon {
    font-size: 28px;
}
.reward-banner-title {
    font-weight: 700;
    font-size: 14px;
}
.reward-banner-sub {
    font-size: 12px;
    color: var(--gray);
}

/* Page back arrow */
.page-back {
    font-size: 18px;
    text-decoration: none;
    color: var(--dark);
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}
.page-back:hover {
    background: var(--pink-light);
    color: var(--pink);
}

/* ── Family Member Relationship Selector (list style) ────────── */
.rel-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 8px;
}
.rel-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border: 1.5px solid #eddde4;
    border-radius: 12px;
    cursor: pointer;
    transition:
        border-color 0.15s,
        background 0.15s;
    background: white;
    user-select: none;
}
.rel-list-item input[type="radio"] {
    display: none;
}
.rel-list-item:hover {
    border-color: var(--pink-mid);
    background: var(--pink-light);
}
.rel-list-item.selected {
    border-color: var(--pink);
    background: var(--pink-light);
}
.rel-list-emoji {
    font-size: 22px;
    line-height: 1;
    flex-shrink: 0;
}
.rel-list-label {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
}
.rel-list-item.selected .rel-list-label {
    color: var(--pink);
}
.rel-list-tag {
    font-size: 10px;
    background: var(--pink-light);
    color: var(--pink);
    border: 1px solid var(--pink-mid);
    border-radius: 20px;
    padding: 2px 8px;
    font-weight: 700;
    flex-shrink: 0;
}
.rel-list-item.selected .rel-list-tag {
    background: var(--pink);
    color: white;
    border-color: var(--pink);
}

/* ── Register form section headers ───────────────────────────── */
.auth-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}
.auth-section-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.auth-section-title {
    font-weight: 700;
    font-size: 15px;
    color: var(--dark);
}
.auth-section-sub {
    font-size: 12px;
    color: var(--gray);
}
.form-label-optional {
    color: var(--gray);
    font-weight: 400;
    font-size: 11px;
}
