/* ==========================================================================
   BMT UNIVERSAL CSS - CENTRAL STYRING
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Caveat&display=swap');

:root {
    --bg-body: #e9ecef;
    --bg-fremviser: #f7f7f5;
    --bg-card: #ffffff;
    --bmt-dark: #455a64;     /* Primær mørk / overskrifter / burgerbolle */
    --bmt-light: #78909c;    /* Sekundær / labels */
    --bmt-blue: #2e3192;     /* Accent blå (KUN hvor specifikt bedt om det) */
    --bmt-pink: #d01d77;     /* Accent pink */
    --border-color: #cfd8dc;
    --danger: #dc3545;
    --font-main: 'Segoe UI', Arial, sans-serif;
    --font-skret: 'Caveat', cursive;
}

body { 
    font-family: var(--font-main); 
    background: var(--bg-body); 
    margin: 0; 
    padding: 15px 5px; 
    color: #333; 
    line-height: 1.5; 
}

/* Specifik body-klasse til fremviser/reference design for at undgå at ændre Admin layout */
.viewer-body {
    background: var(--bg-fremviser) radial-gradient(#e8e8e8 1px, transparent 1px); 
    background-size: 20px 20px;
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: flex-start; 
    min-height: 100vh; 
    box-sizing: border-box;
}

/* Layout Containere */
.journal-container { max-width: 900px; margin: auto; padding-bottom: 20px; }
.presentation-container { max-width: 1000px; margin: 30px auto; }

/* ==========================================================================
   REFERENCE DESIGN (FREMVISER / ØVELSER)
   ========================================================================== */
.floating-card { 
    background: linear-gradient(to bottom, var(--border-color) 0px, var(--border-color) 25px, var(--bg-card) 25px, var(--bg-card) 100%); 
    width: 100%; 
    max-width: 800px; /* Opdateret data */
    border-radius: 12px; 
    padding: 5px; 
    box-shadow: 15px 15px 30px rgba(0,0,0,.4); 
    box-sizing: border-box; 
    margin: 0 auto; 
}

.inner-frame { 
    background: linear-gradient(to bottom right, #fdfdfd, #e0e0e0); 
    border-radius: 8px; 
    overflow: hidden; 
    box-shadow: 6px 6px 15px rgba(0,0,0,.15); 
    position: relative; 
}

.inner-frame-hat { height: 20px; background: var(--border-color); width: 100%; position: absolute; top: 0; left: 0; z-index: 5; }
.vertical-line { position: absolute; right: 8px; top: 35px; bottom: 15px; width: 2px; background: #3a3a3a; z-index: 10; }
.inner-frame-content { padding: 15px; padding-top: 30px; position: relative; z-index: 20; }

.header-box { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; gap: 10px; flex-wrap: nowrap; }
.header-box h3 { 
    color: #2c3e50; 
    font-size: 26px; /* Din originale størrelse */
    font-weight: 800; 
    margin: 0; 
    letter-spacing: -.5px; 
    line-height: 1.1; 
    white-space: nowrap; 
    /* overflow og text-overflow er fjernet */
}
.header-box img { width: 65px; height: auto; display: block; mix-blend-mode: multiply; filter: contrast(1.1) brightness(0.95); border-radius: 4px; }

/* Fælles Dash-Struktur & Øvelser */
.ydre-ramme { background: #f4f6f8; border-radius: 16px; box-shadow: 0 4px 15px rgba(0,0,0,0.08); border: 1px solid var(--border-color); margin-bottom: 15px; overflow: hidden; }
.ydre-ramme-header { background: var(--bmt-dark); color: #ffffff; font-size: 18px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; text-align: center; padding: 12px 15px; }
.ydre-ramme-indhold { padding: 8px; }

.entry-block { margin-bottom: 8px; border-radius: 6px; box-shadow: 2px 2px 8px rgba(0,0,0,.06); background: var(--bg-card); border: 1px solid var(--border-color); overflow: hidden; }
.section-header { background: var(--bmt-dark); color: white; padding: 6px 12px; font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; display: flex; justify-content: space-between; align-items: center; }
.sags-container { padding: 10px; background: #fdfdfd; box-shadow: inset 3px 3px 6px rgba(0,0,0,.01); text-align: center; }

.ovelse-img { max-width: 100%; max-height: 38vh; object-fit: contain; border-radius: 6px; box-shadow: 0 2px 6px rgba(0,0,0,0.1); border: 1px solid var(--border-color); margin-bottom: 8px; }
.ovelse-tekst { font-size: 13px; line-height: 1.4; text-align: left; color: #2c3e50; padding: 10px; background: var(--bg-card); border: 1px solid #edf2f7; border-radius: 6px; box-shadow: 2px 2px 4px rgba(0,0,0,0.02); }
.ovelse-tekst strong { color: var(--bmt-dark); }

/* Formular elementer & Knapper */
.input-felt { width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: 8px; box-sizing: border-box; margin-bottom: 10px; font-size: 16px; font-family: inherit; }
.knap { width: 100%; background: var(--bmt-dark); color: white; padding: 15px; border: none; border-radius: 8px; font-weight: bold; font-size: 16px; cursor: pointer; text-transform: uppercase; }
.knap:hover { opacity: 0.9; }

.knap-gruppe { display: flex; gap: 6px; margin: 0; }
.knap-gruppe button { flex: 1; padding: 10px 4px; font-size: 11px; font-weight: bold; border-radius: 4px; border: none; cursor: pointer; color: white; text-transform: uppercase; box-shadow: 0 2px 4px rgba(0,0,0,0.1); transition: 0.2s; }
.btn-rec { background: #c62828; }
.btn-stop { background: var(--border-color); color: var(--bmt-dark) !important; }
.btn-loop { background: var(--bmt-dark); }

/* Hjælpe-klasser */
.label-cell { font-weight: bold; font-size: 10px; text-transform: uppercase; color: var(--bmt-light); margin-bottom: 4px; }
.fast { font-size: 11px; line-height: 1.3; font-family: -apple-system, sans-serif; }
.skret { font-family: var(--font-skret); font-size: 14px; color: var(--bmt-dark); line-height: 1.2; }
.data-tekst { font-size: 12px; font-weight: 500; }

/* SKYDERE (SLIDERS) - TVUNGEN FARVESTYRING */
.mixer-item { display: flex; align-items: center; margin-bottom: 12px; gap: 15px; }
.mixer-item label { flex: 0 0 100px; font-size: 11px; font-weight: bold; color: var(--bmt-dark); text-transform: uppercase; }

input[type=range] { -webkit-appearance: none; flex: 1; cursor: pointer; accent-color: var(--bmt-dark) !important; background: transparent; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; height: 20px; width: 20px; border-radius: 50%; background: var(--bmt-dark) !important; margin-top: -6px; }
input[type=range]::-webkit-slider-runnable-track { width: 100%; height: 8px; background: var(--border-color); border-radius: 4px; }
input[type=range]::-moz-range-thumb { height: 20px; width: 20px; border-radius: 50%; background: var(--bmt-dark) !important; border: none; }

/* Status & Advarsler */
.rec-status, #recStatus { color: var(--danger); font-weight: bold; display: none; margin-bottom: 5px; font-size: 11px; text-align: center; animation: blink 1s infinite; background: #ffebee; padding: 4px; border-radius: 4px; border: 1px solid #ef5350; }
@keyframes blink { 50% { opacity: 0; } }

.footer-line { text-align: center; padding-top: 12px; margin-top: 15px; margin-bottom: 15px; border-top: 1px solid var(--border-color); color: var(--bmt-light); font-size: 11px; width: 100%; }

@media print { .no-print { display: none !important; } }

/* ==========================================================================
   ADMIN PANEL SPECIFIKT (KOMPAKT MOBIL DESIGN)
   ========================================================================== */
.admin-container { width: 100%; padding: 10px; max-width: 1000px; margin: auto; }

/* Top Nav */
.top-nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; background: #fff; padding: 4px 6px; border-radius: 8px; border: 1px solid #ddd; flex-wrap: nowrap; overflow-x: auto; gap: 4px; }
.top-nav img { height: 60px; border-radius: 4px; flex-shrink: 0; }
.top-links { display: flex; gap: 4px; flex-wrap: nowrap; justify-content: flex-end; align-items: center; margin-left: 5px; }
.reg-btn { text-decoration: none; background: var(--bmt-dark); color: white; padding: 6px 8px; border-radius: 4px; font-size: 9px; font-weight: bold; text-transform: uppercase; white-space: nowrap; margin: 0; }

/* Burgerbolle */
.ledige-burger { background: var(--bmt-dark); border-radius: 8px; margin-bottom: 10px; padding-bottom: 8px; overflow: hidden; }
.ledige-header { color: white; padding: 10px; cursor: pointer; font-weight: bold; font-size: 11px; text-align: center; text-transform: uppercase; border-bottom: 3px solid white; }
.collapsible-content { padding: 10px; display: none; background: #f8f9fa; border-bottom: 3px solid white; }

/* Tabeller */
.log-table { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 4px rgba(0,0,0,0.05); table-layout: fixed; }
.log-table th, .log-table td { padding: 6px 4px; border-bottom: 1px solid #eee; font-size: 10px; vertical-align: top; word-wrap: break-word; }
.log-table th { background: #eceff1; color: var(--bmt-dark); text-transform: uppercase; text-align: left; }
.month-header { background: var(--bmt-dark); color: white; font-weight: bold; padding: 6px; text-align: center; text-transform: uppercase; font-size: 11px; }

/* Input felter */
.klient-info-row { display: flex; align-items: center; gap: 2px; margin-bottom: 2px; }
.klient-info-row span.ikon { width: 14px; font-size: 11px; text-align: center; flex-shrink: 0; }
.name-input, .tlf-input, .id-input { width: 90px; height: 20px; border: 1px solid #ddd; padding: 2px 4px; border-radius: 3px; font-size: 10px; margin: 0; font-family: sans-serif; box-sizing: border-box; }
.id-input { background: #f4f4f4; color: #777; font-family: monospace; font-weight: bold; }
.gem-ikon { cursor: pointer; font-size: 14px; margin-left: 2px; }

/* Handlinger */
select.action-select { width: 100%; max-width: 120px; padding: 2px; font-size: 9px; border-radius: 3px; border: 1px solid #ccc; font-family: sans-serif; margin-bottom: 4px; height: 20px; }
select.action-select:focus { outline: 2px solid #ccc; box-shadow: none; }
.icon-row { display: flex; flex-wrap: nowrap !important; gap: 4px; align-items: center; white-space: nowrap; overflow: visible; }
.status-icon { font-size: 14px; cursor: pointer; display: inline-block; opacity: 0.2; margin: 0 2px; }
.status-icon.active { opacity: 1; }
.action-icon { font-size: 16px; cursor: pointer; text-decoration: none; margin: 0 1px; display: inline-block; }

/* Ledige tider boks */
.ledige-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-bottom: 15px; }
.ledig-boks { background: #fff; border: 1px solid #ddd; border-radius: 4px; padding: 6px 4px; display: flex; justify-content: space-between; align-items: center; font-size: 0.65rem; color: var(--bmt-dark); font-weight: bold; }
.slet-link { color: red; text-decoration: none; font-weight: bold; font-size: 0.8rem; }

/* ORIGINAL POP-UP */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 1000; justify-content: center; align-items: center; }
.modal-box { background: white; padding: 15px; border-radius: 8px; width: 90%; max-width: 400px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
.modal-box textarea { width: 100%; height: 100px; margin-top: 10px; margin-bottom: 10px; font-size: 12px; padding: 5px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; }
.modal-btn { background: #263238; color: white; border: none; padding: 10px; border-radius: 4px; cursor: pointer; width: 100%; font-weight: bold; }
.close-btn { background: #e0e0e0; color: #333; border: none; padding: 10px; border-radius: 4px; cursor: pointer; width: 100%; font-weight: bold; margin-top: 5px; }

/* ==========================================================================
   TILFØJEDE FÆLLESKLASSER FRA LOKALE DOKUMENTER
   ========================================================================== */
.master-nav { background: var(--bmt-dark); width: 100%; max-width: 800px; padding: 12px 20px; display: flex; justify-content: space-between; align-items: center; color: white; position: sticky; top:0; z-index:100; border-radius: 0 0 12px 12px; box-shadow: 0 4px 10px rgba(0,0,0,0.15); box-sizing: border-box; }
.master-nav select { padding: 4px 8px; border-radius: 4px; border: none; font-size: 12px; background: #ffffff; font-weight: bold; color: var(--bmt-dark); cursor: pointer; }
.dmi-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px solid #f0f0f0; }
.dmi-row:last-child { border-bottom: none; }
.dmi-label { flex: 1; font-size: 13px; color: #455a64; line-height: 1.2; text-align: left; }
.input-mini { width: 45px; text-align: center; padding: 4px; height: 30px; border: 1px solid #d1d9e0; border-radius: 4px; background: #f8f9fa; font-weight: bold; color: #2c3e50; }
.input-procent { width: 60px; text-align: center; padding: 4px; height: 30px; border: 1px solid #d1d9e0; border-radius: 4px; background: #f8f9fa; font-weight: bold; color: #2c3e50; }
.flex-row { display: flex; gap: 10px; width: 100%; }
.flex-col { flex: 1; }
.par-textarea { height: 100px; resize: vertical; }
.alert { background: #ffebee; color: #c62828; padding: 15px; border-radius: 6px; text-align: center; border: 1px solid #ef5350; font-weight: bold; margin-bottom: 15px; font-size: 13px; }
select.input-felt[multiple] { min-height: 120px; }
.svg-container { width: 100%; display: flex; justify-content: center; margin-bottom: 20px; margin-top: 10px; }
.help-text { font-size: 11px; color: #555; background: #fdfdfd; padding: 10px; border-radius: 4px; border-left: 3px solid #7f8c8d; margin-bottom: 15px; line-height: 1.4; font-style: italic; }
.sub-help { font-size: 10px; color: #7f8c8d; margin-bottom: 5px; line-height: 1.3; }
.btn-print-small { background: #888888; color: #ffffff; border: none; padding: 5px; cursor: pointer; font-size: 10px; border-radius: 3px; position: absolute; right: 15px; top: 50%; transform: translateY(-50%); }

/* Fælles print optimering */
@media print {
    html, body { height: auto !important; margin: 0 !important; padding: 0 !important; overflow: visible !important; }
    .master-nav, .btn-print-small, .help-text, .section-header, .footer-line, .inner-frame-hat, .vertical-line { display: none !important; }
    .floating-card { box-shadow: none !important; margin: 0 !important; padding: 0 !important; width: 100% !important; max-width: 100% !important; border: none !important; }
    .inner-frame { border: none !important; padding: 0 !important; margin: 0 !important; box-shadow: none !important; }
    .header-box { box-shadow: none !important; border: none !important; padding: 3px 0 !important; }
    .sags-container { margin: 0 !important; padding: 0 !important; }
    .svg-container { margin-bottom: 5px !important; margin-top: 5px !important; }
    textarea.input-felt { height: 65px !important; }
}