* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(to bottom right, #0f172a, #581c87, #0f172a);
    min-height: 100vh;
    color: #fff;
}

.app {
    padding: 24px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 32px;
}

.header h1 {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 8px;
}

.header p {
    color: #d8b4fe;
}

/* Status Grid */
.status-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.status-card {
    background: #1e293b;
    border-radius: 8px;
    padding: 16px;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.status-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.status-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    background: rgba(107, 114, 128, 0.2);
    color: #9ca3af;
}

.badge-success {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.badge-warning {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.badge-processing {
    background: rgba(249, 115, 22, 0.2);
    color: #fb923c;
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.metric-card {
    background: #1e293b;
    border-radius: 8px;
    padding: 16px;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.metric-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    color: #9ca3af;
    font-size: 14px;
}

.metric-icon {
    flex-shrink: 0;
}

.metric-value {
    font-size: 24px;
    font-weight: bold;
}

.metric-yellow { color: #fbbf24; }
.metric-orange { color: #fb923c; }
.metric-green { color: #4ade80; }
.metric-blue { color: #60a5fa; }
.metric-purple { color: #a78bfa; }

/* Main Grid */
.main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

/* Panel */
.panel {
    background: #1e293b;
    border-radius: 8px;
    padding: 24px;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.panel h2 {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 16px;
}

.panel h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

/* Qubits */
.qubits-container {
    margin-bottom: 24px;
}

.qubit-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.qubit-label {
    width: 64px;
    font-family: monospace;
}

.qubit-circuit {
    flex: 1;
    height: 48px;
    background: #334155;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 1px solid rgba(168, 85, 247, 0.2);
}

.qubit-state {
    position: absolute;
    left: 16px;
    color: #d8b4fe;
    font-family: monospace;
    font-size: 14px;
}

.qubit-gate {
    padding: 8px 16px;
    border-radius: 4px;
    color: white;
    font-weight: bold;
}

.qubit-probability {
    position: absolute;
    right: 16px;
    font-size: 12px;
    color: #9ca3af;
}

/* Gates */
.gates-section {
    margin-bottom: 16px;
}

.gates-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 8px;
}

.gate-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 4px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.2s;
}

.gate-btn:hover:not(:disabled) {
    opacity: 0.8;
}

.gate-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.gate-h { background: #3b82f6; }
.gate-x { background: #ef4444; }
.gate-y { background: #22c55e; }
.gate-z { background: #a855f7; }
.gate-cnot { background: #f97316; }

.gates-hint {
    font-size: 12px;
    color: #9ca3af;
}

/* Controls */
.controls {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    flex: 1;
    background: #9333ea;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #7e22ce;
}

.btn-secondary {
    background: #334155;
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: #475569;
}

.circuit-info {
    font-size: 14px;
    color: #9ca3af;
}

.circuit-info span {
    color: white;
}

/* Jobs Panel */
.jobs-panel {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.jobs-list {
    max-height: 250px;
    overflow-y: auto;
}

.empty-state {
    text-align: center;
    color: #6b7280;
    padding: 32px;
}

.job-card {
    background: #334155;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.job-card.completed {
    border-color: rgba(34, 197, 94, 0.3);
}

.job-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.job-id {
    font-family: monospace;
    font-size: 14px;
}

.job-status {
    font-size: 12px;
}

.status-queued { color: #fbbf24; }
.status-completed { color: #4ade80; }

.job-info {
    font-size: 12px;
    color: #9ca3af;
    margin-bottom: 8px;
}

.job-results {
    font-size: 12px;
    margin-top: 8px;
}

.job-measurement {
    color: #d8b4fe;
    margin-bottom: 4px;
}

.job-fidelity {
    color: #60a5fa;
}

/* Architecture */
.architecture {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
}

.arch-box {
    width: 128px;
    height: 64px;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.arch-box svg {
    margin-bottom: 4px;
}

.arch-box div {
    font-size: 12px;
}

.arch-quantum {
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid #3b82f6;
}

.arch-h1 {
    background: rgba(168, 85, 247, 0.2);
    border: 1px solid #a855f7;
}

.arch-hpc {
    background: rgba(249, 115, 22, 0.2);
    border: 1px solid #f97316;
}

.arch-results {
    background: rgba(34, 197, 94, 0.2);
    border: 1px solid #22c55e;
}

.arch-arrow {
    font-size: 20px;
    color: #9ca3af;
}

/* Scrollbar */
.jobs-list::-webkit-scrollbar {
    width: 8px;
}

.jobs-list::-webkit-scrollbar-track {
    background: #1e293b;
}

.jobs-list::-webkit-scrollbar-thumb {
    background: #475569;
    border-radius: 4px;
}

.jobs-list::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Responsive */
@media (max-width: 1024px) {
    .main-grid {
        grid-template-columns: 1fr;
    }
    
    .metrics-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .status-grid {
        grid-template-columns: 1fr;
    }
    
    .metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .architecture {
        flex-direction: column;
        gap: 16px;
    }
    
    .arch-arrow {
        transform: rotate(90deg);
    }
}

/* Kindred Brand Header */
.kindred-header {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(30, 41, 59, 0.6);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 24px;
    border: 1px solid rgba(168, 85, 247, 0.4);
}

.kindred-logo {
    width: 64px;
    height: 64px;
    border-radius: 12px;
    object-fit: contain;
    background: rgba(255, 255, 255, 0.1);
}

.kindred-title h1 {
    font-size: 28px;
    font-weight: bold;
    color: #ffffff;
}

.kindred-title p {
    font-size: 14px;
    color: #d8b4fe;
    margin-top: 4px;
}
/* Confidentiality Footer */
.confidentiality-footer {
    text-align: center;
    font-size: 12px;
    color: #9ca3af;
    opacity: 0.8;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid rgba(168, 85, 247, 0.2);
    line-height: 1.6;
}
