/* /aktivitetsbanken/assets/style.css
 *
 * Mål:
 * - Cirkulært/centreret kort som PraktikFlow-login
 * - Samme “mørk + cyan” udtryk
 * - CSS er navnerummet til ab-*, så vi ikke rammer andre styles
 */

:root{
  --ab-bg: #0b1220;
  --ab-text: rgba(255,255,255,0.92);
  --ab-muted: rgba(255,255,255,0.70);

  --ab-card: rgba(255,255,255,0.06);
  --ab-card-border: rgba(255,255,255,0.10);
  --ab-shadow: 0 18px 60px rgba(0,0,0,0.35);

  --ab-input-bg: #eaf2ff;
  --ab-input-text: #0b1220;

  --ab-accent: #23c6df;
  --ab-accent-strong: #18b6ce;

  --ab-danger-bg: rgba(239,68,68,0.14);
  --ab-danger-border: rgba(239,68,68,0.35);

  --ab-radius: 18px;
}

/* Reset/base */
*{ box-sizing: border-box; }
html, body{
  height: 100%;
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  background: radial-gradient(1000px 680px at 30% 20%, rgba(35,198,223,0.18), transparent 60%),
              radial-gradient(900px 600px at 80% 60%, rgba(24,182,206,0.12), transparent 55%),
              var(--ab-bg);
  color: var(--ab-text);
}

/* Page wrapper */
.ab-page{
  min-height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;          /* vigtig: gør center-layout stabilt */
  padding: 28px 16px;
}

/* Card */
.ab-card{
  width: 100%;
  max-width: 560px;
  background: var(--ab-card);
  border: 1px solid var(--ab-card-border);
  border-radius: var(--ab-radius);
  box-shadow: var(--ab-shadow);
  backdrop-filter: blur(10px);
  padding: 26px;
}

/* Header */
.ab-header{
  margin-bottom: 16px;
}
.ab-title{
  font-size: 2.15rem;
  font-weight: 800;
  letter-spacing: 0.2px;
  margin-bottom: 8px;
}
.ab-subtitle{
  color: var(--ab-muted);
  font-size: 1.0rem;
}

/* Brand row (logo + titel) */
.ab-brand{
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0; /* VIGTIGT: gør at tekst kan wrap i flex */
}
.ab-logo{
  width: 54px;
  height: 54px;
  border-radius: 14px;
  object-fit: cover;
  border: 1px solid rgba(255,255,255,0.14);
}

/* Alert */
.ab-alert{
  background: var(--ab-danger-bg);
  border: 1px solid var(--ab-danger-border);
  padding: 12px 12px;
  border-radius: 12px;
  margin: 14px 0 10px;
  font-size: 0.95rem;
}

/* Form */
.ab-form{
  margin-top: 14px;
}
.ab-field{
  margin-bottom: 14px;
}
.ab-field label{
  display: block;
  font-size: 0.95rem;
  color: var(--ab-muted);
  margin-bottom: 8px;
}

/* VIGTIGT: style både input og textarea ens */
.ab-field input,
.ab-field textarea{
  width: 100%;
  display: block;
  padding: 14px 14px;
  border-radius: 12px;
  border: 0;
  outline: none;
  background: var(--ab-input-bg);
  color: var(--ab-input-text);
  font-size: 1.05rem;     /* lidt større tekst */
  line-height: 1.4;
}

.ab-field input:focus,
.ab-field textarea:focus{
  box-shadow: 0 0 0 4px rgba(35,198,223,0.20);
}

/* Textarea: gør felterne mere brugbare */
.ab-field textarea{
  min-height: 120px;
  resize: vertical;
}

/* Password row */
.ab-password{
  position: relative;
}
.ab-password input{
  padding-right: 74px;
}
.ab-toggle{
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  border-radius: 10px;
  padding: 8px 10px;
  background: rgba(11,18,32,0.10);
  color: #0b1220;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.85rem;
}
.ab-toggle:hover{
  background: rgba(11,18,32,0.16);
}

/* Checkbox row */
.ab-row{
  margin: 10px 0 14px;
}
.ab-check{
  display: inline-flex;
  gap: 10px;
  align-items: center;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.78);
  user-select: none;
}
.ab-check input{
  width: 16px;
  height: 16px;
}

/* Primary button */
.ab-btn{
  width: auto;
  padding: 10px 18px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(90deg, var(--ab-accent), var(--ab-accent-strong));
  color: #04151a;
  font-weight: 800;
  cursor: pointer;
}
.ab-btn:hover{
  filter: brightness(1.03);
}

/* Links */
.ab-links{
  margin-top: 14px;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.75);
}
.ab-link{
  color: rgba(255,255,255,0.82);
  text-decoration: none;
}
.ab-link:hover{
  text-decoration: underline;
}
.ab-sep{
  margin: 0 8px;
  color: rgba(255,255,255,0.55);
}

/* Tabs (Afventer / Godkendte / Afviste) */
.ab-tabs {
  display: flex;
  gap: 14px;
  margin: 10px 0 14px;
}

.ab-tab {
  color: rgba(255,255,255,0.65);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}

.ab-tab:hover {
  color: #fff;
}

.ab-tab--active {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 6px;
}

/* Note */
.ab-note{
  margin-top: 16px;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.62);
  line-height: 1.35;
}

/* Topnav (Aktivitetsbanken) */
.ab-topnav{
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(10, 16, 28, 0.55);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.ab-topnav-inner{
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ab-brand-link{
  display: flex;
  gap: 10px;
  align-items: center;
  text-decoration: none;
  color: #fff;
  font-weight: 700;
}
.ab-topnav-logo{
  width: 28px;
  height: 28px;
  border-radius: 8px;
}
.ab-topnav-right{
  display: flex;
  gap: 14px;
  align-items: center;
}
.ab-navlink{
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
}
.ab-navlink:hover{ color: #fff; }
.ab-navlink-active{
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 6px;
}

/* Checkbox grid til types */
.ab-checkgrid{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin-top: 8px;
}

.ab-hr{
  border: none;
  height: 1px;
  background: rgba(255,255,255,0.08);
  margin: 14px 0;
}

/* Login-layout: helt centreret */
.ab-page--center{
  align-items: center;
}

/* App-layout: indhold starter oppe under topnav */
.ab-page--app{
  align-items: flex-start;
  padding-top: 96px; /* plads til sticky topnav */
}

@media (max-width: 720px){
  .ab-checkgrid{ grid-template-columns: 1fr; }
  .ab-topnav-right{ gap: 10px; }
}

/* Små skærme */
@media (max-width: 520px){
  .ab-title{ font-size: 1.8rem; }
  .ab-card{ padding: 20px; }
}

/* Mobil-fix: titel skal ikke “skubbe” layoutet skævt */
@media (max-width: 420px) {
  .ab-title {
    font-size: 28px;      /* justér evt. 26–30 */
    line-height: 1.05;
    letter-spacing: -0.5px;
  }
}

/* Header med actions */
.ab-header--with-actions{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
}

.ab-header-left{
  min-width:0;
}

.ab-header-actions{
  display:flex;
  gap:10px;
  align-items:center;
  flex-shrink:0;
}

/* Ikon-knapper */
.ab-icon-btn{
  width:42px;
  height:42px;
  border-radius:12px;
  display:inline-flex;
  align-items:center;
  justify-content:center;

  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  cursor:pointer;
  padding:0;
  text-decoration:none;
}

.ab-icon-btn:hover{
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.18);
}

.ab-icon-img{
  width:20px;
  height:20px;
  display:block;
  object-fit:contain;
  filter: brightness(0) invert(1); /* gør mørke ikoner hvide */
}

/* På små skærme: læg actions under titlen hvis der mangler plads */
@media (max-width: 640px){
  .ab-header--with-actions{
    flex-direction:column;
    align-items:stretch;
  }
  .ab-header-actions{
    justify-content:flex-end;
  }
}

/* Aktivitet – billede */
.activity-image-wrap {
  margin-bottom: 14px;
  display: flex;
  justify-content: center;
}

.activity-image {
  max-width: 50%;
  height: auto;
  border-radius: 14px;
}

/* Mobil: lidt større billede */
@media (max-width: 768px) {
  .activity-image {
    max-width: 85%;
  }
}

/* ---------------------------------
   Admin: Kolonnestyring (Teams/Afdelinger)
---------------------------------- */
.ab-admin-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed; /* vigtigt: gør width-kolonner stabile */
}

/* Standard kolonnefordeling (kan overrides pr. tabel) */
.ab-admin-table {
  --col-name: 25%;
  --col-active: 25%;
  --col-actions: 50%;
}

.ab-admin-table col.col-name { width: var(--col-name); }
.ab-admin-table col.col-active { width: var(--col-active); }
.ab-admin-table col.col-actions { width: var(--col-actions); }

.ab-admin-table th,
.ab-admin-table td {
  vertical-align: top;
}

/* Sørg for at indhold i kolonner ikke sprænger layout */
.ab-admin-table td,
.ab-admin-table th {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* I handlingskolonnen vil vi ofte have formularer/knapper der må wrappe */
.ab-admin-table td.actions-cell {
  white-space: normal;
  overflow: visible;
}

/* (Valgfrit) lidt bedre spacing i handling */
.ab-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}


/* =========================================================
   MOBILMENU (EN VERSION): skjul topnav og vis knapper
   ========================================================= */
@media (max-width: 760px) {

  html, body { overflow-x: hidden !important; }

  .ab-topnav { display: none !important; }

  .ab-mobile-menu {
    display: flex !important;
    flex-direction: column;
    gap: 10px;
    margin: 10px 12px 16px 12px;
  }

  .ab-mobile-menu .menu-btn {
    display: block;
    width: 100%;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 800;
    text-decoration: none;
    text-align: center;
    background: var(--ab-accent, #23c6df);
    color: #00111a;
    border: 0;
  }

  .ab-mobile-menu .menu-btn--ghost {
    background: rgba(255,255,255,0.10);
    color: rgba(255,255,255,0.95);
    border: 1px solid rgba(255,255,255,0.15);
  }

  .ab-mobile-menu .menu-btn--danger {
    background: rgba(255, 80, 80, 0.95);
    color: #fff;
  }
  
  /* Dashboard: stacked på mobil */
  .dashboard-grid{
    display: grid;
    grid-template-columns: 1fr;   /* default = stacked */
    gap: 12px;
  }

  @media (min-width: 900px){
  .dashboard-grid{
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

  /* (valgfrit) lidt bedre indre layout */
  .dash-box .dash-num{
    font-weight: 800;
    font-size: 1.6rem;
    line-height: 1.1;
  }
  .dash-box .dash-label{
    margin-top: 6px;
  }

}

  @media (min-width: 761px) {
  .ab-mobile-menu { display: none !important; }
  }
