/* Diagnostic App - Custom styles */

* { box-sizing: border-box; }

html, body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.toast {
    animation: toast-in 0.25s ease-out;
}
@keyframes toast-in {
    from { transform: translateY(-12px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.fade-in { animation: fade-in 0.3s ease-out; }
@keyframes fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.spinner {
    border: 3px solid rgba(16,185,129,0.2);
    border-top-color: #059669;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 0.8s linear infinite;
}
.spinner-lg { width: 48px; height: 48px; border-width: 4px; }
@keyframes spin { to { transform: rotate(360deg); } }

.nav-item.active {
    background-color: #ecfdf5;
    color: #047857;
}
.nav-item.active i { color: #059669; }

/* Energy class colors (CECB) */
.cecb-A { background: #064e3b; color: white; }
.cecb-B { background: #047857; color: white; }
.cecb-C { background: #10b981; color: white; }
.cecb-D { background: #fbbf24; color: #422006; }
.cecb-E { background: #f97316; color: white; }
.cecb-F { background: #dc2626; color: white; }
.cecb-G { background: #7f1d1d; color: white; }

/* Risk pill colors */
.risk-high { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.risk-medium { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.risk-low { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.risk-none { background: #f3f4f6; color: #4b5563; border: 1px solid #e5e7eb; }

.tool-card {
    transition: all 0.2s ease;
}
.tool-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(16,185,129,0.15);
    border-color: #10b981;
}

input[type="text"], input[type="email"], input[type="number"], input[type="tel"], select, textarea {
    transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #10b981 !important;
    box-shadow: 0 0 0 3px rgba(16,185,129,0.15);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.15s;
    cursor: pointer;
    border: none;
    white-space: nowrap;
}
.btn-primary { background: #059669; color: white; }
.btn-primary:hover:not(:disabled) { background: #047857; }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-secondary { background: white; color: #047857; border: 2px solid #d1fae5; }
.btn-secondary:hover { border-color: #10b981; background: #ecfdf5; }
.btn-danger { background: white; color: #b91c1c; border: 1px solid #fecaca; }
.btn-danger:hover { background: #fee2e2; }
.btn-ghost { background: transparent; color: #4b5563; }
.btn-ghost:hover { background: #f3f4f6; }

.card {
    background: white;
    border-radius: 1rem;
    border: 1px solid #e5e7eb;
}

.field-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.375rem;
}
.field-input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid #d1d5db;
    border-radius: 0.625rem;
    font-size: 0.875rem;
    color: #111827;
    background: white;
}

.range-track {
    appearance: none;
    width: 100%;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    outline: none;
}
.range-track::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    background: #059669;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid white;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
