/* --- PALETTE: NATURAL CALM --- */
:root {
    --hdb-font-main: 'Poppins', sans-serif;
    --hdb-card-bg: #ffffff;
    --hdb-text-dark: #333333;

    /* The 4 Pillars - Bright & Organic */
    --hdb-spice-amber: #d97706;     /* Assessment */
    --hdb-moss-green: #558b2f;      /* Body */
    --hdb-twilight-iris: #7e57c2;   /* Sleep */
    --hdb-brand-teal: #008080;      /* Mind */

    --hdb-radius-lg: 24px;
    --hdb-shadow-soft: 0 10px 30px -10px rgba(0,0,0,0.06);
}

/* CONTAINER */
.hdb-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px;
    font-family: var(--hdb-font-main);
}

/* 3. MIDDLE: THE 2x2 GRID */
.hdb-quadrant {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 30px;
}

.hdb-card {
    position: relative;
    height: 260px;
    background: var(--hdb-card-bg);
    border-radius: var(--hdb-radius-lg);
    padding: 35px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-decoration: none !important;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: var(--hdb-shadow-soft);
    border: 1px solid rgba(0,0,0,0.02);
}

.hdb-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px -10px rgba(0,0,0,0.12);
}

.hdb-card-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hdb-card-label {
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hdb-card-headline {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.5px;
    color: var(--hdb-text-dark);
}

.hdb-card-btn {
    align-self: flex-start;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: 0.2s;
    text-transform: uppercase;
    background: #f4f4f4;
    color: var(--hdb-text-dark);
}

.hdb-card-btn svg {
    width: 16px;
    height: 16px;
    transition: 0.2s;
}

.hdb-card:hover .hdb-card-btn {
    padding-right: 28px;
    background: #333;
    color: #fff;
}

.hdb-card:hover .hdb-card-btn svg {
    transform: translateX(5px);
}

/* WATERMARKS */
.hdb-bg-icon {
    position: absolute;
    bottom: -20px;
    right: -20px;
    width: 160px;
    height: 160px;
    opacity: 0.08;
    transform: rotate(-10deg);
    z-index: 1;
    pointer-events: none;
    transition: 0.5s ease;
}

.hdb-card:hover .hdb-bg-icon {
    transform: rotate(0deg) scale(1.1);
    opacity: 0.15;
}

/* THEME COLORS */
.hdb-card.assessment .hdb-card-label { color: var(--hdb-spice-amber); }
.hdb-card.assessment .hdb-bg-icon { fill: var(--hdb-spice-amber); }
.hdb-card.assessment:hover .hdb-card-btn { background: var(--hdb-spice-amber); }

.hdb-card.body .hdb-card-label { color: var(--hdb-moss-green); }
.hdb-card.body .hdb-bg-icon { fill: var(--hdb-moss-green); }
.hdb-card.body:hover .hdb-card-btn { background: var(--hdb-moss-green); }

.hdb-card.sleep .hdb-card-label { color: var(--hdb-twilight-iris); }
.hdb-card.sleep .hdb-bg-icon { fill: var(--hdb-twilight-iris); }
.hdb-card.sleep:hover .hdb-card-btn { background: var(--hdb-twilight-iris); }

.hdb-card.mind .hdb-card-label { color: var(--hdb-brand-teal); }
.hdb-card.mind .hdb-bg-icon { fill: var(--hdb-brand-teal); }
.hdb-card.mind:hover .hdb-card-btn { background: var(--hdb-brand-teal); }

/* 4. BOTTOM: CONSOLE */
.hdb-console-bar {
    background: var(--hdb-card-bg);
    border-radius: var(--hdb-radius-lg);
    padding: 25px 35px;
    box-shadow: var(--hdb-shadow-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.hdb-monitor-display { flex: 2; min-width: 250px; }

.hdb-monitor-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 10px;
    letter-spacing: 1px;
    font-weight: 700;
}

.hdb-progress-track {
    background: #f0f0f0;
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
}

.hdb-progress-fill {
    height: 100%;
    width: 65%;
    background: linear-gradient(90deg, var(--hdb-moss-green), var(--hdb-brand-teal));
    border-radius: 6px;
}

.hdb-scheduler-section {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.hdb-btn-pill-teal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    color: var(--hdb-brand-teal);
    border: 1px solid var(--hdb-brand-teal);
    border-radius: 50px;
    padding: 12px 28px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.hdb-btn-pill-teal:hover {
    background-color: var(--hdb-brand-teal);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 128, 128, 0.25);
    transform: translateY(-2px);
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .hdb-quadrant { grid-template-columns: 1fr; }
    .hdb-console-bar { flex-direction: column; text-align: center; }
    .hdb-scheduler-section { justify-content: center; }
}

/******* MONITOR PAGE ********/

.form-group-monitor { margin-bottom: 15px; }

label.monitor {
    font-weight: normal;
    color: #555;
    font-size: 14px;
    margin-bottom: 5px;
    text-align: left;
}

.form-error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
}

.section-monitor {
    margin-bottom: 20px;
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 5px;
}

/* Monitor Section Styles */
.monitor-slider {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.monitor-container {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding: 15px;
    background-color: #f8f9fa;
}

.monitor-item {
    flex: 0 0 320px;
    background-color: #fff !important;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin-right: 15px;
    scroll-snap-align: start;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.07);
}

.chart-container {
    border: 1px solid #ccc;
    background-color: white;
    color: white;
    padding: 10px;
    margin: 10px;
    width: 300px;
    box-sizing: border-box;
}

.monitor-report-container {
    border: 1px solid #ccc;
    background-color: lightblue;
    color: black;
    padding: 5px;
    margin: 10px;
    min-width: 200px;
    box-sizing: border-box;
}

.monitor-scrollable-text {
    display: block;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ccc;
    padding: 5px;
}

.monitor-item h4 {
    color: #343a40;
    margin-bottom: 10px;
    font-weight: 600;
}

.slider-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    padding: 12px 15px;
    cursor: pointer;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.slider-button:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.slider-button-prev { left: 0; }
.slider-button-next { right: 0; }

.selected-risks {
    margin-top: 15px;
    text-align: center;
}

@media (max-width: 768px) {
    .monitor-item { flex: 0 0 100%; }
    .slider-button { display: none; }
}
