.login-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: #f9f9fb;
}

.login-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  margin-bottom: 36px;
  border-bottom: 2px solid #e0e0e0;
  padding-bottom: 12px;
  width: 340px;
  justify-content: center;
}

.login-logo {
  width: 48px;
  height: 48px;
  margin-right: 18px;
}

.login-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: #181920;
  margin: 0;
}

.login-card {
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(60,60,80,0.09);
  padding: 32px 32px 24px 32px;
  min-width: 340px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.login-field {
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
}

.login-field label {
  margin-bottom: 5px;
  font-weight: 600;
  font-size: 0.95rem;
}

.login-field input {
  padding: 8px 10px;
  border-radius: 5px;
  border: 1px solid #ccc;
  font-size: 1.05rem;
  background: #f5f6fa;
}

.login-error {
  color: #d32f2f;
  margin-bottom: 12px;
  font-weight: 500;
}

button[type="submit"] {
  padding: 10px 0;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 7px;
  background: #004bb8;
  color: #fff;
  border: none;
  cursor: pointer;
  margin-top: 5px;
  transition: background 0.2s;
}

button[type="submit"]:disabled {
  background: #a4a8b4;
  cursor: not-allowed;
}
/* backdrop */
.ps-backdrop{
  position:fixed; inset:0;
  background:rgba(0,0,0,.35);
  display:flex; align-items:center; justify-content:center;
  padding:16px;            /* luft på små skjermer */
  z-index:1000;
}

/* modal */
.ps-modal{
  background:#fff; border-radius:12px;
  box-sizing:border-box;
  width: clamp(280px, 100vw - 32px, 720px);   /* aldri utenfor skjerm */
  max-width:720px;
  max-height: min(90vh, 100dvh - 32px);       /* synlig på mobil */
  padding:16px 18px;
  overflow:auto;                               /* scroll innhold hvis høyt */
  box-shadow:0 12px 36px rgba(0,0,0,.22);
}

/* grid */
.ps-grid{ display:grid; grid-template-columns:1fr; gap:10px; margin-top:10px; }
.ps-grid label{ display:flex; flex-direction:column; font-size:14px; color:#333; gap:4px; }
.ps-grid input,.ps-grid select{
  padding:10px 12px;
  border:1px solid #d1d5db; border-radius:8px;
  background:#fff; outline:none;
  transition:border-color .15s, box-shadow .15s;
  min-width:0; /* hindrer overflow i flex/grid */
}
.ps-grid input:focus,.ps-grid select:focus{ border-color:#7aa6e6; box-shadow:0 0 0 3px rgba(122,166,230,.18); }

/* actions */
.ps-actions{ display:flex; justify-content:flex-end; gap:8px; margin-top:14px; }
.ps-actions button{ padding:8px 12px; border:1px solid #d1d5db; background:#f9fafb; border-radius:8px; cursor:pointer; }
.ps-actions button:hover{ background:#f3f4f6; }
.ps-actions .ps-primary{ background:#2563eb; color:#fff; border-color:#1e40af; }
.ps-actions .ps-primary:hover{ filter:brightness(1.05); }
.ps-actions .ps-primary:disabled, .ps-actions button:disabled{ opacity:.6; cursor:not-allowed; }

.ps-hint{ margin-top:6px; color:#6b7280; font-size:12px }

/* to kolonner når plassen tillater det */
@media (min-width: 720px){
  .ps-grid{ grid-template-columns:1fr 1fr; }
}

/* ekstra tight på veldig smal skjerm */
@media (max-width: 380px){
  .ps-backdrop{ padding:10px; }
  .ps-modal{ padding:12px; border-radius:10px; }
}
/* src/App.css */

/* ===== HEADER ===== */
.app-header{
  display:flex; justify-content:center; align-items:center;
  padding:16px 24px; background:#fff; border-bottom:1px solid #e5e7eb;
  height:72px; box-sizing:border-box;
}
.header-logo{ width:60px; height:60px; margin-right:16px; }
.header-title{ font-size:2rem; color:#040404; margin:0; }

/* ===== AUTH BAR ===== */
/* erstatt eksisterende .auth-bar */
.auth-bar{
  display:flex; align-items:center; justify-content:space-between;
  padding:8px 12px; background:#fff; border-bottom:1px solid #e5e7eb;
}
.auth-left, .auth-right{ display:flex; align-items:center; gap:10px; }

@media (max-width:640px){
  .auth-bar{ flex-wrap:wrap; row-gap:8px; }
  .auth-right{ margin-left:auto; } /* sørger for at Logg ut dytter helt høyre på små skjermer */
}


/* Pilleknapper */
.auth-btn{
  -webkit-appearance:none; appearance:none;
  border:1px solid #e5e7eb; background:#fff; color:#0f172a;
  padding:8px 12px; border-radius:9999px; font-weight:600;
  text-decoration:none; line-height:1; cursor:pointer;
  transition:background .15s,border-color .15s,transform .05s;
}
.auth-btn:hover{ background:#f8fafc; border-color:#cbd5e1; }
.auth-btn:active{ transform:translateY(1px); }
.auth-btn:focus-visible{ outline:2px solid #93c5fd; outline-offset:2px; }
.auth-btn.ghost{ background:#f9fafb; border-color:#e5e7eb; color:#0f172a; }
.auth-btn.logout{ border-color:#fecaca; color:#991b1b; background:#fff; }
.auth-btn.logout:hover{ background:#fff5f5; border-color:#fca5a5; }

/* Grønn status-sirkel + popover */
.auth-bucket{ position:relative; }
.auth-dot{
  width:36px; height:36px; border-radius:9999px;
  background:#16a34a; border:2px solid #10b981; cursor:pointer;
  box-shadow: inset 0 0 0 3px #d1fae5;
  display:inline-block; position:relative;
}
.auth-dot::after{
  content:''; position:absolute; left:50%; top:50%;
  width:8px; height:8px; background:#fff; border-radius:9999px;
  transform:translate(-50%,-50%);
}
.auth-popover{
  position:absolute; right:0; top:calc(100% + 8px);
  min-width:260px; background:#fff; border:1px solid #e5e7eb;
  border-radius:12px; box-shadow:0 12px 24px rgba(0,0,0,.12); z-index:100;
  padding:12px;
}
.auth-popover .email{ font-weight:600; color:#111827; word-break:break-all; }
.auth-popover .hint{ font-size:.8rem; color:#6b7280; margin-top:4px; }

/* ===== TILBAKE-KNAPP ===== */
.back-link{ margin-right:12px; text-decoration:none; color:#000; font-weight:600; font-size:1rem; }
.back-link:hover{ text-decoration:underline; }

/* ===== KORT-GALLERI ===== */
.cards-container{
  display:flex; flex-wrap:wrap; justify-content:center; align-items:center;
  gap:16px; padding:20px; min-height:calc(100vh - 72px);
}
.card{
  display:block; text-decoration:none; color:inherit; border:1px solid #ddd;
  border-radius:8px; padding:16px; text-align:center; background:#fff;
  transition:transform .2s, box-shadow .2s; will-change:transform, box-shadow;
}
.card:hover{ transform:translateY(-4px); box-shadow:0 8px 16px rgba(0,0,0,.15); }
.card img{ width:80px; height:80px; object-fit:contain; transition:transform .2s; }
.card:hover img{ transform:scale(1.1); }
.card h4{ margin-top:12px; text-transform:capitalize; }

/* ===== FOOTER ===== */
.app-footer{ background:#fff; border-top:1px solid #e5e7eb; margin-top:24px; }
.app-footer-inner{
  max-width:940px; margin:0 auto; padding:12px 16px;
  display:flex; align-items:center; justify-content:center; gap:10px; text-align:center;
}
.footer-logo{ width:28px; height:28px; }
.footer-title{ font-weight:700; color:#111827; }
.footer-divider{ border-top:1px solid #e5e7eb; margin:0; }
.app-footer-sub{
  max-width:940px; margin:0 auto; padding:10px 16px 16px;
  font-size:.95rem; color:#374151; text-align:center;
}
.app-footer-sub a{ color:#1453a2; text-decoration:none; font-weight:600; }
.app-footer-sub a:hover{ text-decoration:underline; }

/* ===== MOBIL ===== */
@media (max-width:640px){
  .app-header{ height:56px; padding:10px 14px; }
  .header-logo{ width:40px; height:40px; margin-right:10px; }
  .header-title{ font-size:1.5rem; }
  .auth-bar{ padding:6px; gap:8px; flex-wrap:wrap; }
  .auth-btn{ padding:7px 10px; }
  .app-footer-inner, .app-footer-sub{ padding-left:12px; padding-right:12px; }
}
:root{
  --brand-tint:  #eef7f1;  /* lys dempet grønn */
  --brand-edge:  #d7eadf;  /* matchende kantfarge */
}

/* Grønn bakgrunn bak logo + ByggKalk (mellom linjene) */
.app-header{
  background: var(--brand-tint);
  border-bottom: 1px solid var(--brand-edge);
}

/* Footer-linje og grønn felt under */
.footer-divider{
  border-top: 1px solid var(--brand-edge);
}
.app-footer-sub{
  background: var(--brand-tint);
}
