/* =========================================================
   CSS VARIABLES
   ========================================================= */
:root {
    --primary: #667eea;
    --primary-dark: #5568d3;
    --primary-light: #7c8ef0;
    --bg-base: #0d1117;
    --bg-elevated: #161b22;
    --bg-overlay: rgba(22, 27, 34, 0.8);
    --text-1: #c9d1d9;
    --text-2: #8b949e;
    --text-3: #6e7681;
    --surface: rgba(240, 246, 252, 0.05);
    --border: rgba(240, 246, 252, 0.1);
    --success: #3fb950;
    --warning: #d29922;
    --info: #58a6ff;
}

/* =========================================================
   GLOBAL RESET
   ========================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 13px;
    /* Reserve scrollbar gutter so layout doesn't shift when panels collapse/expand */
    scrollbar-gutter: stable;
}

body {
    font-family: "Sora", sans-serif;
    min-height: 100vh;
    background: var(--bg-base);
    color: var(--text-1);
    line-height: 1.6;
    position: relative;
    overflow-x: hidden;
}

/* Radial gradient background effect */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(102, 126, 234, 0.08), transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(102, 126, 234, 0.06), transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* =========================================================
   AUTH PAGE - Body Wrapper
   ========================================================= */
.auth-body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    min-height: 100vh;
    overflow-y: auto;
}

/* =========================================================
   AUTH PAGE - Background Animations
   ========================================================= */
.lines {
    position: fixed;
    inset: 0;
    pointer-events: none;
}

.line {
    position: absolute;
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom,
            transparent,
            rgba(102, 126, 234, 0.25),
            transparent);
    animation: lineMove 10s linear infinite;
}

.line:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
}

.line:nth-child(2) {
    left: 30%;
    animation-delay: 2s;
}

.line:nth-child(3) {
    left: 50%;
    animation-delay: 4s;
}

.line:nth-child(4) {
    left: 70%;
    animation-delay: 6s;
}

.line:nth-child(5) {
    left: 90%;
    animation-delay: 1s;
}

@keyframes lineMove {
    0% {
        transform: translateY(-100%);
    }

    100% {
        transform: translateY(100%);
    }
}

.glow-circle {
    position: fixed;
    border-radius: 50%;
    filter: blur(110px);
    opacity: 0.15;
    pointer-events: none;
}

.glow-1 {
    width: 500px;
    height: 500px;
    background: var(--primary-light);
    top: -120px;
    right: -120px;
}

.glow-2 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    bottom: -100px;
    left: -100px;
}

/* =========================================================
   AUTH PAGE - Container & Layout
   ========================================================= */
.container {
    width: 100%;
    max-width: 1000px;
    position: relative;
    margin: auto;
    z-index: 2;
}

.auth-box {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 24px;
    display: grid;
    grid-template-columns: 400px 1fr;
    backdrop-filter: blur(30px);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* =========================================================
   AUTH PAGE - Brand Panel (Left)
   ========================================================= */
.brand-panel {
    background: linear-gradient(135deg,
            rgba(102, 126, 234, 0.12),
            rgba(87, 97, 188, 0.12));
    padding: 2.5rem 2rem;
    border-right: 1px solid var(--border);
    position: relative;
}

.brand-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 30%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(87, 97, 188, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.logo-section {
    margin-bottom: 2.5rem;
    position: relative;
    z-index: 1;
}

.logo-title {
    font-size: 2.2rem;
    font-weight: 700;
}

.logo-subtitle {
    color: var(--text-2);
    font-size: 0.95rem;
}

.info-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    padding: 1.25rem;
    border-radius: 14px;
    margin-bottom: 0.875rem;
    transition: 0.25s;
}

.info-card:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(4px);
}

.info-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.info-card-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.info-card-icon svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
}

.info-card-title {
    font-size: 1rem;
    font-weight: 600;
}

.info-card-text {
    color: var(--text-2);
    font-size: 0.85rem;
    line-height: 1.6;
}

/* =========================================================
   AUTH PAGE - Form Panel (Right)
   ========================================================= */
.form-panel {
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-header-section {
    margin-bottom: 2rem;
}

.form-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.form-subtitle {
    color: var(--text-2);
    font-size: 0.95rem;
}

.form {
    display: none;
}

.form.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form inputs */
.input-group {
    margin-bottom: 1.25rem;
}

.input-label {
    display: block;
    color: var(--text-2);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-field {
    width: 100%;
    padding: .875rem 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-1);
    font-family: inherit;
    transition: all 0.3s;
}

.input-field.input-with-toggle {
    padding-right: 3rem;
}

.input-field:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.password-toggle {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-2);
    cursor: pointer;
    padding: 0.5rem 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s;
    z-index: 1;
}

.password-toggle:hover {
    color: var(--text-1);
}

.password-toggle svg {
    width: 18px;
    height: 18px;
}

/* Form options and checkboxes */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.checkbox {
    accent-color: var(--primary);
}

.checkbox-label {
    color: var(--text-2);
    font-size: 0.875rem;
}

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

.link,
.switch-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s;
}

.link:hover,
.switch-link:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

.form-footer-text {
    color: var(--text-2);
    text-align: center;
    font-size: 0.9rem;
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.3);
    font-family: inherit;
    margin-bottom: 1.5rem;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(102, 126, 234, 0.4);
}

/* Message alerts */
.message {
    padding: 0.6rem 0.85rem;
    border-radius: 6px;
    font-size: 0.875rem;
    display: none;
}

.message.show {
    display: block;
}

.message.error {
    background: rgba(239, 68, 68, 0.15);
    border-left: 3px solid #ef4444;
    color: #fca5a5;
}

.message.success {
    background: rgba(16, 185, 129, 0.15);
    border-left: 3px solid #10b981;
    color: #6ee7b7;
}

.message.info {
    background: rgba(102, 126, 234, 0.15);
    border-left: 3px solid var(--primary);
    color: var(--primary-light);
}

/* =========================================================
   INDEX PAGE - Header
   ========================================================= */
.app-header {
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 960px;
    margin: 0 auto;
    padding: 1.25rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-logo {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-1);
    flex-shrink: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.main-nav {
    display: flex;
    gap: 2rem;
    align-items: center;
    margin-right: 0.5rem;
    visibility: hidden;
}

.main-nav.loaded {
    visibility: visible;
}

/* Group notification bell and user avatar together */
.header-icons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    visibility: hidden;
}

.header-icons.loaded {
    visibility: visible;
}

.nav-link {
    color: var(--text-2);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -1.25rem;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s;
}

.nav-link:hover {
    color: var(--text-1);
}

.nav-link.active {
    color: var(--text-1);
}

.nav-link.active::after {
    width: 100%;
}

/* User avatar & dropdown */
.user-wrapper {
    position: relative;
}

.user-avatar {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.user-avatar svg {
    stroke-width: 2.5;
}

/* Force icon img sizes regardless of HTML attributes */
.user-avatar img { width: 14px; height: 14px; }
.notif-bell img  { width: 15px; height: 15px; }
.hamburger-btn img { width: 18px; height: 18px; }

.user-avatar:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.user-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 50px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 10px;
    min-width: 140px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

.dropdown-item {
    display: block;
    padding: 0.8rem 1rem;
    color: var(--text-1);
    text-decoration: none;
    font-size: 0.9rem;
}

.dropdown-item:hover {
    background: var(--primary);
    color: white;
    border-radius: 10px;
}

/* Hamburger menu button */
.hamburger-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-1);
    cursor: pointer;
    padding: 0.5rem;
}

.hamburger-btn svg {
    stroke-width: 2.5;
}

.mobile-menu {
    display: none;
    flex-direction: column;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.5rem;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 50;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.mobile-link {
    color: var(--text-1);
    padding: 0.75rem 0;
    text-decoration: none;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-link:hover {
    color: var(--primary);
}

.mobile-link:last-child {
    border-bottom: none;
}

/* =========================================================
   INDEX PAGE - Main Content
   ========================================================= */
.main-content {
    max-width: 960px;
    margin: 0 auto;
    padding: 3rem 2rem;
    opacity: 0;
    transition: opacity 0.15s ease;
}

/* Show main content after JS loads data */
.main-content.loaded {
    opacity: 1;
}

/* =========================================================
   LOADING SCREEN
   ========================================================= */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-base);
    z-index: 9999;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.loader-text {
    margin-top: 1rem;
    color: var(--text-2);
    font-size: 0.85rem;
    letter-spacing: 0.05em;
}

.loader-dots::after {
    content: '';
    animation: loadDots 1.5s steps(4, end) infinite;
}

@keyframes loadDots {
    0% { content: ''; }
    25% { content: '.'; }
    50% { content: '..'; }
    75% { content: '...'; }
}

.layout-dashboard {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.hero-title {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.text-muted {
    font-size: 1.1rem;
    color: var(--text-2);
    margin-bottom: 0.75rem;
}

/* =========================================================
   INDEX PAGE - Stats Grid
   ========================================================= */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.stat-item:hover {
    background: var(--bg-elevated);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.stat-val {
    font-size: 1.4rem;
    font-weight: 700;
}

.stat-lbl {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Star rating display */
.star-rating {
    display: flex;
    gap: 0.35rem;
    justify-content: center;
    align-items: center;
    min-height: 36px;
}

.star-rating img { width: 28px; height: 28px; }

.purple-star-count {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.purple-star-count img { width: 28px; height: 28px; }

/* Badge inline icons (status badges, member cards) */
.status-badge img,
.member-role img,
.project-meta img { width: 14px; height: 14px; }

.purple-star-num {
    font-size: 1.4rem;
    font-weight: 700;
    color: #a855f7;
}

/* =========================================================
   INDEX PAGE - Cards & Projects
   ========================================================= */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.2s;
}

.card-hover:hover {
    background: var(--bg-elevated);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.project-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-1);
}

.card-desc {
    font-size: 0.9rem;
    color: var(--text-2);
    line-height: 1.5;
}

.project-meta {
    display: flex;
    gap: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-2);
    margin-top: 1rem;
}

.meta-inline img {
    vertical-align: middle;
    margin-right: 4px;
}

.text-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.text-link:hover {
    color: var(--primary-light);
}

.discover-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

/* Discover CTA card on dashboard */
.discover-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
}

.discover-cta:hover {
    border-color: var(--primary);
    background: rgba(102, 126, 234, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.15);
}

.discover-cta-content {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.discover-cta-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.discover-cta-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.discover-cta-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-1);
    margin-bottom: 0.15rem;
}

.discover-cta-desc {
    font-size: 0.85rem;
    color: var(--text-2);
    margin: 0;
}

.discover-cta-arrow {
    width: 24px;
    height: 24px;
    color: var(--text-3);
    flex-shrink: 0;
    transition: transform 0.2s, color 0.2s;
}

.discover-cta:hover .discover-cta-arrow {
    color: var(--primary);
    transform: translateX(4px);
}

.card-tags {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.tag {
    color: var(--primary);
    font-weight: 500;
    font-size: 0.85rem;
}

/* =========================================================
   BADGES
   ========================================================= */
.badge {
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-group {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    flex-shrink: 0;
}

.badge-type-software {
    background: rgba(102, 126, 234, 0.15);
    color: var(--primary);
}

.badge-type-research {
    background: rgba(20, 184, 166, 0.15);
    color: #14b8a6;
}

.badge-success {
    background: rgba(63, 185, 80, 0.15);
    color: var(--success);
}

.badge-warn {
    background: rgba(210, 153, 34, 0.15);
    color: var(--warning);
}

.badge-completed {
    background: rgba(234, 179, 8, 0.15);
    color: #eab308;
}

.badge-left {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.badge-kicked {
    background: rgba(220, 38, 38, 0.15);
    color: #dc2626;
}

.badge-deleted {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.badge-info {
    background: rgba(102, 126, 234, 0.15);
    color: var(--primary);
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.btn-outline {
    background: var(--surface);
    color: var(--text-1);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    background: var(--bg-elevated);
    border-color: var(--primary);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
}

/* =========================================================
   UTILITY CLASSES
   ========================================================= */
/* Repo slide box */
.repo-slidebox {
    position: relative;
}

.repo-slidebox-trigger {
    width: 100%;
    padding: .875rem 1rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: var(--text-1);
    font-family: inherit;
    font-size: inherit;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.repo-slidebox-trigger:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--text-3);
}

.repo-slidebox-trigger:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.repo-slidebox-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.repo-slidebox-arrow {
    flex-shrink: 0;
    margin-left: 0.5rem;
    color: var(--text-2);
    transition: transform 0.3s;
}

.repo-slidebox.open .repo-slidebox-arrow {
    transform: rotate(180deg);
}

.repo-slidebox.open .repo-slidebox-trigger {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.repo-slidebox-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    border: 1px solid transparent;
    border-top: none;
    border-radius: 0 0 12px 12px;
    background: rgba(255, 255, 255, 0.04);
}

.repo-slidebox.open .repo-slidebox-panel {
    max-height: 240px;
    border-color: var(--primary-light);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.repo-search-wrapper {
    padding: 0.5rem;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--bg-elevated);
    z-index: 1;
}

.repo-search-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-1);
    font-family: inherit;
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.2s;
}

.repo-search-input:focus {
    border-color: var(--primary-light);
}

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

.repo-slidebox-list {
    overflow-y: auto;
    max-height: 200px;
}

.repo-no-results {
    padding: 1rem;
    text-align: center;
    color: var(--text-3);
    font-size: 0.85rem;
}

.repo-slidebox-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-1);
    border-bottom: 1px solid var(--border);
}

.repo-slidebox-item:last-child {
    border-bottom: none;
}

.repo-slidebox-item:hover {
    background: rgba(102, 126, 234, 0.1);
}

.repo-slidebox-item.selected {
    background: rgba(102, 126, 234, 0.15);
    color: var(--primary-light);
}

.repo-slidebox-item .repo-private-badge {
    font-size: 0.7rem;
    padding: 0.1rem 0.4rem;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-2);
    margin-left: auto;
    flex-shrink: 0;
}

.repo-warning {
    display: block;
    color: #f85149;
    font-size: 0.8rem;
    margin-top: 0.4rem;
}

/* Textarea styling for project descriptions */
textarea.input-field {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
    line-height: 1.5;
}

/* Tag button styles (for project creation form) */
.type-toggle {
    display: flex;
    gap: 0.5rem;
}

.type-btn {
    padding: 0.5rem 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-2);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.type-btn:hover {
    border-color: var(--primary);
    color: var(--text-1);
}

.type-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.tag-btn {
    padding: 0.5rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-2);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.tag-btn:hover {
    background: var(--bg-elevated);
    border-color: var(--primary);
    color: var(--text-1);
}

.tag-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* Project tags display (in project cards) */
.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.project-tag {
    padding: 0.25rem 0.75rem;
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.3);
    border-radius: 12px;
    color: var(--primary-light);
    font-size: 0.75rem;
    font-weight: 500;
}

/* GitHub repo tag shown alongside project tags */
.repo-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.75rem;
    background: rgba(139, 148, 158, 0.1);
    border: 1px solid rgba(139, 148, 158, 0.3);
    border-radius: 12px;
    color: var(--text-2);
    font-size: 0.75rem;
    font-weight: 500;
}

.repo-tag img {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* Looking for roles display */
.project-looking-for {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.looking-for-label {
    font-size: 0.8rem;
    color: var(--text-3);
    font-weight: 500;
}

.role-tag {
    padding: 0.25rem 0.75rem;
    background: rgba(63, 185, 80, 0.1);
    border: 1px solid rgba(63, 185, 80, 0.3);
    border-radius: 12px;
    color: var(--success);
    font-size: 0.75rem;
    font-weight: 500;
}

/* Tab styles for projects page */
.project-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    border-bottom: 2px solid var(--border);
}

/* project-detail page sticks tabs flush against content */
.project-detail-page .project-tabs {
    margin-bottom: 0;
}

.tab-btn {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-2);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    margin-bottom: -2px;
}

.tab-btn:hover {
    color: var(--text-1);
    border-bottom-color: var(--text-3);
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    background: #ef4444;
    border-radius: 50%;
    margin-left: 5px;
    vertical-align: middle;
    position: relative;
    top: -1px;
}

/* Tab content */
.tab-content {
    display: none;
}

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

.tab-content > section:first-child,
.tab-content > .section-spacing-top:first-child {
    margin-top: 0 !important;
}

#tabBar {
    margin-top: 0 !important;
}

/* Pagination styles */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination-btn {
    padding: 0.5rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-2);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
    min-width: 40px;
}

.pagination-btn:hover {
    background: var(--bg-elevated);
    border-color: var(--primary);
    color: var(--text-1);
}

.pagination-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.section-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.section-center {
    text-align: center;
    margin-top: 2rem;
}

.card-bottom-gap {
    margin-bottom: 1rem;
}

.no-margin {
    margin: 0 !important;
}

/* =========================================================
   MODAL OVERLAY & DETAIL VIEW
   ========================================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-2);
    cursor: pointer;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--bg-base);
    border-color: var(--primary);
    color: var(--text-1);
}

/* Custom scrollbar for modal */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: var(--surface);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* =========================================================
   RESPONSIVE - TABLET
   ========================================================= */
@media (max-width: 900px) {
    .auth-box {
        grid-template-columns: 1fr;
    }

    .brand-panel {
        display: none;
    }

    .form-panel {
        padding: 2rem 1.5rem;
    }

    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
    }

    .discover-grid {
        grid-template-columns: 1fr;
    }

    .main-nav {
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .main-content {
        padding: 2rem 1rem;
    }

    .header-content {
        padding: 1rem;
    }

    .main-nav {
        gap: 1rem;
    }

    .nav-link {
        font-size: 0.85rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .modal-overlay {
        padding: 1rem;
    }

    .modal-content {
        padding: 1.5rem;
        max-height: 95vh;
    }

    .modal-close {
        top: 1rem;
        right: 1rem;
    }

    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
}

/* =========================================================
   RESPONSIVE - MOBILE
   ========================================================= */
@media (max-width: 600px) {
    .main-nav {
        display: none !important;
    }

    .hamburger-btn {
        display: block;
    }

    .header-right {
        gap: 0.75rem;
    }

    .header-icons {
        gap: 0.25rem;
    }

    .header-logo {
        font-size: 1.15rem;
    }

    .user-avatar {
        width: 26px;
        height: 26px;
    }

    .notif-bell {
        padding: 0.3rem;
    }

    /* Page titles */
    .hero-title,
    .page-title {
        font-size: 1.2rem;
    }

    /* Stats grid: smaller padding, tighter */
    .stats-grid {
        gap: 0.75rem;
        margin-top: 1rem;
    }

    .stat-item {
        padding: 0.75rem 0.5rem;
        border-radius: 10px;
    }

    .stat-val {
        font-size: 1.1rem;
    }

    .stat-lbl {
        font-size: 0.72rem;
    }

    .star-rating img {
        width: 22px;
        height: 22px;
    }

    .purple-star-num {
        font-size: 1.1rem;
    }

    /* Discover CTA card */
    .discover-cta {
        padding: 1rem;
    }

    .discover-cta-icon {
        width: 36px;
        height: 36px;
        border-radius: 8px;
    }

    .discover-cta-icon svg {
        width: 18px;
        height: 18px;
    }

    .discover-cta-title {
        font-size: 0.95rem;
    }

    .discover-cta-desc {
        font-size: 0.8rem;
    }

    /* Cards */
    .card {
        padding: 1rem;
        border-radius: 10px;
    }

    .card-title {
        font-size: 0.95rem;
    }

    .card-desc {
        font-size: 0.82rem;
    }

    /* Project card: stack title and badges vertically */
    .project-card-header {
        flex-direction: column;
        gap: 0.5rem;
    }

    .badge-group {
        flex-shrink: 1;
        flex-wrap: wrap;
    }

    /* Section headers */
    .section-heading {
        font-size: 1rem;
    }

    .section-header {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    /* Main content top padding */
    .main-content {
        padding: 1.5rem 1rem;
    }

    /* Discover page */
    .filter-section {
        margin-bottom: 1rem;
    }

    .filter-section label,
    .filter-label {
        font-size: 0.8rem;
    }

    .tag-btn {
        padding: 0.35rem 0.65rem;
        font-size: 0.75rem;
        border-radius: 5px;
    }

    .filter-buttons-group {
        gap: 0.35rem;
    }

    .input-field {
        padding: 0.65rem 0.875rem;
        font-size: 0.85rem;
        border-radius: 10px;
    }

    .section-spacing-top {
        margin-top: 1.25rem;
    }

    .page-subtitle,
    .hero-subtitle {
        font-size: 0.85rem;
    }
}

/* Profile page styles */
/* Profile hero */
.profile-hero {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.75rem;
}

.profile-avatar-large {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
    letter-spacing: -0.02em;
}

.profile-hero-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-1);
    margin-bottom: 0.25rem;
}

.profile-hero-meta {
    font-size: 0.85rem;
    color: var(--text-3);
}

/* Two-column grid */
.profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.profile-card {
    padding: 1.75rem;
    margin-top: 0;
}

.profile-card-github {
    margin-bottom: 0;
}

.profile-data {
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

.profile-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.profile-card-header .card-title {
    margin: 0;
}

.profile-github-left {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.profile-info-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border);
}

.profile-info-row:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.profile-info-label {
    font-size: 0.75rem;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    min-width: 90px;
    flex-shrink: 0;
}

.profile-info-value {
    font-size: 0.95rem;
    color: var(--text-1);
}

.profile-edit-form {
    display: none;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.profile-edit-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

@media (max-width: 768px) {
    .profile-grid {
        grid-template-columns: 1fr;
    }
}

/* Auth page checkbox spacing */
.checkbox-spaced {
    margin-bottom: 1.5rem;
}

/* =========================================================
   JOIN REQUEST CARDS
   ========================================================= */
/* Request Card */
.request-card {
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 1rem;
    background: var(--surface);
}

.request-card:last-child {
    margin-bottom: 0;
}

.request-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.request-user {
    font-weight: 600;
    color: var(--text-1);
    margin-bottom: 0.25rem;
}

.request-project {
    font-size: 0.85rem;
    color: var(--text-2);
}

.request-time {
    font-size: 0.75rem;
    color: var(--text-3);
}

.request-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

/* =========================================================
   CTA BANNER (AUTH PAGE)
   ========================================================= */
.cta-banner {
    max-width: 600px;
    margin: 0 auto 2rem auto;
    padding: 1.5rem 2rem;
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.15), rgba(139, 92, 246, 0.08));
    border-radius: 16px;
    border: 1px solid rgba(124, 58, 237, 0.3);
    box-shadow: 0 8px 32px rgba(124, 58, 237, 0.1);
}

.cta-banner-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-1);
    margin-bottom: 0.5rem;
    text-align: center;
}

.cta-banner-text {
    font-size: 1rem;
    color: var(--text-2);
    margin-bottom: 1.5rem;
    text-align: center;
    line-height: 1.6;
}

.cta-banner-highlight {
    color: var(--primary);
}

.cta-banner-btn {
    display: block;
    text-decoration: none;
    text-align: center;
    padding: 1rem 2rem;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

/* =========================================================
   FILTERS & MODALS
   ========================================================= */
.filter-section {
    margin-bottom: 2rem;
}

.filter-buttons-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.modal-overlay-hidden {
    display: none;
}

.modal-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

/* =========================================================
   LAYOUT UTILITIES
   ========================================================= */
.section-header-flex {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.section-spacing-top {
    margin-top: 2rem;
}

.section-heading {
    margin-top: 0;
    margin-bottom: 1rem;
}

.back-button-container {
    margin-bottom: 1rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
}

.tag-buttons-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.role-checkboxes-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

/* =========================================================
   STATE CLASSES (VISIBILITY TOGGLES)
   ========================================================= */
.new-project-form-hidden {
    display: none;
    margin-bottom: 1.5rem;
}

/* =========================================================
   GITHUB MESSAGE STYLES (Profile page)
   ========================================================= */
.github-message {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.github-message-success {
    background: rgba(63, 185, 80, 0.15);
    border: 1px solid rgba(63, 185, 80, 0.3);
    color: var(--success);
}

.github-message-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #fca5a5;
}

/* =========================================================
   COMMIT HISTORY
   ========================================================= */
.commit-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 0;
}

.commit-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.55rem 0.75rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    position: relative;
    transition: background 0.15s, border-color 0.15s;
}

.commit-item:hover {
    background: var(--bg-elevated);
    border-color: var(--text-3);
}

.commit-avatar {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    flex-shrink: 0;
}

.commit-avatar-placeholder {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--text-3);
    font-size: 0.65rem;
    font-weight: 600;
}

.commit-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    overflow: hidden;
}

.commit-message {
    color: var(--text-1);
    font-size: 0.82rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.commit-message-title {
    font-weight: 500;
}

.commit-message-body {
    display: none;
}

.commit-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.7rem;
    color: var(--text-3);
}

/* Right side cluster: rating + review button */
.commit-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-shrink: 0;
    margin-left: 0.5rem;
}

.commit-review-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.6rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text-2);
    font-size: 0.72rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
}

.commit-review-btn:hover {
    background: var(--surface);
    border-color: var(--primary);
    color: var(--text-1);
    transform: translateY(-1px);
}

.commit-review-btn img {
    opacity: 0.85;
}

.commit-review-sha {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.65rem;
    color: var(--text-3);
    padding-left: 0.25rem;
    border-left: 1px solid var(--border);
    margin-left: 0.1rem;
}

/* Right side: 5-star effort rating */
.commit-rating {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
    margin-left: 0.5rem;
}

.commit-rating-stars {
    display: inline-flex;
    gap: 1px;
    font-size: 0.85rem;
    line-height: 1;
}

.commit-rating-star {
    color: var(--text-3);
    opacity: 0.4;
}

.commit-rating-star.filled {
    color: #f5c518;
    opacity: 1;
}

.commit-rating-star.half {
    background: linear-gradient(90deg, #f5c518 50%, var(--text-3) 50%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    opacity: 1;
}

.commit-rating-value {
    font-size: 0.7rem;
    color: var(--text-2);
    font-variant-numeric: tabular-nums;
    min-width: 1.8em;
    text-align: right;
}

.commit-author {
    color: var(--text-2);
    font-weight: 500;
}

.commit-sha {
    font-family: monospace;
    color: var(--primary-light);
    text-decoration: none;
    font-size: 0.75rem;
}

.commit-sha:hover {
    text-decoration: underline;
}

#commitsContainer,
#commitsPagination {
    transition: opacity 0.15s ease;
}

.commits-loading {
    text-align: center;
    padding: 2rem;
    color: var(--text-3);
}

.commits-empty {
    text-align: center;
    padding: 2rem;
    color: var(--text-3);
}

/* =========================================================
   UTILITY / LAYOUT HELPERS
   ========================================================= */
/* Flex row: space-between, top-aligned */
.flex-between-start {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

/* Flex row: space-between, vertically centered */
.flex-between-center {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Action button row */
.action-row {
    display: flex;
    gap: 1rem;
}

/* Card with reduced padding (e.g. member cards) */
.card-sm {
    padding: 1rem;
}

/* Centered content inside a card */
.card-centered {
    text-align: center;
}

/* Clickable card (cursor + pointer) */
.card-clickable {
    cursor: pointer;
}

/* Section block with top margin */
.section-block {
    margin-top: 1rem;
}

/* Project meta with reduced top margin override */
.project-meta-sm {
    margin-top: 0.5rem;
}

/* Looking-for strip without the top border/padding */
.project-looking-for-flush {
    border-top: none;
    padding-top: 0;
}

/* Member name text */
.member-name {
    font-weight: 600;
    color: var(--text-1);
}

/* Member role text */
.member-role {
    font-size: 0.85rem;
    color: var(--text-2);
    margin-top: 0.25rem;
}

.section-heading-gold {
    color: #f5c518;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.gold-star {
    color: #f5c518;
    font-size: 1rem;
    line-height: 1;
}

/* Compact kick vote row */
.kick-vote-row {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.6rem 0.85rem;
    margin-bottom: 0.4rem;
    transition: background 0.15s, border-color 0.15s;
}

.kick-vote-row:hover {
    background: var(--bg-elevated);
    border-color: var(--text-3);
}

.kick-vote-row-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.kick-vote-row-info {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
    flex: 1;
}

.kick-vote-row-title {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.kick-vote-row-title .member-name {
    font-size: 0.9rem;
    font-weight: 600;
}

.kick-vote-row-meta {
    display: flex;
    gap: 0.7rem;
    font-size: 0.72rem;
    color: var(--text-3);
    flex-wrap: wrap;
}

/* Compact team member row (replaces large .card based layout) */
.member-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0.85rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 0.4rem;
    transition: background 0.15s, border-color 0.15s;
}

.member-row:hover {
    background: var(--bg-elevated);
    border-color: var(--text-3);
}

.member-row-info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
    flex: 1;
}

.member-row-top {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.member-row-top .member-name {
    font-size: 0.9rem;
    font-weight: 600;
}

.member-role-inline {
    font-size: 0.72rem;
    color: var(--text-3);
}

.member-row-meta {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 0.72rem;
    color: var(--text-3);
    flex-wrap: wrap;
}

.member-joined-inline {
    color: var(--text-3);
}

.member-row .member-github {
    margin-top: 0;
    font-size: 0.72rem;
}

.member-github {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.78rem;
    color: var(--text-2);
    margin-top: 0.25rem;
    text-decoration: none;
}

.member-github:hover {
    color: var(--primary);
}

.member-github img {
    opacity: 0.8;
}

/* Member join date text */
.member-joined {
    font-size: 0.75rem;
    color: var(--text-3);
    margin-top: 0.25rem;
}

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

/* Success variant for btn-outline (complete) */
.btn-success {
    color: var(--success);
    border-color: var(--success);
}

.btn-success:hover {
    background: rgba(63, 185, 80, 0.08);
    border-color: var(--success);
}

/* Danger variant for btn-outline (delete / leave) */
.btn-danger {
    color: #ef4444;
    border-color: #ef4444;
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.08);
    border-color: #ef4444;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* Active/selected state for vote buttons */
.btn-active {
    background: rgba(102, 126, 234, 0.2);
    border-color: var(--primary);
    color: var(--primary);
}

/* Moderator management two-column layout */
.mod-tables-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

@media (max-width: 600px) {
    .mod-tables-grid {
        grid-template-columns: 1fr;
    }
}

.mod-table-card {
    padding: 1rem;
}

.mod-table-header {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-2);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.mod-table-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(48, 54, 61, 0.5);
}

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

/* Divider inside edit modal */
.modal-divider {
    border: none;
    border-top: 1px solid var(--border, #30363d);
    margin: 1.25rem 0;
}

/* Danger zone — GitHub-style delete confirmation */
.danger-zone {
    margin-top: 1.25rem;
    padding: 1rem;
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.04);
}

.danger-zone-header {
    font-weight: 600;
    color: #ef4444;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.danger-zone-desc {
    font-size: 0.85rem;
    color: var(--text-2, #8b949e);
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.danger-zone-desc strong {
    color: var(--text-1);
}

.danger-zone-input {
    margin-bottom: 0.75rem;
}

/* Commit date group label */
.commit-date-label {
    margin-top: 0.85rem;
    margin-bottom: 0.4rem;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-3);
    font-weight: 600;
    padding-left: 0.2rem;
}

.commit-date-label:first-of-type {
    margin-top: 0;
}

.commit-sha {
    background: var(--bg-elevated);
    color: var(--text-2);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.68rem;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.commit-sha:hover {
    background: var(--border);
    color: var(--text-1);
}

.commit-author {
    font-weight: 500;
    color: var(--text-2);
}

/* Hidden by default — toggled by JS */
.hidden {
    display: none;
}

/* =========================================================
   NOTIFICATION BELL & PANEL
   ========================================================= */
.notif-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.notif-bell {
    position: relative;
    background: none;
    border: none;
    color: var(--text-2);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notif-bell:hover {
    color: var(--text-1);
    background: var(--surface);
}

.notif-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background: #ef4444;
    color: white;
    border-radius: 50%;
    width: 14px;
    height: 14px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0.55rem;
    font-weight: 700;
}

.notif-panel {
    display: none;
    position: absolute;
    top: 50px;
    right: 0;
    width: 360px;
    max-height: 420px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
    z-index: 200;
    overflow: hidden;
}

.notif-panel.open {
    display: block;
}

.notif-panel-header {
    padding: 1rem 1.25rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-1);
    border-bottom: 1px solid var(--border);
}

.notif-panel-body {
    overflow-y: auto;
    max-height: 360px;
}

.notif-empty {
    padding: 2rem;
    text-align: center;
    color: var(--text-3);
    font-size: 0.85rem;
}

.notif-item-sys {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.6rem 1rem 0.6rem 0.75rem;
    border-bottom: 1px solid var(--border);
    border-left: 3px solid transparent;
    transition: background 0.1s;
}

.notif-item-sys:last-child {
    border-bottom: none;
}

.notif-item-sys:hover {
    background: var(--surface);
}

/* Left border color by type */
.notif-item-sys.nc-join    { border-left-color: var(--primary); }
.notif-item-sys.nc-chat    { border-left-color: #22c55e; }
.notif-item-sys.nc-kick    { border-left-color: #ef4444; }
.notif-item-sys.nc-accept  { border-left-color: #22c55e; }
.notif-item-sys.nc-reject  { border-left-color: var(--text-3); }
.notif-item-sys.nc-deleted { border-left-color: var(--text-3); }
.notif-item-sys.nc-done    { border-left-color: var(--primary); }

.notif-sys-left {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
    flex: 1;
}

.notif-sys-title {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-1);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-sys-sub {
    font-size: 0.72rem;
    color: var(--text-3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-sys-right {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
}

.notif-btn-action {
    font-size: 0.72rem;
    color: var(--primary);
    text-decoration: none;
    white-space: nowrap;
    transition: opacity 0.15s;
}

.notif-btn-action:hover {
    opacity: 0.7;
}

.notif-btn-dismiss {
    background: none;
    border: none;
    color: var(--text-3);
    font-size: 0.7rem;
    cursor: pointer;
    padding: 0.1rem 0.25rem;
    line-height: 1;
    transition: color 0.15s;
}

.notif-btn-dismiss:hover {
    color: var(--text-1);
}

.notif-item-user {
    font-size: 0.75rem;
    color: var(--text-3);
    margin-top: 0.15rem;
}

.notif-item-project {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-1);
}

.notif-item-time {
    font-size: 0.7rem;
    color: var(--text-3);
    margin-top: 0.15rem;
}

.notif-item-actions {
    display: flex;
    gap: 0.5rem;
}

.notif-btn {
    padding: 0.35rem 0.85rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.notif-btn-accept {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.notif-btn-accept:hover {
    background: var(--primary-dark);
}

.notif-btn-reject {
    background: transparent;
    color: var(--text-2);
}

.notif-btn-reject:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    color: #ef4444;
}

/* Custom scrollbar for notif panel */
.notif-panel-body::-webkit-scrollbar {
    width: 6px;
}

.notif-panel-body::-webkit-scrollbar-track {
    background: transparent;
}

.notif-panel-body::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

@media (max-width: 600px) {
    .notif-panel {
        position: fixed;
        top: auto;
        right: 1rem;
        left: 1rem;
        width: auto;
        bottom: 1rem;
        max-height: 70vh;
    }
}

/* =========================================================
   TOAST NOTIFICATIONS
   ========================================================= */
.confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.15s;
}

.confirm-overlay.confirm-visible {
    opacity: 1;
}

.confirm-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    max-width: 360px;
    width: 90%;
    transform: scale(0.95);
    transition: transform 0.15s;
}

.confirm-overlay.confirm-visible .confirm-box {
    transform: scale(1);
}

.confirm-message {
    color: var(--text-1);
    font-size: 0.95rem;
    margin: 0 0 1.25rem;
    line-height: 1.5;
}

.confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.toast-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.toast {
    min-width: 280px;
    max-width: 420px;
    padding: 1rem 1.25rem;
    border-radius: 10px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-left: 4px solid var(--info);
    color: var(--text-1);
    font-size: 0.9rem;
    line-height: 1.5;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    pointer-events: auto;
    cursor: pointer;
    opacity: 0;
    transform: translateX(100%);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.toast-visible {
    opacity: 1;
    transform: translateX(0);
}

/* Join request cards in admin panel */
.req-card {
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.req-card:hover {
    border-color: var(--primary);
    background: rgba(102, 126, 234, 0.05);
}

.req-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.req-card-left {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-width: 0;
}

.req-card-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.4rem;
    flex-shrink: 0;
}

.req-card-name-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.req-card-name-row .commit-rating {
    margin-left: 0;
}

.req-card-name-row .commit-rating-stars {
    font-size: 0.8rem;
}

.req-card-name-row .commit-rating-value {
    font-size: 0.7rem;
    opacity: 0.85;
}

.req-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.req-meta-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    color: var(--text-2);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.1rem 0.4rem;
}

.req-meta-date {
    font-size: 0.75rem;
    color: var(--text-3);
}

.req-card-message {
    margin-top: 0.6rem;
    font-size: 0.82rem;
    color: var(--text-2);
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Chat status badges on request cards */
.req-chat-status {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.req-chat-new {
    background: rgba(102, 126, 234, 0.15);
    color: var(--primary);
    border: 1px solid rgba(102, 126, 234, 0.3);
}

.req-chat-replied {
    background: rgba(72, 199, 142, 0.15);
    color: #48c78e;
    border: 1px solid rgba(72, 199, 142, 0.3);
}

.req-chat-waiting {
    background: rgba(255, 189, 46, 0.15);
    color: #ffbd2e;
    border: 1px solid rgba(255, 189, 46, 0.3);
}

/* Centered empty-state message inside containers */
.empty-state {
    text-align: center;
    padding: 2rem 0;
}

/* Pending request card subparts */
.pending-card-clickable {
    cursor: pointer;
    flex: 1;
}

.pending-card-message {
    margin-top: 0.25rem;
    font-size: 0.8rem;
}

.pending-card-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-left: 1rem;
}

/* Pagination footer count (e.g. "(8 members)") */
.health-page-count {
    font-size: 0.75rem;
    opacity: 0.6;
}

/* Small muted text variants */
.text-sm {
    font-size: 0.85rem;
}

.text-xs {
    font-size: 0.8rem;
}

.text-success {
    color: var(--success);
}

.text-danger {
    color: #ef4444;
}

/* Kick vote action row + info notes */
.vote-info-note {
    margin-top: 0.5rem;
    font-size: 0.8rem;
}

.vote-actions-row {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    align-items: center;
}

.vote-locked-label {
    font-size: 0.75rem;
}

/* Collapsible/flex headings: kill default margin */
.collapsible-heading > .section-heading,
.section-heading.section-heading-flat,
.flex-between-center > .section-heading {
    margin: 0;
}

.section-heading-sub {
    font-size: 1rem;
    margin: 0;
}

.collapsible-heading.collapsible-heading-spaced {
    margin-top: 1rem;
}

.section-toolbar {
    margin-bottom: 1rem;
}

/* Quick Settings cards */
.quick-card {
    padding: 1.25rem;
}

.quick-card-stack {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.75rem;
}

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

.quick-card-status {
    font-size: 1rem;
    font-weight: 500;
}

.quick-card-hint {
    margin-top: 0.5rem;
    font-size: 0.8rem;
}

.quick-card-desc {
    font-size: 0.85rem;
    margin: 0;
}

.quick-card-action {
    align-self: flex-start;
}

/* Modal title row used in custom modal headers */
.modal-title-row .card-title {
    margin: 0;
}

.modal-close-inline {
    position: static;
}

/* Edit modal recruitment hint */
.edit-recruit-hint {
    font-size: 0.85rem;
    margin: 0;
}

.edit-recruit-hint strong,
.edit-recruit-hint .editRecruitStatusLabel {
    font-weight: 600;
}

/* Kick vote modal */
.kick-modal-content {
    max-width: 420px;
}

.kick-modal-desc {
    margin-bottom: 1rem;
    font-size: 0.85rem;
}

.kick-modal-select {
    width: 100%;
    margin-bottom: 1rem;
}

.btn-block {
    width: 100%;
}

.spaced-top {
    margin-top: 1rem;
}

.collapsible-chevron.rotated {
    transform: rotate(180deg);
}

.toast-exit {
    opacity: 0;
    transform: translateX(100%);
}

.toast-success {
    border-left-color: var(--success);
}

.toast-error {
    border-left-color: #ef4444;
}

.toast-info {
    border-left-color: var(--info);
}

@media (max-width: 600px) {
    .toast-container {
        top: 1rem;
        right: 1rem;
        left: 1rem;
    }

    .toast {
        min-width: 0;
        max-width: 100%;
    }
}

/* =========================================================
   REQUEST DETAIL MODAL — Profile + Chat
   ========================================================= */
.request-detail-modal-content {
    max-width: 800px;
    width: 100%;
    padding: 1.5rem;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.request-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.request-detail-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 1.5rem;
    flex: 1;
    min-height: 0;
}

/* Profile panel */
.request-profile-panel {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    border-right: 1px solid var(--border);
    padding-right: 1.5rem;
    overflow-y: auto;
}

.request-profile-avatar {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 700;
}

.request-profile-username {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-1);
}

.request-profile-meta {
    font-size: 0.8rem;
    color: var(--text-2);
}

.request-profile-github a {
    font-size: 0.8rem;
    color: var(--primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.request-profile-github a:hover {
    text-decoration: underline;
}

.request-profile-stars {
    display: flex;
    gap: 0.2rem;
    align-items: center;
}

.request-profile-stars img {
    width: 16px;
    height: 16px;
}

.stars-mock-label {
    font-size: 0.7rem;
    color: var(--text-3);
    margin-left: 0.25rem;
}

.request-profile-projects h4 {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-2);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Reused for applicant-side project info sections */
.profile-tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.profile-tag {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-2);
    font-size: 0.7rem;
    font-weight: 500;
}

.profile-section h4 {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-2);
    margin: 0 0 0.4rem 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.profile-section-text {
    font-size: 0.82rem;
    color: var(--text-2);
    line-height: 1.5;
    margin: 0;
}

.profile-quote {
    border-left: 2px solid var(--border);
    padding-left: 0.6rem;
    color: var(--text-3);
    font-style: italic;
}

/* =========================================================
   PROJECT HEALTH
   ========================================================= */

/* collapsible section heading — heading stays, chevron sits to the right */
.collapsible-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
}

.collapsible-heading:hover .collapsible-chevron {
    background: var(--bg-elevated);
    border-color: var(--text-3);
    color: var(--text-1);
}

.collapsible-chevron {
    font-size: 0.85rem;
    color: var(--text-2);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    transform-origin: center;
    flex-shrink: 0;
    margin-left: 0.5rem;
}

/* status dot is now neutral — colored states deprecated to avoid notification confusion */
.health-status-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--text-3);
    opacity: 0.5;
    flex-shrink: 0;
    margin-right: 0.5rem;
    vertical-align: middle;
}

.health-status-dot.dot-ok,
.health-status-dot.dot-warn,
.health-status-dot.dot-error {
    background: var(--text-3);
    opacity: 0.5;
}

.health-panel {
    overflow: hidden;
    max-height: 0;
    padding-top: 0;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.2s ease, padding-top 0.3s ease;
}

.health-panel.open {
    max-height: 900px;
    opacity: 1;
    padding-top: 0.85rem;
}

.health-panel-inner {
    padding-top: 0.75rem;
}

.health-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}

.health-page-info {
    font-size: 0.82rem;
    color: var(--text-2);
    min-width: 60px;
    text-align: center;
}

.health-page-btn {
    min-width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0 0.5rem;
    color: var(--text-2);
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    font-family: inherit;
    padding: 0;
}

.health-page-btn:hover:not(:disabled) {
    background: var(--bg-elevated);
    border-color: var(--text-3);
    color: var(--text-1);
}

.health-page-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.health-page-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    font-weight: 600;
}

.health-ok {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--success, #4caf50);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.7rem 0.85rem;
}

.health-issue {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border-left: 3px solid var(--border);
    background: var(--surface);
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    transition: opacity 0.2s;
}

.health-issue-read .health-issue-body {
    opacity: 0.45;
}

.health-delete-btn {
    width: 28px !important;
    min-width: 28px !important;
    height: 28px;
    padding: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.health-issue-body {
    flex: 1;
    min-width: 0;
}

.health-issue-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    width: 220px;
    justify-content: flex-end;
}

.health-issue-actions .btn {
    min-width: 80px;
    white-space: nowrap;
}

.health-resolved-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: #6ee7b7;
    font-weight: 600;
    white-space: nowrap;
    min-width: 80px;
    text-align: center;
}

.health-mod-badge {
    font-size: 0.72rem;
    color: var(--primary-light);
    white-space: nowrap;
    font-weight: 500;
    margin-top: 0.3rem;
}

.health-mod-acked {
    background: rgba(102, 126, 234, 0.15);
    border-color: var(--primary);
    color: var(--text-1);
}

.health-issue-warn {
    border-left-color: #f59e0b;
}

.health-issue-error {
    border-left-color: #ef4444;
}

.health-issue-title {
    font-weight: 600;
    color: var(--text-1);
    margin-bottom: 0.15rem;
}

.health-issue-desc {
    color: var(--text-2);
    font-size: 0.8rem;
}

.profile-project-item {
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.8rem;
}

.profile-project-item:last-child {
    border-bottom: none;
}

.profile-project-name {
    color: var(--text-1);
    font-weight: 500;
}

.profile-project-role {
    color: var(--text-3);
    font-size: 0.75rem;
}

.profile-project-repo {
    font-size: 0.72rem;
    color: var(--text-3);
    margin-top: 0.1rem;
}

/* Chat panel */
.request-chat-panel {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 0;
}

.request-chat-messages {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 200px;
    max-height: 340px;
    padding: 0.5rem;
    background: var(--surface);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.chat-message {
    max-width: 80%;
    padding: 0.5rem 0.75rem;
    border-radius: 10px;
    font-size: 0.85rem;
    line-height: 1.4;
}

.chat-message-self {
    align-self: flex-end;
    background: var(--primary);
    color: white;
    border-bottom-right-radius: 3px;
}

.chat-message-other {
    align-self: flex-start;
    background: var(--bg-elevated);
    color: var(--text-1);
    border-bottom-left-radius: 3px;
}


.chat-message-sender {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-bottom: 0.2rem;
}

.chat-sender-role {
    font-size: 0.65rem;
    color: inherit;
    opacity: 0.75;
    margin-left: 0.25rem;
    font-style: italic;
}

.chat-message-time {
    font-size: 0.68rem;
    opacity: 0.6;
    margin-top: 0.2rem;
    text-align: right;
}

.chat-empty {
    color: var(--text-3);
    font-size: 0.82rem;
    text-align: center;
    margin: auto;
}

.request-chat-input-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.request-chat-input-row .input-field {
    flex: 1;
    padding: 0.6rem 0.875rem;
    font-size: 0.875rem;
}

.request-chat-actions {
    display: flex;
    gap: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}

/* Mobile: stack layout */
@media (max-width: 600px) {
    .request-detail-modal-content {
        padding: 1rem;
        max-height: 95vh;
        overflow-y: auto;
    }

    .request-detail-layout {
        grid-template-columns: 1fr;
    }

    .request-profile-panel {
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding-right: 0;
        padding-bottom: 1rem;
    }

    .request-chat-messages {
        min-height: 150px;
        max-height: 220px;
    }
}