/* Premium Corporate Tech Minimal - ProcessAI */

:root {
    /* Navy Blue Corporate Palette */
    --navy-900: #0A2540;
    --navy-800: #0D3A5F;
    --navy-700: #114B7E;
    --navy-600: #165C9D;
    --navy-500: #1A6DBC;
    --navy-400: #3D85C6;
    --navy-300: #6BA3D8;
    --navy-200: #9AC1EA;
    --navy-100: #C8DFFC;
    --navy-50: #EBF4FF;

    /* Neutral Palette */
    --white: #FFFFFF;
    --gray-50: #FAFBFC;
    --gray-100: #F5F7FA;
    --gray-200: #EDF0F5;
    --gray-300: #DFE3EB;
    --gray-400: #BCC3CF;
    --gray-500: #8F96A3;
    --gray-600: #6B7280;
    --gray-700: #4B5563;
    --gray-800: #2D3748;
    --gray-900: #1A202C;

    /* Semantic Colors */
    --success: #059669;
    --warning: #D97706;
    --error: #DC2626;
    --info: var(--navy-500);

    /* Premium Shadows */
    --shadow-xs: 0 1px 2px 0 rgba(10, 37, 64, 0.03);
    --shadow-sm: 0 1px 3px 0 rgba(10, 37, 64, 0.06), 0 1px 2px 0 rgba(10, 37, 64, 0.04);
    --shadow: 0 4px 6px -1px rgba(10, 37, 64, 0.08), 0 2px 4px -1px rgba(10, 37, 64, 0.04);
    --shadow-md: 0 10px 15px -3px rgba(10, 37, 64, 0.1), 0 4px 6px -2px rgba(10, 37, 64, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(10, 37, 64, 0.12), 0 10px 10px -5px rgba(10, 37, 64, 0.06);
    --shadow-xl: 0 25px 50px -12px rgba(10, 37, 64, 0.2);

    /* Spacing Scale */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--navy-50) 100%);
    color: var(--gray-900);
    line-height: 1.6;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: var(--space-xl);
    gap: var(--space-lg);
}

/* Header */
.header {
    background: var(--white);
    padding: var(--space-lg) var(--space-2xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(10, 37, 64, 0.06);
    backdrop-filter: blur(10px);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.logo-icon {
    width: 48px;
    height: 48px;
    object-fit: contain;
    display: block;
}

.logo-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.logo-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--navy-900);
    letter-spacing: -0.5px;
}

.logo-subtitle {
    font-size: 13px;
    color: var(--gray-500);
    font-weight: 500;
    letter-spacing: 0.2px;
}

.reset-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--gray-200);
    background: var(--white);
    color: var(--gray-600);
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.reset-btn:hover {
    background: var(--navy-50);
    border-color: var(--navy-200);
    color: var(--navy-700);
    transform: rotate(180deg);
}

/* Chat Container */
.chat-container {
    flex: 1;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    overflow-y: auto;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
    border: 1px solid rgba(10, 37, 64, 0.06);
    backdrop-filter: blur(10px);
}

.chat-container::-webkit-scrollbar {
    width: 8px;
}

.chat-container::-webkit-scrollbar-track {
    background: transparent;
    margin: var(--space-md);
}

.chat-container::-webkit-scrollbar-thumb {
    background: var(--navy-200);
    border-radius: var(--radius-sm);
    border: 2px solid var(--white);
}

.chat-container::-webkit-scrollbar-thumb:hover {
    background: var(--navy-300);
}

/* Welcome Message */
.welcome-message {
    max-width: 680px;
    margin: auto;
    text-align: center;
    padding: var(--space-3xl) var(--space-lg);
}

.welcome-title {
    font-size: 36px;
    font-weight: 700;
    color: var(--navy-900);
    margin-bottom: var(--space-md);
    letter-spacing: -1px;
    line-height: 1.2;
}

.welcome-subtitle {
    font-size: 17px;
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: var(--space-2xl);
    font-weight: 400;
}

.welcome-cta {
    font-size: 16px;
    color: var(--navy-600);
    font-weight: 600;
    margin-top: var(--space-xl);
    margin-bottom: var(--space-lg);
}

.initial-suggestions {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    max-width: 500px;
    margin: 0 auto;
    margin-top: var(--space-lg);
}

.initial-suggestions .suggestion-btn {
    text-align: center;
}

.initial-suggestions .custom-option {
    border-style: dashed;
    margin-top: var(--space-xs);
}

/* Messages */
.message {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    animation: slideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.message-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.message-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
    letter-spacing: -0.5px;
}

.user-message .message-avatar {
    background: linear-gradient(135deg, var(--gray-700) 0%, var(--gray-600) 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(45, 55, 72, 0.2);
}

.assistant-message .message-avatar {
    background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(10, 37, 64, 0.2);
}

.message-sender {
    font-size: 14px;
    font-weight: 600;
    color: var(--navy-900);
    letter-spacing: -0.2px;
}

.message-content {
    background: var(--gray-50);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    font-size: 15px;
    line-height: 1.7;
    color: var(--gray-800);
    border: 1px solid var(--gray-200);
    margin-left: 44px;
}

.user-message .message-content {
    background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-800) 100%);
    color: white;
    border-color: var(--navy-900);
    box-shadow: 0 4px 12px rgba(10, 37, 64, 0.15);
}

.message-content strong {
    font-weight: 600;
    color: var(--navy-900);
}

.user-message .message-content strong {
    color: white;
}

.message-content ul {
    margin: var(--space-sm) 0;
    padding-left: var(--space-lg);
}

.message-content li {
    margin: var(--space-xs) 0;
}

/* Suggested Questions */
.suggested-questions {
    margin-left: 44px;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    margin-top: var(--space-md);
}

.suggested-questions-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--navy-700);
    margin-bottom: var(--space-xs);
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.suggestion-btn {
    background: var(--white);
    border: 1.5px solid var(--navy-200);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    font-size: 14px;
    color: var(--navy-700);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: left;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.suggestion-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(135deg, var(--navy-50) 0%, var(--navy-100) 100%);
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.suggestion-btn:hover::before {
    width: 100%;
}

.suggestion-btn:hover {
    border-color: var(--navy-400);
    color: var(--navy-900);
    transform: translateX(4px);
    box-shadow: var(--shadow-sm);
}

/* Thinking Indicator */
.thinking {
    display: flex;
    gap: var(--space-sm);
    padding: var(--space-md) 0;
    margin-left: 44px;
    align-items: center;
}

.thinking-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--navy-400);
    animation: thinking 1.4s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(26, 109, 188, 0.3);
}

.thinking-dot:nth-child(2) {
    animation-delay: 0.2s;
}

.thinking-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes thinking {
    0%, 60%, 100% {
        transform: scale(0.7);
        opacity: 0.4;
    }
    30% {
        transform: scale(1.3);
        opacity: 1;
    }
}

.thinking-logs {
    margin-left: 44px;
    margin-top: var(--space-sm);
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    max-height: 400px;
    overflow-y: auto;
    padding: var(--space-sm);
    background: var(--gray-50);
    border-radius: var(--radius-md);
    border: 1px solid var(--gray-200);
    font-size: 13px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.thinking-log {
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
    line-height: 1.5;
    animation: logSlideIn 0.2s ease-out;
}

@keyframes logSlideIn {
    from {
        opacity: 0;
        transform: translateX(-8px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.thinking-log-info {
    color: var(--gray-600);
    background: var(--white);
    border-left: 3px solid var(--gray-400);
}

.thinking-log-tool {
    color: var(--navy-700);
    background: var(--navy-50);
    border-left: 3px solid var(--navy-400);
}

.thinking-log-response {
    color: var(--success);
    background: rgba(5, 150, 105, 0.05);
    border-left: 3px solid var(--success);
}

.thinking-log-error {
    color: var(--error);
    background: rgba(220, 38, 38, 0.05);
    border-left: 3px solid var(--error);
}

.thinking-logs::-webkit-scrollbar {
    width: 4px;
}

.thinking-logs::-webkit-scrollbar-thumb {
    background: var(--navy-200);
    border-radius: var(--radius-sm);
}

.thinking-logs::-webkit-scrollbar-thumb:hover {
    background: var(--navy-300);
}

/* Input Container */
.input-container {
    background: var(--white);
    padding: var(--space-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(10, 37, 64, 0.06);
    backdrop-filter: blur(10px);
}

.input-wrapper {
    display: flex;
    gap: var(--space-md);
    align-items: flex-end;
    margin-bottom: var(--space-sm);
}

#user-input {
    flex: 1;
    border: 1.5px solid var(--navy-200);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-family: inherit;
    resize: none;
    min-height: 52px;
    max-height: 200px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--white);
    color: var(--navy-900);
    line-height: 1.6;
}

#user-input:focus {
    outline: none;
    border-color: var(--navy-500);
    box-shadow: 0 0 0 4px rgba(26, 109, 188, 0.1);
}

#user-input::placeholder {
    color: var(--gray-400);
}

.send-btn {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 100%);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(10, 37, 64, 0.2);
}

.send-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--navy-800) 0%, var(--navy-600) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(10, 37, 64, 0.3);
}

.send-btn:active:not(:disabled) {
    transform: translateY(0);
}

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

.input-hint {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 12px;
    color: var(--gray-500);
    padding: 0 var(--space-xs);
    font-weight: 500;
}

.status-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: var(--space-md);
        gap: var(--space-md);
    }

    .header {
        padding: var(--space-md) var(--space-lg);
    }

    .logo-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .logo-title {
        font-size: 19px;
    }

    .logo-subtitle {
        font-size: 12px;
    }

    .chat-container {
        padding: var(--space-lg);
    }

    .welcome-message {
        padding: var(--space-2xl) var(--space-md);
    }

    .welcome-title {
        font-size: 28px;
    }

    .welcome-subtitle {
        font-size: 15px;
    }

    .message-content {
        margin-left: 0;
    }

    .suggested-questions {
        margin-left: 0;
    }

    .thinking {
        margin-left: 0;
    }

    .input-container {
        padding: var(--space-md);
    }

    #user-input {
        font-size: 16px; /* Prevent zoom on iOS */
    }

    .initial-suggestions {
        max-width: 100%;
    }

    .thinking-logs {
        margin-left: 0;
        font-size: 12px;
    }
}
