/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #fafcff;
    color: #111111;
    line-height: 1.5;
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Sidebar Navigation */
.sidebar {
    width: 65px;
    background-color: #ffffff;
    border-right: 1px solid #d1d1d6;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 32px 0;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 10;
}

.logo {
    margin-bottom: 40px;
}

.nav-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background: none;
    border: none;
    color: #8e8e93;
    cursor: pointer;
    font-size: 12px;
    font-weight: 400;
    width: 64px;
    text-align: center;
    transition: color 0.2s;
}

.nav-item:hover {
    color: #007aff;
}

.nav-item.active {
    color: #007aff;
}

.nav-item svg {
    width: 24px;
    height: 24px;
}

.nav-bottom {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
}

.profile {
    width: 40px;
    height: 40px;
    background: #c7c7cc;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fcfcfc;
    font-weight: 700;
    font-size: 15px;
    backdrop-filter: blur(81.25px);
    box-shadow: 0px 12.5px 125px 0px rgba(0,0,0,0.3);
}

/* Main Content */
.main-content {
    margin-left: 65px;
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.container {
    max-width: 1447px;
    margin: 0 auto;
}

/* Toolbar */
.toolbar {
    background: #efefef;
    padding: 24px 32px;
    border-bottom: 1px solid #d1d1d6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 72px;
}

.toolbar h1 {
    font-size: 16px;
    font-weight: 400;
    color: #131313;
    margin: 0;
}

.menu-dots {
    background: none;
    border: none;
    color: #8e8e93;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.menu-dots:hover {
    background: #f0f0f0;
}

/* Screen Management */
.screen {
    flex: 1;
    overflow-y: auto;
}

/* Header Section */
.header-section {
    background-color: #e8f2fc;
    padding: 64px 112px;
    margin-bottom: 40px;
    text-align: center;
}

.header-section h1 {
    font-size: 24px;
    font-weight: 600;
    color: #111111;
    margin-bottom: 22px;
}

.chat-input-container {
    width: 100%;
    margin: 0 auto 16px auto;
    max-width: 1000px;
}

.chat-input {
    background: #fcfcfd;
    border: 1px solid #d0d5dd;
    border-radius: 8px;
    padding: 16px;
    position: relative;
    min-height: 104px;
}

.chat-input textarea {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;
    font-size: 16px;
    font-family: 'SF Pro Text', -apple-system, BlinkMacSystemFont, sans-serif;
    color: rgba(144,161,185,0.5);
    resize: none;
    min-height: 48px;
}

.input-actions {
    position: absolute;
    bottom: 16px;
    left: 16px;
    right: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.attachment-icon {
    color: #8e8e93;
}

.send-button {
    background: #007aff;
    border: none;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.send-button:hover {
    background: #0056b3;
}

.example-task-btn {
    background: white;
    border: 1px solid #c7c7cc;
    border-radius: 6px;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #111111;
    cursor: pointer;
    transition: background-color 0.2s;
}

.example-task-btn:hover {
    background: #f8f8f8;
}

.example-buttons-row {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 16px;
}

.example-buttons-row .example-task-btn {
    flex-shrink: 0;
    white-space: nowrap;
}

/* Chats Section */
.chats-section {
    max-width: 1126px;
    margin: 0 auto;
}

.chats-section h2 {
    font-size: 18px;
    font-weight: 600;
    color: #111111;
    margin-bottom: 16px;
}

.actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.left-actions,
.right-actions {
    display: flex;
    gap: 8px;
}

.search-btn,
.filter-btn,
.archive-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: transparent;
    border: 1px solid #c7c7cc;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #000000;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-btn:hover,
.filter-btn:hover,
.archive-btn:hover {
    background: #f8f8f8;
}

.search-btn {
    width: 200px;
}

/* Filter Tags */
.filter-tags {
    display: flex;
    gap: 4px;
    margin-bottom: 16px;
}

.filter-tag {
    background: #f0f0f0;
    border-radius: 2px;
    padding: 1px 8px;
    font-size: 12px;
    color: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    gap: 3px;
}

.close-tag {
    background: none;
    border: none;
    font-size: 10px;
    color: rgba(0,0,0,0.85);
    cursor: pointer;
    padding: 0;
    margin-left: 3px;
}

/* Table */
.table-container {
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #d1d1d6;
    overflow: hidden;
}

.chats-table {
    width: 100%;
    border-collapse: collapse;
}

.chats-table th {
    background: #f2f2f7;
    color: #8e8e93;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    text-align: left;
    padding: 16px 12px;
    border-bottom: 1.6px solid #dbdbdb;
}

.chats-table th.sortable {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.chats-table td {
    padding: 22px 12px;
    font-size: 16px;
    font-weight: 500;
    color: #222222;
    border-bottom: 1.6px solid #dbdbdb;
}

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

.chats-table tbody tr {
    background: #ffffff !important;
    transition: background-color 0.2s ease;
}

.chats-table tbody tr:hover {
    background: #f8f9fa !important;
}

.highlighted-row {
    background: #ffffff !important;
}

.title-cell {
    max-width: 300px;
    position: relative;
    padding-right: 32px;
}

.lock-icon {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: #8e8e93;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    color: #222222;
    display: inline-block;
    width: fit-content;
}

.status-badge.active {
    background: #d4f8d3;
}

.status-badge.draft {
    background: #f2f2f7;
}

.menu-btn {
    background: none;
    border: none;
    color: #8e8e93;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.menu-btn:hover {
    background: #f0f0f0;
}

/* Status Container and Progress Subtext */
.status-container {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.progress-subtext {
    font-size: 12px;
    color: #8e8e93;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 4px;
}

.separator {
    color: #c7c7cc;
    margin: 0 2px;
}

/* Pulsing Text Animation */
.pulsing-text {
    background: linear-gradient(45deg, #007aff, #34c759, #007aff);
    background-size: 200% 200%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: pulsingGradient 2s ease-in-out infinite;
    font-weight: 500;
}

@keyframes pulsingGradient {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Fieldwork Row Styling */
.fieldwork-row {
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.fieldwork-row:hover {
    background: #f0f8ff !important;
    transform: scale(1.002);
}

.fieldwork-row:active {
    transform: scale(0.998);
}


/* Responsive Design */
@media (max-width: 1200px) {
    .main-content {
        padding: 0 32px;
    }
    
    .header-section {
        padding: 48px 64px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 50px;
        padding: 16px 0;
    }
    
    .main-content {
        margin-left: 50px;
        padding: 0 16px;
    }
    
    .nav-item span {
        display: none;
    }
    
    .header-section {
        padding: 32px 16px;
    }
    
    .header-section h1 {
        font-size: 20px;
    }
    
    .actions-bar {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }
    
    .left-actions,
    .right-actions {
        justify-content: center;
    }
    
    .search-btn {
        width: auto;
    }
    
    .chats-table {
        font-size: 14px;
    }
    
    .chats-table th,
    .chats-table td {
        padding: 12px 8px;
    }
}

/* New Chat Screen */
.new-chat-container {
    background: #ffffff;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.new-chat-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 32px;
    align-items: center;
    flex: 1;
    overflow-y: auto;
    padding: 40px 64px 160px 64px;
}

.greeting-section {
    text-align: center;
    margin-bottom: 40px;
}

.greeting-title {
    font-size: 32px;
    font-weight: 400;
    color: #1e1e1e;
    margin: 0 0 17px 0;
    line-height: normal;
}

.greeting-subtitle {
    font-size: 20px;
    font-weight: 400;
    color: #878787;
    margin: 0;
    line-height: normal;
}

.content-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    width: 100%;
    max-width: 1200px;
}

.gradient-card {
    width: 188px;
    background: linear-gradient(180deg, #db4e66 0%, #a24688 39.568%, #4e3aba 100%);
    border-radius: 5px;
    padding: 24px;
    color: white;
    cursor: pointer;
    transition: transform 0.2s;
    height: 100%;
}

.gradient-card:hover {
    transform: translateY(-2px);
}

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

.card-icon {
    width: 24px;
    height: 24px;
}

.card-text h3 {
    font-size: 18px;
    font-weight: 500;
    margin: 0 0 8px 0;
    line-height: 24px;
}

.card-text p {
    font-size: 14px;
    font-weight: 400;
    margin: 0;
    line-height: 18px;
    letter-spacing: -0.084px;
    color: #e2e8f0;
}

.feature-cards {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.feature-card {
    background: #fbfbfb;
    border: 1px solid #d6d6d6;
    border-radius: 6px;
    padding: 24px 16px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.feature-card:hover {
    background: #f5f5f5;
    transform: translateY(-1px);
}

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

.feature-text {
    flex: 1;
}

.feature-text h4 {
    font-size: 14px;
    font-weight: 500;
    color: #000000;
    margin: 0 0 4px 0;
    line-height: 14px;
}

.feature-text p {
    font-size: 14px;
    font-weight: 400;
    color: #64748b;
    margin: 0;
    line-height: 20px;
    max-width: 227px;
}

.feature-icon {
    color: #8e8e93;
    margin-left: 16px;
}

/* Feature card sized to match gradient card */
.feature-card-sized {
    width: 188px;
    background: #fbfbfb;
    border: 1px solid #d6d6d6;
    border-radius: 6px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    height: 100%;
}

.feature-card-sized:hover {
    background: #f5f5f5;
    transform: translateY(-1px);
}

.feature-content-vertical {
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: 100%;
}

.feature-content-vertical .feature-icon {
    color: #8e8e93;
    margin-left: 0;
    align-self: flex-start;
}

.feature-content-vertical .feature-text {
    flex: 1;
}

.feature-content-vertical .feature-text h4 {
    font-size: 18px;
    font-weight: 500;
    color: #000000;
    margin: 0 0 8px 0;
    line-height: 24px;
}

.feature-content-vertical .feature-text p {
    font-size: 14px;
    font-weight: 400;
    color: #64748b;
    margin: 0;
    line-height: 18px;
    letter-spacing: -0.084px;
}

/* New Primary and Secondary Card Styles */
.primary-card {
    flex: 1 1 100%;
    min-width: 300px;
    background: linear-gradient(135deg, #007aff 0%, #0056b3 100%);
    border-radius: 12px;
    padding: 24px;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.primary-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 122, 255, 0.3);
}

.secondary-card {
    flex: 1 1 calc(50% - 8px);
    min-width: 280px;
    background: #f8f9fa;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.secondary-card:hover {
    background: #f1f3f4;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.secondary-card .card-icon {
    color: #6b7280;
}

.secondary-card .card-text h3 {
    color: #374151;
}

.secondary-card .card-text p {
    color: #6b7280;
}

.new-chat-input-section {
    width: calc(100% - 65px);
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: fixed;
    bottom: 0;
    left: 65px;
    right: 0;
    background: #ffffff;
    padding: 24px 64px 32px 64px;
    border-top: 1px solid #e5e7eb;
    z-index: 100;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.suggestions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.suggestions-label {
    font-size: 12px;
    font-weight: 400;
    color: #a1a1aa;
    margin: 0;
    line-height: 16px;
}

.suggestion-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.suggestion-chip {
    background: #141415;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 8px;
    padding: 4px 13px;
    color: white;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
    height: 28px;
}

.suggestion-chip:hover {
    background: #2a2a2b;
}

.new-chat-input {
    border: 1px solid #d0d5dd;
    border-radius: 8px;
}

.new-chat-input textarea {
    color: #121212;
}

.new-chat-input textarea::placeholder {
    color: #8e8e93;
}

/* Responsive adjustments for new chat screen */
@media (max-width: 1024px) {
    .new-chat-content {
        padding: 40px 32px 160px 32px;
    }
    
    .new-chat-input-section {
        padding: 24px 32px 32px 32px;
    }
}

@media (max-width: 768px) {
    .content-grid {
        flex-direction: column;
        align-items: stretch;
    }
    
    .primary-card,
    .secondary-card {
        flex: 1 1 100%;
        min-width: unset;
    }
    
    .gradient-card {
        width: 100%;
    }
    
    .greeting-title {
        font-size: 28px;
    }
    
    .greeting-subtitle {
        font-size: 18px;
    }
}

/* Search Modal */
.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

.search-dialog {
    width: 1200px;
    max-width: 95vw;
    height: 774px;
    max-height: 90vh;
    background: #f8f7f6;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.search-header {
    height: 56px;
    border-bottom: 1px solid rgba(5, 5, 5, 0.08);
    display: flex;
    align-items: center;
    padding: 0 20px;
}

.search-input-container {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 16px;
    font-weight: 400;
    color: #1d1c1b;
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.1px;
}

.search-input::placeholder {
    color: #646362;
}

.search-icon {
    color: #646362;
    flex-shrink: 0;
}

.search-content {
    flex: 1;
    display: flex;
    height: 720px;
}

.search-sidebar {
    width: 480px;
    border-right: 1px solid rgba(5, 5, 5, 0.08);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
}

.search-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px 6px;
}

.section-title {
    font-size: 14px;
    font-weight: 400;
    color: #646362;
    letter-spacing: -0.1px;
    line-height: 21px;
}

.section-link {
    font-size: 13px;
    font-weight: 400;
    color: #646362;
    letter-spacing: -0.1px;
    line-height: 19.5px;
    cursor: pointer;
}

.section-link:hover {
    color: #1d1c1b;
}

.search-option {
    height: 48px;
    border-radius: 16px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-option:hover {
    background: rgba(5, 5, 5, 0.06);
}

.search-option.highlighted {
    background: rgba(5, 5, 5, 0.04);
}

.option-icon {
    width: 16px;
    height: 16px;
    color: #1d1c1b;
    flex-shrink: 0;
}

.search-option span {
    font-size: 15.625px;
    font-weight: 400;
    color: #1d1c1b;
    letter-spacing: -0.1px;
    line-height: 24px;
}

.search-item {
    height: 48px;
    border-radius: 16px;
    padding: 0 12px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.search-item:hover {
    background: rgba(5, 5, 5, 0.04);
}

.item-content {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: space-between;
}

.item-icon {
    width: 16px;
    height: 16px;
    color: #1d1c1b;
    flex-shrink: 0;
}

.item-title {
    font-size: 15.875px;
    font-weight: 400;
    color: #1d1c1b;
    letter-spacing: -0.1px;
    line-height: 24px;
    flex: 1;
}

.item-date {
    font-size: 13.453px;
    font-weight: 400;
    color: #646362;
    letter-spacing: -0.1px;
    line-height: 21px;
}

.search-preview {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.preview-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-placeholder span {
    font-size: 15.625px;
    font-weight: 400;
    color: #646362;
    letter-spacing: -0.1px;
    line-height: 24px;
}

.search-footer {
    height: 48px;
    border-top: 1px solid rgba(5, 5, 5, 0.08);
    display: flex;
    align-items: center;
    padding: 0 8px;
}

.close-search-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #646362;
    transition: background-color 0.2s;
}

.close-search-btn:hover {
    background: rgba(5, 5, 5, 0.06);
}

/* Search Modal Animations */
.search-modal {
    animation: searchModalFadeIn 0.3s ease-out;
}

.search-modal.closing {
    animation: searchModalFadeOut 0.3s ease-in;
}

.search-dialog {
    animation: searchDialogSlideIn 0.3s ease-out;
}

.search-modal.closing .search-dialog {
    animation: searchDialogSlideOut 0.3s ease-in;
}

@keyframes searchModalFadeIn {
    from {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
    to {
        opacity: 1;
        backdrop-filter: blur(4px);
    }
}

@keyframes searchModalFadeOut {
    from {
        opacity: 1;
        backdrop-filter: blur(4px);
    }
    to {
        opacity: 0;
        backdrop-filter: blur(0px);
    }
}

@keyframes searchDialogSlideIn {
    from {
        transform: scale(0.95) translateY(-20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

@keyframes searchDialogSlideOut {
    from {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
    to {
        transform: scale(0.95) translateY(-20px);
        opacity: 0;
    }
}

/* Responsive Search Modal */
@media (max-width: 1200px) {
    .search-dialog {
        width: 95vw;
        height: 80vh;
    }
    
    .search-content {
        height: auto;
    }
    
    .search-sidebar {
        width: 50%;
    }
}

@media (max-width: 768px) {
    .search-dialog {
        width: 100vw;
        height: 100vh;
        border-radius: 0;
    }
    
    .search-content {
        flex-direction: column;
    }
    
    .search-sidebar {
        width: 100%;
        height: 60%;
        border-right: none;
        border-bottom: 1px solid rgba(5, 5, 5, 0.08);
    }
    
    .search-preview {
        height: 40%;
    }
}

/* Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
}

.search-overlay-content {
    width: 80vw;
    height: 80vh;
    display: flex;
    flex-direction: column;
    background: #f8f7f6;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.search-overlay .search-header {
    height: 72px;
    border-bottom: 1px solid rgba(5, 5, 5, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
}

.search-overlay-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 18px;
    font-weight: 400;
    color: #131313;
    font-family: 'Inter', sans-serif;
}

.search-overlay-input::placeholder {
    color: #8e8e93;
}

.search-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8e8e93;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.search-close-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: #131313;
}

.search-body {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.search-overlay .search-sidebar {
    width: 400px;
    background: #f8f7f6;
    border-right: 1px solid rgba(5, 5, 5, 0.08);
    overflow-y: auto;
    padding: 20px;
}

.search-overlay .search-section {
    margin-bottom: 32px;
}

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

.search-overlay .section-title {
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    font-family: 'Inter', sans-serif;
}

.search-overlay .section-link {
    font-size: 14px;
    font-weight: 400;
    color: #8e8e93;
    font-family: 'Inter', sans-serif;
}

.search-action-item,
.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin-bottom: 4px;
}

.search-action-item:hover,
.search-result-item:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.search-action-item.highlighted {
    background-color: rgba(0, 122, 255, 0.1);
    color: #007aff;
}

.action-icon,
.item-icon {
    flex-shrink: 0;
    color: #8e8e93;
}

.search-action-item.highlighted .action-icon {
    color: #007aff;
}

.search-action-item span,
.search-result-item .item-title {
    font-size: 14px;
    font-weight: 500;
    color: #131313;
    font-family: 'Inter', sans-serif;
}

.search-action-item.highlighted span {
    color: #007aff;
}

.item-content {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: space-between;
}

.item-date {
    font-size: 12px;
    font-weight: 400;
    color: #8e8e93;
    font-family: 'Inter', sans-serif;
}

.search-overlay .search-preview {
    flex: 1;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-overlay .preview-placeholder {
    text-align: center;
    color: #8e8e93;
    font-size: 16px;
    font-weight: 400;
    font-family: 'Inter', sans-serif;
}

/* Keyboard shortcut for closing overlay */
@media (max-width: 768px) {
    .search-overlay-content {
        padding: 0;
    }
    
    .search-overlay .search-sidebar {
        width: 100%;
        border-right: none;
    }
    
    .search-overlay .search-preview {
        display: none;
    }
}

/* Start New Project Screen */
.start-project-container {
    height: 100vh;
    display: flex;
    background: #ffffff;
    transform: translateX(100%);
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.start-project-container.slide-in {
    transform: translateX(0);
}

.start-project-chat {
    flex: 1;
    max-width: 600px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e5e7eb;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    transition-delay: 0.3s;
}

.start-project-container.slide-in .start-project-chat {
    opacity: 1;
    transform: translateY(0);
}

.chat-header {
    padding: 32px 32px 24px;
    border-bottom: 1px solid #f3f4f6;
}

.chat-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.chat-messages {
    flex: 1;
    padding: 24px 32px 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    scroll-behavior: smooth;
    min-height: 0;
}

.message-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: min-content;
}

.message {
    max-width: 80%;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.user-message {
    background: #007aff;
    color: white;
    align-self: flex-end;
    margin-left: auto;
}

.ai-message {
    background: #f8f9fa;
    color: #374151;
    align-self: flex-start;
    border: 1px solid #e5e7eb;
}

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

.ai-avatar {
    width: 24px;
    height: 24px;
    background: #007aff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.ai-name {
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.message p {
    margin: 0;
}

.chat-input-area {
    padding: 24px 32px 32px;
    border-top: 1px solid #f3f4f6;
    flex-shrink: 0;
}

.new-project-input {
    background: #ffffff;
    border: 1px solid #d1d5db;
}

.new-project-input:focus-within {
    border-color: #007aff;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

/* Project Toolbar */
.project-toolbar {
    background: #efefef;
    border-bottom: 1px solid #aeaeb2;
    padding: 16px 16px;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    transition-delay: 0.5s;
}

.start-project-container.slide-in .project-toolbar {
    opacity: 1;
    transform: translateY(0);
}

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

.search-container {
    background: #ffffff;
    border: 1px solid rgba(168,174,189,0.32);
    border-radius: 8px;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 178px;
}

.search-container .search-icon {
    width: 16px;
    height: 16px;
    color: #637381;
    flex-shrink: 0;
}

.search-container .search-input {
    border: none;
    outline: none;
    background: transparent;
    font-size: 14px;
    color: #637381;
    font-family: 'Circular Std', sans-serif;
    letter-spacing: -0.42px;
    width: 100%;
}

.search-container .search-input::placeholder {
    color: #637381;
}

.toolbar-btn {
    background: #dedede;
    border: 1px solid #b5b5b5;
    border-radius: 6px;
    padding: 4px 8px;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: rgba(13,13,13,0.8);
    font-family: 'SF Pro Text', sans-serif;
    cursor: pointer;
    transition: background-color 0.2s;
}

.toolbar-btn:hover {
    background: #d0d0d0;
}

.toolbar-btn svg {
    width: 14px;
    height: 14px;
    color: currentColor;
}

/* Project Workflow Panel */
.project-workflow-panel {
    background: #ffffff;
    display: flex;
    flex-direction: column;
    flex: 1;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    transition-delay: 0.6s;
    width: 400px;
}

.start-project-container.slide-in .project-workflow-panel {
    opacity: 1;
    transform: translateX(0);
}

/* Workflow Stages List */
.workflow-stages-list {
    flex: 1;
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.workflow-stages-scrollable {
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-bottom: 16px;
}

.workflow-stages-sticky {
    flex-shrink: 0;
    border-top: 1px solid #e5e7eb;
    padding-top: 16px;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Workflow Stage Container */
.workflow-stage {
    margin: 0 12px;
}

/* Stage Header */
.stage-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #f8f9fa;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
    opacity: 0;
    transform: translateY(10px);
}

.stage-header:hover {
    background: #f1f3f4;
    border-color: #9ca3af;
}

.stage-header.active-stage {
    background: #e8f4fd;
    border-color: #007aff;
    color: #007aff;
}

.locked-stage .stage-header {
    background: #f9fafb;
    color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.7;
}

.locked-stage .stage-header:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

/* Stage Expand Button */
.stage-expand-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.expand-icon {
    width: 16px;
    height: 16px;
    transition: transform 0.2s ease;
}

.stage-header.collapsed .expand-icon {
    transform: rotate(-90deg);
}

/* Stage Title */
.stage-title {
    font-size: 14px;
    font-weight: 600;
    flex: 1;
}

/* Stage Status */
.stage-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
}

.stage-status.in-progress {
    color: #007aff;
}

.stage-status.locked {
    color: #9ca3af;
}

.progress-indicator {
    background: #007aff;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.locked-text {
    color: #9ca3af;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lock-icon {
    width: 14px;
    height: 14px;
    color: #9ca3af;
    margin-right: 4px;
}

/* Stage Steps Container */
.stage-steps {
    margin-left: 24px;
    padding-left: 16px;
    border-left: 2px solid #e5e7eb;
    display: none;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
    position: relative;
}

.stage-steps.expanded {
    display: flex;
}

.stage-steps::before {
    content: '';
    position: absolute;
    left: -2px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, #007aff 0%, #007aff 50%, #e5e7eb 50%, #e5e7eb 100%);
}

/* Workflow Steps List (for backward compatibility) */
.workflow-steps-list {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Workflow Step Cards */
.workflow-step-card {
    background: #ffffff;
    border: 1px solid #aeaeb2;
    border-radius: 6px;
    margin: 0;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
    cursor: pointer;
    overflow: hidden;
    position: relative;
}

/* Modern card styling to match Figma design */
.modern-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 16px;
    overflow: hidden;
}

.modern-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #f3f4f6;
    background: #fafbfb;
}

.card-title-section {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.card-title {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #374151;
    margin: 0;
}

.completion-indicator {
    display: flex;
    align-items: center;
}

.completion-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #d1d5db;
}

.completion-dot.completed {
    background: #10b981;
}

.card-menu-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #6b7280;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.card-menu-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

.modern-card-content {
    padding: 0;
}

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

.card-content-text p {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #374151;
    margin: 0 0 16px 0;
    text-align: left;
}

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

.card-content-text ul {
    margin: 16px 0;
    padding-left: 20px;
}

.card-content-text li {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #374151;
    margin-bottom: 8px;
}

.card-content-text h4 {
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 20px 0 12px 0;
}

.expandable-content {
    display: none;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #f3f4f6;
}

.card-footer {
    padding: 16px 20px;
    border-top: 1px solid #f3f4f6;
    background: #fafbfb;
}

.show-more-btn {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    transition: all 0.2s ease;
}

.show-more-btn:hover {
    color: #374151;
}

.show-more-btn .btn-icon {
    transition: transform 0.2s ease;
}

.show-more-btn:hover .btn-icon {
    transform: translateY(1px);
}

/* Inline editing styles */
.card-content-text {
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.card-content-text:hover {
    background-color: #f9fafb;
    border-radius: 6px;
}

.card-content-text.editing {
    background-color: #ffffff;
    border: 2px solid #3b82f6;
    border-radius: 8px;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
    cursor: text;
}

.card-content-text[contenteditable="true"] {
    outline: none;
}

.card-content-text[contenteditable="true"]:focus {
    outline: none;
}

/* Inline Toolbar */
.inline-toolbar {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    z-index: 1000;
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.inline-toolbar.show {
    opacity: 1;
    transform: translateY(0);
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.toolbar-btn {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: #6b7280;
    border-radius: 6px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toolbar-btn:hover {
    background: #e5e7eb;
    color: #374151;
}

.toolbar-btn.active {
    background: #3b82f6;
    color: white;
}

.toolbar-separator {
    width: 1px;
    height: 24px;
    background: #d1d5db;
    margin: 0 8px;
}

.save-btn, .cancel-btn {
    background: none;
    border: none;
    padding: 8px 12px;
    cursor: pointer;
    border-radius: 6px;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.save-btn {
    color: #059669;
    background: #ecfdf5;
}

.save-btn:hover {
    background: #d1fae5;
    color: #047857;
}

.cancel-btn {
    color: #dc2626;
    background: #fef2f2;
}

.cancel-btn:hover {
    background: #fee2e2;
    color: #b91c1c;
}

.workflow-steps-list .workflow-step-card {
    margin: 0 12px;
}

.stage-steps .workflow-step-card {
    margin: 0;
    border-color: #d1d5db;
    background: #fafbfc;
}

.stage-steps .workflow-step-card:hover {
    border-color: #007aff;
    background: #ffffff;
}

.stage-steps .workflow-step-card::before {
    content: '';
    position: absolute;
    left: -17px;
    top: 50%;
    width: 8px;
    height: 2px;
    background: #007aff;
    transform: translateY(-50%);
}

.workflow-step-card:hover {
    border-color: #007aff;
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.1);
}

.workflow-step-card.editing {
    border-color: #007aff;
    box-shadow: 0 2px 12px rgba(0, 122, 255, 0.15);
}

/* Active Card */
.workflow-step-card.active-card {
    border-color: #34c759;
    background: #f8fff8;
}

/* Locked Cards */
.workflow-step-card.locked-card {
    background: #f8f9fa;
    border-color: #e5e7eb;
    cursor: not-allowed;
    opacity: 0.7;
}

.workflow-step-card.locked-card:hover {
    border-color: #e5e7eb;
    box-shadow: none;
}

/* Step Header */
.step-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    min-height: 48px;
}

.step-title {
    font-size: 14px;
    font-weight: 600;
    color: #111111;
    line-height: 1.3;
}

.locked-card .step-title {
    color: #8e8e93;
}

/* Step Status Indicators */
.step-status {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.step-status.completed {
    width: 20px;
    height: 20px;
}

.step-status.pending {
    width: 16px;
    height: 16px;
    border: 2px dashed #d1d1d6;
    border-radius: 50%;
    background: #ffffff;
}

.focaldata-badge {
    background: #007aff;
    color: white;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 10px;
    line-height: 1;
}

.lock-icon {
    width: 16px;
    height: 16px;
    color: #8e8e93;
    margin-right: 8px;
}

/* Step Content Area */
.step-content-area {
    border-top: 1px solid #f0f0f0;
    padding: 16px;
    background: #fafbfc;
}

.step-textarea {
    width: 100%;
    min-height: 80px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 12px;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.4;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
}

.step-textarea:focus {
    border-color: #007aff;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.step-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.save-btn, .cancel-btn, .approve-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid;
    transition: all 0.2s;
}

.save-btn, .approve-btn {
    background: #007aff;
    border-color: #007aff;
    color: white;
}

.save-btn:hover, .approve-btn:hover {
    background: #0056b3;
    border-color: #0056b3;
}

.cancel-btn {
    background: #ffffff;
    border-color: #d1d5db;
    color: #374151;
}

.cancel-btn:hover {
    background: #f9fafb;
}

.auto-step-info, .approval-step-info {
    text-align: center;
    color: #6b7280;
    font-size: 14px;
}

.approval-step-info .approve-btn {
    margin-top: 12px;
}

/* Stage Animation Delays */
.start-project-container.slide-in .workflow-stage:nth-child(1) .stage-header {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s ease;
    transition-delay: 0.7s;
}

.start-project-container.slide-in .workflow-stage:nth-child(2) .stage-header {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s ease;
    transition-delay: 0.8s;
}

.start-project-container.slide-in .workflow-stage:nth-child(3) .stage-header {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s ease;
    transition-delay: 0.9s;
}

/* Step Animation Delays */
.start-project-container.slide-in .workflow-step-card:nth-child(1) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 0.9s;
}

.start-project-container.slide-in .workflow-step-card:nth-child(2) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 1.0s;
}

.start-project-container.slide-in .workflow-step-card:nth-child(3) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 1.1s;
}

.start-project-container.slide-in .workflow-step-card:nth-child(4) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 1.2s;
}

.start-project-container.slide-in .workflow-step-card:nth-child(5) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 1.3s;
}

.start-project-container.slide-in .workflow-step-card:nth-child(6) {
    opacity: 1;
    transform: translateY(0);
    transition-delay: 1.4s;
}

/* Approval Dialog Modal */
.approval-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.3);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(4px);
}

.approval-dialog.show {
    display: flex;
}

.approval-dialog-content {
    background: #ffffff;
    border-radius: 8px;
    width: 90vw;
    max-width: 1128px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 40px;
    box-shadow: 0px 10px 100px 0px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: dialogSlideIn 0.3s ease-out;
}

@keyframes dialogSlideIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.approval-dialog.closing .approval-dialog-content {
    animation: dialogSlideOut 0.3s ease-in;
}

@keyframes dialogSlideOut {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.95) translateY(-20px);
    }
}

.approval-header {
    margin-bottom: 40px;
}

.approval-title {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 24px;
    color: #111111;
    margin: 0;
    line-height: normal;
}

.approval-sections {
    display: flex;
    flex-direction: column;
    gap: 32px;
    margin-bottom: 40px;
}

.approval-section {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.approval-section-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    margin-top: 2px;
}

.approval-section-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.approval-section-title {
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: #111111;
    margin: 0;
    line-height: normal;
    white-space: nowrap;
}

.approval-section-text {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 16px;
    color: #8e8e93;
    margin: 0;
    line-height: 1.4;
}

.approval-actions {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    max-width: 600px;
}

.approval-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.approval-checkbox input[type="checkbox"] {
    width: 20px;
    height: 20px;
    border: 2px solid #8e8e93;
    border-radius: 4px;
    appearance: none;
    background: #ffffff;
    cursor: pointer;
    position: relative;
    margin-top: 2px;
    flex-shrink: 0;
}

.approval-checkbox input[type="checkbox"]:checked {
    background: #007aff;
    border-color: #007aff;
}

.approval-checkbox input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.approval-checkbox-label {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 16px;
    color: #8e8e93;
    line-height: 1.4;
    flex: 1;
}

.approval-buttons {
    display: flex;
    gap: 8px;
}

.approval-button {
    padding: 12px 24px;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    min-width: 120px;
}

.approval-button.primary {
    background: #007aff;
    color: #ffffff;
}

.approval-button.primary:hover {
    background: #0056b3;
}

.approval-button.primary:disabled {
    background: #8e8e93;
    cursor: not-allowed;
}

.approval-button.secondary {
    background: #ffffff;
    color: #8e8e93;
    border: 1px solid #d1d1d6;
}

.approval-button.secondary:hover {
    background: #f8f9fa;
}

.approval-terms {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 12px;
    color: #8e8e93;
    line-height: 1.4;
    margin-top: 8px;
}

.approval-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    color: #8e8e93;
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.approval-close-btn:hover {
    background: #f0f0f0;
}

/* Active Chat Screen */
.active-chat-screen {
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.active-chat-screen.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.active-chat-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: #fafcff;
    padding: 0;
}

.active-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-height: calc(100vh - 200px);
    scroll-behavior: smooth;
}

.chat-message {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    max-width: 80%;
    animation: messageSlideIn 0.3s ease-out;
}

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

.user-message {
    align-self: flex-end;
    margin-left: auto;
}

.ai-message {
    align-self: flex-start;
    margin-right: auto;
}

.message-bubble {
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 16px;
    line-height: 1.5;
    word-wrap: break-word;
}

.user-message .message-bubble {
    background: #007aff;
    color: white;
    border-bottom-right-radius: 6px;
}

.ai-message .message-bubble {
    background: #f1f3f4;
    color: #374151;
    border-bottom-left-radius: 6px;
}

.ai-avatar {
    width: 32px;
    height: 32px;
    background: #007aff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: 600;
    flex-shrink: 0;
    margin-top: 4px;
}


.ai-bubble {
    background: #f1f3f4;
    color: #374151;
    border-bottom-left-radius: 6px;
    line-height: 1.6;
}

.ai-bubble strong {
    color: #1f2937;
    font-weight: 600;
}

.ai-bubble br {
    margin-bottom: 8px;
}

.streaming-cursor {
    color: #007aff;
    font-weight: 400;
    animation: cursorBlink 1s infinite;
    margin-left: 2px;
}

.streaming-message {
    min-height: 24px;
}

@keyframes cursorBlink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

/* Gen Z Brief Panel */
.genz-brief-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 50vw;
    min-width: 300px;
    max-width: 50vw;
    height: 100vh;
    background: #ffffff;
    border-left: 1px solid #e5e7eb;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.1);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 1000;
    overflow-y: auto;
    resize: none;
}

.genz-brief-panel.show {
    transform: translateX(0);
}

/* Resize handle for the brief panel */
.resize-handle {
    position: absolute;
    left: 0;
    top: 0;
    width: 6px;
    height: 100%;
    background: transparent;
    cursor: col-resize;
    z-index: 10;
    border-right: 1px solid transparent;
    transition: all 0.2s ease;
}

.resize-handle:hover {
    background: rgba(0, 122, 255, 0.1);
    border-right-color: #007aff;
}

.resize-handle:hover::after {
    opacity: 1;
}

.resize-handle::after {
    content: '';
    position: absolute;
    left: 2px;
    top: 0;
    width: 2px;
    height: 100%;
    background: #007aff;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.resize-handle.dragging {
    background: rgba(0, 122, 255, 0.2) !important;
    border-right-color: #007aff !important;
}

.resize-handle.dragging::after {
    opacity: 1 !important;
}

.brief-panel-header {
    padding: 24px 24px 16px;
    border-bottom: 1px solid #f3f4f6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: #ffffff;
    z-index: 10;
}

/* Rich Text Editor Toolbar */
.editor-toolbar {
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
    display: flex;
    align-items: center;
    gap: 8px;
    position: sticky;
    top: 73px; /* Below the header */
    z-index: 9;
    flex-wrap: wrap;
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 4px;
}

.toolbar-btn {
    background: none;
    border: 1px solid transparent;
    color: #6b7280;
    cursor: pointer;
    padding: 6px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    min-width: 28px;
    height: 28px;
}

.toolbar-btn:hover {
    background: #ffffff;
    color: #374151;
    border-color: #d1d5db;
}

.toolbar-btn.active {
    background: #007aff;
    color: white;
    border-color: #007aff;
}

.toolbar-separator {
    width: 1px;
    height: 20px;
    background: #d1d5db;
    margin: 0 4px;
}

.brief-panel-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.brief-panel-close {
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, color 0.2s;
}

.brief-panel-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.brief-panel-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.brief-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.brief-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0;
}

.brief-text {
    font-size: 14px;
    line-height: 1.6;
    color: #6b7280;
    min-height: 20px;
    position: relative;
}

.brief-text.generating::after {
    content: '|';
    color: #007aff;
    animation: cursorBlink 1s infinite;
    margin-left: 2px;
}

.brief-text[contenteditable="true"] {
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 8px;
    transition: all 0.2s;
    cursor: text;
}

.brief-text[contenteditable="true"]:hover {
    border-color: #d1d5db;
    background: #f9fafb;
}

.brief-text[contenteditable="true"]:focus {
    outline: none;
    border-color: #007aff;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

/* Single Brief Editor */
.brief-editor {
    flex: 1;
    font-size: 14px;
    line-height: 1.6;
    color: #374151;
    padding: 20px;
    outline: none;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.brief-editor:focus {
    border-color: #007aff;
    box-shadow: inset 0 0 0 1px rgba(0, 122, 255, 0.2);
}

.brief-editor h2 {
    font-size: 24px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #e5e7eb;
}

.brief-editor h3 {
    font-size: 18px;
    font-weight: 600;
    color: #374151;
    margin: 24px 0 12px 0;
}

.brief-editor p {
    margin: 0 0 16px 0;
}

.brief-editor ul {
    margin: 12px 0 16px 20px;
    padding: 0;
}

.brief-editor li {
    margin: 8px 0;
}

.brief-editor strong {
    font-weight: 600;
    color: #111827;
}

.brief-editor.generating::after {
    content: '|';
    color: #007aff;
    animation: cursorBlink 1s infinite;
    margin-left: 2px;
}

/* Adjust main content when panel is open */
.main-content.panel-open {
    margin-right: var(--panel-width, 50vw);
    transition: margin-right 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Prevent text selection during resize */
.no-select {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.message-timestamp {
    font-size: 12px;
    color: #8e8e93;
    margin-top: 4px;
    text-align: center;
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 80%;
    margin-right: auto;
    opacity: 0;
    animation: fadeIn 0.3s ease-out forwards;
}

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

.typing-bubble {
    background: #f1f3f4;
    border: 1px solid #e5e7eb;
    padding: 16px 20px;
    border-radius: 16px;
    border-bottom-left-radius: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: #8e8e93;
    border-radius: 50%;
    animation: typingDot 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typingDot {
    0%, 80%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    40% {
        opacity: 1;
        transform: scale(1);
    }
}

.active-chat-input-section {
    background: #fafcff;
    border-top: 1px solid #e5e7eb;
    padding: 24px 32px 32px;
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    z-index: 100;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.active-chat-input-section .suggestions {
    margin-bottom: 16px;
}

.active-chat-input-section .suggestion-chips {
    gap: 8px;
}

.active-suggestion:hover {
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(0, 122, 255, 0.2);
}

.active-chat-input {
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.active-chat-input:focus-within {
    border-color: #007aff;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
}

.active-chat-input textarea {
    background: transparent;
    border: none;
    outline: none;
    color: #374151;
}

.active-chat-input textarea::placeholder {
    color: #9ca3af;
}

/* Hide initial new chat content when active */
.new-chat-screen.hide-initial .greeting-section,
.new-chat-screen.hide-initial .content-grid {
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Removed conflicting positioning rule for .new-chat-screen.hide-initial .new-chat-input-section */

/* Universal Search Modal */
.universal-search-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000;
    display: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.universal-search-modal.show {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 100px;
    opacity: 1;
}

.search-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
}

.search-modal-container {
    position: relative;
    width: 90%;
    max-width: 600px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    transform: translateY(-10px);
    transition: transform 0.2s ease;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.universal-search-modal.show .search-modal-container {
    transform: translateY(0);
}

.search-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 12px;
}

.search-input-container {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    transition: border-color 0.2s ease;
}

.search-input-container:focus-within {
    border-color: #007aff;
    background: #ffffff;
}

.search-modal-icon {
    color: #8e8e93;
    flex-shrink: 0;
}

.search-modal-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 16px;
    color: #111111;
    font-family: 'Inter', sans-serif;
}

.search-modal-input::placeholder {
    color: #8e8e93;
}

.search-modal-close {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    border: none;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #8e8e93;
    transition: background-color 0.2s ease;
}

.search-modal-close:hover {
    background: #f0f0f0;
}

.search-modal-content {
    flex: 1;
    overflow-y: auto;
    padding: 0 0 20px 0;
}

.search-suggestions {
    padding: 20px 24px 0;
}

.search-section-title {
    font-size: 13px;
    font-weight: 600;
    color: #8e8e93;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 12px 0;
}

.search-quick-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-action-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
    text-align: left;
    transition: background-color 0.2s ease;
    font-family: 'Inter', sans-serif;
}

.search-action-item:hover {
    background: #f8f9fa;
}

.search-action-item svg {
    color: #8e8e93;
}

.search-results {
    padding: 20px 24px 0;
}

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

.search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.search-result-item:hover {
    background: #f8f9fa;
}

.search-result-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8e8e93;
    flex-shrink: 0;
}

.search-result-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.search-result-title {
    font-size: 14px;
    font-weight: 500;
    color: #111111;
    line-height: 1.4;
}

.search-result-subtitle {
    font-size: 12px;
    color: #8e8e93;
    line-height: 1.3;
}

.search-footer {
    padding: 16px 24px 0;
    border-top: 1px solid #f0f0f0;
}

.search-keyboard-shortcuts {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 12px;
    color: #8e8e93;
}

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

.search-shortcut kbd {
    padding: 2px 6px;
    background: #f0f0f0;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    color: #374151;
    border: 1px solid #d1d5db;
    font-family: 'Inter', sans-serif;
}

/* Responsive adjustments for start project screen */
@media (max-width: 1024px) {
    .project-workflow-panel {
        min-width: 350px;
    }
    
    .workflow-step-card {
        margin: 0 8px;
    }
    
    .approval-dialog-content {
        width: 95vw;
        padding: 24px;
    }
    
    .approval-buttons {
        flex-direction: column;
    }
    
    .active-chat-messages {
        padding: 16px;
    }
    
    .active-chat-input-section {
        padding: 16px;
    }
    
    .chat-message {
        max-width: 95%;
    }
    
    .new-chat-input-section {
        padding: 16px;
        left: 0;
        right: 0;
        width: 100%;
    }
    
    .new-chat-content {
        padding: 20px 16px 180px 16px;
    }
    
    .active-chat-input-section {
        padding: 16px;
    }
}

@media (max-width: 768px) {
    .start-project-container {
        flex-direction: column;
    }
    
    .start-project-chat {
        max-width: none;
        height: 60%;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .project-toolbar,
    .project-workflow-panel {
        width: 100%;
        border-left: none;
    }
    
    .project-workflow-panel {
        height: 40%;
    }
    
    .workflow-step-card {
        margin: 0 4px;
    }
    
    .step-header {
        padding: 10px 12px;
    }
    
    .step-content-area {
        padding: 12px;
    }
}