/* Base Styles */
:root {
--bg-primary: #1c1c1c;
--bg-secondary: #2a2a2a;
--bg-tertiary: #333;
--text-primary: #eee;
--text-secondary: #aaa;
--text-muted: #888;
--border-color: #555;
--input-bg: #333;
--btn-bg: #444;
--accent-color: #4a8cff;
--success-color: #4caf50;
--warning-color: #ff9800;
--danger-color: #f44336;
--info-color: #2196f3;
}

body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
margin: 0;
padding: 1.5em;
color: var(--text-primary);
background: var(--bg-primary);
line-height: 1.5;
}

h1, h2, h3, h4 {
margin-top: 0;
color: var(--text-primary);
}

/* Layout Components */
.container {
max-width: 1400px;
margin: 0 auto;
}

.header {
margin-bottom: 1.5em;
border-bottom: 1px solid var(--border-color);
padding-bottom: 0.5em;
}

.reference {
font-size: 0.9em;
color: var(--text-secondary);
margin-bottom: 1em;
}

.panel {
background: var(--bg-secondary);
border-radius: 6px;
padding: 1.2em;
margin-bottom: 1.5em;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.panel-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 1em;
border-bottom: 1px solid var(--border-color);
padding-bottom: 0.5em;
}

.panel-title {
margin: 0;
font-size: 1.2em;
}

.panel-help {
color: var(--text-secondary);
font-size: 0.9em;
cursor: pointer;
}

.panel-help:hover {
color: var(--accent-color);
}

.grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 1.5em;
}

.form-group {
margin-bottom: 1em;
}

.form-row {
display: flex;
flex-wrap: wrap;
gap: 1em;
margin-bottom: 1em;
}

.form-control {
flex: 1;
min-width: 150px;
}

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

.small-label {
font-size: 0.85em;
color: var(--text-secondary);
margin-top: 0.3em;
}

/* Form Elements */
input, select, textarea {
width: 100%;
padding: 0.6em;
background: var(--input-bg);
color: var(--text-primary);
border: 1px solid var(--border-color);
border-radius: 4px;
font-size: 1em;
}

input:focus, select:focus, textarea:focus {
outline: none;
border-color: var(--accent-color);
box-shadow: 0 0 0 2px rgba(74, 140, 255, 0.2);
}

input[type="checkbox"], input[type="radio"] {
width: auto;
margin-right: 0.5em;
}

input[readonly] {
background-color: rgba(255, 255, 255, 0.05);
cursor: not-allowed;
}

.input-group {
display: flex;
align-items: center;
}

.input-group input {
border-radius: 4px 0 0 4px;
}

.input-group-append {
background: var(--bg-tertiary);
color: var(--text-secondary);
padding: 0.6em 0.8em;
border: 1px solid var(--border-color);
border-left: none;
border-radius: 0 4px 4px 0;
}

/* Buttons */
.btn {
background: var(--btn-bg);
color: var(--text-primary);
border: none;
padding: 0.6em 1em;
margin: 0.2em;
cursor: pointer;
border-radius: 4px;
font-size: 1em;
transition: background 0.2s;
}

.btn:hover {
background: #555;
}

.btn-primary {
background: var(--accent-color);
}

.btn-primary:hover {
background: #3a7be0;
}

.btn-success {
background: var(--success-color);
}

.btn-success:hover {
background: #3d8b40;
}

.btn-danger {
background: var(--danger-color);
}

.btn-danger:hover {
background: #d32f2f;
}

.btn-sm {
font-size: 0.85em;
padding: 0.4em 0.7em;
}

/* Tables */
table {
border-collapse: collapse;
width: 100%;
margin-bottom: 1.5em;
}

th, td {
border: 1px solid var(--border-color);
padding: 0.7em;
text-align: center;
}

th {
background-color: var(--bg-tertiary);
font-weight: 600;
}

tr:nth-child(even) {
background-color: rgba(255, 255, 255, 0.02);
}

/* Status Indicators */
.status-indicator {
display: inline-block;
width: 12px;
height: 12px;
border-radius: 50%;
margin-right: 6px;
}

.status-success {
background-color: var(--success-color);
}

.status-warning {
background-color: var(--warning-color);
}

.status-danger {
background-color: var(--danger-color);
}

/* Info Boxes */
.info-box {
display: none;
position: fixed;
top: 10%;
left: 50%;
transform: translateX(-50%);
background: var(--bg-tertiary);
color: var(--text-primary);
border: 1px solid var(--border-color);
padding: 1.5em;
max-width: 600px;
max-height: 80vh;
overflow-y: auto;
z-index: 1000;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
border-radius: 6px;
}

.info-box header {
font-weight: bold;
font-size: 1.2em;
margin-bottom: 1em;
padding-bottom: 0.5em;
border-bottom: 1px solid var(--border-color);
}

.info-box .close {
position: absolute;
top: 0.5em;
right: 0.7em;
cursor: pointer;
font-size: 1.5em;
color: var(--text-secondary);
}

.info-box .close:hover {
color: var(--text-primary);
}

/* Results Section */
.results-panel {
background: var(--bg-secondary);
border-radius: 6px;
padding: 1.2em;
margin-top: 2em;
}

.results-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 1em;
border-bottom: 1px solid var(--border-color);
padding-bottom: 0.5em;
}

.results-title {
margin: 0;
font-size: 1.2em;
}

.result-row {
display: flex;
margin-bottom: 0.5em;
padding: 0.5em;
border-radius: 4px;
}

.result-row:nth-child(even) {
background-color: rgba(255, 255, 255, 0.02);
}

.result-label {
flex: 1;
font-weight: 500;
}

.result-value {
flex: 2;
text-align: right;
font-family: monospace;
font-size: 1.1em;
}

.compliance-status {
display: flex;
align-items: center;
padding: 0.7em;
border-radius: 4px;
margin-bottom: 0.5em;
}

.status-text {
margin-left: 0.5em;
font-weight: 500;
}

.bg-success {
background-color: rgba(76, 175, 80, 0.1);
}

.bg-warning {
background-color: rgba(255, 152, 0, 0.1);
}

.bg-danger {
background-color: rgba(244, 67, 54, 0.1);
}

/* Charts and Visualizations */
.chart-container {
height: 200px;
margin: 1.5em 0;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
.grid {
    grid-template-columns: 1fr;
}

.form-row {
    flex-direction: column;
}

.form-control {
    width: 100%;
}
}

/* Scrollbar Styling */
::-webkit-scrollbar {
width: 8px;
height: 8px;
}

::-webkit-scrollbar-track {
background: #222;
border-radius: 4px;
}

::-webkit-scrollbar-thumb {
background-color: #555;
border-radius: 4px;
border: 2px solid #222;
}

::-webkit-scrollbar-thumb:hover {
background-color: #777;
}

/* Firefox */
* {
scrollbar-width: thin;
scrollbar-color: #555 #222;
}