html, body {
    margin: 0;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

/* Global Text Selection */
::selection {
    background-color: #2C3E50; /* Vantaya Dark Navy */
    color: #ffffff;
}
::-moz-selection {
    background-color: #2C3E50;
    color: #ffffff;
}

/* Global Scrollbar */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: #F1F5F9; /* Light slate background */
}

::-webkit-scrollbar-thumb {
    background-color: #76B7A9; /* Vantaya Mint Green */
    border-radius: 6px;
    border: 3px solid #F1F5F9; /* Creates a padding effect around the thumb */
}

::-webkit-scrollbar-thumb:hover {
    background-color: #5A9A8C; /* Darker Mint Green on hover */
}

a, .btn-link {
    color: #006bb7;
}

/* Shared calm dashboard ambience for secondary dashboard pages */
.ambient-page {
    position: relative;
    min-height: calc(100vh - 56px);
    margin: -42px -48px;
    padding: 42px 48px;
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(ellipse at 78% 8%, rgba(128, 207, 190, 0.4) 0%, rgba(128, 207, 190, 0.1) 26%, transparent 58%),
        radial-gradient(ellipse at 47% 86%, rgba(219, 190, 150, 0.2) 0%, rgba(219, 190, 150, 0.05) 28%, transparent 62%),
        linear-gradient(145deg, #F0F9F6 0%, #E6F5F0 31%, #FAFFFF 64%, #EAF6F2 100%);
}

.ambient-bg,
.ambient-bg::before,
.ambient-bg::after {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.ambient-bg {
    z-index: 0;
    overflow: hidden;
}

.ambient-bg::before,
.ambient-bg::after {
    content: "";
}

.ambient-bg::before {
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        linear-gradient(0deg, rgba(255, 255, 255, 0.026) 1px, transparent 1px);
    background-size: 88px 88px;
    opacity: 0.09;
    -webkit-mask-image: radial-gradient(ellipse at 52% 48%, #000 0%, rgba(0, 0, 0, 0.68) 42%, transparent 78%);
    mask-image: radial-gradient(ellipse at 52% 48%, #000 0%, rgba(0, 0, 0, 0.68) 42%, transparent 78%);
}

.ambient-bg::after {
    background:
        radial-gradient(ellipse at center, transparent 0%, rgba(255, 255, 255, 0.3) 58%, rgba(255, 255, 255, 0.8) 100%),
        radial-gradient(ellipse at 22% 44%, rgba(153, 230, 210, 0.3) 0%, transparent 46%),
        radial-gradient(ellipse at 86% 18%, rgba(110, 190, 172, 0.2) 0%, transparent 52%),
        radial-gradient(ellipse at 58% 78%, rgba(230, 205, 170, 0.2) 0%, transparent 48%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.5), transparent 22%);
}

.ambient-content {
    position: relative;
    z-index: 1;
}

.ambient-particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.ambient-particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(178, 238, 222, 0.72);
    box-shadow:
        0 0 8px 2px rgba(128, 222, 203, 0.34),
        0 0 18px rgba(236, 215, 178, 0.12);
    will-change: transform, opacity;
}

.ap1, .ap5, .ap9 { width: 4px; height: 4px; }
.ap2, .ap6, .ap10 { width: 3px; height: 3px; }
.ap3, .ap7, .ap11 { width: 5px; height: 5px; }
.ap4, .ap8, .ap12 { width: 2px; height: 2px; }

.ap1, .ap4, .ap7, .ap10 {
    background: rgba(134, 226, 206, 0.78);
    box-shadow: 0 0 10px 3px rgba(134, 226, 206, 0.30);
}

.ap2, .ap5, .ap8, .ap11 {
    background: rgba(206, 248, 237, 0.72);
    box-shadow: 0 0 9px 2px rgba(206, 248, 237, 0.24);
}

.ap3, .ap6, .ap9, .ap12 {
    background: rgba(239, 214, 175, 0.58);
    box-shadow: 0 0 10px 3px rgba(239, 214, 175, 0.20);
}

.ap1 { left: 8%; bottom: 20%; animation: ambientRisePulse 14s ease-in infinite 0s; }
.ap2 { left: 15%; bottom: 10%; animation: ambientRise 18s ease-in infinite 2s; }
.ap3 { left: 25%; bottom: 30%; animation: ambientRisePulse 12s ease-in infinite 4s; }
.ap4 { left: 35%; bottom: 5%; animation: ambientRise 20s ease-in infinite 1s; }
.ap5 { left: 45%; bottom: 25%; animation: ambientRisePulse 16s ease-in infinite 6s; }
.ap6 { left: 55%; bottom: 15%; animation: ambientRise 15s ease-in infinite 3s; }
.ap7 { left: 62%; bottom: 35%; animation: ambientRisePulse 13s ease-in infinite 8s; }
.ap8 { left: 72%; bottom: 8%; animation: ambientRise 19s ease-in infinite 5s; }
.ap9 { left: 78%; bottom: 22%; animation: ambientRisePulse 17s ease-in infinite 7s; }
.ap10 { left: 85%; bottom: 12%; animation: ambientRise 14s ease-in infinite 9s; }
.ap11 { left: 92%; bottom: 28%; animation: ambientRisePulse 21s ease-in infinite 2.5s; }
.ap12 { left: 50%; bottom: 18%; animation: ambientRise 16s ease-in infinite 10s; }

@keyframes ambientRise {
    0% { transform: translateY(0) translateX(0) scale(1); opacity: 0; }
    10% { opacity: 0.9; }
    50% { opacity: 0.58; }
    90% { opacity: 0.18; }
    100% { transform: translateY(-85vh) translateX(30px) scale(0.3); opacity: 0; }
}

@keyframes ambientRisePulse {
    0% { transform: translateY(0) translateX(0) scale(1); opacity: 0; }
    10% { opacity: 0.88; }
    30% { transform: translateY(-25vh) translateX(-15px) scale(1.3); opacity: 0.72; }
    60% { transform: translateY(-50vh) translateX(20px) scale(0.8); opacity: 0.46; }
    100% { transform: translateY(-90vh) translateX(-10px) scale(0.2); opacity: 0; }
}

.ambient-page .report-card,
.ambient-page .report-stat,
.ambient-page .reports-empty,
.ambient-page .reports-loading,
.ambient-page .settings-card,
.ambient-page .voice-pick-card {
    background: rgba(255, 255, 255, 0.6) !important;
    backdrop-filter: blur(24px);
    border-color: rgba(255, 255, 255, 0.8) !important;
    box-shadow:
        0 16px 40px rgba(74, 139, 122, 0.08),
        0 1px 0 rgba(255, 255, 255, 0.5) inset !important;
}

.ambient-page .danger-zone {
    border-color: rgba(239, 123, 123, 0.32) !important;
}

.ambient-page .btn-start,
.ambient-page .btn-mentor:not(.outline) {
    background: linear-gradient(135deg, #72CDB8 0%, #4F9D8F 52%, #3D7F73 100%) !important;
    box-shadow:
        0 12px 26px rgba(75, 170, 151, 0.30),
        0 1px 0 rgba(255, 255, 255, 0.20) inset !important;
}

.ambient-page .page-header h3 {
    color: #1A332B !important;
    text-shadow: 0 4px 12px rgba(255, 255, 255, 0.5);
}

.ambient-page .page-header p {
    color: #4A6B62 !important;
}

/* Force dark text on all cards inside Reports and Settings pages */
.ambient-page .report-card h4,
.ambient-page .report-card h5,
.ambient-page .report-stat h4,
.ambient-page .reports-empty h4,
.ambient-page .settings-card h4,
.ambient-page .settings-card h5,
.ambient-page .voice-pick-card h4,
.ambient-page .settings-card label,
.ambient-page .settings-card .profile-info h4,
.ambient-page .settings-card .mentor-section h5 {
    color: #1A332B !important;
}

.ambient-page .report-card p,
.ambient-page .reports-empty p,
.ambient-page .settings-card p,
.ambient-page .settings-card .action-info span,
.ambient-page .settings-card .confirm-text,
.ambient-page .settings-card .voice-current-meta span,
.ambient-page .settings-card .voice-pick-tags,
.ambient-page .report-stat .stat-value,
.ambient-page .report-stat .stat-label,
.ambient-page .settings-card .profile-info p {
    color: #4A6B62 !important;
}

.ambient-page .settings-card strong,
.ambient-page .report-card strong {
    color: #1A332B !important;
}

@media (max-width: 768px) {
    .ambient-page {
        margin: -20px;
        padding: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ambient-particle {
        animation: none !important;
        opacity: 0.35;
    }
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: #EF4444;
    color: white;
    padding: 0.75rem 1.5rem;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 0.75rem;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}
