/* Ray Prototype Stylesheet */

/* ==========================================================================
   CSS Variables & Base Styles
   ========================================================================== */

:root {
    /* Beamery Design System Colors */
    --bg-white: #ffffff;
    --bg-default: #F6F6F7;
    --bg-secondary: #F1F1F3;
    --bg-secondary-ongray: #E7E7E9;
    --bg-tertiary: #DBDBE0;
    --bg-accent: #EBEBFE;
    --bg-success: #ebfeed;

    --text-primary: #1F1F23;
    --text-secondary: #6C6C7A;
    --text-muted: #A0A0AB;

    --accent: #492FF4;
    --accent-hover: #391EE6;
    --accent-active: #2222C3;

    --border-color: #DBDBE0;
    
    /* Beamery Semantic Colors */
    --success: #06742B;
    --success-hover: #095D25;
    --error: #BF0338;
    --error-hover: #9E002D;
    --warning: #F59E0B;
    --info: #3B82F6;
    
    /* Chat-specific variables using Beamery colors */
    --agent-bubble: #ffffff;
    --agent-text: #1F1F23;
    --user-bubble: #492FF4;
    --user-text: #ffffff;
    --chat-bg: #ffffff;
    --input-bg: #ffffff;
    --input-border: #DBDBE0;
    --header-bg: #ffffff;
    --gradient-bg: linear-gradient(135deg, #67BFFF 0%, #492FF4 25%, #B241DE 50%, #DA886D 100%);
    
    /* Gradient colors for animated caret */
    --gradient-blue: #67BFFF;
    --gradient-purple: #492FF4;
    --gradient-magenta: #B241DE;
    --gradient-orange: #DA886D;
    
    /* Header specific colors */
    --bg-nav: #150E3F;
    --text-ondark: #ffffff;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-default);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.4;
    font-size: 13px;
    font-weight: 400;
    height: 100vh;
    overflow: hidden;
}

/* Allow scrolling for role index page */
.role-index-body {
    overflow-y: auto !important;
    height: auto !important;
    min-height: 100vh;
}

/* Animated caret color keyframes */
@keyframes caret-rainbow {
    0% { caret-color: var(--gradient-blue); }
    25% { caret-color: var(--gradient-purple); }
    50% { caret-color: var(--gradient-magenta); }
    75% { caret-color: var(--gradient-orange); }
    100% { caret-color: var(--gradient-blue); }
}

/* ==========================================================================
   Top Header - Full Width
   ========================================================================== */

.top-header {
    height: 40px;
    background: var(--bg-nav);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 8px;
    width: 100%;
    flex-shrink: 0;
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.beamery-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 16px;
    color: var(--text-ondark);
}

.top-header .icon-button {
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.16);
    color: var(--text-ondark);
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.top-header .icon-button img {
    opacity: 1;
    filter: brightness(0) saturate(100%) invert(85%) sepia(8%) saturate(200%) hue-rotate(240deg) brightness(110%) contrast(90%);
}

.top-header .icon-button:hover {
    background: rgba(255, 255, 255, 0.24);
    color: var(--text-ondark);
}

.top-header .icon-button:hover img {
    opacity: 1;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-ondark);
    background: rgba(255, 255, 255, 0.16);
    height: 32px;
}

.user-menu:hover {
    background: rgba(255, 255, 255, 0.24);
}

.user-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
}

.avatar-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-ondark);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.user-name {
    font-size: 14px;
    font-weight: 500;
}

.user-menu img {
    opacity: 1;
    filter: brightness(0) saturate(100%) invert(85%) sepia(8%) saturate(200%) hue-rotate(240deg) brightness(110%) contrast(90%);
}

/* ==========================================================================
   Icon Navigation - Left Sidebar
   ========================================================================== */

.icon-nav {
    background: var(--bg-white);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 24px 8px;
    width: 48px;
    height: calc(100vh - 40px);
    position: fixed;
    left: 0;
    top: 40px;
    z-index: 100;
}

.nav-top,
.nav-bottom {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.nav-icon {
    width: 40px;
    height: 36px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    margin-bottom: 0;
}

.nav-icon img {
    width: 16px;
    height: 16px;
    /* filter: brightness(0) saturate(100%) invert(42%) sepia(8%) saturate(1234%) hue-rotate(202deg) brightness(95%) contrast(86%); */
}

.nav-icon:hover {
    background: var(--bg-secondary-ongray);
}

.nav-icon.active {
    background: var(--bg-accent);
    color: var(--accent-active);
}

.nav-icon.active img {
    filter: brightness(0) saturate(100%) invert(13%) sepia(94%) saturate(7151%) hue-rotate(244deg) brightness(76%) contrast(101%);
}

.nav-icon[title="Ray"] {
    background: var(--bg-accent) !important;
}

.nav-icon[title="Ray"] img {
    filter: brightness(0) saturate(100%) invert(13%) sepia(94%) saturate(7151%) hue-rotate(244deg) brightness(76%) contrast(101%);
}

/* ==========================================================================
   Page Layout
   ========================================================================== */

.page-layout {
    display: flex;
    height: calc(100vh - 40px);
    width: calc(100vw - 48px);
    margin-left: 48px;
}

.chat-section {
    width: 338px;
    min-width: 338px;
    max-width: 800px;
    height: calc(100% - 16px);
    display: flex;
    flex-direction: column;
    background: var(--bg-white);
    border-radius: 6px;
    margin: 8px;
    transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease, min-width 0.3s ease, margin 0.3s ease;
    position: relative;
    transform: translateX(0);
    opacity: 1;
}

.chat-section.slide-out {
    opacity: 0;
    pointer-events: none;
}

.chat-section.slide-in {
    opacity: 1;
    pointer-events: auto;
}

.chat-section::after {
    content: '';
    position: absolute;
    top: 0;
    right: -4px;
    width: 8px;
    height: 100%;
    cursor: col-resize;
    background: transparent;
    z-index: 10;
    transition: background-color 0.2s ease;
}

.chat-section::after:hover {
    background: rgba(73, 47, 244, 0.1);
}

.chat-section.slide-out {
    opacity: 0;
    pointer-events: none;
}

.chat-section.slide-in {
    transform: translateX(0);
    opacity: 1;
    pointer-events: auto;
}

.chat-section.hidden {
    width: 0;
    min-width: 0;
    margin: 8px 0;
    overflow: hidden;
}

.emoji-section {
    flex: 1;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    padding: 0 24px;
    min-width: 0;
    overflow: hidden;
}

.wave-emoji {
    font-size: 6rem;
    margin: 0 auto;
}

/* ==========================================================================
   Chat Container Layout
   ========================================================================== */

.chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    background-color: var(--chat-bg);
    border-radius: 6px;
    overflow: hidden;
}

.chat-header {
    padding: 8px 8px 8px 16px;
    background-color: var(--header-bg);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-header .logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-header .logo-section img {
    width: auto;
    height: 16px;
}

.chat-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.chat-header .button-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.chat-header .reset-button {
    background-color: var(--bg-secondary);
    border: none;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chat-header .reset-button:hover {
    background-color: var(--bg-tertiary);
}

.chat-header .reset-button:active {
    background-color: var(--text-muted);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px;
    padding-right: 12px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}


/* ==========================================================================
   Message Bubbles
   ========================================================================== */

.message {
    display: flex;
    margin-bottom: 16px;
    animation: fadeInUp 0.3s ease-out;
}

.message.agent {
    justify-content: flex-start;
}

.message.user {
    justify-content: flex-end;
}

.message-bubble {
    max-width: 85%;
    position: relative;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
}

.message.user .message-bubble {
    background-color: var(--user-bubble);
    color: var(--user-text);
    border-bottom-right-radius: 2px;
    padding: 8px 12px;
    border-radius: 6px;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.message-content {
    margin: 0;
    line-height: 1.5;
    min-height: 1.5em;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Typing cursor animation */
.typing-cursor {
    opacity: 0.3;
    display: inline-block;
    vertical-align: baseline;
    margin-left: 4px;
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

.message-content p {
    margin-bottom: 8px;
}

.message-content p:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   Message Content Styling
   ========================================================================== */

.message-content h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.message-content h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.message-content h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: -1rem;
}

.message-content h4 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.message-content h5 {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.message-content h6 {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.message-content ul,
.message-content ol {
    margin: 8px 0;
    padding-left: 24px;
}

.message-content li {
    margin-bottom: 4px;
}

.message-content strong {
    font-weight: 700;
}

.message-content em {
    font-style: italic;
}

.message-content code {
    background-color: rgba(0, 0, 0, 0.1);
    padding: 2px 4px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.9em;
}

.message-content pre {
    background-color: rgba(0, 0, 0, 0.1);
    padding: 16px;
    border-radius: 6px;
    overflow-x: auto;
    margin: 8px 0;
}

.message-content pre code {
    background: none;
    padding: 0;
}

.message-content a {
    color: inherit;
    text-decoration: underline;
    opacity: 0.8;
}

.message-content a:hover {
    opacity: 1;
}

.message-content a.response-link {
    color: var(--accent);
    text-decoration: underline;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    background-color: rgba(194, 70, 76, 0.1);
    transition: all 0.2s ease;
}

.message-content a.response-link:hover {
    background-color: rgba(194, 70, 76, 0.2);
    transform: translateY(-1px);
}

/* ==========================================================================
   Input Controls
   ========================================================================== */

.chat-input-container {
    position: relative;
    background-color: var(--bg-white);
    padding: 16px;
    z-index: 10;
}

.chat-input-container::before {
    content: '';
    position: absolute;
    top: -269px;
    left: 0;
    right: 0;
    height: 400px;
    background-image: url('images/text-area-gradient.svg');
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
    z-index: -1;
}

.chat-input-container:focus-within::before {
    opacity: 0.6;
}

.chat-input {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    background: var(--bg-white);
    border-radius: 6px;
    transition: all 0.2s ease;
    padding: 8px;
    border: 2px solid var(--border-color);
}

.chat-input:focus-within {
    border: 2px solid transparent;
    background: linear-gradient(var(--bg-white), var(--bg-white)) padding-box,
                linear-gradient(135deg, #492FF4 0%, #7E4BBC 50%, #F15852 100%) border-box;
}

.chat-input textarea {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    resize: none;
    font-family: inherit;
    font-size: 13px;
    line-height: 1.4;
    color: var(--text-primary);
    transition: background-color 0.2s ease;
    caret-color: var(--accent);
    animation: caret-rainbow 3s ease-in-out infinite;
}

.chat-input textarea::placeholder {
    color: var(--text-muted);
}

.chat-input button {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 6px;
    background: var(--bg-secondary);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.chat-input:focus-within button {
    background: var(--accent);
    color: var(--bg-white);
}

.chat-input button svg {
    width: 16px;
    height: 16px;
}

.chat-input button img {
    width: 16px;
    height: 16px;
}

#sendButton img {
    filter: brightness(0) saturate(100%) invert(92%) sepia(15%) saturate(200%) hue-rotate(240deg) brightness(120%) contrast(85%);
}

.chat-input button {
    background-color: var(--accent);
    color: white;
    border: none;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(73, 47, 244, 0.31);
    font-size: 13px;
    font-weight: 500;
}

.chat-input button:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(73, 47, 244, 0.4);
}

.chat-input button:active {
    background-color: var(--accent-active);
    transform: translateY(0);
}

.chat-input button:disabled {
    background-color: var(--text-muted);
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    opacity: 0.5;
}

.chat-input button svg {
    width: 16px;
    height: 16px;
}

/* Thinking state */
.chat-input.thinking {
    border: 1px solid var(--border-color);
    background: var(--bg-white);
}

.chat-input.thinking textarea {
    color: var(--text-muted);
}

.chat-input.thinking button {
    background: var(--bg-secondary);
    color: var(--error);
}

.chat-input.thinking button svg {
    width: 12px;
    height: 12px;
}

/* Stop icon for thinking state */
.chat-input.thinking button::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: var(--error);
    border-radius: 2px;
}

.chat-input.thinking button svg {
    display: none;
}

.job-extraction-summary {
    background-color: var(--bg-white);
    border: 1px solid var(--bg-tertiary);
    border-radius: 6px;
    padding: 8px;
    margin: 8px 0;
}

/* Pasted content chip indicator */
.pasted-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: var(--accent);
    border-radius: 6px;
    padding: 4px 8px;
    margin-bottom: 8px;
    margin-right: 4px;
    font-size: 11px;
    font-weight: 500;
    color: var(--text-ondark);
    transition: all 0.2s ease;
    animation: fadeInUp 0.2s ease;
    align-self: flex-start;
    white-space: nowrap;
    max-width: 100%;
}

.pasted-chip-text {
    user-select: none;
    letter-spacing: 0.3px;
}

.pasted-chip-summary {
    user-select: none;
    opacity: 0.9;
    font-weight: 400;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pasted-chip-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
    color: var(--text-ondark);
    width: 16px;
    height: 16px;
    border-radius: 3px;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.pasted-chip-remove:hover {
    background-color: var(--accent-active);
    color: var(--text-ondark);
}

.pasted-chip-remove:active {
    background-color: rgba(148, 148, 148, 0.3);
}

.pasted-chip-remove svg {
    width: 12px;
    height: 12px;
    display: block;
}

/* Pasted chip in message (non-removable, clickable) */
.pasted-chip-message {
    cursor: pointer;
    transition: all 0.2s ease;
}

.pasted-chip-message:hover {
    background-color: var(--accent-active);
    transform: translateY(-1px);
}

/* Pasted text modal */
.pasted-text-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(4px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.pasted-text-modal-content {
    background: var(--bg-white);
    border-radius: 12px;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

.pasted-text-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-color);
}

.pasted-text-modal-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.pasted-text-modal-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-muted);
    transition: all 0.2s ease;
    padding: 0;
}

.pasted-text-modal-close:hover {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.pasted-text-modal-close:active {
    background-color: var(--border-color);
}

.pasted-text-modal-close svg {
    width: 20px;
    height: 20px;
}

.pasted-text-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
}

.pasted-text-content {
    margin: 0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-primary);
    white-space: pre-wrap;
    word-wrap: break-word;
    background: var(--bg-secondary);
    padding: 16px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.pasted-text-editable {
    width: 100%;
    margin: 0;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-white);
    padding: 16px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    resize: vertical;
    min-height: 300px;
    outline: none;
    transition: border-color 0.2s ease;
}

.pasted-text-editable:focus {
    border-color: var(--accent);
}

.pasted-text-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
}

.pasted-text-modal-cancel,
.pasted-text-modal-save {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.pasted-text-modal-cancel {
    background: transparent;
    color: var(--text-muted);
}

.pasted-text-modal-cancel:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.pasted-text-modal-save {
    background: var(--accent);
    color: var(--text-ondark);
}

.pasted-text-modal-save:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(73, 47, 244, 0.3);
}

.pasted-text-modal-save:active {
    transform: translateY(0);
}

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

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

/* ==========================================================================
   Animations
   ========================================================================== */

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

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding: 1rem 1.25rem;
    background-color: var(--agent-bubble);
    color: var(--agent-text);
    border-radius: 1.25rem;
    border-bottom-left-radius: 0.25rem;
    max-width: 70px;
}

.typing-indicator span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--agent-text);
    animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

.thinking-indicator {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    color: var(--agent-text);
}

.spinning-ray-icon {
    animation: spin 1s linear infinite;
    flex-shrink: 0;
}

.thinking-text {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-secondary);
}

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

/* ==========================================================================
   Role Selection Component
   ========================================================================== */
.role-selection-component {
    margin: -1rem 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.role-option {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    background-color: var(--bg-white);
    border: 1px solid var(--bg-accent);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.role-option:hover {
    background-color: var(--bg-secondary);
}

.role-option.selected {
    background-color: var(--bg-accent);
}

.role-title {
    font-weight: 500;
    color: var(--accent);
    font-size: 13px;
}

.role-option.selected .role-title {
    color: var(--text-secondary);
}

.role-option.disabled {
    cursor: not-allowed;
}

.role-option.disabled:hover {
    background-color: var(--bg-white);
}

/* ==========================================================================
   Scroll Indicator
   ========================================================================== */

.scroll-indicator {
    position: absolute;
    top: -40px;
    left: calc(50% - 16px);
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: auto;
}

.scroll-indicator-content {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--bg-white);
    border: 1px solid var(--bg-accent);
    border-radius: 20px;
    padding: 8px 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-size: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    opacity: 0.85;
    transition: all 0.2s ease;
}

.scroll-indicator-content:hover {
    background-color: var(--bg-secondary);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.scroll-indicator svg {
    color: var(--accent);
    animation: bounce 2s infinite;
}

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-3px);
    }
    60% {
        transform: translateY(-2px);
    }
}

/* ==========================================================================
   Scrollbar Styling
   ========================================================================== */

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* ==========================================================================
   Loading Spinner Styles
   ========================================================================== */

.loading-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.loading-spinner {
    text-align: center;
}

.spinner {
    width: 32px;
    height: 32px;
    border: 4px solid var(--bg-tertiary);
    border-top: 4px solid var(--accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

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

.loading-spinner p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

/* Candidate Table Styles */

.candidate-table-container {
    min-width: 320px;
    max-width: 800px;
    width: 800px;
    max-height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0;
    margin: 0 auto;
    box-sizing: border-box;
}

.table-header {
    text-align: left;
    position: relative;
    padding: 8px 0px;
}

.table-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.table-header p {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.6;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 16px;
}

.segmented-control {
    display: flex;
    background: var(--bg-secondary);
    border-radius: 6px;
    padding: 4px;
    gap: 0;
}

.segment-button {
    background: transparent;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.segment-button.active {
    background: var(--bg-white);
    color: var(--text-primary);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.segment-button:hover:not(.active) {
    background: var(--bg-secondary);
}

p.description {
    font-size: 12px;
    line-height: 1.2;
}

.action-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Filter button - primary styling to match send button */
.action-btn.edit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    background: var(--accent);
    color: var(--bg-accent);
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    gap: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(73, 47, 244, 0.31);
}

.action-btn.edit-btn:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(73, 47, 244, 0.4);
}

.action-btn.edit-btn:active {
    background: var(--accent-active);
    transform: translateY(0);
}

.action-btn.edit-btn img {
    filter: brightness(0) saturate(100%) invert(92%) sepia(15%) saturate(200%) hue-rotate(240deg) brightness(120%) contrast(85%);
}

.delete-btn {
    padding: 8px;
}

.delete-btn img {
    margin: 0;
}

.view-people-btn {
    background: var(--accent);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    position: absolute;
    top: 0;
    right: 0;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.view-people-btn:hover {
    background: var(--accent-hover);
}

.candidate-cards {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    flex: 1;
    gap: 8px;
    padding: 0 24px 0 0;
    min-width: 480px;
}

.candidate-cards::-webkit-scrollbar {
    width: 6px;
}

.candidate-cards::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 3px;
}

.candidate-cards::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 3px;
}

.candidate-cards::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

.candidate-card {
    background: var(--bg-white);
    border-left: 4px solid var(--bg-white);
    padding: 12px 16px 16px 44px;
    transition: box-shadow 0.2s ease;
    position: relative;
    border-radius: 6px;
}

.candidate-card:last-child {
    margin-bottom: 64px;
}

.candidate-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.candidate-card.selected {
    background: var(--bg-accent);
    border-left: 4px solid var(--accent);
}

.candidate-card.selected .candidate-checkbox {
    background: var(--accent);
    border-color: var(--accent);
}

.candidate-checkbox {
    position: absolute;
    left: 12px;
    top: 14px;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-white);
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    opacity: 1;
    visibility: visible;
    display: block;
}

.candidate-checkbox:checked {
    background: var(--accent);
    border-color: var(--accent);
}

.candidate-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.candidate-card.selected .candidate-checkbox {
    background: var(--accent);
    border-color: var(--accent);
}

.candidate-card.selected .candidate-checkbox::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.candidate-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 4px;
    flex-wrap: wrap;
    gap: 8px;
}

.candidate-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: color 0.2s ease;
    flex-wrap: wrap;
    min-width: 0;
    flex: 1;
}

.candidate-name:hover {
    color: var(--accent);
}

.candidate-location {
    font-size: 12px;
    font-weight: 300;
    color: var(--text-secondary);
    line-height: 1.4;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Responsive behavior for smaller screens */
@media (max-width: 600px) {
    .candidate-name {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .candidate-location {
        white-space: normal;
        margin-top: 2px;
    }
}

/* More graceful wrapping for medium-sized screens */
@media (max-width: 480px) {
    .candidate-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .candidate-name {
        flex-direction: row;
        align-items: center;
        width: 100%;
    }
    
    .candidate-location {
        white-space: normal;
        margin-top: 2px;
    }
    
    .rating {
        align-self: flex-end;
        margin-top: 4px;
    }
}

.attachment-icon {
    color: var(--text-secondary);
    flex-shrink: 0;
    filter: brightness(0) saturate(100%) invert(42%) sepia(8%) saturate(1234%) hue-rotate(202deg) brightness(95%) contrast(86%);
    cursor: pointer;
    transition: filter 0.2s ease;
}

.attachment-icon:hover {
    filter: brightness(0) saturate(100%) invert(13%) sepia(94%) saturate(7151%) hue-rotate(244deg) brightness(76%) contrast(101%);
}

.job-history {
    margin-bottom: 8px;
}

.job-item {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.4;
}

.job-item .duration {
    color: var(--text-secondary);
    font-weight: 300;
}

.rating {
    font-size: 13px;
    color: var(--accent);
    font-weight: 500;
    margin: 0;
    flex-shrink: 0;
    position: relative;
    cursor: pointer;
}

/* Rating Hover Tooltip Styles */
.rating-hover-tooltip {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    padding: 0;
    min-width: 320px;
    max-width: 400px;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    margin-top: 12px;
}

.rating[data-rating-hover]:hover .rating-hover-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.tooltip-content {
    padding: 16px;
}

.tooltip-content h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 12px 0;
    line-height: 1;
}

.tooltip-content p {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0 0 16px 0;
    line-height: 1.3;
}

.criteria-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.criteria-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid var(--bg-secondary);
    gap: 12px;
}

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

.criteria-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    flex-shrink: 0;
    min-width: 80px;
}

.criteria-value {
    font-size: 13px;
    color: var(--text-secondary);
    text-align: right;
    line-height: 1.4;
    word-wrap: break-word;
}


/* ==========================================================================
   Selection Bar
   ========================================================================== */

.selection-bar {
    position: sticky;
    bottom: 0;
    background: var(--bg-white);
    color: var(--text-primary);
    padding: 8px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
    border: 1px solid var(--border-color);
    border-bottom: none;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    margin-top: 16px;
    width: 100%;
    box-sizing: border-box;
}

.selection-info {
    display: flex;
    align-items: center;
    gap: 8px;
}

.select-all-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.select-all-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    background: var(--bg-white);
    cursor: pointer;
    transition: all 0.2s ease;
}

.select-all-checkbox:checked {
    background: var(--accent);
    border-color: var(--accent);
}

.select-all-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 10px;
    font-weight: bold;
}

.select-all-label {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.selection-icon {
    color: var(--accent);
}

.selection-count {
    font-size: 13px;
    font-weight: 500;
}

.selection-actions {
    display: flex;
    gap: 12px;
}

.action-button {
    padding: 8px 16px;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.action-button:hover {
    background-color: var(--bg-tertiary);
}

.action-button.secondary {
    background: transparent;
    color: var(--text-primary);
}

.action-button.secondary:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

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

.action-button.secondary.disabled:hover {
    cursor: not-allowed;
}

.action-button.primary {
    background: var(--accent);
    color: var(--bg-accent);
}

.action-button.primary:hover {
    background: var(--accent-hover);
}

/* ==========================================================================
   Dropdown Menu
   ========================================================================== */

.dropdown-container {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    bottom: 100%;
    right: 0;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    z-index: 1001;
    display: none;
    margin-bottom: 8px;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: not-allowed;
    transition: background-color 0.2s ease;
    border-bottom: 1px solid var(--border-color);
    opacity: 0.6;
}

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

.dropdown-item:hover {
    background: var(--bg-secondary);
    cursor: not-allowed;
}

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

/* Color the paperplane icon to match the text color */
.dropdown-item[data-action="message"] .dropdown-icon {
    filter: brightness(0) saturate(100%) invert(42%) sepia(8%) saturate(1234%) hue-rotate(202deg) brightness(95%) contrast(86%);
}

.dropdown-item span {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 400;
}


/* THINKING STEPS */

.thinking-steps {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: -1rem 0;
}

.thinking-step {
    display: flex;
    align-items: center;
    gap: 4px;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.thinking-step.active {
    opacity: 1;
    transform: translateY(0);
}

.thinking-step.completed {
    opacity: 1;
    transform: translateY(0);
}

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

.thinking-spinner {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.thinking-spinner .spinning-ray-icon {
    animation: spin 1s linear infinite;
}

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

.thinking-text {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 400;
}


/* ==========================================================================
   Loading Spinner Component
   ========================================================================== */

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    backdrop-filter: blur(4px);
}

/* When loaded in emoji section, make it cover the entire emoji section */
.emoji-section {
    position: relative;
}

.emoji-section .loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.loading-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.loading-spinner-large {
    width: 128px;
    height: 128px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.spinning-ray-icon-large {
    animation: spin 1s linear infinite;
}

.loading-text {
    font-size: 16px;
    font-weight: 400;
    color: var(--text-secondary);
    margin: 0;
}



/* FILTER PANEL STYLES */


/* Filter Panel Styles - Integrated Layout */
.filter-panel {
    position: fixed;
    right: 0;
    width: 0;
    height: calc(100vh - 40px - 16px); /* Full height minus header minus border */
    background: var(--bg-white);
    z-index: 1000;
    transition: width 0.3s ease-in-out;
    overflow: hidden;
    white-space: nowrap;
    border-radius: 6px;
    margin-right: 8px;
}

.filter-panel.open {
    width: 312px;
}

/* When filter panel is open, adjust the page layout using :has() */
body:has(.filter-panel.open) .candidate-table-container {
    margin-right: 312px;
    transition: margin-right 0.3s ease-in-out;
}

/* Selection bar adjusts automatically with candidate-cards container */

.filter-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    border-bottom: 1px solid var(--border-color);
}

.filter-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-icon {
    opacity: 0.8;
}

.filter-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.filter-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 6px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.filter-close-btn:hover {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}


.filter-content {
    padding: 16px;
    height: calc(100% - 49px); /* Subtract header height: 16px padding + 1px border + ~32px content */
    overflow-y: auto;
    min-width: 312px;
    white-space: normal;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

/* Custom scrollbar styling for filter content */
.filter-content::-webkit-scrollbar {
    width: 6px;
}

.filter-content::-webkit-scrollbar-track {
    background: transparent;
}

.filter-content::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 3px;
}

.filter-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.filter-section {
    margin-bottom: 28px;
}

.filter-section:last-child {
    margin-bottom: 0;
}

.filter-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 12px 0;
}

.filter-items {
    margin-bottom: 16px;
}

.filter-item-wrapper {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.filter-item-wrapper:last-child {
    margin-bottom: 0;
}

.filter-pill {
    display: inline-flex;
    align-items: center;
    color: var(--text-primary);
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2px 8px;
    font-size: 12px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.filter-pill:hover {
    color: var(--error);
    background: var(--bg-white);
    border-color: var(--error);
}

.pill-text {
    font-weight: 400;
}

.pill-text:hover {
    color: var(--error);
}

.pill-distance {
    color: var(--text-muted);
    font-weight: 400;
    margin-left: 3px;
}

.pill-logic {
    color: var(--text-muted);
    font-size: 12px;
    margin-left: 8px;
    font-weight: 400;
    margin-top: 2px;
}

.add-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 13px;
    cursor: pointer;
    padding: 3px 0;
    transition: color 0.2s ease;
}

.add-filter-btn:hover {
    color: var(--text-primary);
}

.add-icon {
    opacity: 0.8;
}

.add-text {
    font-weight: 400;
}

/* Add filter input field */
.add-filter-input {
    width: 100%;
    background: var(--bg-white);
    border: 1px solid var(--accent);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 13px;
    color: var(--text-primary);
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.add-filter-input:focus {
    border-color: var(--accent-hover);
    box-shadow: 0 0 0 3px rgba(73, 47, 244, 0.1);
}

.add-filter-input::placeholder {
    color: var(--text-muted);
}

.add-filter-input.hidden {
    display: none;
}

.add-filter-btn.hidden {
    display: none;
}

/* Filter Overlay - Removed for integrated layout */
.filter-overlay {
    display: none;
}

/* ==========================================================================
   Suggestions Component
   ========================================================================== */

.suggestions-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.suggestion-button {
    padding: 8px 16px;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.suggestion-button:hover {
    background-color: var(--bg-tertiary);
}

.suggestion-button:active {
    background-color: var(--text-muted);
}

/* ==========================================================================
   Load Buttons
   ========================================================================== */

button[load-] {
    background: var(--bg-accent);
    color: var(--accent);
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

button[load-]:hover {
    background: var(--accent-hover);
    color: var(--bg-accent);
    transform: translateY(-1px);
}

button[load-]:active {
    background: var(--accent-active);
    transform: translateY(0);
}

button[load-]:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
    transform: none;
    opacity: 1;
}

/* Load button loaded state */
button[load-].loaded {
    font-weight: 400;
    padding: 8px 0;
    background-color: var(--bg-white);
    color: var(--success);
    cursor: not-allowed;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

/* MEET RAY STARTER */

.meet-ray-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 60vh;
    gap: 0;
    margin-left: 1rem;
}

.meet-ray-logo-large {
    margin-bottom: 1rem;
}

.meet-ray-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
}

.meet-ray-description {
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin: 0;
    max-width: 400px;
    line-height: 1.5;
}

.meet-ray-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #EBEBFE;
    border: none;
    border-radius: 6px;
    margin-top: 1.4rem;
    color: #492FF4;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.meet-ray-button:hover {
    background: #D6D6FC;
    transform: translateY(-1px);
}

.rmeet-ray-button:active {
    transform: translateY(0);
}

.meet-ray--title {
    font-weight: 500;
    color: #492FF4;
}

.meet-ray-button-icon {
    flex-shrink: 0;
}

/* ==========================================================================
   Homepage Layout Styles
   ========================================================================== */

.homepage-container {
    padding: 16px 0;
    background: var(--bg-default);
    height: 100%;
    overflow-y: auto;
}

.homepage-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    max-width: 800px;
    margin: 0 auto;
}

.homepage-left,
.homepage-right {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.task-count {
    font-size: 16px;
    color: var(--text-secondary);
    margin-left: 8px;
}

.create-task-btn:hover {
    background: var(--accent-hover);
}

.tasks-status {
    margin-top: 8px;
}

.status-box {
    background: var(--bg-secondary-ongray);
    border-radius: 6px;
    padding: 16px;
}

.status-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.status-description {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.3;
}

.cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-top: 8px;
}

.card {
    background: var(--bg-white);
    border-radius: 6px;
    padding: 16px;
}

.card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.card-description {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0 0 16px 0;
}

.card-btn {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    width: 100%;
}

.card-btn:hover {
    background: var(--bg-tertiary);
}

/* Assigned Section */
.assigned-section {
    background: var(--bg-white);
    border-radius: 6px;
    padding: 16px;
}

.assigned-list {
    margin-top: 16px;
}

.assigned-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.item-icon {
    margin-right: 4px;
    color: var(--accent);
}

.item-text {
    font-size: 13px;
    color: var(--text-primary);
    font-weight: 500;
}

/* Recent Section */
.recent-section {
    background: var(--bg-white);
    border-radius: 6px;
    padding: 16px;
}

.recent-card {
    margin-top: 16px;
}

.recent-item {
    display: flex;
    align-items: center;
}

.recent-item .item-icon {
    margin-right: 12px;
}

.item-details {
    display: flex;
    flex-direction: column;
}

.item-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.item-privacy {
    font-size: 12px;
    color: var(--text-secondary);
}

/* ROLE PAGE STYLES */

.role-container {
    max-width: 720px;
    margin: 0 auto;
    padding: var(--lg);
    line-height: var(--relaxed);
}

.role-container h1,
.role-container h2,
.role-container p,
.role-container ul,
.role-container ol {
    margin-bottom: var(--md);
}

.role-container ul,
.role-container ol {
    padding-left: var(--md);
}

/* Role page specific styles */
.role-page-body {
    background: var(--bg-default);
    padding: 2rem;
    min-height: 100vh;
    overflow-y: auto;
}

.role-main-container {
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 3rem;
    max-width: 800px;
    margin: 0 auto;
}

.role-page-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2rem;
    text-align: center;
}

.role-section {
    background: var(--bg-secondary);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.role-section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.role-section-icon {
    color: var(--accent);
}

.role-section-list {
    margin: 0;
    padding-left: 1.5rem;
}

.role-section-list li {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 1rem;
    margin-bottom: 0.75rem;
}

.role-section-list li:last-child {
    margin-bottom: 0;
}

.role-cta-container {
    text-align: center;
    margin-top: 2rem;
}

.role-cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(73, 47, 244, 0.3);
}

.role-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(73, 47, 244, 0.4);
}

/* Role index page styles */
.role-index-body {
    background: var(--bg-default);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.role-index-container {
    background: var(--bg-white);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 3rem;
    max-width: 600px;
    width: 100%;
}

.role-index-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-align: center;
}

.role-index-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 2rem;
}

.role-index-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.role-index-item {
    display: block;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--bg-white) 0%, var(--bg-secondary) 100%);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.role-index-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border-color: var(--accent);
}

.role-index-item-title {
    font-size: 1.1rem;
    color: var(--text-primary);
    font-weight: 600;
}

/* ==========================================================================
   Expandable Search Section
   ========================================================================== */

.expandable-title {
    margin-bottom: 8px;
    margin-top: -1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-direction: row-reverse;
    padding: 8px 0;
    border-bottom: 1px solid #e0e0e0;
    transition: all 0.2s ease;
}

.expandable-title:hover {
    background-color: #f5f5f5;
    padding-left: 8px;
    border-radius: 4px;
}

.caret {
    transition: transform 0.2s ease;
    font-size: 12px;
    color: #666;
    transform: rotate(90deg);
}

.caret.expanded {
    transform: rotate(-90deg);
}

.expandable-content {
    margin-top: 12px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.3s ease, opacity 0.3s ease, margin-top 0.3s ease;
}

.expandable-content.expanded {
    max-height: 1000px;
    opacity: 1;
    margin-top: 12px;
}

.expandable-content.expanded button {
    margin-left: 20px;
}

/* ==========================================================================
   Profile Overlay Styles
   ========================================================================== */

.profile-overlay {
    position: fixed;
    top: 0;
    right: 0;
    width: 0;
    height: 100vh;
    background: var(--bg-white);
    z-index: 2000;
    transition: width 0.3s ease-in-out, opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    overflow: hidden;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
}

.profile-overlay.open {
    width: 70vw;
    min-width: 600px;
    max-width: 1000px;
    opacity: 1;
    visibility: visible;
}

.profile-overlay.open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.1);
    z-index: -1;
    pointer-events: none;
}

.profile-overlay-content {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    padding: 0;
    position: relative;
}

/* Profile Header */
.profile-header {
    padding: 8px 16px;
    padding-bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.profile-name-section {
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-name {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.profile-edit-btn {
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.profile-edit-btn:hover {
    background: var(--bg-secondary);
}

.profile-edit-btn img {
    filter: brightness(0) saturate(100%) invert(42%) sepia(8%) saturate(1234%) hue-rotate(202deg) brightness(95%) contrast(86%);
}

.profile-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.profile-action-btn {
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.profile-action-btn:hover {
    background: var(--bg-secondary);
}

.profile-action-btn img {
    filter: brightness(0) saturate(100%) invert(42%) sepia(8%) saturate(1234%) hue-rotate(202deg) brightness(95%) contrast(86%);
}

.profile-share-btn {
    background: var(--accent);
    color: var(--bg-white);
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.profile-share-btn:hover {
    background: var(--accent-hover);
}

/* Profile Details */
.profile-details {
    padding: 16px 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.profile-detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--text-primary);
}

.profile-detail-item img {
    filter: brightness(0) saturate(100%) invert(42%) sepia(8%) saturate(1234%) hue-rotate(202deg) brightness(95%) contrast(86%);
}

/* Profile Tags */
.profile-tags {
    padding: 0 24px 16px 24px;
    display: flex;
    gap: 8px;
}

.profile-tag {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: 16px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 400;
}

/* Profile Tabs */
.profile-tabs {
    padding: 0 24px;
    display: flex;
    border-bottom: 1px solid var(--border-color);
}

.profile-tab {
    background: transparent;
    border: none;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.profile-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.profile-tab:hover:not(.active) {
    color: var(--text-primary);
}

/* Profile Content */
.profile-content {
    padding: 24px;
    height: calc(100vh - 200px);
    overflow-y: auto;
}

.profile-tab-content {
    display: none;
}

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

/* Profile Sections */
.profile-section {
    margin-bottom: 32px;
}

.profile-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.profile-section-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.profile-add-btn {
    width: 24px;
    height: 24px;
    background: var(--bg-secondary);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.profile-add-btn:hover {
    background: var(--bg-tertiary);
}

.profile-add-btn img {
    filter: brightness(0) saturate(100%) invert(42%) sepia(8%) saturate(1234%) hue-rotate(202deg) brightness(95%) contrast(86%);
}

/* Profile Subsections */
.profile-subsection {
    margin-bottom: 24px;
}

.profile-subsection-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.profile-subsection-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.profile-subsection-header img {
    filter: brightness(0) saturate(100%) invert(42%) sepia(8%) saturate(1234%) hue-rotate(202deg) brightness(95%) contrast(86%);
}

.skill-count {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 400;
}

.profile-subsection p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin: 0 0 12px 0;
}

.beamery-ai {
    color: var(--accent);
    font-weight: 600;
}

/* Skill Tags */
.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.skill-tag {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: 16px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 400;
    position: relative;
}

.skill-tag.suggested {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.skill-tag.suggested::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 5px;
    background: var(--accent);
    border-radius: 50%;
}

.skill-tag.suggested {
    padding-left: 16px;
}

/* Experience Items */
.experience-item {
    margin-bottom: 24px;
}

.experience-company {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.experience-duration {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.experience-role {
    margin-bottom: 16px;
    padding-left: 16px;
}

.experience-role-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.experience-role-header h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    flex: 1;
}

.experience-primary-tag {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 400;
}

.experience-role-details {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.experience-role p {
    font-size: 13px;
    color: var(--text-primary);
    line-height: 1.4;
    margin: 0;
}

/* Education Items */
.education-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
}

.education-institution {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.education-duration {
    font-size: 13px;
    color: var(--text-secondary);
}

.education-status-tag {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: 12px;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 400;
    align-self: flex-start;
}

.education-field {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

/* Location Items */
.location-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.location-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.location-tag {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: 16px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 400;
    align-self: flex-start;
}

/* Language Tags */
.language-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.language-tag {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: 16px;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 400;
    position: relative;
}

.language-tag::after {
    content: '×';
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: var(--text-muted);
    cursor: pointer;
}

/* Profile Overlay Scrollbar */
.profile-overlay-content::-webkit-scrollbar {
    width: 6px;
}

.profile-overlay-content::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

.profile-overlay-content::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 3px;
}

.profile-overlay-content::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

.profile-content::-webkit-scrollbar {
    width: 6px;
}

.profile-content::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

.profile-content::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 3px;
}

.profile-content::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}
