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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: #0a0a0f;
    color: #e0e0e0;
    min-height: 100vh;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.login-box {
    background: #1a1a24;
    padding: 40px;
    border-radius: 12px;
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-box h1 {
    color: #7c3aed;
    font-size: 2.5rem;
    margin-bottom: 8px;
}

.subtitle {
    color: #888;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #aaa;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #333;
    border-radius: 6px;
    background: #0a0a0f;
    color: #e0e0e0;
    font-size: 1rem;
}

.form-group textarea {
    resize: vertical;
    font-family: monospace;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: #7c3aed;
    color: white;
}

.btn-primary:hover {
    background: #6d28d9;
}

.btn-secondary {
    background: #333;
    color: #e0e0e0;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.btn-success {
    background: #22c55e;
    color: white;
}

.btn-warning {
    background: #f59e0b;
    color: white;
}

.error-message {
    background: #7f1d1d;
    color: #fecaca;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid #222;
    margin-bottom: 30px;
}

.header h1 {
    color: #7c3aed;
}

.tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 30px;
    border-bottom: 1px solid #222;
    padding-bottom: 16px;
}

.tab {
    padding: 10px 20px;
    background: transparent;
    border: 1px solid #333;
    border-radius: 6px;
    color: #888;
    cursor: pointer;
    transition: all 0.2s;
}

.tab:hover {
    color: #e0e0e0;
    border-color: #555;
}

.tab.active {
    background: #7c3aed;
    border-color: #7c3aed;
    color: white;
}

.tab-content {
    display: none;
}

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

.result-box {
    background: #1a1a24;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.result-box.hidden {
    display: none;
}

.result-box h3 {
    color: #7c3aed;
    margin-bottom: 16px;
}

.result-box pre {
    white-space: pre-wrap;
    background: #0a0a0f;
    padding: 12px;
    border-radius: 6px;
    margin: 12px 0;
}

.brief-message {
    font-size: 1.2rem;
    color: #7c3aed;
    margin-bottom: 16px;
}

.coverage {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 24px;
    padding: 12px;
    background: #1a1a24;
    border-radius: 6px;
}

.intel-item {
    background: #1a1a24;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 16px;
}

.intel-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.intel-header .source {
    color: #7c3aed;
    font-weight: 500;
}

.intel-header .score {
    color: #22c55e;
    font-weight: bold;
}

.summary {
    white-space: pre-wrap;
    background: #0a0a0f;
    padding: 12px;
    border-radius: 6px;
    margin: 12px 0;
    font-size: 0.9rem;
}

.explanation {
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 12px;
}

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

.chat-messages {
    background: #1a1a24;
    border-radius: 8px;
    padding: 20px;
    min-height: 300px;
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 16px;
}

.message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 12px;
    max-width: 80%;
}

.message.user {
    background: #7c3aed;
    color: white;
    margin-left: auto;
}

.message.assistant {
    background: #0a0a0f;
    color: #e0e0e0;
}

.chat-form {
    display: flex;
    gap: 12px;
}

.chat-form input {
    flex: 1;
    padding: 12px;
    border: 1px solid #333;
    border-radius: 6px;
    background: #1a1a24;
    color: #e0e0e0;
}

.history-item {
    background: #1a1a24;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 12px;
}

.history-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.history-header .source {
    color: #7c3aed;
}

.history-header .date {
    color: #666;
    font-size: 0.85rem;
}

.classification {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-right: 8px;
}

.classification.JIT {
    background: #dc2626;
    color: white;
}

.classification.JIC {
    background: #2563eb;
    color: white;
}

.loading {
    color: #666;
    text-align: center;
    padding: 40px;
}

h2 {
    margin-bottom: 20px;
    color: #e0e0e0;
}

h3 {
    margin: 24px 0 16px;
    color: #aaa;
}

.header-icon {
    width: 28px;
    height: 28px;
    vertical-align: middle;
    margin-right: 8px;
}

.message.typing {
    color: #888;
    font-style: italic;
}

.typing-dots span {
    animation: blink 1.4s infinite both;
    font-weight: bold;
}

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

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

@keyframes blink {
    0%, 80%, 100% {
        opacity: 0;
    }
    40% {
        opacity: 1;
    }
}

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

.login-icon {
    width: 32px;
    height: 32px;
    vertical-align: middle;
    margin-right: 8px;
}
