*{box-sizing:border-box}html{font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:#f3f5f2;color:#17322f}body{margin:0}.top{background:#173b36;color:white;display:flex;justify-content:space-between;align-items:center;padding:18px max(20px,calc((100vw - 760px)/2));box-shadow:0 3px 15px #102a2530}.brand{display:flex;align-items:center;gap:12px;font-size:16px;font-weight:850;line-height:1.06;letter-spacing:1.5px}.brand small{font-size:10px;letter-spacing:2.5px;color:#b8d4c5}.brand-icon{font-size:40px;color:#e5bb67}.logout{color:white;text-decoration:none;font-size:14px}main{max-width:760px;margin:auto;padding:24px 18px 50px}h1{font-size:clamp(27px,6vw,38px);letter-spacing:-.7px;margin:14px 0}h2{margin:0 0 16px;font-size:20px}.lead{font-size:17px;color:#56645e;margin:0 0 25px}.card,.tile{background:white;border-radius:18px;padding:22px;margin:16px 0;box-shadow:0 3px 18px #1c383009;border:1px solid #e5eae5}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.tile{margin:0;min-height:125px;display:flex;flex-direction:column;gap:12px;text-decoration:none;color:#193a34}.tile b{font-size:19px}.tile span{font-size:14px;color:#5f7069}.tile.muted{opacity:.58}label{display:block;font-weight:650;font-size:14px;margin:16px 0 5px}input:not([type=checkbox]),textarea,select{display:block;width:100%;padding:13px 12px;margin-top:7px;border:1px solid #cbd8d0;border-radius:10px;background:#fff;font:inherit;font-size:16px}button{border:0;border-radius:10px;background:#176c56;color:white;font:inherit;font-weight:750;padding:13px 20px;cursor:pointer;margin-top:12px}button.secondary{background:#e9efec;color:#214a3e}button.small{font-size:12px;padding:8px;margin:0}.check{display:flex;align-items:center;gap:10px}.meta,small{color:#66776f;font-size:12px}.bodytext{white-space:normal;line-height:1.55}.member{display:flex;justify-content:space-between;gap:10px;padding:12px 0;border-top:1px solid #e8ede8;align-items:center;overflow-wrap:anywhere}.error{background:#ffe7e7;color:#9b2929;padding:12px;border-radius:10px}.success{background:#e2f6e9;color:#17623c;padding:12px;border-radius:10px}a{color:#176c56}footer{text-align:center;color:#83918a;font-size:12px;margin-top:42px}@media(max-width:450px){.grid{grid-template-columns:1fr}.tile{min-height:90px}.top{padding:15px 18px}}

.button{display:inline-block;background:#176c56;color:white;text-decoration:none;border-radius:10px;padding:12px 17px;font-weight:700;margin:8px 0}.qr{background:white;padding:15px;width:max-content;max-width:100%;margin:20px auto}.table-scroll{overflow-x:auto}table{border-collapse:collapse;font-size:13px;white-space:nowrap}th,td{border-bottom:1px solid #ddd;padding:9px;text-align:left}thead th{background:#e9efec}table td:first-child,table th:first-child{position:sticky;left:0;background:white} @media print{header,.logout,button,form,footer{display:none!important}main{padding:0}.card{box-shadow:none}}
/* Version 15: responsive attendance report, scoped to report only */
body:has(.attendance-report) main{max-width:1480px;width:100%;padding-left:clamp(12px,2vw,32px);padding-right:clamp(12px,2vw,32px)}
.attendance-report .report-filter{display:flex;align-items:end;gap:12px;flex-wrap:wrap}
.attendance-report .report-filter label{max-width:280px;flex:1 1 220px}
.attendance-report .report-filter button{margin-bottom:1px}
.attendance-report .report-desktop{width:100%}
.attendance-report .report-table{width:100%;table-layout:fixed;white-space:normal;font-size:clamp(10px,.83vw,13px)}
.attendance-report .report-table th,.attendance-report .report-table td{padding:9px 3px;text-align:center;overflow-wrap:anywhere}
.attendance-report .report-table th:first-child{width:22%;text-align:left;padding-left:8px;position:static}
.attendance-report .report-table th:last-child,.attendance-report .report-table td:last-child{width:5%}
.attendance-report .report-table tbody th{font-weight:500;background:#fff}
.attendance-report .current-month{background:#e0f3e8!important;color:#0e573d;font-weight:750}
.attendance-report .total-cell{font-weight:800}
.attendance-report .report-mobile{display:none}
.attendance-report [hidden]{display:none!important}
@media(max-width:800px){
 .attendance-report .report-desktop{display:none}
 .attendance-report .report-mobile{display:block}
 .attendance-report .member-card{border:1px solid #e1e8e2;border-radius:12px;margin:9px 0;overflow:hidden;background:#fff}
 .attendance-report .member-card summary{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:14px;cursor:pointer;font-size:14px;list-style:none}
 .attendance-report .member-card summary::-webkit-details-marker{display:none}
 .attendance-report .member-card summary:after{content:'▾';color:#176c56}
 .attendance-report .member-card[open] summary:after{content:'▴'}
 .attendance-report .member-card summary strong{margin-left:auto;white-space:nowrap;font-size:12px;color:#176c56}
 .attendance-report .month-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px;padding:0 12px 10px}
 .attendance-report .month-cell{background:#f2f5f2;border-radius:8px;padding:10px 3px;text-align:center;display:flex;flex-direction:column;gap:6px}
 .attendance-report .month-cell span{font-size:11px;color:#53665e}
 .attendance-report .member-card p{padding:0 14px 8px}
}

/* Version 16 – separate layouts without shrinking the whole page */
html,body{max-width:100%;overflow-x:clip}
body:has(.attendance-report) main{max-width:1500px;width:100%;min-width:0}
.attendance-report,.attendance-report .card{min-width:0}
.attendance-report .report-desktop{min-width:0;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch}
.attendance-report .report-table{width:100%;min-width:960px;table-layout:auto;font-size:13px;white-space:nowrap}
.attendance-report .report-table th,.attendance-report .report-table td{padding:9px 6px;overflow-wrap:normal}
.attendance-report .report-table th:first-child{width:auto;min-width:205px;position:sticky;left:0;z-index:2;background:white;text-align:left;box-shadow:1px 0 #e1e8e2}
.attendance-report .report-table thead th:first-child{background:#e9efec;z-index:4}
.attendance-report .report-table th:last-child,.attendance-report .report-table td:last-child{width:auto;min-width:55px;position:sticky;right:0;background:#f1f5f2;z-index:2;box-shadow:-1px 0 #d6e2d9}
.attendance-report .report-table thead th:last-child{z-index:4;background:#e9efec}
.attendance-report .report-table tbody th{background:white}
@media (min-width:1050px){
 .attendance-report .report-table{min-width:0;table-layout:fixed;font-size:clamp(11px,.88vw,14px)}
 .attendance-report .report-table th:first-child{width:24%;min-width:0;white-space:normal;overflow-wrap:break-word}
 .attendance-report .report-table th,.attendance-report .report-table td{padding:9px 3px}
}
/* iPhone and iPad portrait: readable cards */
@media (max-width:800px) and (orientation:portrait){
 .attendance-report .report-desktop{display:none}
 .attendance-report .report-mobile{display:block}
}
/* iPhone/iPad landscape: full-width table, scroll months only */
@media (orientation:landscape) and (max-width:1100px){
 .attendance-report .report-desktop{display:block;width:100%}
 .attendance-report .report-mobile{display:none}
 .attendance-report .report-table{min-width:960px}
 .attendance-report .card{padding:clamp(10px,2vw,22px)}
}

/* Version 17: mobile layout is cards on phones regardless of orientation. */
@media(max-width:699px){.attendance-report .report-desktop{display:none!important}.attendance-report .report-mobile{display:block!important}}

/* Bellahøj logo i topbaren */
.brand-logo{width:40px;height:40px;object-fit:contain;flex-shrink:0}
@media(max-width:450px){.brand-logo{width:40px;height:40px}}

/* v55: baneorienteret forside, første fem handlinger i venstre kolonne */
.range-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;align-items:start}
.range-column{display:flex;flex-direction:column;gap:12px;min-width:0}
.range-priority{border:2px solid #27735b;padding:21px}
@media(max-width:450px){.range-grid{grid-template-columns:1fr}}

/* v58: responsivt layout på alle appens sider. Kun præsentation. */
:root{--app-max-width:1600px}
main{width:100%;max-width:var(--app-max-width);padding:clamp(16px,2vw,36px);margin-inline:auto;min-width:0}
.top{padding:18px max(18px,calc((100vw - var(--app-max-width))/2 + 36px))}
main>*{min-width:0}
.card,.tile,.range-column,.range-tail{min-width:0}
.card{overflow-wrap:anywhere}
.range-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.range-tail{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:14px}
.range-tail>.tile{margin:0}
.range-column{gap:14px}
.table-scroll{max-width:100%;overflow-x:auto}
img,video,canvas{max-width:100%}
@media(min-width:1101px){
  .range-grid,.range-tail{gap:18px}
  .range-column{gap:18px}
}
@media(max-width:699px){
  main{padding:18px 14px 36px}
  .top{padding:14px 16px}
  .range-grid,.range-tail,.grid{grid-template-columns:minmax(0,1fr)}
  .tile{min-height:90px}
  .range-column,.range-grid,.range-tail{gap:12px}
  .card{padding:clamp(14px,4vw,22px)}
}
@media print{main{max-width:none;width:100%}}

/* v58.2: kompakte forsidefelter på computer; iPad og mobil uændret. */
@media (min-width:1101px) and (max-width:1499px) {
  body:has(.range-grid) .range-grid {grid-template-columns:repeat(3,minmax(0,1fr));}
  body:has(.range-grid) .range-grid>.range-column {display:contents;}
  body:has(.range-grid) .range-tail {grid-template-columns:repeat(3,minmax(0,1fr));}
}
@media (min-width:1500px) {
  body:has(.range-grid) .range-grid {grid-template-columns:repeat(4,minmax(0,1fr));}
  body:has(.range-grid) .range-grid>.range-column {display:contents;}
  body:has(.range-grid) .range-tail {grid-template-columns:repeat(4,minmax(0,1fr));}
}

/* v58.3: opslagstavlen på iPad – billeder fylder opslagets bredde.
   Kun nyhedssiden rammes; iPhone og computer beholder deres layout. */
@media (min-width:700px) and (max-width:1100px) {
  main:has(> article.card .bodytext) {
    width:100%;
    max-width:none;
    padding-inline:clamp(12px,2vw,24px);
  }
  main:has(> article.card .bodytext) > article.card {
    width:100%;
    max-width:none;
  }
  main:has(> article.card .bodytext) > article.card > a:has(> img) {
    display:block;
    width:100%;
  }
  main:has(> article.card .bodytext) > article.card > a > img {
    display:block;
    width:100%;
    max-width:100%;
    max-height:none !important;
    height:auto;
    object-fit:contain;
  }
}

/* Version 64: medlems-/administratorvisning på forsiden */
.overview-heading{display:flex;align-items:center;justify-content:space-between;gap:12px}.overview-heading h1{min-width:0}.view-switch-wrap{display:inline-flex;align-items:center;gap:8px;margin:0;white-space:nowrap;cursor:pointer;font-size:13px;color:#173b36}.view-switch-wrap input{position:absolute;opacity:0;width:1px;height:1px}.view-switch-track{width:46px;height:27px;border-radius:20px;background:#a8b2ae;position:relative;transition:background .15s;flex-shrink:0}.view-switch-track:after{content:"";position:absolute;width:21px;height:21px;top:3px;left:3px;background:white;border-radius:50%;box-shadow:0 1px 3px #0003;transition:transform .15s}.view-switch-wrap input:checked+.view-switch-track{background:#176c56}.view-switch-wrap input:checked+.view-switch-track:after{transform:translateX(19px)}.view-switch-wrap input:focus-visible+.view-switch-track{outline:3px solid #d6aa50;outline-offset:3px}

/* v66.4: Mobil- og tabletvenlige navigationsknapper. Desktop uændret. */
@media screen and (max-width:1100px) and (hover:none) {
  main > p.mobile-page-nav {
    display:flex; flex-wrap:wrap; align-items:stretch; gap:10px;
    margin:12px 0 18px; font-size:0; line-height:1.3;
  }
  main > p.mobile-page-nav > a {
    display:inline-flex; align-items:center; justify-content:center;
    min-height:48px; min-width:112px; max-width:100%;
    padding:11px 16px; border:1px solid #cbded5;
    border-radius:12px; background:#e8f1ec; color:#174d3e;
    font-size:16px; font-weight:750; text-align:center;
    text-decoration:none; overflow-wrap:anywhere;
    -webkit-tap-highlight-color:transparent; touch-action:manipulation;
  }
  main > p.mobile-page-nav > a:active {background:#cde4d8;}
  main > p.mobile-page-nav > a:focus-visible {outline:3px solid #d6aa50;outline-offset:2px;}
}
@media screen and (max-width:450px) and (hover:none) {
  main > p.mobile-page-nav > a {flex:1 1 auto;}
}

/* v68.5: iPad/tablet – fordel kortene rækkevis i stedet for at
   fastholde to kolonner med forskellig højde. Desktop er uændret. */
@media (min-width:700px) and (max-width:1100px) {
  body:has(.range-grid) .range-grid > .range-column {
    display: contents;
  }
}

/* v69: ensartet flydende kortlayout på alle skærme */
body:has(.range-grid) .range-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:stretch}
body:has(.range-grid) .range-grid>.range-column,
body:has(.range-grid) .range-tail{display:contents}
body:has(.range-grid) .range-grid .tile{margin:0;min-width:0}
@media(max-width:699px){body:has(.range-grid) .range-grid{grid-template-columns:minmax(0,1fr)}}
@media(min-width:1101px) and (max-width:1499px){body:has(.range-grid) .range-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(min-width:1500px){body:has(.range-grid) .range-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
