/* --- Master Layout --- */
.hh-dashboard-wrapper {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    color: #f8f8f2;
    font-family: 'Inter', sans-serif;
    box-sizing: border-box;
}

/* --- Header --- */
.hh-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(30, 30, 35, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.hh-header-left { display: flex; align-items: center; gap: 10px; }
.hh-status-indicator { width: 12px; height: 12px; border-radius: 50%; background: #ff79c6; box-shadow: 0 0 10px #ff79c6; animation: pulse 2s infinite; }
.hh-header h1 { margin: 0; font-size: 1.2rem; font-weight: bold; letter-spacing: 1px; }
.hh-subtitle { font-weight: normal; color: #aaa; }
.hh-status-text { color: #50fa7b; font-family: monospace; font-weight: bold; }

@keyframes pulse {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1); }
}

/* --- 3-Column Grid --- */
.hh-clinical-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 900px) {
    .hh-clinical-grid { grid-template-columns: 1fr 2fr 1fr; }
}

/* --- Glass Panels --- */
.hh-panel {
    background: rgba(30, 30, 35, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.hh-panel-title {
    font-size: 0.85rem;
    font-weight: bold;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 10px;
    margin-top: 0;
    margin-bottom: 20px;
}

.hh-sub-title { font-size: 0.75rem; color: #888; text-transform: uppercase; margin-bottom: 10px; }

/* --- Left Column: Upload & Demos --- */
.hh-dropzone {
    border: 2px dashed #ff79c6;
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}
.hh-dropzone:hover { background: rgba(255, 121, 198, 0.1); border-color: #ff92d0; }
.hh-dropzone-icon { font-size: 2.5rem; color: #ff79c6; margin-bottom: 15px; }
.hh-dropzone p { margin: 0; font-size: 0.9rem; color: #ccc; }

.hh-btn-primary {
    background: #ff79c6; color: #fff; border: none; padding: 12px; border-radius: 8px;
    font-weight: bold; cursor: pointer; transition: all 0.2s; width: 100%; margin-bottom: 20px;
}
.hh-btn-primary:hover { box-shadow: 0 5px 15px rgba(255, 121, 198, 0.4); transform: translateY(-2px); }
.hh-btn-primary:disabled { background: #555; cursor: not-allowed; transform: none; box-shadow: none; }

.hh-demo-list { display: flex; flex-direction: column; gap: 10px; }
.hh-demo-btn {
    background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.1); color: #ccc;
    padding: 12px 15px; border-radius: 8px; cursor: pointer; display: flex; justify-content: space-between; align-items: center;
    font-size: 0.85rem; transition: background 0.2s, color 0.2s;
}
.hh-demo-btn:hover { background: rgba(255,255,255,0.1); color: #fff; }
.hh-tag { background: rgba(0,0,0,0.6); padding: 3px 6px; border-radius: 4px; font-size: 0.7rem; font-family: monospace; }

/* --- Center Column: Viewer --- */
.hh-viewer-container {
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    height: 100%;
    min-height: 400px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.hh-viewer-label { position: absolute; top: 15px; left: 15px; background: rgba(0,0,0,0.8); border: 1px solid #333; padding: 5px 10px; border-radius: 4px; font-size: 0.75rem; color: #ff79c6; font-family: monospace; z-index: 10; }
.hh-placeholder { color: #666; font-size: 0.9rem; }
.hh-preview-img { max-width: 100%; max-height: 100%; object-fit: contain; }
.hh-viewer-frame {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px; /* Forces the image away from the glass edges */
    box-sizing: border-box;
}

.hh-preview-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px; /* Smooth out those harsh corners */
    box-shadow: 0 15px 40px rgba(0,0,0,0.8), 0 0 0 1px rgba(255, 255, 255, 0.1); /* Adds 3D depth */
}

/* --- Right Column: Telemetry --- */
.hh-result-box {
    background: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.1); border-radius: 12px;
    padding: 20px; text-align: center; margin-bottom: 20px; display: none;
}
.hh-prediction { font-size: 1.5rem; font-weight: 900; color: #ff79c6; line-height: 1.2; margin-bottom: 5px; }
.hh-confidence { font-family: monospace; color: #aaa; font-size: 0.9rem; }

.hh-legend-box { background: rgba(0,0,0,0.3); padding: 15px; border-radius: 12px; margin-bottom: 20px; border: 1px solid rgba(255,255,255,0.05); }
.hh-gradient-bar { height: 12px; background: linear-gradient(to right, #2563eb, #facc15, #dc2626); border-radius: 6px; margin-bottom: 8px; opacity: 0.8; }
.hh-legend-labels { display: flex; justify-content: space-between; font-size: 0.7rem; color: #aaa; font-family: monospace; }

.hh-logs-box { margin-top: auto; display: flex; flex-direction: column; flex-grow: 1; }
.hh-terminal {
    background: rgba(0,0,0,0.8); border: 1px solid rgba(255,255,255,0.1); border-radius: 8px;
    padding: 12px; font-family: monospace; font-size: 0.75rem; color: #888;
    height: 150px; overflow-y: auto; flex-grow: 1;
}
.hh-terminal p { margin: 0 0 5px 0; }
.hh-log-success { color: #50fa7b; }

/* --- OVERRIDE GLOBAL THEME SQUASHING --- */

/* Force the glass panels to have more internal padding from the edges */
.hh-panel {
    padding: 30px !important;
}

/* Force a heavy gap under the main section titles */
.hh-panel-title {
    margin-bottom: 25px !important;
    padding-bottom: 15px !important;
}

/* Force vertical spacing under the dropzone and telemetry boxes */
.hh-dropzone, .hh-result-box, .hh-legend-box {
    margin-bottom: 25px !important;
}

/* Force space around the smaller clinical sub-titles */
.hh-sub-title {
    margin-top: 10px !important;
    margin-bottom: 15px !important;
}

/* Give the demo buttons room to breathe */
.hh-demo-list {
    gap: 15px !important;
}

/* Force a deep gap between the header and the 3-column grid */
.hh-header {
    margin-bottom: 40px !important;
}

/* Force all 3 columns to stretch to the exact same height */
.hh-clinical-grid {
    align-items: stretch !important; 
}

.hh-panel {
    height: 100% !important;
    justify-content: flex-start !important; /* Keeps content anchored to the top */
}

/* Push the terminal to the absolute bottom of the right column so it lines up */
.hh-logs-box {
    margin-top: auto !important; 
}