*{box-sizing:border-box}
:root{
  --nav:#0b1220;--nav-2:#111a2d;--bg:#f7f8fa;--surface:#fff;--surface-2:#f3f5f7;
  --text:#151922;--muted:#697180;--line:#e2e6ea;--line-strong:#d3d8de;
  --accent:#315ee8;--accent-2:#244dc7;--accent-soft:#edf2ff;
  --red:#bd2e2e;--red-soft:#fff0f0;--green:#26734d;--green-soft:#edf8f2;
  --amber:#9a6417;--amber-soft:#fff7e8;--shadow:0 18px 50px rgba(15,23,42,.09)
}
body.dark{
  --nav:#080d16;--nav-2:#101827;--bg:#0e1420;--surface:#151e2d;--surface-2:#1b2638;
  --text:#eff3f8;--muted:#9da8b8;--line:#293548;--line-strong:#39465a;
  --accent:#7292ff;--accent-2:#89a3ff;--accent-soft:#1b2c59;
  --red:#ff8b8b;--red-soft:#3c2026;--green:#82d7a9;--green-soft:#18372a;
  --amber:#efc06d;--amber-soft:#3b2c17;--shadow:0 18px 55px rgba(0,0,0,.28)
}
html{background:var(--bg)}
body{margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Arial,sans-serif;background:var(--bg);color:var(--text);font-size:14px;letter-spacing:-.005em}
button,input,select,textarea{font:inherit}button{cursor:pointer;border:0}a{color:var(--accent)}
.boot{min-height:70vh;display:grid;place-items:center;color:var(--muted)}

/* Auth */
.login{min-height:100vh;display:grid;place-items:center;padding:28px;background:linear-gradient(135deg,#f8fafc 0%,#eef2f6 100%)}
.dark .login{background:#0e1420}
.auth-shell{width:min(940px,100%);min-height:590px;display:grid;grid-template-columns:.9fr 1.1fr;background:var(--surface);border:1px solid var(--line);border-radius:24px;overflow:hidden;box-shadow:0 26px 80px rgba(15,23,42,.13)}
.auth-brand{padding:46px;background:var(--nav);color:white;display:flex;flex-direction:column;justify-content:space-between;min-width:0}
.auth-mark,.brand-mark{width:38px;height:38px;border-radius:11px;background:var(--accent);color:#fff;display:grid;place-items:center;font-weight:800;font-size:18px}
.auth-wordmark{font-size:32px;font-weight:780;letter-spacing:-1px;margin-top:22px}.auth-brand p{font-size:17px;line-height:1.55;color:#aeb8ca;max-width:330px;margin:12px 0 0}.auth-proof{font-size:12px;color:#aeb8ca;display:flex;align-items:center;gap:8px}.auth-proof span{width:7px;height:7px;background:#7aa2ff;border-radius:50%}
.loginbox{padding:48px 54px;display:flex;flex-direction:column;justify-content:center;min-width:0}.auth-mobile-brand{display:none}.auth-tabs{display:flex;gap:18px;border-bottom:1px solid var(--line);margin:0 0 24px}.auth-tab{background:transparent;color:var(--muted);padding:11px 1px;margin-bottom:-1px;border-bottom:2px solid transparent;font-weight:650}.auth-tab.active{color:var(--text);border-color:var(--text)}
.linkbtn{display:block;width:100%;margin-top:9px;background:transparent;color:var(--accent);text-decoration:none;padding:8px;font-weight:600}.linkbtn:hover{text-decoration:underline}

/* App shell */
.app-shell{min-height:100vh;display:grid;grid-template-columns:224px minmax(0,1fr)}
.sidebar{position:sticky;top:0;height:100vh;background:var(--nav);color:#fff;padding:22px 14px 16px;display:flex;flex-direction:column;z-index:20}
.side-brand{height:48px;display:flex;align-items:center;gap:10px;padding:0 8px;font-weight:760;font-size:17px;letter-spacing:-.35px}.side-brand .brand-mark{width:30px;height:30px;border-radius:9px;font-size:14px}.side-nav{display:grid;gap:3px;margin-top:28px}.nav-item{width:100%;display:flex;align-items:center;gap:11px;padding:10px 11px;border-radius:9px;background:transparent;color:#9faabd;text-align:left;font-weight:590;transition:background .14s,color .14s}.nav-item:hover{background:rgba(255,255,255,.065);color:white}.nav-item.active{background:rgba(255,255,255,.10);color:white}.nav-icon{width:20px;text-align:center;font-size:16px;color:#91a8e8}.side-footer{margin-top:auto;display:grid;gap:3px}.side-user{display:flex;align-items:center;gap:10px;padding:14px 8px 2px;margin-top:7px;border-top:1px solid rgba(255,255,255,.09)}.side-user b{display:block;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:138px}.side-user small{display:block;color:#8190a6;font-size:10px;margin-top:2px}.avatar{width:34px;height:34px;border-radius:50%;background:#dbe5ff;color:#24458f;display:grid;place-items:center;font-size:11px;font-weight:800;flex:none}.workspace{min-width:0}.mobile-top{display:none}
.main{width:min(1120px,calc(100% - 56px));margin:0 auto;padding:42px 0 70px}

/* Page heading */
.page-heading{display:flex;justify-content:space-between;align-items:flex-end;gap:24px;margin-bottom:27px}.page-heading h1{font-size:30px;line-height:1.08;letter-spacing:-1px;margin:4px 0 6px;font-weight:760}.page-heading p{margin:0;color:var(--muted);font-size:14px}.eyebrow{text-transform:uppercase;letter-spacing:.09em;font-size:10px;font-weight:760;color:var(--accent)}.heading-actions{display:flex;gap:8px;flex-wrap:wrap}

/* Buttons / form */
.btn{padding:9px 13px;border-radius:8px;background:var(--accent);color:white;font-weight:650;transition:background .12s,transform .12s,border-color .12s}.btn:hover{background:var(--accent-2)}.btn:active{transform:translateY(1px)}.btn:disabled{opacity:.55;cursor:not-allowed}.btn.full{width:100%;padding:11px 14px}.btn.ghost{background:var(--surface-2);color:var(--text);border:1px solid var(--line)}.btn.ghost:hover{background:var(--surface);border-color:var(--line-strong)}.btn.danger{background:var(--red-soft);color:var(--red)}.btn.small{padding:7px 9px;font-size:12px}.icon-button{width:38px;height:38px;border-radius:9px;background:var(--surface-2);color:var(--text);border:1px solid var(--line)}
.field{margin:14px 0}.field label{display:block;font-weight:650;font-size:12px;margin-bottom:7px;color:var(--text)}
input,select,textarea{width:100%;padding:10px 11px;border:1px solid var(--line-strong);border-radius:8px;background:var(--surface);color:var(--text);outline:none;transition:border-color .13s,box-shadow .13s}input:focus,select:focus,textarea:focus{border-color:#87a1ef;box-shadow:0 0 0 3px rgba(49,94,232,.09)}textarea{min-height:90px;resize:vertical}

/* Summary */
.summary-strip{display:flex;align-items:stretch;border:1px solid var(--line);background:var(--surface);border-radius:11px;margin-bottom:18px;overflow:hidden}.summary-strip>div{padding:13px 18px;min-width:120px;border-right:1px solid var(--line);display:flex;align-items:baseline;gap:9px}.summary-strip>div:last-child{border-right:0}.summary-strip span{color:var(--muted);font-size:11px}.summary-strip b{font-size:18px;font-weight:740}.summary-strip .danger b{color:var(--red)}.summary-strip .good b{color:var(--green)}

/* Filters */
.filters{display:flex;gap:7px;align-items:center;margin:0 0 14px;flex-wrap:wrap;background:var(--surface);border:1px solid var(--line);border-radius:11px;padding:8px}.date-filter-select,.employee-filter,.status-filter,.searchbox{height:36px;border:0;background:var(--surface-2);padding:0 10px;border-radius:7px;color:var(--text);font-weight:560}.date-filter-select{width:auto;min-width:128px}.status-filter,.employee-filter{width:auto;min-width:150px}.searchbox{min-width:200px;flex:1;background:transparent;border-left:1px solid var(--line);border-radius:0;padding-left:13px}.searchbox:focus{box-shadow:none;border-left-color:var(--line)}.calendar-toggle{width:36px;height:36px;min-width:36px;border-radius:7px;background:var(--surface-2);color:var(--accent);font-weight:800;display:grid;place-items:center;border:0;font-size:16px}.filterbtn{background:var(--surface-2);color:var(--muted);padding:8px 11px;border-radius:7px;font-weight:600}.filterbtn.active{color:var(--text);background:#e7e9ec}.dark .filterbtn.active{background:#2b374b}

/* Tasks */
.task-list{background:var(--surface);border:1px solid var(--line);border-radius:12px;overflow:hidden}.task-row{position:relative;display:grid;grid-template-columns:3px minmax(0,1fr) auto;gap:0;border-bottom:1px solid var(--line);min-height:108px;transition:background .14s}.task-row:last-child{border-bottom:0}.task-row:hover{background:color-mix(in srgb,var(--surface-2) 58%,var(--surface))}.priority-rail{width:3px;background:#adb5bd}.priority-rail.high{background:#df5d5d}.priority-rail.normal{background:#d5a344}.priority-rail.low{background:#5aad7b}.task-copy{padding:17px 18px 15px;min-width:0}.task-topline{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.task-topline h3{margin:0;font-size:14px;font-weight:720;letter-spacing:-.1px}.task-copy p{margin:6px 0 10px;color:var(--muted);font-size:13px;line-height:1.42;max-width:720px;white-space:pre-wrap}.task-meta{display:flex;gap:6px;align-items:center;flex-wrap:wrap;color:var(--muted);font-size:11px}.task-meta i{font-style:normal;color:#b6bdc8}.status-badge,.pill{display:inline-flex;align-items:center;padding:3px 7px;border-radius:999px;background:var(--surface-2);font-size:10px;font-weight:700;color:var(--muted)}.status-badge.overdue,.pill.overdue{background:var(--red-soft);color:var(--red)}.status-badge.repeat,.pill.repeat{background:var(--accent-soft);color:var(--accent)}.row-actions{display:flex;align-items:center;justify-content:flex-end;gap:3px;flex-wrap:wrap;padding:14px 14px 14px 8px;max-width:265px}.text-action{background:transparent;color:var(--muted);font-size:11px;font-weight:650;padding:7px 8px;border-radius:6px}.text-action:hover{background:var(--surface-2);color:var(--text)}.text-action.primary-action{color:var(--accent)}.text-action.danger{color:var(--red)}.status-text{font-size:10px;font-weight:700;padding:4px 7px;border-radius:999px}.done-text{background:var(--green-soft);color:var(--green)}.task-row.done{opacity:.62}.task-row.done h3{text-decoration:line-through}.activity{margin-top:8px;font-size:11px;color:var(--accent);font-weight:580}.empty-state{background:var(--surface);border:1px dashed var(--line-strong);border-radius:12px;padding:46px 24px;text-align:center;display:grid;justify-items:center;gap:5px;color:var(--muted)}.empty-state b{color:var(--text);font-size:14px}.empty-icon{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:var(--green-soft);color:var(--green);font-weight:800;margin-bottom:4px}

/* Notices */
.notify-banner{display:flex;justify-content:space-between;gap:12px;align-items:center;background:var(--accent-soft);color:var(--accent);padding:10px 12px;border-radius:9px;margin-bottom:14px;font-size:12px}.muted{color:var(--muted)}.subtle{font-size:11px;color:var(--muted)}.error{background:var(--red-soft);color:var(--red);padding:10px;border-radius:8px;margin:12px 0;font-size:12px}.notice{background:var(--accent-soft);color:var(--accent);padding:10px;border-radius:8px;margin:12px 0;font-size:12px}

/* Modals */
.modalbg{position:fixed;inset:0;background:rgba(8,12,20,.52);display:grid;place-items:center;padding:18px;z-index:60;animation:fadeIn .14s ease}.modal{width:min(620px,100%);max-height:91vh;overflow:auto;background:var(--surface);border:1px solid var(--line);border-radius:14px;padding:22px;box-shadow:var(--shadow);animation:popIn .17s ease}.modal.wide{width:min(820px,100%)}.modalhead{display:flex;justify-content:space-between;align-items:center;gap:12px;position:sticky;top:-22px;background:var(--surface);padding:4px 0 14px;z-index:2}.modalhead h2,.modal h2{font-size:18px;letter-spacing:-.3px;margin:0}.modal h3{font-size:13px;margin:22px 0 9px}.close,.close-calendar{width:31px;height:31px;border-radius:8px;background:var(--surface-2);color:var(--muted);font-size:18px}.grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.grid3{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}.tabs{display:flex;gap:17px;border-bottom:1px solid var(--line);margin:0 0 16px;overflow:auto}.tab{padding:9px 0;background:transparent;color:var(--muted);white-space:nowrap;border-bottom:2px solid transparent;font-weight:600}.tab.active{color:var(--text);border-color:var(--text)}
.comment{padding:11px 0;border-bottom:1px solid var(--line)}.comment-head{display:flex;justify-content:space-between;gap:8px;font-size:11px}.comment-body{margin-top:5px;white-space:pre-wrap;line-height:1.45}.chat-form{display:flex;gap:8px;margin-top:12px}.chat-form textarea{min-height:48px}.history-item{display:grid;grid-template-columns:130px 1fr;gap:10px;padding:9px 0;border-bottom:1px solid var(--line);font-size:12px}.file-list{display:grid;gap:7px}.file-row{display:flex;justify-content:space-between;gap:10px;align-items:center;padding:9px;background:var(--surface-2);border-radius:8px}.file-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.upload-box{border:1px dashed var(--line-strong);border-radius:9px;padding:14px;text-align:center}.profile-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.profile-stat{padding:11px;background:var(--surface-2);border-radius:9px}.profile-stat b{display:block;font-size:19px}.executor-list{display:grid;gap:7px;margin-top:8px}.executor-row{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:9px 10px;border:1px solid var(--line);border-radius:8px;background:var(--surface)}
.toast-stack{position:fixed;right:16px;bottom:16px;z-index:90;display:grid;gap:7px}.toast{background:var(--nav);color:white;padding:10px 13px;border-radius:9px;box-shadow:0 10px 30px rgba(0,0,0,.2);animation:toastIn .18s ease;max-width:330px;font-size:12px}

/* Calendar */
.calendar-popover{position:fixed;inset:0;background:rgba(8,12,20,.3);display:grid;place-items:start center;padding:82px 16px 16px;z-index:70}.calendar-popover-card{width:min(350px,100%);background:var(--surface);border:1px solid var(--line);border-radius:13px;box-shadow:var(--shadow);padding:13px}.calendar-popover-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.mini-calendar{background:transparent;padding:0}.cal-head{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:8px;margin-bottom:9px}.cal-head b{text-align:center;text-transform:capitalize;font-size:12px}.cal-weekdays,.cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:4px}.cal-weekdays{margin-bottom:4px}.cal-weekdays span{text-align:center;font-size:9px;color:var(--muted);font-weight:700}.cal-day{min-height:39px;border-radius:7px;background:transparent;color:var(--text);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;border:1px solid transparent}.cal-day:hover{background:var(--surface-2)}.cal-day small{font-size:9px;color:var(--accent);font-weight:800}.cal-day.today{border-color:#9db0e9}.cal-day.active{background:var(--accent);color:white}.cal-day.active small{color:white}.cal-empty{min-height:39px}

@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes popIn{from{opacity:0;transform:translateY(5px) scale(.985)}to{opacity:1;transform:none}}@keyframes toastIn{from{opacity:0;transform:translateY(7px)}to{opacity:1;transform:none}}

@media(max-width:900px){
  .app-shell{display:block}.sidebar{display:none}.mobile-top{display:flex;position:sticky;top:0;z-index:30;align-items:center;justify-content:space-between;padding:10px 14px;background:color-mix(in srgb,var(--surface) 94%,transparent);backdrop-filter:blur(12px);border-bottom:1px solid var(--line)}.mobile-top .side-brand{padding:0;height:auto;color:var(--text)}.mobile-actions{display:flex;gap:7px}.small-avatar{border:0}
  .main{width:min(100% - 28px,760px);padding:25px 0 50px}.page-heading{align-items:flex-start}.summary-strip{overflow:auto}.summary-strip>div{min-width:110px}.row-actions{max-width:none}.task-row{grid-template-columns:3px minmax(0,1fr)}.row-actions{grid-column:2;justify-content:flex-start;padding:0 18px 13px}.filters{align-items:stretch}.searchbox{order:5;flex-basis:100%;border-left:0;border-top:1px solid var(--line);padding-top:7px;height:42px}
}
@media(max-width:650px){
  .login{padding:0;background:var(--surface)}.auth-shell{display:block;min-height:100vh;border:0;border-radius:0;box-shadow:none}.auth-brand{display:none}.loginbox{padding:34px 22px;min-height:100vh;justify-content:center}.auth-mobile-brand{display:flex;align-items:center;gap:10px;margin-bottom:30px;font-size:18px}.auth-mobile-brand .auth-mark{width:31px;height:31px;border-radius:9px;font-size:13px}
  .page-heading{display:block}.page-heading h1{font-size:27px}.heading-actions{margin-top:15px}.heading-actions .btn{flex:1}.summary-strip{display:grid;grid-template-columns:1fr 1fr}.summary-strip>div{border-right:0;border-bottom:1px solid var(--line);min-width:0}.summary-strip>div:nth-child(odd){border-right:1px solid var(--line)}.summary-strip>div:nth-last-child(-n+2){border-bottom:0}
  .filters{display:grid;grid-template-columns:1fr auto}.date-filter-select,.status-filter,.employee-filter{width:100%;min-width:0}.calendar-toggle{grid-column:2}.searchbox{grid-column:1/-1;order:initial}.status-filter,.employee-filter{grid-column:1/-1}.task-copy{padding:14px 13px 10px}.row-actions{padding:0 13px 12px}.grid,.grid3{grid-template-columns:1fr}.profile-stats{grid-template-columns:1fr 1fr}.chat-form{display:block}.chat-form .btn{width:100%;margin-top:7px}.history-item{grid-template-columns:1fr}.modal{padding:17px}.modalhead{top:-17px}
}
@media(hover:none){.btn:hover,.nav-item:hover,.task-row:hover,.cal-day:hover{transform:none}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

/* OpgaverNu logo */
.brand-logo{display:block;width:100%;height:100%;object-fit:contain}
.brand-mark,.auth-mark{overflow:hidden}
.brand-mark .brand-logo{width:28px;height:28px}
.auth-mark .brand-logo{width:72px;height:72px}
.auth-mobile-brand .auth-mark .brand-logo{width:34px;height:34px}

/* OpgaverNu hjælpechat */
#helpBotRoot{
  position:fixed;
  right:18px;
  bottom:18px;
  z-index:90;
  font:inherit
}
.helpbot-launcher{
  width:50px;
  height:50px;
  border-radius:50%;
  background:var(--blue);
  color:#fff;
  display:grid;
  place-items:center;
  box-shadow:0 10px 28px rgba(37,99,235,.28);
  transition:transform .16s,box-shadow .16s
}
.helpbot-launcher:hover{
  transform:scale(1.05);
  box-shadow:0 14px 34px rgba(37,99,235,.34)
}
.helpbot-dot{font-size:20px;font-weight:850}
.helpbot-nudge{
  position:absolute;
  right:0;
  bottom:62px;
  width:240px;
  background:var(--surface);
  color:var(--text);
  border:1px solid var(--line);
  border-radius:14px;
  padding:12px 34px 12px 13px;
  box-shadow:var(--shadow);
  opacity:0;
  transform:translateY(8px);
  pointer-events:none;
  transition:opacity .2s,transform .2s
}
.helpbot-nudge.show{opacity:1;transform:none;pointer-events:auto}
.helpbot-nudge.hidden{display:none}
.helpbot-nudge b{display:block;margin-bottom:3px}
.helpbot-nudge span{font-size:12px;color:var(--muted)}
.helpbot-nudge-close{
  position:absolute;
  right:8px;
  top:7px;
  background:transparent;
  color:var(--muted);
  font-size:18px
}
.helpbot-panel{
  position:absolute;
  right:0;
  bottom:62px;
  width:min(360px,calc(100vw - 28px));
  background:var(--surface);
  border:1px solid var(--line);
  border-radius:18px;
  box-shadow:0 24px 70px rgba(0,0,0,.2);
  overflow:hidden
}
.helpbot-head{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
  padding:14px 15px;
  border-bottom:1px solid var(--line)
}
.helpbot-head b{display:block}
.helpbot-head span{display:block;font-size:12px;color:var(--muted);margin-top:2px}
.helpbot-close{
  width:30px;
  height:30px;
  border-radius:50%;
  background:var(--soft);
  color:var(--text);
  font-size:18px
}
.helpbot-messages{
  max-height:245px;
  overflow:auto;
  padding:13px;
  display:flex;
  flex-direction:column;
  gap:8px
}
.helpbot-msg{
  max-width:88%;
  padding:9px 11px;
  border-radius:12px;
  font-size:13px;
  line-height:1.4
}
.helpbot-msg.bot{background:var(--soft);color:var(--text);align-self:flex-start}
.helpbot-msg.user{background:var(--blue);color:#fff;align-self:flex-end}
.helpbot-quick{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
  padding:0 13px 12px
}
.helpbot-quick button{
  padding:6px 8px;
  border-radius:999px;
  background:var(--blue-soft);
  color:var(--blue2);
  font-size:11px;
  font-weight:700
}
.helpbot-form{
  display:flex;
  gap:7px;
  padding:12px;
  border-top:1px solid var(--line)
}
.helpbot-form input{
  min-width:0;
  flex:1;
  padding:9px 10px
}
.helpbot-form button{
  background:var(--blue);
  color:#fff;
  border-radius:9px;
  padding:0 12px;
  font-weight:750
}
@media(max-width:430px){
  #helpBotRoot{right:12px;bottom:12px}
  .helpbot-panel{width:calc(100vw - 24px)}
  .helpbot-launcher{width:48px;height:48px}
}
