/* Modern Premium CSS Reset and Variables */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    --bg-main: #f8fafc;
    --bg-card: rgba(255, 255, 255, 0.75);
    --border-card: rgba(255, 255, 255, 0.6);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --color-primary: #ea580c; /* Graylog Orange */
    --color-primary-hover: #c2410c; /* Darker Orange */
    --color-primary-light: rgba(234, 88, 12, 0.08);
    --color-accent: #f97316; /* Secondary Accent Orange */
    --color-success: #10b981;
    --color-success-light: rgba(16, 185, 129, 0.1);
    --color-error: #ef4444;
    --color-error-light: rgba(239, 68, 68, 0.1);
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.08);
    --shadow-glow: 0 0 20px rgba(234, 88, 12, 0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-main);
    background-image: 
        radial-gradient(at 0% 0%, rgba(254, 243, 199, 0.5) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(241, 245, 249, 0.8) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(255, 237, 213, 0.5) 0px, transparent 50%);
    background-attachment: fixed;
    font-family: var(--font-body);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    padding: 2rem 1rem;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

/* Header Styles */
header {
    text-align: center;
    margin-bottom: 2.5rem;
}

header h1 {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 400;
}

/* Card Styling (Glassmorphism) */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem;
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Badges and System Check */
.system-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.25rem;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.status-label {
    font-weight: 500;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.badge-success {
    background-color: var(--color-success-light);
    color: var(--color-success);
}

.badge-error {
    background-color: var(--color-error-light);
    color: var(--color-error);
}

/* Forms and Dropzone */
.form-group {
    margin-bottom: 1.5rem;
}

label.form-label {
    display: block;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.select-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-family: var(--font-body);
    font-size: 1rem;
    color: var(--text-primary);
    background-color: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: var(--radius-md);
    outline: none;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.25em;
}

.select-control:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.15);
}

/* Drag and Drop Zone */
.dropzone {
    border: 2px dashed rgba(234, 88, 12, 0.25);
    background: rgba(255, 255, 255, 0.4);
    border-radius: var(--radius-md);
    padding: 3rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.dropzone:hover, .dropzone.dragover {
    border-color: var(--color-primary);
    background: rgba(234, 88, 12, 0.03);
    box-shadow: var(--shadow-glow);
    transform: translateY(-2px);
}

.dropzone.dragover {
    border-style: solid;
}

.dropzone-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: inline-block;
    color: var(--color-primary);
    transition: transform 0.3s ease;
}

.dropzone:hover .dropzone-icon {
    transform: translateY(-5px);
}

.dropzone-text {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.dropzone-subtext {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* Progress bar & Upload Status */
.upload-status-container {
    display: none;
    margin-top: 1.5rem;
    padding: 1.25rem;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.upload-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.progress-wrapper {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 9999px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-accent) 100%);
    border-radius: 9999px;
    transition: width 0.1s ease;
}

.processing-pulse {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-top: 0.5rem;
}

.spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid var(--color-primary-light);
    border-top: 2px solid var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Custom file list */
.selected-file-display {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: #ffffff;
    border: 1px solid rgba(234, 88, 12, 0.15);
    border-radius: var(--radius-md);
    margin-top: 1rem;
}

.file-details {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.file-icon {
    font-size: 1.5rem;
    color: var(--color-primary);
}

.file-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    word-break: break-all;
}

.file-size {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.remove-file-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, color 0.2s;
}

.remove-file-btn:hover {
    background-color: var(--color-error-light);
    color: var(--color-error);
}

/* Button UI */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.875rem 1.5rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-accent) 100%);
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(234, 88, 12, 0.2);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 15px rgba(234, 88, 12, 0.3);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-secondary {
    background-color: var(--color-primary-light);
    color: var(--color-primary);
    border: 1px solid rgba(234, 88, 12, 0.15);
    box-shadow: var(--shadow-sm);
}

.btn-secondary:hover:not(:disabled) {
    background-color: var(--color-primary);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary:active:not(:disabled) {
    transform: translateY(0);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Report History List */
.history-section-title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.report-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.report-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.report-item:hover {
    border-color: rgba(234, 88, 12, 0.2);
    transform: translateX(3px);
    box-shadow: var(--shadow-md);
}

.report-meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.report-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.report-info {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    gap: 1rem;
}

.report-actions {
    display: flex;
    gap: 0.5rem;
}

.action-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: var(--radius-sm);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.action-view {
    background-color: var(--color-primary-light);
    color: var(--color-primary);
}

.action-view:hover {
    background-color: var(--color-primary);
    color: #ffffff;
}

.action-delete {
    background-color: var(--color-error-light);
    color: var(--color-error);
    cursor: pointer;
}

.action-delete:hover {
    background-color: var(--color-error);
    color: #ffffff;
}

/* Empty states */
.empty-history {
    text-align: center;
    padding: 2.5rem 1.5rem;
    background: rgba(255, 255, 255, 0.3);
    border: 1px dashed rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Alerts */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    font-size: 0.925rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    line-height: 1.5;
}

.alert-error {
    background-color: var(--color-error-light);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #b91c1c;
}

.alert-success {
    background-color: var(--color-success-light);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #047857;
}

/* Setup Help Accordion */
.setup-guide {
    margin-top: 3rem;
}

.setup-summary {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    user-select: none;
}

.setup-summary::-webkit-details-marker {
    display: none;
}

.setup-summary::before {
    content: "▸";
    font-size: 1.1rem;
    transition: transform 0.2s ease;
}

details[open] .setup-summary::before {
    transform: rotate(90deg);
}

.setup-content {
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.setup-content h3 {
    color: var(--text-primary);
    margin: 1rem 0 0.5rem 0;
    font-size: 1rem;
}

.setup-content h3:first-child {
    margin-top: 0;
}

.setup-content ol, .setup-content ul {
    margin-left: 1.25rem;
    margin-bottom: 0.75rem;
}

.setup-content li {
    margin-bottom: 0.25rem;
}

.setup-content code {
    background-color: rgba(0, 0, 0, 0.05);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-family: monospace;
    color: var(--text-primary);
    font-size: 0.85rem;
}

.setup-content pre {
    background-color: #1e293b;
    color: #f8fafc;
    padding: 1rem;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    font-family: monospace;
    font-size: 0.8rem;
    margin: 0.5rem 0 0.75rem 0;
}

.setup-content pre code {
    background: none;
    color: inherit;
    padding: 0;
}

/* SEO Informational & copy blocks */
.info-section {
    margin-top: 3.5rem;
    margin-bottom: 2rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    text-align: center;
    letter-spacing: -0.02em;
}

.section-desc {
    color: var(--text-secondary);
    text-align: center;
    max-width: 650px;
    margin: -1rem auto 2rem auto;
    font-size: 1.05rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.info-card {
    background: var(--bg-card);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-md);
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
}

.info-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.info-card-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: inline-block;
}

.info-card h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
}

.info-card p {
    font-size: 0.925rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Steps list styles */
.steps-container {
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-sm);
}

.steps-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2rem;
    list-style: none;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
}

.step-item:not(:last-child)::after {
    content: "→";
    position: absolute;
    right: -1.25rem;
    top: 0.2rem;
    font-size: 1.5rem;
    color: var(--color-primary);
    opacity: 0.3;
}

@media (max-width: 768px) {
    .step-item:not(:last-child)::after {
        content: "↓";
        right: auto;
        bottom: -1.5rem;
        top: auto;
    }
    .steps-list {
        gap: 3rem;
    }
}

.step-num {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background-color: var(--color-primary-light);
    color: var(--color-primary);
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    box-shadow: inset 0 0 10px rgba(234, 88, 12, 0.1);
}

.step-item h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.step-item p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* FAQ styles */
.faq-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 800px;
    margin: 0 auto 3rem auto;
}

.faq-item {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.faq-item details {
    width: 100%;
}

.faq-question {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-primary);
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question::after {
    content: "+";
    font-size: 1.4rem;
    color: var(--color-primary);
    transition: transform 0.2s ease;
}

.faq-item details[open] .faq-question::after {
    content: "−";
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 1.5rem 1.5rem 1.5rem;
    font-size: 0.925rem;
    color: var(--text-secondary);
    line-height: 1.5;
    border-top: 1px solid rgba(0, 0, 0, 0.02);
    padding-top: 1rem;
}
