/* Ny styling for Motiverende Citat */
.hstv-quote-text {
    font-size: 16px; /* Mindre skriftstørrelse */
    font-style: italic;
    font-weight: 500;
    margin-top: 5px;
    color: #b8aa87; /* Sekundær/Muted farve */
    max-width: 450px;
    line-height: 1.4;
}
/* Justering for stor skærm */
@media (min-width: 1920px) {
    .hstv-quote-text {
        font-size: 20px;
        max-width: 600px;
    }
}

/* General layout and typography */
.hstv-dashboard {
    background-color: #f4f2ec; /* LYS: Hovedbaggrund */
    color: #1c1c1c; /* MØRK: Hovedtekst */
    font-family: 'Poppins', sans-serif;
    padding: 10px;
    box-sizing: border-box;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Loading Spinner */
.hstv-loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f4f2ec; /* LYS: Loading baggrund */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    text-align: center;
}
.hstv-spinner {
    border: 10px solid #ddd; /* Lysere kant */
    border-top: 10px solid #e7651b; /* Accent Farve */
    border-radius: 50%;
    width: 80px;
    height: 80px;
    animation: spin 2s linear infinite;
    margin-bottom: 20px;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
.hstv-loading p {
    font-size: 24px;
    color: #b8aa87; /* Sekundær Tekst */
}

/* Header */
.hstv-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 3px solid #ddd; /* Lysere skilnelinje */
    padding-bottom: 15px;
}
.hstv-logo h1 {
    font-size: 2vw;
    font-weight: 700;
    margin: 0;
    color: #1c1c1c; /* Mørk titel */
        min-width: 60% !important;
}
/* Ny styling for Motiverende Citat */
.hstv-quote-text {
    font-size: 16px; /* Mindre skriftstørrelse */
    font-style: italic;
    font-weight: 500;
    margin-top: 5px;
    color: #b8aa87; /* Sekundær/Muted farve */
    max-width: 650px;
    line-height: 1.4;
}
.hstv-meta {
    text-align: right;
}
.hstv-time {
    font-size: 56px;
    font-weight: 600;
    color: #e7651b; /* STRÆK ACCENT: Klokkeslæt */
    line-height: 1;
}
.hstv-date {
    font-size: 22px;
    color: #b8aa87; /* Sekundær Tekst */
    margin-top: 5px;
}
.hstv-month {
    font-weight: 600;
}


/* Main Goal */
.hstv-main-goal {
    background-color: #ffffff; /* LYS: Kort baggrund */
    border-radius: 12px;
    padding: 10px;
    margin-bottom: 30px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* Let skygge */
    color: #1c1c1c; /* Sæt tekstfarve til mørk */
}

/* NY: Tre-kolonne layout for hovedmål */
.hstv-three-columns {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.hstv-goal-col {
    flex: 1;
    padding: 0 15px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* Lodret skillelinje mellem kolonner */
.hstv-goal-col:not(:last-child) {
    border-right: 2px solid #eee; /* Meget lys skilnelinje */
}

.hstv-goal-col > div {
    width: 100%;
}

.hstv-goal-icon {
    font-size: 3vw;
    margin-bottom: 15px;
    color: #618172; /* SUCCESS/SOFISTIKERET: Ikonet */
}

.hstv-goal-title {
    font-size: 2vw !important;
    font-weight: 600;
    color: #1c1c1c;
    margin: 0;
}
.hstv-goal-current {
    font-size: 3vw;
    font-weight: 700;
    color: #618172; /* SUCCESS/SOFISTIKERET: Hovedmål */
    line-height: 1.1;
}

/* Generel info linje (bruges i Annual Split og i Cards) */
.hstv-info-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0px 0;
    font-size: 1.2vw;
    border-bottom: 1px dashed #ddd; /* Lysere skilnelinje */
}
.hstv-info-line:last-child {
    border-bottom: none;
}
.hstv-info-label {
    color: #b8aa87; /* Sekundær Tekst */
    font-weight: 400;
}
.hstv-info-value {
    color: #1c1c1c; /* Mørk Værdi */
    font-weight: 600;
}

/* Split Annual Revenue - specifik styling i 2. kolonne */
.hstv-annual-splits {
    width: 100%;
    margin-top: 0px !important;
    padding-top: 15px;
    border-top: 1px solid #eee; /* Lysere skilnelinje */
}

/* Pipeline Værdier - specifik styling i 3. kolonne */
.hstv-pipeline-metrics {
    width: 100%;
    margin-top: 10px;
}
.hstv-pipeline-line-large {
    flex-direction: column;
    align-items: flex-start;
    padding: 0px 0;
    border-bottom: 2px solid #eee; /* Lysere skilnelinje */
}
.hstv-pipeline-line-large .hstv-info-label {
    font-size: 1.2vw;
    color: #b8aa87; /* Sekundær Tekst */
    margin-bottom: 5px;
}
.hstv-pipeline-line-large .hstv-info-value {
    font-size: 2.5vw;
    font-weight: 700;
    color: #618172; /* SUCCESS/SOFISTIKERET: Pipeline Værdi */
    line-height: 1;
}

.hstv-sales-revenue {
    font-family: monospace;
}
.hstv-goal-target {
    font-size: 1.2vw;
    color: #b8aa87; /* Sekundær Tekst */
    margin-top: 5px;
}
.hstv-today-revenue {
    color: #e7651b; /* STRÆK ACCENT: Revenue for I dag */
}

/* Progress Bar */
.hstv-progress-bar {
    background-color: #ddd; /* Lys baggrund for bar */
    height: 15px;
    border-radius: 8px;
    margin-top: 15px;
    overflow: hidden;
    width: 100%;
    max-width: 500px;
}
.hstv-progress-fill {
    height: 100%;
    background-color: #618172; /* SUCCESS/SOFISTIKERET: Progress bar */
    transition: width 0.5s ease-in-out;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    position: relative;
}
.hstv-progress-text {
    color: #f4f2ec; /* Lys tekst inde i bar */
    font-weight: 600;
    font-size: 12px;
    padding-right: 8px;
    position: absolute;
    right: 0;
    line-height: 15px;
}
/* If progress is low, move text outside */
.hstv-progress-fill[style*="width: 0%"] .hstv-progress-text,
.hstv-progress-fill[style*="width: 1%"] .hstv-progress-text,
.hstv-progress-fill[style*="width: 2%"] .hstv-progress-text,
.hstv-progress-fill[style*="width: 3%"] .hstv-progress-text,
.hstv-progress-fill[style*="width: 4%"] .hstv-progress-text,
.hstv-progress-fill[style*="width: 5%"] .hstv-progress-text {
    color: #b8aa87; /* Sekundær Tekst */
    right: -35px;
}
.hstv-progress-fill[style*="width: 100%"] {
    background-color: #4a6858; /* Mørkere Succes Farve */
}

/* Card Section Grid Layout */
.hstv-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    flex-grow: 1;
}

/* Card */
.hstv-card {
    background-color: #ffffff; /* LYS: Kort baggrund */
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Let skygge */
    display: flex;
    flex-direction: column;
}
.hstv-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee; /* Lysere skilnelinje */
    padding-bottom: 10px;
}
.hstv-card-icon {
    font-size: 30px;
    line-height: 1;
    color: #1c1c1c; /* Mørk ikonfarve */
}
.hstv-card h3 {
    font-size: 1.5vw;
    font-weight: 600;
    margin: 0;
    color: #1c1c1c; /* Mørk titel */
}
.hstv-card-info.hstv-top-performers {
    display: none;
}
/* Card Metrics (3 metrics i top af kortene) */
.hstv-card-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
    text-align: center;
}
.hstv-metric {
    border-right: 1px dashed #ddd; /* Lys skilnelinje */
    padding: 0 5px;
}
.hstv-metric:last-child {
    border-right: none;
}
.hstv-metric-value {
    font-size: 32px;
    font-weight: 700;
    color: #1c1c1c; /* Mørk standard værdi */
    line-height: 1.1;
}
.hstv-metric-label {
    font-size: 14px;
    color: #b8aa87; /* Sekundær Tekst */
    font-weight: 400;
    display: block;
    margin-top: 5px;
}

/* Card Info (bund info linjer i kortene) */
.hstv-card-info {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #eee; /* Lys skilnelinje */
}
.hstv-card-sales .hstv-metric-value {
    color: #618172; /* SOFISTIKERET HIGHLIGHT: Salg */
}
.hstv-card-webdev .hstv-metric-value {
    color: #e7651b; /* ACCENT: Webdev */
}
.hstv-card-support .hstv-metric-value {
    color: #618172; /* SOFISTIKERET HIGHLIGHT: Support */
}

/* Footer */
.hstv-footer {
    padding-top: 15px;
    border-top: 1px solid #ddd; /* Lysere skilnelinje */
    text-align: center;
    font-size: 16px;
    color: #b8aa87; /* Sekundær Farve */
}

/* --- Media Queries for TV Optimization --- */

/* Large Screens (Typical TV) */
@media (min-width: 1920px) {
    .hstv-dashboard {
        padding: 50px;
        gap: 30px;
    }
    .hstv-logo h1 {
        font-size: 60px;
    }
    .hstv-subtitle {
        font-size: 28px;
    }
    .hstv-time {
        font-size: 80px;
    }
    .hstv-date {
        font-size: 32px;
    }
    .hstv-main-goal {
        padding: 40px;
    }
    
    .hstv-goal-icon {
        font-size: 80px;
    }
    .hstv-goal-title {
        font-size: 36px;
    }
    .hstv-goal-current {
        font-size: 84px;
    }
    .hstv-goal-target {
        font-size: 24px;
    }
    .hstv-pipeline-line-large .hstv-info-value {
        font-size: 64px;
    }
    .hstv-card {
        padding: 35px;
    }
    .hstv-card h3 {
        font-size: 30px;
    }
    .hstv-metric-value {
        font-size: 40px;
    }
    .hstv-metric-label {
        font-size: 16px;
    }
    .hstv-info-line {
        font-size: 22px;
    }
}


/* =============================================================================
   Header Layout Fix (Ikon + Titel side om side) - Implementering
   ============================================================================= */

/* 1. HOVEDMÅLSSEKTION (HSTV-MAIN-GOAL) */

/* Flexbox for Ikon og Titel (hstv-goal-icon side om side med hstv-goal-title) */
.hstv-goal-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px; /* Adskiller fra metrics i .hstv-goal-body */
}

/* Justering af ikon for at understøtte side-om-side layout */
.hstv-goal-icon {
    font-size: 50px; /* Fast pixelstørrelse for mindre kort */
    margin-right: 20px;
    margin-bottom: 0; /* Fjern tidligere margin-bottom */
    line-height: 1;
}

/* Justering af titel */
.hstv-goal-title {
    font-size: 32px !important; /* Fast pixelstørrelse for mindre kort */
    margin: 0; /* Sikrer ingen vertikal margin */
    flex-grow: 1;
}

/* Reducer hovedmetrics for at gøre kortene mindre høje */
.hstv-goal-current {
    font-size: 44px; /* Reduceret fra 3vw/84px */
    margin-bottom: 5px;
}

.hstv-goal-target {
    font-size: 18px; /* Reduceret fra 1.2vw/24px */
    margin-top: 5px; /* Sikrer placering under .hstv-goal-current */
    margin-bottom: 10px;
}


/* 2. KORT SEKTION (HSTV-CARDS) */

/* Reducer standard kort padding for at gøre kortene lavere */
.hstv-card {
    padding: 20px; 
}

/* Justering af Header for almindelige kort (sikrer vertikal centrering) */
.hstv-card-header {
    margin-bottom: 15px; /* Reduceret fra 20px */
    padding-bottom: 8px; /* Reduceret fra 10px */
}

/* Justering af ikonstørrelse for almindelige kort */
.hstv-card-icon {
    font-size: 36px; /* Øget fra 30px */
    margin-right: 15px;
}

/* Justering af titelstørrelse for almindelige kort */
.hstv-card h3 {
    font-size: 28px; /* Fast pixelstørrelse for mindre kort */
}

/* Media Query justeringer for TV-skærm (1920px) */
@media (min-width: 1920px) {
    /* Hovedmålssektion */
    .hstv-main-goal {
        padding: 30px 40px; /* Reducer padding */
    }
    .hstv-goal-icon {
        font-size: 80px; /* Tilbage til den store ikonstørrelse for TV */
        margin-right: 30px;
    }
    .hstv-goal-title {
        font-size: 50px !important; /* Større titel på TV */
    }
    .hstv-goal-current {
        font-size: 84px; /* Standard TV-størrelse */
    }
    .hstv-goal-target {
        font-size: 24px; /* Standard TV-størrelse */
    }
    
    /* Kort Sektion */
    .hstv-card {
        padding: 30px; /* Reduceret fra 35px */
    }
    .hstv-card-icon {
        font-size: 45px;
    }
    .hstv-card h3 {
        font-size: 36px;
    }
}