/* Work Page - Main stylesheet for work/greeter page */

/* Fullscreen Background */
.fullscreen-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    overflow: hidden;
    background-color: #1a1a2e;
    pointer-events: none;
}

.scene-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #1a1a2e;
}

.scene-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.background-layer {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    animation: subtle-breathing 6s ease-in-out infinite;
    background-color: #1a1a2e;
}

@keyframes subtle-breathing {
    0%, 100% { 
        transform: scale(1); 
    }
    50% { 
        transform: scale(1.02); 
    }
}

body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: transparent;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

/* Main Container - Two Column Layout */
.work-page-container {
    position: fixed;
    top: var(--content-top-spacing);
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    max-width: 1150px;
    width: calc(100% - 4rem);
    min-height: 650px;
    max-height: calc(100vh - var(--content-top-spacing) - 1.5rem);
    margin: 0 auto;
    padding-left: 0;
    padding-right: 0;
    padding-bottom: 0;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.5rem;
    align-items: stretch;
    overflow: visible;
}

/* ============================================
   DESKTOP FLUID SCALING (1150px - 1024px)
   Graceful compression before tablet breakpoint
   ============================================ */
@media (max-width: 1150px) and (min-width: 1025px) {
    .work-page-container {
        width: calc(100% - 2.5rem);
        gap: 1.25rem;
        grid-template-columns: 260px 1fr;
        min-height: auto;
    }
    
    .work-sidebar {
        padding: 0.85rem;
    }
    
    .sidebar-logo {
        max-width: 120px;
    }
    
    .sidebar-title h1 {
        font-size: 1.15rem;
    }
    
    .role-card-body {
        padding: 1rem 1.25rem;
        gap: 1.25rem;
        grid-template-columns: 1fr 200px;
    }
    
    .role-title {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
        padding-bottom: 0.6rem;
    }
    
    .role-description {
        font-size: 0.85rem;
        line-height: 1.55;
        margin-bottom: 0.85rem;
    }
    
    .role-worker-card {
        padding: 0.85rem;
        min-height: 150px;
    }
    
    .worker-label {
        font-size: 0.6rem !important;
    }
}

/* Smaller desktop - more compact */
@media (max-width: 1080px) and (min-width: 1025px) {
    .work-page-container {
        width: calc(100% - 2rem);
        gap: 1rem;
        grid-template-columns: 240px 1fr;
        min-height: auto;
    }
    
    .work-sidebar {
        padding: 0.75rem;
        gap: 0.75rem;
    }
    
    .sidebar-logo {
        max-width: 100px;
    }
    
    .sidebar-title h1 {
        font-size: 1.1rem;
    }
    
    .sidebar-subtitle {
        font-size: 0.7rem;
    }
    
    .sidebar-user-section {
        min-height: 145px;
        padding: 0.6rem;
    }
    
    .sidebar-avatar-container {
        width: 48px;
        height: 48px;
    }
    
    .sidebar-user-name {
        font-size: 0.9rem;
    }
    
    .sidebar-philosophy p {
        font-size: 0.7rem;
    }
    
    .role-card-body {
        padding: 0.9rem 1rem;
        gap: 1rem;
        grid-template-columns: 1fr 180px;
    }
    
    .role-title {
        font-size: 1.15rem;
        margin-bottom: 0.6rem;
        padding-bottom: 0.5rem;
    }
    
    .role-description {
        font-size: 0.8rem;
        line-height: 1.5;
        margin-bottom: 0.75rem;
    }
    
    .role-worker-card {
        padding: 0.75rem;
        min-height: 140px;
    }
    
    .role-tabs {
        padding: 0.6rem 0.75rem;
        gap: 0.4rem;
    }
    
    .role-tab {
        padding: 0.4rem 0.75rem;
        font-size: 0.7rem;
    }
    
    .role-tab-icon {
        width: 14px;
        height: 14px;
    }
    
    .role-tools-compartment {
        padding: 0.85rem 1rem;
    }
    
    .role-card-actions {
        padding: 0.7rem 1rem;
        min-height: 50px;
    }
    
    .action-button {
        padding: 0.5rem 1.25rem;
        font-size: 0.8rem;
        min-width: 150px;
    }
}

@media (max-width: 1024px) {
    .work-page-container {
        position: relative;
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding-left: 1rem;
        padding-right: 1rem;
        padding-top: var(--content-top-spacing);
        padding-bottom: 4rem;
        overflow-y: auto;
        height: auto;
    }
    
    .work-sidebar {
        position: relative;
        height: auto;
    }
    
    .work-content {
        height: auto;
    }
    
    .role-card {
        height: auto;
    }
}

/* ===== LEFT SIDEBAR ===== */
.work-sidebar {
    background: white;
    border: 2px solid var(--user-color, #d0c7f0);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100%;
    overflow-y: auto;
}



/* Sidebar Header */
.sidebar-header {
    text-align: center;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 0.75rem;
}

.sidebar-logo {
    max-width: 140px;
    height: auto;
    margin-bottom: 0.5rem;
}

.sidebar-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin-bottom: 0.25rem;
}

.sidebar-title h1 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--user-color, #734ba1);
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
}

.title-icon {
    width: 18px;
    height: 18px;
}

.sidebar-subtitle {
    margin: 0;
    font-size: 0.75rem;
    color: #666;
    font-style: italic;
}

/* Sidebar User Section */
.sidebar-user-section {
    border: 2px solid #f0f0f0;
    border-radius: 0;
    padding: 0.75rem;
    background: #fafafa;
    min-height: 165px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(139, 115, 85, 0.3);
    border-top: 3px solid #8b7355;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: #666;
    font-size: 0.85rem;
    font-style: italic;
}

/* Sidebar Guest State */
.sidebar-guest {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
    width: 100%;
}

.guest-message {
    color: #666;
    font-size: 0.9rem;
}

.sidebar-login-btn {
    background: var(--user-color, #734ba1);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    width: 100%;
}

.sidebar-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    filter: brightness(1.1);
}

/* Sidebar User Logged In */
.sidebar-user {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.sidebar-avatar-container {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--user-color, #734ba1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

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

.sidebar-user-info {
    text-align: center;
}

.sidebar-user-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #2c1810;
    margin-bottom: 0.15rem;
}

.sidebar-user-handle {
    font-size: 0.75rem;
    color: #666;
    font-family: 'Courier New', monospace;
}

/* Sidebar Work Status */
.sidebar-work-status {
    width: 100%;
    padding-top: 0.5rem;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.status-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.35rem;
}

.status-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.status-badge {
    padding: 0.35rem 0.75rem;
    border-radius: 0;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.working {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #66bb6a;
}

.status-badge.retiring {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffb74d;
}

.status-badge.not-working {
    background: #f5f5f5;
    color: #666;
    border: 1px solid #ccc;
}

/* Role-specific status badge colors (overrides above when role class is present) */
.status-badge.role-greeter {
    background: var(--role-greeter-light);
    color: var(--role-greeter-dark);
    border: 1px solid var(--role-greeter-medium);
}

.status-badge.role-mapper {
    background: var(--role-mapper-light);
    color: var(--role-mapper-dark);
    border: 1px solid var(--role-mapper-medium);
}

.status-badge.role-cogitarian {
    background: var(--role-cogitarian-light);
    color: var(--role-cogitarian-dark);
    border: 1px solid var(--role-cogitarian-medium);
}

.status-badge.role-provisioner {
    background: var(--role-provisioner-light);
    color: var(--role-provisioner-dark);
    border: 1px solid var(--role-provisioner-medium);
}

.status-badge.role-dreamstyler {
    background: var(--role-dreamstyler-light);
    color: var(--role-dreamstyler-dark);
    border: 1px solid var(--role-dreamstyler-medium);
}

.status-badge.role-bursar {
    background: var(--role-bursar-light);
    color: var(--role-bursar-dark);
    border: 1px solid var(--role-bursar-medium);
}

.status-badge.role-cheerful {
    background: var(--role-cheerful-light);
    color: var(--role-cheerful-dark);
    border: 1px solid var(--role-cheerful-medium);
}

.status-badge.role-guardian {
    background: var(--role-guardian-light);
    color: var(--role-guardian-dark);
    border: 1px solid var(--role-guardian-medium);
}

.status-role {
    font-size: 0.75rem;
    color: #666;
    font-style: italic;
}

/* Sidebar Work Action Buttons */
.sidebar-work-actions {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    width: 100%;
    margin-top: 0.5rem;
}

.sidebar-action-btn {
    padding: 0.4rem 0.6rem;
    border: none;
    border-radius: 0;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    width: 100%;
    text-align: center;
    color: white;
    /* Background and border-color set inline via user color */
}

.sidebar-action-btn:hover {
    transform: translateY(-1px);
}

.sidebar-action-btn:active {
    transform: translateY(0);
}

/* Sidebar Philosophy */
.sidebar-philosophy {
    border-top: 2px solid #f0f0f0;
    padding-top: 0.75rem;
}

.sidebar-philosophy p {
    margin: 0 0 0.5rem 0;
    font-size: 0.75rem;
    line-height: 1.5;
    color: #555;
    text-align: center;
}

.sidebar-philosophy p:last-child {
    margin-bottom: 0;
}

/* ===== RIGHT CONTENT AREA ===== */
.work-content {
    display: flex;
    flex-direction: column;
    gap: 0;
    height: 100%;
    overflow: hidden;
    max-width: 800px;
    margin: 0 auto;
}

/* Role Section Titles */
.role-section-title {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #888;
    padding: 0.75rem 1rem 0.25rem;
    background: #fafafa;
    margin: 0;
}

/* Role Tabs Carousel */
.role-tabs-carousel {
    position: relative;
    background: #fafafa;
}

.role-panel {
    transition: opacity 0.2s ease;
}

.role-panel:not(.active) {
    opacity: 0.95;
}

.role-carousel-rotate {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: white;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 5;
}

.role-carousel-rotate:hover {
    border-color: #999;
    color: #333;
    background: #f5f5f5;
}

.role-carousel-rotate.rotating svg {
    animation: rotateIcon 0.3s ease;
}

@keyframes rotateIcon {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Open Roles Panel Styling */
.open-roles-tabs {
    padding-top: 0.25rem;
    padding-right: 3rem; /* Make room for rotate button */
}

/* Role Tabs (now inside card) */
.role-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    padding-right: 3rem; /* Make room for rotate button */
    border-bottom: 2px solid #f0f0f0;
    background: #fafafa;
}

.role-tab {
    background: transparent;
    border: 2px solid transparent;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.role-tab-icon {
    flex-shrink: 0;
}

/* Role-specific tab colors - filled by default */
.role-tab[data-role="greeter"] {
    background: var(--role-greeter);
    border-color: var(--role-greeter);
}

.role-tab[data-role="greeter"]:hover:not(.active) {
    background: var(--role-greeter-dark);
    border-color: var(--role-greeter-dark);
    transform: translateY(-1px);
}

.role-tab[data-role="greeter"].active {
    background: var(--role-greeter-medium);
    color: var(--role-greeter);
}

.role-tab[data-role="greeter"].active svg {
    stroke: var(--role-greeter);
}

.role-tab[data-role="mapper"] {
    background: var(--role-mapper);
    border-color: var(--role-mapper);
}

.role-tab[data-role="mapper"]:hover:not(.active) {
    background: var(--role-mapper-dark);
    border-color: var(--role-mapper-dark);
    transform: translateY(-1px);
}

.role-tab[data-role="mapper"].active {
    background: var(--role-mapper-medium);
    color: var(--role-mapper);
}

.role-tab[data-role="mapper"].active svg {
    stroke: var(--role-mapper);
}

.role-tab[data-role="cogitarian"] {
    background: var(--role-cogitarian);
    border-color: var(--role-cogitarian);
}

.role-tab[data-role="cogitarian"]:hover:not(.active) {
    background: var(--role-cogitarian-dark);
    border-color: var(--role-cogitarian-dark);
    transform: translateY(-1px);
}

.role-tab[data-role="cogitarian"].active {
    background: var(--role-cogitarian-medium);
    color: var(--role-cogitarian);
}

.role-tab[data-role="cogitarian"].active svg {
    stroke: var(--role-cogitarian);
}

.role-tab[data-role="provisioner"] {
    background: var(--role-provisioner);
    border-color: var(--role-provisioner);
}

.role-tab[data-role="provisioner"]:hover:not(.active) {
    background: var(--role-provisioner-dark);
    border-color: var(--role-provisioner-dark);
    transform: translateY(-1px);
}

.role-tab[data-role="provisioner"].active {
    background: var(--role-provisioner-medium);
    color: var(--role-provisioner);
}

.role-tab[data-role="provisioner"].active svg {
    stroke: var(--role-provisioner);
}

.role-tab[data-role="dreamstyler"] {
    background: var(--role-dreamstyler);
    border-color: var(--role-dreamstyler);
    /* Now public - no longer hidden by default */
}

.role-tab[data-role="dreamstyler"]:hover:not(.active) {
    background: var(--role-dreamstyler-dark);
    border-color: var(--role-dreamstyler-dark);
    transform: translateY(-1px);
}

.role-tab[data-role="dreamstyler"].active {
    background: var(--role-dreamstyler-medium);
    color: var(--role-dreamstyler);
}

.role-tab[data-role="dreamstyler"].active svg {
    stroke: var(--role-dreamstyler);
}

.role-tab[data-role="bursar"] {
    background: var(--role-bursar);
    border-color: var(--role-bursar);
    display: none; /* Hidden by default, shown via JS for admins */
}

.role-tab[data-role="bursar"]:hover:not(.active) {
    background: var(--role-bursar-dark);
    border-color: var(--role-bursar-dark);
    transform: translateY(-1px);
}

.role-tab[data-role="bursar"].active {
    background: var(--role-bursar-medium);
    color: var(--role-bursar);
}

.role-tab[data-role="bursar"].active svg {
    stroke: var(--role-bursar);
}

.role-tab[data-role="cheerful"] {
    background: var(--role-cheerful);
    border-color: var(--role-cheerful);
    display: none; /* Hidden by default, shown via JS for admins */
}

.role-tab[data-role="cheerful"]:hover:not(.active) {
    background: var(--role-cheerful-dark);
    border-color: var(--role-cheerful-dark);
    transform: translateY(-1px);
}

.role-tab[data-role="cheerful"].active {
    background: var(--role-cheerful-medium);
    color: var(--role-cheerful);
}

.role-tab[data-role="cheerful"].active svg {
    stroke: var(--role-cheerful);
}

.role-tab[data-role="guardian"] {
    background: var(--role-guardian);
    border-color: var(--role-guardian);
    display: none; /* Hidden by default, shown via JS for admins */
}

.role-tab[data-role="guardian"]:hover:not(.active) {
    background: var(--role-guardian-dark);
    border-color: var(--role-guardian-dark);
    transform: translateY(-1px);
}

.role-tab[data-role="guardian"].active {
    background: var(--role-guardian-medium);
    color: var(--role-guardian);
}

.role-tab[data-role="guardian"].active svg {
    stroke: var(--role-guardian);
}

.role-tab-name {
    font-family: 'Courier New', monospace;
}

/* Mobile Role Selector */
.role-selector-mobile {
    display: none;
    padding: 1rem 1.5rem;
    border-bottom: 2px solid #f0f0f0;
    background: #fafafa;
}

.role-selector-mobile select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    font-weight: 700;
    color: #555;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 0;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    .role-tabs {
        display: none;
    }
    
    .role-selector-mobile {
        display: block;
    }
}

/* Role Card */
.role-card {
    background: white;
    border: 2px solid #e0e0e0;
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* Role-specific card borders */
body[data-current-role="greeter"] .role-card {
    border-color: var(--role-greeter-medium);
}

body[data-current-role="mapper"] .role-card {
    border-color: var(--role-mapper-medium);
}

body[data-current-role="cogitarian"] .role-card {
    border-color: var(--role-cogitarian-medium);
}

body[data-current-role="bursar"] .role-card {
    border-color: var(--role-bursar-medium);
}

/* Role Card Body - Two Column Layout (Fixed Height) */
.role-card-body {
    padding: 1.25rem 1.5rem;
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 1.5rem;
    align-items: start;
    flex-shrink: 0;
}

/* Role Content Area - Flexible space below separator */
.role-content-area {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Left: Role Main Section (Title + Description) */
.role-main-section {
    min-height: 0;
}

.role-title {
    margin: 0 0 1rem 0;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--user-color, #734ba1);
    font-family: 'Courier New', monospace;
    letter-spacing: 0.3px;
    line-height: 1.3;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #f0f0f0;
}

/* Role-specific title colors */
.role-tab[data-role="greeter"].active ~ .role-card .role-title,
body[data-current-role="greeter"] .role-title {
    color: var(--role-greeter);
}

.role-tab[data-role="mapper"].active ~ .role-card .role-title,
body[data-current-role="mapper"] .role-title {
    color: var(--role-mapper);
}

.role-tab[data-role="cogitarian"].active ~ .role-card .role-title,
body[data-current-role="cogitarian"] .role-title {
    color: var(--role-cogitarian);
}

.role-tab[data-role="provisioner"].active ~ .role-card .role-title,
body[data-current-role="provisioner"] .role-title {
    color: var(--role-provisioner);
}

.role-tab[data-role="dreamstyler"].active ~ .role-card .role-title,
body[data-current-role="dreamstyler"] .role-title {
    color: var(--role-dreamstyler);
}

.role-tab[data-role="bursar"].active ~ .role-card .role-title,
body[data-current-role="bursar"] .role-title {
    color: var(--role-bursar);
}

.role-tab[data-role="cheerful"].active ~ .role-card .role-title,
body[data-current-role="cheerful"] .role-title {
    color: var(--role-cheerful);
}

.role-tab[data-role="guardian"].active ~ .role-card .role-title,
body[data-current-role="guardian"] .role-title {
    color: var(--role-guardian);
}

/* Right: Current Worker Card */
.role-worker-card {
    background: linear-gradient(135deg, #fafafa 0%, white 100%);
    border: 2px solid #e0e0e0;
    border-radius: 0;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    min-height: 165px;
}

/* Role-specific worker card borders (when no worker) */
body[data-current-role="greeter"] .role-worker-card {
    border-color: var(--role-greeter-medium);
}

body[data-current-role="mapper"] .role-worker-card {
    border-color: var(--role-mapper-medium);
}

body[data-current-role="cogitarian"] .role-worker-card {
    border-color: var(--role-cogitarian-medium);
}

body[data-current-role="bursar"] .role-worker-card {
    border-color: var(--role-bursar-medium);
}

body[data-current-role="provisioner"] .role-worker-card {
    border-color: var(--role-provisioner-medium);
}

body[data-current-role="dreamstyler"] .role-worker-card {
    border-color: var(--role-dreamstyler-medium);
}

body[data-current-role="cheerful"] .role-worker-card {
    border-color: var(--role-cheerful-medium);
}

body[data-current-role="guardian"] .role-worker-card {
    border-color: var(--role-guardian-medium);
}

.worker-card-header {
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 0.5rem;
    margin-bottom: 0.75rem;
}

/* Role-specific worker card header borders (when no worker) */
body[data-current-role="greeter"] .worker-card-header {
    border-color: var(--role-greeter-medium);
}

body[data-current-role="mapper"] .worker-card-header {
    border-color: var(--role-mapper-medium);
}

body[data-current-role="cogitarian"] .worker-card-header {
    border-color: var(--role-cogitarian-medium);
}

body[data-current-role="bursar"] .worker-card-header {
    border-color: var(--role-bursar-medium);
}

body[data-current-role="provisioner"] .worker-card-header {
    border-color: var(--role-provisioner-medium);
}

body[data-current-role="dreamstyler"] .worker-card-header {
    border-color: var(--role-dreamstyler-medium);
}

body[data-current-role="cheerful"] .worker-card-header {
    border-color: var(--role-cheerful-medium);
}

body[data-current-role="guardian"] .worker-card-header {
    border-color: var(--role-guardian-medium);
}

.worker-card-header .worker-label {
    font-size: 0.65rem;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: block;
    text-align: center;
}

.become-role-btn:hover {
    opacity: 0.85;
    transform: translateY(-1px);
}

.worker-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
    font-size: 0.85rem;
    line-height: 1.4;
    color: #2c1810;
}

.worker-details img.greeter-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #8b7355;
    object-fit: cover;
}

/* Role Separator */
.role-separator {
    margin: 0;
    border: none;
    border-top: 2px solid #e0e0e0;
    opacity: 0.3;
}

/* Role-specific separator colors */
body[data-current-role="greeter"] .role-separator {
    border-color: var(--role-greeter-medium);
}

body[data-current-role="mapper"] .role-separator {
    border-color: var(--role-mapper-medium);
}

body[data-current-role="cogitarian"] .role-separator {
    border-color: var(--role-cogitarian-medium);
}

body[data-current-role="bursar"] .role-separator {
    border-color: var(--role-bursar-medium);
}

body[data-current-role="provisioner"] .role-separator {
    border-color: var(--role-provisioner-medium);
}

body[data-current-role="dreamstyler"] .role-separator {
    border-color: var(--role-dreamstyler-medium);
}

body[data-current-role="cheerful"] .role-separator {
    border-color: var(--role-cheerful-medium);
}

body[data-current-role="guardian"] .role-separator {
    border-color: var(--role-guardian-medium);
}

/* Role Content Separator (inside descriptions) */
.role-content-separator {
    margin: 1.5rem 0 1rem 0;
    border: none;
    border-top: 2px solid #e0e0e0;
    opacity: 0.3;
}

/* Role-specific content separator colors */
body[data-current-role="greeter"] .role-content-separator {
    border-color: var(--role-greeter-medium);
}

body[data-current-role="mapper"] .role-content-separator {
    border-color: var(--role-mapper-medium);
}

body[data-current-role="cogitarian"] .role-content-separator {
    border-color: var(--role-cogitarian-medium);
}

body[data-current-role="bursar"] .role-content-separator {
    border-color: var(--role-bursar-medium);
}

body[data-current-role="provisioner"] .role-content-separator {
    border-color: var(--role-provisioner-medium);
}

body[data-current-role="dreamstyler"] .role-content-separator {
    border-color: var(--role-dreamstyler-medium);
}

body[data-current-role="cheerful"] .role-content-separator {
    border-color: var(--role-cheerful-medium);
}

body[data-current-role="guardian"] .role-content-separator {
    border-color: var(--role-guardian-medium);
}

/* Greeter Event Stack */
.greeter-eventstack-container {
    padding: 1rem 1.5rem 1.5rem 1.5rem;
    display: none; /* Hidden by default, shown via JS for greeter */
}

#greeter-eventstack-section {
    display: none; /* Hidden by default */
}

.greeter-content-grid {
    display: grid;
    grid-template-columns: 1fr 240px;
    gap: 1rem;
}

/* EventStack section with title */
.greeter-eventstack-section {
    display: flex;
    flex-direction: column;
    background: white;
    border: 2px solid var(--role-greeter-medium);
    padding: 0.75rem 0.75rem 0;
}

.eventstack-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--role-greeter-dark);
    margin: 0 0 0.75rem 0;
    text-align: center;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--role-greeter-medium);
}

.greeter-eventstack {
    background: white;
    height: 240px;
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid #ddd;
    margin-bottom: 0.75rem;
}

/* Right section container */
.greeter-right-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Introduce Yourself Section */
.introduce-section {
    background: white;
    border: 2px solid var(--role-greeter-medium);
    padding: 0.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    height: 80px;
    justify-content: center;
}

.introduce-header {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--role-greeter-dark);
    font-family: 'Courier New', monospace;
}

.introduce-header a {
    color: var(--role-greeter-dark);
    text-decoration: none;
    font-weight: inherit;
}

.introduce-header a:hover {
    text-decoration: underline;
    color: var(--role-greeter);
}

.introduce-btn {
    background: var(--role-greeter);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    border-radius: 0;
}

.introduce-btn:hover {
    background: var(--role-greeter-dark);
    transform: translateY(-1px);
}

/* Mapper Content Section */
.mapper-content-container {
    padding: 1rem 1.5rem 1.5rem 1.5rem;
    display: none;
}

#mapper-content-section {
    display: none;
}

#spectrum-preview-container {
    max-width: 600px;
    margin: 0 auto;
}

.greeter-examples-carousel {
    background: white;
    border: 2px solid var(--role-greeter-medium);
    height: 180px;
    display: flex;
    flex-direction: column;
}

.example-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.5rem;
    border-bottom: 2px solid #e0e0e0;
}

.example-label {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Role-specific example label colors */
body[data-current-role="greeter"] .example-label {
    color: var(--role-greeter);
}

body[data-current-role="mapper"] .example-label {
    color: var(--role-mapper);
}

body[data-current-role="cogitarian"] .example-label {
    color: var(--role-cogitarian);
}

.example-nav-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
    padding: 0 0.75rem;
    transition: opacity 0.2s ease;
    font-weight: 600;
}

/* Role-specific example nav button colors */
body[data-current-role="greeter"] .example-nav-btn {
    color: var(--role-greeter);
}

body[data-current-role="mapper"] .example-nav-btn {
    color: var(--role-mapper);
}

body[data-current-role="cogitarian"] .example-nav-btn {
    color: var(--role-cogitarian);
}

.example-nav-btn:hover {
    opacity: 0.6;
}

.example-display,
.greetings-display {
    flex: 1;
    padding: 0.5rem;
    overflow-y: auto;
    font-size: 0.75rem;
    line-height: 1.4;
}

.example-text,
.greeting-text {
    color: #333;
}

.example-text a,
.greeting-text a {
    font-weight: bold;
    color: var(--role-greeter-dark);
    text-decoration: none;
}

.example-text a:hover,
.greeting-text a:hover {
    text-decoration: underline;
}

/* Custom scrollbar for eventstack */
.greeter-eventstack::-webkit-scrollbar {
    width: 8px;
}

.greeter-eventstack::-webkit-scrollbar-track {
    background: transparent;
}

.greeter-eventstack::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    border: 2px solid transparent;
    background-clip: padding-box;
    transition: background 0.2s ease;
}

.greeter-eventstack::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
    border: 2px solid transparent;
    background-clip: padding-box;
}

/* Firefox scrollbar */
.greeter-eventstack {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
}

/* =============================================================================
   GREETER GUESTBOOK - Compact Table
   ============================================================================= */

/* Row styling - don't override background/color to allow role colors */
.greeter-eventstack .row-entry {
    display: flex;
    align-items: center;
    cursor: pointer;
    width: 100%;
    padding: 4px 6px;
    min-height: 28px;
    gap: 0;
    margin: 0;
}

/* Date column - override inline padding with !important */
.greeter-eventstack .cell.epoch {
    flex: 0 0 56px !important;
    width: 56px !important;
    min-width: 56px !important;
    max-width: 56px !important;
    font-size: 0.8em;
    padding: 0 2px 0 0 !important;
    margin: 0 !important;
}

/* CRITICAL: Hide EMPTY thread-arrow spacers completely (non-reaction rows) */
.greeter-eventstack .cell.thread-arrow:empty {
    display: none !important;
}

/* Show thread-arrow when it has content (reaction rows) */
.greeter-eventstack .cell.thread-arrow:not(:empty) {
    display: flex !important;
    flex: 0 0 18px !important;
    width: 18px !important;
    min-width: 18px !important;
    max-width: 18px !important;
    padding: 0 !important;
    margin: 0 !important;
    align-items: center;
    justify-content: center;
}

.greeter-eventstack .cell.thread-arrow .thread-arrow-icon {
    font-size: 0.85em;
    color: var(--role-greeter);
    opacity: 0.7;
}

/* Avatar column - override inline margin with !important */
.greeter-eventstack .cell.avatar {
    flex: 0 0 24px !important;
    width: 24px !important;
    min-width: 24px !important;
    max-width: 24px !important;
    padding: 0 !important;
    margin: 0 2px 0 0 !important;
}

.greeter-eventstack .avatar-img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
}

/* Canon column - takes remaining space */
.greeter-eventstack .cell.canon {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    padding: 0 4px 0 6px !important;
    margin: 0 !important;
    white-space: normal;
    word-wrap: break-word;
    font-size: 0.88em;
    line-height: 1.3;
}

/* Reaction rows - subtle indent and background */
.greeter-eventstack .row-entry.thread-level-1 {
    padding-left: 8px;
    background: rgba(60, 160, 180, 0.04);
}

.greeter-eventstack .row-entry.thread-level-2 {
    padding-left: 14px;
    background: rgba(60, 160, 180, 0.06);
}

/* Allow role colors to work - enhance greeter colors in guestbook */
.greeter-eventstack .row-entry.color-role.role-greeter {
    background: linear-gradient(
        to right,
        var(--role-greeter-light) 0%,
        rgba(60, 160, 180, 0.05) 60%,
        transparent 100%
    );
    border-left: 2px solid var(--role-greeter);
}

.greeter-eventstack .row-entry.color-role.role-greeter .cell.canon {
    color: var(--role-greeter-dark);
}

.greeter-eventstack .row-entry.color-role.role-greeter .cell.epoch {
    color: var(--role-greeter);
}

/* =============================================================================
   END GREETER GUESTBOOK
   ============================================================================= */

/* Greeter Showcase */
.greeter-showcase {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.greeter-events {
    border: 2px solid #e0e0e0;
    padding: 0.75rem;
    background: #fafafa;
    max-height: 300px;
    overflow-y: auto;
}

.greeter-examples {
    border: 2px solid #e0e0e0;
    padding: 0.75rem;
    background: white;
}

body[data-current-role="greeter"] .greeter-examples {
    border-color: var(--role-greeter-medium);
}

body[data-current-role="mapper"] .greeter-examples {
    border-color: var(--role-mapper-medium);
}

body[data-current-role="cogitarian"] .greeter-examples {
    border-color: var(--role-cogitarian-medium);
}

.example-carousel {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.example-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.example-label {
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

body[data-current-role="greeter"] .example-header .example-label {
    color: var(--role-greeter);
}

body[data-current-role="mapper"] .example-header .example-label {
    color: var(--role-mapper);
}

body[data-current-role="cogitarian"] .example-header .example-label {
    color: var(--role-cogitarian);
}

.example-nav-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: #999;
    padding: 0.25rem 0.5rem;
    transition: opacity 0.2s ease;
}

body[data-current-role="greeter"] .example-header .example-nav-btn {
    color: var(--role-greeter);
}

body[data-current-role="mapper"] .example-header .example-nav-btn {
    color: var(--role-mapper);
}

body[data-current-role="cogitarian"] .example-header .example-nav-btn {
    color: var(--role-cogitarian);
}

.example-nav-btn:hover {
    opacity: 0.6;
}

.example-post {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #2c1810;
    padding: 0.75rem;
    background: #f9f9f9;
    border-left: 3px solid #999;
    min-height: 200px;
}

body[data-current-role="greeter"] .example-post {
    border-color: var(--role-greeter);
}

body[data-current-role="mapper"] .example-post {
    border-color: var(--role-mapper);
}

body[data-current-role="cogitarian"] .example-post {
    border-color: var(--role-cogitarian);
}

/* Role Tools/Examples Compartment */
.role-tools-compartment {
    border-top: 2px solid #f0f0f0;
    background: #fafafa;
    padding: 1rem 1.5rem;
    min-height: 0;
    max-height: none;
}

.role-tools-content {
    display: none;
}

.role-tools-content.active {
    display: block;
}

.role-tools-content .example-preview-box:first-child {
    margin-top: 0;
}

.role-desc-content {
    display: block;
}

.role-description {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #2c1810;
    margin: 0 0 1rem 0;
}

.role-description:last-of-type {
    margin-bottom: 1.25rem;
}

.role-description b {
    color: #5d4a37;
    font-weight: 600;
}

/* Role-specific bold text colors */
.role-tab[data-role="greeter"].active ~ .role-card .role-description b,
body[data-current-role="greeter"] .role-description b {
    color: var(--role-greeter-dark);
}

.role-tab[data-role="mapper"].active ~ .role-card .role-description b,
body[data-current-role="mapper"] .role-description b {
    color: var(--role-mapper-dark);
}

.role-tab[data-role="cogitarian"].active ~ .role-card .role-description b,
body[data-current-role="cogitarian"] .role-description b {
    color: var(--role-cogitarian-dark);
}

.role-tab[data-role="provisioner"].active ~ .role-card .role-description b,
body[data-current-role="provisioner"] .role-description b {
    color: var(--role-provisioner-dark);
}

.role-tab[data-role="dreamstyler"].active ~ .role-card .role-description b,
body[data-current-role="dreamstyler"] .role-description b {
    color: var(--role-dreamstyler-dark);
}

.role-tab[data-role="bursar"].active ~ .role-card .role-description b,
body[data-current-role="bursar"] .role-description b {
    color: var(--role-bursar-dark);
}

.role-tab[data-role="cheerful"].active ~ .role-card .role-description b,
body[data-current-role="cheerful"] .role-description b {
    color: var(--role-cheerful-dark);
}

.role-tab[data-role="guardian"].active ~ .role-card .role-description b,
body[data-current-role="guardian"] .role-description b {
    color: var(--role-guardian-dark);
}

.role-description u {
    text-decoration: none;
    border-bottom: 2px solid #e0e0e0;
}

/* Role-specific underline colors */
body[data-current-role="greeter"] .role-description u {
    border-color: var(--role-greeter-medium);
}

body[data-current-role="mapper"] .role-description u {
    border-color: var(--role-mapper-medium);
}

body[data-current-role="cogitarian"] .role-description u {
    border-color: var(--role-cogitarian-medium);
}

body[data-current-role="provisioner"] .role-description u {
    border-color: var(--role-provisioner-medium);
}

body[data-current-role="dreamstyler"] .role-description u {
    border-color: var(--role-dreamstyler-medium);
}

body[data-current-role="bursar"] .role-description u {
    border-color: var(--role-bursar-medium);
}

body[data-current-role="cheerful"] .role-description u {
    border-color: var(--role-cheerful-medium);
}

body[data-current-role="guardian"] .role-description u {
    border-color: var(--role-guardian-medium);
}

/* Example Preview Box */
.example-preview-box {
    background: rgba(139, 115, 85, 0.05);
    border: 2px solid rgba(139, 115, 85, 0.2);
    padding: 1rem;
    margin-top: 0;
    border-radius: 0;
}

.example-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.example-nav-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #8b7355;
    padding: 0.25rem 0.5rem;
    transition: all 0.2s ease;
}

.example-nav-btn:hover {
    transform: scale(1.2);
}

.example-label {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    font-weight: 600;
    color: #8b7355;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.example-post {
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    line-height: 1.5;
    color: #2c1810;
    padding: 0.75rem;
    background: white;
    border-left: 3px solid #8b7355;
    border-radius: 0;
}

.coordinate-example {
    text-align: center;
    letter-spacing: 2px;
    font-weight: 600;
    font-size: 1.1rem;
}

/* Role Card Actions */
/* Role Card Actions - Balanced Layout */
.role-card-actions {
    padding: 0.85rem 1.5rem;
    border-top: 2px solid #f0f0f0;
    background: #fafafa;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60px;
}

.actions-state {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.action-buttons-group {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.action-loading-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid rgba(139, 115, 85, 0.3);
    border-top: 3px solid #8b7355;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.action-loading-text {
    color: #666;
    font-size: 0.85rem;
    font-style: italic;
}

.action-button {
    padding: 0.6rem 1.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    border-radius: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 180px;
}

.action-button.primary {
    background: #999;
    color: white;
}

/* Role-specific primary button colors */
body[data-current-role="greeter"] .action-button.primary {
    background: var(--role-greeter);
}

body[data-current-role="mapper"] .action-button.primary {
    background: var(--role-mapper);
}

body[data-current-role="cogitarian"] .action-button.primary {
    background: var(--role-cogitarian);
}

.action-button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.action-button.secondary {
    background: white;
    color: #666;
    border: 2px solid #ccc;
}

.action-button.secondary:hover {
    background: #f5f5f5;
    border-color: #999;
}

.action-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Modal Styles (inherited from work.css but updated) */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.3);
    border: 3px solid #e0e0e0;
    animation: modalSlideIn 0.3s ease-out;
}

/* City Request Modal - Compact Style */
.city-modal-content {
    max-width: 380px;
    padding: 1.5rem;
    border: 3px solid var(--role-provisioner-medium);
}

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

.city-modal-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--role-provisioner-dark);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--role-provisioner-light);
    font-family: 'Courier New', monospace;
}

.city-modal-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.city-modal-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--role-provisioner-dark);
    white-space: nowrap;
    font-family: 'Courier New', monospace;
}

.city-modal-header input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 2px solid var(--role-provisioner-light);
    border-radius: 0;
    font-size: 0.95rem;
    font-family: 'Courier New', monospace;
    transition: border-color 0.2s ease;
}

.city-modal-header input:focus {
    outline: none;
    border-color: var(--role-provisioner);
}

.city-modal-preview {
    background: #f9f9f9;
    border: 2px solid var(--role-provisioner-light);
    padding: 1rem;
    margin-bottom: 1.25rem;
}

.preview-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.preview-text {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #333;
    font-family: 'Courier New', monospace;
}

.preview-city {
    color: var(--role-provisioner);
    font-weight: 600;
}

.preview-handle {
    color: var(--role-provisioner);
    font-weight: 600;
}

.city-modal-actions {
    display: flex;
    gap: 0.75rem;
}

.city-modal-btn {
    flex: 1;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
    border-radius: 0;
    border: none;
}

.city-send-btn {
    background: var(--role-provisioner);
    color: white;
}

.city-send-btn:hover {
    background: var(--role-provisioner-dark);
    transform: translateY(-1px);
}

.city-cancel-btn {
    background: #999;
    color: white;
}

.city-cancel-btn:hover {
    background: #777;
    transform: translateY(-1px);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    backdrop-filter: blur(4px);
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-content .loading-spinner {
    width: 48px;
    height: 48px;
    border-width: 4px;
    border-color: rgba(255, 255, 255, 0.3);
    border-top-color: white;
    margin: 0 auto 1rem auto;
}

.loading-content .loading-text {
    font-size: 1.1rem;
    color: white;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .role-card-body {
        grid-template-columns: 1fr;
        padding: 1rem;
        gap: 1rem;
    }
    
    .role-worker-card {
        position: relative;
        padding: 0.85rem;
    }
    
    .role-title {
        font-size: 1.2rem;
    }
    
    .action-button {
        width: 100%;
        min-width: auto;
    }
    
    .action-buttons-group {
        width: 100%;
        flex-direction: column;
    }
    
    .greeter-showcase {
        grid-template-columns: 1fr;
    }
    
    .greeter-events,
    .greeter-examples {
        max-height: 200px;
    }
}

/* Cogitarian Content */
.cogitarian-content-container {
    padding: 1rem 1.5rem 1.5rem 1.5rem;
    display: none; /* Hidden by default, shown via JS for cogitarian */
}

#cogitarian-content-section {
    display: none; /* Hidden by default */
}

.cogitarian-content-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1rem;
    max-width: 800px;
    margin-left: auto;
}

.repo-card {
    background: white;
    border: 2px solid var(--role-cogitarian-medium);
    padding: 0;
    overflow: hidden;
    height: 280px;
    display: flex;
    flex-direction: column;
}

.repo-card-header {
    padding: 0.75rem 1rem;
    background: var(--role-cogitarian-light);
    border-bottom: 2px solid var(--role-cogitarian-medium);
    flex-shrink: 0;
}

.repo-card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--role-cogitarian-dark);
    font-family: 'Courier New', monospace;
    text-align: center;
    letter-spacing: 0.5px;
}

.repo-card-actions {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.repo-action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--role-cogitarian-medium);
    background: white;
    color: var(--role-cogitarian-dark) !important;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.2s;
    font-family: 'Courier New', monospace;
}

.repo-action-btn:visited {
    color: var(--role-cogitarian-dark) !important;
}

.repo-action-btn:hover {
    background: var(--role-cogitarian-light);
    border-color: var(--role-cogitarian-dark);
    color: var(--role-cogitarian-dark) !important;
}

.repo-action-btn svg {
    flex-shrink: 0;
}

.repo-btn-primary {
    background: var(--role-cogitarian-light);
    color: var(--role-cogitarian-dark) !important;
    border-color: var(--role-cogitarian-medium);
}

.repo-btn-primary:visited {
    color: var(--role-cogitarian-dark) !important;
}

.repo-btn-primary:hover {
    background: var(--role-cogitarian-medium);
    border-color: var(--role-cogitarian-dark);
    color: var(--role-cogitarian-dark) !important;
}

.repo-info {
    padding: 0.75rem;
    background: var(--role-cogitarian-light);
    border-top: 2px solid var(--role-cogitarian-medium);
    margin-top: auto;
}

.repo-info-item {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    font-family: 'Courier New', monospace;
    margin-bottom: 0.25rem;
}

.repo-info-item:last-child {
    margin-bottom: 0;
}

.repo-info-label {
    color: var(--role-cogitarian-dark);
    font-weight: 600;
}

.repo-info-value {
    color: var(--role-cogitarian-dark);
    opacity: 0.7;
}

.repo-data-box {
    background: white;
    border: 2px solid var(--role-cogitarian-medium);
    padding: 0;
    overflow: hidden;
    height: 280px;
    display: flex;
    flex-direction: column;
    max-width: 450px;
}

.repo-data-header {
    font-size: 1rem;
    font-weight: 600;
    color: var(--role-cogitarian-dark);
    margin: 0;
    text-align: center;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
    padding: 0.5rem 1rem;
    border-bottom: 2px solid var(--role-cogitarian-medium);
    background: var(--role-cogitarian-light);
    flex-shrink: 0;
}

.repo-data-content {
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.commits-section {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
}

.commit-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--role-cogitarian-light);
    transition: background-color 0.2s;
    text-decoration: none;
    color: inherit;
    flex-shrink: 0;
}

.commit-row:nth-child(even) {
    background-color: rgba(var(--role-cogitarian-light-rgb), 0.3);
}

.commit-row.loading-placeholder {
    pointer-events: none;
    opacity: 0.5;
}

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

.commit-row:hover {
    background-color: var(--role-cogitarian-light);
}

.commit-message {
    font-size: 0.85rem;
    font-weight: 500;
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}

.commit-meta {
    font-size: 0.7rem;
    color: var(--role-cogitarian-dark);
    font-family: 'Courier New', monospace;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Role-specific timestamp colors */
.dreamstyler-content-grid .commit-meta {
    color: var(--role-dreamstyler-dark, rgb(118, 77, 189));
}

.contributors-section {
    padding: 0.5rem;
    background: var(--role-cogitarian-light);
    border-top: 2px solid var(--role-cogitarian-medium);
    flex-shrink: 0;
    text-align: center;
}

.contributors-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--role-cogitarian-dark);
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Courier New', monospace;
}

.contributors-list {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: center;
}

.contributor-link {
    display: block;
    transition: transform 0.2s, opacity 0.2s;
}

.contributor-link:hover {
    transform: scale(1.1);
    opacity: 0.8;
}

.contributor-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--role-cogitarian-medium);
    display: block;
}

.repo-error {
    padding: 1rem;
    color: #999;
    font-style: italic;
    text-align: center;
}

/* ========================================================================== */
/* PROVISIONER CONTENT SECTION */
/* ========================================================================== */

.provisioner-content-container {
    padding: 1.5rem;
}

.provisioner-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    max-width: 1000px;
    margin: 0 auto;
}

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

.provisioner-box {
    background: white;
    border: 2px solid var(--role-provisioner-medium);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
}

.provisioner-box-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--role-provisioner-dark);
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
    margin: 0 0 1rem 0;
    text-align: center;
}

.provisioner-box-text {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #555;
    margin: 0 0 0.75rem 0;
    flex: 1;
}

.provisioner-box-text:last-of-type {
    margin-bottom: 1.25rem;
}

.provisioner-box-text b {
    color: var(--role-provisioner-dark);
    font-weight: 600;
}

.provisioner-box-text a {
    color: var(--role-provisioner);
    text-decoration: none;
    font-weight: 500;
}

.provisioner-box-text a:hover {
    color: var(--role-provisioner-dark);
    text-decoration: underline;
}

.provisioner-box-button {
    background: var(--role-provisioner);
    border: 2px solid var(--role-provisioner);
    color: white;
    padding: 0.7rem 1.5rem;
    font-size: 0.8rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.provisioner-box-button svg {
    flex-shrink: 0;
}

.provisioner-box-button:hover {
    background: var(--role-provisioner-dark);
    border-color: var(--role-provisioner-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(218, 165, 32, 0.3);
}

.provisioner-box-button:active {
    transform: translateY(0);
}

.provisioner-box-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.provisioner-box-button:disabled:hover {
    transform: none;
    box-shadow: none;
}

.provisioner-box-button .spin {
    animation: spin 1s linear infinite;
}

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

.provisioner-tools-container {
    max-width: 800px;
    margin: 0 auto;
}


/* ============================================
   DREAMSTYLER LIST STYLES
   ============================================ */

.dreamstyler-content-container {
    padding: 1rem 1.5rem 1.5rem 1.5rem;
}

.dreamstyler-content-grid {
    display: grid;
    grid-template-columns: 280px minmax(280px, 450px);
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto;
    justify-content: center;
}

.dreamstyler-list-card {
    background: white;
    border: 2px solid var(--role-dreamstyler-medium, rgba(158, 117, 229, 0.5));
    height: 280px;
    display: flex;
    flex-direction: column;
}

.dreamstyler-list-card .repo-card-header {
    background: var(--role-dreamstyler-light, rgba(158, 117, 229, 0.1));
    border-bottom: 2px solid var(--role-dreamstyler-medium, rgba(158, 117, 229, 0.5));
    padding: 0.5rem 1rem;
}

.dreamstyler-list-card .repo-card-title {
    color: var(--role-dreamstyler-dark, rgb(118, 77, 189));
    font-size: 0.9rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

.dreamstyler-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.dreamstyler-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.3rem 0.5rem;
    transition: all 0.2s;
    gap: 0.4rem;
}

.dreamstyler-row:hover {
    filter: brightness(0.95);
}

.dreamstyler-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    flex: 1;
    min-width: 0;
}

.dreamstyler-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1.5px solid;
    object-fit: cover;
    flex-shrink: 0;
}

.dreamstyler-name {
    font-weight: 600;
    font-size: 0.75rem;
    font-family: 'Courier New', monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dreamstyler-entreat-btn {
    color: white;
    border: none;
    padding: 0.35rem 0.7rem;
    font-size: 0.7rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}

.dreamstyler-entreat-btn:hover {
    filter: brightness(0.85);
    transform: translateY(-1px);
}

.dreamstyler-footer {
    padding: 0.6rem 0.75rem;
    background: var(--role-dreamstyler-light, rgba(158, 117, 229, 0.1));
    border-top: 2px solid var(--role-dreamstyler-medium, rgba(158, 117, 229, 0.5));
    text-align: center;
    margin-top: auto;
}

.dreamstyler-footer-text {
    margin: 0;
    font-size: 0.75rem;
    font-family: 'Courier New', monospace;
    color: var(--role-dreamstyler-dark, rgb(118, 77, 189));
    font-style: italic;
    line-height: 1.4;
}

.dreamstyler-loading,
.dreamstyler-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--role-dreamstyler, #9e75e5);
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    opacity: 0.7;
}

/* Dreamstyler content grid uses dreamstyler colors for right column too */
.dreamstyler-content-grid .repo-data-box,
.dreamstyler-right-column .repo-data-box {
    border-color: var(--role-dreamstyler-medium, rgba(158, 117, 229, 0.5));
}

.dreamstyler-content-grid .repo-data-header,
.dreamstyler-right-column .repo-data-header {
    color: var(--role-dreamstyler-dark, rgb(118, 77, 189));
    background: var(--role-dreamstyler-light, rgba(158, 117, 229, 0.1));
    border-bottom-color: var(--role-dreamstyler-medium, rgba(158, 117, 229, 0.5));
}

.dreamstyler-content-grid .commit-row,
.dreamstyler-right-column .commit-row {
    border-bottom-color: var(--role-dreamstyler-light, rgba(158, 117, 229, 0.15));
}

.dreamstyler-content-grid .contributors-section,
.dreamstyler-right-column .contributors-section {
    background: var(--role-dreamstyler-light, rgba(158, 117, 229, 0.1));
    border-top-color: var(--role-dreamstyler-medium, rgba(158, 117, 229, 0.5));
}

.dreamstyler-content-grid .contributors-label,
.dreamstyler-right-column .contributors-label {
    color: var(--role-dreamstyler-dark, rgb(118, 77, 189));
}

/* Dreamstyler Right Column Layout */
.dreamstyler-right-column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.aesthetic-adjustments-box {
    background: white;
    border: 2px solid var(--role-dreamstyler-medium, rgba(158, 117, 229, 0.5));
    display: flex;
    flex-direction: column;
}

.aesthetic-adjustments-box .repo-data-header {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--role-dreamstyler-dark, rgb(118, 77, 189));
    margin: 0;
    text-align: center;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
    padding: 0.5rem 1rem;
    border-bottom: 2px solid var(--role-dreamstyler-medium, rgba(158, 117, 229, 0.5));
    background: var(--role-dreamstyler-light, rgba(158, 117, 229, 0.1));
}

.dreamstyler-commits-list {
    padding: 0.5rem;
    min-height: 60px;
    max-height: 150px;
    overflow-y: auto;
}

.dreamstyler-commits-list .commit-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0.5rem;
    border-bottom: 1px solid var(--role-dreamstyler-light, rgba(158, 117, 229, 0.15));
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
}

.dreamstyler-commits-list .commit-row:last-child {
    border-bottom: none;
}

.dreamstyler-commits-list .commit-message {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #333;
}

.dreamstyler-commits-list .commit-meta {
    color: var(--role-dreamstyler-dark, rgb(118, 77, 189));
    font-size: 0.7rem;
    margin-left: 0.5rem;
    flex-shrink: 0;
}

.tangled-integration-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.5rem;
    background: var(--role-dreamstyler-light, rgba(158, 117, 229, 0.1));
    border-top: 1px solid var(--role-dreamstyler-medium, rgba(158, 117, 229, 0.3));
    font-size: 0.7rem;
    font-family: 'Courier New', monospace;
    color: var(--role-dreamstyler-dark, rgb(118, 77, 189));
}

.tangled-integration-note a {
    color: var(--role-dreamstyler, #9e75e5);
    text-decoration: underline;
}

/* Tangled footer - flat footer outside the aesthetic adjustments box */
.tangled-integration-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.6rem;
    background: var(--role-dreamstyler-light, rgba(158, 117, 229, 0.1));
    border: 2px solid var(--role-dreamstyler-medium, rgba(158, 117, 229, 0.3));
    font-size: 0.7rem;
    font-family: 'Courier New', monospace;
    color: var(--role-dreamstyler-dark, rgb(118, 77, 189));
}

.tangled-integration-footer a {
    color: var(--role-dreamstyler, #9e75e5);
    text-decoration: underline;
}

.tangled-integration-footer code {
    background: rgba(158, 117, 229, 0.15);
    padding: 0.1rem 0.3rem;
    font-size: 0.65rem;
}

/* Empty placeholder rows for dreamstyler commits */
.commit-row.empty-row {
    min-height: 2rem;
    padding: 0.5rem 0.75rem;
}

.commit-row.empty-row.even {
    background: var(--role-dreamstyler-light, rgba(158, 117, 229, 0.08));
}

.commit-row.empty-row.odd {
    background: white;
}

.unfinished-dreams-list {
    padding: 0.5rem;
    min-height: 40px;
}

/* ============================================
   DREAMS LIST STYLES
   ============================================ */

.dreams-box .repo-data-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.dreams-list {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow-y: auto;
}

.dream-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.65rem 0.75rem;
    text-decoration: none;
    border-bottom: 1px solid var(--role-dreamstyler-light, rgba(158, 117, 229, 0.15));
    transition: all 0.2s;
}

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

.dream-row:hover {
    background: var(--role-dreamstyler-light, rgba(158, 117, 229, 0.1));
}

.dream-domain {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--role-dreamstyler-dark, rgb(118, 77, 189));
}

.dream-status {
    font-family: 'Courier New', monospace;
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 10px;
    text-transform: lowercase;
}

.dream-status.dreaming {
    background: rgba(158, 117, 229, 0.2);
    color: var(--role-dreamstyler-dark, rgb(118, 77, 189));
    border: 1px solid var(--role-dreamstyler-medium, rgba(158, 117, 229, 0.5));
}

.dream-status.awake {
    background: rgba(76, 175, 80, 0.15);
    color: #2e7d32;
    border: 1px solid rgba(76, 175, 80, 0.4);
}

.dream-status.archived {
    background: rgba(158, 158, 158, 0.15);
    color: #616161;
    border: 1px solid rgba(158, 158, 158, 0.4);
}

.tangled-integration-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.5rem;
    background: var(--role-dreamstyler-light, rgba(158, 117, 229, 0.1));
    border-top: 1px solid var(--role-dreamstyler-medium, rgba(158, 117, 229, 0.3));
    margin-top: auto;
}

.tangled-icon {
    font-size: 1rem;
}

.tangled-text {
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    color: var(--role-dreamstyler-dark, rgb(118, 77, 189));
}

.tangled-text a {
    color: var(--role-dreamstyler, #9e75e5);
    text-decoration: none;
    font-weight: 600;
}

.tangled-text a:hover {
    text-decoration: underline;
}

/* ============================================
   DREAM CIRCLES (Unfinished Dreams)
   ============================================ */

.dream-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--role-dreamstyler-light, rgba(158, 117, 229, 0.2));
    border: 2px solid var(--role-dreamstyler-medium, rgba(158, 117, 229, 0.5));
    text-decoration: none;
    transition: all 0.2s;
}

.dream-circle:hover {
    background: var(--role-dreamstyler-medium, rgba(158, 117, 229, 0.4));
    border-color: var(--role-dreamstyler, #9e75e5);
    transform: scale(1.1);
}

.dream-circle-text {
    font-family: 'Courier New', monospace;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--role-dreamstyler-dark, rgb(118, 77, 189));
    text-transform: uppercase;
}

.placeholder-row {
    opacity: 0.6;
    font-style: italic;
}

/* ============================================
   BURSAR STYLES
   ============================================ */

.bursar-content-container {
    padding: 1.5rem;
}

.bursar-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    max-width: 1000px;
    margin: 0 auto;
}

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

.bursar-box {
    background: white;
    border: 2px solid var(--role-bursar-medium);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
}

.bursar-box-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--role-bursar-dark);
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
    margin: 0 0 1rem 0;
    text-align: center;
}

.bursar-box-text {
    font-size: 0.9rem;
    line-height: 1.6;
    color: #555;
    margin: 0 0 0.75rem 0;
}

.bursar-box-text:last-of-type {
    margin-bottom: 1.25rem;
}

.bursar-box-text a {
    color: var(--role-bursar);
    text-decoration: none;
    font-weight: 500;
}

.bursar-box-text a:hover {
    color: var(--role-bursar-dark);
    text-decoration: underline;
}

/* Stats display */
.bursar-stats {
    background: var(--role-bursar-light);
    padding: 0.75rem;
    margin-bottom: 1.25rem;
}

.bursar-stat-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    font-family: 'Courier New', monospace;
    margin-bottom: 0.25rem;
}

.bursar-stat-row:last-child {
    margin-bottom: 0;
}

.bursar-stat-label {
    color: var(--role-bursar-dark);
    font-weight: 600;
}

.bursar-stat-value {
    color: var(--role-bursar-dark);
}

/* Button actions */
.bursar-box-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: auto;
}

.bursar-box-button {
    background: var(--role-bursar);
    border: 2px solid var(--role-bursar);
    color: white;
    padding: 0.7rem 1rem;
    font-size: 0.8rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    flex: 1;
}

.bursar-box-button svg {
    flex-shrink: 0;
    stroke: white;
}

.bursar-box-button:hover {
    background: var(--role-bursar-dark);
    border-color: var(--role-bursar-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.bursar-box-button:active {
    transform: translateY(0);
}

.bursar-btn-secondary {
    background: white;
    color: var(--role-bursar-dark);
    border-color: var(--role-bursar-medium);
}

.bursar-btn-secondary svg {
    stroke: var(--role-bursar-dark);
}

.bursar-btn-secondary:hover {
    background: var(--role-bursar-light);
    border-color: var(--role-bursar-dark);
}

/* Submit form */
.bursar-submit-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: auto;
}

.bursar-domain-input {
    padding: 0.7rem 1rem;
    border: 2px solid var(--role-bursar-medium);
    background: white;
    font-size: 0.9rem;
    font-family: 'Courier New', monospace;
    color: #333;
}

.bursar-domain-input:focus {
    outline: none;
    border-color: var(--role-bursar);
}

.bursar-domain-input::placeholder {
    color: #999;
    font-style: italic;
}

.bursar-box-subtext {
    font-size: 0.75rem;
    color: var(--role-bursar);
    font-style: italic;
    text-align: center;
    margin-top: 0.5rem;
}

/* Extra small screens (< 480px) - Overridden by mobile renovation below */
@media (max-width: 480px) {
    /* Container styles moved to mobile renovation section */
    
    .work-sidebar {
        padding: 0.6rem;
        gap: 0.5rem;
        border-width: 1px;
    }
    
    .sidebar-logo {
        max-width: 80px;
    }
    
    .sidebar-title h1 {
        font-size: 1rem;
    }
    
    .sidebar-subtitle {
        font-size: 0.65rem;
    }
    
    .sidebar-philosophy {
        font-size: 0.65rem;
        line-height: 1.3;
        padding: 0.4rem 0.5rem;
    }
    
    .sidebar-philosophy p {
        margin: 0 0 0.2rem 0;
    }
    
    .sidebar-user-section {
        min-height: 130px;
        padding: 0.5rem;
    }
    
    .sidebar-avatar {
        width: 40px;
        height: 40px;
    }
    
    .sidebar-user-name {
        font-size: 0.85rem;
    }
    
    .sidebar-user-handle {
        font-size: 0.7rem;
    }
    
    .status-label {
        font-size: 0.55rem;
    }
    
    .status-badge {
        font-size: 0.65rem;
        padding: 3px 6px;
    }
    
    .sidebar-login-btn {
        font-size: 0.8rem;
        padding: 8px 12px;
    }
    
    .role-selector-mobile {
        padding: 0.75rem 1rem;
    }
    
    .role-selector-mobile select {
        font-size: 0.8rem;
        padding: 0.6rem 0.8rem;
    }
    
    .role-card {
        border-width: 1px;
    }
    
    .role-card-body {
        padding: 0.75rem;
        gap: 0.75rem;
    }
    
    .role-title {
        font-size: 1rem;
        padding-bottom: 0.5rem;
        margin-bottom: 0.75rem;
    }
    
    .role-description {
        font-size: 0.8rem;
    }
    
    .bursar-box {
        padding: 0.85rem;
    }
    
    .bursar-box-title {
        font-size: 0.95rem;
    }
    
    .bursar-box-text {
        font-size: 0.8rem;
    }
}

/* ==========================================================================
   MOBILE WORKSHOP RENOVATION
   A complete mobile-first redesign for phone screens
   - Role tabs flush at top beneath header
   - Sidebar moves to bottom as footer bar
   - Worker card centered with "Current:" title above
   - Full page scrolling enabled
   ========================================================================== */

@media (max-width: 768px) {
    /* ----------------------------------------
       CONTAINER: Flush sections, no floating
       ---------------------------------------- */
    .work-page-container {
        position: fixed !important;
        top: 64px !important; /* Directly below header */
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        transform: none !important;
        display: flex;
        flex-direction: column;
        grid-template-columns: unset;
        gap: 0;
        padding: 0 !important;
        margin: 0;
        width: 100%;
        max-width: 100%;
        height: auto;
        overflow-x: hidden;
        overflow-y: auto;
        background: #fff;
    }
    
    /* Hide background on mobile */
    .fullscreen-background {
        display: none;
    }

    /* ----------------------------------------
       SIDEBAR: Moves to BOTTOM as footer bar
       ---------------------------------------- */
    .work-sidebar {
        order: 99;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 14px 16px;
        width: 100%;
        height: auto;
        border: none;
        border-top: 2px solid var(--user-color, #d0c7f0);
        background: linear-gradient(0deg, rgba(255,255,255,1) 0%, rgba(253,252,254,1) 100%);
        overflow: visible;
        margin-top: auto;
    }

    /* Hide decorative elements on mobile */
    .sidebar-header,
    .sidebar-philosophy {
        display: none;
    }

    /* User section becomes compact inline */
    .sidebar-user-section {
        flex: 1;
        min-height: auto;
        padding: 0;
        border: none;
        background: none;
        display: flex;
        align-items: center;
        justify-content: flex-start;
    }

    .sidebar-loading {
        flex-direction: row;
        gap: 8px;
    }

    .loading-spinner {
        width: 20px;
        height: 20px;
        border-width: 2px;
    }

    .loading-text {
        font-size: 0.75rem;
    }

    .sidebar-guest {
        flex-direction: row;
        gap: 12px;
        text-align: left;
    }

    .guest-message {
        display: none;
    }

    .sidebar-login-btn {
        padding: 10px 20px;
        font-size: 0.8rem;
        width: auto;
    }

    .sidebar-user {
        flex-direction: row;
        gap: 10px;
        align-items: center;
    }

    .sidebar-avatar-container {
        width: 40px;
        height: 40px;
        flex-shrink: 0;
    }

    .sidebar-user-info {
        text-align: left;
        flex: 1;
        min-width: 0;
    }

    .sidebar-user-name {
        font-size: 0.85rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .sidebar-user-handle {
        font-size: 0.65rem;
    }

    .sidebar-work-status {
        padding: 0;
        border: none;
        text-align: right;
        flex-shrink: 0;
    }

    .status-label {
        display: none;
    }

    .status-badge {
        font-size: 0.65rem;
        padding: 4px 10px;
    }

    .sidebar-work-actions {
        display: none;
    }

    /* ----------------------------------------
       WORK CONTENT: First in order, scrollable
       ---------------------------------------- */
    .work-content {
        order: 1;
        flex: 1;
        max-width: 100%;
        overflow: visible;
        height: auto;
    }

    .role-card {
        border: none;
        height: auto;
        overflow: visible;
    }

    /* ----------------------------------------
       ROLE TABS: Flush at top, larger icons/text
       ---------------------------------------- */
    .role-tabs-carousel {
        background: #f8f7fc;
        border-bottom: 1px solid rgba(115, 75, 161, 0.12);
        margin: 0;
        padding: 0;
    }

    .role-tabs {
        display: flex !important;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        gap: 0;
        padding: 0;
        border-bottom: none;
        background: transparent;
    }

    .role-tabs::-webkit-scrollbar {
        display: none;
    }

    .role-tab {
        flex: 1;
        min-width: 0;
        padding: 14px 8px;
        gap: 6px;
        border-radius: 0;
        border: none;
        border-right: 1px solid rgba(255,255,255,0.4);
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .role-tab:last-child {
        border-right: none;
    }

    .role-tab-icon {
        width: 22px;
        height: 22px;
    }

    .role-tab-name {
        font-size: 0.65rem;
        font-weight: 600;
        letter-spacing: 0.03em;
        text-transform: uppercase;
    }

    .role-tab.active {
        border-bottom: 3px solid currentColor;
    }

    /* Hide mobile select since we're showing tabs */
    .role-selector-mobile {
        display: none !important;
    }

    /* ----------------------------------------
       ROLE CARD BODY: Stacked, scrollable
       ---------------------------------------- */
    .role-card-body {
        display: flex;
        flex-direction: column;
        padding: 12px 16px;
        gap: 14px;
        overflow: visible;
        padding-bottom: 100px; /* Room for bottom bar */
    }

    .role-main-section {
        order: 1;
    }

    .role-title {
        font-size: 1.15rem;
        margin-bottom: 10px;
        padding-bottom: 10px;
        text-align: center;
    }

    .role-description {
        font-size: 0.85rem;
        line-height: 1.55;
        text-align: center;
    }

    /* ----------------------------------------
       WORKER CARD: Centered with "Current:" above
       ---------------------------------------- */
    .role-worker-card {
        order: 2;
        padding: 12px 16px;
        min-height: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 10px;
        box-shadow: none;
        border-width: 1px;
        max-width: 280px;
        margin: 0 auto;
    }

    .worker-card-header {
        border-bottom: none;
        padding: 0;
        margin: 0;
        width: 100%;
        text-align: center;
    }

    .worker-card-header .worker-label {
        font-size: 0.65rem;
        writing-mode: horizontal-tb;
        text-orientation: unset;
        transform: none;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    .worker-details {
        flex: 1;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        text-align: center;
    }

    .worker-details img.greeter-avatar {
        width: 48px;
        height: 48px;
    }

    /* Role separator */
    .role-separator {
        margin: 8px 0;
    }

    /* ----------------------------------------
       ROLE CONTENT AREAS: Mobile optimized
       ---------------------------------------- */
    .role-content-area {
        overflow: visible;
    }

    /* Greeter Content */
    .greeter-eventstack-container {
        padding: 12px;
    }

    .greeter-content-grid {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .greeter-eventstack-section {
        padding: 12px;
    }

    .eventstack-title {
        font-size: 0.95rem;
        margin-bottom: 10px;
        padding-bottom: 8px;
    }

    .greeter-eventstack {
        height: 200px;
        margin-bottom: 10px;
    }

    .greeter-right-section {
        flex-direction: row;
        gap: 10px;
    }

    .greeter-examples-carousel {
        flex: 1;
        height: 130px;
    }

    .example-nav {
        padding: 6px 10px;
    }

    .example-label {
        font-size: 0.75rem;
    }

    .example-nav-btn {
        font-size: 1.3rem;
        padding: 0 10px;
    }

    .introduce-section {
        display: none;
    }

    .introduce-header {
        font-size: 0.75rem;
        line-height: 1.3;
    }

    .introduce-btn {
        padding: 8px 10px;
        font-size: 0.75rem;
    }

    /* Mapper Content */
    .mapper-content-container {
        padding: 12px;
    }

    .mapper-columns {
        flex-direction: column;
        gap: 12px;
    }

    .mapper-column-left,
    .mapper-column-right {
        width: 100%;
    }

    /* Cogitarian Content */
    .cogitarian-content-container {
        padding: 12px;
    }

    .cogitarian-content-grid {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin: 0;
    }

    .repo-card {
        height: auto;
    }

    .repo-card-header {
        padding: 12px 14px;
    }

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

    .repo-card-actions {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
        padding: 12px;
    }

    .repo-action-btn {
        flex: 1;
        min-width: calc(50% - 8px);
        padding: 10px 12px;
        font-size: 0.75rem;
        justify-content: center;
    }

    .repo-info {
        padding: 12px;
    }

    .repo-data-box {
        max-height: 220px;
    }

    .repo-data-header {
        font-size: 0.9rem;
        padding: 10px 14px;
    }

    /* Provisioner Content */
    .provisioner-content-container {
        padding: 12px;
    }

    .provisioner-content-grid {
        gap: 12px;
    }

    .provisioner-box {
        padding: 14px;
    }

    .provisioner-box-title {
        font-size: 1rem;
        margin-bottom: 10px;
    }

    .provisioner-box-text {
        font-size: 0.85rem;
        margin-bottom: 10px;
    }

    .provisioner-box-button {
        padding: 12px 18px;
        font-size: 0.8rem;
    }

    /* Bursar Content */
    .bursar-content-container {
        padding: 12px;
    }

    .bursar-box {
        padding: 14px;
    }

    .bursar-box-title {
        font-size: 1rem;
    }

    .bursar-box-text {
        font-size: 0.85rem;
    }

    .bursar-box-actions {
        flex-direction: column;
        gap: 10px;
    }

    .bursar-box-button {
        padding: 12px 18px;
        font-size: 0.8rem;
    }
}

/* ============================================
   SMALL MOBILE (480px) - Compact adjustments
   ============================================ */
@media (max-width: 480px) {
    .work-page-container {
        top: 60px !important;
    }

    .work-sidebar {
        padding: 12px 14px;
        gap: 10px;
    }

    .sidebar-avatar-container {
        width: 36px;
        height: 36px;
    }

    .sidebar-user-name {
        font-size: 0.8rem;
    }

    .sidebar-user-handle {
        font-size: 0.6rem;
    }

    .status-badge {
        font-size: 0.6rem;
        padding: 3px 8px;
    }

    .sidebar-login-btn {
        padding: 8px 16px;
        font-size: 0.75rem;
    }

    .role-tab {
        padding: 10px 5px;
    }

    .role-tab-icon {
        width: 18px;
        height: 18px;
    }

    .role-tab-name {
        font-size: 0.55rem;
    }

    .role-card-body {
        padding: 14px;
        gap: 14px;
    }

    .role-title {
        font-size: 1.05rem;
    }

    .role-description {
        font-size: 0.8rem;
    }

    .role-worker-card {
        padding: 10px 14px;
        max-width: 240px;
    }

    .worker-details img.greeter-avatar {
        width: 42px;
        height: 42px;
    }

    /* Content areas */
    .greeter-eventstack-container,
    .mapper-content-container,
    .cogitarian-content-container,
    .provisioner-content-container,
    .bursar-content-container {
        padding: 10px;
    }

    .greeter-eventstack {
        height: 170px;
    }

    .greeter-examples-carousel {
        height: 110px;
    }

    .introduce-section {
        width: 90px;
        height: 110px;
    }

    .introduce-header {
        font-size: 0.65rem;
    }

    .introduce-btn {
        font-size: 0.65rem;
        padding: 6px 8px;
    }

    .eventstack-title {
        font-size: 0.85rem;
    }

    .repo-action-btn {
        min-width: 100%;
    }
}

/* ============================================
   TINY MOBILE (360px) - Minimum viable
   ============================================ */
@media (max-width: 360px) {
    .work-sidebar {
        padding: 10px 12px;
        gap: 8px;
    }

    .sidebar-avatar-container {
        width: 32px;
        height: 32px;
    }

    .sidebar-user-name {
        font-size: 0.75rem;
    }

    .role-tab {
        padding: 8px 4px;
    }

    .role-tab-name {
        display: none;
    }

    .role-tab-icon {
        width: 22px;
        height: 22px;
    }

    .role-card-body {
        padding: 12px;
    }

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

    .role-description {
        font-size: 0.75rem;
    }

    .role-worker-card {
        max-width: 200px;
    }

    .greeter-right-section {
        flex-direction: column;
    }

    .introduce-section {
        width: 100%;
        height: auto;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .introduce-btn {
        width: auto;
    }
}

/* ============================================
   CHEERFUL STYLES
   ============================================ */

.cheerful-content-container {
    padding: 1.5rem;
}

.cheerful-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    max-width: 1000px;
    margin: 0 auto;
}

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

/* Cheerful List Card - matches dreamstyler style */
.cheerful-list-card {
    background: white;
    border: 2px solid var(--role-cheerful-medium);
    height: 280px;
    display: flex;
    flex-direction: column;
}

.cheerful-list-card .repo-card-header {
    background: var(--role-cheerful-light);
    border-bottom: 2px solid var(--role-cheerful-medium);
    padding: 0.5rem 1rem;
}

.cheerful-list-card .repo-card-title {
    color: var(--role-cheerful-dark);
    font-size: 0.9rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

.cheerful-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.cheerful-loading {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 1rem;
    font-size: 0.8rem;
}

.cheerful-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    text-align: center;
}

.cheerful-empty-text {
    color: #888;
    font-size: 0.85rem;
    font-style: italic;
}

/* Cheerful row - matches dreamstyler style */
.cheerful-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.3rem 0.5rem;
    transition: all 0.2s;
    gap: 0.4rem;
}

.cheerful-row:hover {
    filter: brightness(0.95);
}

.cheerful-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    flex: 1;
    min-width: 0;
}

.cheerful-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1.5px solid var(--role-cheerful-medium);
    object-fit: cover;
    flex-shrink: 0;
}

.cheerful-name {
    font-weight: 600;
    font-size: 0.75rem;
    font-family: 'Courier New', monospace;
    color: var(--role-cheerful-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cheerful-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--role-cheerful-light);
    text-align: center;
}

.cheerful-footer-text {
    font-size: 0.75rem;
    color: #888;
    margin: 0.15rem 0;
    font-style: italic;
}

/* Cheerful Right Column */
.cheerful-right-column {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Stats box - compact, no rounded corners */
.cheerful-stats-box {
    border: 2px solid var(--role-cheerful-medium);
    background: white;
}

.cheerful-stats-box .repo-data-header {
    background: var(--role-cheerful-light);
    color: var(--role-cheerful-dark);
    border-bottom: 2px solid var(--role-cheerful-medium);
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

/* Compact stats layout */
.cheerful-stats-compact {
    padding: 0.75rem 1rem;
}

.cheerful-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0;
    border-bottom: 1px solid #f0f0f0;
}

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

.cheerful-stat-row .cheerful-stat-label {
    font-size: 0.8rem;
    color: #666;
    font-weight: 500;
}

.cheerful-stat-row .cheerful-stat-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--role-cheerful);
    font-family: 'Courier New', monospace;
}

/* Cheerful summary section */
.cheerful-summary {
    padding: 0.75rem 1rem;
    border-top: 2px solid var(--role-cheerful-medium);
}

.cheerful-summary-text {
    font-size: 0.75rem;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

/* ============================================
   GUARDIAN STYLES
   ============================================ */

.guardian-content-container {
    padding: 1.5rem;
}

.guardian-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    max-width: 1000px;
    margin: 0 auto;
}

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

/* Guardian List Card - matches cheerful style */
.guardian-list-card {
    background: white;
    border: 2px solid var(--role-guardian-medium);
    height: 280px;
    display: flex;
    flex-direction: column;
}

.guardian-list-card .repo-card-header {
    background: var(--role-guardian-light);
    border-bottom: 2px solid var(--role-guardian-medium);
    padding: 0.5rem 1rem;
}

.guardian-list-card .repo-card-title {
    color: var(--role-guardian-dark);
    font-size: 0.9rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

.guardian-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.guardian-loading {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 1rem;
    font-size: 0.8rem;
}

.guardian-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    text-align: center;
}

.guardian-empty-text {
    color: #888;
    font-size: 0.85rem;
    font-style: italic;
}

/* Guardian row - matches cheerful style */
.guardian-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.3rem 0.5rem;
    transition: all 0.2s;
    gap: 0.4rem;
    cursor: pointer;
}

.guardian-row:hover {
    filter: brightness(0.95);
    background: var(--role-guardian-light);
}

.guardian-row.selected {
    background: var(--role-guardian-medium);
}

.guardian-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    flex: 1;
    min-width: 0;
}

.guardian-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1.5px solid var(--role-guardian-medium);
    object-fit: cover;
    flex-shrink: 0;
}

.guardian-name {
    font-weight: 600;
    font-size: 0.75rem;
    font-family: 'Courier New', monospace;
    color: var(--role-guardian-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.guardian-footer {
    padding: 0.75rem 0.75rem;
    margin: 0 3px;
    border-top: 1px solid var(--role-guardian-light);
    text-align: center;
}

.guardian-footer-text {
    font-size: 0.72rem;
    color: #888;
    margin: 0;
    font-style: italic;
    line-height: 1.5;
}

/* Guardian Right Column */
.guardian-right-column {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Stats box - compact, no rounded corners */
.guardian-stats-box {
    border: 2px solid var(--role-guardian-medium);
    background: white;
}

.guardian-stats-box .repo-data-header {
    background: var(--role-guardian-light);
    color: var(--role-guardian-dark);
    border-bottom: 2px solid var(--role-guardian-medium);
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

/* Compact stats layout */
.guardian-stats-compact {
    padding: 0.75rem 1rem;
}

.guardian-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0;
    border-bottom: 1px solid #f0f0f0;
}

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

/* Divider line between stat groups */
.guardian-stat-divider-line {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--role-guardian-medium), transparent);
    margin: 0.5rem 0;
}

.guardian-stat-row .guardian-stat-label {
    font-size: 0.8rem;
    color: #666;
    font-weight: 500;
}

.guardian-stat-row .guardian-stat-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--role-guardian);
    font-family: 'Courier New', monospace;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.guardian-stat-icon {
    width: 14px;
    height: 14px;
    opacity: 0.7;
}

/* Guardian summary section */
.guardian-summary {
    padding: 0.75rem 1rem;
    border-top: 2px solid var(--role-guardian-medium);
}

.guardian-summary-text {
    font-size: 0.75rem;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

/* Guardian row counts */
.guardian-counts {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

.guardian-count {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.7rem;
    font-family: 'Courier New', monospace;
    font-weight: 600;
}

.guardian-count.charge-count {
    color: #444;
}

.guardian-count.ward-count {
    color: #444;
}

.guardian-count.ward-count .guardian-count-icon {
    stroke: #444;
    stroke-width: 1.5;
    fill: none;
}

.guardian-count-icon {
    width: 12px;
    height: 12px;
}

.guardian-count-divider {
    color: #bbb;
    font-size: 0.65rem;
}

/* Guardian detail panel */
.guardian-detail-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--role-guardian-light);
}

.guardian-detail-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--role-guardian-medium);
    object-fit: cover;
}

.guardian-detail-name {
    font-weight: 700;
    font-size: 0.9rem;
    font-family: 'Courier New', monospace;
    color: var(--role-guardian-dark);
}

/* Guardian lists container */
.guardian-lists-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
}

.guardian-list-section {
    background: #fafafa;
    border: 1px solid #eee;
    padding: 0.5rem 0.75rem;
}

.guardian-list-header {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    margin-bottom: 0.4rem;
}

.guardian-list-header.charges-header {
    color: #a85858;
}

.guardian-list-header.wards-header {
    color: #58a858;
}

.guardian-list-icon {
    width: 14px;
    height: 14px;
}

.guardian-list-count {
    margin-left: auto;
    background: #eee;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-size: 0.65rem;
}

/* Stacked avatars */
.guardian-stacked-avatars {
    position: relative;
    height: 26px;
    min-width: 100px;
}

.stacked-avatar {
    position: absolute;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid white;
    object-fit: cover;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.no-list-items {
    font-size: 0.7rem;
    color: #999;
    font-style: italic;
}

.more-avatars {
    position: absolute;
    font-size: 0.65rem;
    color: #666;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    background: #eee;
    padding: 0.15rem 0.35rem;
    border-radius: 10px;
    top: 50%;
    transform: translateY(-50%);
}

/* Guardian detail footer */
.guardian-detail-footer {
    padding: 0.5rem 1rem;
    border-top: 1px solid var(--role-guardian-light);
}

.guardian-detail-note {
    font-size: 0.7rem;
    color: #888;
    margin: 0;
    text-align: center;
    font-style: italic;
}

/* ===== NEW COMMUNITY SHIELD PANEL ===== */

/* Default and selected view containers */
.guardian-default-view,
.guardian-selected-view {
    width: 100%;
}

/* Guardian profile header */
.guardian-profile-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-bottom: 2px solid var(--role-guardian-light);
    background: var(--role-guardian-light);
}

.guardian-profile-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: inherit;
    flex: 1;
    min-width: 0;
}

.guardian-profile-link:hover .guardian-profile-name {
    text-decoration: underline;
}

.guardian-profile-link:hover .guardian-profile-avatar {
    border-color: var(--role-guardian);
}

.guardian-profile-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--role-guardian-medium);
    object-fit: cover;
    flex-shrink: 0;
    transition: border-color 0.15s ease;
}

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

/* Header counts (right side of profile) */
.guardian-header-counts {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.guardian-header-count {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    font-weight: 700;
    font-family: 'Courier New', monospace;
}

.guardian-header-count-icon {
    width: 16px;
    height: 16px;
}

.guardian-header-count.ward-header-count {
    color: #444;
}

.guardian-header-count.ward-header-count .guardian-header-count-icon {
    stroke: #444;
    stroke-width: 2;
    fill: none;
}

.guardian-header-count.charge-header-count {
    color: #444;
}

.guardian-profile-name {
    font-weight: 700;
    font-size: 0.95rem;
    font-family: 'Courier New', monospace;
    color: var(--role-guardian-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.guardian-profile-handle {
    font-size: 0.75rem;
    color: #888;
    font-family: 'Courier New', monospace;
}

/* Action buttons */
.guardian-action-buttons {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
}

.guardian-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    gap: 0.5rem;
    padding: 0.6rem 0.75rem;
    border: 2px solid;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Courier New', monospace;
}

.guardian-action-btn:hover {
    filter: brightness(0.95);
}

/* Ward button: off-white bg, grey border/icon/text */
.guardian-action-btn.ward-btn {
    border-color: #555;
    background: #f5f5f5;
    color: #444;
}

.guardian-action-btn.ward-btn:hover {
    background: #eaeaea;
}

/* Charge button: dark grey bg, grey border, off-white text */
.guardian-action-btn.charge-btn {
    border-color: #444;
    background: #444;
    color: #f0f0f0;
}

.guardian-action-btn.charge-btn:hover {
    background: #555;
}

/* Leave Guardian button: faint grey */
.guardian-action-btn.leave-btn {
    border-color: #bbb;
    background: #e8e8e8;
    color: #888;
}

.guardian-action-btn.leave-btn:hover {
    background: #ddd;
    color: #666;
}

/* Disabled buttons (viewing self) */
.guardian-action-btn.disabled-btn {
    border-color: #ddd;
    background: #f5f5f5;
    color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.guardian-action-btn.disabled-btn:hover {
    background: #f5f5f5;
    color: #ccc;
}

.guardian-action-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.guardian-action-label {
    font-weight: 600;
    font-size: 0.75rem;
}

/* Guardian lists table */
.guardian-lists-table {
    padding: 0;
}

.guardian-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.75rem;
    font-family: 'Courier New', monospace;
}

.guardian-table-header {
    padding: 0.5rem 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.7rem;
    text-align: left;
    border-bottom: 2px solid;
}

.guardian-table-header.ward-column {
    background: rgba(88, 168, 88, 0.15);
    color: #3a7a3a;
    border-color: #58a858;
}

.guardian-table-header.charge-column {
    background: rgba(40, 40, 40, 0.1);
    color: #333;
    border-color: #444;
}

.guardian-table-row {
    border-bottom: 1px solid #eee;
}

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

.guardian-table-cell {
    padding: 0.4rem 0.5rem;
    height: 32px;
    vertical-align: middle;
}

.guardian-table-cell.ward-cell {
    background: rgba(88, 168, 88, 0.05);
    border-right: 1px solid #e5e5e5;
}

.guardian-table-cell.charge-cell {
    background: rgba(40, 40, 40, 0.03);
}

.guardian-table-link {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
}

.guardian-table-link.ward-link {
    color: #3a7a3a;
}

.guardian-table-link.ward-link:hover {
    color: #2a5a2a;
}

.guardian-table-link.charge-link {
    color: #333;
}

.guardian-table-link.charge-link:hover {
    color: #111;
}

.guardian-table-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.guardian-table-name {
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Guardian stats divider and grid */
.guardian-stats-divider {
    height: 1px;
    background: #ccc;
    margin: 0;
}

.guardian-stats-grid {
    display: flex;
    flex-direction: column;
    padding: 0;
}

.guardian-stats-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.4rem 1rem;
    border-bottom: 1px solid #e5e5e5;
    background: #f5f5f5;
    font-family: 'Courier New', monospace;
    font-size: 0.7rem;
}

.guardian-stats-row:first-child {
    border-top: 1px solid #ccc;
}

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

.guardian-stats-row > .guardian-stats-label {
    font-weight: 700;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 60px;
}

.guardian-stats-row .guardian-stats-divider {
    height: auto;
    background: none;
    margin: 0 0.25rem;
    color: #999;
    font-weight: 300;
}

.guardian-stat-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.guardian-stat-label-small {
    color: #666;
    font-weight: 600;
}

.guardian-stat-value {
    font-weight: 700;
    color: #333;
}

/* Guardian review/manage button */
.guardian-review-section {
    padding: 0.5rem 1rem;
    border-top: none;
    margin-top: 0.25rem;
}

.guardian-review-btn {
    width: 100%;
    padding: 0.4rem 0.75rem;
    background: #f0f0f0;
    border: 2px solid #444;
    color: #333;
    font-family: 'Courier New', monospace;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.2s;
}

.guardian-review-btn:hover {
    background: #e5e5e5;
}

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

/* Guardian Ward/Charge Confirmation Modal */
.guardian-confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10500;
}

.guardian-confirm-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

.guardian-confirm-content {
    position: relative;
    z-index: 1;
}

.guardian-confirm-box {
    background: #fff;
    border: 3px solid #444;
    width: 340px;
    font-family: 'Courier New', monospace;
}

.guardian-confirm-box.ward-confirm {
    border-color: #555;
}

.guardian-confirm-box.charge-confirm {
    border-color: #444;
}

.guardian-confirm-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 2px solid;
}

.ward-confirm .guardian-confirm-header {
    background: #f5f5f5;
    border-bottom-color: #555;
}

.charge-confirm .guardian-confirm-header {
    background: #444;
    border-bottom-color: #333;
}

.guardian-confirm-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.guardian-confirm-icon svg {
    width: 100%;
    height: 100%;
}

.guardian-confirm-icon.ward-icon {
    color: #444;
}

.guardian-confirm-icon.charge-icon {
    color: #f0f0f0;
}

.guardian-confirm-icon.leave-icon {
    color: #888;
}

.guardian-confirm-title {
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ward-confirm .guardian-confirm-title {
    color: #333;
}

.charge-confirm .guardian-confirm-title {
    color: #f0f0f0;
}

.guardian-confirm-body {
    padding: 16px;
    background: #fafafa;
}

.guardian-confirm-description {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #333;
    margin: 0;
}

.guardian-confirm-description strong {
    color: #111;
}

.guardian-confirm-actions {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    background: #f0f0f0;
    border-top: 1px solid #ddd;
}

.guardian-confirm-btn {
    flex: 1;
    padding: 8px 12px;
    font-family: 'Courier New', monospace;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    cursor: pointer;
    border: 2px solid;
    transition: all 0.15s;
}

.guardian-confirm-btn.accept-btn {
    background: #333;
    border-color: #222;
    color: #fff;
}

.guardian-confirm-btn.accept-btn:hover {
    background: #444;
}

.guardian-confirm-btn.accept-btn.ward-accept {
    background: #f5f5f5;
    border-color: #555;
    color: #333;
}

.guardian-confirm-btn.accept-btn.ward-accept:hover {
    background: #eaeaea;
}

.guardian-confirm-btn.accept-btn.charge-accept {
    background: #444;
    border-color: #333;
    color: #f0f0f0;
}

.guardian-confirm-btn.accept-btn.charge-accept:hover {
    background: #555;
}

.guardian-confirm-btn.accept-btn.leave-accept {
    background: #888;
    border-color: #777;
    color: #fff;
}

.guardian-confirm-btn.accept-btn.leave-accept:hover {
    background: #777;
}

.guardian-confirm-btn.cancel-btn {
    background: #fff;
    border-color: #999;
    color: #666;
}

.guardian-confirm-btn.cancel-btn:hover {
    background: #f5f5f5;
    border-color: #777;
}