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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #0F1115;
    min-height: 100vh;
    padding: 0;
    color: #e2e4ea;
    font-size: 14px;
    font-weight: 400;
}

.card h2 {
    font-size: 20px;
    font-weight: 600;
    color: #e2e4ea;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 20px;
}

.card {
    background: #151821;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.btn {
    background: rgba(102, 126, 234, 0.12);
    color: #667eea;
    border: none;
    padding: 12px 24px;
    font-size: 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 600;
}

.btn:hover {
    background: rgba(102, 126, 234, 0.22);
}

.btn:disabled {
    background: #232735;
    color: #5c6078;
    cursor: not-allowed;
    transform: none;
}

.btn-danger {
    background: rgba(229, 62, 62, 0.12);
    color: #fc8181;
}

.btn-danger:hover {
    background: rgba(229, 62, 62, 0.22);
}

.btn-small {
    padding: 6px 12px;
    font-size: 14px;
}

.hidden {
    display: none !important;
}

.browser-warning {
    background: #3b1a1a;
    border: 1px solid #5c2626;
    color: #fca5a5;
    padding: 16px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
}

.browser-warning strong {
    display: block;
    margin-bottom: 4px;
    font-size: 15px;
}

.browser-warning a {
    color: #fc8181;
    font-weight: 600;
}

.info-text {
    font-size: 14px;
    color: #8b8fa3;
    margin-top: 8px;
    font-style: italic;
}

/* Toast notifications */
.toast-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
}

.toast {
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    pointer-events: auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    animation: toastIn 0.3s ease;
    max-width: 360px;
}

.toast-info {
    background: #667eea;
}

.toast-error {
    background: #e53e3e;
}

.toast-success {
    background: #667eea;
}

.toast-warning {
    background: #ed8936;
}

.toast-out {
    animation: toastOut 0.3s ease forwards;
}

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

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

/* Confirm dialog */
.confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2001;
}

.confirm-overlay.hidden {
    display: none;
}

.confirm-card {
    background: #151821;
    border-radius: 12px;
    padding: 24px;
    max-width: 360px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.confirm-card p {
    margin: 0 0 20px;
    font-size: 15px;
    color: #e2e4ea;
}

.confirm-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.btn-secondary {
    background: #232735;
    color: #8b8fa3;
}

.btn-secondary:hover {
    background: #2a2e3d;
}

/* Metric box unavailable state (HR not connected) */
.metric-box-unavailable {
    border: 2px dashed #232735;
    opacity: 0.5;
}

.metric-box-unavailable .metric-label::after {
    content: ' (N/A)';
    font-size: 10px;
}
