@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');
:root{--navy:#142d40;--teal:#087f80;--bg:#f5f6f4;--line:#dfe6e3;--muted:#647580}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--navy);font:15px 'DM Sans',system-ui,sans-serif}aside{position:fixed;inset:0 auto 0 0;width:244px;background:var(--navy);color:white;padding:34px 23px;display:flex;flex-direction:column}.brand{display:flex;flex-wrap:wrap;align-items:center;gap:8px;font:800 22px Manrope,system-ui;color:white;text-decoration:none}.brand>span:last-child{font-weight:400;color:#8dd9d0}.symbol{background:#26817f;color:#c7fff0;border-radius:9px;padding:2px 12px;font-size:31px}.workspace{margin:48px 10px 28px;font-size:10px;letter-spacing:1.5px;color:#9ab0ba}.workspace span{display:block;margin-top:9px;font-size:13px;letter-spacing:0;color:white}nav{display:grid;gap:7px}nav a{color:#b7cbd2;padding:13px 16px;border-radius:7px;text-decoration:none}nav a.active{background:#254858;color:#a9efe0}.aside-bottom{margin-top:auto;font-size:12px;color:#b7cbd2}.aside-bottom p{font-size:11px;color:#91a8b3}.dot{display:inline-block;width:7px;height:7px;background:#73d5bb;border-radius:50%;margin-right:6px}main{margin-left:244px;padding:0 45px;max-width:1600px}header{height:83px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line);font-size:10px;letter-spacing:1.4px}.badge{background:#e6eee9;color:#446857;padding:8px 10px;border-radius:5px;font-size:9px;letter-spacing:.6px}.notice{font-size:12px;color:#697970;padding:15px 0}.page{padding:29px 0 36px;min-height:78vh}.heading{display:flex;align-items:center;justify-content:space-between;gap:16px}.eyebrow{font-size:10px;letter-spacing:1.8px;font-weight:700;color:var(--teal)}h1{font:800 38px Manrope,system-ui;letter-spacing:-1.5px;margin:10px 0}h2{font:700 17px Manrope,system-ui;margin:0 0 12px}p{color:var(--muted);line-height:1.7;margin:9px 0 24px}button,.button{border:0;cursor:pointer;border-radius:6px;background:var(--teal);padding:12px 18px;color:white;font:600 13px 'DM Sans',system-ui;text-decoration:none;display:inline-block;white-space:nowrap}.secondary{background:white;border:1px solid var(--line);color:var(--navy)}.stats{display:grid;grid-template-columns:repeat(3,1fr);gap:17px;margin:26px 0 39px}.stats article{background:white;border:1px solid var(--line);padding:23px;border-radius:9px}.stats span,.stats small{display:block;color:var(--muted);font-size:12px}.stats strong{display:block;font:700 23px Manrope,system-ui;margin:16px 0 11px}.section-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}.section-title h2{margin:0}.empty{border:1px dashed #bed0c9;border-radius:9px;padding:35px;text-align:center;background:#fafcf9}.empty p{margin:5px 0 20px}.project-card{display:flex;justify-content:space-between;align-items:center;background:white;padding:22px;border:1px solid var(--line);border-radius:9px;margin-bottom:12px}.project-card h2{margin:0 0 8px}.project-card small{color:var(--muted)}.intro{margin-top:30px;border-radius:9px;background:#e4efeb;padding:28px 30px}.intro>span{font-size:10px;letter-spacing:1.4px;color:var(--teal);font-weight:bold}.intro h2{font-size:23px;margin:11px 0}.intro p{max-width:660px;margin-bottom:13px}.intro a{color:var(--teal);font-weight:700;font-size:13px;text-decoration:none}.panel{background:white;border:1px solid var(--line);border-radius:9px;padding:28px;margin-top:25px;max-width:900px}.fields{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin:22px 0}label{display:flex;flex-direction:column;gap:8px;font-size:12px;font-weight:600}input,select,textarea{width:100%;font:14px 'DM Sans',system-ui;padding:12px;border:1px solid #cedbd6;border-radius:5px;color:var(--navy);background:white}input:focus,select:focus,textarea:focus{outline:2px solid #6ab4a8;outline-offset:2px}.form-footer{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-top:25px}.form-footer span{font-size:12px;color:var(--muted);max-width:380px}.source-info{padding:23px;background:#e4efeb;border-radius:8px;display:flex;align-items:center;justify-content:space-between;gap:20px}.source-info p{margin:0;font-size:13px}.source-layout{display:grid;grid-template-columns:210px minmax(0,1fr);margin-top:25px;border:1px solid var(--line);border-radius:8px;overflow:hidden}#file-list{background:white;padding:12px}#file-list button{display:block;width:100%;background:none;color:var(--navy);text-align:left;padding:11px 7px;white-space:normal;font-size:12px}#file-list button.selected{background:#e4efeb;color:var(--teal)}.code-panel{background:#132a38;min-width:0;color:#d0ece6}#file-name{font:12px monospace;padding:15px 20px;border-bottom:1px solid #36505c}pre{margin:0;padding:20px;overflow:auto;max-height:540px;font:12px/1.65 monospace}.muted{font-size:12px}.step{background:white;border:1px solid var(--line);border-radius:8px;padding:22px;margin:12px 0;display:flex;gap:20px}.step strong{font:700 25px Manrope;color:var(--teal)}.step p{margin:5px 0 0}.step:last-child strong{color:#bb6027}footer{border-top:1px solid var(--line);padding:22px 0;font-size:10px;letter-spacing:1px;color:var(--muted);display:flex;justify-content:space-between}dialog{border:0;border-radius:12px;width:430px;padding:30px;box-shadow:0 20px 90px #0004}dialog::backdrop{background:#142d4080}dialog h2{margin:12px 0 25px}dialog label{margin:17px 0}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:24px}#toast{position:fixed;bottom:25px;right:25px;background:var(--navy);color:white;padding:14px 20px;border-radius:7px;display:none;max-width:90vw}[hidden]{display:none!important}@media(max-width:1000px){aside{width:200px;padding:26px 15px}main{margin-left:200px;padding:0 25px}.stats strong{font-size:18px}.source-layout{grid-template-columns:160px minmax(0,1fr)}}@media(max-width:720px){aside{position:static;width:100%;padding:18px}.brand{font-size:19px}.workspace,.aside-bottom{display:none}nav{display:flex;flex-wrap:wrap;margin-top:15px;gap:3px}nav a{padding:9px;font-size:12px}main{margin:0;padding:0 18px}header{height:55px;font-size:8px}.heading{align-items:flex-start}h1{font-size:31px}.stats{grid-template-columns:1fr;gap:9px;margin-top:15px}.stats article{padding:16px;display:flex;align-items:center;gap:16px;justify-content:space-between}.stats strong{margin:0}.stats small{display:none}.fields{grid-template-columns:1fr}.source-layout{grid-template-columns:1fr}#file-list{display:flex;overflow:auto}#file-list button{min-width:150px}.source-info,.form-footer{align-items:flex-start;flex-direction:column}.project-card{gap:10px}.project-card h2{font-size:14px}}

/* Versjon 0.2: konto og serverlagring */
.auth-panel{margin:12px 0 22px;max-width:none;border-top:3px solid var(--teal)}.auth-panel h2{margin-top:12px}.auth-panel .fields{margin:15px 0}.auth-links{display:flex;gap:9px;flex-wrap:wrap}.auth-panel #auth-message:empty{display:none}.auth-panel #auth-message{margin:14px 0}.auth-panel .muted{margin-bottom:0}.account-panel{display:flex;justify-content:space-between;align-items:center;gap:15px;background:#e4efeb;padding:15px 20px;border-radius:8px;font-size:13px;overflow-wrap:anywhere}.list-actions{display:flex;gap:8px}button:disabled{opacity:.5;cursor:not-allowed}fieldset{border:0;padding:0;margin:0;min-width:0}.error{color:#a53526;border-color:#dba89b}#legacy-export{margin-top:14px}#auth-message{overflow-wrap:anywhere}button:focus-visible,a:focus-visible{outline:3px solid #6ab4a8;outline-offset:3px}@media(max-width:720px){.section-title{align-items:flex-start;gap:15px;flex-direction:column}.list-actions{flex-wrap:wrap}.account-panel{align-items:flex-start;flex-direction:column}.auth-panel{padding:20px}}

/* 0.2.1: Valgt innloggingshandling er grønn og sender skjemaet. */
.auth-links .secondary.active{background:var(--teal);border-color:var(--teal);color:#fff}
.auth-links .secondary.active:hover{background:#066a6b;border-color:#066a6b}
.auth-panel #auth-hint{margin:12px 0 0}

.admin-table-wrap{overflow-x:auto;background:white;border:1px solid var(--line);border-radius:8px}
.admin-table{border-collapse:collapse;width:100%;text-align:left;font-size:13px}
.admin-table th,.admin-table td{padding:16px;border-bottom:1px solid var(--line);vertical-align:top}
.admin-table th{background:#e4efeb;white-space:nowrap}
.admin-table td small{color:var(--muted);font-size:10px;overflow-wrap:anywhere}
.admin-pagination{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:20px 0}
.admin-pagination span{font-size:12px;color:var(--muted)}
#role-status:empty{display:none}

/* Egen innloggingsside. Arbeidsområdet er skjult også før JavaScript er klart. */
.signed-out{background:radial-gradient(ellipse at 8% 5%,#e1efea 0,transparent 55%),var(--bg)}
.signed-out main{margin:0 auto;padding:0 40px;max-width:1320px}
.signed-out header{height:70px}
#login-layout{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(360px,.85fr);gap:65px;align-items:start;padding:48px 0 65px}
.landing-brand{display:inline-block;color:var(--navy);text-decoration:none;font-size:25px;margin:0 0 35px}
#public-intro h1{font-size:46px;line-height:1.12;max-width:620px;margin:16px 0 22px}
.landing-lead{font-size:17px;max-width:540px}
.landing-features{display:grid;gap:23px;margin-top:32px}
.landing-features article{display:flex;gap:16px;align-items:flex-start}
.feature-number{font-size:12px;font-weight:700;color:var(--teal);padding-top:4px}
.landing-features h2{font-size:16px;margin:0 0 6px}
.landing-features p{font-size:13px;margin:0 0 8px}
.feature-state{font-size:10px;font-weight:700;color:#076b52;background:#e0eee5;padding:4px 8px;border-radius:4px;display:inline-block}
.feature-state.planned{color:#677580;background:#e9eded}
.landing-status{font-size:12px;max-width:550px;margin-top:28px}
#login-layout .auth-panel{margin-top:20px;padding:30px;box-shadow:0 10px 40px #142d4008}
#login-layout .fields{grid-template-columns:1fr;gap:17px}
#login-layout .auth-links{gap:8px}
#login-layout .auth-links button{padding:11px 13px}
@media(max-width:1050px){#login-layout{gap:32px;grid-template-columns:minmax(0,1fr) minmax(340px,.85fr)}#public-intro h1{font-size:38px}}
@media(max-width:760px){.signed-out main{padding:0 20px}#login-layout{grid-template-columns:1fr;gap:16px;padding:25px 0 35px}.landing-brand{margin-bottom:24px}#public-intro h1{font-size:35px}#login-layout .auth-panel{margin-top:0;padding:24px}.landing-features{gap:18px}.signed-out header{font-size:8px}}

.project-modules{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:20px;margin:24px 0}
.project-module{background:white;border:1px solid var(--line);border-radius:9px;padding:26px;max-width:540px}
.project-module h2{font-size:21px;margin:15px 0 10px}
.project-module p{font-size:14px}
.back-link{display:inline-block;color:var(--teal);text-decoration:none;font-weight:600;font-size:13px;margin:0 0 25px}
.project-context{margin:0 0 12px;font-size:14px;font-weight:600;color:var(--navy);overflow-wrap:anywhere}
#project-name{overflow-wrap:anywhere}

#app-sidebar{overflow-y:auto}
#app-sidebar .brand{flex-shrink:0}
.sidebar-project-list{list-style:none;margin:0 0 12px;padding:0 0 0 16px;min-width:0}
.sidebar-project-list a{display:block;padding:10px 12px;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;border-left:1px solid #385563;border-radius:0 5px 5px 0}
.sidebar-project-list a:hover{background:#203e50;color:white}
.sidebar-project-list a.active{background:#254858;color:#a9efe0;border-left:2px solid #73d5bb}
.sidebar-project-status{font-size:12px;line-height:1.5;color:#a9bfc8;padding:10px 12px}
#projects .heading{margin-bottom:30px}
@media(max-width:720px){.sidebar-project-list{flex-basis:100%;width:100%;padding-left:12px;margin:0 0 8px}.sidebar-project-list a{white-space:normal;overflow-wrap:anywhere}}

.project-card-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center;justify-content:flex-end}
.project-card>div:first-child{min-width:0}
.project-card h2{overflow-wrap:anywhere}
.danger-text{color:#a12d2d}
.danger-button{background:#a12d2d}
.danger-button:hover{background:#812323}
#rename-message,#delete-message{font-size:13px;overflow-wrap:anywhere}
#rename-message:empty,#delete-message:empty{display:none}
#delete-project-name{color:var(--navy);overflow-wrap:anywhere}
@media(max-width:720px){.project-card{align-items:flex-start;flex-direction:column}.project-card-actions{justify-content:flex-start}.heading:has(#project-actions){flex-direction:column}}

/* Felles logo: samme SVG brukes i fanen, på innloggingssiden og i arbeidsområdet. */
.brand{flex-wrap:nowrap;gap:10px;letter-spacing:-.5px}
.brand-icon{display:block;flex-shrink:0;object-fit:contain}
.brand .brand-wordmark{color:white;font-size:20px;font-weight:800;white-space:nowrap}
.brand-wordmark span{color:#8dd9d0;font-weight:400}
.landing-brand{display:inline-flex;align-items:center;gap:12px}
.landing-brand strong{letter-spacing:-.5px}
@media(max-width:1000px) and (min-width:721px){.brand{gap:7px}.brand .brand-icon{width:30px;height:30px}.brand .brand-wordmark{font-size:18px}}
@media(max-width:720px){.brand .brand-icon{width:32px;height:32px}.brand .brand-wordmark{font-size:19px}}

/* Hele prosjektkortet åpner prosjektet, med separate handlingsknapper. */
.project-card{position:relative;transition:background-color .15s,border-color .15s}
.project-card:hover,.project-card:focus-within{background:#e8f4eb;border-color:#a7cdb3}
.project-card h2{margin:0}
.project-card-link{color:inherit;text-decoration:none}
.project-card-link::after{content:"";position:absolute;inset:0;border-radius:9px;cursor:pointer}
.project-card-link:focus-visible{outline:none}
.project-card-link:focus-visible::after{outline:3px solid #6ab4a8;outline-offset:3px}
.project-card-actions button{position:relative;z-index:1}
