/* src/journalist-interface/styles/main.css */
:root {
    --primary-color: #2a4d69;
    --secondary-color: #4b86b4;
    --accent-color: #adcbe3;
    --background-color: #f7f7f7;
    --text-color: #333333;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --border-radius: 4px;
    --box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    padding: 0;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background-color: var(--primary-color);
    color: white;
    padding: 1.5rem 1rem;
    text-align: center;
}

header h1 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

header .tagline {
    font-size: 1.1rem;
    opacity: 0.9;
}

main {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    width: 100%;
}

.section {
    background-color: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--box-shadow);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

h3 {
    color: var(--secondary-color);
    margin-bottom: 0.75rem;
    margin-top: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

.security-notice {
    background-color: #f8f9fa;
    border-left: 4px solid var(--warning-color);
    padding: 1rem;
    margin: 1.5rem 0;
}

.security-notice ul {
    margin-left: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(75, 134, 180, 0.2);
}

button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.primary-button {
    background-color: var(--primary-color);
    color: white;
}

.primary-button:hover {
    background-color: #1c3a51;
}

.secondary-button {
    background-color: #e9ecef;
    color: #495057;
}

.secondary-button:hover {
    background-color: #dee2e6;
}

.text-button {
    background: none;
    border: none;
    color: var(--accent-color);
    padding: 0;
    font: inherit;
    cursor: pointer;
    text-decoration: underline;
}

.text-button:hover {
    color: white;
}

.button-group {
    display: flex;
    gap: 1rem;
}

.status {
    padding: 0.75rem;
    margin: 1rem 0;
    border-radius: var(--border-radius);
    font-weight: 500;
}

.status.success {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
}

.status.error {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
    border-left: 4px solid var(--danger-color);
}

.status.warning {
    background-color: rgba(255, 193, 7, 0.1);
    color: var(--warning-color);
    border-left: 4px solid var(--warning-color);
}

.status.info {
    background-color: rgba(75, 134, 180, 0.1);
    color: var(--secondary-color);
    border-left: 4px solid var(--secondary-color);
}

.controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.search-container {
    flex: 1;
}

.filter-container {
    width: 200px;
}

.list {
    border: 1px solid #e1e4e8;
    border-radius: var(--border-radius);
    max-height: 500px;
    overflow-y: auto;
}

.list-item {
    padding: 1rem;
    border-bottom: 1px solid #e1e4e8;
    cursor: pointer;
    transition: var(--transition);
}

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

.list-item:hover {
    background-color: #f1f3f5;
}

.list-item.unread {
    border-left: 4px solid var(--primary-color);
}

.list-item.flagged {
    border-left: 4px solid var(--warning-color);
}

.list-item .item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.list-item .item-date {
    color: #6c757d;
    font-size: 0.9rem;
}

.list-item .item-preview {
    color: #495057;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.empty-state {
    padding: 2rem;
    text-align: center;
    color: #6c757d;
    font-style: italic;
}

.meta-data {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
}

.meta-item {
    display: flex;
    margin-bottom: 0.5rem;
}

.meta-label {
    width: 120px;
    font-weight: 500;
}

.content-box {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    white-space: pre-wrap;
}

.files-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.file-item {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: var(--border-radius);
    display: flex;
    flex-direction: column;
}

.file-name {
    font-weight: 500;
    margin-bottom: 0.5rem;
    word-break: break-all;
}

.file-size {
    color: #6c757d;
    font-size: 0.9rem;
}

.file-actions {
    margin-top: 0.5rem;
    display: flex;
    gap: 0.5rem;
}

.messages-list {
    border: 1px solid #e1e4e8;
    border-radius: var(--border-radius);
    padding: 1rem;
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 1.5rem;
}

.message {
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: var(--border-radius);
    background-color: #f8f9fa;
}

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

.message.source {
    background-color: #e3f2fd;
    border-left: 4px solid #2196f3;
}

.message.journalist {
    background-color: #e8f5e9;
    border-left: 4px solid #4caf50;
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: #6c757d;
}

.message-body {
    white-space: pre-wrap;
}

.key-options {
    display: flex;
    gap: 1rem;
    margin: 1.5rem 0;
}

footer {
    background-color: #343a40;
    color: white;
    text-align: center;
    padding: 1.5rem 1rem;
    margin-top: auto;
}

footer a {
    color: var(--accent-color);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
}

pre {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: var(--border-radius);
    overflow-x: auto;
    margin: 1rem 0;
    font-family: monospace;
    font-size: 0.9rem;
}

/* Responsive styles */
@media (max-width: 768px) {
    .controls {
        flex-direction: column;
        align-items: stretch;
    }

    .search-container, .filter-container {
        width: 100%;
    }

    .key-options {
        flex-direction: column;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}