:root{ --brand:#279C9B; --brandDark:#097678; --bg:#f7faf9; --card:#ffffff; --muted:#6b7280; --border:#e5e7eb; }
*{ box-sizing:border-box; }
html,body{ margin:0; padding:0; font-family:system-ui, -apple-system, Segoe UI, Roboto, Inter, sans-serif; background:var(--bg); color:#111; }
.container{ max-width:820px; margin:0 auto; padding:12px; }
.card{ background:var(--card); border:1px solid var(--border); border-radius:16px; padding:12px; margin:12px auto; }
.h1{ font-size:22px; font-weight:700; margin:8px 0 12px; }
.h2{ font-size:18px; font-weight:700; margin:6px 0 8px; }
.row{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }
@media(min-width:740px){ .row{ grid-template-columns:1fr 1fr 1fr; } }
label{ font-size:13px; color:var(--muted); display:block; margin:6px 0 4px; }
input,select,button{ width:100%; padding:12px; border-radius:12px; border:1px solid var(--border); font-size:16px; }
button.primary{ background:var(--brand); color:#fff; border-color:var(--brand); font-weight:600; width: fit-content; }
button.secondary{ background:#cce7db; color:var(--brandDark); border-color:#cce7db; font-weight:600; }
.button.icon-btn, button.icon-btn{ width:auto; min-width:0; padding:6px 10px; display:inline-flex; align-items:center; justify-content:center; }
.button.icon-btn span, button.icon-btn span{ font-size:16px; line-height:1; }

.table{ width:100%; border-collapse:collapse; }
.table th,.table td{ padding:10px; border-bottom:1px solid var(--border); text-align:left; font-size:14px; }
.kpis{ display:grid; grid-template-columns:repeat(2,1fr); gap:10px; }
.kpi{ background:#fff; border:1px solid var(--border); border-radius:14px; padding:12px; }
.kpi .lbl{ color:var(--muted); font-size:12px; }
.kpi .val{ font-size:22px; font-weight:800; }
.flex{ display:flex; gap:8px; align-items:center; }
.bottombar{ position:sticky; bottom:0; background:var(--card); border-top:1px solid var(--border); padding:10px; display:flex; gap:10px; }

/* Big mobile counters */
.counter{ display:grid; grid-template-columns:120px 1fr; gap:10px; align-items:center; }
.counter .big{ padding:24px; font-size:26px; font-weight:800; border-radius:16px; }
.counter .grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:6px; }
.counter .grid button{ padding:12px; font-weight:700; }
.link{ color:var(--brandDark); text-decoration:underline; }
.muted{ color:var(--muted); font-size:12px; }

/*** jagt_list ***/
.pagehead{ display:flex; justify-content:space-between; align-items:center; margin:8px 0 6px; }
.pagehead .h1 {margin: 0; font-size: 22px; font-weight: 700;}
.modal{ position:fixed; inset:0; background:rgba(0,0,0,.45); display:none; padding:16px; z-index:50; }
.modal.open{ display:block; }
.modal .dialog{ background:#fff; border-radius:16px; max-width:720px; margin:40px auto; padding:12px; border:1px solid var(--border); }
.modal .modal-head{ display:flex; justify-content:space-between; align-items:center; border-bottom:1px solid var(--border); margin:-12px -12px 12px; padding:12px; }
.modal .title{ font-weight:700; font-size:18px; }
.modal .icon.close{ width:auto; padding:6px 10px; }

@media(max-width:760px){
  .modal .dialog{ margin:0; height:100%; border-radius:0; display:flex; flex-direction:column; }
  .modal .modal-body{ flex:1; overflow:auto; }
}

/* Dashboard: filter i �n linje m. knap til h�jre */
.inline-filter .row{
  grid-template-columns: 1fr 1fr auto;
  align-items: end; /* bunden af felter og knap flugter */
  gap: 10px;
}
.inline-filter .btn-cell{
  display: flex;
  justify-content: flex-end;
}

/* Sm� sk�rme: knappen l�gger sig i kolonne 2 p� r�kke 2 og st�r stadig til h�jre */
@media (max-width: 739px){
  .inline-filter .row{ grid-template-columns: 1fr 1fr; }
  .inline-filter .btn-cell{ grid-column: 2 / 3; justify-content: flex-end; }
}

/* Klikbar r�kke */
.table-click tbody tr{ cursor:pointer; }
.table-click tbody tr:hover{ background:#f8faf9; }

/* Mobil-venlig tabel: fold ud i kort pr. r�kke */
@media (max-width: 739px){
  .table.responsive thead{ display:none; }
  .table.responsive tbody tr{
    display:block;
    border:1px solid var(--border);
    border-radius:12px;
    margin:10px 0;
    background:#fff;
  }
  .table.responsive tbody td{
    display:grid;
    grid-template-columns: 140px 1fr; /* label / v�rdi */
    gap:8px;
    padding:10px 12px;
    border-bottom:1px solid var(--border);
  }
  .table.responsive tbody td:last-child{ border-bottom:none; }
  .table.responsive tbody td::before{
    content: attr(data-label);
    font-weight:600;
    color: var(--muted);
  }
}

.checkgrid{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }
@media(max-width:739px){ .checkgrid{ grid-template-columns:1fr; } }
.checkgrid label{ display:flex; gap:8px; align-items:center; }
.divider{ border-top:1px solid var(--border); margin:10px 0; }

/* Accordion for s�ter */
.accordion{ display:grid; gap:10px; }
.acc-item{ border:1px solid var(--border); border-radius:12px; background:#fff; overflow:hidden; }
.acc-head{
  width:100%; text-align:left; display:flex; justify-content:space-between; align-items:center;
  gap:10px; padding:12px 14px; font-weight:600; background:#f9fafb; border:0; cursor:pointer;
}
.acc-head .meta{ color:var(--muted); font-weight:500; }
.acc-head .chev{ transition: transform .2s ease; }
.acc-item.open .acc-head .chev{ transform: rotate(180deg); }
.acc-body{ display:none; padding:10px; background:#fff; }
.acc-item.open .acc-body{ display:block; }

/* T�ller + knapper inline */
.actions-inline{ display:flex; align-items:end; }
.actions-inline .saveShots{ margin-left:8px; }


/* --- Mobil-app layout for jagt --- */
body{
  margin:0;
  padding:0;
  background:var(--bg);
}

.jagt-app-header{
  position:sticky;
  top:0;
  z-index:20;
  background:var(--brandDark);
  color:#fff;
  box-shadow:0 2px 6px rgba(0,0,0,0.18);
}

.jagt-app-header-inner{
  max-width:820px;
  margin:0 auto;
  padding:10px 14px;
  display:flex;
  align-items:center;
  gap:10px;
}

.jagt-app-logo img{
  width:30px;
  height:30px;
  border-radius:8px;
}

.jagt-app-title{
  font-size:18px;
  font-weight:700;
}

/* Main content wrapper */
.jagt-app-main{
  max-width:820px;
  margin:0 auto;
  padding:10px 12px 70px; /* plads til bottom nav */
}

/* Cards kan genbruge eksisterende .card */

/* Bottom navigation */
.jagt-bottom-nav{
  position:fixed;
  left:0;
  right:0;
  bottom:0;
  height:60px;
  background:#ffffff;
  border-top:1px solid var(--border);
  display:flex;
  justify-content:space-around;
  align-items:center;
  z-index:30;
}

.jagt-bottom-nav .nav-item{
  flex:1;
  text-align:center;
  text-decoration:none;
  color:var(--muted);
  font-size:11px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:2px;
}

.jagt-bottom-nav .nav-item .icon{
  font-size:18px;
}

.jagt-bottom-nav .nav-item.active{
  color:var(--brandDark);
  font-weight:600;
}

/* Kun mobil, skjul på bredere skærme */
@media (min-width: 900px){
  .jagt-bottom-nav{
    display:none;
  }
}

/* Jagt desktop header-nav (matcher Projekter-appens stil) */
.jagt-app-brand{
  display:flex;
  align-items:center;
  gap:10px;
}

.jagt-app-nav{
  margin-left:auto;
  display:flex;
  gap:16px;
  font-size:14px;
}

.jagt-app-nav-item{
  color:#ffffff;
  text-decoration:none;
  opacity:0.8;
  font-weight:500;
}

.jagt-app-nav-item:hover{
  opacity:1;
}

.jagt-app-nav-item.active{
  opacity:1;
  font-weight:700;
  text-decoration:underline;
}

/* Skjul header-menu på mobil – brug kun desktop */
@media (max-width: 899px){
  .jagt-app-nav{
    display:none;
  }
}
/* Skjul header-menu på mobil */
@media (max-width: 768px) {
  header .nav,
  header nav,
  .kndev_header,
  .topmenu {
    display: none !important;
  }
}



/* Generelt: skjul elementer på mobil */
@media (max-width: 739px){
  .hide-mob{
    display:none !important;
  }
  /* Jagt-liste som kort på mobil */
  .table.responsive tbody tr{
    display:block;
    margin:8px 0;
    padding:10px;
    border-radius:12px;
    border:1px solid var(--border);
    background:#fff;
  }
  .table.responsive tbody tr td{
    display:flex;
    justify-content:space-between;
    gap:6px;
    border-bottom:none;
    padding:4px 0;
  }
  .table.responsive tbody tr td::before{
    content: attr(data-label);
    font-size:12px;
    color:var(--muted);
  }
}

/* Jagt_show: counters og kills i én kolonne på tværs */
.row.counters{
  grid-template-columns: 1fr;
}
.killsForm .row{
  grid-template-columns: 1fr;
}
.killsForm .bottombar{
  border-top:none;
}


/* Jagt_show meta-linje under område/sæson */
.meta-row{
  margin:6px 0 12px;
  display:flex;
  justify-content:space-between;
  gap:8px;
}
.meta-row .muted{
  font-size:13px;
}

/* KPI-grid med 4 bokse */
.kpis.kpis-4{
  display:grid;
  grid-template-columns:repeat(2, minmax(0,1fr));
  gap:10px;
}
@media (max-width: 739px){
  .kpis.kpis-4{
    grid-template-columns:1fr;
  }
}

/* Skudtæller: Tæl, input og Gem skud på hver sin linje */
.row.counters{
  display:grid;
  grid-template-columns:1fr;
  gap:8px;
}
.row.counters .counter{
  display:flex;
  flex-direction:column;
  gap:6px;
}
.row.counters .counter .big,
.row.counters .counter .val{
  width:100%;
}
.row.counters .actions-inline{
  display:block;
}
.row.counters .actions-inline .saveShots{
  width:100%;
}

/* Såt-header: meta-tekst og tal som KPI-stil */
.acc-head .meta{
  font-size:13px;
  color:var(--muted);
}
.acc-head .meta strong{
  font-size:15px;
  font-weight:800;
}

/* Nedlagte – Anden art linje: art fylder resten, antal smalt felt */
.killsForm .row.kills-other{
  display:grid;
  grid-template-columns:minmax(0,1fr) 90px;
  gap:8px;
  align-items:end;
}
.killsForm .row.kills-other input[type="number"]{
  max-width:100%;
}

/* Tilføj såt-række */
.add-saat-row{
  align-items:flex-end;
}
.add-saat-actions{
  display:flex;
  align-items:flex-end;
}
.add-saat-actions button{
  width:100%;
}

/* Såt-accordion baggrund lidt lysere */
.acc-item{
  margin-bottom:8px;
}
.acc-body{
  background:#fdfdfd;
}

.area-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.area-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #ddd;
}

.area-name {
  font-size: 16px;
}

.area-tools {
  display: flex;
  gap: 10px;
}

.icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  padding: 2px 4px;
}

.icon-btn:hover {
  opacity: 0.6;
}

.icon-edit,
.icon-add,
.icon-delete {
    background: none;
    border: none;
    padding: 0;
    font-size: 30px;
    line-height: 1;
    margin-left: 12px;
    cursor: pointer;
    color: var(--brandDark);
  max-width: fit-content;
}
.icon-edit:hover,
.icon-add:hover,
.icon-delete:hover {
  opacity: 0.7;
}
.icon-edit:active,
.icon-add:active,
.icon-delete:active {
    opacity: 0.6;
}
/* Ens font på date input */
.input-date {
  font-family: inherit;
  font-size: 16px;
  color: #333;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background-color: #fff;
}

/* Tilføj såt – layout */
.add-saat-row {
  display: flex;
  align-items: flex-end;   /* label + input + ikon på linje */
  gap: 12px;
  margin-top: 8px;
}

/* Første kolonne (label + select) fylder resten */
.add-saat-row > div:first-child {
  flex: 1;
}

/* Label + select i første kolonne i kolonne-layout */
.add-saat-row > div:first-child label {
  display: block;
  margin-bottom: 4px;
}

/* Anden kolonne (ikon) */
.add-saat-actions {
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

/* Selve + ikonet */
.icon-add {
  font-size: 22px;
  background: none;
  border: none;
  cursor: pointer;
  color: #0b6a64; /* samme grøn som resten */
  padding: 4px 6px;
  line-height: 1;
}

.icon-add:active {
  opacity: .6;
}


/* Simple list styling for Indstillinger */
.simple-list {
  list-style: none;
  padding-left: 0;
  margin: 0.5rem 0;
}
.simple-list li {
  padding: 0.25rem 0;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.simple-list li:last-child {
  border-bottom: none;
}


/* Indstillinger – tabs og tabeller */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1rem 0;
}
.tabs .tab-item {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.1);
  text-decoration: none;
  font-size: 0.9rem;
}
.tabs .tab-item.is-active {
  background: #097678;
  color: #fff;
  border-color: #097678;
}

.simple-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 0.5rem;
}
.simple-table th,
.simple-table td {
  padding: 0.35rem 0.5rem;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  text-align: left;
  font-size: 0.9rem;
}
.simple-table th {
  font-weight: 600;
}

.inline-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0.5rem 0 1rem 0;
}
.inline-form label {
  font-size: 0.9rem;
}
.inline-form select,
.inline-form button {
  font-size: 0.9rem;
  padding: 0.25rem 0.5rem;
}
/* Modal layout */
.modal-small {
  max-width: 400px;
  margin: 40px auto;
}

.modal-content {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.modal-close {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
}

/* Icon buttons */
.icon-btn,
.modal-actions-icons button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 22px;
  padding: 6px 8px;
  line-height: 1;
}

.icon-btn:hover,
.modal-actions-icons button:hover {
  opacity: 0.6;
}

.modal-actions-icons {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 15px;
}
