:root {
    --gg-brand-ink: #1d2130;
    --gg-brand-accent: #ff6b8a;
    --gg-brand-accent-dark: #e84d6f;
    --gg-brand-muted: #6b7280;
    --gg-brand-border: rgba(221, 213, 200, 0.9);
    --gg-brand-surface: rgba(255, 255, 255, 0.9);
    --gg-brand-shadow: 0 12px 28px rgba(15, 29, 46, 0.08);
}

.gg-page-header {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) minmax(260px, auto) minmax(160px, 1fr);
    align-items: center;
    gap: 18px;
    margin-bottom: 12px;
    min-height: 72px;
    padding: 12px 22px;
    border: 1px solid var(--gg-brand-border);
    border-radius: 20px;
    background: #fce7d2;
    box-shadow: var(--gg-brand-shadow);
}

.gg-page-header--rich {
    min-height: 132px;
    padding: 18px 22px;
}

.gg-page-header--compact {
    margin-bottom: 20px;
}

.gg-page-header__brand {
    justify-self: start;
    min-width: 0;
}

.gg-brand-link {
    display: inline-flex;
    align-items: center;
    line-height: 0;
}

.gg-brand-logo {
    display: block;
    width: clamp(90px, 9vw, 110px);
    max-width: 100%;
    height: auto;
}

.gg-page-header__main {
    min-width: 0;
    text-align: center;
}

.gg-page-header__eyebrow {
    margin: 0 0 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--gg-brand-accent);
}

.gg-page-header__title {
    margin: 0;
    color: #212630;
    font-size: clamp(1.5rem, 2.8vw, 1.74rem);
    line-height: 1.3;
    font-weight: 600;
    letter-spacing: 0;
}

.gg-page-header__subtitle {
    margin: 10px 0 0;
    color: #212630;
    font-size: 14px;
    line-height: 1.6;
}

.gg-page-header__meta {
    margin-top: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    color: var(--gg-brand-muted);
    font-size: 13px;
}

.gg-page-header__actions {
    justify-self: end;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.gg-meta-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 107, 138, 0.18);
    background: rgba(255, 107, 138, 0.08);
    color: var(--gg-brand-ink);
    font-size: 12px;
    font-weight: 700;
}

.gg-inline-link {
    color: var(--gg-brand-accent);
    text-decoration: none;
    font-weight: 600;
}

.gg-inline-link:hover {
    color: var(--gg-brand-accent-dark);
}

@media (max-width: 980px) {
    .gg-page-header {
        grid-template-columns: 1fr;
        justify-items: center;
        min-height: 0;
    }

    .gg-page-header__brand,
    .gg-page-header__actions {
        justify-self: center;
    }

    .gg-page-header__actions {
        justify-content: center;
    }

    .gg-header-action-stack {
        align-items: center;
    }
}

@media (max-width: 640px) {
    .gg-page-header {
        padding: 16px;
        gap: 14px;
        border-radius: 16px;
    }

    .gg-brand-logo {
        width: min(105px, 36vw);
    }
}

/* ── Header outer wrapper (top gap + side padding) ─────────── */
.gg-header-outer {
    padding: 16px 16px 0;
}

/* ── Header navigation: Back + Menu dropdown ─────────── */
.gg-header-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gg-header-action-stack {
    flex-direction: column;
    align-items: flex-end;
}



.gg-accent-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 110px;
    padding: 8px 20px;
    border-radius: 999px;
    border: 1.5px solid #ff4d7f;
    background: #ff4d7f;
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, transform 0.15s;
    font-family: inherit;
    white-space: nowrap;
}

.gg-accent-btn:hover {
    background: var(--gg-brand-accent-dark);
    border-color: var(--gg-brand-accent-dark);
    color: #fff;
    transform: translateY(-1px);
}

.gg-accent-btn:active {
    transform: translateY(0);
}

.gg-nav-menu {
    position: relative;
}

.gg-menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background: var(--gg-brand-accent);
    color: #fff;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    font-family: inherit;
    user-select: none;
    flex-shrink: 0;
    padding: 0;
}

.gg-menu-toggle:hover {
    background: var(--gg-brand-accent-dark);
    transform: scale(1.07);
}

.gg-nav-menu.open .gg-menu-toggle {
    background: #ff4d7f;
    transform: scale(1.07);
}

/* Hamburger lines inside the toggle */
.gg-hamburger {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 18px;
}

.gg-hamburger span {
    display: block;
    height: 2.5px;
    border-radius: 2px;
    background: #fff;
    transition: transform 0.25s, opacity 0.2s, width 0.2s;
}

.gg-hamburger span:first-child  { width: 100%; }
.gg-hamburger span:nth-child(2) { width: 75%; }
.gg-hamburger span:last-child   { width: 100%; }

/* Animate to X when open */
.gg-nav-menu.open .gg-hamburger span:first-child {
    transform: translateY(6.5px) rotate(45deg);
}
.gg-nav-menu.open .gg-hamburger span:nth-child(2) {
    opacity: 0;
    width: 0;
}
.gg-nav-menu.open .gg-hamburger span:last-child {
    transform: translateY(-6.5px) rotate(-45deg);
}

.gg-menu-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 220px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.13);
    overflow: hidden;
    z-index: 999;
}

.gg-nav-menu.open .gg-menu-dropdown {
    display: block;
}

.gg-menu-item {
    display: block;
    padding: 14px 20px 12px;
    color: var(--gg-brand-ink);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
    position: relative;
    transition: color 0.15s, background 0.15s;
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
    box-sizing: border-box;
}

.gg-menu-item:last-child {
    border-bottom: none;
}

/* Pink sliding underline on hover */
.gg-menu-item::after {
    content: '';
    position: absolute;
    bottom: 7px;
    left: 20px;
    right: 20px;
    height: 1.5px;
    background: var(--gg-brand-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.22s ease;
}

.gg-menu-item:hover {
    color: var(--gg-brand-accent);
    background: rgba(255, 107, 138, 0.04);
}

.gg-menu-item:hover::after {
    transform: scaleX(1);
}

/* ── Below-header page title ─────────────────────── */
.gg-page-title {
    margin: 8px 0 20px;
}

.gg-page-title__heading {
    display: inline-block;
    position: relative;
    font-size: 22px;
    font-weight: 800;
    color: var(--gg-brand-ink);
    line-height: 1.1;
    margin-bottom: 4px;
    padding-bottom: 7px;
}
.gg-page-title__heading::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2.5px;
    border-radius: 2px;
    background: linear-gradient(to right, var(--gg-brand-accent), transparent);
}

.gg-page-title__sub {
    margin: 0;
    color: var(--gg-brand-muted);
    font-size: 13px;
}

/* ═══════════════════════════════════════════════════════════════════
   ENTERPRISE SIDEBAR LAYOUT
   ═══════════════════════════════════════════════════════════════════ */

:root {
    --gg-sidebar-width: 256px;
    --gg-sidebar-bg: #212630;
    --gg-sidebar-border: #2d3342;
    --gg-sidebar-text: rgba(255, 255, 255, 0.80);
    --gg-sidebar-muted: rgba(255, 255, 255, 0.38);
    --gg-sidebar-hover-bg: rgba(255, 255, 255, 0.07);
    --gg-sidebar-active-bg: #fff8f1;
    --gg-sidebar-active-color: #1f2937;
    --gg-sidebar-active-border: transparent;
    --gg-sidebar-icon: #ff4d7f;
    --gg-topbar-height: 64px;
    --gg-topbar-bg: #ffffff;
    --gg-topbar-border: #f0ece8;
}

/* ── Layout shell ────────────────────────────────────── */
.gg-app-layout {
    display: flex;
    min-height: 100vh;
    background: #fff8f1;
}

/* ── Sidebar container ───────────────────────────────── */
.gg-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--gg-sidebar-width);
    height: 100vh;
    background: var(--gg-sidebar-bg);
    border-right: none;
    display: flex;
    flex-direction: column;
    z-index: 200;
    overflow: visible;
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset -4px 0 12px rgba(0, 0, 0, 0.08);
}

/* ── Logo area ───────────────────────────────────────── */
.gg-sidebar__logo {
    flex-shrink: 0;
    padding: 22px 20px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.gg-sidebar__logo-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    line-height: 0;
}

.gg-sidebar__logo-img {
    width: 130px;
    height: auto;
    display: block;
    filter: brightness(0) invert(1);
}

/* ── Navigation ──────────────────────────────────────── */
.gg-sidebar__nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: visible;
    padding: 12px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.12) transparent;
}

.gg-sidebar__nav::-webkit-scrollbar { width: 4px; }
.gg-sidebar__nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 4px; }

.gg-sidebar__nav-list {
    list-style: none;
    margin: 0;
    /* left-only padding so active item can bleed to right edge */
    padding: 0 0 0 10px;
}

.gg-sidebar__nav-list li { margin: 0; position: relative; }

.gg-sidebar__nav-group-label {
    padding: 14px 12px 6px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gg-sidebar-muted);
    user-select: none;
    margin-top: 6px;
}

.gg-sidebar__nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 14px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--gg-sidebar-text);
    font-size: 13px;
    font-weight: 500;
    transition: background 0.18s, color 0.18s;
    margin-bottom: 3px;
    border: none;
    white-space: nowrap;
    overflow: hidden;
    position: relative;
}

.gg-sidebar__nav-item:hover {
    background: var(--gg-sidebar-hover-bg);
    color: rgba(255, 255, 255, 0.95);
}

.gg-sidebar__nav-item:active {
    background: var(--gg-sidebar-active-bg);
    color: var(--gg-sidebar-active-color);
}

/* Active: white pill on left, bleeds to right edge — merges with page */
.gg-sidebar__nav-item--active {
    background: var(--gg-sidebar-active-bg);
    color: var(--gg-sidebar-active-color);
    font-weight: 600;
    border-radius: 10px 0 0 10px;
}

/* Concave corner illusion above active item */
.gg-sidebar__nav-list li:has(.gg-sidebar__nav-item--active)::before {
    content: '';
    position: absolute;
    top: -14px;
    right: -1px;
    width: 14px;
    height: 14px;
    background: var(--gg-sidebar-bg);
    border-bottom-right-radius: 14px;
    box-shadow: 5px 5px 0 5px var(--gg-sidebar-active-bg);
    pointer-events: none;
    z-index: 201;
}

/* Concave corner illusion below active item */
.gg-sidebar__nav-list li:has(.gg-sidebar__nav-item--active)::after {
    content: '';
    position: absolute;
    bottom: -14px;
    right: -1px;
    width: 14px;
    height: 14px;
    background: var(--gg-sidebar-bg);
    border-top-right-radius: 14px;
    box-shadow: 5px -5px 0 5px var(--gg-sidebar-active-bg);
    pointer-events: none;
    z-index: 201;
}

/* Icons always pink */
.gg-sidebar__nav-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: var(--gg-sidebar-icon);
    opacity: 1;
}

.gg-sidebar__nav-item--active .gg-sidebar__nav-icon,
.gg-sidebar__nav-item:hover .gg-sidebar__nav-icon {
    color: var(--gg-sidebar-icon);
    opacity: 1;
}

.gg-sidebar__nav-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── User footer ─────────────────────────────────────── */
.gg-sidebar__footer {
    flex-shrink: 0;
    padding: 12px 10px;
    border-top: 1px solid var(--gg-sidebar-border);
}

.gg-sidebar__user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--gg-sidebar-text);
    transition: background 0.15s;
    cursor: pointer;
}

.gg-sidebar__user:hover {
    background: var(--gg-sidebar-hover-bg);
    color: rgba(255, 255, 255, 0.95);
}

.gg-sidebar__user-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.gg-sidebar__user-name {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    color: rgba(255, 255, 255, 0.90);
}

.gg-sidebar__user-email {
    font-size: 11px;
    color: var(--gg-sidebar-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.gg-sidebar__logout-icon {
    flex-shrink: 0;
    opacity: 0.45;
    display: inline-flex;
    transition: opacity 0.15s;
}

.gg-sidebar__user:hover .gg-sidebar__logout-icon { opacity: 0.9; }

/* ── Avatar circle ───────────────────────────────────── */
.gg-avatar {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff6b8a 0%, #e84d6f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.gg-avatar__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.gg-avatar__initials {
    font-size: 13px;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.02em;
    line-height: 1;
    user-select: none;
}

/* ── Main content area ───────────────────────────────── */
.gg-main {
    flex: 1;
    margin-left: var(--gg-sidebar-width);
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ── Top bar (transparent strip — no visual bar) ─────── */
.gg-topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    position: relative;
    z-index: 100;
}

.gg-topbar__left {
    flex-shrink: 0;
}

.gg-topbar__title {
    font-size: 17px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
    white-space: nowrap;
}

.gg-topbar__right {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

/* ── Page content wrapper ────────────────────────────── */
.gg-page-content {
    flex: 1;
    padding: 0 24px 24px 24px;
    min-width: 0;
}

/* ── Mobile toggle button ────────────────────────────── */
.gg-sidebar-toggle {
    display: none;
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 300;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: #212630;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 0;
}

.gg-sidebar-toggle .gg-hamburger {
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    justify-content: center;
    width: 18px;
}

.gg-sidebar-toggle .gg-hamburger span {
    display: block;
    height: 2px;
    background: rgba(255, 255, 255, 0.75);
    border-radius: 2px;
    transition: all 0.2s;
    width: 18px;
}

/* ── Mobile overlay ──────────────────────────────────── */
.gg-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 190;
    backdrop-filter: blur(2px);
}

.gg-sidebar-overlay--visible { display: block; }

/* ── Topbar action button & badge ───────────────────── */
.gg-topbar-action-btn {
    display: inline-flex;
    align-items: center;
    padding: 7px 16px;
    background: #e84d6f;
    color: #fff;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s;
}
.gg-topbar-action-btn:hover { background: #c73d5a; }
.gg-topbar-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: #fff1eb;
    color: #e84d6f;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid #fad4c9;
    white-space: nowrap;
}

/* ── User menu (topbar top-right) ───────────────────── */
.gg-user-menu {
    position: relative;
    display: flex;
    align-items: center;
    margin-left: 8px;
}
.gg-user-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #2a3144;
    border: 1.5px solid rgba(255, 77, 127, 0.35);
    border-radius: 40px;
    padding: 4px 12px 4px 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.88);
    transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
    outline: none;
}
.gg-user-trigger:hover,
.gg-user-trigger--open {
    background: #323b52;
    border-color: #ff4d7f;
    box-shadow: 0 0 0 3px rgba(255, 77, 127, 0.15);
}
.gg-user-trigger__name {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.gg-user-trigger__chevron {
    color: rgba(255, 255, 255, 0.45);
    flex-shrink: 0;
    transition: transform 0.18s;
}
.gg-user-trigger--open .gg-user-trigger__chevron {
    transform: rotate(180deg);
}

/* Avatar size variants */
.gg-avatar--sm {
    width: 30px;
    height: 30px;
    font-size: 11px;
    flex-shrink: 0;
}
.gg-avatar--lg {
    width: 72px;
    height: 72px;
    font-size: 26px;
    font-weight: 700;
    flex-shrink: 0;
}

/* User panel dropdown */
.gg-user-panel {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    background: #212630;
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 18px;
    box-shadow: 0 16px 48px rgba(5, 8, 15, 0.45), 0 2px 8px rgba(5, 8, 15, 0.25);
    width: 296px;
    z-index: 300;
    overflow: hidden;
    animation: ggPanelIn 0.18s ease;
}
@keyframes ggPanelIn {
    from { opacity: 0; transform: translateY(-8px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.gg-user-panel[hidden] { display: none; }

.gg-user-panel__header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px 24px 22px;
    gap: 5px;
    background: linear-gradient(160deg, #2a3144 0%, #212630 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.gg-user-panel__greeting {
    margin: 8px 0 0;
    font-size: 18px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    letter-spacing: -0.3px;
}
.gg-user-panel__fullname {
    margin: 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.65);
    font-weight: 500;
}
.gg-user-panel__role-badge {
    display: inline-block;
    padding: 3px 14px;
    background: rgba(255, 77, 127, 0.12);
    color: #ff4d7f;
    border: 1.5px solid rgba(255, 77, 127, 0.35);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    margin-top: 6px;
}
.gg-user-panel__email {
    margin: 2px 0 0;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.38);
}
.gg-user-panel__footer {
    padding: 14px 16px 16px;
    background: rgba(0, 0, 0, 0.12);
}
.gg-user-panel__logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1.5px solid rgba(255, 255, 255, 0.10);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.55);
    text-decoration: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    box-sizing: border-box;
}
.gg-user-panel__logout:hover {
    background: rgba(255, 77, 127, 0.12);
    border-color: rgba(255, 77, 127, 0.45);
    color: #ff4d7f;
}

/* ── Screen-reader only ──────────────────────────────── */
.gg-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ── Responsive: tablet & mobile ────────────────────── */
@media (max-width: 1024px) {
    .gg-sidebar {
        transform: translateX(calc(-1 * var(--gg-sidebar-width)));
        box-shadow: 8px 0 32px rgba(15, 29, 46, 0.14);
    }

    .gg-sidebar--open {
        transform: translateX(0);
    }

    .gg-main {
        margin-left: 0;
    }

    .gg-sidebar-toggle {
        display: flex;
    }

    .gg-topbar {
        padding: 10px 20px 10px 64px;
    }
}

@media (max-width: 640px) {
    .gg-topbar {
        padding: 8px 14px 8px 60px;
        gap: 8px;
    }

    .gg-page-content {
        padding: 0 16px 16px 16px;
    }
}
