/* ==========================================================================
   GitLab Theme Design System (Pajamas UI) for Vanguar
   Based on @uvixis/components and @uvixis/components-enterprise
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Titillium+Web:ital,wght@0,200;0,300;0,400;0,600;0,700;0,900;1,200;1,300;1,400;1,600;1,700&display=swap');

/* ==========================================================================
   GitLab Pajamas SVG Icons (Sprite via /gl-icons.svg)
   ========================================================================== */

.p-0 {
    padding: 0;
}

.gl-icon {
    display: inline-block;
    vertical-align: text-bottom;
    fill: currentColor;
    flex-shrink: 0;
    pointer-events: none;
}

.gl-icon.s12 {
    width: 12px;
    height: 12px;
}

.gl-icon.s14 {
    width: 14px;
    height: 14px;
}

.gl-icon.s16 {
    width: 16px;
    height: 16px;
}

.gl-icon.s18 {
    width: 18px;
    height: 18px;
}

.gl-icon.s20 {
    width: 20px;
    height: 20px;
}

.gl-icon.s24 {
    width: 24px;
    height: 24px;
}

.gl-icon.s32 {
    width: 32px;
    height: 32px;
}

.gl-icon.s48 {
    width: 48px;
    height: 48px;
}

:root {
    /* --- GitLab Neutral Palette --- */
    --color-neutral-0: #ffffff;
    --color-neutral-10: #fbfafd;
    --color-neutral-50: #ececef;
    --color-neutral-100: #dcdcde;
    --color-neutral-200: #bfbfc3;
    --color-neutral-300: #a4a3a8;
    --color-neutral-400: #89888d;
    --color-neutral-500: #737278;
    --color-neutral-600: #626168;
    --color-neutral-700: #4c4b51;
    --color-neutral-800: #3a383f;
    --color-neutral-900: #28272d;
    --color-neutral-950: #18171d;
    --color-neutral-1000: #050506;

    /* --- GitLab Primary Blue Palette --- */
    --color-blue-50: #e9f3fc;
    --color-blue-100: #cbe2f9;
    --color-blue-200: #9dc7f1;
    --color-blue-300: #63a6e9;
    --color-blue-400: #428fdc;
    --color-blue-500: #1f75cb;
    --color-blue-600: #2f68b4;
    --color-blue-700: #2f5ca0;
    --color-blue-800: #284779;
    --color-blue-900: #213454;
    --color-blue-950: #1d283e;

    /* --- GitLab Green / Success Palette --- */
    --color-green-50: #ecf4ee;
    --color-green-100: #c3e6cd;
    --color-green-200: #91d4a8;
    --color-green-300: #52b87a;
    --color-green-400: #2da160;
    --color-green-500: #108548;
    --color-green-600: #2f7549;
    --color-green-700: #306440;
    --color-green-800: #225131;
    --color-green-900: #1e3e28;

    /* --- GitLab Orange / Warning Palette --- */
    --color-orange-50: #fdf1dd;
    --color-orange-100: #f5d9a8;
    --color-orange-200: #e9be74;
    --color-orange-300: #d99530;
    --color-orange-400: #c17d10;
    --color-orange-500: #ab6100;
    --color-orange-600: #995715;
    --color-orange-700: #894b16;
    --color-orange-800: #693c14;
    --color-orange-900: #532e16;

    /* --- GitLab Red / Danger Palette --- */
    --color-red-50: #fcf1ef;
    --color-red-100: #fdd4cd;
    --color-red-200: #fcb5aa;
    --color-red-300: #f6806d;
    --color-red-400: #ec5941;
    --color-red-500: #dd2b0e;
    --color-red-600: #c02f12;
    --color-red-700: #a32c12;
    --color-red-800: #812713;
    --color-red-900: #582014;

    /* --- GitLab Purple / Tier Palette (Mapped to Primary Blue) --- */
    --color-purple-50: #e9f3fc;
    --color-purple-100: #cbe2f9;
    --color-purple-200: #9dc7f1;
    --color-purple-300: #63a6e9;
    --color-purple-400: #428fdc;
    --color-purple-500: #1f75cb;
    --color-purple-600: #2f68b4;
    --color-purple-700: #2f5ca0;
    --color-purple-800: #284779;
    --color-purple-900: #213454;

    /* --- GitLab Indigo Palette (Mapped to Primary Blue) --- */
    --color-theme-indigo-10: #f0f6fc;
    --color-theme-indigo-50: #e9f3fc;
    --color-theme-indigo-100: #cbe2f9;
    --color-theme-indigo-200: #9dc7f1;
    --color-theme-indigo-300: #63a6e9;
    --color-theme-indigo-400: #428fdc;
    --color-theme-indigo-500: #1f75cb;
    --color-theme-indigo-600: #2f68b4;
    --color-theme-indigo-700: #2f5ca0;

    /* --- Semantic Application Tokens --- */
    --bg-app: #f0f0f5;
    --bg-sidebar: #f0f0f5;
    --bg-topbar: #f0f0f5;
    --bg-card: #ffffff;
    --bg-card-hover: #fbfafd;
    --bg-subtle: #fbfafd;
    --bg-strong: #ececef;
    --bg-input: #ffffff;
    --bg-tertiary: #ececef;

    --border-color: #dcdcde;
    --border-subtle: #ececef;
    --border-strong: #bfbfc3;
    --border-focus: #1f75cb;
    --border-error: #c02f12;

    --text-main: #18171d;
    --text-primary: #18171d;
    --text-body: #3a383f;
    --text-muted: #626168;
    --text-dim: #89888d;
    --text-link: #1f75cb;

    --primary: #1f75cb;
    --primary-hover: #2f68b4;
    --primary-active: #2f5ca0;
    --primary-subtle: #e9f3fc;
    --primary-glow: rgba(31, 117, 203, 0.12);

    --accent-purple: #1f75cb;
    --accent-cyan: #3476b9;
    --accent-emerald: #108548;
    --accent-amber: #ab6100;
    --accent-orange: #ab6100;
    --accent-rose: #dd2b0e;

    --success: #108548;
    --warning: #ab6100;
    --danger: #dd2b0e;
    --info: #1f75cb;

    --radius-xs: 2px;
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-pill: 9999px;

    --shadow-sm: 0 1px 2px rgba(5, 5, 6, 0.05);
    --shadow-md: 0 2px 8px rgba(5, 5, 6, 0.08);
    --shadow-lg: 0 4px 16px rgba(5, 5, 6, 0.12);
}

/* ==========================================================================
   Base & Reset
   ========================================================================== */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    user-select: none;
    -webkit-user-select: none;
}

input,
textarea,
select,
[contenteditable="true"],
[contenteditable=""] {
    user-select: text;
    -webkit-user-select: text;
}

html {
    font-size: 1rem;
}

body {
    font-family: 'Titillium Web', sans-serif;
    background-color: var(--bg-app);
    color: var(--text-body);
    font-size: .875rem;
    line-height: 1.25rem;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--text-link);
    text-decoration: none;
    transition: color 0.15s ease, text-decoration 0.15s ease;
}

a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* ==========================================================================
   Layout Architecture
   ========================================================================== */

.app-layout {
    display: flex;
    flex-direction: column;
    height: 100vh;
    min-height: 100vh;
    max-height: 100vh;
    background-color: var(--bg-app);
    overflow: hidden;
}

.app-body {
    display: flex;
    flex: 1;
    min-height: 0;
    height: calc(100vh - 3rem);
    overflow: hidden;
}

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    background-color: var(--bg-app);
    padding: 0 .5rem .5rem 0;
    overflow: hidden;
    height: 100%;
}

.page-container {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    overflow-y: auto;
    align-items: center;
    width: 100%;
}

.page-breadcrumbs {
    padding: 12px 24px;
    border-bottom: 1px solid var(--border-subtle);
    background-color: #ffffff;
    flex-shrink: 0;
    z-index: 10;
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    position: sticky;
    top: 0;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--color-neutral-600);
}

.breadcrumb a {
    color: var(--color-neutral-600);
    text-decoration: none;
    border-radius: var(--radius-xs);
    padding: 2px 4px;
}

.breadcrumb a:hover {
    color: var(--color-blue-700);
    background-color: var(--color-neutral-50);
    text-decoration: none;
}

.breadcrumb .breadcrumb-separator,
.breadcrumb span {
    color: var(--color-neutral-400);
}

.breadcrumb .breadcrumb-current,
.breadcrumb span:last-child {
    color: var(--color-neutral-900);
    font-weight: 600;
}

.page-content {
    flex: 1;
    min-height: 0;
    max-width: 1280px;
    width: 100%;
    padding: 1.75rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ==========================================================================
   Topbar / Header (GitLab Style)
   ========================================================================== */

.topbar {
    height: 3rem;
    background-color: var(--bg-topbar);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 .5rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid transparent;

    .btn-sidebar-toggle {
        display: none;
    }
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex: 1;
}

.topbar-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    text-decoration: none;
    border-radius: 6px;
    transition: transform 0.25s ease;
}

.topbar-logo:hover {
    text-decoration: none;
}

.brand-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #ff1a1a 0%, #ff4d00 30%, #ff8c00 65%, #ffb700 85%, #ffd200 100%);
    background-size: 220% 220%;
    background-position: 0% 50%;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-weight: 900;
    font-size: 1.15rem;
    color: #ffffff;
    /*box-shadow: 0 2px 8px rgba(255, 69, 0, 0.42), 0 0 1px rgba(255, 140, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.35);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);*/
    line-height: 1;
    user-select: none;
    position: relative;
    overflow: hidden;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease, filter 0.25s ease;
}

.brand-icon::after {
    content: '';
    position: absolute;
    top: -60%;
    left: -60%;
    width: 220%;
    height: 220%;
    background: linear-gradient(
            45deg,
            transparent 35%,
            rgba(255, 255, 255, 0.4) 50%,
            transparent 65%
    );
    transform: rotate(25deg) translateY(-120%);
    transition: transform 0.65s ease;
    pointer-events: none;
}

/* Hover Animation for Fire Gradient, Glow & Shimmer with Zoom & Shadow Effect */
.brand-icon:hover,
.topbar-logo:hover .brand-icon,
.sidebar-mobile-brand:hover .brand-icon,
.auth-brand-link:hover .brand-icon,
.auth-brand-symbol:hover .brand-icon {
    animation: vanguarFireGradient 1.8s ease-in-out infinite alternate;
    /*transform: scale(1.1) translateY(-1px);*/
    /*box-shadow: 0 4px 18px rgba(255, 45, 0, 0.75), 0 0 24px rgba(255, 140, 0, 0.6), 0 0 8px rgba(255, 220, 0, 0.85), inset 0 1px 2px rgba(255, 255, 255, 0.6);*/
}

.brand-icon:hover::after,
.topbar-logo:hover .brand-icon::after,
.sidebar-mobile-brand:hover .brand-icon::after,
.auth-brand-link:hover .brand-icon::after,
.auth-brand-symbol:hover .brand-icon::after {
    transform: rotate(25deg) translateY(120%);
    transition: transform 0.75s ease-in-out;
}

@keyframes vanguarFireGradient {
    0% {
        background-position: 0% 50%;
        filter: brightness(1) drop-shadow(0 0 4px rgba(255, 69, 0, 0.4));
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 0 4px rgba(255, 255, 255, 0.6);
    }
    50% {
        background-position: 100% 50%;
        filter: brightness(1.12) drop-shadow(0 0 12px rgba(255, 120, 0, 0.7)) drop-shadow(0 0 4px rgba(255, 215, 0, 0.5));
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2), 0 0 10px rgba(255, 255, 255, 0.95), 0 0 18px rgba(255, 220, 50, 0.9);
    }
    100% {
        background-position: 0% 50%;
        filter: brightness(1) drop-shadow(0 0 4px rgba(255, 69, 0, 0.4));
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 0 4px rgba(255, 255, 255, 0.6);
    }
}

.brand-icon-md {
    width: 36px;
    height: 36px;
    font-size: 1.25rem;
    border-radius: 8px;
}

.brand-icon-lg {
    width: 56px;
    height: 56px;
    font-size: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(255, 69, 0, 0.45), 0 0 2px rgba(255, 140, 0, 0.6), inset 0 1.5px 2px rgba(255, 255, 255, 0.4);
}

.brand-icon-lg:hover,
.auth-brand-link:hover .brand-icon-lg {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 24px rgba(255, 45, 0, 0.8), 0 0 32px rgba(255, 140, 0, 0.6), 0 0 8px rgba(255, 220, 0, 0.85), inset 0 1.5px 3px rgba(255, 255, 255, 0.7);
}

.auth-brand .brand-icon {
    width: 34px;
    height: 34px;
    font-size: 1.2rem;
    border-radius: 8px;
}

.brand-name {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

.brand-tag {
    font-size: 0.65rem;
    text-transform: uppercase;
    background: rgba(31, 117, 203, 0.15);
    color: var(--color-blue-500);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.logo-tanuki {
    width: 24px;
    height: 24px;
    fill: #fc6d26;
    color: #fc6d26;
}

.topbar-center {
    flex: 1;
    max-width: 480px;
    margin: 0 auto;
}

.topbar-search {
    display: flex;
    align-items: center;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 4px 10px;
    height: 32px;
    gap: 8px;
    width: 100%;
    cursor: pointer;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.04);
    transition: all 0.15s ease;
    text-align: left;
    font-family: inherit;
}

.topbar-search:hover {
    border-color: var(--color-neutral-300);
    background-color: #ffffff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.topbar-search:focus-visible {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 2px var(--primary-glow);
}

.topbar-search .search-icon {
    color: var(--color-neutral-500);
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.topbar-search .search-placeholder-text {
    flex: 1;
    font-size: 0.8125rem;
    color: var(--color-neutral-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    user-select: none;
}

.topbar-search:hover .search-placeholder-text {
    color: var(--color-neutral-700);
}

.topbar-search .search-shortcut {
    background: var(--color-neutral-50);
    border: 1px solid var(--color-neutral-200);
    border-radius: 4px;
    padding: 1px 6px;
    font-size: 0.6875rem;
    font-family: inherit;
    color: var(--color-neutral-600);
    flex-shrink: 0;
    line-height: 1.2;
}

/* ==========================================================================
   Global Search Dialog / Modal (Pajamas UI Command Palette)
   ========================================================================== */

body.search-modal-open {
    overflow: hidden !important;
}

.search-modal-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(18, 17, 23, 0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 2000;
    align-items: flex-start;
    justify-content: center;
    padding: 10vh 1rem 2rem 1rem;
    animation: searchFadeIn 0.15s ease-out;
}

.search-modal-backdrop.active {
    display: flex;
}

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

.search-modal-dialog {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.22), 0 4px 14px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 640px;
    max-height: 72vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    outline: none;
    animation: searchScaleUp 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes searchScaleUp {
    from {
        transform: scale(0.96) translateY(-8px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.search-modal-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-subtle);
    gap: 10px;
    background: #ffffff;
}

.search-modal-search-icon {
    color: var(--color-neutral-500);
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.search-modal-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.9375rem;
    color: var(--text-main);
    font-family: inherit;
    min-width: 0;
}

.search-modal-input::placeholder {
    color: var(--color-neutral-400);
}

.search-modal-clear-btn {
    background: transparent;
    border: none;
    padding: 4px;
    border-radius: 4px;
    color: var(--color-neutral-500);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.12s ease;
}

.search-modal-clear-btn:hover {
    background-color: var(--color-neutral-100);
    color: var(--color-neutral-800);
}

.search-modal-esc-badge {
    background: var(--color-neutral-50);
    border: 1px solid var(--color-neutral-200);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.6875rem;
    font-family: inherit;
    color: var(--color-neutral-600);
    text-transform: uppercase;
    cursor: pointer;
    user-select: none;
    line-height: 1.2;
    transition: all 0.12s ease;
}

.search-modal-esc-badge:hover {
    background-color: var(--color-neutral-100);
    color: var(--color-neutral-900);
}

.search-modal-body {
    flex: 1;
    min-height: 120px;
    max-height: calc(72vh - 100px);
    overflow-y: auto;
    padding: 8px 0;
}

.search-modal-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 32px 16px;
    color: var(--color-neutral-500);
    font-size: 0.875rem;
}

.search-modal-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid var(--color-neutral-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: searchSpin 0.7s linear infinite;
}

@keyframes searchSpin {
    to {
        transform: rotate(360deg);
    }
}

.search-results-group {
    margin-bottom: 8px;
}

.search-results-group:last-child {
    margin-bottom: 0;
}

.search-group-title {
    padding: 6px 16px 4px 16px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-neutral-500);
}

.search-results-list {
    display: flex;
    flex-direction: column;
    padding: 0 8px;
    gap: 2px;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-main);
    transition: background-color 0.1s ease, color 0.1s ease;
    cursor: pointer;
}

.search-result-item:hover,
.search-result-item.active {
    background-color: var(--color-blue-50);
    text-decoration: none;
    color: var(--text-main);
}

.search-result-item:hover .search-item-icon-box,
.search-result-item.active .search-item-icon-box {
    background-color: var(--color-blue-100);
    color: var(--primary);
}

.search-result-item:hover .search-item-enter-icon,
.search-result-item.active .search-item-enter-icon {
    opacity: 1;
    transform: translateX(0);
}

.search-item-icon-box {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background-color: var(--color-neutral-100);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-neutral-700);
    flex-shrink: 0;
    transition: all 0.12s ease;
    overflow: hidden;
}

.search-item-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.search-item-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.search-item-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-main);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-item-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-item-badge {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.6875rem;
    font-weight: 600;
    background-color: var(--color-neutral-100);
    color: var(--color-neutral-700);
    border: 1px solid var(--color-neutral-200);
    flex-shrink: 0;
    text-transform: uppercase;
}

.search-item-enter-icon {
    color: var(--primary);
    opacity: 0;
    transform: translateX(-4px);
    transition: all 0.12s ease;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.search-modal-empty {
    padding: 36px 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.search-empty-icon {
    color: var(--color-neutral-400);
    margin-bottom: 12px;
}

.search-empty-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 6px;
}

.search-empty-desc {
    font-size: 0.8125rem;
    color: var(--text-muted);
    max-width: 380px;
    line-height: 1.4;
}

.search-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    border-top: 1px solid var(--border-subtle);
    background-color: var(--color-neutral-10);
    font-size: 0.75rem;
    color: var(--color-neutral-500);
}

.search-modal-footer-hints {
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-footer-hint {
    display: flex;
    align-items: center;
    gap: 4px;
}

.search-footer-hint kbd {
    background: #ffffff;
    border: 1px solid var(--color-neutral-200);
    border-radius: 3px;
    padding: 1px 4px;
    font-size: 0.6875rem;
    color: var(--color-neutral-700);
}

.search-modal-footer-count {
    color: var(--color-neutral-500);
    font-size: 0.75rem;
}

.topbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .5rem;
    flex: 1;
}

.btn-topbar-icon {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 4px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-neutral-700);
    cursor: pointer;
    transition: all 0.15s ease;
}

.btn-topbar-icon:hover {
    background-color: var(--color-neutral-100);
    color: var(--color-neutral-900);
}

.topbar-counter-btn {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    height: 32px;
    border-radius: 4px;
    color: var(--color-neutral-700);
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: all 0.15s ease;
}

.topbar-counter-btn:hover {
    background-color: var(--color-neutral-100);
    color: var(--color-neutral-900);
    text-decoration: none;
}

.counter-count {
    font-size: 0.8125rem;
    font-weight: 600;
}

.btn-admin {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    height: 32px;
    border-radius: 4px;
    color: var(--color-neutral-700);
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s ease;
}

.btn-admin:hover {
    background-color: var(--color-neutral-100);
    color: var(--color-neutral-900);
    text-decoration: none;
}

.user-avatar-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border-color);
    background: none;
    padding: 0;
    cursor: pointer;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-avatar-btn .avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Dropdowns in Topbar */
.topbar-dropdown {
    position: relative;
    display: inline-block;
}

.topbar-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    min-width: 220px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    overflow: hidden;
}

.topbar-dropdown-menu.dropdown-right {
    left: auto;
    right: 0;
}

.topbar-dropdown.open .topbar-dropdown-menu {
    display: block;
    animation: dropdownFadeIn 0.12s ease-out;
}

.topbar-dropdown-user-header {
    padding: 10px 14px;
    background: var(--color-neutral-10);
    border-bottom: 1px solid var(--border-subtle);
}

.user-header-name {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--color-neutral-900);
}

.user-header-handle {
    font-size: 0.75rem;
    color: var(--color-neutral-500);
}

.user-header-status {
    font-size: 0.75rem;
    color: var(--color-neutral-600);
    margin-top: 4px;
    font-style: italic;
}

.topbar-dropdown-divider {
    height: 1px;
    background-color: var(--border-subtle);
    margin: 4px 0;
}

.topbar-dropdown-header {
    padding: 6px 12px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-neutral-500);
    letter-spacing: 0.04em;
}

.topbar-dropdown-list {
    padding: .25rem;
    display: flex;
    flex-direction: column;
}

.topbar-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    color: var(--color-neutral-800);
    text-decoration: none;
    font-size: 0.8125rem;
    transition: background-color 0.1s ease, color 0.1s ease, box-shadow 0.1s ease;
    border: none;
    background: transparent;
    cursor: pointer;
    outline: none;
    width: 100%;
    text-align: left;
    box-sizing: border-box;
}

.topbar-dropdown-item:hover {
    background-color: var(--color-neutral-50);
    color: var(--color-neutral-950);
    text-decoration: none;
}

.topbar-dropdown-item:focus,
.topbar-dropdown-item:focus-visible {
    outline: none;
    background-color: var(--color-neutral-50);
    color: var(--color-neutral-950);
    box-shadow: inset 0 0 0 2px var(--color-blue-500) !important;
}

.topbar-dropdown-item:active {
    box-shadow: inset 0 0 0 2px var(--color-blue-500) !important;
}

.topbar-dropdown-item.active {
    background-color: var(--color-blue-50);
    color: var(--color-blue-700);
    font-weight: 600;
}

.topbar-dropdown-item.text-danger {
    color: var(--color-red-600);
}

.topbar-dropdown-item.text-danger:hover {
    background-color: var(--color-red-50);
    color: var(--color-red-700);
}

.topbar-dropdown-item.text-danger:focus,
.topbar-dropdown-item.text-danger:focus-visible {
    background-color: var(--color-red-50);
    color: var(--color-red-700);
    box-shadow: inset 0 0 0 2px var(--color-red-500) !important;
}

.item-badge {
    margin-left: auto;
    color: var(--color-green-500);
}

/* ==========================================================================
   Sidebar Navigation (GitLab Style)
   ========================================================================== */

.sidebar-backdrop {
    display: none;
    position: fixed;
    top: 3rem;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 17, 23, 0.45);
    backdrop-filter: blur(2px);
    z-index: 1050;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.sidebar-mobile-header {
    display: none;
}

.sidebar-mobile-brand {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-mobile-brand .brand-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-neutral-900);
}

.btn-sidebar-close {
    background: transparent;
    border: none;
    padding: 4px;
    color: var(--color-neutral-600);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.btn-sidebar-close:hover {
    background-color: var(--color-neutral-100);
    color: var(--color-neutral-900);
}

.sidebar {
    width: 15rem;
    background-color: var(--bg-sidebar);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    position: sticky;
    top: 3rem;
    height: calc(100vh - 3rem);
    padding: .5rem;
    transition: width 0.2s ease, padding 0.2s ease;
}

.sidebar.collapsed {
    width: 3.5rem;
}

.sidebar.collapsed .sidebar-title,
.sidebar.collapsed .nav-text,
.sidebar.collapsed .org-switcher-info,
.sidebar.collapsed .org-switcher-chevron,
.sidebar.collapsed .nav-section-title,
.sidebar.collapsed .sidebar-project-info,
.sidebar.collapsed .nav-badge,
.sidebar.collapsed .sidebar-back-link .nav-text,
.sidebar.collapsed .sidebar-footer-item .nav-text {
    display: none;
}

.sidebar.collapsed .nav-item,
.sidebar.collapsed .sidebar-footer-item {
    justify-content: center;
    padding: 8px 0;
}

.sidebar.collapsed .sidebar-back-link {
    justify-content: center;
    padding: 6px 0;
}

.sidebar.collapsed .sidebar-project-card {
    justify-content: center;
    padding: 4px 0;
    border-color: transparent;
    background: transparent;
}

.sidebar.collapsed .sidebar-org-switcher {
    margin: 4px 2px 8px 2px;
}

.sidebar.collapsed .sidebar-org-switcher-btn {
    justify-content: center;
    padding: 6px;
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

.sidebar.collapsed .sidebar-org-switcher-btn:hover {
    border-color: var(--color-neutral-600);
    background-color: #ffffff;
}

.sidebar.collapsed .sidebar-org-switcher-btn:focus,
.sidebar.collapsed .sidebar-org-switcher-btn:active,
.sidebar.collapsed .sidebar-org-switcher.open .sidebar-org-switcher-btn {
    outline: none;
    border-color: var(--color-blue-500);
    box-shadow: 0 0 0 1px #ffffff, 0 0 0 3px var(--color-blue-500);
    background-color: #ffffff;
}

/* Sidebar Organization Switcher */
.sidebar-org-switcher {
    position: relative;
    margin: 0 0 8px 0;
}

.sidebar-org-switcher-btn {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0.5rem 0.625rem;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    font-family: inherit;
}

.sidebar-org-switcher-btn:hover {
    border-color: var(--color-neutral-600);
}

.sidebar-org-switcher-btn:focus,
.sidebar-org-switcher-btn:active,
.sidebar-org-switcher.open .sidebar-org-switcher-btn {
    outline: none;
    border-color: var(--color-blue-500);
    box-shadow: 0 0 0 1px #ffffff, 0 0 0 3px var(--color-blue-500);
    background-color: #ffffff;
}

.org-switcher-avatar {
    width: 28px;
    height: 28px;
    border-radius: .25rem;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.8125rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1;
    overflow: hidden;
    border: 1px solid;
}

.org-switcher-img,
.org-item-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background: #ffffff;
    border-radius: inherit;
}

.org-switcher-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.org-switcher-badge-row {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.625rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--color-blue-600);
    letter-spacing: 0.05em;
    line-height: 1.1;
}

.org-switcher-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--color-blue-500);
    box-shadow: 0 0 0 2px rgba(31, 117, 203, 0.2);
}

.org-switcher-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-neutral-900);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.org-switcher-chevron {
    color: var(--color-neutral-500);
    transition: transform 0.2s ease;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.sidebar-org-switcher.open .org-switcher-chevron {
    transform: rotate(180deg);
    color: var(--color-blue-500);
}

.sidebar-org-dropdown-menu {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    width: 100%;
    min-width: 230px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    display: none;
    overflow: hidden;
}

.sidebar.collapsed .sidebar-org-dropdown-menu {
    top: 0;
    left: calc(100% + 8px);
    width: max-content;
    min-width: 240px;
}

.sidebar-org-switcher.open .sidebar-org-dropdown-menu {
    display: block;
    animation: dropdownFadeIn 0.12s ease-out;
}

.org-dropdown-list {
    max-height: 220px;
    overflow-y: auto;
}

.org-item-avatar {
    width: 22px;
    height: 22px;
    border-radius: 4px;
    background: var(--color-blue-50);
    color: var(--color-blue-600);
    font-size: 0.6875rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    border: 1px solid var(--color-blue-100);
}

.topbar-dropdown-item.active .org-item-avatar,
.org-dropdown-item.active .org-item-avatar {
    background: linear-gradient(135deg, var(--color-blue-400), var(--color-blue-600));
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(31, 117, 203, 0.25);
    border-color: transparent;
}

.org-item-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.org-item-name {
    font-size: 0.8125rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
}

.org-item-slug {
    font-size: 0.6875rem;
    color: var(--text-muted);
}

.topbar-dropdown-item.active .org-item-slug,
.org-dropdown-item.active .org-item-slug {
    color: var(--color-blue-500);
}

.org-item-check {
    color: var(--color-blue-500);
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.org-dropdown-divider {
    height: 1px;
    background-color: var(--border-subtle);
    margin: 4px 0;
}

.org-dropdown-actions {
    padding: 4px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Dynamic Project Context Navigation in Sidebar */
.sidebar-project-header-container {
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sidebar-back-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    border-radius: var(--radius-sm, 4px);
    color: var(--color-neutral-700, #4c4b51);
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 600;
    background-color: transparent;
    border: 1px solid var(--border-color, #e1e1e4);
    transition: all 0.15s ease;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-back-link:hover {
    background-color: var(--color-neutral-100, #ececef);
    color: var(--color-blue-600, #1f75cb);
    border-color: var(--color-blue-200, #9dc7f1);
    text-decoration: none;
}

.sidebar-back-link .nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: inherit;
}

.sidebar-project-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    background-color: #ffffff;
    border: 1px solid var(--border-color, #e1e1e4);
    border-radius: var(--radius-sm, 4px);
    overflow: hidden;
}

.sidebar-project-avatar {
    width: 28px;
    height: 28px;
    min-width: 28px;
    background: linear-gradient(135deg, var(--color-blue-500, #1f75cb), var(--color-blue-700, #104f96));
    color: #ffffff;
    font-weight: 700;
    font-size: 0.8125rem;
    border-radius: var(--radius-sm, 4px);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1;
}

.sidebar-project-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

.sidebar-project-title {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--text-primary, #28272d);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
}

.sidebar-project-meta {
    display: flex;
    align-items: center;
    font-size: 0.6875rem;
    color: var(--text-muted, #737278);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-project-org {
    color: var(--text-muted, #737278);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar .nav-badge {
    margin-left: auto;
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.125rem 0.375rem;
    background-color: var(--color-neutral-100, #ececef);
    color: var(--color-neutral-700, #4c4b51);
    border-radius: 9999px;
    line-height: 1;
}

.sidebar .nav-item.active .nav-badge {
    background-color: rgba(255, 255, 255, 0.7);
    color: #18171d;
}

.nav-section-title {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-neutral-500);
    padding: 10px 10px 4px 10px;
    letter-spacing: 0.04em;
}

.sidebar-header {
    padding: 6px 10px 10px 10px;
}

.sidebar-title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--color-neutral-900);
}

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

.sidebar .nav-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .25rem .5rem;
    border-radius: .25rem;
    color: var(--color-neutral-700);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s ease;
    min-height: 2rem;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar .nav-item:hover {
    background-color: var(--color-neutral-100);
    color: var(--color-neutral-950);
    text-decoration: none;
}

.sidebar .nav-item.active {
    background-color: #dcdcde;
    color: #18171d;
    font-weight: 600;
}

.sidebar .nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--border-subtle);
}

.sidebar-footer-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 10px;
    border-radius: .25rem;
    color: var(--color-neutral-700);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    background: transparent;
    border: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
    transition: all 0.15s ease;
}

.sidebar-footer-item:hover {
    background-color: var(--color-neutral-100);
    color: var(--color-neutral-950);
    text-decoration: none;
}

/* ==========================================================================
   Dashboard Components (Greeting, Stats, Cards, Activity, Quick Access)
   ========================================================================== */

/* User Greeting Row */
.user-greeting-row {
    display: flex;
    align-items: center;
    gap: 18px;
}

.greeting-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 2px solid #28272d;
    overflow: hidden;
    flex-shrink: 0;
}

.greeting-avatar .avatar-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.greeting-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.greeting-username {
    font-size: 0.8125rem;
    color: var(--color-neutral-600);
    font-weight: 500;
}

.greeting-headline {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-neutral-900);
    margin: 0;
    letter-spacing: -0.02em;
}

/* 4 Metrics Stats Grid */
.overview-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

@media (max-width: 1200px) {
    .overview-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.metric-card {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 110px;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    overflow: hidden;
}

.metric-card:hover {
    border-color: var(--color-neutral-300);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.metric-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    min-width: 0;
}

.metric-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-neutral-800);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.metric-icon {
    color: var(--color-neutral-500);
    display: flex;
    align-items: center;
}

.metric-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-neutral-950);
    line-height: 1;
    margin: 8px 0;
}

.metric-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    font-size: 0.75rem;
    line-height: 1rem;
    min-width: 0;
    overflow: hidden;
}

.metric-subtext {
    color: var(--color-neutral-600);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

.metric-time {
    color: var(--color-neutral-400);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-shrink: 0;
}

/* 2 Columns Grid */
.dashboard-columns-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

@media (max-width: 1100px) {
    .dashboard-columns-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.dashboard-col-left {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
    width: 100%;
    max-width: 100%;
}

.dashboard-col-right {
    display: flex;
    flex-direction: column;
    gap: 24px;
    min-width: 0;
    width: 100%;
    max-width: 100%;
}

.content-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;

    .content-card-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 14px 18px;
        /*border-bottom: 1px solid var(--border-subtle);*/

        .content-card-title {
            font-size: 0.9375rem;
            font-weight: 700;
            color: var(--color-neutral-900);
            margin: 0;
        }
    }

    .content-card-body {
        padding: 20px;
    }
}

.btn-filter-dropdown {
    background: transparent;
    border: none;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-neutral-700);
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
}

.btn-filter-dropdown:hover {
    background-color: var(--color-neutral-50);
    color: var(--color-neutral-900);
}

/* Attention Body */
.attention-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 36px 20px;
    text-align: center;
}

.attention-list-body {
    padding: 14px 18px;
}

.attention-items-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.attention-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
    transition: all 0.15s ease;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.attention-item:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
}

.attention-item-icon-box {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.attention-item-icon-box.icon-danger {
    background-color: #fee2e2;
    color: #dc2626;
}

.attention-item-icon-box.icon-warning {
    background-color: #fef3c7;
    color: #d97706;
}

.attention-item-icon-box.icon-info {
    background-color: #e0f2fe;
    color: #0284c7;
}

.attention-item-details {
    flex: 1;
    min-width: 0;
}

.attention-item-title {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-neutral-900);
    line-height: 1.3;
}

.attention-item-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
    line-height: 1.2;
}

.btn-attention-action {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.btn-attention-action:hover {
    text-decoration: none;
    transform: translateX(1px);
}

.btn-warning-light {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.btn-warning-light:hover {
    background: #fef3c7;
    color: #92400e;
}

.btn-danger-light {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.btn-danger-light:hover {
    background: #fee2e2;
    color: #991b1b;
}

.btn-info-light {
    background: #f0f9ff;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

.btn-info-light:hover {
    background: #e0f2fe;
    color: #075985;
}

.metric-card-link {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.metric-card-link:hover {
    text-decoration: none;
    border-color: #cbd5e1;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.04);
}

.quick-access-badge {
    margin-left: auto;
    font-size: 0.65rem;
    padding: 1px 6px;
    border-radius: 4px;
    flex-shrink: 0;
}

.empty-quick-access {
    padding: 24px 16px;
    text-align: center;
    font-size: 0.8125rem;
    color: var(--text-muted);
}

.dot-badge-purple {
    background-color: #1f75cb !important;
}

.dot-badge-blue {
    background-color: #2563eb !important;
}

.dot-badge-success {
    background-color: #108548 !important;
}

.dot-badge-warning {
    background-color: #d97706 !important;
}

.dot-badge-danger {
    background-color: #dc2626 !important;
}

.dot-badge-teal {
    background-color: #0d9488 !important;
}

.dot-badge-neutral {
    background-color: #64748b !important;
}

.activity-meta-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.activity-meta-sep {
    color: var(--color-neutral-400);
}

.attention-check-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid #2da160;
    background-color: #ecf4ee;
    color: #108548;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.attention-message {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-neutral-900);
    margin-bottom: 8px;
}

.attention-link {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--color-blue-600);
    text-decoration: none;
}

.attention-link:hover {
    text-decoration: underline;
    color: var(--color-blue-800);
}

/* Activity Feed */
.activity-timeline {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.activity-item {
    display: flex;
    gap: 12px;
    position: relative;
    min-width: 0;
    max-width: 100%;
}

.activity-marker {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 12px;
}

.activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--color-neutral-400);
    margin-top: 6px;
}

.activity-line {
    flex: 1;
    width: 2px;
    background-color: var(--border-subtle);
    margin-top: 4px;
}

.activity-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
    overflow: hidden;
}

.activity-title-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.875rem;
    min-width: 0;
}

.activity-action {
    color: var(--color-neutral-800);
    min-width: 0;
    overflow-wrap: break-word;
    word-break: break-word;
}

.activity-action .text-bold {
    font-weight: 600;
    color: var(--color-neutral-900);
}

.activity-action .text-link {
    color: var(--color-blue-600);
    text-decoration: none;
}

.activity-action .text-link:hover {
    text-decoration: underline;
}

.activity-time {
    font-size: 0.75rem;
    color: var(--color-neutral-400);
    white-space: nowrap;
}

.activity-commits {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.8125rem;
}

.commit-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.commit-sha {
    background-color: var(--color-neutral-50);
    border: 1px solid var(--color-neutral-100);
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
    font-size: 0.75rem;
    padding: 1px 6px;
    border-radius: 4px;
    color: var(--color-neutral-800);
}

.commit-sep {
    color: var(--color-neutral-400);
}

.commit-msg {
    color: var(--color-neutral-700);
}

.commit-subrow {
    font-size: 0.8125rem;
    color: var(--color-neutral-600);
    margin-top: 2px;
}

.commit-subrow a {
    color: var(--color-blue-600);
    text-decoration: none;
}

.commit-subrow a:hover {
    text-decoration: underline;
}

/* Quick Access */
.quick-access-card {
    height: fit-content;
}

.quick-access-header {
    padding: 14px 18px 10px 18px;
    border-bottom: none;
}

.btn-icon-plain {
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--color-neutral-600);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border-radius: 4px;
}

.btn-icon-plain:hover {
    background-color: var(--color-neutral-50);
    color: var(--color-neutral-900);
}

.quick-access-tabs-row {
    padding: 0 18px 12px 18px;
    border-bottom: 1px solid var(--border-subtle);
}

.segmented-control {
    display: flex;
    width: 100%;
    background-color: #ececef;
    border-radius: 6px;
    padding: 2px;
    gap: 2px;
    box-sizing: border-box;
    overflow-x: auto;
}

.segmented-btn {
    flex: 1;
    background: transparent;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-neutral-700);
    cursor: pointer;
    transition: all 0.15s ease;
    white-space: nowrap;
    text-align: center;
}

.segmented-btn.active {
    background-color: #ffffff;
    color: var(--color-neutral-950);
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.quick-access-body {
    padding: 8px 12px 14px 12px;
}

.quick-access-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.quick-project-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 6px;
    text-decoration: none;
    transition: background-color 0.15s ease;
}

.quick-project-item:hover {
    background-color: var(--color-neutral-50);
    text-decoration: none;
}

.project-badge {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: #ffffff;
    flex-shrink: 0;
}

.badge-blue {
    background-color: #1f75cb;
}

.badge-purple {
    background-color: #1f75cb;
}

.badge-teal {
    background-color: #108548;
}

.badge-orange {
    background-color: #ab6100;
}

.badge-red {
    background-color: #dd2b0e;
}

.project-details {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.project-name {
    font-weight: 600;
    color: var(--color-neutral-900);
}

.project-sep {
    color: var(--color-neutral-400);
}

.project-path {
    color: var(--color-neutral-600);
}

.quick-access-footer {
    margin-top: 14px;
    padding: 8px 10px 0 10px;
    border-top: 1px solid var(--border-subtle);
    font-size: 0.75rem;
    color: var(--color-neutral-500);
}

/* ==========================================================================
   Organization Switcher (GitLab Dropdown Style)
   ========================================================================== */

.org-switcher {
    position: relative;
    display: inline-block;
}

.org-switcher-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 10px;
    background: var(--color-neutral-0);
    border: 1px solid var(--color-neutral-200);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
    font-size: 0.8125rem;
}

.org-switcher-btn:hover {
    background: var(--color-neutral-50);
    border-color: var(--color-neutral-400);
}

.org-switcher-btn:focus,
.org-switcher-btn:focus-visible,
.org-switcher-btn:active {
    outline: none;
    box-shadow: 0 0 0 1px var(--color-neutral-0), 0 0 0 3px var(--color-blue-500);
}

.org-switcher-icon {
    font-size: 1rem;
}

.org-switcher-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.org-switcher-label {
    font-size: 0.625rem;
    text-transform: uppercase;
    color: var(--color-neutral-500);
    font-weight: 700;
    line-height: 1;
}

.org-switcher-name {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.2;
}

.org-switcher-arrow {
    font-size: 0.75rem;
    color: var(--color-neutral-500);
    margin-left: 2px;
}

.org-switcher-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 280px;
    max-width: 340px;
    background: var(--color-neutral-0);
    border: 1px solid var(--color-neutral-200);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    overflow: hidden;
}

.org-switcher.open .org-switcher-menu {
    display: block;
    animation: dropdownFadeIn 0.12s ease-out;
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.org-switcher-header {
    padding: 8px 12px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-neutral-500);
    border-bottom: 1px solid var(--border-color);
    background: var(--color-neutral-10);
    letter-spacing: 0.04em;
}

.org-switcher-list {
    max-height: 240px;
    overflow-y: auto;
    padding: 4px;
}

.org-switcher-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    text-decoration: none;
    color: var(--color-neutral-800);
    border-radius: var(--radius-sm);
    transition: background-color 0.1s ease, color 0.1s ease, box-shadow 0.1s ease;
    line-height: 1rem;
    outline: none;
    border: none;
    background: transparent;
    width: 100%;
    text-align: left;
    box-sizing: border-box;
}

.org-switcher-item:hover {
    background: var(--color-neutral-50);
    color: var(--color-neutral-950);
    text-decoration: none;
}

.org-switcher-item:focus,
.org-switcher-item:focus-visible {
    outline: none;
    background: var(--color-neutral-50);
    color: var(--color-neutral-950);
    box-shadow: inset 0 0 0 2px var(--color-blue-500) !important;
}

.org-switcher-item:active {
    box-shadow: inset 0 0 0 2px var(--color-blue-500) !important;
}

.org-switcher-item.active {
    background: var(--color-blue-50);
    color: var(--color-blue-700);
}

.org-item-avatar {
    width: 2rem;
    height: 2rem;
    border-radius: var(--radius-sm);
    background: var(--color-blue-100);
    color: var(--color-blue-700);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    flex-shrink: 0;
}

.org-item-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.org-item-name {
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.org-item-slug {
    font-size: 0.6875rem;
    color: var(--color-neutral-500);
}

.org-item-check {
    font-size: 0.875rem;
    color: var(--color-green-500);
    font-weight: 700;
}

.org-switcher-footer {
    border-top: 1px solid var(--border-color);
    padding: 4px;
    background: var(--color-neutral-10);
}

.org-switcher-action {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 8px;
    font-size: 0.775rem;
    color: var(--color-blue-700);
    text-decoration: none;
    font-weight: 600;
    border-radius: var(--radius-sm);
    transition: background-color 0.1s ease, color 0.1s ease, box-shadow 0.1s ease;
    outline: none;
    border: none;
    background: transparent;
    cursor: pointer;
    width: 100%;
    text-align: left;
    box-sizing: border-box;
}

.org-switcher-action:hover {
    background: var(--color-blue-50);
    color: var(--color-blue-800);
    text-decoration: none;
}

.org-switcher-action:focus,
.org-switcher-action:focus-visible {
    outline: none;
    background: var(--color-blue-50);
    color: var(--color-blue-800);
    box-shadow: inset 0 0 0 2px var(--color-blue-500) !important;
}

.org-switcher-action:active {
    box-shadow: inset 0 0 0 2px var(--color-blue-500) !important;
}

/* ==========================================================================
   Page Headers & Typography (GitLab Scales)
   ========================================================================== */

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    gap: 1rem;
    flex-wrap: wrap;

    .actions,
    .page-actions,
    .page-header-actions {
        display: flex;
        align-items: center;
        gap: .5rem;
        flex-wrap: wrap;
    }
}

.page-title-group {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    min-width: 0;
}

.header-identity,
.page-header-identity,
.project-header-identity,
.org-header-identity,
.user-header-identity {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-identity > div:last-child,
.page-header-identity > div:last-child,
.project-header-identity > div:last-child,
.org-header-identity > div:last-child,
.user-header-identity > div:last-child {
    min-width: 0;
}

.page-title,
.page-title-group h1 {
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--color-neutral-950);
    line-height: 1.25;
    margin: 0;
}

.page-visibility-icon {
    display: inline-flex;
    align-items: center;
    color: var(--color-neutral-500);
    margin-left: 4px;
    vertical-align: middle;
}

.org-avatar-box,
.project-avatar-box {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    font-weight: 700;
    flex-shrink: 0;
    user-select: none;
    text-transform: uppercase;
}

.org-avatar-box {
    background-color: #fae8e5;
    color: #a32c12;
    border: 1px solid rgba(221, 43, 14, 0.2);
}

.project-avatar-box {
    background-color: var(--color-blue-50);
    color: var(--color-blue-700);
    border: 1px solid var(--color-blue-200);
}

.page-subtitle,
.page-description {
    color: var(--color-neutral-600);
    font-size: 0.875rem;
    line-height: 1.25rem;
    margin-top: 2px;
    display: flex;
    gap: .25rem;
    align-items: center;
}

/* Generic & Header Dropdown Menus */
.dropdown,
.page-header-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu,
.page-header-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    min-width: 190px;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    padding: 4px;
    box-sizing: border-box;
}

.dropdown-menu.dropdown-left,
.page-header-dropdown-menu.dropdown-left {
    left: 0;
    right: auto;
}

.dropdown.open > .dropdown-menu,
.page-header-dropdown.open > .page-header-dropdown-menu,
.dropdown.open > .page-header-dropdown-menu {
    display: block;
    animation: dropdownFadeIn 0.12s ease-out;
}

.dropdown-header {
    padding: 6px 10px;
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-neutral-500);
    letter-spacing: 0.04em;
}

.dropdown-list {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    color: var(--color-neutral-800);
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 400;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    box-sizing: border-box;
    line-height: 1.25;
    transition: background-color 0.1s ease, color 0.1s ease, box-shadow 0.1s ease;
    outline: none;
}

.dropdown-item:hover {
    background-color: var(--color-neutral-50);
    color: var(--color-neutral-950);
    text-decoration: none;
}

.dropdown-item:focus,
.dropdown-item:focus-visible {
    outline: none;
    background-color: var(--color-neutral-50);
    color: var(--color-neutral-950);
    box-shadow: inset 0 0 0 2px var(--color-blue-500) !important;
}

.dropdown-item:active {
    box-shadow: inset 0 0 0 2px var(--color-blue-500) !important;
}

.dropdown-item.active {
    background-color: var(--color-blue-50);
    color: var(--color-blue-700);
    font-weight: 600;
}

.dropdown-item.text-danger {
    color: var(--color-red-600);
}

.dropdown-item.text-danger:hover {
    background-color: var(--color-red-50);
    color: var(--color-red-700);
}

.dropdown-item.text-danger:focus,
.dropdown-item.text-danger:focus-visible {
    background-color: var(--color-red-50);
    color: var(--color-red-700);
    box-shadow: inset 0 0 0 2px var(--color-red-500) !important;
}

.dropdown-item.text-primary {
    color: var(--color-blue-600);
}

.dropdown-item.text-primary:hover {
    background-color: var(--color-blue-50);
    color: var(--color-blue-700);
}

.dropdown-item.text-primary:focus,
.dropdown-item.text-primary:focus-visible {
    background-color: var(--color-blue-50);
    color: var(--color-blue-700);
    box-shadow: inset 0 0 0 2px var(--color-blue-500) !important;
}

/* Dropdown Menu Inset Outline - Inside Outlines for All Dropdown Items & Controls */
.dropdown-menu :is(.dropdown-item, button, a):focus,
.dropdown-menu :is(.dropdown-item, button, a):focus-visible,
.page-header-dropdown-menu :is(.dropdown-item, button, a):focus,
.page-header-dropdown-menu :is(.dropdown-item, button, a):focus-visible,
.topbar-dropdown-menu :is(.topbar-dropdown-item, .dropdown-item, button, a):focus,
.topbar-dropdown-menu :is(.topbar-dropdown-item, .dropdown-item, button, a):focus-visible,
.sidebar-org-dropdown-menu :is(.topbar-dropdown-item, .dropdown-item, button, a):focus,
.sidebar-org-dropdown-menu :is(.topbar-dropdown-item, .dropdown-item, button, a):focus-visible,
.org-switcher-menu :is(.org-switcher-item, .org-switcher-action, button, a):focus,
.org-switcher-menu :is(.org-switcher-item, .org-switcher-action, button, a):focus-visible,
.dropdown-list :is(.dropdown-item, button, a):focus,
.dropdown-list :is(.dropdown-item, button, a):focus-visible,
.topbar-dropdown-list :is(.topbar-dropdown-item, button, a):focus,
.topbar-dropdown-list :is(.topbar-dropdown-item, button, a):focus-visible {
    outline: none !important;
    box-shadow: inset 0 0 0 2px var(--color-blue-500) !important;
}

.dropdown-menu :is(.dropdown-item.text-danger, button.text-danger, a.text-danger):focus,
.dropdown-menu :is(.dropdown-item.text-danger, button.text-danger, a.text-danger):focus-visible,
.page-header-dropdown-menu :is(.dropdown-item.text-danger, button.text-danger, a.text-danger):focus,
.page-header-dropdown-menu :is(.dropdown-item.text-danger, button.text-danger, a.text-danger):focus-visible,
.topbar-dropdown-menu :is(.topbar-dropdown-item.text-danger, button.text-danger, a.text-danger):focus,
.topbar-dropdown-menu :is(.topbar-dropdown-item.text-danger, button.text-danger, a.text-danger):focus-visible {
    box-shadow: inset 0 0 0 2px var(--color-red-500) !important;
}

.dropdown-divider {
    height: 1px;
    background-color: var(--border-subtle);
    margin: 4px 0;
}

.dropdown-form {
    margin: 0;
    padding: 0;
    width: 100%;
}

.dropdown-chevron {
    display: inline-flex;
    align-items: center;
    color: var(--color-neutral-500);
    margin-left: 2px;
}

/* Toast & Copy Notification Toast */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast,
.copy-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--color-neutral-900);
    color: #ffffff;
    padding: 10px 16px;
    border-radius: var(--radius-sm, 6px);
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.4;
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    pointer-events: none;
    max-width: 24rem;
}

.toast-container .toast,
.toast-container .copy-toast {
    position: static;
    bottom: auto;
    right: auto;
}

.toast.show,
.toast.active,
.copy-toast.show,
.copy-toast.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.toast-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.toast-body,
.toast-message {
    flex: 1;
    min-width: 0;
}

.toast-title {
    font-weight: 600;
    margin-bottom: 2px;
}

.toast-close {
    background: transparent;
    border: none;
    color: inherit;
    opacity: 0.7;
    cursor: pointer;
    padding: 0;
    margin-left: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.toast-close:hover {
    opacity: 1;
}

.toast-success {
    background: var(--color-green-800, #166534);
    color: #ffffff;
}

.toast-danger,
.toast-error {
    background: var(--color-red-800, #991b1b);
    color: #ffffff;
}

.toast-warning {
    background: var(--color-orange-800, #9a3412);
    color: #ffffff;
}

.toast-info {
    background: var(--color-blue-800, #1e40af);
    color: #ffffff;
}

/* ==========================================================================
   Cards & Content Containers
   ========================================================================== */

.card {
    background-color: var(--color-neutral-0);
    border: 1px solid var(--color-neutral-100);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
    position: relative;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--color-neutral-100);
    background-color: var(--color-neutral-0);
    border-top-left-radius: calc(var(--radius-sm) - 1px);
    border-top-right-radius: calc(var(--radius-sm) - 1px);
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-neutral-950);
    line-height: 1.25;
    display: flex;
    align-items: center;
    gap: .5rem;
}

.card-subtitle {
    font-size: 0.8125rem;
    color: var(--color-neutral-600);
    margin-top: 2px;
}

.card-body,
.card > div:not(.card-header):not(.card-footer):not(.table-container) {
    padding: 1rem;
    color: var(--color-neutral-800);
}

.card-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--color-neutral-100);
    background-color: var(--color-neutral-10);
    color: var(--color-neutral-700);
    border-bottom-left-radius: calc(var(--radius-sm) - 1px);
    border-bottom-right-radius: calc(var(--radius-sm) - 1px);
}

/* ==========================================================================
   Metric & Stat Cards
   ========================================================================== */

.grid-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background-color: var(--color-neutral-0);
    border: 1px solid var(--color-neutral-100);
    border-radius: var(--radius-sm);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.stat-card:hover {
    border-color: var(--color-neutral-300);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.stat-icon.blue {
    background: var(--color-blue-50);
    color: var(--color-blue-700);
}

.stat-icon.purple {
    background: var(--color-purple-50);
    color: var(--color-purple-700);
}

.stat-icon.emerald, .stat-icon.green {
    background: var(--color-green-50);
    color: var(--color-green-700);
}

.stat-icon.amber, .stat-icon.orange {
    background: var(--color-orange-50);
    color: var(--color-orange-700);
}

.stat-icon.cyan {
    background: var(--color-blue-50);
    color: var(--color-blue-600);
}

.stat-value {
    font-size: 1.375rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-neutral-950);
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--color-neutral-600);
    font-weight: 500;
}

/* ==========================================================================
   GitLab Banner Component
   ========================================================================== */

.banner {
    background-color: var(--color-purple-50);
    border: 1px solid var(--color-purple-200);
    border-radius: var(--radius-sm);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.banner-content h2 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-neutral-950);
    margin-bottom: 0.25rem;
}

.banner-content p {
    color: var(--color-neutral-700);
    font-size: 0.875rem;
    line-height: 1.35;
}

/* ==========================================================================
   GitLab Buttons (Pajamas UI Standards)
   Based on @uvixis/components and GitLab Design System
   ========================================================================== */
button, input, select {
    font-family: inherit;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    min-height: 2rem;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.875rem;
    line-height: 1rem;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    user-select: none;
    vertical-align: middle;
    border: 1px solid transparent;
    cursor: pointer;
    background-clip: padding-box;
    box-sizing: border-box;
    transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease;
    white-space: none;
    text-wrap: nowrap;
}

.btn:hover {
    text-decoration: none;
}

.btn:focus,
.btn:focus-visible,
.btn:active,
.btn.active,
button:focus,
button:focus-visible,
button:active,
button.active {
    outline: none;
    box-shadow: 0 0 0 1px #ffffff, 0 0 0 3px var(--color-blue-500);
}

/* Primary / Confirm Variants (GitLab Blue) */
.btn-primary,
.btn-confirm,
.btn-confirm-primary {
    background-color: var(--color-blue-500);
    border-color: var(--color-blue-600);
    color: #ffffff;
}

.btn-primary:hover,
.btn-confirm:hover,
.btn-confirm-primary:hover {
    background-color: var(--color-blue-600);
    border-color: var(--color-blue-800);
    color: #ffffff;
}

.btn-primary:active,
.btn-primary.active,
.btn-confirm:active,
.btn-confirm-primary:active {
    background-color: var(--color-blue-700);
    border-color: var(--color-blue-900);
    color: #ffffff;
}

.btn-confirm-secondary {
    background-color: var(--color-neutral-0);
    border-color: var(--color-blue-500);
    color: var(--color-blue-500);
}

.btn-confirm-secondary:hover {
    background-color: var(--color-blue-50);
    border-color: var(--color-blue-700);
    color: var(--color-blue-700);
}

.btn-confirm-secondary:active,
.btn-confirm-secondary.active {
    background-color: var(--color-blue-100);
    border-color: var(--color-blue-900);
    color: var(--color-blue-900);
}

.btn-confirm-tertiary {
    background-color: transparent;
    border-color: transparent;
    color: var(--color-blue-500);
}

.btn-confirm-tertiary:hover {
    background-color: var(--color-blue-50);
    border-color: transparent;
    color: var(--color-blue-700);
}

.btn-confirm-tertiary:active,
.btn-confirm-tertiary.active {
    background-color: var(--color-blue-100);
    border-color: transparent;
    color: var(--color-blue-900);
}

/* Secondary / Default Variants */
.btn-secondary,
.btn-default,
.btn-default-secondary,
.btn-outline {
    background-color: var(--color-neutral-0);
    border-color: var(--color-neutral-200);
    color: var(--color-neutral-800);
}

.btn-secondary:hover,
.btn-default:hover,
.btn-default-secondary:hover,
.btn-outline:hover {
    background-color: var(--color-neutral-50);
    border-color: var(--color-neutral-400);
    color: var(--color-neutral-800);
}

.btn-secondary:active,
.btn-secondary.active,
.btn-default:active,
.btn-default-secondary:active,
.btn-outline:active,
.btn-outline.active {
    background-color: var(--color-neutral-100);
    border-color: var(--color-neutral-600);
    color: var(--color-neutral-900);
}

/* Tertiary / Default Tertiary Variants */
.btn-tertiary,
.btn-default-tertiary {
    background-color: transparent;
    border-color: transparent;
    color: var(--color-neutral-800);
}

.btn-tertiary:hover,
.btn-default-tertiary:hover {
    background-color: var(--color-neutral-50);
    border-color: transparent;
    color: var(--color-neutral-950);
}

.btn-tertiary:active,
.btn-tertiary.active,
.btn-default-tertiary:active,
.btn-default-tertiary.active {
    background-color: var(--color-neutral-100);
    border-color: transparent;
    color: var(--color-neutral-950);
}

/* Danger Variants (GitLab Red) */
.btn-danger,
.btn-danger-primary {
    background-color: var(--color-red-500);
    border-color: var(--color-red-600);
    color: #ffffff;
}

.btn-danger:hover,
.btn-danger-primary:hover {
    background-color: var(--color-red-600);
    border-color: var(--color-red-800);
    color: #ffffff;
}

.btn-danger:active,
.btn-danger.active,
.btn-danger-primary:active {
    background-color: var(--color-red-700);
    border-color: var(--color-red-900);
    color: #ffffff;
}

.btn-danger-secondary {
    background-color: var(--color-neutral-0);
    border-color: var(--color-red-500);
    color: var(--color-red-500);
}

.btn-danger-secondary:hover {
    background-color: var(--color-red-50);
    border-color: var(--color-red-700);
    color: var(--color-red-700);
}

.btn-danger-secondary:active,
.btn-danger-secondary.active {
    background-color: var(--color-red-100);
    border-color: var(--color-red-900);
    color: var(--color-red-900);
}

.btn-danger-tertiary {
    background-color: transparent;
    border-color: transparent;
    color: var(--color-red-500);
}

.btn-danger-tertiary:hover {
    background-color: var(--color-red-50);
    border-color: transparent;
    color: var(--color-red-700);
}

.btn-danger-tertiary:active,
.btn-danger-tertiary.active {
    background-color: var(--color-red-100);
    border-color: transparent;
    color: var(--color-red-900);
}

/* Success / Status Variants */
.btn-success {
    background-color: var(--color-green-500);
    border-color: var(--color-green-600);
    color: #ffffff;
}

.btn-success:hover {
    background-color: var(--color-green-600);
    border-color: var(--color-green-800);
    color: #ffffff;
}

.btn-success:active,
.btn-success.active {
    background-color: var(--color-green-700);
    border-color: var(--color-green-900);
    color: #ffffff;
}

.btn-success-secondary {
    background-color: var(--color-neutral-0);
    border-color: var(--color-green-500);
    color: var(--color-green-500);
}

.btn-success-secondary:hover {
    background-color: var(--color-green-50);
    border-color: var(--color-green-700);
    color: var(--color-green-700);
}

.btn-success-tertiary {
    background-color: transparent;
    border-color: transparent;
    color: var(--color-green-500);
}

.btn-success-tertiary:hover {
    background-color: var(--color-green-50);
    border-color: transparent;
    color: var(--color-green-700);
}

/* Button Sizing & Modifiers */
.btn-sm {
    padding: 0.25rem 0.5rem;
    min-height: 1.5rem;
    font-size: 0.75rem;
    line-height: 0.875rem;
}

.btn-lg {
    padding: 0.5rem 1rem;
    min-height: 2.5rem;
    font-size: 1rem;
    line-height: 1.25rem;
}

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

/* Buttons with Start Icon */
.btn:has(> .gl-icon:first-child),
.btn:has(> svg:first-child),
.btn:has(> .btn-icon:first-child),
.btn.has-icon,
.btn.btn-has-icon,
.btn.has-start-icon,
.btn.btn-has-start-icon,
.btn-icon-start,
.btn-start-icon {
    padding-left: 0.5rem;
}

.btn-icon-only,
.btn.btn-icon {
    min-width: unset;
    width: 2rem;
    height: 2rem;
    padding: 0.5rem;
}

.btn-icon-only.btn-sm,
.btn.btn-icon.btn-sm {
    width: 1.5rem;
    height: 1.5rem;
    padding: 0.25rem;
}

/* Button Internal Elements */
.btn .btn-icon {
    font-size: 0.95rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn .btn-text {
    font-size: inherit;
    font-weight: inherit;
    white-space: nowrap;
}

.btn .dropdown-arrow {
    font-size: 0.65rem;
    margin-left: 2px;
    transition: transform 0.15s ease;
}

/* Disabled State */
.btn:disabled,
.btn[disabled],
.btn.disabled {
    background-color: var(--color-neutral-10);
    color: var(--color-neutral-500);
    border-color: var(--color-neutral-100);
    cursor: not-allowed;
    opacity: 0.65;
    pointer-events: none;
    box-shadow: none;
}

.btn:disabled.btn-tertiary,
.btn[disabled].btn-tertiary,
.btn.disabled.btn-tertiary {
    background-color: transparent;
    border-color: transparent;
}

/* ==========================================================================
   GitLab Badges (Pajamas UI Pill Standard)
   ========================================================================== */

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius-pill);
    font-size: 0.675rem;
    font-weight: 500;
    line-height: .75rem;
    text-decoration: none;
    box-sizing: border-box;
    white-space: nowrap;
}

.badge-neutral, .badge-muted {
    background-color: var(--color-neutral-100);
    color: var(--color-neutral-700);
    border: 1px solid var(--color-neutral-200);
}

.badge-success, .badge-green, .badge-emerald {
    background-color: var(--color-green-100);
    color: var(--color-green-700);
    border: 1px solid var(--color-green-200);
}

.badge-warning, .badge-orange, .badge-amber {
    background-color: var(--color-orange-100);
    color: var(--color-orange-700);
    border: 1px solid var(--color-orange-200);
}

.badge-danger, .badge-red, .badge-rose {
    background-color: var(--color-red-100);
    color: var(--color-red-700);
    border: 1px solid var(--color-red-200);
}

.badge-info, .badge-blue, .badge-primary {
    background-color: var(--color-blue-100);
    color: var(--color-blue-700);
    border: 1px solid var(--color-blue-200);
}

.badge-purple, .badge-tier {
    background-color: var(--color-purple-100);
    color: var(--color-purple-700);
    border: 1px solid var(--color-purple-200);
}

.badge-cyan {
    background-color: #c1d4e6;
    color: #145aa1;
    border: 1px solid #a0bedc;
}

.badge-indigo {
    background-color: var(--color-theme-indigo-100);
    color: var(--color-theme-indigo-700);
    border: 1px solid var(--color-theme-indigo-200);
}

.badge-dark {
    background-color: var(--color-neutral-200);
    color: var(--color-neutral-900);
    border: 1px solid var(--color-neutral-300);
}

/* ==========================================================================
   GitLab Tables
   ========================================================================== */

.table-container {
    overflow-x: auto;
    width: 100%;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.875rem;
}

th {
    background-color: var(--color-neutral-10);
    color: var(--color-neutral-900);
    padding: 0.75rem 1rem;
    font-weight: 600;
    font-size: 0.8125rem;
    letter-spacing: inherit;
    border-bottom: 1px solid var(--color-neutral-100);
}

td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--color-neutral-100);
    color: var(--color-neutral-800);
    vertical-align: middle;
}

tr:hover td {
    background-color: var(--color-neutral-10);
}

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

.table-title {
    font-weight: 600;
    color: var(--color-neutral-950);
    text-decoration: none;
}

.table-title:hover {
    color: var(--color-blue-700);
    text-decoration: underline;
}

.table-subtitle {
    font-size: 0.75rem;
    color: var(--color-neutral-500);
    margin-top: 2px;
}

/* ==========================================================================
   Forms & Controls (GitLab Pajamas Specs)
   ========================================================================== */

.form-container {
    width: 100%;
    max-width: 40rem;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.form-row > * {
    min-width: 0;
}

label, .form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
    color: var(--color-neutral-900);
}

.required, .form-label.required::after {
    color: var(--color-red-500);
    font-weight: 700;
}

.form-hint {
    font-size: 0.75rem;
    color: var(--color-neutral-500);
    margin-top: 0.35rem;
    line-height: 1.3;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="url"],
input[type="number"],
select,
textarea,
.form-control,
.form-input,
.form-select {
    width: 100%;
    padding: .25rem .5rem;
    min-height: 2rem;
    background-color: var(--color-neutral-0);
    border: 1px solid var(--color-neutral-200);
    border-radius: var(--radius-sm);
    color: var(--color-neutral-800);
    font-size: 0.875rem;
    font-family: inherit;
    line-height: 1.4;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    align-items: center;
}

input:hover,
select:hover,
textarea:hover,
.form-control:hover,
.form-input:hover,
.form-select:hover {
    border-color: var(--color-neutral-600);
}

input:focus,
input:active,
select:focus,
select:active,
textarea:focus,
textarea:active,
.form-control:focus,
.form-control:active,
.form-input:focus,
.form-input:active,
.form-select:focus,
.form-select:active {
    outline: none;
    border-color: var(--color-blue-500);
    box-shadow: 0 0 0 1px #ffffff, 0 0 0 3px var(--color-blue-500);
}

input[disabled],
select[disabled],
textarea[disabled] {
    background-color: var(--color-neutral-10);
    color: var(--color-neutral-500);
    border-color: var(--color-neutral-100);
    cursor: not-allowed;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--color-blue-500);
    cursor: pointer;
}

.checkbox-group label {
    margin-bottom: 0;
    cursor: pointer;
    font-weight: 400;
    color: var(--color-neutral-800);
}

select,
.form-select,
::picker(select) {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: base-select;
}

select,
.form-select {
    display: block;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: base-select;
    -webkit-appearance: base-select;
    cursor: pointer;
    background-color: #ffffff;
    background-image: url('data:image/svg+xml,%3Csvg xmlns=\'http://www.w3.org/2000/svg\' width=\'16\' height=\'16\' viewBox=\'0 0 24 24\' fill=\'none\' stroke=\'%236b7280\' stroke-width=\'2\' stroke-linecap=\'round\' stroke-linejoin=\'round\'%3E%3Cpolyline points=\'6 9 12 15 18 9\'/%3E%3C/svg%3E');
    background-repeat: no-repeat;
    background-position: right 0.65rem center;
    background-size: 1rem 1rem;
    padding-right: 2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    max-width: 100%;

    &::picker-icon {
        display: none;
    }

    &::-ms-expand {
        display: none;
    }
}

select button,
.form-select button {
    display: flex;
    align-items: center;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    width: 100%;
    min-width: 0;
    font: inherit;
    color: inherit;
    text-align: inherit;
    cursor: pointer;
    box-shadow: none;
    outline: none;
}

selectedoption,
selectedcontent {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    max-width: 100%;
    width: 100%;
}

::picker(select) {
    border-radius: .5rem;
    padding: .25rem;
    outline: 1px solid #d0d0d0;
    outline-offset: -1px;
    border: none;
    box-shadow: 0 0 1px rgba(5, 5, 6, 0.08), 0 0 2px rgba(5, 5, 6, 0.08), 0 2px 8px rgba(5, 5, 6, 0.08);
    background-color: #ffffff;
    color: #28272d;
}

option {
    border-radius: .25rem;
    padding: .375rem 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
    line-height: 1.25rem;
    color: #28272d;
    width: 100%;
    transition: background-color .15s ease-in-out, color .15s ease-in-out, box-shadow .15s ease-in-out;
    outline: none;
    display: flex;
    gap: 0.5rem;

    &:hover {
        background-color: rgba(164, 163, 168, .16);
        color: #28272d;
    }

    &:focus,
    &:focus-visible {
        background-color: rgba(83, 81, 88, .24);
        color: #28272d;
    }

    &:focus-visible {
        box-shadow: inset 0 0 0 2px #1f75cb, inset 0 0 0 3px #ffffff, inset 0 0 0 1px #ffffff;
        outline: none;
    }

    &:checked {
        background-color: rgba(164, 163, 168, .16);
    }

    &::checkmark {
        content: '';
        margin-right: 0;
        width: 1rem;
        height: 1rem;
        background-color: #1f75cb;
        mask: url('data:image/svg+xml,%3Csvg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 16 16\' %3E%3Cpath fill-rule=\'evenodd\' clip-rule=\'evenodd\' d=\'M12.78 4.62a.75.75 0 0 1 0 1.06l-6.097 6.097a.75.75 0 0 1-1.069-.009L3.211 9.284a.75.75 0 1 1 1.078-1.042l1.873 1.935L11.72 4.62a.75.75 0 0 1 1.06 0z\'/%3E%3C/svg%3E') no-repeat center / contain;
        -webkit-mask: url('data:image/svg+xml,%3Csvg xmlns=\'http://www.w3.org/2000/svg\' viewBox=\'0 0 16 16\' %3E%3Cpath fill-rule=\'evenodd\' clip-rule=\'evenodd\' d=\'M12.78 4.62a.75.75 0 0 1 0 1.06l-6.097 6.097a.75.75 0 0 1-1.069-.009L3.211 9.284a.75.75 0 1 1 1.078-1.042l1.873 1.935L11.72 4.62a.75.75 0 0 1 1.06 0z\'/%3E%3C/svg%3E') no-repeat center / contain;
    }
}

optgroup {
    font-weight: 600;
    font-size: 0.75rem;
    color: #6b7280;
    padding: 0.35rem 0.5rem;
    background-color: #f9fafb;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
}

/* ==========================================================================
   Tabs Component (GitLab Underline Style)
   ========================================================================== */

.tabs-nav {
    display: flex;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--color-neutral-100);
    margin-bottom: 1.5rem;
}

.tab-btn {
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    color: var(--color-neutral-600);
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.15s ease;
    font-family: inherit;
    white-space: nowrap;
    border-radius: .25rem;
    box-shadow: none;
    position: relative;
    margin: 0;

    &:after {
        content: '';
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        height: .125rem;
        background: transparent;
    }
}

.tab-btn:hover {
    color: var(--color-neutral-900);

    &:after {
        background: var(--color-neutral-200);
    }
}

.tab-btn.active {
    color: var(--color-neutral-950);
    font-weight: 600;
    box-shadow: none;

    &:after {
        background: var(--color-blue-500);
    }
}

.tab-btn:active, .tab-btn:focus {
    box-shadow: 0 0 0 1px #ffffff, 0 0 0 3px var(--color-blue-500);
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* ==========================================================================
   GitLab Alerts & Feedback
   ========================================================================== */

.alert {
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    line-height: 1.35;
}

.alert-danger {
    background-color: var(--color-red-50);
    border: 1px solid var(--color-red-200);
    color: var(--color-red-700);
}

.alert-success {
    background-color: var(--color-green-50);
    border: 1px solid var(--color-green-200);
    color: var(--color-green-700);
}

.alert-warning {
    background-color: var(--color-orange-50);
    border: 1px solid var(--color-orange-200);
    color: var(--color-orange-700);
}

.alert-info {
    background-color: var(--color-blue-50);
    border: 1px solid var(--color-blue-200);
    color: var(--color-blue-700);
}

/* ==========================================================================
   Empty State
   ========================================================================== */

.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--color-neutral-600);
}

.empty-state-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.25rem;
    color: var(--color-neutral-400);
    margin-bottom: 0.75rem;
}

.empty-state h3 {
    color: var(--color-neutral-950);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.empty-state p {
    margin-bottom: 1.25rem;
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
    font-size: 0.875rem;
}

/* ==========================================================================
   Code & Monospace
   ========================================================================== */

code, pre {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", "Courier New", monospace;
}

code {
    background: var(--color-neutral-50);
    color: var(--color-neutral-900);
    padding: 0.15rem 0.35rem;
    border-radius: var(--radius-xs);
    font-size: 0.8125rem;
    border: 1px solid var(--color-neutral-100);
}

pre {
    background: var(--color-neutral-10);
    border: 1px solid var(--color-neutral-100);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    font-size: 0.8125rem;
    color: var(--color-neutral-900);
    overflow-x: auto;
}

/* ==========================================================================
   Authentication & Sign-in Page
   ========================================================================== */

.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: #f4f5f7;
    background: radial-gradient(circle at 85% 85%, rgba(197, 226, 249, 0.45) 0%, rgba(220, 238, 255, 0.35) 35%, #f4f5f7 75%);
    background-attachment: fixed;
    padding: 2.5rem 1.5rem 1rem;
    box-sizing: border-box;
}

.auth-page-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    margin: auto 0;
}

.auth-container {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    padding: 0.5rem 0 2rem;
    box-sizing: border-box;
}

.auth-brand-center {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
}

.auth-brand-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.auth-brand-symbol {
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-brand-symbol svg {
    filter: drop-shadow(0 2px 8px var(--primary-glow, rgba(31, 117, 203, 0.25)));
}

.auth-page-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #1f1f23;
    text-align: center;
    margin: 0 0 1.75rem;
    letter-spacing: -0.015em;
    line-height: 1.25;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.125rem;
    width: 100%;
}

.auth-form .form-group {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.auth-form .form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #2e2e32;
    margin-bottom: 0;
}

.auth-input {
    width: 100%;
    height: 42px;
    padding: 0.5rem 0.85rem;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    background-color: #ffffff;
    font-size: 0.9375rem;
    color: #1f1f23;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-input:focus,
.auth-input:focus-visible {
    outline: none;
    border-color: var(--primary, #1f75cb);
    box-shadow: 0 0 0 1px #ffffff, 0 0 0 3px var(--primary, #1f75cb);
}

.password-input-group {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.password-input-group .auth-input {
    padding-right: 2.75rem;
}

.password-toggle-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #666670;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px;
    border-radius: 4px;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.password-toggle-btn:hover {
    color: #1f1f23;
    background-color: #f0f0f2;
}

.auth-forgot-row {
    text-align: right;
    margin-top: 0.25rem;
}

.auth-link-subtle {
    font-size: 0.8125rem;
    color: var(--primary, #1f75cb);
    text-decoration: none;
    transition: color 0.15s ease;
}

.auth-link-subtle:hover {
    color: var(--accent, #105ba3);
    text-decoration: underline;
}

.auth-checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: -0.25rem;
}

.auth-checkbox-row .checkbox-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #2e2e32;
    cursor: pointer;
    user-select: none;
}

.auth-checkbox-row input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary, #1f75cb);
    cursor: pointer;
    margin: 0;
}

.auth-btn-primary {
    width: 100%;
    height: 42px;
    background-color: #2e2e33;
    color: #ffffff;
    border: 1px solid #2e2e33;
    border-radius: 6px;
    font-size: 0.9375rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
    margin-top: 0.25rem;
}

.auth-btn-primary:hover {
    background-color: #1f1f23;
    border-color: #1f1f23;
    color: #ffffff;
}

.auth-btn-primary:focus,
.auth-btn-primary:focus-visible {
    outline: none;
    border-color: var(--primary, #1f75cb);
    box-shadow: 0 0 0 1px #ffffff, 0 0 0 3px var(--primary, #1f75cb);
}

.auth-btn-secondary {
    width: 100%;
    height: 42px;
    background-color: #ffffff;
    color: #2e2e33;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-btn-secondary:hover {
    background-color: #fafafb;
    border-color: #c4c4c8;
    color: #1f1f23;
}

.auth-btn-secondary:focus,
.auth-btn-secondary:focus-visible {
    outline: none;
    border-color: var(--primary, #1f75cb);
    box-shadow: 0 0 0 1px #ffffff, 0 0 0 3px var(--primary, #1f75cb);
}

.auth-btn-secondary:active {
    background-color: #f0f0f2;
}

.auth-legal-text {
    font-size: 0.8125rem;
    color: #52525e;
    line-height: 1.45;
    text-align: center;
    margin: 1.25rem 0 0.875rem;
}

.auth-legal-text a {
    color: var(--primary, #1f75cb);
    text-decoration: none;
}

.auth-legal-text a:hover {
    text-decoration: underline;
    color: var(--accent, #105ba3);
}

.auth-switch-text {
    font-size: 0.875rem;
    color: #2e2e32;
    text-align: center;
    margin: 0.5rem 0 1.25rem;
}

.auth-link-highlight {
    color: var(--primary, #1f75cb);
    font-weight: 600;
    text-decoration: none;
    margin-left: 0.25rem;
}

.auth-link-highlight:hover {
    text-decoration: underline;
    color: var(--accent, #105ba3);
}

.auth-divider {
    position: relative;
    text-align: center;
    margin: 1.5rem 0 1.25rem;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #dcdcde;
    z-index: 1;
}

.auth-divider span {
    position: relative;
    z-index: 2;
    background: #f4f5f7;
    padding: 0 0.75rem;
    color: #666670;
    font-size: 0.8125rem;
    font-weight: 500;
}

.auth-methods-stack {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    width: 100%;
}

.auth-btn-method {
    width: 100%;
    height: 42px;
    background-color: #ffffff;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #2e2e33;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    text-decoration: none;
    box-sizing: border-box;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.auth-btn-method:hover {
    background-color: #fafafb;
    border-color: #c4c4c8;
    color: #1f1f23;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.auth-btn-method:focus,
.auth-btn-method:focus-visible {
    outline: none;
    border-color: var(--primary, #1f75cb);
    box-shadow: 0 0 0 1px #ffffff, 0 0 0 3px var(--primary, #1f75cb);
}

.auth-provider-icon {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--color-neutral-0);
    border: 1px solid var(--color-neutral-100);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.auth-header {
    padding: 2rem 2rem 1.25rem;
    text-align: center;
    border-bottom: 1px solid var(--color-neutral-50);
    background-color: var(--color-neutral-0);
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1.25rem;
    text-decoration: none;
    color: var(--text-main);
}

.auth-title {
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 0.35rem;
    color: var(--color-neutral-950);
}

.auth-subtitle {
    font-size: 0.8125rem;
    color: var(--color-neutral-600);
    line-height: 1.35;
}

.auth-body {
    padding: 1.75rem 2rem 2rem;
}

.auth-tips {
    margin-top: 1.25rem;
    padding: 0.85rem 1rem;
    background: rgba(255, 255, 255, 0.8);
    border: 1px dashed var(--color-neutral-200);
    border-radius: var(--radius-sm);
    font-size: 0.775rem;
}

.auth-tips-title {
    font-weight: 600;
    color: var(--color-neutral-700);
    margin-bottom: 0.35rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.auth-credential-pill {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--color-blue-50);
    border: 1px solid var(--color-blue-100);
    padding: 0.3rem 0.5rem;
    border-radius: var(--radius-xs);
    margin-top: 0.35rem;
    font-family: ui-monospace, monospace;
    color: var(--color-blue-700);
    font-size: 0.75rem;
}

.auth-footer {
    text-align: center;
    padding: 0.85rem 1rem;
    border-top: 1px solid var(--color-neutral-100);
    font-size: 0.75rem;
    color: var(--color-neutral-500);
    background: var(--color-neutral-10);
}

.auth-brand-logo {
    max-height: 48px;
    max-width: 180px;
    object-fit: contain;
}

.auth-alt-action {
    margin-top: 1.25rem;
    text-align: center;
    font-size: 0.8125rem;
    color: var(--color-neutral-600);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.35rem;
}

.auth-alt-action a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.auth-alt-action a:hover {
    text-decoration: underline;
}

.auth-footer-links {
    margin-top: 0.35rem;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.85rem;
}

.auth-footer-links a {
    color: var(--color-neutral-600);
    text-decoration: none;
    font-size: 0.725rem;
}

.auth-footer-links a:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* Page bottom footer */
.auth-page-footer {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1rem 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.8125rem;
    color: #1f75cb;
    box-sizing: border-box;
}

.auth-footer-nav {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.auth-footer-nav a,
.auth-footer-center a {
    color: #1f75cb;
    text-decoration: none;
    font-weight: 400;
    transition: color 0.15s ease;
}

.auth-footer-nav a:hover,
.auth-footer-center a:hover {
    color: #105ba3;
    text-decoration: underline;
}

.auth-footer-center {
    display: flex;
    align-items: center;
}

.auth-footer-lang {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: #2e2e32;
    cursor: pointer;
    font-weight: 500;
}

.auth-footer-lang svg {
    color: #666670;
}

@media (max-width: 768px) {
    .auth-page-footer {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.75rem;
        padding-top: 1rem;
    }

    .auth-footer-nav {
        justify-content: center;
        gap: 0.75rem;
    }
}

/* Auth Preview Banner */
.auth-preview-banner {
    background: var(--color-blue-50);
    border: 1px solid var(--color-blue-200);
    border-radius: var(--radius-md);
    padding: 0.625rem 1rem;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.8125rem;
    color: var(--color-blue-700);
}

.auth-preview-banner-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.auth-preview-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: var(--color-blue-500);
    color: #ffffff;
    font-weight: 600;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.125rem 0.4rem;
    border-radius: var(--radius-sm);
}

.auth-preview-desc {
    color: var(--color-blue-800);
}

/* Customization & Branding Management Panels */
.customization-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.customization-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-neutral-900);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.inherited-hint {
    font-size: 0.75rem;
    color: var(--color-neutral-500);
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.source-badge {
    display: inline-flex;
    align-items: center;
    font-size: 0.65rem;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: var(--radius-xs);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.source-badge-project {
    background: var(--color-blue-100);
    color: var(--color-blue-800);
}

.source-badge-organization {
    background: var(--color-purple-100);
    color: var(--color-purple-800);
}

.source-badge-platform {
    background: var(--color-neutral-100);
    color: var(--color-neutral-700);
}

.source-badge-default {
    background: var(--color-neutral-50);
    color: var(--color-neutral-500);
}

.branding-preview-container {
    background: var(--color-neutral-10);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.branding-preview-card {
    width: 100%;
    max-width: 340px;
    background: var(--color-neutral-0);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 1.25rem;
    text-align: center;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 900px) {
    .sidebar {
        width: 220px;
    }
}

@media (max-width: 768px) {
    .topbar .btn-sidebar-toggle {
        display: inline-flex;
    }

    .sidebar-backdrop.active,
    body.sidebar-mobile-open .sidebar-backdrop {
        display: block;
        opacity: 1;
        pointer-events: auto;
    }

    .app-layout {
        flex-direction: column;
        height: 100vh;
        overflow: hidden;
    }

    .app-body {
        position: relative;
        flex: 1;
        width: 100%;
        overflow: hidden;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 20rem;
        max-width: 85vw;
        height: 100vh;
        background-color: var(--bg-sidebar);
        border-right: 1px solid var(--border-color);
        box-shadow: none;
        z-index: 1100;
        transform: translateX(-100%);
        transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s ease;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
    }

    .sidebar.mobile-open,
    body.sidebar-mobile-open .sidebar {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.18);
    }

    .sidebar-mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.25rem 0.25rem 0.5rem;
        border-bottom: 1px solid var(--border-subtle);
        margin-bottom: 0.5rem;
    }

    .sidebar.collapsed {
        width: 280px;
    }

    .sidebar.collapsed .sidebar-title,
    .sidebar.collapsed .nav-text,
    .sidebar.collapsed .org-switcher-info,
    .sidebar.collapsed .org-switcher-chevron,
    .sidebar.collapsed .nav-section-title,
    .sidebar.collapsed .sidebar-footer-item .nav-text {
        display: initial;
    }

    .sidebar.collapsed .nav-item,
    .sidebar.collapsed .sidebar-footer-item {
        justify-content: flex-start;
        padding: 6px 10px;
    }

    .sidebar .btn-collapse {
        display: none !important;
    }

    .main-content {
        flex: 1;
        width: 100%;
        padding: 0 .5rem .5rem .5rem;
        overflow: hidden;
    }

    .page-container {
        border-radius: 8px;
        width: 100%;
    }

    .page-breadcrumbs {
        padding: 10px 16px;
    }

    .page-content {
        padding: 1rem;
        gap: 16px;
        width: 100%;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .page-header .actions {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 0.5rem;
    }

    .page-header .actions .btn,
    .page-header .actions form,
    .page-header .actions form .btn {
        width: 100%;
        justify-content: center;
    }

    .form-row,
    .form-grid-2col {
        grid-template-columns: 1fr;
    }

    .section-header,
    .page-section-header,
    .custom-section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .section-actions,
    .page-section-actions,
    .section-header-actions,
    .custom-section-actions,
    .custom-section-header-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .topbar {
        padding: 0 0.75rem;
    }

    .topbar-center {
        display: none;
    }

    /* Responsive Table to Cards Conversion */
    .card:has(.table-container) {
        background: transparent;
        border: none;
        box-shadow: none;
    }

    .card:has(.table-container) .card-header {
        padding-left: 0;
        padding-right: 0;
        background: transparent;
        border-bottom: none;
    }

    .table-container {
        overflow-x: visible;
        width: 100%;
        background: transparent;
    }

    .table-container table,
    table.responsive-table {
        display: block;
        width: 100%;
        border-collapse: separate;
        border-spacing: 0;
        background: transparent;
        border: none;
    }

    .table-container thead,
    table.responsive-table thead {
        display: none;
    }

    .table-container tbody,
    table.responsive-table tbody {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
    }

    .table-container tbody tr,
    table.responsive-table tbody tr {
        display: flex;
        flex-direction: column;
        background-color: #ffffff;
        border: 1px solid var(--border-color);
        border-radius: var(--radius-sm);
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
        overflow: hidden;
        width: 100%;
        margin-bottom: 0;
    }

    .table-container tbody tr:hover,
    table.responsive-table tbody tr:hover {
        background-color: #ffffff;
    }

    .table-container tbody tr td,
    table.responsive-table tbody tr td {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        padding: 0.75rem 1rem;
        border-bottom: 1px solid var(--border-subtle);
        color: var(--color-neutral-800);
        font-size: 0.8125rem;
        gap: 0.75rem;
        min-height: 2.25rem;
        box-sizing: border-box;
        width: 100%;
        text-align: right;
    }

    .table-container tbody tr td:last-child,
    table.responsive-table tbody tr td:last-child {
        border-bottom: none;
    }

    .table-container tbody tr td::before,
    table.responsive-table tbody tr td::before {
        content: attr(data-label);
        font-weight: 600;
        color: var(--color-neutral-900);
        font-size: 0.8125rem;
        flex: 0 0 auto;
        min-width: 100px;
        max-width: 45%;
        text-align: left;
        line-height: 1.4;
    }

    .table-container tbody tr td:not([data-label])::before,
    table.responsive-table tbody tr td:not([data-label])::before {
        display: none;
    }

    .table-container .table-actions,
    table.responsive-table .table-actions {
        display: flex;
        gap: 0.375rem;
        justify-content: flex-end;
        align-items: center;
        flex-wrap: wrap;
    }

    .table-container .table-actions .btn,
    table.responsive-table .table-actions .btn {
        padding: 4px 8px;
        font-size: 0.8125rem;
    }

    .table-container .table-row-title,
    table.responsive-table .table-row-title {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        justify-content: flex-end;
        text-align: right;
    }

    .table-container .user-row-identity,
    table.responsive-table .user-row-identity {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        justify-content: flex-end;
        text-align: right;
    }

    .table-container .table-subtitle,
    table.responsive-table .table-subtitle {
        text-align: right;
    }

    .table-container .table-cell-truncate,
    table.responsive-table .table-cell-truncate {
        max-width: 180px;
        text-align: right;
    }
}

@media (max-width: 576px) {
    .overview-stats-grid {
        grid-template-columns: 1fr;
    }

    .topbar-actions .btn-secondary span {
        display: none;
    }

    .topbar-actions .btn-secondary {
        padding: 4px 8px;
    }
}

/* ==========================================================================
   Image Upload, Cropper & Resizer Widget & Modal
   ========================================================================== */

.image-upload-widget {
    display: flex;
    gap: 1.25rem;
    align-items: flex-start;
    padding: 1rem;
    background: var(--color-neutral-10);
    border: 1px solid var(--color-neutral-100);
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
}

.image-preview-container {
    position: relative;
    flex-shrink: 0;
}

.image-preview-box {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-md);
    border: 2px dashed var(--color-neutral-200);
    background: var(--color-neutral-0);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--color-neutral-400);
    position: relative;
}

.image-preview-box.circle {
    border-radius: 50%;
}

.image-preview-box.logo-box {
    width: 140px;
    height: 64px;
}

.image-preview-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-preview-box.logo-box img {
    object-fit: contain;
}

.image-upload-controls {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.image-upload-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.image-upload-help {
    font-size: 0.75rem;
    color: var(--color-neutral-500);
    line-height: 1.4;
}

/* Cropper Modal */
.vanguar-cropper-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.vanguar-cropper-modal.active {
    display: flex;
}

.vanguar-cropper-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 17, 23, 0.75);
    backdrop-filter: blur(2px);
}

.vanguar-cropper-dialog {
    position: relative;
    z-index: 1;
    width: 900px;
    max-width: 96vw;
    max-height: 92vh;
    background: var(--color-neutral-0);
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-neutral-100);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.vanguar-cropper-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-neutral-100);
    background: var(--color-neutral-0);
}

.vanguar-cropper-title-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-neutral-900);
}

.vanguar-cropper-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0;
}

.vanguar-cropper-close {
    background: transparent;
    border: none;
    color: var(--color-neutral-500);
    cursor: pointer;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.vanguar-cropper-close:hover {
    background: var(--color-neutral-50);
    color: var(--color-neutral-900);
}

.vanguar-cropper-body {
    flex: 1;
    padding: 1.25rem;
    overflow-y: auto;
    min-height: 420px;
}

/* Dropzone */
.vanguar-cropper-dropzone {
    border: 2px dashed var(--color-neutral-200);
    border-radius: var(--radius-md);
    background: var(--color-neutral-10);
    min-height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.vanguar-cropper-dropzone.dragover {
    border-color: var(--color-blue-500);
    background: var(--color-blue-50);
}

.dropzone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    max-width: 400px;
}

.dropzone-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--color-neutral-50);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-neutral-500);
    margin-bottom: 0.5rem;
}

.dropzone-content h4 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-neutral-900);
}

.dropzone-content p {
    margin: 0;
    font-size: 0.8125rem;
    color: var(--color-neutral-500);
}

/* Workspace */
.vanguar-cropper-workspace {
    display: flex;
    gap: 1.25rem;
    align-items: stretch;
}

.vanguar-cropper-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.vanguar-canvas-container {
    height: 360px;
    background: #111215;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    user-select: none;
    border: 1px solid var(--color-neutral-800);
}

.vanguar-canvas-container canvas {
    display: block;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.vanguar-cropper-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
    background: var(--color-neutral-10);
    border: 1px solid var(--color-neutral-100);
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.zoom-group {
    gap: 0.5rem;
}

.toolbar-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--color-neutral-600);
}

.zoom-range {
    width: 100px;
    cursor: pointer;
}

.zoom-value {
    font-size: 0.75rem;
    font-family: ui-monospace, monospace;
    color: var(--color-neutral-700);
    min-width: 38px;
}

/* Sidebar */
.vanguar-cropper-sidebar {
    width: 250px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border-left: 1px solid var(--color-neutral-100);
    padding-left: 1.25rem;
}

.sidebar-section {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.sidebar-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-neutral-600);
}

.ratio-btn-group {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.35rem;
}

.ratio-btn {
    font-size: 0.75rem;
    padding: 0.35rem 0.5rem;
    justify-content: center;
}

.ratio-btn.active {
    background: var(--color-blue-500);
    color: #ffffff;
    border-color: var(--color-blue-600);
}

.dimension-inputs {
    display: flex;
    gap: 0.5rem;
}

.dimension-field {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--color-neutral-600);
}

.dimension-field .dimension-control {
    width: 100%;
    padding: 0.25rem 0.4rem;
    font-size: 0.8125rem;
}

.preset-sizes {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
    margin-top: 0.25rem;
}

.preset-tag {
    background: var(--color-neutral-50);
    border: 1px solid var(--color-neutral-200);
    border-radius: var(--radius-xs);
    font-size: 0.6875rem;
    padding: 0.15rem 0.35rem;
    color: var(--color-neutral-700);
    cursor: pointer;
    transition: background 0.15s ease;
}

.preset-tag:hover {
    background: var(--color-neutral-100);
}

.cropper-live-preview-box {
    display: flex;
    gap: 1rem;
    align-items: center;
    padding: 0.75rem;
    background: var(--color-neutral-10);
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-neutral-100);
    margin-top: 0.35rem;
}

.preview-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.6875rem;
    color: var(--color-neutral-500);
}

.preview-img-container {
    background: #ffffff;
    border: 1px solid var(--color-neutral-200);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.preview-img-container.circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
}

.preview-img-container.square {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-xs);
}

/* Footer */
.vanguar-cropper-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.25rem;
    background: var(--color-neutral-10);
    border-top: 1px solid var(--color-neutral-100);
}

.crop-info-text {
    font-size: 0.75rem;
    color: var(--color-neutral-600);
    font-family: ui-monospace, monospace;
}

.footer-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

@media (max-width: 768px) {
    .vanguar-cropper-workspace {
        flex-direction: column;
    }

    .vanguar-cropper-sidebar {
        width: 100%;
        border-left: none;
        border-top: 1px solid var(--color-neutral-100);
        padding-left: 0;
        padding-top: 1rem;
    }
}

/* ==========================================================================
   UI Utility & Component Classes (Preventing Inline Styles)
   ========================================================================== */

/* Display & Flex Utilities */
.d-none {
    display: none !important;
}

.d-inline {
    display: inline !important;
}

.d-inline-flex {
    display: inline-flex !important;
}

.d-flex {
    display: flex !important;
}

.d-block {
    display: block !important;
}

.d-grid {
    display: grid !important;
}

.flex-row {
    display: flex;
    flex-direction: row;
}

.flex-col,
.flex-column {
    display: flex;
    flex-direction: column !important;
}

.flex-row-wrap {
    flex-wrap: wrap;
}

.flex-row-center {
    display: flex;
    align-items: center;
}

.flex-row-center-gap-xs {
    display: flex;
    align-items: center;
    gap: 4px;
}

.flex-row-center-gap-sm {
    display: flex;
    align-items: center;
    gap: 8px;
}

.flex-row-center-gap-md {
    display: flex;
    align-items: center;
    gap: 12px;
}

.flex-row-center-gap-lg {
    display: flex;
    align-items: center;
    gap: 16px;
}

.flex-row-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.inline-flex-center {
    display: inline-flex;
    align-items: center;
}

.inline-flex-center-gap-xs {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.inline-flex-center-gap-sm {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.gap-xs {
    gap: 4px !important;
}

.gap-sm {
    gap: 8px !important;
}

.gap-md {
    gap: 16px !important;
}

.gap-lg {
    gap: 24px !important;
}

.gap-xl {
    gap: 32px !important;
}

/* Spacing Utilities */
.m-0 {
    margin: 0 !important;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mb-xs {
    margin-bottom: 4px !important;
}

.mb-sm {
    margin-bottom: 8px !important;
}

.mb-md {
    margin-bottom: 16px !important;
}

.mb-lg {
    margin-bottom: 24px !important;
}

.mb-xl {
    margin-bottom: 32px !important;
}

.mt-0 {
    margin-top: 0 !important;
}

.mt-xs {
    margin-top: 4px !important;
}

.mt-sm {
    margin-top: 8px !important;
}

.mt-md {
    margin-top: 16px !important;
}

.mt-lg {
    margin-top: 24px !important;
}

.mt-xl {
    margin-top: 32px !important;
}

.pt-xs {
    padding-top: 4px !important;
}

.pt-sm {
    padding-top: 8px !important;
}

.pt-md {
    padding-top: 16px !important;
}

.pt-lg {
    padding-top: 24px !important;
}

.pb-xs {
    padding-bottom: 4px !important;
}

.pb-sm {
    padding-bottom: 8px !important;
}

.pb-md {
    padding-bottom: 16px !important;
}

.pb-lg {
    padding-bottom: 24px !important;
}

.p-md {
    padding: 16px !important;
}

.p-lg {
    padding: 24px !important;
}

.py-lg {
    padding-top: 24px !important;
    padding-bottom: 24px !important;
}

/* Sizing Utilities */
.w-100 {
    width: 100% !important;
}

.w-auto {
    width: auto !important;
}

.max-w-260 {
    max-width: 260px !important;
}

.max-w-280 {
    max-width: 280px !important;
}

.max-w-300 {
    max-width: 300px !important;
}

.max-w-400 {
    max-width: 400px !important;
}

.max-w-480 {
    max-width: 480px !important;
}

.max-w-500 {
    max-width: 500px !important;
}

/* Typography & Alignment */
.text-left {
    text-align: left !important;
}

.text-center {
    text-align: center !important;
}

.text-right {
    text-align: right !important;
}

.text-xs {
    font-size: 0.75rem !important;
}

.text-sm {
    font-size: 0.8125rem !important;
}

.text-md {
    font-size: 0.875rem !important;
}

.text-lg {
    font-size: 1rem !important;
}

.font-semibold {
    font-weight: 600 !important;
}

.font-bold {
    font-weight: 700 !important;
}

.font-mono {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace !important;
}

.leading-normal {
    line-height: 1.4 !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

.text-dim {
    color: var(--text-dim) !important;
}

.text-primary-link {
    color: var(--primary) !important;
    text-decoration: none;
}

.text-primary-link:hover {
    color: var(--primary-hover) !important;
    text-decoration: underline;
}

.text-danger {
    color: var(--color-red-500) !important;
}

.text-success {
    color: var(--color-green-500) !important;
}

.text-warning {
    color: var(--color-orange-500) !important;
}

.text-cyan {
    color: var(--accent-cyan) !important;
}

.text-blue,
.text-purple {
    color: var(--color-blue-600) !important;
}

.text-orange {
    color: var(--accent-orange) !important;
}

.text-emerald {
    color: var(--accent-emerald) !important;
}

/* Badges & Pills */
.badge-xs {
    font-size: 0.6875rem !important;
    padding: 1px 6px !important;
}

.badge-sm {
    font-size: 0.75rem !important;
    padding: 2px 8px !important;
}

/* Image & Box Utilities */
.img-contain {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.img-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-box-md {
    width: 52px !important;
    height: 52px !important;
}

/* Visibility & State */
.is-hidden {
    display: none !important;
}

/* Domain Component Classes */
.org-header-identity {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.org-logo-preview {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 4px;
    flex-shrink: 0;
}

.title-with-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn-active-context {
    border-color: var(--success) !important;
    color: var(--success) !important;
    cursor: default !important;
}

.btn-current-org {
    opacity: 0.6;
    cursor: default;
    border-color: var(--success) !important;
    color: var(--success) !important;
}

.btn-activate {
    border-color: var(--success) !important;
    color: var(--success) !important;
}

.domain-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.domain-card {
    background: var(--color-neutral-0);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1.25rem;
}

.domain-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.domain-title-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.domain-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-main);
}

.domain-badges {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.domain-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.domain-dns-box {
    background: var(--color-neutral-10);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-sm);
    padding: 0.85rem 1rem;
    margin-top: 0.75rem;
}

.domain-dns-title {
    font-size: 0.85rem;
    color: var(--warning);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.dns-record-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
    font-size: 0.8rem;
}

.table-dns-challenge {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 0.8125rem;
}

.dns-challenge-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dns-challenge-row span {
    font-size: 0.75rem;
    color: var(--text-dim);
    min-width: 32px;
}

.dns-challenge-row code {
    font-size: 0.75rem;
    padding: 2px 6px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xs);
    word-break: break-all;
}

/* ==========================================================================
   Vanguar Modal Dialog Component (Pajamas UI)
   ========================================================================== */

body.modal-open {
    overflow: hidden !important;
}

.vanguar-modal-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(18, 17, 23, 0.55);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    animation: vanguarModalFadeIn 0.15s ease-out;
}

.vanguar-modal-backdrop.active {
    display: flex;
}

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

.vanguar-modal-dialog {
    background: var(--bg-card, #ffffff);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg, 12px);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.22), 0 4px 14px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    outline: none;
    animation: vanguarModalScaleUp 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes vanguarModalScaleUp {
    from {
        transform: scale(0.96) translateY(-8px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.vanguar-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-card, #ffffff);
}

.vanguar-modal-title-group {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    color: var(--text-primary);
}

.vanguar-modal-title {
    font-size: 1.0625rem;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
}

.vanguar-modal-close-btn {
    background: transparent;
    border: none;
    padding: 6px;
    border-radius: var(--radius-sm, 6px);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.12s ease;
}

.vanguar-modal-close-btn:hover {
    background-color: var(--bg-hover, rgba(0, 0, 0, 0.05));
    color: var(--text-primary);
}

.vanguar-modal-body {
    padding: 1.25rem;
    overflow-y: auto;
    flex: 1;
}

.vanguar-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary, #fafafa);
}

/* Detail & Metadata Grids */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.grid-col-full {
    grid-column: 1 / -1;
}

/* Table Components */
.table-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.table-row-title {
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-dim-text {
    color: var(--text-dim) !important;
    font-size: 0.8125rem !important;
}

.table-cell-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.entity-link {
    color: var(--text-muted);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.entity-link:hover {
    color: var(--primary);
    text-decoration: underline;
}

.entity-link-primary {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.entity-link-primary:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.org-cell-link {
    color: var(--text-body);
    font-weight: 500;
    text-decoration: none;
}

.org-cell-link:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* User View Components */
.user-header-identity {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar-lg {
    width: 48px;
    height: 48px;
    font-size: 1.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--bg-tertiary);
    flex-shrink: 0;
}

.user-avatar-sm {
    width: 34px;
    height: 34px;
    font-size: 0.85rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    flex-shrink: 0;
    overflow: hidden;
}

.user-avatar-sm img,
.user-avatar-sm .avatar-photo,
.user-avatar-sm .avatar-img,
.user-avatar-sm .img-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.user-row-identity {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.subtitle-with-icon {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.verified-icon-badge {
    color: var(--success);
    display: inline-flex;
    align-items: center;
}

.stat-value-break {
    font-size: 1.15rem;
    word-break: break-all;
}

.add-grant-box {
    background: var(--color-neutral-10);
    padding: 1.25rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    margin-top: 1.5rem;
}

.add-grant-title {
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.add-grant-form {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.empty-state-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-top: 1rem;
}

/* Form Layout Components */
.form-section,
.form-container,
.settings-form,
.section form,
.section-body form,
.section-content form,
.section-form,
.page-section form,
.page-section-body form,
.page-section-content form,
.page-section-form,
.content-section form,
.content-section-body form,
.custom-section form,
.custom-section-body form,
.custom-section-content form,
.custom-section-form,
.card > form:not(.d-inline):not(.dropdown-form):not(.filter-bar-form):not(.user-filter-form):not(.table-actions form):not(.danger-zone-item form),
.card-body > form:not(.d-inline):not(.dropdown-form):not(.filter-bar-form):not(.user-filter-form):not(.table-actions form):not(.danger-zone-item form),
form.card-body:not(.d-inline):not(.dropdown-form):not(.filter-bar-form):not(.user-filter-form):not(.table-actions form):not(.danger-zone-item form),
.card form:not(.d-inline):not(.dropdown-form):not(.filter-bar-form):not(.user-filter-form):not(.table-actions form):not(.danger-zone-item form),
.card:has(> form),
.card:has(> .card-body form),
.card:has(form.card-body),
.card:has(.card-body.form-grid),
form:not(.d-inline):not(.dropdown-form):not(.filter-bar-form):not(.user-filter-form):not(.auth-form):not(.add-grant-form):not(#addDomainForm):not(.modal form):not(.vanguar-modal-dialog form):not(.table-actions form):not(.danger-zone-item form):not(.page-actions form):not(.actions form) {
    margin-bottom: 2rem;
    width: 100%;
    max-width: 40rem;
}

.card > form,
.card-body > form,
form.card-body,
.card form:not(.d-inline):not(.dropdown-form):not(.filter-bar-form):not(.user-filter-form):not(.table-actions form):not(.danger-zone-item form),
.section-body > form,
.section-content > form,
.section > form,
form.section-body,
.section-form,
.page-section-body > form,
.page-section-content > form,
.page-section > form,
form.page-section-body,
.page-section-form,
.content-section-body > form,
.content-section > form,
.custom-section-body > form,
.custom-section-content > form,
.custom-section > form,
form.custom-section-body,
.custom-section-form {
    margin-bottom: 0;
}

/* Section Components */
.section,
.page-section,
.section-container,
.content-section,
.custom-section,
.custom-section-container {
    width: 100%;
    margin-bottom: 2.5rem;
}

.section-header,
.page-section-header,
.content-section-header,
.custom-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    width: 100%;
    padding-bottom: 0.75rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.section-header > div:first-child,
.section-title-group,
.section-header-content,
.page-section-header > div:first-child,
.page-section-title-group,
.page-section-header-content,
.custom-section-header > div:first-child,
.custom-section-title-group,
.custom-section-header-content {
    min-width: 0;
}

.section-title,
.page-section-title,
.content-section-title,
.custom-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-neutral-950);
    line-height: 1.25;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-subtitle,
.page-section-subtitle,
.content-section-subtitle,
.custom-section-subtitle {
    font-size: 0.8125rem;
    color: var(--color-neutral-600);
    margin-top: 0.25rem;
    margin-bottom: 0;
}

.section-actions,
.page-section-actions,
.section-header-actions,
.page-section-header-actions,
.content-section-actions,
.custom-section-actions,
.custom-section-header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    margin-left: auto;
}

.section-body,
.section-content,
.page-section-body,
.page-section-content,
.content-section-body,
.content-section-content,
.custom-section-body,
.custom-section-content {
    width: 100%;
}

.section-body > form,
.section-content > form,
.section > form,
form.section-body,
.section-form,
.section .form-section,
.page-section-body > form,
.page-section-content > form,
.page-section > form,
form.page-section-body,
.page-section-form,
.page-section .form-section,
.content-section-body > form,
.content-section > form,
.custom-section-body > form,
.custom-section-content > form,
.custom-section > form,
form.custom-section-body,
.custom-section-form,
.custom-section .form-section {
    width: 100%;
    max-width: 40rem;
}

.section-divided,
.page-section-divided,
.custom-section-divided {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

.form-section-divided {
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

.form-grid-2col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

.form-grid-2col > * {
    min-width: 0;
}

.form-help-text {
    color: var(--text-dim);
    font-size: 0.8125rem;
    margin-top: 0.35rem;
}

.checkbox-row {
    display: flex;
    gap: 2rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
}

.form-actions-bar {
    display: flex;
    gap: 1rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

.form-group-flex-1 {
    flex: 1;
    min-width: 180px;
}

.form-group-flex-2 {
    flex: 2;
    min-width: 220px;
}

.filter-bar-form {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.user-filter-form {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-actions {
    display: flex;
    gap: 0.5rem;
}

.form-label-header {
    margin-bottom: 0;
    font-size: 1rem;
    font-weight: 600;
}

/* Import View Components */
.import-error-title {
    font-size: 1rem;
    color: var(--color-red-500);
    margin-bottom: 0.75rem;
}

.import-success-title {
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.guide-box {
    background: var(--color-neutral-10);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 1rem;
}

.guide-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--color-blue-700);
}

.guide-code-block {
    display: block;
    padding: 0.5rem;
    background: var(--color-neutral-50);
    margin-bottom: 0.75rem;
    word-break: break-all;
}

.guide-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.guide-json-pre {
    background: var(--color-neutral-50);
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    overflow-x: auto;
}

/* Auth Method Components */
.auth-config-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.auth-config-title {
    font-size: 1.05rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

/* Settings & Color Field Components */
.color-input-wrapper,
.color-picker-group {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.color-picker-hidden-trigger {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    opacity: 0;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    z-index: 3;
}

.color-picker-preview,
.color-picker-swatch {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    border-radius: var(--radius-xs, 4px);
    border: 1px solid rgba(0, 0, 0, 0.2);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25), 0 1px 2px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    z-index: 2;
    flex-shrink: 0;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    pointer-events: none;
}

.color-input-wrapper:hover .color-picker-preview,
.color-picker-group:hover .color-picker-preview,
.color-picker-hidden-trigger:hover + .color-picker-preview,
.color-picker-preview:hover,
.color-picker-swatch:hover {
    transform: translateY(-50%) scale(1.08);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4), 0 2px 4px rgba(0, 0, 0, 0.18);
}

.color-field-input,
.color-input-wrapper .form-control,
.color-input-wrapper .form-input,
.color-picker-group .form-control,
.color-picker-group .form-input {
    padding-left: 38px !important;
    cursor: pointer;
    width: 100%;
}

.color-field-input:focus,
.color-input-wrapper .form-control:focus,
.color-input-wrapper .form-input:focus {
    cursor: text;
}

.settings-section-divider-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 14px;
    color: var(--text-primary);
    border-top: 1px solid var(--border-color);
    padding-top: 18px;
}

.policy-controls-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.policy-control-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.policy-checkbox {
    margin-top: 3px;
    accent-color: var(--primary);
}

.policy-control-title {
    font-weight: 600;
    color: var(--text-primary);
}

.policy-control-desc {
    font-size: 0.825rem;
    color: var(--text-muted);
}

/* Dashboard Metric & Helpers */
.metric-warning {
    color: var(--color-orange-500) !important;
    font-weight: 600 !important;
}

.org-item-avatar-sm {
    width: 18px !important;
    height: 18px !important;
    font-size: 0.625rem !important;
}

/* Cropper Modal Helpers */
.toggle-checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
}

.cropper-preview-img-circle {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.cropper-preview-img-square {
    width: 100%;
    height: 100%;
    border-radius: 4px;
    object-fit: contain;
}

.cropper-target-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

/* ==========================================================================
   404 & Error Page Styles (GitLab Pajamas Design)
   ========================================================================== */

.error-page-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 480px;
    padding: 3rem 1.5rem;
}

.error-canvas {
    max-width: 600px;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: auto;
}

.error-illustration-box {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.error-graphic {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    user-select: none;
}

.error-code-num {
    font-size: 4.75rem;
    font-weight: 900;
    line-height: 1;
    color: var(--color-neutral-300);
    letter-spacing: -2px;
}

.error-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-2px);
}

.error-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 3px 10px;
    border-radius: var(--radius-pill);
    background-color: var(--color-red-50);
    border: 1px solid var(--color-red-200);
    color: var(--color-red-600);
    font-size: 0.8125rem;
    font-weight: 600;
    margin-bottom: 0.85rem;
}

.error-title {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--color-neutral-900);
    line-height: 1.25;
    margin-bottom: 0.75rem;
}

.error-description {
    font-size: 0.95rem;
    color: var(--color-neutral-600);
    line-height: 1.5;
    max-width: 480px;
    margin: 0 auto 1.25rem;
}

.error-path-container {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--color-neutral-50);
    border: 1px solid var(--border-color);
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.25rem;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.error-path-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-weight: 600;
}

.error-path-text {
    font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.825rem;
    color: var(--color-blue-600);
    background: transparent;
    border: none;
    padding: 0;
}

.error-custom-msg {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--color-blue-50);
    border: 1px solid var(--color-blue-200);
    color: var(--color-blue-700);
    padding: 0.5rem 0.875rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    margin-bottom: 1.25rem;
    text-align: left;
}

.error-msg-icon {
    display: flex;
    align-items: center;
    color: var(--color-blue-600);
}

.error-actions-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    justify-content: center;
    align-items: center;
    margin-top: 1.25rem;
}

.error-standalone-container {
    max-width: 460px;
    margin: 0 auto;
}

.error-standalone-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2.25rem 2rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.error-actions-vertical {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    width: 100%;
    margin-top: 1.5rem;
}

.error-actions-vertical .btn {
    width: 100%;
    justify-content: center;
}

/* ==========================================================================
   Permissions & Granular Actions Matrix Styles
   ========================================================================== */

.permission-resource-card {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md, 8px);
    background: var(--bg-card);
    margin-bottom: 1.25rem;
    overflow: hidden;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.permission-resource-card:hover {
    border-color: var(--color-blue-300, #93c5fd);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.permission-resource-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1.25rem;
    background: var(--bg-secondary, #f8fafc);
    border-bottom: 1px solid var(--border-color);
}

.permission-resource-title-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.permission-resource-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.permission-actions-list {
    padding: 1rem 1.25rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.75rem;
}

.permission-action-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 0.75rem;
    background: var(--bg-primary, #ffffff);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm, 6px);
    gap: 0.5rem;
    transition: border-color 0.12s ease;
}

.permission-action-item:hover {
    border-color: var(--color-blue-400, #60a5fa);
}

.action-item-info {
    flex: 1;
    min-width: 0;
}

.action-item-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.action-item-desc {
    font-size: 0.785rem;
    color: var(--text-muted);
    margin-top: 0.2rem;
    line-height: 1.35;
}

.action-item-scope {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.75rem;
    color: var(--color-blue-700);
    background: var(--color-blue-50);
    padding: 1px 6px;
    border-radius: 4px;
    display: inline-block;
    margin-top: 0.25rem;
}

/* Actions Checkbox Grid for Role Modals */
.role-actions-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 320px;
    overflow-y: auto;
    padding: 0.5rem 0.25rem;
}

.role-actions-group {
    background: var(--bg-secondary, #f8fafc);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm, 6px);
    padding: 0.75rem 1rem;
}

.role-actions-group-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.role-actions-group-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem;
}

.action-checkbox-card {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.6rem;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8125rem;
    transition: all 0.12s ease;
}

.action-checkbox-card:hover {
    border-color: var(--color-blue-400);
    background: var(--color-blue-50);
}

.action-checkbox-card input[type="checkbox"] {
    cursor: pointer;
}

/* User Overrides Segmented Matrix */
.overrides-matrix-table th {
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    color: var(--text-muted);
}

.override-segmented-control {
    display: inline-flex;
    align-items: center;
    background: var(--bg-secondary, #f1f5f9);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm, 6px);
    padding: 2px;
    gap: 2px;
}

.override-segmented-option {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    font-size: 0.785rem;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.12s ease;
    user-select: none;
}

.override-segmented-option input[type="radio"] {
    display: none;
}

.override-segmented-option:hover {
    color: var(--text-primary);
}

.override-segmented-option.active-inherit,
.override-segmented-option input[value="INHERIT"]:checked + span {
    background: #ffffff;
    color: var(--text-primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.override-segmented-option.active-allow,
.override-segmented-option input[value="ALLOW"]:checked + span {
    background: var(--color-green-600, #16a34a);
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(22, 163, 74, 0.2);
}

.override-segmented-option.active-deny,
.override-segmented-option input[value="DENY"]:checked + span {
    background: var(--color-red-600, #dc2626);
    color: #ffffff;
    box-shadow: 0 1px 3px rgba(220, 38, 38, 0.2);
}

.badge-override-allow {
    background-color: var(--color-green-100, #dcfce7);
    color: var(--color-green-800, #166534);
    font-weight: 600;
}

.badge-override-deny {
    background-color: var(--color-red-100, #fee2e2);
    color: var(--color-red-800, #991b1b);
    font-weight: 600;
}

/* ==========================================================================
   Token / Seed / Tag Input Component (Pajamas UI)
   ========================================================================== */

.token-input-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.375rem;
    min-height: 38px;
    padding: 0.3125rem 0.5rem;
    background-color: var(--color-neutral-0, #ffffff);
    border: 1px solid var(--color-neutral-200, #bfbfc3);
    border-radius: var(--radius-sm, 4px);
    cursor: text;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    width: 100%;
    box-sizing: border-box;
}

.token-input-container:hover {
    border-color: var(--color-neutral-300, #a4a3a8);
}

.token-input-container.focused,
.token-input-container:focus-within {
    border-color: var(--color-blue-500, #1f75cb);
    box-shadow: 0 0 0 2px var(--color-blue-100, #cbe2f9);
    outline: none;
}

.token-input-container.disabled {
    background-color: var(--color-neutral-50, #ececef);
    cursor: not-allowed;
    opacity: 0.7;
}

.token-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.15rem 0.5rem;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.4;
    color: var(--color-blue-800, #284779);
    background-color: var(--color-blue-50, #e9f3fc);
    border: 1px solid var(--color-blue-200, #9dc7f1);
    border-radius: 9999px;
    user-select: none;
    transition: all 0.12s ease;
    max-width: 100%;
}

.token-chip:hover {
    background-color: var(--color-blue-100, #cbe2f9);
}

.token-chip-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    word-break: break-all;
}

.token-chip-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 15px;
    height: 15px;
    padding: 0;
    margin-left: 2px;
    margin-right: -2px;
    color: var(--color-blue-600, #2f68b4);
    background: transparent;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    line-height: 1;
    font-size: 13px;
    font-weight: 700;
    transition: background-color 0.12s ease, color 0.12s ease;
}

.token-chip-remove:hover {
    background-color: var(--color-blue-300, #63a6e9);
    color: #ffffff;
}

.token-chip-remove:focus {
    outline: none;
}

.token-input-field {
    flex: 1 1 120px;
    min-width: 100px;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0.125rem 0.25rem !important;
    margin: 0 !important;
    font-size: 0.875rem !important;
    font-family: inherit !important;
    color: var(--text-primary, #28272d) !important;
    height: auto !important;
}

.token-input-field::placeholder {
    color: var(--color-neutral-400, #89888d);
    font-size: 0.8125rem;
}
