﻿* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #f5f5f5;
    height: 100vh;
    overflow: hidden;
}

.chat-container {
    display: flex;
    height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 300px;
    background: #1a1a1a;
    color: #fff;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #333;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #333;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #c4a35a;
}

.sidebar-logo span {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
}

.new-chat-btn {
    background: linear-gradient(135deg, #c4a35a, #a88b45);
    color: #fff;
    border: none;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
    text-decoration: none;
}

.new-chat-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(196, 163, 90, 0.3);
}

.new-chat-btn svg {
    width: 16px;
    height: 16px;
}

.sidebar-search {
    padding: 15px 20px;
    border-bottom: 1px solid #333;
}

.sidebar-search input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #444;
    border-radius: 8px;
    background: #2d2d2d;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
}

.sidebar-search input::placeholder {
    color: #888;
}

.sidebar-search input:focus {
    outline: none;
    border-color: #c4a35a;
}

.chat-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.chat-list::-webkit-scrollbar {
    width: 6px;
}

.chat-list::-webkit-scrollbar-track {
    background: #2d2d2d;
}

.chat-list::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 3px;
}

.chat-date-group {
    margin-bottom: 15px;
}

.chat-date-label {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 10px;
    font-weight: 500;
}

.chat-item {
    padding: 12px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 5px;
    text-decoration: none;
    color: inherit;
}

.chat-item:hover {
    background: #2d2d2d;
}

.chat-item.active {
    background: #333;
    border-left: 3px solid #c4a35a;
}

.chat-item-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #c4a35a, #a88b45);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.chat-item-icon svg {
    width: 18px;
    height: 18px;
    fill: #fff;
}

.chat-item-content {
    flex: 1;
    min-width: 0;
}

.chat-item-title {
    font-size: 13px;
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat-item-preview {
    font-size: 11px;
    color: #888;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 3px;
}

.chat-item-actions {
    opacity: 0;
    transition: opacity 0.2s;
}

.chat-item:hover .chat-item-actions {
    opacity: 1;
}

.chat-item-actions button {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.2s;
}

.chat-item-actions button:hover {
    background: #444;
    color: #fff;
}

.sidebar-footer {
    padding: 15px 20px;
    border-top: 1px solid #333;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #888;
    text-decoration: none;
    font-size: 13px;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.2s;
}

.back-btn:hover {
    background: #2d2d2d;
    color: #fff;
}

.back-btn svg {
    width: 18px;
    height: 18px;
}

/* Main Chat Area */
.chat-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #fff;
}

.chat-header {
    padding: 20px 30px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.chat-header-avatar {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, #c4a35a, #a88b45);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-header-avatar svg {
    width: 24px;
    height: 24px;
    fill: #fff;
}

.chat-header-text h2 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.chat-header-text p {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.chat-header-actions {
    display: flex;
    gap: 10px;
}

.header-action-btn {
    background: #f5f5f5;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.header-action-btn:hover {
    background: #eee;
}

.header-action-btn svg {
    width: 20px;
    height: 20px;
    fill: #666;
}

/* Messages Area */
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 30px;
    background: #fafafa;
}

.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f0f0f0;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.welcome-message {
    text-align: center;
    padding: 60px 20px;
    max-width: 600px;
    margin: 0 auto;
}

.welcome-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #c4a35a, #a88b45);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
}

.welcome-icon svg {
    width: 40px;
    height: 40px;
    fill: #fff;
}

.welcome-message h3 {
    font-size: 24px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.welcome-message p {
    font-size: 14px;
    color: #666;
    line-height: 1.7;
    margin-bottom: 30px;
}

.suggestion-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.suggestion-chip {
    background: #fff;
    border: 1px solid #ddd;
    padding: 12px 20px;
    border-radius: 25px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Montserrat', sans-serif;
}

.suggestion-chip:hover {
    border-color: #c4a35a;
    color: #c4a35a;
    background: #fdf9f0;
}

.message {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    max-width: 800px;
}

.message.user {
    flex-direction: row-reverse;
    margin-left: auto;
}

.message-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.message.assistant .message-avatar {
    background: linear-gradient(135deg, #c4a35a, #a88b45);
}

.message.user .message-avatar {
    background: #333;
}

.message-avatar svg {
    width: 20px;
    height: 20px;
    fill: #fff;
}

.message-content {
    flex: 1;
    max-width: 70%;
}

.message-bubble {
    padding: 15px 20px;
    border-radius: 15px;
    font-size: 14px;
    line-height: 1.6;
}

.message-bubble ul,
.message-bubble ol {
    margin: 10px 0;
    padding-left: 20px;
}

.message-bubble li {
    margin: 5px 0;
}

.message-bubble table {
    width: 100%;
    border-collapse: collapse;
    margin: 15px 0;
    font-size: 13px;
}

.message-bubble table th,
.message-bubble table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #e5e5e5;
}

.message-bubble table th {
    background: #f8f8f8;
    font-weight: 600;
    color: #333;
}

.message-bubble table tr:last-child td {
    border-bottom: none;
}

.message-bubble table tr:hover {
    background: #fafafa;
}

.message.user .message-bubble table th {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.message.user .message-bubble table td {
    border-bottom-color: rgba(255, 255, 255, 0.2);
}

.message.user .message-bubble table tr:hover {
    background: rgba(255, 255, 255, 0.1);
}

.message.assistant .message-bubble {
    background: #fff;
    color: #333;
    border: 1px solid #eee;
    border-radius: 15px 15px 15px 5px;
}

.message.user .message-bubble {
    background: linear-gradient(135deg, #c4a35a, #a88b45);
    color: #fff;
    border-radius: 15px 15px 5px 15px;
}

.message-time {
    font-size: 11px;
    color: #999;
    margin-top: 8px;
}

.message.user .message-time {
    text-align: right;
}

.typing-indicator {
    display: flex;
    gap: 5px;
    padding: 15px 20px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 15px;
    width: fit-content;
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: #c4a35a;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}

/* Input Area */
.chat-input-area {
    padding: 20px 30px;
    background: #fff;
    border-top: 1px solid #eee;
}

.chat-input-container {
    display: flex;
    gap: 15px;
    align-items: flex-end;
    max-width: 900px;
    margin: 0 auto;
}

.chat-input-wrapper {
    flex: 1;
    background: #f5f5f5;
    border-radius: 15px;
    padding: 5px;
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.chat-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 15px;
    font-size: 14px;
    font-family: 'Montserrat', sans-serif;
    resize: none;
    max-height: 150px;
    line-height: 1.5;
}

.chat-input:focus {
    outline: none;
}

.chat-input::placeholder {
    color: #999;
}

.input-actions {
    display: flex;
    gap: 5px;
    padding: 5px;
}

.input-action-btn {
    background: none;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.input-action-btn:hover {
    background: #eee;
}

.input-action-btn svg {
    width: 20px;
    height: 20px;
    fill: #888;
}

.send-btn {
    background: linear-gradient(135deg, #c4a35a, #a88b45);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.send-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(196, 163, 90, 0.4);
}

.send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.send-btn svg {
    width: 22px;
    height: 22px;
    fill: #fff;
}

.chat-disclaimer {
    text-align: center;
    font-size: 11px;
    color: #999;
    margin-top: 10px;
}

/* Mobile Sidebar Toggle */
.mobile-sidebar-toggle {
    display: none;
    background: none;
    border: none;
    padding: 10px;
    cursor: pointer;
}

.mobile-sidebar-toggle svg {
    width: 24px;
    height: 24px;
    fill: #333;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -300px;
        top: 0;
        height: 100%;
        z-index: 1000;
        transition: left 0.3s ease;
    }

    .sidebar.open {
        left: 0;
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 999;
    }

    .sidebar-overlay.open {
        display: block;
    }

    .mobile-sidebar-toggle {
        display: block;
    }

    .chat-messages {
        padding: 20px;
    }

    .chat-input-area {
        padding: 15px;
    }

    .message-content {
        max-width: 85%;
    }

    .welcome-message {
        padding: 40px 15px;
    }

    .suggestion-chips {
        flex-direction: column;
    }
}
/* Modal Styles */
[x-cloak] {
    display: none !important;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    background: #fff;
    border-radius: 16px;
    width: 90%;
    max-width: 650px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 16px;
    border-bottom: 1px solid #e5e5e5;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #f5f5f5;
    color: #1a1a1a;
}

.modal-body {
    padding: 24px;
    text-align: center;
}

.modal-icon-warning {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.modal-icon-warning svg {
    color: #f59e0b;
}

.modal-body p {
    font-size: 16px;
    color: #333;
    margin: 0 0 8px 0;
    line-height: 1.5;
}

.modal-warning-text {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.modal-footer {
    display: flex;
    gap: 12px;
    padding: 16px 24px 24px;
    justify-content: flex-end;
}

.btn-cancel,
.btn-delete {
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-cancel {
    background: #f5f5f5;
    color: #333;
}

.btn-cancel:hover {
    background: #e5e5e5;
}

.btn-delete {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
}

.btn-delete:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-delete:active {
    transform: translateY(0);
}
