/* MrGold3en.dev — extracted from base.html inline <style> block */
        :root {
            --bg:        #1a1a1a;
            --bg-raised: #1f1f1f;
            --surface:   #242424;
            --surface-2: #2c2c2c;
            --border:    #383838;
            --border-hi: #474747;
            --glow:      rgba(255,255,255,0.03);

            --text:      #e8e8e8;
            --text-2:    #a0a0a0;
            --text-3:    #636363;

            --nav-bg:    #2a2a2a;
            --nav-border: #3a3a3a;

            --violet:     #c0c0c0;
            --violet-dim: rgba(255,255,255,0.04);
            --violet-mid: rgba(255,255,255,0.07);
            --violet-glow:rgba(255,255,255,0.10);

            --cyan:      #22d3ee;
            --cyan-dim:  rgba(34,211,238,0.07);
            --red:       #f87171;
            --red-dim:   rgba(248,113,113,0.07);
            --green:     #4ade80;
            --yellow:    #fbbf24;
            --orange:    #fb923c;
            --purple:    #a0a0a0;
            --pink:      #f472b6;
        }

        *, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

        html { scroll-behavior: smooth; }

        body {
            background: var(--bg);
            color: var(--text);
            font-family: 'Sora', sans-serif;
            font-size: 14px;
            line-height: 1.65;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            -webkit-font-smoothing: antialiased;
            overflow-x: hidden;
        }

        /* Ambient background — removed for cleaner look */

        /* ── PAGE ENTRY ANIMATION ── */
        @keyframes fadeUp {
            from { opacity: 0; transform: translateY(18px); }
            to   { opacity: 1; transform: translateY(0); }
        }

        @keyframes fadeIn {
            from { opacity: 0; }
            to   { opacity: 1; }
        }

        @keyframes slideInRight {
            from { opacity: 0; transform: translateX(12px); }
            to   { opacity: 1; transform: translateX(0); }
        }

        @keyframes shimmer {
            0%   { background-position: -200% center; }
            100% { background-position: 200% center; }
        }

        @keyframes pulse-ring {
            0%   { transform: scale(1); opacity: 0.6; }
            100% { transform: scale(1.4); opacity: 0; }
        }

        .container {
            max-width: 980px;
            margin: 44px auto;
            padding: 0 24px;
            flex-grow: 1;
            position: relative;
            z-index: 1;
        }

        /* ── NAV ── */
        .navbar {
            height: 54px;
            border-bottom: 1px solid var(--nav-border);
            background: var(--nav-bg);
            backdrop-filter: blur(16px);
            -webkit-backdrop-filter: blur(16px);
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0 32px;
            position: sticky;
            top: 0;
            z-index: 100;
            animation: fadeIn 0.4s ease;
        }

        .navbar-brand {
            font-family: 'Sora', sans-serif;
            font-size: 14px;
            font-weight: 600;
            color: var(--text);
            text-decoration: none;
            letter-spacing: -0.01em;
            transition: opacity 0.2s;
        }

        .navbar-brand:hover { opacity: 0.8; text-decoration: none; }

        .navbar-links {
            display: flex;
            align-items: center;
            gap: 2px;
        }

        .navbar-links a {
            color: var(--text-2);
            text-decoration: none;
            font-size: 13px;
            font-weight: 400;
            padding: 6px 13px;
            border-radius: 3px;
            transition: color 0.2s, background 0.2s, transform 0.2s;
            position: relative;
        }

        .navbar-links a:not(.btn):hover {
            color: var(--text);
            background: var(--surface-2);
            transform: translateY(-1px);
            text-decoration: none;
        }

        /* ── CARDS ── */
        .glass-card {
            background: var(--surface);
            border: 1px solid var(--border);
            border-radius: 3px;
            padding: 24px 28px;
            margin-bottom: 14px;
            transition: border-color 0.2s;
            animation: fadeUp 0.5s ease both;
            position: relative;
        }

        .glass-card::before { display: none; }

        .glass-card:hover {
            border-color: var(--border-hi);
        }

        /* Stagger card animations */
        .glass-card:nth-child(1) { animation-delay: 0.05s; }
        .glass-card:nth-child(2) { animation-delay: 0.1s; }
        .glass-card:nth-child(3) { animation-delay: 0.15s; }
        .glass-card:nth-child(4) { animation-delay: 0.2s; }
        .glass-card:nth-child(5) { animation-delay: 0.25s; }

        /* ── BUTTONS ── */
        .btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            background: var(--surface-2);
            color: var(--text);
            border: 1px solid var(--border-hi);
            padding: 7px 16px;
            border-radius: 3px;
            font-size: 13px;
            font-weight: 500;
            font-family: 'Sora', sans-serif;
            text-decoration: none;
            cursor: pointer;
            transition: background 0.15s, border-color 0.15s, color 0.15s;
            white-space: nowrap;
            letter-spacing: -0.01em;
        }

        .btn:hover {
            background: var(--border-hi);
            border-color: #555;
            text-decoration: none;
        }

        .btn:active { opacity: 0.8; }

        .btn-primary {
            background: var(--surface-2);
            border-color: var(--border-hi);
            color: var(--text);
        }
        .btn-primary:hover {
            background: var(--border);
            border-color: var(--border-hi);
            color: var(--text);
        }

        .btn-danger {
            background: var(--red-dim);
            border-color: rgba(248,113,113,0.2);
            color: var(--red);
        }
        .btn-danger:hover {
            background: rgba(248,113,113,0.12);
            border-color: rgba(248,113,113,0.3);
        }

        .btn-sm {
            padding: 4px 11px;
            font-size: 12px;
            border-radius: 3px;
        }

        /* ── TYPOGRAPHY ── */
        h1 {
            font-size: 24px;
            font-weight: 700;
            color: var(--text);
            letter-spacing: -0.04em;
            margin-bottom: 6px;
            line-height: 1.25;
        }

        h2 {
            font-family: 'Sora', sans-serif;
            font-size: 11px;
            font-weight: 600;
            color: var(--text-3);
            letter-spacing: 0.12em;
            text-transform: uppercase;
            margin-bottom: 18px;
        }

        h3 {
            font-size: 15px;
            font-weight: 600;
            color: var(--text);
            margin-bottom: 6px;
            letter-spacing: -0.02em;
        }

        p {
            color: var(--text-2);
            font-size: 13.5px;
            line-height: 1.75;
        }

        code {
            font-family: 'JetBrains Mono', monospace;
            font-size: 12px;
            background: var(--surface-2);
            border: 1px solid var(--border-hi);
            padding: 2px 7px;
            border-radius: 3px;
            color: var(--cyan);
        }

        a { color: var(--text-2); text-decoration: none; transition: color 0.2s; }
        a:hover { color: var(--text); text-decoration: none; }

        hr {
            border: none;
            border-top: 1px solid var(--border);
            margin: 20px 0;
        }

        strong { color: var(--text); font-weight: 600; }

        /* ── BADGES ── */
        .badge {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            font-family: 'JetBrains Mono', monospace;
            font-size: 11px;
            font-weight: 500;
            padding: 3px 10px;
            border-radius: 3px;
            letter-spacing: 0.02em;
        }
        .badge-cyan   { background: rgba(34,211,238,0.08);  color: var(--cyan);   border: 1px solid rgba(34,211,238,0.18); }
        .badge-green  { background: rgba(74,222,128,0.08);  color: var(--green);  border: 1px solid rgba(74,222,128,0.18); }
        .badge-red    { background: var(--red-dim);          color: var(--red);    border: 1px solid rgba(248,113,113,0.18); }
        .badge-yellow { background: rgba(251,191,36,0.08);  color: var(--yellow); border: 1px solid rgba(251,191,36,0.18); }
        .badge-orange { background: rgba(251,146,60,0.08);  color: var(--orange); border: 1px solid rgba(251,146,60,0.18); }
        .badge-neutral { background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border-hi); }

        /* ── FORMS ── */
        form { display: flex; flex-direction: column; gap: 10px; }

        input[type="text"],
        input[type="password"],
        input[type="email"],
        select,
        textarea {
            background: var(--bg-raised);
            border: 1px solid var(--border-hi);
            border-radius: 3px;
            padding: 9px 13px;
            color: var(--text);
            font-family: 'Sora', sans-serif;
            font-size: 13px;
            outline: none;
            transition: border-color 0.15s;
            width: 100%;
        }

        input:focus, select:focus, textarea:focus {
            border-color: var(--text-3);
        }

        input::placeholder { color: var(--text-3); }

        select option {
            background: var(--surface-2);
            color: var(--text);
        }

        .field-label {
            font-size: 12px;
            font-weight: 500;
            color: var(--text-2);
            margin-bottom: 2px;
            display: block;
            letter-spacing: 0.02em;
        }

        .field { display: flex; flex-direction: column; gap: 5px; }

        /* ── CHECKBOX ── */
        .checkbox-container {
            display: flex;
            align-items: center;
            gap: 10px;
            cursor: pointer;
            user-select: none;
            font-size: 13px;
            color: var(--text-2);
            position: relative;
        }

        .checkbox-container input { position: absolute; opacity: 0; width: 0; height: 0; }

        .checkmark {
            width: 17px;
            height: 17px;
            min-width: 17px;
            border: 1px solid var(--border-hi);
            border-radius: 3px;
            background: var(--bg-raised);
            position: relative;
            transition: all 0.2s;
        }

        .checkbox-container input:checked ~ .checkmark {
            background: var(--text-2);
            border-color: var(--text-2);
        }

        .checkmark::after {
            content: '';
            position: absolute;
            display: none;
            left: 4px;
            top: 1px;
            width: 5px;
            height: 9px;
            border: 2px solid var(--bg);
            border-top: none;
            border-left: none;
            transform: rotate(45deg);
        }

        .checkbox-container input:checked ~ .checkmark::after { display: block; }

        /* ── TABLES ── */
        table { width: 100%; border-collapse: collapse; font-size: 13px; }

        thead th {
            font-family: 'Sora', sans-serif;
            font-size: 10px;
            letter-spacing: 0.1em;
            text-transform: uppercase;
            color: var(--text-3);
            font-weight: 600;
            padding: 9px 14px;
            border-bottom: 1px solid var(--border);
            text-align: left;
            white-space: nowrap;
        }

        tbody td {
            padding: 12px 14px;
            border-bottom: 1px solid var(--border);
            color: var(--text-2);
            vertical-align: middle;
            transition: background 0.15s, color 0.15s;
        }

        tbody tr:last-child td { border-bottom: none; }

        tbody tr {
            transition: background 0.2s;
        }

        tbody tr:hover td {
            background: rgba(255,255,255,0.04);
            color: var(--text);
        }

        /* ── LABELS ── */
        .section-label {
            font-family: 'Sora', sans-serif;
            font-size: 10px;
            letter-spacing: 0.14em;
            text-transform: uppercase;
            color: var(--text-3);
            margin-bottom: 12px;
            margin-top: 24px;
            font-weight: 600;
        }

        .section-label:first-child { margin-top: 0; }

        /* ── ALERTS ── */
        .alert-container {
            position: fixed;
            top: 68px;
            right: 20px;
            z-index: 200;
            width: 310px;
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .alert {
            padding: 12px 16px;
            border-radius: 3px;
            font-size: 13px;
            font-weight: 500;
            opacity: 1;
            transition: opacity 0.35s, transform 0.35s;
            display: flex;
            align-items: flex-start;
            gap: 10px;
            animation: slideInRight 0.3s ease;
            backdrop-filter: blur(12px);
        }

        .alert-icon {
            width: 16px;
            height: 16px;
            flex-shrink: 0;
            margin-top: 1px;
        }

        .alert.success {
            background: rgba(74,222,128,0.08);
            border: 1px solid rgba(74,222,128,0.2);
            color: var(--green);
        }

        .alert.error {
            background: var(--red-dim);
            border: 1px solid rgba(248,113,113,0.2);
            color: var(--red);
        }

        /* ── FOOTER ── */
        footer.footer {
            padding: 20px 32px;
            border-top: 1px solid var(--border);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            font-family: 'JetBrains Mono', monospace;
            font-size: 11px;
            color: var(--text-3);
            letter-spacing: 0.02em;
            position: relative;
            z-index: 1;
        }

        footer.footer a { color: var(--text-3); transition: color 0.2s; }
        footer.footer a:hover { color: var(--text-2); }
        .footer-sep { color: var(--border-hi); }

        /* ── ROW FORMS ── */
        .row-form {
            display: flex;
            flex-direction: row;
            gap: 8px;
            align-items: center;
        }

        .row-form input,
        .row-form select { flex: 1; }

        /* ── STAT BLOCKS ── */
        .stat-block {
            background: var(--surface-2);
            border: 1px solid var(--border);
            border-radius: 3px;
            padding: 20px 22px;
            text-align: center;
            transition: border-color 0.2s;
        }

        .stat-block:hover {
            border-color: var(--border-hi);
        }

        .stat-num {
            font-size: 38px;
            font-weight: 700;
            letter-spacing: -0.05em;
            line-height: 1;
            margin: 8px 0 5px;
        }

        .stat-label {
            font-family: 'Sora', sans-serif;
            font-size: 10px;
            letter-spacing: 0.1em;
            text-transform: uppercase;
            color: var(--text-3);
            font-weight: 600;
        }

        /* ── MISC ── */
        ul { list-style: none; padding: 0; }
        .mono { font-family: 'JetBrains Mono', monospace; font-size: 12px; }
        .muted { color: var(--text-2); }
        .dim   { color: var(--text-3); }

        /* ── SKILL ITEM CARDS ── */
        .skill-card {
            background: var(--surface-2);
            border: 1px solid var(--border);
            border-radius: 3px;
            padding: 20px 22px;
            transition: border-color 0.2s;
        }

        .skill-card:hover {
            border-color: var(--border-hi);
        }

        .skill-num {
            font-family: 'JetBrains Mono', monospace;
            font-size: 10px;
            color: var(--text-3);
            letter-spacing: 0.1em;
            text-transform: uppercase;
            margin-bottom: 10px;
            opacity: 0.7;
        }

        /* ── CONTACT ROW ── */
        .contact-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 18px 0;
            border-bottom: 1px solid var(--border);
            transition: background 0.2s;
        }

        .contact-row:last-child { border-bottom: none; }

        .contact-label {
            font-size: 15px;
            font-weight: 500;
            color: var(--text);
            transition: color 0.2s;
        }

        .contact-meta {
            font-size: 12px;
            color: var(--text-3);
            font-family: 'JetBrains Mono', monospace;
            margin-top: 2px;
        }

        /* ── PROFILE IMAGE ── */
        @keyframes shinePass {
            0%   { left: -120%; }
            100% { left: 160%; }
        }

        @keyframes bouncePop {
            0%   { transform: scale(1) translate(0, 0) rotate(0deg); }
            20%  { transform: scale(1.15) translate(-12px, -14px) rotate(-8deg); }
            45%  { transform: scale(0.9) translate(10px, 8px) rotate(6deg); }
            65%  { transform: scale(1.1) translate(-6px, -9px) rotate(-4deg); }
            80%  { transform: scale(0.97) translate(4px, 4px) rotate(2deg); }
            100% { transform: scale(1) translate(0, 0) rotate(0deg); }
        }

        @keyframes easterSpin {
            0%   { transform: rotate(0deg) scale(1.08); }
            100% { transform: rotate(1080deg) scale(1.08); }
        }

        @keyframes goldPulse {
            0%, 100% {
                box-shadow:
                    0 0 0 4px rgba(251,191,36,0.7),
                    0 0 20px rgba(251,191,36,0.8),
                    0 0 50px rgba(251,191,36,0.6),
                    0 0 100px rgba(251,191,36,0.35),
                    0 0 160px rgba(251,191,36,0.15);
                border-color: #fbbf24;
            }
            50% {
                box-shadow:
                    0 0 0 6px rgba(251,191,36,0.9),
                    0 0 35px rgba(251,191,36,1),
                    0 0 80px rgba(251,191,36,0.8),
                    0 0 140px rgba(251,191,36,0.5),
                    0 0 220px rgba(251,191,36,0.25);
                border-color: #fde68a;
            }
        }

        @keyframes bluePulse {
            0%, 100% {
                box-shadow:
                    0 0 0 4px rgba(56,189,248,0.7),
                    0 0 20px rgba(56,189,248,0.8),
                    0 0 50px rgba(56,189,248,0.6),
                    0 0 100px rgba(56,189,248,0.35),
                    0 0 160px rgba(56,189,248,0.15);
                border-color: #38bdf8;
            }
            50% {
                box-shadow:
                    0 0 0 6px rgba(56,189,248,0.9),
                    0 0 35px rgba(56,189,248,1),
                    0 0 80px rgba(56,189,248,0.8),
                    0 0 140px rgba(56,189,248,0.5),
                    0 0 220px rgba(56,189,248,0.25);
                border-color: #7dd3fc;
            }
        }

        /* Wrapper — NO overflow:hidden so glow bleeds out freely */
        .profile-img-wrap {
            position: relative;
            border-radius: 50%;
            flex-shrink: 0;
            display: inline-block;
            cursor: pointer;
            width: 110px;
            height: 110px;
        }

        /* Shine lives in a clipping inner layer so it doesn't affect glow */
        .profile-img-wrap .shine-clip {
            position: absolute;
            inset: 0;
            border-radius: 50%;
            overflow: hidden;
            pointer-events: none;
            z-index: 2;
        }

        .profile-img-wrap .shine-clip::after {
            content: '';
            position: absolute;
            top: -10%;
            left: -120%;
            width: 55%;
            height: 120%;
            background: linear-gradient(
                105deg,
                transparent 20%,
                rgba(255,255,255,0.28) 50%,
                transparent 80%
            );
            opacity: 0;
        }

        .profile-img-wrap:hover:not(.no-shine) .shine-clip::after {
            opacity: 1;
            animation: shinePass 0.65s ease forwards;
        }

        .profile-img {
            width: 110px;
            height: 110px;
            border-radius: 50%;
            object-fit: cover;
            border: 2px solid var(--border-hi);
            cursor: pointer;
            transition: border-color 0.3s, box-shadow 0.3s;
            display: block;
            position: relative;
            z-index: 1;
        }

        .profile-img-wrap:hover .profile-img:not(.bouncing):not(.easter-egg):not(.easter-egg-blue) {
            border-color: var(--text-2);
            box-shadow: 0 0 0 4px rgba(255,255,255,0.06), 0 0 20px rgba(0,0,0,0.4);
        }

        .profile-img.bouncing {
            animation: bouncePop 0.55s cubic-bezier(0.36, 0.07, 0.19, 0.97) forwards !important;
        }

        .profile-img.easter-egg {
            animation: easterSpin 3s cubic-bezier(0.2, 0, 0.1, 1) forwards, goldPulse 0.4s ease-in-out infinite !important;
            border-color: #fbbf24 !important;
        }

        .profile-img.easter-egg-blue {
            animation: easterSpin 3s cubic-bezier(0.2, 0, 0.1, 1) forwards, bluePulse 0.4s ease-in-out infinite !important;
            border-color: #38bdf8 !important;
        }

        /* Scrollbar */
        ::-webkit-scrollbar { width: 6px; height: 6px; }
        ::-webkit-scrollbar-track { background: transparent; }
        ::-webkit-scrollbar-thumb { background: var(--border-hi); border-radius: 3px; }
        ::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* ---------------------------------------------------------------------- */
/* General overlap hardening — long usernames/IDs/product names no longer */
/* run over neighbouring UI. Added as part of the 2026-07 APPI/org update. */
/* ---------------------------------------------------------------------- */
.user-name, .ud-username, .appi-card-title, .ud-perm-name,
.org-name, .org-card-title { overflow-wrap: anywhere; word-break: break-word; }

table { table-layout: auto; }
td, th { overflow-wrap: anywhere; }

@media (max-width: 640px) {
    table { display: block; overflow-x: auto; white-space: nowrap; }
}

/* ---------------------------------------------------------------------- */
/* Tabs — shared component used on the APPI hub and other multi-view pages */
/* ---------------------------------------------------------------------- */
.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tab-btn {
    background: none;
    border: none;
    color: var(--text-3);
    font-family: 'Sora', sans-serif;
    font-size: 13px;
    font-weight: 500;
    padding: 9px 16px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
}

.tab-btn:hover { color: var(--text-2); }
.tab-btn.active { color: var(--text); border-bottom-color: var(--text-2); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeUp 0.3s ease both; }
.tab-count {
    display: inline-block;
    margin-left: 4px;
    font-size: 10.5px;
    color: var(--text-3);
    font-family: 'JetBrains Mono', monospace;
}

/* ---------------------------------------------------------------------- */
/* Organizations                                                          */
/* ---------------------------------------------------------------------- */
.org-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.org-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-decoration: none;
    transition: border-color 0.2s, transform 0.2s;
    min-width: 0;
}

.org-card:hover { border-color: var(--border-hi); transform: translateY(-1px); text-decoration: none; }
.org-card-title { font-size: 14px; font-weight: 600; color: var(--text); letter-spacing: -0.02em; }
.org-card-meta { font-size: 11.5px; color: var(--text-3); font-family: 'JetBrains Mono', monospace; }
.org-card-stats { display: flex; gap: 10px; margin-top: 4px; }
.org-card-stat { font-size: 11px; color: var(--text-2); }
.org-card-stat b { color: var(--text); font-weight: 600; }

.api-key-box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-raised);
    border: 1px solid var(--border-hi);
    border-radius: 4px;
    padding: 8px 12px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text-2);
    overflow-wrap: anywhere;
}

.api-key-box button {
    flex-shrink: 0;
    background: var(--surface-2);
    border: 1px solid var(--border-hi);
    color: var(--text-2);
    border-radius: 3px;
    padding: 4px 10px;
    font-size: 11px;
    cursor: pointer;
}

.editor-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: 4px;
    gap: 10px;
    margin-bottom: 6px;
}

.activity-log {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 320px;
    overflow-y: auto;
}

.activity-row {
    display: flex;
    gap: 10px;
    padding: 8px 4px;
    border-bottom: 1px solid var(--border);
    font-size: 12px;
}

.activity-row:last-child { border-bottom: none; }
.activity-time { color: var(--text-3); font-family: 'JetBrains Mono', monospace; font-size: 10.5px; flex-shrink: 0; width: 130px; }
.activity-desc { color: var(--text-2); overflow-wrap: anywhere; }
.activity-desc b { color: var(--text); }

.danger-zone {
    border: 1px solid rgba(248,113,113,0.25);
    background: var(--red-dim);
    border-radius: 4px;
    padding: 16px 18px;
}

.danger-zone .appi-card-title { color: var(--red); }
