body {
    font-family: Arial, sans-serif;
    margin: 0; padding: 0;
    background-color: #f4f6f8;
    color: #333;
}

header {
    background: #2c3e50;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header h1 { margin: 0; font-size: 1.5em; }
header a { color: #ecf0f1; text-decoration: none; font-weight: bold; }

.login-prompt {
    text-align: center;
    margin-top: 100px;
}

.layout-wrapper {
    padding: 20px;
    max-width: 1600px;
    margin: 0 auto;
}

.card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.card h2 { margin-top: 0; border-bottom: 2px solid #ecf0f1; padding-bottom: 10px; color: #2c3e50; font-size: 1.2em; }

/* Dashboard Grid (3 columns) */
.dashboard {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}
.dashboard > h2 { grid-column: span 3; }

/* Split Row */
.split-row {
    display: flex;
    gap: 20px;
}
.split-col-4 { flex: 4; min-width: 300px; }
.split-col-6 { flex: 6; min-width: 400px; }

/* Forms */
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; font-weight: bold; font-size: 0.9em; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 8px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; font-family: monospace;
}

.btn {
    background: #3498db; color: white; border: none; padding: 10px 15px; border-radius: 4px; cursor: pointer; text-decoration: none; display: inline-block;
}
.btn:hover { background: #2980b9; }
.btn-sm { padding: 5px 10px; font-size: 0.85em; margin-bottom: 10px; }
.btn-danger { background: #e74c3c; }
.btn-danger:hover { background: #c0392b; }

/* Accordion */
.record-accordion { border: 1px solid #ddd; border-radius: 4px; margin-bottom: 10px; background: #fff; }
.record-accordion summary {
    padding: 12px; background: #f8f9fa; cursor: pointer; font-weight: bold; border-bottom: 1px solid #ddd; list-style: none; outline: none;
}
.record-accordion summary::-webkit-details-marker { display: none; }
.record-content { padding: 15px; }

.log-details-table { width: 100%; border-collapse: collapse; margin-bottom: 15px; font-size: 0.9em; }
.log-details-table th, .log-details-table td { border: 1px solid #ddd; padding: 6px; text-align: left; }
.log-details-table th { background: #f1f2f6; width: 120px; }

.log-section { margin-bottom: 15px; }
.markdown-preview {
    background: #fdfdfd; border: 1px solid #eee; padding: 10px; border-radius: 4px; font-size: 0.9em;
    max-height: 400px; overflow-y: auto; white-space: pre-wrap; word-wrap: break-word;
}
.markdown-preview img { max-width: 100%; height: auto; display: block; margin: 10px 0; }

/* Report Page Print Optimization */
.report-body { background: #fff; padding: 20px; font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; }
.report-header { text-align: right; margin-bottom: 20px; }
.report-page h1 { font-size: 1.8em; color: #2c3e50; }
.report-record-block { border: 1px solid #ddd; padding: 15px; margin-bottom: 20px; border-radius: 5px; page-break-inside: avoid; }
.report-section { margin-top: 10px; }

@media print {
    @page { size: A4 portrait; margin: 1.5cm; }
    .no-print { display: none !important; }
    body { font-size: 11pt; padding: 0; background: white; }
    .report-record-block { border: 1px solid #ccc; page-break-inside: avoid; }
    .markdown-preview { border: none; padding: 0; overflow: visible; max-height: none; }
}