*{box-sizing:border-box}body{margin:0;font-family:Inter,Segoe UI,Arial,sans-serif;background:#f5f7fb;color:#172033}button,input,select,textarea{font:inherit}button{border:0;border-radius:9px;padding:10px 14px;background:#1267e5;color:white;font-weight:650;cursor:pointer}button.ghost{background:#eef3fa;color:#26364d}.hidden{display:none!important}.login{min-height:100vh;display:grid;place-items:center;padding:20px;background:linear-gradient(145deg,#071a32,#123c6a)}.login-card{width:min(430px,100%);background:white;padding:34px;border-radius:18px;box-shadow:0 20px 60px #0005}.brand{width:48px;height:48px;border-radius:12px;background:#1267e5;color:#fff;display:grid;place-items:center;font-weight:800}.login h1{margin-bottom:5px}.login p{color:#657187}.login label{display:block;margin:14px 0;font-size:13px;font-weight:700}.login input{display:block;width:100%;padding:12px;border:1px solid #ccd5e2;border-radius:9px;margin-top:5px}.error{color:#b42318;margin-top:12px}.app{min-height:100vh;display:grid;grid-template-columns:250px 1fr}aside{background:#0b1f3a;color:white;padding:18px 14px;display:flex;flex-direction:column;position:sticky;top:0;height:100vh}.logo{display:flex;gap:10px;align-items:center;padding:8px}.logo>b{background:#1e72e8;padding:10px;border-radius:10px}.logo span{display:grid}.logo small,.aside-foot small{color:#9eb0c7}nav{margin-top:25px;display:grid;gap:4px}nav button{background:transparent;text-align:left;color:#cbd7e8;padding:11px 12px}nav button.active,nav button:hover{background:#183657;color:white}.aside-foot{margin-top:auto;display:grid;gap:10px;padding:8px}main{min-width:0}header{height:76px;background:white;border-bottom:1px solid #e3e8f0;padding:12px 24px;display:flex;align-items:center;justify-content:space-between;position:sticky;top:0;z-index:5}header h1{font-size:20px;margin:0}header small{color:#718096}.header-actions{display:flex;gap:8px}#view{padding:24px;max-width:1500px;margin:auto}.grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.card,.panel{background:white;border:1px solid #e2e8f0;border-radius:13px;padding:18px;box-shadow:0 2px 7px #13213a0b}.stat strong{font-size:27px;display:block}.muted{color:#6b778c}.toolbar{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:14px}.project{display:grid;grid-template-columns:1fr auto;gap:12px;margin-bottom:10px}.pill{padding:4px 8px;border-radius:999px;background:#e8f1ff;color:#175fb8;font-size:12px}.pill.done{background:#dcfce7;color:#16723a}.table{width:100%;border-collapse:collapse}.table th,.table td{padding:10px;border-bottom:1px solid #edf0f5;text-align:left;vertical-align:top}.table tr:hover{background:#f8fafc}.gantt{overflow:auto;background:white;border:1px solid #e2e8f0;border-radius:12px}.g-row{display:grid;grid-template-columns:280px 1fr;min-height:44px;border-bottom:1px solid #edf0f5}.g-name{padding:11px}.g-track{position:relative;background:repeating-linear-gradient(90deg,#fff,#fff 39px,#eef2f7 40px);min-width:900px}.g-bar{position:absolute;top:9px;height:26px;border-radius:6px;background:#2879e6;color:#fff;font-size:12px;padding:5px 8px;overflow:hidden;white-space:nowrap}.g-bar.act{background:#6b7f99}.modal{position:fixed;inset:0;background:#07101e99;display:grid;place-items:center;z-index:20;padding:20px}.modal-card{background:white;border-radius:15px;padding:24px;max-width:760px;width:100%;max-height:90vh;overflow:auto;position:relative}.x{position:absolute;right:12px;top:10px;background:transparent;color:#333;font-size:24px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.form-grid label{font-size:12px;font-weight:700}.form-grid input,.form-grid select,.form-grid textarea{width:100%;padding:10px;border:1px solid #cfd8e5;border-radius:8px;margin-top:4px}.span2{grid-column:1/-1}.chat{height:48vh;overflow:auto;background:#f8fafc;padding:14px;border-radius:10px}.msg{max-width:82%;padding:10px 12px;border-radius:11px;margin:8px 0;background:white;border:1px solid #e3e8ef}.msg.me{margin-left:auto;background:#e8f1ff}.chatbox{display:flex;gap:8px;margin-top:10px}.chatbox textarea{flex:1}.docrow{display:flex;justify-content:space-between;gap:12px;padding:10px;border-bottom:1px solid #edf0f5}.admin-badge{background:#fee2e2;color:#991b1b;padding:4px 8px;border-radius:999px}#toast{position:fixed;right:20px;bottom:20px;background:#14263f;color:#fff;padding:12px 16px;border-radius:9px;display:none;z-index:50}.mobile-menu{display:none}
@media(max-width:850px){.app{display:block}aside{position:fixed;left:-270px;z-index:15;width:250px;transition:.2s}aside.open{left:0}.mobile-menu{display:block}.grid{grid-template-columns:1fr 1fr}header{padding:10px 14px}#view{padding:14px}.header-actions #newProject{display:none}.g-row{grid-template-columns:180px 1fr}.form-grid{grid-template-columns:1fr}.span2{grid-column:auto}}
@media(max-width:520px){.grid{grid-template-columns:1fr}.project{grid-template-columns:1fr}.table{font-size:13px}.hide-mobile{display:none}}
/* WEB 1.4.1 interactive Gantt */
.gantt{overflow:auto}
.g-row{display:grid;grid-template-columns:280px minmax(700px,1fr);min-height:52px;border-bottom:1px solid var(--line,#e5e7eb)}
.g-name{position:sticky;left:0;z-index:3;background:var(--panel,#fff);padding:8px 10px}
.g-track{position:relative;min-height:52px;background-image:linear-gradient(to right,rgba(100,116,139,.12) 1px,transparent 1px);background-size:84px 100%}
.g-bar{position:absolute;top:10px;height:32px;border-radius:7px;display:flex;align-items:center;cursor:grab;user-select:none;touch-action:none;overflow:visible}
.g-bar.dragging{cursor:grabbing;opacity:.82;z-index:8}
.g-bar .g-label{padding:0 12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;pointer-events:none;width:100%;text-align:center}
.g-handle{position:absolute;top:0;width:10px;height:100%;cursor:ew-resize;z-index:4}
.g-handle.left{left:-2px}.g-handle.right{right:-2px}
.g-handle:hover{background:rgba(255,255,255,.28);border-radius:5px}
.g-toggle{border:0;background:transparent;color:inherit;padding:2px 5px;margin-right:2px;cursor:pointer;font-size:16px}
.activity-row .g-name{padding-left:24px}
@media(max-width:760px){.g-row{grid-template-columns:210px minmax(700px,1fr)}.g-name{font-size:13px}}

/* WEB 1.5 – complete calendar Gantt */
.gantt-shell{border:1px solid var(--line,#dfe5ec);border-radius:12px;overflow:hidden;background:var(--panel,#fff)}
.gantt-head{display:grid;grid-template-columns:300px minmax(0,1fr);height:92px;border-bottom:1px solid var(--line,#dfe5ec)}
.gantt-corner{padding:14px 16px;display:flex;flex-direction:column;justify-content:center;background:var(--panel,#fff);z-index:7}
.gantt-corner small{margin-top:4px;color:var(--muted,#64748b)}
.gantt-head-scroll{overflow:hidden;position:relative;background:var(--panel,#fff)}
.timeline-head{height:92px;position:relative}
.tl-months,.tl-weeks,.tl-days{position:absolute;left:0;right:0}
.tl-months{top:0;height:30px}.tl-weeks{top:30px;height:26px}.tl-days{top:56px;height:36px}
.tl-month,.tl-week,.tl-day{position:absolute;box-sizing:border-box;border-right:1px solid var(--line,#dfe5ec);border-bottom:1px solid var(--line,#dfe5ec);white-space:nowrap;overflow:hidden;text-align:center}
.tl-month{height:30px;padding:6px 8px;text-transform:capitalize;font-weight:700;text-align:left}
.tl-week{height:26px;padding:4px;font-size:12px;font-weight:700}
.tl-day{height:36px;padding-top:2px;font-size:11px}
.tl-day b,.tl-day small{display:block;line-height:15px}.tl-day small{font-size:9px;color:var(--muted,#64748b)}
.tl-day.weekend{background:rgba(100,116,139,.08)}
.gantt-body{display:grid;grid-template-columns:300px auto;overflow:auto;max-height:65vh;position:relative}
.gantt-names{position:sticky;left:0;z-index:6;background:var(--panel,#fff);box-shadow:3px 0 8px rgba(15,23,42,.08)}
.gantt-tracks{position:relative}
.g-name,.g-track{height:58px;box-sizing:border-box;border-bottom:1px solid var(--line,#e5e7eb)}
.g-name{padding:8px 12px;background:var(--panel,#fff);overflow:hidden}
.g-name.activity-row{padding-left:28px;background:rgba(100,116,139,.035)}
.g-meta{font-size:11px;color:var(--muted,#64748b);margin-top:4px;white-space:nowrap}
.g-track{position:relative;background-image:linear-gradient(to right,rgba(100,116,139,.13) 1px,transparent 1px);background-size:24px 100%}
.g-bar{position:absolute;top:11px;height:36px;border-radius:7px;display:flex;align-items:center;cursor:grab;user-select:none;touch-action:none;overflow:visible;min-width:24px}
.g-bar.dragging{cursor:grabbing;opacity:.8;z-index:9}
.g-bar .g-label{padding:0 12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;pointer-events:none;width:100%;text-align:center;font-weight:700;font-size:12px}
.g-bar .g-label small{display:block;font-size:9px;font-weight:500;opacity:.85}
.g-handle{position:absolute;top:0;width:9px;height:100%;cursor:ew-resize;z-index:4}
.g-handle.left{left:-2px}.g-handle.right{right:-2px}
.g-handle:hover{background:rgba(255,255,255,.3);border-radius:5px}
.g-toggle{border:0;background:transparent;color:inherit;padding:2px 5px;margin-right:2px;cursor:pointer;font-size:16px}
.today-line{position:absolute;top:0;bottom:0;width:2px;background:#ef4444;z-index:5;pointer-events:none}
.today-line.head{height:92px;bottom:auto}.today-line.head span{position:absolute;top:0;left:4px;background:#ef4444;color:white;font-size:9px;font-weight:800;padding:2px 4px;border-radius:3px}
@media(max-width:760px){.gantt-head,.gantt-body{grid-template-columns:210px auto}.gantt-corner{padding:8px}.g-name{font-size:12px}.g-meta{font-size:9px}}

/* WEB 1.6 – calendar sync */
.calendar-sync{max-width:860px}
.calendar-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:18px}
.calendar-options button{min-height:88px;text-align:left;padding:16px;border-radius:12px}
.calendar-options button b,.calendar-options button small{display:block}
.calendar-options button small{margin-top:5px;opacity:.72;font-weight:400}
.calendar-sync .notice{margin-top:18px;padding:14px;border:1px solid var(--line,#dfe5ec);border-radius:10px;background:rgba(100,116,139,.06);font-size:13px}
@media(max-width:650px){.calendar-options{grid-template-columns:1fr}}

.calendar-live{margin-top:14px}.calendar-live label{display:block;margin:12px 0}.calendar-live input{width:100%}.danger{margin-top:14px}
.logo img{width:42px;height:42px;object-fit:cover;object-position:center 18%;border-radius:9px}.login-brand{text-align:center}.login-brand img{width:210px;max-width:80%;border-radius:18px;margin-bottom:12px}.logo span strong{font-size:17px;letter-spacing:.3px}
/* Byggvy 1.16: self-contained vector brand */
.login-brand img{display:block!important;width:120px!important;height:120px!important;object-fit:contain!important;margin:0 auto 8px!important;border-radius:0!important}
.brand-tagline{text-align:center;text-transform:uppercase;letter-spacing:1.5px;font-size:10px;opacity:.7;margin:-8px 0 22px}
aside .logo{display:flex!important;align-items:center!important;gap:10px!important}
aside .logo img{display:block!important;width:44px!important;height:44px!important;object-fit:contain!important;border-radius:0!important;flex:0 0 44px}
aside .logo span{display:block!important;min-width:0}
aside .logo strong{display:block!important;font-size:17px!important}
aside .logo small{display:block;font-size:8px;line-height:1.2;letter-spacing:.35px;opacity:.68}

/* Byggvy 1.17 – ljust/mörkt läge */
.theme-toggle{width:100%;display:grid;grid-template-columns:22px 1fr 38px;align-items:center;gap:8px;background:transparent!important;color:#d8e3f1!important;padding:9px 8px!important;text-align:left;border:1px solid #29425f!important}
.theme-toggle:hover{background:#183657!important}.theme-switch{width:36px;height:20px;border-radius:999px;background:#50647a;position:relative;display:block}.theme-switch i{position:absolute;width:16px;height:16px;left:2px;top:2px;border-radius:50%;background:white;transition:.18s}
html[data-theme="dark"] .theme-switch{background:#1684f8}html[data-theme="dark"] .theme-switch i{left:18px}
html[data-theme="dark"] body{background:#091421;color:#dce7f3}html[data-theme="dark"] header{background:#0f2032;border-color:#24384c}html[data-theme="dark"] header small,html[data-theme="dark"] .muted{color:#91a5b9}
html[data-theme="dark"] .card,html[data-theme="dark"] .panel,html[data-theme="dark"] .modal-card{background:#102235;border-color:#294057;color:#e5edf5;box-shadow:none}
html[data-theme="dark"] button.ghost{background:#1c3349;color:#dbe7f3}html[data-theme="dark"] input,html[data-theme="dark"] select,html[data-theme="dark"] textarea{background:#0b1b2b;color:#e8f0f7;border-color:#365069}
html[data-theme="dark"] .table th,html[data-theme="dark"] .table td,html[data-theme="dark"] .docrow{border-color:#294057}html[data-theme="dark"] .table tr:hover{background:#152b40}
html[data-theme="dark"] .chat{background:#0a1928}html[data-theme="dark"] .msg{background:#14293d;border-color:#2d465e}html[data-theme="dark"] .msg.me{background:#123d67}
html[data-theme="dark"] .gantt-shell,html[data-theme="dark"] .gantt,html[data-theme="dark"] .gantt-head,html[data-theme="dark"] .gantt-corner,html[data-theme="dark"] .gantt-names{background:#102235!important;border-color:#294057!important;color:#e5edf5!important}
html[data-theme="dark"] .g-track,html[data-theme="dark"] .gantt-tracks{background-color:#0d1d2d!important;background-image:repeating-linear-gradient(90deg,#0d1d2d,#0d1d2d 39px,#24384c 40px)!important}
html[data-theme="dark"] .g-name{border-color:#294057!important}html[data-theme="dark"] .pill{background:#153a5d;color:#8bc8ff}html[data-theme="dark"] .pill.done{background:#123c2b;color:#85e3ac}
html[data-theme="dark"] .login-card{background:#102235;color:#e5edf5}html[data-theme="dark"] .login p{color:#9fb1c3}html[data-theme="dark"] .login input{background:#0b1b2b;color:#e8f0f7;border-color:#365069}

/* Byggvy 1.19 – tydliga tidslinjer i mörkt läge */
html[data-theme="dark"] .gantt,
html[data-theme="dark"] .gantt-head,
html[data-theme="dark"] .gantt-row,
html[data-theme="dark"] .gantt-cell,
html[data-theme="dark"] .g-day,
html[data-theme="dark"] .g-week,
html[data-theme="dark"] .timeline,
html[data-theme="dark"] .timeline-grid,
html[data-theme="dark"] .timeline-cell {
  border-color: rgba(210,225,240,.22) !important;
}
html[data-theme="dark"] .g-grid,
html[data-theme="dark"] .timeline-grid {
  background-image: linear-gradient(to right, rgba(210,225,240,.18) 1px, transparent 1px) !important;
}
html[data-theme="dark"] .gantt-head,
html[data-theme="dark"] .g-day,
html[data-theme="dark"] .g-week {
  color: #dce7f3 !important;
}

/* Byggvy 1.20 – dokumentmappar */
.doc-folder{margin:0 0 18px}.doc-folder h3{margin:4px 0 8px;font-size:14px}
#uploadFolder{min-width:180px}


/* Byggvy 1.37 – mobil/PWA */
@media(max-width:760px){
 body{font-size:15px}
 aside{width:100%!important;height:auto!important;position:fixed!important;left:0!important;right:0!important;bottom:0!important;top:auto!important;z-index:40;padding:6px 8px calc(6px + env(safe-area-inset-bottom))!important;border-top:1px solid #dbe4ee;display:block!important}
 aside .logo,aside .brand-tagline,aside .theme-toggle,aside>small,aside>hr{display:none!important}
 #nav{display:grid!important;grid-template-columns:repeat(5,1fr);gap:3px!important}
 #nav button{font-size:11px!important;padding:8px 2px!important;min-height:48px;border:0!important;border-radius:9px!important;white-space:normal!important;line-height:1.1}
 main{margin-left:0!important;width:100%!important;padding-bottom:88px!important}
 header{padding:10px 14px!important;min-height:54px}
 header h1,#title{font-size:19px!important}
 #view{padding:12px!important}
 .grid{grid-template-columns:1fr 1fr!important}
 .panel{padding:12px!important;overflow:auto}
 .toolbar{gap:7px!important;flex-wrap:wrap}
 .toolbar button,.toolbar select{min-height:44px}
 button{min-height:42px}
 input,select,textarea{font-size:16px!important;min-height:44px}
 .modal{align-items:flex-end!important;padding:0!important}
 .modal-card{width:100%!important;max-width:none!important;max-height:92vh!important;border-radius:18px 18px 0 0!important;padding:18px!important;overflow:auto}
 .gantt-shell{max-height:70vh;overflow:auto;-webkit-overflow-scrolling:touch}
 .gantt-names{min-width:155px!important}
 .mobile-home{display:flex;flex-direction:column;gap:12px}
 .mobile-hero{display:flex;justify-content:space-between;align-items:center;padding:6px 2px}
 .mobile-hero h2{margin:2px 0;font-size:25px}.mobile-hero small{text-transform:capitalize;color:#64748b}
 .mobile-count{font-size:22px;font-weight:800;background:#e8f2ff;color:#0867c7;border-radius:999px;min-width:44px;height:44px;display:grid;place-items:center}
 .mobile-job{background:white;border:1px solid #dce5ee;border-radius:16px;padding:15px;box-shadow:0 5px 18px rgba(15,35,55,.07)}
 .mobile-job-top{display:flex;justify-content:space-between;gap:10px}.mobile-job h3{font-size:19px;margin:9px 0 4px}.mobile-project{color:#5f7183;font-size:13px}.mobile-date{font-size:12px;font-weight:700;white-space:nowrap}
 .mobile-job-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:14px}.mobile-job-actions button{min-height:48px}
 .mobile-job-actions .mobile-done{grid-column:1/-1;background:#16845b}
 .mobile-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.mobile-actions button:first-child{grid-column:1/-1;min-height:52px}
 .table{min-width:650px}
}
html[data-theme="dark"] .mobile-job{background:#102235;border-color:#294057}
html[data-theme="dark"] .mobile-count{background:#153a5d;color:#8bc8ff}


/* Byggvy 1.38 – mobil viewport/bottenmeny-fix */
@media(max-width:760px){
  html,body{width:100%;max-width:100%;min-height:100%;overflow-x:hidden}
  body{padding:0!important}
  main{
    margin:0!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    padding-bottom:calc(118px + env(safe-area-inset-bottom))!important;
    overflow-x:hidden!important;
  }
  #view{
    width:100%!important;
    max-width:100%!important;
    box-sizing:border-box!important;
    padding:10px!important;
    overflow-x:hidden!important;
  }
  aside{
    box-sizing:border-box!important;
    max-height:76px!important;
    overflow:hidden!important;
    background:#0d2238!important;
    box-shadow:0 -4px 16px rgba(0,0,0,.18);
  }
  #nav{
    height:58px!important;
    overflow-x:auto!important;
    overflow-y:hidden!important;
    display:flex!important;
    gap:4px!important;
    scrollbar-width:none;
    -webkit-overflow-scrolling:touch;
  }
  #nav::-webkit-scrollbar{display:none}
  #nav button{
    flex:1 0 68px!important;
    min-width:68px!important;
    max-width:none!important;
    min-height:54px!important;
    height:54px!important;
    padding:5px 3px!important;
    font-size:10px!important;
    overflow:hidden!important;
  }
  .mobile-home,.mobile-job,.card,.panel,.project,.docrow{
    max-width:100%!important;
    box-sizing:border-box!important;
  }
  .mobile-job-top{min-width:0}
  .mobile-job-top>div:first-child{min-width:0;overflow:hidden}
  .mobile-job h3,.mobile-project{overflow-wrap:anywhere}
  .mobile-job-actions{grid-template-columns:1fr 1fr!important}
  .mobile-job-actions button{min-width:0!important;padding-left:6px!important;padding-right:6px!important}
  .toolbar>*{max-width:100%}
  .toolbar select{min-width:0!important;flex:1 1 150px}
  .gantt-shell{
    width:100%!important;
    max-width:100%!important;
    overflow:auto!important;
    padding-bottom:10px;
  }
}
@media(max-width:380px){
  #view{padding:7px!important}
  .mobile-job{padding:11px!important}
  .mobile-job-actions{grid-template-columns:1fr!important}
  .mobile-job-actions .mobile-done{grid-column:auto!important}
}


/* Byggvy 1.39 – riktig mobilnavigation + expanderad tidsplan */
@media(max-width:760px){
  /* Desktop/hamburger-kontroller behövs inte på telefon */
  .menu-toggle,.hamburger,#menuToggle,#hamburger,#mobileMenuButton,
  header button[aria-label*="meny" i],header button[title*="meny" i]{display:none!important}

  /* Fem fasta huvudval. Ingen sjätte knapp utanför skärmen. */
  #nav{
    display:grid!important;
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    width:100%!important;
    height:58px!important;
    overflow:hidden!important;
    gap:2px!important;
  }
  #nav button{
    width:auto!important;
    min-width:0!important;
    max-width:none!important;
    flex:none!important;
    height:54px!important;
    min-height:54px!important;
    padding:5px 1px!important;
    font-size:10px!important;
  }

  /* Viktigt: expanderade projekt får aldrig hamna bakom bottenmenyn. */
  .mobile-gantt-safe{
    max-height:none!important;
    height:auto!important;
    overflow-x:auto!important;
    overflow-y:visible!important;
    margin-bottom:calc(110px + env(safe-area-inset-bottom))!important;
  }
  .mobile-gantt-safe .gantt-body{
    max-height:none!important;
    height:auto!important;
    overflow-x:auto!important;
    overflow-y:visible!important;
    padding-bottom:18px!important;
  }
  .mobile-gantt-safe .gantt-names,
  .mobile-gantt-safe .gantt-tracks{
    height:auto!important;
    min-height:0!important;
  }
  #view{
    padding-bottom:calc(120px + env(safe-area-inset-bottom))!important;
  }

  .mobile-more{display:flex;flex-direction:column;gap:9px;padding-bottom:20px}
  .mobile-more h2{margin:4px 0 8px}
  .mobile-more-item{
    width:100%;display:flex;align-items:center;justify-content:space-between;
    min-height:56px!important;text-align:left;padding:0 16px!important;
    background:#fff!important;color:#15283b!important;border:1px solid #dce5ee!important;
    border-radius:13px!important;font-size:15px!important
  }
  .mobile-more-item span{font-size:25px;font-weight:300}
}
html[data-theme="dark"] .mobile-more-item{
  background:#102235!important;color:#e5edf5!important;border-color:#294057!important
}


/* Byggvy 1.40 – dedikerad mobil tidsplan */
@media(max-width:760px){
  /* Mobil använder inte desktop-Gantt alls. */
  .mobile-timeline{display:flex;flex-direction:column;gap:10px;padding-bottom:150px}
  .mobile-tl-head{display:flex;align-items:center;justify-content:space-between}
  .mobile-tl-head h2{margin:2px 0;font-size:25px}.mobile-tl-head small{color:#6a7b8d;font-weight:700;letter-spacing:.8px}
  .mobile-search{width:100%!important;box-sizing:border-box}
  .mobile-closed{display:flex;align-items:center;gap:8px;font-size:13px;color:#64748b}.mobile-closed input{min-height:auto!important;width:18px;height:18px}
  .mobile-project-list{display:flex;flex-direction:column;gap:9px}
  .mobile-project-card{background:#fff;border:1px solid #dce5ee;border-radius:15px;overflow:hidden;box-shadow:0 3px 12px rgba(15,35,55,.05)}
  .mobile-project-summary{width:100%;display:grid;grid-template-columns:24px minmax(0,1fr) auto;align-items:center;gap:8px;text-align:left;background:transparent!important;color:#172b3f!important;border:0!important;border-radius:0!important;padding:13px 12px!important;min-height:72px!important}
  .mobile-chevron{font-size:24px;line-height:1}.mobile-project-main{min-width:0}.mobile-project-main b{display:block;font-size:16px;overflow-wrap:anywhere}.mobile-project-main small{display:block;color:#6b7c8e;margin-top:3px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .mobile-project-side{text-align:right;display:flex;flex-direction:column;align-items:flex-end;gap:5px}.mobile-project-side small{font-size:10px;color:#6b7c8e}
  .mobile-status{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;padding:4px 8px;font-size:10px!important;font-weight:800;white-space:nowrap;background:#edf2f7;color:#43566a}
  .mobile-status.done{background:#e3f6eb;color:#16704b}.mobile-status.doing{background:#e6f1ff;color:#0b67bf}.mobile-status.paused{background:#fff1d6;color:#8a5a00}
  .mobile-project-expanded{border-top:1px solid #e5ebf1;padding:12px}
  .mobile-project-info{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:10px}.mobile-project-info span{background:#f6f8fa;border-radius:10px;padding:9px;font-size:12px}.mobile-project-info b{display:block;font-size:10px;text-transform:uppercase;color:#708090;margin-bottom:4px}
  .mobile-project-buttons{display:flex;gap:7px;margin-bottom:12px}.mobile-project-buttons button{flex:1}
  .mobile-activity-list{display:flex;flex-direction:column}
  .mobile-tl-activity{display:grid;grid-template-columns:54px 16px minmax(0,1fr);min-height:82px}
  .mobile-tl-date{text-align:right;padding:8px 5px 0 0}.mobile-tl-date b{display:block;font-size:12px}.mobile-tl-date small{display:block;font-size:9px;color:#708090}
  .mobile-tl-line{position:relative}.mobile-tl-line:before{content:"";position:absolute;left:7px;top:0;bottom:0;width:2px;background:#d8e2eb}.mobile-tl-line i{position:absolute;left:3px;top:13px;width:10px;height:10px;border-radius:50%;background:#1684f8;border:2px solid #fff;box-sizing:border-box}
  .mobile-tl-content{padding:7px 0 12px 8px;min-width:0}.mobile-tl-title{display:flex;align-items:flex-start;justify-content:space-between;gap:6px}.mobile-tl-title b{font-size:14px;overflow-wrap:anywhere}.mobile-tl-content>small{display:block;color:#6b7c8e;margin-top:4px;overflow-wrap:anywhere}
  .mobile-activity-open{margin-top:8px!important;min-height:34px!important;font-size:11px!important;padding:5px 9px!important}
  .mobile-empty{padding:14px;text-align:center;color:#708090}
  /* Projektmodal: allt ska kunna scrollas över bottenmenyn. */
  .modal{z-index:100!important}
  .modal-card{max-height:calc(100dvh - 12px)!important;height:auto!important;overflow-y:auto!important;padding-bottom:calc(110px + env(safe-area-inset-bottom))!important}
  .mobile-project-detail{padding-bottom:25px}.mobile-detail-top{display:flex;justify-content:space-between;gap:10px;align-items:flex-start}.mobile-detail-top h2{margin:3px 0 12px;overflow-wrap:anywhere}
  .mobile-detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}.mobile-detail-grid>div{background:#f6f8fa;border-radius:10px;padding:10px;min-width:0}.mobile-detail-grid b{display:block;font-size:10px;text-transform:uppercase;color:#708090;margin-bottom:4px}.mobile-detail-grid span{font-size:12px;overflow-wrap:anywhere}
  .mobile-detail-acts{display:flex;flex-direction:column;gap:7px}.mobile-detail-act{width:100%;display:flex;justify-content:space-between;align-items:center;gap:8px;text-align:left;background:#f7f9fb!important;color:#172b3f!important;border:1px solid #e1e8ef!important;padding:10px!important}.mobile-detail-act>span:first-child{min-width:0}.mobile-detail-act b,.mobile-detail-act small{display:block}.mobile-detail-act small{margin-top:4px;color:#6b7c8e;font-size:10px}
  .mobile-detail-footer{margin-top:14px}
}
html[data-theme="dark"] .mobile-project-card{background:#102235;border-color:#294057}
html[data-theme="dark"] .mobile-project-summary{color:#e5edf5!important}
html[data-theme="dark"] .mobile-project-expanded{border-color:#294057}
html[data-theme="dark"] .mobile-project-info span,html[data-theme="dark"] .mobile-detail-grid>div,html[data-theme="dark"] .mobile-detail-act{background:#14293d!important;color:#e5edf5!important;border-color:#294057!important}

/* Byggvy 1.41 – samarbetsföretag på aktivitet, mobil + desktop */
.activity-assignment-help{margin-top:-4px;font-size:12px}
#f_partner{width:100%}
@media(max-width:760px){
  #f_partner{min-height:48px!important}
  .activity-assignment-help{font-size:11px;line-height:1.4}
}

/* Byggvy 1.42 */
#f_partner_person{width:100%}
@media(max-width:760px){#f_partner_person{min-height:48px!important}}
