        :root {
            --bg: #f3f7f6;
            --text: #172226;
            --muted: #5a6872;
            --card: #ffffff;
            --primary: #176b87;
            --primary-dark: #0f4f64;
            --danger: #b42318;
            --danger-dark: #8f1c13;
            --border: #d7e2e6;
            --shadow: 0 14px 34px rgba(15, 79, 100, 0.09);
        }
        * { box-sizing: border-box; }
        *, *::before, *::after { box-sizing: border-box; }
        html, body { width: 100%; overflow-x: hidden; }
        body {
            margin: 0;
            font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
            color: var(--text);
            background:
                radial-gradient(circle at 15% 15%, color-mix(in srgb, var(--profile-accent) 50%, transparent) 0%, transparent 35%),
                radial-gradient(circle at 85% 10%, color-mix(in srgb, var(--profile-primary) 35%, transparent) 0%, transparent 33%),
                linear-gradient(180deg, color-mix(in srgb, var(--profile-accent) 25%, #ffffff) 0%, var(--bg) 100%);
            min-height: 100vh;
            overflow-x: hidden;
        }
        body.theme-dark {
            --bg: #0f1316;
            --card: #1f2a32;
            --text: #e8eef2;
            --muted: #a3b0bb;
            --border: #26313a;
            --shadow: 0 16px 34px rgba(0,0,0,0.42);
        }
        body.theme-dark .card,
        body.theme-dark .linktree-item,
        body.theme-dark .product-card,
        body.theme-dark .auth-card,
        body.theme-dark .login-loading-card,
        body.theme-dark .admin-user-card,
        body.theme-dark .find-profile-card,
        body.theme-dark .stat-card {
            background: var(--card);
            border-color: var(--border);
            color: var(--text);
        }
        body.theme-dark .card p {
            color: var(--muted);
        }
        body.theme-dark .linktree-preview-empty {
            background: #18242b;
            border-color: var(--border);
            color: var(--muted);
        }
        body.theme-dark .product-image {
            background: #18242b;
            border-color: var(--border);
        }
        body.theme-dark .btn-light {
            background: #1a2730;
            color: var(--text);
            border-color: var(--border);
        }
        body.theme-dark input,
        body.theme-dark textarea,
        body.theme-dark select {
            background: #1a252c;
            color: var(--text);
            border-color: var(--border);
        }
        body.theme-dark input::placeholder,
        body.theme-dark textarea::placeholder {
            color: var(--muted);
        }
        body.theme-dark .compact-list li,
        body.theme-dark .linktree-order-item,
        body.theme-dark .drag-handle,
        body.theme-dark li {
            background: #18242b;
            border-color: var(--border);
            color: var(--text);
        }
        body.theme-dark .form-section,
        body.theme-dark .security-panel,
        body.theme-dark .qr-box,
        body.theme-dark .find-profile-card {
            background: #18242b;
            border-color: var(--border);
            color: var(--text);
        }
        body.theme-dark .form-section h3,
        body.theme-dark .security-panel h3 {
            color: var(--text);
        }
        body.theme-dark .my-public-link {
            background: #1a2730;
            color: var(--text);
            border-color: var(--border);
        }
        body.theme-dark h1,
        body.theme-dark h2,
        body.theme-dark h3,
        body.theme-dark h4,
        body.theme-dark label,
        body.theme-dark .hint-text,
        body.theme-dark .order-title,
        body.theme-dark .order-meta,
        body.theme-dark .linktree-item-header strong,
        body.theme-dark .friend-name,
        body.theme-dark .friend-id,
        body.theme-dark .store-title,
        body.theme-dark .product-card strong,
        body.theme-dark .table th,
        body.theme-dark .table td {
            color: var(--text);
        }
        body.theme-dark .store-header,
        body.theme-dark .store-header p,
        body.theme-dark .store-header small,
        body.theme-dark .store-section p,
        body.theme-dark .store-section small,
        body.theme-dark .store-title {
            color: var(--text);
        }
        body.theme-dark .public-profile-card {
            border-color: var(--profile-primary);
            background:
                var(--profile-texture),
                radial-gradient(circle at 50% 0%, var(--profile-accent) 0%, transparent 40%),
                linear-gradient(180deg, var(--profile-bg-color) 0%, var(--profile-accent) 100%);
            color: var(--profile-text);
        }
        body.theme-dark .public-profile-card h2,
        body.theme-dark .public-profile-card p,
        body.theme-dark .public-profile-card strong,
        body.theme-dark .public-profile-card span,
        body.theme-dark .viewed-profile-card h2,
        body.theme-dark .viewed-profile-card p,
        body.theme-dark .viewed-profile-card strong,
        body.theme-dark .viewed-profile-card span {
            color: var(--profile-text);
        }
        body.theme-dark .public-profile-card .store-title,
        body.theme-dark .public-profile-card .store-header,
        body.theme-dark .public-profile-card .store-section p,
        body.theme-dark .public-profile-card .store-section small {
            color: var(--profile-text);
        }
        body.theme-dark .admin-badge {
            background: #1a2730;
            color: #ffffff;
            border-color: var(--border);
        }
        body.theme-dark .admin-user-sub {
            color: var(--muted);
        }
        body.theme-dark .chat-contact-item,
        body.theme-dark .chat-member-item,
        body.theme-dark .chat-group-actions,
        body.theme-dark .chat-add-member,
        body.theme-dark .chat-compose {
            background: #18242b !important;
            border-color: var(--border) !important;
            color: var(--text) !important;
        }
        body.theme-dark .chat-group-actions,
        body.theme-dark .chat-compose {
            background: transparent !important;
        }
        body.theme-dark .chat-contact-item.active {
            background: #1d2b35 !important;
            border-color: #3a4a55 !important;
        }
        body.theme-dark .chat-contact-name,
        body.theme-dark .chat-contact-id,
        body.theme-dark .chat-member-role,
        body.theme-dark .chat-subtitle,
        body.theme-dark .chat-placeholder,
        body.theme-dark .message-time {
            color: var(--muted) !important;
        }
        body.theme-dark .chat-group-count {
            background: #1a2730 !important;
            color: #ffffff !important;
            border-color: var(--border) !important;
        }
        body.theme-dark .chat-group-icon,
        body.theme-dark .group-header-initial {
            background: #1a2730 !important;
            color: #ffffff !important;
            border-color: var(--border) !important;
        }
        body.theme-dark .chat-contact-avatar,
        body.theme-dark .chat-group-photo,
        body.theme-dark .group-header-photo,
        body.theme-dark .group-edit-preview,
        body.theme-dark .chat-avatar {
            background: #1a2730 !important;
            border-color: var(--border) !important;
        }
        body.theme-dark .chat-bubble-row.me .chat-bubble {
            background: #1f3b2f !important;
            border-color: #2f5a44 !important;
        }
        body.theme-dark .chat-bubble-row.them .chat-bubble {
            background: #1f2a32 !important;
            border-color: #2b3b46 !important;
        }
        body.theme-dark .chat-text {
            color: #ffffff !important;
        }
        body.theme-dark .chat-meta {
            color: #b8c3cc !important;
        }
        body.theme-dark .chat-system {
            background: #1a2730 !important;
            color: #cdd7df !important;
            border-color: var(--border) !important;
        }
        body.theme-dark .kick-sheet-panel {
            background: #1b242b !important;
            color: var(--text) !important;
        }
        body.theme-dark .kick-sheet-subtitle {
            color: var(--muted) !important;
        }
        body.theme-dark .follow-popup-panel {
            background: #1b242b !important;
            color: var(--text) !important;
            border-color: var(--border) !important;
        }
        body.theme-dark .follow-popup-head {
            background: #1a2730 !important;
            border-bottom-color: var(--border) !important;
        }
        body.theme-dark .follow-user-card {
            background: color-mix(in srgb, var(--follow-bg, #1a2730) 40%, #1a2730 60%) !important;
            color: var(--follow-text, var(--text)) !important;
            border-color: color-mix(in srgb, var(--follow-primary, #3b5566) 60%, #2a3a45 40%) !important;
        }
        body.theme-dark .kick-sheet-actions a,
        body.theme-dark .chat-mobile-back {
            background: #1a2730 !important;
            color: var(--text) !important;
            border-color: var(--border) !important;
        }
        body.theme-dark .chat-back-icon {
            background: #1a2730 !important;
            color: var(--text) !important;
            border-color: var(--border) !important;
        }
        body.theme-dark .dashboard-hero {
            background: linear-gradient(120deg, var(--profile-primary) 0%, var(--profile-accent) 100%) !important;
            color: #fff !important;
            border: 0;
        }
        body.theme-dark .dashboard-hero h2,
        body.theme-dark .dashboard-hero p,
        body.theme-dark .dashboard-hero strong,
        body.theme-dark .dashboard-hero .pill,
        body.theme-dark .dashboard-hero .btn-light {
            color: #fff !important;
        }
        body.theme-dark .price-badge {
            background: #14312b;
            color: #9be3cf;
        }
        body.theme-dark .status-on {
            background: #12362d;
            color: #8fe0c6;
            border-color: #1f4d41;
        }
        body.theme-dark .status-off {
            background: #3a1a1a;
            color: #ffb4b4;
            border-color: #5a2a2a;
        }
        .container { max-width: 1120px; margin: 28px auto 42px; padding: 0 16px; width: 100%; }
        .container:focus { outline: none; }
        img, input, select, textarea, button { max-width: 100%; }
        img, svg, video, canvas { max-width: 100%; height: auto; }
        a:focus-visible,
        button:focus-visible,
        input:focus-visible,
        select:focus-visible,
        textarea:focus-visible {
            outline: 3px solid color-mix(in srgb, var(--profile-primary) 60%, #ffffff);
            outline-offset: 2px;
        }
        .skip-link {
            position: absolute;
            left: 12px;
            top: -40px;
            padding: 8px 12px;
            background: #ffffff;
            border: 1px solid var(--border);
            border-radius: 8px;
            color: var(--text);
            font-weight: 600;
            z-index: 100;
            transition: top .2s ease;
        }
        .skip-link:focus {
            top: 12px;
        }
        .card {
            background: var(--card);
            border: 1px solid var(--border);
            border-radius: 16px;
            padding: 18px;
            margin-bottom: 16px;
            box-shadow: var(--shadow);
        }
        h2, h3 { margin: 0 0 10px; letter-spacing: 0.1px; }
        p { margin: 0 0 10px; color: var(--muted); }
        .topnav {
            background: linear-gradient(120deg, var(--profile-primary) 0%, color-mix(in srgb, var(--profile-primary) 70%, var(--profile-accent)) 55%, var(--profile-accent) 100%);
            color: #fff;
            position: sticky;
            top: 0;
            z-index: 50;
            box-shadow: 0 8px 24px rgba(11, 37, 50, 0.26);
        }
        .topnav-inner {
            max-width: 1120px;
            margin: 0 auto;
            padding: 12px 16px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 12px;
            flex-wrap: wrap;
        }
        .brand { font-weight: 700; letter-spacing: 0.3px; }
        .brand-user {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            background: transparent;
            border: none;
            padding: 0;
            box-shadow: none;
            text-decoration: none;
            color: inherit;
        }
        .brand-avatar {
            width: 32px;
            height: 32px;
            border-radius: 999px;
            object-fit: cover;
            border: 2px solid var(--profile-accent, #DFF4FB);
            background: transparent;
            box-shadow: none;
        }
        .hamburger {
            display: none;
            background: rgba(255, 255, 255, 0.12);
            border: 1px solid rgba(255, 255, 255, 0.3);
            color: #fff;
            padding: 8px 10px;
            border-radius: 10px;
            box-shadow: none;
            font-size: 18px;
            line-height: 1;
        }
        .hamburger:hover { background: rgba(255, 255, 255, 0.22); }
        .topnav-controls {
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }
        .notif-icon-btn {
            position: relative;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 38px;
            height: 38px;
            border-radius: 10px;
            border: 1px solid rgba(255, 255, 255, 0.3);
            background: rgba(255, 255, 255, 0.12);
            text-decoration: none;
            overflow: hidden;
        }
        .notif-desktop {
            display: inline-flex;
            flex-shrink: 0;
        }
        .notif-mobile {
            display: none;
        }
        .topnav .nav-links a.notif-icon-btn {
            width: 38px;
            height: 38px;
            padding: 0;
            border-radius: 10px;
            margin-left: 2px;
            justify-content: center;
            border: 1px solid rgba(255, 255, 255, 0.3);
            background: rgba(255, 255, 255, 0.12);
        }
        .topnav .nav-links a.notif-icon-btn:hover {
            background: rgba(255, 255, 255, 0.22);
        }
        .notif-icon-btn:hover {
            background: rgba(255, 255, 255, 0.22);
        }
        .notif-icon-img {
            width: 22px;
            height: 22px;
            object-fit: cover;
            border-radius: 6px;
            display: block;
        }
        .nav-links { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
        .topnav .nav-links a {
            color: #fff;
            text-decoration: none;
            padding: 8px 12px;
            border-radius: 999px;
            border: 1px solid rgba(255, 255, 255, 0.2);
            background: rgba(255, 255, 255, 0.08);
            transition: background .2s ease, transform .2s ease;
            font-size: 14px;
        }
        .topnav .nav-links a:hover { background: rgba(255, 255, 255, 0.18); }
        .notif-badge {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 18px;
            height: 18px;
            padding: 0 6px;
            border-radius: 999px;
            font-size: 11px;
            font-weight: 700;
            color: #5b1300;
            background: linear-gradient(135deg, #ffd2c7, #ff9f7a);
            border: 1px solid rgba(98, 20, 0, 0.22);
            position: absolute;
            top: -5px;
            right: -5px;
        }
        .notif-badge[hidden] {
            display: none !important;
        }
        .role-badge {
            padding: 7px 10px;
            border-radius: 999px;
            font-size: 12px;
            font-weight: 600;
            background: rgba(255, 255, 255, 0.18);
            border: 1px solid rgba(255, 255, 255, 0.28);
        }
        .role-badge-member {
            background: rgba(255, 212, 104, 0.24);
            border-color: rgba(255, 220, 130, 0.55);
            color: #ffe9ba;
        }
        .role-badge-admin {
            background: rgba(255, 109, 109, 0.22);
            border-color: rgba(255, 154, 154, 0.5);
            color: #ffe0e0;
        }
        .member-badge {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            margin-left: 8px;
            padding: 3px 8px;
            border-radius: 999px;
            font-size: 11px;
            font-weight: 700;
            letter-spacing: .2px;
            vertical-align: middle;
        }
        .member-badge-member {
            background: linear-gradient(135deg, #ffe8b0, #d6a93d);
            color: #5f4300;
            border: 1px solid rgba(126, 88, 5, 0.25);
        }
        .member-badge-admin {
            background: linear-gradient(135deg, #ffd7d7, #ff8d8d);
            color: #6a1111;
            border: 1px solid rgba(106, 17, 17, 0.2);
        }
        .grid { display: grid; gap: 16px; }
        .grid-2 { grid-template-columns: 1fr 1fr; }
        .grid > *, .grid-2 > * { min-width: 0; }
        @media (max-width: 768px) { .grid-2 { grid-template-columns: 1fr; } }
        label {
            display: block;
            margin-top: 8px;
            margin-bottom: 4px;
            font-size: 13px;
            font-weight: 600;
            color: #21313a;
        }
        .hint-text {
            display: block;
            margin-top: 6px;
            font-size: 12px;
            color: var(--muted);
        }
        input, textarea, select {
            width: 100%;
            padding: 11px 12px;
            border: 1px solid var(--border);
            border-radius: 10px;
            background: #fbfeff;
            margin-top: 4px;
            transition: border-color .2s ease, box-shadow .2s ease;
        }
        input:focus, textarea:focus, select:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 4px rgba(23, 107, 135, 0.12);
        }
        textarea { min-height: 110px; resize: vertical; }
        button {
            background: var(--primary);
            color: #fff;
            border: 0;
            border-radius: 10px;
            padding: 10px 14px;
            cursor: pointer;
            font-weight: 600;
            transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
            box-shadow: 0 8px 18px rgba(23, 107, 135, 0.25);
        }
        button:hover { background: var(--primary-dark); }
        button:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }
        button.is-loading { opacity: 0.7; pointer-events: none; }
        .btn-danger { background: var(--danger); box-shadow: 0 8px 18px rgba(180, 35, 24, 0.2); }
        .btn-danger:hover { background: var(--danger-dark); }
        .alert {
            padding: 13px 14px;
            border-radius: 12px;
            margin-bottom: 16px;
            border: 1px solid transparent;
            font-weight: 600;
        }
        .alert.toast {
            position: fixed;
            right: 18px;
            bottom: 18px;
            margin: 0;
            padding: 10px 14px;
            font-size: 12px;
            border-radius: 999px;
            box-shadow: 0 12px 24px rgba(0,0,0,0.18);
            z-index: 50;
            max-width: 320px;
        }
        .alert.toast.hide {
            opacity: 0;
            transform: translateY(8px);
            transition: opacity .3s ease, transform .3s ease;
        }
        @media (prefers-reduced-motion: reduce) {
            *, *::before, *::after {
                animation-duration: 0.01ms !important;
                animation-iteration-count: 1 !important;
                transition-duration: 0.01ms !important;
                scroll-behavior: auto !important;
            }
        }
        .alert-success { background: #e8f8ef; color: #146a3f; border-color: #a8e0bf; }
        .alert-error { background: #fdecec; color: #9f1f1f; border-color: #f6bebe; }
        .avatar {
            width: 116px;
            height: 116px;
            border-radius: 999px;
            object-fit: cover;
            border: 3px solid #e7f1f5;
            box-shadow: 0 8px 18px rgba(23, 107, 135, 0.18);
        }
        .profile-hero {
            position: relative;
            border-radius: 18px;
            min-height: 190px;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 18px;
            margin-bottom: 12px;
            background:
                radial-gradient(circle at 20% 20%, rgba(255,255,255,0.45) 0%, transparent 50%),
                radial-gradient(circle at 85% 35%, rgba(255,255,255,0.35) 0%, transparent 55%),
                linear-gradient(
                    135deg,
                    color-mix(in srgb, var(--profile-primary, #176B87) 24%, white) 0%,
                    color-mix(in srgb, var(--profile-accent, #DFF4FB) 68%, var(--profile-bg-color, #F1EBE2) 32%) 52%,
                    color-mix(in srgb, var(--profile-primary, #176B87) 14%, var(--profile-bg-color, #F1EBE2) 86%) 100%
                );
            background-size: cover;
            background-position: center;
            overflow: hidden;
            border: 1px solid rgba(84, 74, 62, 0.15);
        }
        .profile-hero-overlay {
            position: absolute;
            inset: 0;
            background: linear-gradient(180deg, rgba(255, 255, 255, 0.25) 0%, rgba(0, 0, 0, 0.08) 100%);
            pointer-events: none;
        }
        .profile-hero-avatar {
            position: relative;
            z-index: 2;
            width: 96px;
            height: 96px;
            border-radius: 999px;
            border: 4px solid var(--profile-primary, #0f6d63);
            box-shadow: 0 10px 22px rgba(64, 55, 43, 0.25);
        }
        .public-profile-card {
            --profile-primary: #6b5b46;
            --profile-accent: #f1ebe2;
            --profile-text: #2d2a26;
            --profile-bg-color: #f1ebe2;
            --link-btn-bg: #7a6a56;
            --link-btn-text: #ffffff;
            --profile-texture: none;
            border-color: var(--profile-primary);
            background:
                var(--profile-texture),
                radial-gradient(circle at 50% 0%, var(--profile-accent) 0%, transparent 40%),
                linear-gradient(180deg, var(--profile-bg-color) 0%, var(--profile-accent) 100%);
            text-align: center;
        }
        .public-profile-card[data-texture="paper"] {
            --profile-texture: url("../img/texture_paper.jpeg");
            background-size: cover;
            background-repeat: no-repeat;
            background-position: center;
            background-blend-mode: multiply;
        }
        .public-profile-card[data-texture="woven"] {
            --profile-texture: url("../img/texture_woven.jpeg");
            background-size: cover;
            background-repeat: no-repeat;
            background-position: center;
            background-blend-mode: overlay;
        }
        .public-profile-card[data-texture="dots"] {
            --profile-texture: url("../img/texture_dots.jpeg");
            background-size: cover;
            background-repeat: no-repeat;
            background-position: center;
            background-blend-mode: overlay;
        }
        .public-profile-card[data-texture="aurora"] {
            --profile-texture: url("../img/texture_aurora.jpeg");
            background-size: cover;
            background-repeat: no-repeat;
            background-position: center;
            background-blend-mode: overlay;
        }
        .public-profile-card[data-texture="mesh"] {
            --profile-texture: url("../img/texture_mesh.jpeg");
            background-size: cover;
            background-repeat: no-repeat;
            background-position: center;
            background-blend-mode: overlay;
        }
        .public-profile-card[data-texture="waves"] {
            --profile-texture: url("../img/texture_waves.jpeg");
            background-size: cover;
            background-repeat: no-repeat;
            background-position: center;
            background-blend-mode: multiply;
        }
        .public-profile-card[data-texture="diamond"] {
            --profile-texture: url("../img/texture_diamond.jpeg");
            background-size: cover;
            background-repeat: no-repeat;
            background-position: center;
            background-blend-mode: overlay;
        }
        .public-profile-card[data-texture="moon"] {
            --profile-texture: url("../img/texture_bd.jpeg");
            background-size: cover;
            background-repeat: no-repeat;
            background-position: center;
            background-blend-mode: overlay;
        }
        .public-profile-card h2 {
            color: var(--profile-primary);
        }
        .profile-username-head {
            margin: 6px 0 14px;
            font-size: 14px;
            font-weight: 700;
            opacity: 0.88;
        }
        .public-profile-card p,
        .public-profile-card strong,
        .public-profile-card span {
            color: var(--profile-text);
        }
        .public-profile-card .profile-hero {
            border-color: var(--profile-primary);
        }
        .public-profile-card .profile-hero-avatar {
            margin: 0 auto;
        }
        .public-profile-card .profile-detail-grid {
            grid-template-columns: 1fr;
            text-align: center;
        }
        .linktree-grid {
            display: grid;
            gap: 10px;
            margin-top: 10px;
        }
        .linktree-card {
            --link-delay: 0s;
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px 16px;
            border-radius: 999px;
            border: 1px solid rgba(98, 86, 72, 0.2);
            background: var(--link-btn-bg);
            text-decoration: none;
            color: var(--link-btn-text);
            box-shadow: 0 10px 18px rgba(58, 49, 40, 0.2);
            transition: transform .2s ease, box-shadow .2s ease;
            animation: linkIn .5s ease both;
            animation-delay: var(--link-delay);
            opacity: 0;
            transform: translateY(6px);
        }
        .linktree-card.is-visible {
            opacity: 1;
            transform: translateY(0);
            transition: opacity .35s ease, transform .35s ease;
            transition-delay: var(--link-delay);
        }
        .linktree-card:hover {
            transform: translateY(-2px);
            box-shadow: 0 16px 30px rgba(58, 49, 40, 0.28);
        }
        .linktree-thumb {
            width: 44px;
            height: 44px;
            border-radius: 999px;
            object-fit: cover;
            border: 2px solid rgba(255, 255, 255, 0.6);
            background: #efe7db;
        }
        .linktree-text {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }
        .linktree-title {
            font-weight: 700;
            color: var(--link-btn-text);
        }
        .linktree-url {
            font-size: 12px;
            color: var(--link-btn-text);
            opacity: 0.85;
        }
        .linktree-editor {
            display: grid;
            gap: 12px;
        }
        .linktree-item {
            padding: 12px;
            border: 1px solid var(--border);
            border-radius: 12px;
            background: #fff;
        }
        .linktree-item-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 8px;
        }
        .linktree-item-header strong {
            color: #1b4f64;
        }
        .linktree-item-actions {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
        }
        .linktree-item .form-grid {
            grid-template-columns: 1fr 1fr;
        }
        .linktree-item .form-grid .full-col {
            grid-column: 1 / -1;
        }
        .linktree-preview-empty {
            padding: 12px;
            border-radius: 12px;
            background: #f3f7f9;
            border: 1px dashed var(--border);
            color: var(--muted);
        }
        .store-section .linktree-preview-empty {
            margin-top: 10px;
        }
        .store-section {
            margin-top: 12px;
            padding-top: 10px;
            border-top: 1px solid var(--border);
        }
        .store-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 12px;
            flex-wrap: wrap;
        }
        .store-header-actions {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            flex-wrap: wrap;
        }
        .store-collapsible {
            margin-top: 10px;
            overflow: hidden;
            max-height: 2400px;
            opacity: 1;
            transform: translateY(0);
            transition: max-height .35s ease, opacity .25s ease, transform .25s ease;
            will-change: max-height, opacity, transform;
        }
        .store-collapsible.is-collapsed {
            max-height: 0 !important;
            opacity: 0;
            transform: translateY(-4px);
            pointer-events: none;
            margin-top: 0;
        }
        .product-grid {
            display: grid;
            gap: 12px;
            grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
            margin-top: 10px;
        }
        .product-card {
            border: 1px solid var(--border);
            border-radius: 12px;
            padding: 10px;
            background: #fff;
            display: grid;
            gap: 6px;
        }
        .product-image {
            width: 100%;
            height: 140px;
            border-radius: 10px;
            object-fit: cover;
            border: 1px solid var(--border);
            background: #f4f7f9;
        }
        .product-price {
            font-weight: 700;
            color: var(--primary);
        }
        .product-actions {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
        }
        .product-actions a {
            text-decoration: none;
        }
        .btn-light {
            display: inline-block;
            padding: 8px 12px;
            border-radius: 10px;
            border: 1px solid var(--border);
            background: #f4fbff;
            color: var(--primary);
            font-weight: 600;
            text-decoration: none;
            transition: background .2s ease, color .2s ease, border-color .2s ease;
        }
        .btn-cta {
            border-radius: 999px;
            padding: 9px 16px;
            background: linear-gradient(120deg, #0f6d63 0%, #2c9a6f 100%);
            color: #ffffff;
            border: 1px solid rgba(15, 109, 99, 0.35);
            box-shadow: 0 10px 18px rgba(18, 88, 74, 0.25);
            letter-spacing: 0.2px;
        }
        .btn-light.btn-cta {
            border-color: rgba(15, 109, 99, 0.35);
        }
        .btn-cta:hover {
            background: linear-gradient(120deg, #0c5c54 0%, #248861 100%);
        }
        .dashboard-hero {
            position: relative;
            overflow: hidden;
            background:
                linear-gradient(120deg, var(--profile-primary) 0%, var(--profile-accent) 100%);
            color: #fff;
            border: 0;
        }
        .dashboard-hero h2,
        .dashboard-hero p,
        .dashboard-hero strong {
            color: #fff;
        }
        .dashboard-hero .hero-main {
            position: relative;
            z-index: 2;
        }
        .dashboard-hero .hero-meta {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
            margin-top: 8px;
        }
        .dashboard-hero .pill {
            display: inline-flex;
            align-items: center;
            padding: 6px 10px;
            border-radius: 999px;
            background: rgba(255,255,255,0.22);
            border: 1px solid rgba(255,255,255,0.35);
            font-size: 12px;
            font-weight: 600;
            color: #fff;
        }
        .dashboard-hero .hero-actions {
            margin-top: 12px;
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
            position: relative;
            z-index: 2;
        }
        .dashboard-hero .btn-light {
            border: 1px solid rgba(255,255,255,0.4);
            background: rgba(255,255,255,0.15);
            color: #fff;
        }
        .dashboard-hero .btn-cta {
            background: #ffffff;
            color: var(--profile-primary);
            border-color: rgba(255,255,255,0.6);
        }
        .dashboard-hero .btn-cta:hover {
            background: #f3fffb;
        }
        .dashboard-hero .hero-glow {
            position: absolute;
            inset: 0;
            background: radial-gradient(circle at 10% 50%, rgba(255,255,255,0.12), transparent 55%);
            pointer-events: none;
        }
        .stat-grid {
            display: grid;
            gap: 12px;
            grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
            margin-bottom: 16px;
        }
        .stat-card {
            background: #fff;
            border: 1px solid var(--border);
            border-radius: 14px;
            padding: 12px 14px;
            box-shadow: 0 10px 20px rgba(15, 79, 100, 0.08);
        }
        .stat-label {
            font-size: 12px;
            color: var(--muted);
            margin-bottom: 6px;
            font-weight: 600;
        }
        .stat-value {
            font-size: 22px;
            font-weight: 700;
            color: #1a4d5c;
        }
        @media (max-width: 600px) {
            .container { padding: 12px; max-width: 100%; }
            .card { padding: 12px; width: 100%; }
            .topnav, .topnav-inner { max-width: 100%; }
            .dashboard-hero { padding: 14px; }
            .dashboard-hero h2 { font-size: 20px; }
            .dashboard-hero p { font-size: 13px; }
            .dashboard-hero .pill { font-size: 11px; }
            .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
            .stat-card { padding: 10px; }
            .stat-value { font-size: 18px; }
            .grid-2 { grid-template-columns: 1fr; }
            .friend-chip { padding: 10px; flex-wrap: wrap; gap: 8px; }
            .friend-chip { width: 100%; }
            .friend-meta { min-width: 0; }
            .friend-name,
            .friend-id { word-break: break-word; }
            .find-profile-form { grid-template-columns: 1fr; }
            .find-profile-btn { width: 100%; }
        }
        .quick-actions {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }
        .friend-list li {
            padding: 0;
            border: none;
            background: transparent;
        }
        .friend-chip {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 12px;
            border-radius: 12px;
            border: 1px solid var(--border);
            background:
                linear-gradient(120deg, rgba(255,255,255,0.70), rgba(255,255,255,0.52)),
                linear-gradient(135deg, var(--friend-primary, #d8ecf3) 0%, var(--friend-accent, #ebf5f1) 55%, var(--friend-bg, #d9ecff) 100%);
            background-size: cover;
            background-position: center;
            position: relative;
            isolation: isolate;
        }
        .friend-chip::before {
            content: "";
            position: absolute;
            inset: 0;
            border-radius: inherit;
            background: rgba(0,0,0,0.25);
            opacity: 0.35;
            pointer-events: none;
            z-index: 0;
        }
        .friend-chip > * {
            position: relative;
            z-index: 1;
        }
        @media (min-width: 1024px) {
            .friend-chip { padding: 8px 10px; }
            .friend-avatar { width: 40px; height: 40px; }
            .friend-name { font-size: 15px; }
            .friend-id { font-size: 14px; }
            .friend-actions .btn-light,
            .friend-actions .btn-danger { padding: 4px 8px; font-size: 11px; }
        }
        .friend-avatar {
            width: 44px;
            height: 44px;
            border-radius: 999px;
            object-fit: cover;
            border: 2px solid #fff;
            background: #fff;
            box-shadow: 0 4px 10px rgba(0,0,0,0.18);
        }
        .friend-meta {
            display: grid;
            gap: 2px;
        }
        .friend-name {
            font-weight: 800;
            color: var(--profile-text, #1f2d35);
            font-size: 14px;
        }
        .friend-id {
            font-size: 11px;
            color: var(--profile-text, #6b7780);
            opacity: 0.75;
            display: block;
            width: 100%;
        }
        .friend-actions {
            margin-left: auto;
            display: grid;
            gap: 6px;
            width: 100%;
            flex: 1 1 100%;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            align-items: center;
        }
        .friend-actions[data-has-store="0"] {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }
        .friend-actions form {
            margin: 0;
        }
        .friend-actions .btn-light,
        .friend-actions .btn-danger {
            padding: 6px 10px;
            border-radius: 999px;
            font-size: 12px;
            white-space: nowrap;
            width: 100%;
            justify-content: center;
            min-width: 0;
        }
        .friend-actions .btn-light {
            background: var(--link-btn-bg, #0f6d63);
            color: var(--link-btn-text, #ffffff);
            border-color: transparent;
        }
        .friend-actions .btn-light:hover {
            filter: brightness(0.95);
        }
        .friend-unfriend {
            grid-column: 1 / -1;
            width: 100%;
        }
        .compact-list {
            list-style: none;
            margin: 0;
            padding: 0;
            display: grid;
            gap: 8px;
        }
        .compact-list li {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
            padding: 10px 12px;
            border-radius: 12px;
            border: 1px solid var(--border);
            background: #f8fbfd;
        }
        .compact-list li.notification-item {
            align-items: flex-start;
            justify-content: flex-start;
            gap: 8px;
            flex-direction: column;
        }
        .notification-item.is-unread {
            border-color: color-mix(in srgb, var(--profile-primary) 42%, #ffffff 58%);
            background: color-mix(in srgb, var(--profile-accent) 20%, #ffffff 80%);
        }
        .notification-main {
            width: 100%;
        }
        .notification-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            margin-bottom: 4px;
        }
        .notification-title {
            font-weight: 700;
            color: var(--profile-text, #1f2d35);
        }
        .notification-meta {
            font-size: 12px;
            opacity: 0.8;
        }
        .price-badge {
            padding: 6px 10px;
            border-radius: 999px;
            background: #e8f6f2;
            color: #0f6d63;
            font-weight: 700;
            font-size: 12px;
            white-space: nowrap;
        }
        .status-pill {
            display: inline-flex;
            align-items: center;
            padding: 6px 10px;
            border-radius: 999px;
            font-size: 12px;
            font-weight: 700;
            border: 1px solid transparent;
        }
        .status-on {
            background: #e8f6f2;
            color: #0f6d63;
            border-color: #bfe9dc;
        }
        .status-off {
            background: #fdecec;
            color: #9f1f1f;
            border-color: #f6bebe;
        }
        .status-warn {
            background: #fff7e8;
            color: #8a5a00;
            border-color: #f2d39c;
        }
        .qris-preview-trigger {
            border: 0;
            padding: 0;
            background: transparent;
            cursor: zoom-in;
            display: inline-block;
        }
        .payment-proof-thumb {
            width: min(300px, 100%);
            aspect-ratio: 9 / 16;
            object-fit: cover;
            object-position: center;
            border-radius: 10px;
            border: 1px solid #e7edf6;
            background: #f6f8fb;
            display: block;
        }
        .image-preview-modal {
            position: fixed;
            inset: 0;
            z-index: 1200;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 16px;
        }
        .image-preview-modal[hidden] {
            display: none !important;
        }
        .image-preview-backdrop {
            position: absolute;
            inset: 0;
            background: rgba(12, 18, 27, 0.78);
        }
        .image-preview-content {
            position: relative;
            z-index: 1;
            width: min(92vw, 420px);
            aspect-ratio: 9 / 16;
        }
        .image-preview-content img {
            width: 100%;
            height: 100%;
            border-radius: 12px;
            border: 2px solid #fff;
            background: #fff;
            box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
            object-fit: contain;
            object-position: center;
        }
        .image-preview-close {
            position: absolute;
            top: -10px;
            right: -10px;
            width: 36px;
            height: 36px;
            border: 0;
            border-radius: 999px;
            background: #ffffff;
            color: #1f2d35;
            font-size: 12px;
            font-weight: 700;
            line-height: 1;
            cursor: pointer;
            box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
            display: none;
        }
        @media (max-width: 768px) {
            .image-preview-close {
                display: inline-flex;
                align-items: center;
                justify-content: center;
                width: auto;
                min-width: 64px;
                height: 34px;
                border-radius: 999px;
                padding: 0 14px;
                top: 10px;
                right: 10px;
            }
        }
        .checkbox-row {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            cursor: pointer;
            user-select: none;
            font-weight: 600;
            color: #21313a;
        }
        input[type="checkbox"] {
            appearance: none;
            width: 52px;
            height: 28px;
            background: #d8d8d8;
            border-radius: 999px;
            border: 1px solid #c7c7c7;
            position: relative;
            transition: background .2s ease, border-color .2s ease;
            box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.15);
            cursor: pointer;
            vertical-align: middle;
        }
        input[type="checkbox"]::after {
            content: "";
            position: absolute;
            top: 3px;
            left: 3px;
            width: 22px;
            height: 22px;
            background: #fff;
            border-radius: 50%;
            transition: transform .2s ease;
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
        }
        input[type="checkbox"]:checked {
            background: #5cc34a;
            border-color: #5cc34a;
        }
        input[type="checkbox"]:checked::after {
            transform: translateX(24px);
        }
        .store-section {
            background: linear-gradient(180deg, #ffffff 0%, #f3f7f6 100%);
            border-radius: 16px;
            padding: 14px;
        }
        .store-section[data-bg-mode="transparent"] {
            background: transparent;
            border: 1px dashed rgba(92, 82, 68, 0.2);
            box-shadow: none;
        }
        .store-section[data-bg-mode="full"] {
            background: linear-gradient(180deg, var(--store-bg, #f4f1ec) 0%, #ffffff 100%);
        }
        .store-section[data-bg-mode="blur"] {
            background: rgba(255, 255, 255, 0.55);
            backdrop-filter: blur(6px);
            border: 1px solid rgba(92, 82, 68, 0.2);
        }
        .store-title {
            font-weight: 800;
            font-size: 18px;
            color: #1f1b17;
            margin: 0 0 4px;
        }
        .store-header h3 {
            margin-bottom: 4px;
        }
        .store-header .btn-light {
            border-radius: 999px;
            padding: 8px 14px;
        }
        @media (max-width: 600px) {
            .store-section {
                text-align: center;
            }
            .store-header {
                display: grid;
                grid-template-columns: 1fr;
                justify-items: center;
                text-align: center;
            }
            .store-header-actions {
                width: 100%;
                display: grid;
                grid-template-columns: 1fr;
                gap: 8px;
            }
            .store-header .btn-cta,
            .store-header .btn-light {
                width: 100%;
                justify-content: center;
            }
            .store-header .btn-cta {
                margin-bottom: 10px;
            }
            .product-grid {
                justify-items: center;
            }
            .product-card {
                width: 100%;
            }
            .store-section .linktree-preview-empty {
                margin-top: 12px;
            }
        }
        .product-grid {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }
        .product-grid.is-scroll-limited {
            max-height: 460px;
            overflow-y: auto;
            padding-right: 4px;
            align-content: start;
            overscroll-behavior: contain;
        }
        .product-grid.is-scroll-limited::-webkit-scrollbar {
            width: 6px;
        }
        .product-grid.is-scroll-limited::-webkit-scrollbar-thumb {
            background: rgba(15, 109, 99, 0.45);
            border-radius: 999px;
        }
        .product-card {
            border-radius: 14px;
            padding: 10px 10px 12px;
            box-shadow: 0 10px 18px rgba(18, 58, 74, 0.12);
            border: 1px solid rgba(19, 93, 115, 0.18);
            background: #ffffff;
        }
        .product-image {
            height: 150px;
            border-radius: 12px;
            border: 1px solid rgba(19, 93, 115, 0.18);
            background: #f1f5f7;
        }
        .product-card strong {
            font-size: 13px;
            line-height: 1.3;
        }
        .product-actions .btn-light {
            background: #0f6d63;
            border-color: #0f6d63;
            color: #fff;
        }
        .product-actions .btn-light:hover {
            background: #0c5c54;
        }
        @media (max-width: 520px) {
            .product-grid {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }
            .product-grid.is-scroll-limited {
                max-height: 420px;
            }
            .product-image {
                height: 130px;
            }
        }
        @media (max-width: 360px) {
            .product-grid {
                grid-template-columns: 1fr;
            }
            .product-image {
                height: 160px;
            }
        }
        @media (max-width: 900px) {
            .friend-actions {
                display: grid !important;
                grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
                gap: 6px;
            }
            .friend-actions[data-has-store="0"] {
                grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
            }
            .friend-actions .btn-light,
            .friend-actions .btn-danger {
                width: 100% !important;
                justify-content: center;
            }
            .friend-actions .btn-danger {
                grid-column: 1 / -1 !important;
            }
        }
        .linktree-order-form {
            display: grid;
            gap: 10px;
        }
        .linktree-order-list {
            display: grid;
            gap: 8px;
        }
        .linktree-order-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 12px;
            border-radius: 12px;
            border: 1px dashed var(--border);
            background: #f8fbfd;
            cursor: grab;
        }
        .linktree-order-item.dragging {
            opacity: 0.6;
        }
        .drag-handle {
            font-size: 18px;
            line-height: 1;
            padding: 2px 6px;
            border-radius: 8px;
            background: #e7f1f5;
            border: 1px solid var(--border);
            cursor: grab;
        }
        .order-title {
            font-weight: 600;
            color: #1b4f64;
        }
        .order-meta {
            font-size: 12px;
            color: var(--muted);
        }
        @keyframes linkIn {
            from { opacity: 0; transform: translateY(6px); }
            to { opacity: 1; transform: translateY(0); }
        }
        @keyframes spin {
            to { transform: rotate(360deg); }
        }
        ul { margin: 8px 0 0; padding: 0; list-style: none; }
        li {
            padding: 10px 12px;
            border: 1px solid var(--border);
            border-radius: 10px;
            background: #f9fcfd;
            margin-bottom: 8px;
        }
        li a { margin-left: 8px; font-weight: 600; color: var(--primary); text-decoration: none; }
        li a:hover { text-decoration: underline; }
        .message-item {
            padding: 10px;
            border: 1px solid var(--border);
            border-radius: 12px;
            margin-bottom: 8px;
            background: #f9fcfd;
        }
        .message-time { float: right; color: #6b7780; font-size: 12px; }
        .request-actions { display: flex; gap: 8px; flex-wrap: wrap; }
        .auth-card {
            max-width: 460px;
            margin: 60px auto 0;
            padding: 24px;
            background: linear-gradient(180deg, #ffffff, #f6fbfd);
            border: 1px solid rgba(15, 79, 100, 0.14);
            box-shadow: 0 18px 40px rgba(15, 79, 100, 0.14);
        }
        .auth-card h2 {
            margin: 0 0 6px;
            font-size: 24px;
        }
        .auth-subtitle {
            margin: 0 0 16px;
            color: var(--muted);
            font-size: 14px;
        }
        .auth-form {
            display: grid;
            gap: 10px;
        }
        .auth-form input {
            margin-top: 0;
            background: #f7fbfd;
            border: 1px solid var(--border);
            border-radius: 12px;
            padding: 10px 12px;
        }
        .password-field {
            display: grid;
            grid-template-columns: 1fr auto;
            gap: 8px;
            align-items: center;
        }
        .toggle-password {
            width: 42px;
            height: 42px;
            padding: 0;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: 10px;
            border: 1px solid var(--border);
            background: transparent;
            color: var(--primary);
            font-weight: 600;
            cursor: pointer;
            white-space: nowrap;
        }
        .toggle-password::before {
            content: "";
            width: 18px;
            height: 18px;
            background-repeat: no-repeat;
            background-size: contain;
            background-position: center;
            background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%230f6d63' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M2 12s4-7 10-7 10 7 10 7-4 7-10 7-10-7-10-7Z'/><circle cx='12' cy='12' r='3'/></svg>");
        }
        .toggle-password.is-visible::before {
            background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%230f6d63' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M17.94 17.94A10.94 10.94 0 0 1 12 20C6 20 2 12 2 12a21.81 21.81 0 0 1 5.08-6.49'/><path d='M1 1l22 22'/><path d='M9.88 9.88A3 3 0 0 0 12 15a3 3 0 0 0 2.12-.88'/><path d='M12 4c6 0 10 8 10 8a21.77 21.77 0 0 1-5.08 6.49'/></svg>");
        }
        .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;
        }
        .toggle-password:hover {
            filter: brightness(0.98);
        }
        .toggle-password {
            box-shadow: none;
        }
        .auth-form button {
            width: 100%;
            margin-top: 6px;
        }
        .char-counter {
            display: block;
            text-align: right;
            font-size: 11px;
            color: var(--muted);
        }
        .char-counter.is-warning {
            color: #b36b00;
            font-weight: 600;
        }
        .char-counter.is-over {
            color: #b42318;
        }
        .auth-footer {
            margin-top: 14px;
            text-align: center;
            color: var(--muted);
        }
        .auth-footer a {
            color: var(--primary);
            font-weight: 700;
        }
        .login-loading {
            position: fixed;
            inset: 0;
            background: rgba(11, 22, 26, 0.5);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 120;
        }
        .login-loading.show {
            display: flex;
        }
        .login-loading-card {
            background: #ffffff;
            border-radius: 14px;
            padding: 18px 22px;
            display: inline-flex;
            align-items: center;
            gap: 12px;
            box-shadow: 0 18px 34px rgba(0,0,0,0.2);
        }
        .login-spinner {
            width: 26px;
            height: 26px;
            border-radius: 999px;
            border: 3px solid #dfe9ee;
            border-top-color: var(--primary);
            animation: spin 0.9s linear infinite;
        }
        .login-loading-text {
            font-weight: 700;
            color: #1f2d35;
        }
        .admin-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
            gap: 16px;
            align-items: start;
        }
        .admin-user-card {
            display: grid;
            gap: 12px;
        }
        .admin-user-head {
            display: flex;
            gap: 12px;
            align-items: center;
        }
        .admin-avatar {
            width: 54px;
            height: 54px;
            border-radius: 16px;
            object-fit: cover;
            border: 1px solid var(--border);
            background: #f3f6f8;
        }
        .admin-user-name {
            font-weight: 700;
            font-size: 16px;
        }
        .admin-user-sub {
            color: var(--muted);
            font-size: 12px;
        }
        .admin-badges {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
        }
        .admin-badge {
            padding: 4px 10px;
            border-radius: 999px;
            border: 1px solid var(--border);
            background: #f7fbfd;
            font-size: 11px;
            font-weight: 700;
        }
        .admin-detail {
            display: grid;
            border-top: 1px dashed transparent;
            padding-top: 0;
            gap: 10px;
            max-height: 0;
            opacity: 0;
            overflow: hidden;
            transition: max-height .28s ease, opacity .28s ease;
        }
        .admin-detail.is-open {
            max-height: 1200px;
            opacity: 1;
            border-top-color: var(--border);
            padding-top: 12px;
        }
        .activity-log-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
        }
        .activity-log-body {
            margin-top: 8px;
            max-height: 260px;
            overflow: auto;
            transition: max-height .25s ease, opacity .25s ease, margin-top .25s ease;
        }
        .activity-log-body.is-collapsed {
            max-height: 0;
            opacity: 0;
            margin-top: 0;
            overflow: hidden;
        }
        @media (max-width: 600px) {
            .auth-card { margin-top: 36px; padding: 18px; }
            .auth-card h2 { font-size: 22px; }
        }
        .edit-profile-form {
            display: grid;
            gap: 18px;
        }
        .form-section {
            border: 1px solid var(--border);
            border-radius: 12px;
            padding: 12px;
            background: #fbfeff;
        }
        .edit-profile-form .form-section + .form-section {
            margin-top: 6px;
        }
        .form-section h3 {
            margin: 0 0 8px;
            font-size: 15px;
            color: #1b4f64;
        }
        .form-grid {
            display: grid;
            gap: 16px;
            grid-template-columns: 1fr 1fr;
        }
        .form-grid .full-col {
            grid-column: 1 / -1;
        }
        .theme-picker-grid {
            display: grid;
            gap: 12px;
            grid-template-columns: repeat(3, 1fr);
        }
        .theme-picker-grid input[type="color"] {
            height: 44px;
            padding: 4px;
            cursor: pointer;
        }
        .my-public-link-wrap {
            margin-top: 8px;
        }
        .my-public-link {
            display: inline-block;
            padding: 8px 12px;
            border-radius: 999px;
            border: 1px solid var(--border);
            background: #f4fbff;
            text-decoration: none;
            color: var(--primary);
            font-weight: 600;
        }
        .find-profile-card {
            border-style: dashed;
            background: linear-gradient(180deg, #f7fcff 0%, #ffffff 100%);
        }
        .find-profile-form {
            display: grid;
            grid-template-columns: 1fr auto;
            gap: 12px;
            align-items: end;
        }
        .find-profile-btn {
            margin-top: 0 !important;
            white-space: nowrap;
        }
        .viewed-profile-card .profile-detail-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px 12px;
            margin: 8px 0 10px;
        }
        .viewed-profile-card .profile-detail-grid .full-col {
            grid-column: 1 / -1;
        }
        .follow-stats-row {
            margin-top: 12px;
            margin-bottom: 6px;
        }
        .follow-stats {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 12px;
            width: 100%;
            max-width: 340px;
            margin: 2px auto 0;
        }
        .my-profile-card .follow-stats {
            margin-top: 14px;
        }
        .viewed-profile-card .follow-stats {
            margin-top: 8px;
        }
        .viewed-profile-card .profile-hero {
            margin-bottom: 14px;
        }
        .my-profile-card .profile-hero {
            margin-bottom: 14px;
        }
        .public-profile-card .follow-stats {
            margin-top: 12px;
            margin-bottom: 8px;
        }
        .follow-stat {
            font-size: 13px;
            white-space: nowrap;
        }
        .follow-stat-btn {
            border: 1px solid var(--profile-primary);
            background: var(--profile-accent);
            border-radius: 10px;
            padding: 6px 10px;
            font-size: 13px;
            cursor: pointer;
            color: var(--profile-text);
            font-weight: 600;
            transition: transform .15s ease, box-shadow .15s ease, background .2s ease, color .2s ease;
        }
        .follow-stat-btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
        }
        .follow-stat-btn.is-active {
            border-color: var(--profile-primary);
            background: var(--profile-primary);
            color: #ffffff;
        }
        .follow-list-panel {
            margin-top: 10px;
            padding: 10px;
            border: 1px solid var(--border);
            border-radius: 10px;
            background: rgba(255, 255, 255, 0.7);
            text-align: left;
        }
        .follow-list-panel h4 {
            margin: 0 0 8px;
            font-size: 14px;
            color: var(--profile-primary);
        }
        .follow-list-panel .compact-list {
            margin: 0;
            padding: 0;
            list-style: none;
            display: grid;
            gap: 6px;
        }
        .follow-popup[aria-hidden="false"] {
            display: flex;
        }
        .follow-popup {
            position: fixed;
            inset: 0;
            z-index: 3000;
            display: none;
            align-items: center;
            justify-content: center;
            padding: 16px;
        }
        .follow-popup-backdrop {
            position: absolute;
            inset: 0;
            background: rgba(8, 18, 27, 0.55);
        }
        .follow-popup-panel {
            position: relative;
            width: min(460px, 100%);
            max-height: min(80vh, 680px);
            background: var(--card);
            border: 1px solid var(--profile-primary);
            border-radius: 16px;
            box-shadow: 0 18px 40px rgba(10, 20, 30, 0.25);
            overflow: hidden;
            display: flex;
            flex-direction: column;
            color: var(--profile-text);
        }
        .follow-popup-head {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 10px;
            padding: 12px 14px;
            border-bottom: 1px solid var(--profile-primary);
            background: var(--profile-accent);
        }
        .follow-popup-head h3 {
            margin: 0;
            font-size: 16px;
            color: var(--profile-primary);
        }
        .follow-popup-body {
            padding: 12px;
            overflow: auto;
            overflow-x: hidden;
            max-height: calc(80vh - 60px);
        }
        .follow-popup-list {
            margin: 0;
            padding: 0;
            list-style: none;
            display: grid;
            gap: 8px;
            min-width: 0;
            box-sizing: border-box;
        }
        .follow-popup-list.is-scroll-limited {
            max-height: 360px;
            overflow-y: auto;
            overflow-x: hidden;
            padding-right: 0;
            scrollbar-gutter: stable;
        }
        .follow-popup-list.is-scroll-limited::-webkit-scrollbar {
            width: 6px;
        }
        .follow-popup-list.is-scroll-limited::-webkit-scrollbar-thumb {
            background: rgba(15, 109, 99, 0.45);
            border-radius: 999px;
        }
        .follow-popup-list li {
            display: block;
            padding: 0;
            border: 0;
            background: transparent;
            min-width: 0;
            box-sizing: border-box;
        }
        .follow-user-card {
            display: block;
            width: 100%;
            border: 1px solid var(--follow-primary, var(--profile-primary));
            border-radius: 12px;
            overflow: hidden;
            text-decoration: none;
            color: var(--follow-text, var(--profile-text));
            background: color-mix(in srgb, var(--follow-bg, #ffffff) 75%, white);
            min-width: 0;
            box-sizing: border-box;
        }
        .follow-user-banner {
            height: 52px;
            background: linear-gradient(120deg, var(--follow-primary, var(--profile-primary)), var(--follow-accent, var(--profile-accent)));
            background-size: cover;
            background-position: center;
        }
        .follow-user-body {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 8px 10px;
            background: color-mix(in srgb, var(--follow-bg, #ffffff) 82%, white);
        }
        .follow-user-avatar {
            width: 40px;
            height: 40px;
            border-radius: 999px;
            object-fit: cover;
            border: 2px solid #fff;
            margin-top: -22px;
            background: #eef3f8;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
        }
        .follow-user-meta {
            display: flex;
            flex-direction: column;
            min-width: 0;
        }
        .follow-user-meta strong {
            color: inherit;
            font-size: 14px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            text-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
        }
        .follow-user-meta small {
            color: inherit;
            opacity: 0.8;
            font-size: 12px;
            text-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
        }
        .viewed-profile-meta {
            display: flex;
            gap: 14px;
            align-items: center;
            flex-wrap: wrap;
            margin-top: 6px;
        }
        .friend-status-box {
            margin-top: 10px;
            padding-top: 10px;
            border-top: 1px solid var(--border);
        }
        .security-panel {
            margin-top: 12px;
            padding: 12px;
            border: 1px dashed var(--border);
            border-radius: 12px;
            background: #f7fbfd;
            text-align: left;
        }
        .security-panel h3 {
            margin: 0 0 8px;
            font-size: 14px;
            color: #1b4f64;
        }
        .security-actions {
            display: grid;
            gap: 10px;
        }
        .security-actions form {
            margin: 0;
        }
        .security-actions textarea {
            min-height: 70px;
        }
        .table { width: 100%; border-collapse: collapse; }
        .table th, .table td { border: 1px solid var(--border); padding: 10px; text-align: left; }
        .table-wrap {
            width: 100%;
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
        }
        .table-wrap .table {
            min-width: 560px;
        }
        .qr-box {
            margin-top: 10px;
            display: inline-flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
            padding: 10px;
            border: 1px dashed var(--border);
            border-radius: 12px;
            background: #fff;
        }
        .qr-wrap {
            position: relative;
            width: 150px;
            height: 150px;
        }
        .qr-code { width: 150px; height: 150px; border-radius: 8px; }
        .qr-overlay {
            position: absolute;
            inset: 50% auto auto 50%;
            transform: translate(-50%, -50%);
            width: 34px;
            height: 34px;
            border-radius: 999px;
            object-fit: cover;
            border: 4px solid #ffffff;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
            background: #ffffff;
        }
        .print-btn { margin-top: 10px; }
        @media print {
            .no-print { display: none !important; }
            .card { box-shadow: none; border-color: #bbb; }
            body { background: #fff !important; }
        }
        @media (max-width: 768px) {
            .topnav-inner {
                display: grid;
                grid-template-columns: 1fr auto;
                align-items: center;
            }
            .form-grid, .theme-picker-grid {
                grid-template-columns: 1fr;
            }
            .find-profile-form,
            .viewed-profile-card .profile-detail-grid {
                grid-template-columns: 1fr;
            }
            .follow-stats {
                max-width: 280px;
            }
            .viewed-profile-meta {
                justify-content: center;
            }
            .my-profile-card .qr-box {
                margin-left: auto;
                margin-right: auto;
            }
            .my-profile-card .my-public-link-wrap {
                text-align: center;
            }
            .hamburger { display: inline-flex; align-items: center; justify-content: center; }
            .topnav-controls {
                justify-self: end;
            }
            .notif-mobile {
                display: inline-flex;
            }
            .notif-desktop {
                display: none !important;
            }
            .nav-links {
                display: flex;
                grid-column: 1 / -1;
                padding-top: 8px;
                gap: 10px;
                flex-direction: column;
                max-height: 0;
                opacity: 0;
                transform: translateY(-6px);
                overflow: hidden;
                transition: max-height .25s ease, opacity .25s ease, transform .25s ease;
            }
            .nav-links[aria-hidden="true"] {
                max-height: 0;
                opacity: 0;
                transform: translateY(-6px);
            }
            .nav-links.open {
                max-height: 360px;
                opacity: 1;
                transform: translateY(0);
            }
            .nav-links a, .role-badge {
                width: 100%;
                text-align: center;
                justify-content: center;
            }
            .profile-hero {
                justify-content: center;
                align-items: center;
                padding: 18px;
            }
            .profile-hero-avatar {
                margin: 0 auto;
            }
        }
        @media (max-width: 600px) {
            .friend-chip {
                width: 100%;
                flex-wrap: wrap;
                gap: 8px;
            }
            .friend-actions {
                width: 100%;
                display: grid;
                grid-template-columns: repeat(3, minmax(0, 1fr));
                gap: 6px;
            }
            .friend-actions[data-has-store="0"] {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }
            .friend-actions .btn-light,
            .friend-actions .btn-danger {
                width: 100%;
                justify-content: center;
                font-size: 11px;
                padding: 6px 8px;
                white-space: nowrap;
            }
            .friend-actions .btn-danger {
                grid-column: 1 / -1;
            }
        }
        @media (max-width: 360px) {
            .container { padding: 10px; }
            .card { padding: 10px; }
            .dashboard-hero h2 { font-size: 18px; }
            .dashboard-hero p { font-size: 12px; }
            .topnav-inner { padding: 10px 12px; }
            .hamburger { padding: 6px 8px; }
        }
        @media (max-width: 420px) {
            .friend-actions {
                grid-template-columns: 1fr;
            }
        }
        @media (max-width: 360px) {
            .friend-actions {
                grid-template-columns: 1fr;
            }
        }
        @media (max-width: 414px) {
            .friend-name { font-size: 13px; }
            .friend-id { font-size: 10px; }
            .friend-actions .btn-light,
            .friend-actions .btn-danger {
                font-size: 10px;
                padding: 6px 6px;
            }
        }
        @media (max-width: 393px) {
            .friend-actions {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }
            .friend-actions[data-has-store="1"] .btn-light:nth-child(3) {
                grid-column: 1 / -1;
            }
        }
