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

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --error-color: #ef4444;
    --warning-color: #f59e0b;
    --background: #f8fafc;
    --surface: #ffffff;
    --border-color: #e2e8f0;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
}

.hidden {
    display: none !important;
}

.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-card {
    background: var(--surface);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    width: 100%;
    max-width: 400px;
    overflow: hidden;
}

.auth-tabs {
    display: flex;
    background: var(--background);
    border-bottom: 1px solid var(--border-color);
}

.auth-tab {
    flex: 1;
    padding: 1rem;
    background: none;
    border: none;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.auth-tab:hover {
    color: var(--text-primary);
}

.auth-tab.active {
    color: var(--primary-color);
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-color);
}

.auth-form {
    padding: 2rem;
    display: none;
}

.auth-form.active {
    display: block;
}

.auth-header {
    text-align: center;
    padding: 2rem 2rem 1rem;
    border-bottom: 1px solid var(--border-color);
}

.auth-header h1 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.75rem;
}

.auth-header p {
    color: var(--text-secondary);
    margin: 0;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.form-group input[readonly] {
    background-color: var(--background);
    color: var(--text-secondary);
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.auth-footer a {
    color: var(--primary-color);
    text-decoration: none;
}

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

.auth-form h2 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.auth-form input {
    width: 100%;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.btn-primary {
    width: 100%;
    padding: 0.75rem 1.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    padding: 0.5rem 1rem;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #475569;
}

.btn-small {
    padding: 0.25rem 0.75rem;
    background: transparent;
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-small:hover {
    background: var(--primary-color);
    color: white;
}

.btn-logout {
    padding: 0.5rem 1rem;
    background: transparent;
    color: var(--error-color);
    border: 1px solid var(--error-color);
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-logout:hover {
    background: var(--error-color);
    color: white;
}

.main-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.navbar {
    background: var(--surface);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--border-color);
}

.navbar-brand h1 {
    font-size: 1.5rem;
    font-weight: 600;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.navbar-user {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.navbar-user span {
    font-weight: 500;
}

.content-area {
    flex: 1;
    padding: 2rem;
}

.main-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    background: var(--surface);
    padding: 0.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.main-tab {
    flex: 1;
    padding: 1rem 1.5rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.main-tab:hover {
    background: var(--background);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.main-tab.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    box-shadow: var(--shadow-sm);
}

.main-tab:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.tab-content {
    margin-bottom: 2rem;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.workspace {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.input-section, .output-section {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
}

.input-section h3, .output-section h3 {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.input-field {
    margin-bottom: 1rem;
}

.input-field label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.input-field input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.input-field input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.input-field input:disabled {
    background-color: #f8fafc !important;
    color: #64748b !important;
    cursor: not-allowed !important;
    border-color: #e2e8f0;
    opacity: 0.7;
}

.input-field input:disabled:hover {
    border-color: #e2e8f0;
}

.batch-controls {
    margin: 1.5rem 0;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.95rem;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.batch-inputs {
    margin-top: 1rem;
}

.batch-row {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.batch-row input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.9rem;
}

.batch-row button {
    padding: 0.5rem 0.75rem;
    background: var(--error-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.batch-row button:hover {
    background: #dc2626;
}

.btn-danger {
    background: var(--error-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.25rem 0.75rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

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

.output-actions {
    display: flex;
    gap: 0.5rem;
}

.response-container {
    background: var(--background);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1rem;
    min-height: 300px;
    max-height: 500px;
    overflow: auto;
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.85rem;
    white-space: pre-wrap;
    word-break: break-word;
}

.response-container .placeholder {
    color: var(--text-secondary);
    font-style: italic;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
}

.response-container table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-family: 'Inter', sans-serif;
}

.response-container table th {
    background: var(--primary-color);
    color: white;
    padding: 0.75rem;
    text-align: left;
    font-weight: 500;
}

.response-container table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.response-container table tr:hover {
    background: rgba(37, 99, 235, 0.05);
}

/* Specific styling for insights tables */
.response-container table tr:hover td {
    background: rgba(88, 153, 212, 0.1) !important;
}

.history-section {
    background: var(--surface);
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
}

/* Dynamic URL display styles */
.url-info {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    border: 1px solid #d1d5db;
    animation: fadeIn 0.3s ease;
}

.url-info code {
    font-family: 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.history-section h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.history-item {
    padding: 1rem;
    margin-bottom: 0.75rem;
    background: var(--background);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.history-item:hover {
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
}

.history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.history-item-type {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.history-item-title {
    font-weight: 500;
    color: var(--primary-color);
}

.history-item-details {
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: 400;
}

.history-item-time {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.history-item-status {
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
}

.history-item-status.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.history-item-status.failed {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error-color);
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-overlay p {
    color: white;
    margin-top: 1rem;
    font-size: 1.1rem;
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    background: var(--surface);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    transform: translateX(calc(100% + 40px));
    transition: transform 0.3s ease;
    z-index: 10000;
    max-width: 400px;
    word-wrap: break-word;
}

.notification.show {
    transform: translateX(0);
}

.notification.info {
    border-left: 4px solid var(--primary-color);
}

.notification.success {
    border-left: 4px solid var(--success-color);
}

.notification.error {
    border-left: 4px solid var(--error-color);
}

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

/* Batch Processing Styles */
.batch-controls {
    margin: 1.5rem 0;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 1rem;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 0.5rem;
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.batch-inputs {
    margin-top: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.batch-controls-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.batch-inputs .btn-secondary,
.batch-inputs .btn-small {
    margin: 0;
}

.btn-warning {
    background: var(--warning-color);
    color: white;
    border: 1px solid var(--warning-color);
}

.btn-warning:hover {
    background: #d97706;
    border-color: #d97706;
}

.batch-header-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) auto;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--primary-color);
    color: white;
    border-radius: 6px 6px 0 0;
    font-weight: 600;
    font-size: 0.9rem;
}

.batch-header-label,
.batch-header-action {
    padding: 0.25rem;
    text-align: center;
}

.batch-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) auto;
    gap: 0.5rem;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-top: none;
    background: white;
    transition: all 0.2s ease;
}

.batch-row:hover {
    background: #f8fafc;
}

.batch-row:last-child {
    border-radius: 0 0 6px 6px;
}

.batch-row-valid {
    border-left: 3px solid var(--success-color);
}

.batch-row-invalid {
    border-left: 3px solid var(--error-color);
    background: #fef2f2;
}

.batch-input-wrapper {
    display: flex;
    flex-direction: column;
}

.batch-input {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: border-color 0.2s ease;
}

.batch-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.batch-action-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}

.batch-info {
    padding: 2rem;
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}

.batch-info p {
    margin: 0;
}

/* Batch Results Display Styles */
.batch-results-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.3rem 0.5rem;  /* Reduziert von 0.75rem 1rem */
    border-radius: 8px 8px 0 0;
    margin-bottom: 0;
    margin-top: 0;  /* Kein Abstand oben */
}

.batch-results-header h4 {
    margin: 0 0 0.2rem 0;  /* Reduziert von 0.5rem */
    font-size: 1rem;  /* Reduziert von 1.1rem */
    font-weight: 600;
}

.batch-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.9rem;
}

.batch-summary span {
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    font-weight: 500;
}

.batch-results-container {
    /* Removed max-height and overflow-y to prevent double scrollbar */
    background: white;
    border-radius: 0 0 8px 8px;
    border: 1px solid #e2e8f0;
    border-top: none;
}

.batch-result-item {
    border-bottom: 1px solid #e2e8f0;
    padding: 0.05rem 0.5rem !important;
    transition: all 0.2s ease;
    position: relative;
}

.batch-result-item:hover {
    background: #f8fafc;
}

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

.batch-result-item.success {
    border-left: 4px solid var(--success-color);
}

.batch-result-item.error {
    border-left: 4px solid var(--error-color);
    background: #fef2f2;
}

.batch-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.02rem !important;
    padding: 0.1rem 0 !important;
    gap: 0.3rem;
}

.batch-result-header h5 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    padding: 0;
    line-height: 1.2;
}

.batch-result-status {
    padding: 0.2rem 0.5rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.15rem;
}

.status-success {
    background: #dcfce7;
    color: #166534;
}

.status-error {
    background: #fee2e2;
    color: #991b1b;
}

.batch-result-details {
    margin-bottom: 0.05rem !important;
    margin-top: 0.05rem !important;
}

.batch-inputs-display {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
}

.input-pair {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    border: 1px solid #cbd5e1;
    font-weight: 500;
}

.input-pair strong {
    color: var(--primary-color);
}

.batch-table-container {
    margin: 0.05rem 0 !important;
    overflow-x: auto;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.batch-table-container table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    background: white;
}

.batch-table-container th,
.batch-table-container td {
    padding: 0.5rem;
    text-align: left;
    border-bottom: 1px solid #f1f5f9;
}

.batch-table-container th {
    background: linear-gradient(135deg, #5899d4 0%, #4a8bc2 100%);
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.batch-table-container tr:hover {
    background: #f8fafc;
}

.pricing-result-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.param-name {
    font-weight: 600;
    background: #f8fafc !important;
    color: var(--text-primary);
}

.param-value {
    font-family: 'Monaco', 'Courier New', monospace;
    color: var(--primary-color);
    font-weight: 500;
}

.error-message {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #f87171;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.error-message::before {
    content: "⚠️";
    font-size: 1.2rem;
}

.batch-data-container {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 1rem;
    overflow-x: auto;
}

/* History pagination styling */
.history-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    padding: 0.5rem 0;
    border-top: 1px solid var(--border-color);
}

.pagination-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
}

.pagination-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.pagination-info {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.clear-history-btn {
    background: #dc2626;
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s ease;
    margin-left: auto;
}

.clear-history-btn:hover {
    background: #b91c1c;
    transform: translateY(-1px);
}

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

.batch-data-container pre {
    margin: 0;
    font-size: 0.85rem;
    white-space: pre-wrap;
    word-break: break-word;
    color: var(--text-primary);
    line-height: 1.4;
}

/* Ultra compact styles for result headers to minimize "Ergebnis" spacing */
.data-header {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%) !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 2px 2px 0 0 !important;
    padding: 2px 4px !important;
    margin: 0 !important;
    font-size: 0.7rem !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    border-bottom: 1px solid #e2e8f0 !important;
    line-height: 1.0 !important;
    min-height: auto !important;
    height: auto !important;
}

/* Customer Insights Section Styles - Unified with Pricing Response */
.customer-insights-section {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.insights-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--background);
    border-bottom: 1px solid var(--border-color);
    border-radius: 8px 8px 0 0;
}

.insights-header h4 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
}

.insights-header h4::before {
    content: "📊";
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

.insights-container {
    background: var(--surface);
    border-radius: 0 0 8px 8px;
    padding: 1rem;
    min-height: 60px;
}

/* Risk Display Styles */
.risk-display-container {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInScale 0.4s ease-out;
    width: 100%;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.risk-main-card {
    width: 100%;
    max-width: 100%;
    padding: 1rem;
    background: var(--surface);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.risk-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin: 0;
}

.risk-value-large {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    transition: color 0.3s ease;
    margin: 0;
}

.risk-badge {
    display: inline-block;
    padding: 0.4rem 1.2rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

/* Color classes for risk levels */
.risk-high .risk-value-large {
    color: #dc2626;
}

.risk-badge.risk-high {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border: 2px solid #dc2626;
}

.risk-medium .risk-value-large {
    color: #2563eb;
}

.risk-badge.risk-medium {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    border: 2px solid #2563eb;
}

.risk-low .risk-value-large {
    color: #16a34a;
}

.risk-badge.risk-low {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #166534;
    border: 2px solid #16a34a;
}

.risk-excellent .risk-value-large {
    color: #059669;
}

.risk-badge.risk-excellent {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border: 2px solid #059669;
}

/* Visual Indicator - Bar */
.risk-visual-indicator {
    width: 100%;
    max-width: 400px;
}

.risk-bar-container {
    width: 100%;
    height: 16px;
    background: #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.risk-bar-fill {
    height: 100%;
    border-radius: 8px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.risk-bar-fill.risk-high {
    background: linear-gradient(90deg, #dc2626 0%, #ef4444 100%);
}

.risk-bar-fill.risk-medium {
    background: linear-gradient(90deg, #2563eb 0%, #3b82f6 100%);
}

.risk-bar-fill.risk-low {
    background: linear-gradient(90deg, #16a34a 0%, #22c55e 100%);
}

.risk-bar-fill.risk-excellent {
    background: linear-gradient(90deg, #059669 0%, #10b981 100%);
}

.risk-scale-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.5rem;
    padding: 0;
}

.scale-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-weight: 500;
}

/* If insights data comes as table */
.insights-container table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    border: 1px solid var(--border-color);
}

.insights-container table th {
    background: var(--background);
    color: var(--text-primary);
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
}

.insights-container table td {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.insights-container table tr:nth-child(even) {
    background: var(--background);
}

.insights-container table tr:hover {
    background: #f1f5f9;
}

@media (max-width: 768px) {
    .workspace {
        grid-template-columns: 1fr;
    }

    .navbar {
        padding: 1rem;
    }

    .content-area {
        padding: 1rem;
    }

    .batch-header-row,
    .batch-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }

    .batch-summary {
        flex-direction: column;
        gap: 0.5rem;
    }

    .batch-result-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
        margin-bottom: 0.1rem;
    }

    .batch-inputs-display {
        flex-direction: column;
        gap: 0.3rem;
        margin-bottom: 0.2rem;
    }

    /* Risk Display Mobile Styles */
    .risk-main-card {
        padding: 0.75rem;
        gap: 0.6rem;
    }

    .risk-value-large {
        font-size: 2.5rem;
    }

    .risk-badge {
        padding: 0.35rem 1rem;
        font-size: 0.75rem;
    }

    .risk-title {
        font-size: 0.7rem;
    }

    .risk-visual-indicator {
        max-width: 100%;
    }

    .risk-bar-container {
        height: 14px;
    }

    .scale-label {
        font-size: 0.65rem;
    }

    .insights-container {
        padding: 0.75rem;
    }
}