body {
  min-height: 100vh;
}

body.auth-portal {
  background:
    linear-gradient(128deg, rgba(11, 18, 32, 0.84), rgba(15, 63, 151, 0.54)),
    url('../images/Bilder%20nettside/1.jpg') center/cover fixed no-repeat;
}

.auth-page,
.dashboard-page {
  width: min(1100px, calc(100% - 2rem));
  margin: 3rem auto;
}

.auth-shell {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 24px 55px rgba(2, 6, 23, 0.24);
  border: 1px solid rgba(255, 255, 255, 0.48);
  background: linear-gradient(130deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.08));
  backdrop-filter: blur(12px);
}

.auth-hero {
  min-height: 620px;
  background:
    linear-gradient(178deg, rgba(11, 18, 32, 0.1), rgba(11, 18, 32, 0.7)),
    url('../images/Bilder%20nettside/login-dokumenter.jpg') center/cover no-repeat;
  position: relative;
}

.auth-hero__overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 2rem;
  color: #ffffff;
}

.auth-hero__overlay h1 {
  margin: 0;
  font-size: clamp(1.65rem, 2.6vw, 2.25rem);
  letter-spacing: 0.01em;
}

.auth-hero__overlay p {
  margin: 0.6rem 0 0;
  max-width: 30ch;
  color: rgba(255, 255, 255, 0.88);
}

.auth-card {
  width: 100%;
  margin: 0;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(16px);
  padding: 2rem;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.auth-brand img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.15);
}

.auth-brand h1 {
  margin: 0;
}

.auth-brand h2 {
  margin: 0;
  font-size: 1.6rem;
}

.auth-brand p {
  margin: 0.25rem 0 0;
  color: #4b5563;
}

.auth-role-note {
  margin-top: 0.9rem;
  border: 1px solid rgba(15, 63, 151, 0.2);
  background: linear-gradient(180deg, rgba(15, 63, 151, 0.06), rgba(15, 63, 151, 0.02));
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
}

.auth-role-note p {
  margin: 0;
  color: #39506f;
  font-size: 0.9rem;
}

.auth-role-note p + p {
  margin-top: 0.35rem;
}

.auth-form {
  display: grid;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.auth-register-actions {
  margin-top: 1.2rem;
}

.auth-register-hint {
  margin: 0.45rem 0 0;
  font-size: 0.9rem;
  color: #5d6a7f;
}

.password-field {
  position: relative;
}

.password-field input {
  width: 100%;
  padding-right: 4.2rem;
}

.password-toggle {
  position: absolute;
  right: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  border: 1px solid rgba(15, 63, 151, 0.26);
  background: rgba(255, 255, 255, 0.86);
  color: #0f3f97;
  border-radius: 8px;
  min-height: 34px;
  min-width: 52px;
  padding: 0 0.7rem;
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
}

.password-toggle:hover,
.password-toggle:focus {
  background: rgba(15, 63, 151, 0.08);
}

.auth-register-toggle {
  width: 100%;
  background: transparent;
  color: #0f3f97;
  border: 1px solid rgba(15, 63, 151, 0.4);
  font-weight: 700;
}

.auth-register-toggle:hover,
.auth-register-toggle:focus {
  background: rgba(15, 63, 151, 0.08);
}

.auth-register-wrap {
  margin-top: 1rem;
  padding-top: 0.35rem;
  animation: auth-register-reveal 200ms ease;
}

.auth-divider {
  margin: 1.25rem 0 0.5rem;
  border-top: 1px solid rgba(15, 23, 42, 0.12);
  text-align: center;
}

.auth-divider span {
  display: inline-block;
  margin-top: -0.7rem;
  padding: 0 0.55rem;
  background: rgba(255, 255, 255, 0.96);
  color: #4b5563;
  font-size: 0.9rem;
}

.auth-form input {
  border: 1px solid rgba(15, 23, 42, 0.2);
  border-radius: 10px;
  min-height: 44px;
  padding: 0.6rem 0.7rem;
  font-size: 1rem;
}

.auth-submit {
  margin-top: 0.8rem;
}

.auth-register {
  background: #0f3f97;
  color: #fff;
}

.auth-message {
  min-height: 1.3rem;
  color: #0f766e;
  margin: 0;
}

.auth-message.error {
  color: #b42318;
}

.auth-success-badge {
  margin: 0;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.84rem;
  font-weight: 700;
  color: #0b6b64;
  background: rgba(15, 118, 110, 0.14);
  border: 1px solid rgba(15, 118, 110, 0.3);
}

.auth-success-badge[hidden] {
  display: none !important;
}

.auth-success-icon {
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 118, 110, 0.2);
  color: #0b6b64;
  font-size: 0.78rem;
  line-height: 1;
}

.auth-success-badge.show {
  animation: auth-success-pop 320ms ease;
}

.auth-success-badge.show .auth-success-icon {
  animation: auth-check-pop 360ms ease;
}

.auth-card.shake {
  animation: auth-card-shake 360ms ease;
}

.auth-note {
  margin-top: 1rem;
  font-size: 0.95rem;
  color: #4b5563;
}

@keyframes auth-register-reveal {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes auth-success-pop {
  0% {
    opacity: 0;
    transform: scale(0.92);
  }
  70% {
    opacity: 1;
    transform: scale(1.03);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes auth-check-pop {
  0% {
    transform: scale(0.35) rotate(-22deg);
    opacity: 0;
  }
  65% {
    transform: scale(1.12) rotate(6deg);
    opacity: 1;
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

@keyframes auth-card-shake {
  0% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-6px);
  }
  45% {
    transform: translateX(5px);
  }
  70% {
    transform: translateX(-3px);
  }
  100% {
    transform: translateX(0);
  }
}

.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.dashboard-header h1 {
  margin: 0;
}

.dashboard-header h1,
.admin-panel h2,
.panel h3 {
  line-height: 1.12;
}

.dashboard-header p {
  margin: 0.3rem 0 0;
  color: #4b5563;
  line-height: 1.45;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.panel {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 18px 45px rgba(2, 6, 23, 0.08);
  border-radius: 16px;
  padding: 1rem;
  min-height: 100%;
}

.panel h2 {
  margin-top: 0;
}

.panel h3 {
  margin: 0 0 0.7rem;
}

.project-list,
.asset-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.6rem;
}

.project-item,
.asset-item {
  border: 1px solid rgba(15, 23, 42, 0.16);
  border-radius: 10px;
  padding: 0.7rem;
  background: #fff;
}

.project-item button {
  text-align: left;
  background: transparent;
  border: 0;
  color: #0b1220;
  font: inherit;
  cursor: pointer;
  padding: 0;
}

.project-item__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 0.5rem;
}

.project-item__open {
  width: 100%;
  min-width: 0;
}

.project-item__open.active {
  background: rgba(15, 63, 151, 0.1);
  border-radius: 8px;
  padding: 0.35rem;
}

.project-item__open strong {
  display: block;
  margin-bottom: 0.2rem;
}

.project-item__open span {
  display: block;
  color: #4b5563;
  line-height: 1.45;
  word-break: break-word;
}

.project-item__delete {
  width: auto;
  min-width: 72px;
  border: 1px solid rgba(180, 35, 24, 0.35);
  background: rgba(180, 35, 24, 0.08);
  color: #b42318;
  border-radius: 8px;
  padding: 0.35rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  align-self: start;
  text-align: center;
  white-space: nowrap;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.project-item__delete:hover,
.project-item__delete:focus {
  background: #b42318;
  border-color: #b42318;
  color: #ffffff;
}

.project-item__open.active {
  background: rgba(15, 63, 151, 0.1);
  border-radius: 8px;
  padding: 0.35rem;
}

.project-item__open strong {
  display: block;
  margin-bottom: 0.2rem;
}

.asset-folders {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.65rem;
  margin-top: 0.25rem;
}

.asset-folder-tile {
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, rgba(15, 63, 151, 0.03) 100%);
  padding: 0.9rem;
  text-align: left;
  cursor: pointer;
  display: grid;
  gap: 0.35rem;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease, background-color 160ms ease;
  min-height: 102px;
}

.asset-folder-tile:hover,
.asset-folder-tile:focus {
  border-color: rgba(15, 63, 151, 0.45);
  box-shadow: 0 10px 20px rgba(15, 63, 151, 0.12);
  transform: translateY(-1px);
}

.asset-folder-tile.active {
  border-color: #0f3f97;
  background: linear-gradient(180deg, rgba(15, 63, 151, 0.12) 0%, rgba(15, 63, 151, 0.05) 100%);
}

.asset-folder-icon {
  width: 42px;
  height: 28px;
  border: 2px solid #0f3f97;
  border-radius: 6px;
  position: relative;
  background: rgba(15, 63, 151, 0.12);
}

.asset-folder-icon::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 4px;
  width: 16px;
  height: 8px;
  border: 2px solid #0f3f97;
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
  background: rgba(15, 63, 151, 0.12);
}

.asset-folder-name {
  font-weight: 700;
  color: #0b1220;
}

.asset-folder-count {
  font-size: 0.84rem;
  color: #5d6a7f;
}

.asset-panel-intro {
  margin: 0 0 0.85rem;
  color: #4b5563;
  line-height: 1.5;
}

.resource-panel__head {
  margin-bottom: 0.6rem;
}

.resource-summary {
  margin: 0.15rem 0 0;
  color: #24344f;
  font-size: 0.95rem;
  font-weight: 500;
}

.resource-toolbar {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin: 0 0 1rem;
}

.resource-toolbar__btn {
  flex: 1 1 180px;
  min-height: 52px;
  padding: 0.7rem 0.95rem;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid rgba(15, 63, 151, 0.28);
  color: #0f3f97;
  font-weight: 700;
  font-size: 0.98rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  box-shadow: 0 6px 14px rgba(15, 63, 151, 0.08);
  transition: background-color 140ms ease, border-color 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.resource-toolbar__btn:hover,
.resource-toolbar__btn:focus {
  background: rgba(15, 63, 151, 0.06);
  border-color: rgba(15, 63, 151, 0.55);
  transform: translateY(-1px);
}

.resource-toolbar__btn.is-open {
  background: rgba(15, 63, 151, 0.12);
  border-color: rgba(15, 63, 151, 0.55);
}

.resource-toolbar__btn--primary {
  background: #0f3f97;
  color: #ffffff;
  border-color: #0f3f97;
  box-shadow: 0 10px 20px rgba(15, 63, 151, 0.25);
}

.resource-toolbar__btn--primary:hover,
.resource-toolbar__btn--primary:focus {
  background: #0d357f;
  border-color: #0d357f;
}

.resource-toolbar__btn--primary.is-open {
  background: #0d357f;
  border-color: #0d357f;
  color: #ffffff;
}

.resource-toolbar__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(15, 63, 151, 0.12);
  color: #0f3f97;
  font-size: 0.95rem;
  font-weight: 900;
  line-height: 1;
}

.resource-toolbar__btn--primary .resource-toolbar__icon {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.resource-toolbar__icon[data-icon='upload']::before {
  content: '\2191';
}

.resource-toolbar__icon[data-icon='download']::before {
  content: '\2193';
}

.resource-toolbar__icon[data-icon='people']::before {
  content: '\002A';
}

.resource-toolbar__count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.55rem;
  height: 1.35rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(15, 63, 151, 0.14);
  color: #0f3f97;
  margin-left: 0.3rem;
}

.resource-toolbar__btn--primary .resource-toolbar__count {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.resource-empty {
  margin: 0.5rem 0 1rem;
  padding: 1.6rem 1rem;
  border-radius: 14px;
  border: 1px dashed rgba(15, 63, 151, 0.28);
  background: rgba(15, 63, 151, 0.03);
  text-align: center;
  display: grid;
  gap: 0.55rem;
  justify-items: center;
}

.resource-empty__icon {
  width: 58px;
  height: 44px;
  border-radius: 10px;
  border: 2px solid #0f3f97;
  background: rgba(15, 63, 151, 0.12);
  position: relative;
}

.resource-empty__icon::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 8px;
  width: 24px;
  height: 12px;
  border: 2px solid #0f3f97;
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  background: rgba(15, 63, 151, 0.12);
}

.resource-empty__title {
  margin: 0;
  color: #0b1220;
  font-size: 1.15rem;
}

.resource-empty__text {
  margin: 0;
  color: #4b5563;
  max-width: 44ch;
}

.resource-empty__cta {
  background: #0f3f97;
  color: #ffffff;
  border-color: #0f3f97;
}

.resource-empty__cta:hover,
.resource-empty__cta:focus {
  background: #0d357f;
  border-color: #0d357f;
}

.asset-folder-content__toolbar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin: 0 0 0.65rem;
  justify-content: space-between;
  align-items: center;
}

.asset-folder-content__back {
  background: transparent;
  border-color: rgba(15, 63, 151, 0.28);
  color: #0f3f97;
}

.asset-folder-content__back:hover,
.asset-folder-content__back:focus {
  background: rgba(15, 63, 151, 0.08);
  border-color: rgba(15, 63, 151, 0.45);
}

.asset-folder-content__download {
  background: #0f3f97;
  color: #ffffff;
  border-color: #0f3f97;
}

.asset-folder-content__download:hover,
.asset-folder-content__download:focus {
  background: #0d357f;
  border-color: #0d357f;
}

.project-access-overview {
  margin: 0 0 0.9rem;
  padding: 0.75rem;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  background: rgba(15, 63, 151, 0.04);
}

.project-access-overview__title {
  margin: 0 0 0.45rem;
  font-size: 0.9rem;
  color: #0f3f97;
}

.project-access-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.project-access-item {
  display: grid;
  gap: 0.05rem;
  padding: 0.35rem 0.45rem;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.1);
}

.project-access-item strong {
  color: #0b1220;
  font-size: 0.86rem;
}

.project-access-item span {
  color: #5d6a7f;
  font-size: 0.8rem;
}

.project-access-role {
  display: inline-flex;
  width: fit-content;
  margin-top: 0.1rem;
  padding: 0.1rem 0.42rem;
  border-radius: 999px;
  background: rgba(15, 63, 151, 0.1);
  color: #0f3f97;
  font-size: 0.72rem;
  font-weight: 700;
}

.project-access-item--empty {
  color: #5d6a7f;
  font-size: 0.84rem;
}

.asset-folder-content {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.asset-folder-content__title {
  margin: 0 0 0.7rem;
  font-size: 1.02rem;
  color: #0f3f97;
}

.asset-download-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 0.9rem;
}

.asset-download-btn {
  background: #0f3f97;
  border-color: #0f3f97;
  color: #ffffff;
  flex: 1 1 220px;
  justify-content: center;
}

.asset-download-btn:hover,
.asset-download-btn:focus {
  background: #0d357f;
  border-color: #0d357f;
}

.asset-item a {
  font-weight: 700;
  color: #0f3f97;
}

.asset-item__actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.asset-delete-btn {
  background: #b42318;
  border-color: #b42318;
  color: #ffffff;
}

.asset-delete-btn:hover,
.asset-delete-btn:focus {
  background: #8f1c14;
  border-color: #8f1c14;
}

.asset-item__meta {
  margin: 0 0 0.35rem;
  color: #5d6a7f;
  font-size: 0.86rem;
}

.asset-item__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.6rem;
  margin: 0 0 0.35rem;
  flex-wrap: wrap;
}

.asset-item__title {
  margin: 0;
  font-weight: 600;
  color: #0b1220;
}

.uploader-info {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-left: auto;
}

.uploader-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  border: 1px solid transparent;
  white-space: nowrap;
}

.uploader-badge--admin {
  background: rgba(15, 63, 151, 0.12);
  color: #0f3f97;
  border-color: rgba(15, 63, 151, 0.28);
}

.uploader-badge--member {
  background: rgba(16, 122, 87, 0.12);
  color: #10745a;
  border-color: rgba(16, 122, 87, 0.28);
}

.uploader-badge--own {
  background: rgba(219, 143, 32, 0.14);
  color: #8f5a10;
  border-color: rgba(219, 143, 32, 0.35);
}

.uploader-badge--unknown {
  background: rgba(15, 23, 42, 0.08);
  color: #4b5563;
  border-color: rgba(15, 23, 42, 0.12);
}

.uploader-time {
  font-size: 0.74rem;
  color: #5d6a7f;
}

.asset-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0 0 0.85rem;
  padding: 0.3rem;
  border-radius: 12px;
  background: rgba(15, 63, 151, 0.06);
  border: 1px solid rgba(15, 63, 151, 0.12);
}

.asset-filter-tab {
  flex: 1 1 auto;
  min-width: 120px;
  border: 1px solid transparent;
  background: transparent;
  color: #24344f;
  border-radius: 8px;
  padding: 0.4rem 0.7rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.asset-filter-tab:hover,
.asset-filter-tab:focus {
  background: rgba(15, 63, 151, 0.1);
  color: #0f3f97;
}

.asset-filter-tab.active {
  background: #0f3f97;
  color: #ffffff;
  border-color: #0f3f97;
  box-shadow: 0 6px 14px rgba(15, 63, 151, 0.25);
}

.asset-filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.55rem;
  height: 1.35rem;
  padding: 0 0.4rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  background: rgba(15, 63, 151, 0.14);
  color: #0f3f97;
}

.asset-filter-tab.active .asset-filter-count {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.member-upload {
  margin: 0 0 1rem;
  padding: 0.9rem;
  border-radius: 14px;
  border: 1px solid rgba(15, 63, 151, 0.16);
  background: linear-gradient(180deg, rgba(15, 63, 151, 0.04) 0%, rgba(255, 255, 255, 0.9) 100%);
  display: grid;
  gap: 0.75rem;
}

.member-upload__header {
  display: grid;
  gap: 0.15rem;
}

.member-upload__title {
  margin: 0;
  font-size: 1.02rem;
  color: #0f3f97;
}

.member-upload__hint {
  margin: 0;
  font-size: 0.86rem;
  color: #5d6a7f;
}

.member-upload__form {
  display: grid;
  gap: 0.7rem;
}

.member-upload__dropzone {
  position: relative;
  display: grid;
  gap: 0.3rem;
  place-items: center;
  padding: 1.35rem 1rem;
  border-radius: 12px;
  border: 2px dashed rgba(15, 63, 151, 0.34);
  background: rgba(255, 255, 255, 0.75);
  color: #24344f;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.member-upload__dropzone:hover,
.member-upload__dropzone:focus-within {
  background: rgba(15, 63, 151, 0.06);
  border-color: rgba(15, 63, 151, 0.55);
}

.member-upload__dropzone.is-dragover {
  background: rgba(15, 63, 151, 0.14);
  border-color: #0f3f97;
  transform: scale(1.01);
}

.member-upload__dropzone-icon {
  width: 46px;
  height: 32px;
  border-radius: 8px;
  border: 2px solid #0f3f97;
  background: rgba(15, 63, 151, 0.12);
  position: relative;
}

.member-upload__dropzone-icon::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 12px;
  border-left: 2px solid #0f3f97;
  border-top: 2px solid #0f3f97;
  transform: translate(-50%, -35%) rotate(45deg);
}

.member-upload__dropzone-title {
  font-weight: 700;
  color: #0f3f97;
}

.member-upload__dropzone-hint {
  font-size: 0.84rem;
  color: #5d6a7f;
}

.member-upload__input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.member-upload__meta {
  display: grid;
  gap: 0.55rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.member-upload__field {
  display: grid;
  gap: 0.25rem;
  font-size: 0.86rem;
  color: #0b1220;
  font-weight: 600;
}

.member-upload__field select,
.member-upload__field input {
  border: 1px solid rgba(15, 23, 42, 0.2);
  border-radius: 10px;
  min-height: 40px;
  padding: 0.45rem 0.6rem;
  font-size: 0.94rem;
  font-family: inherit;
  font-weight: 500;
  color: #0b1220;
  background: #ffffff;
}

.member-upload__summary {
  margin: 0;
  font-size: 0.88rem;
  color: #24344f;
}

.member-upload__list {
  list-style: none;
  margin: 0;
  padding: 0.4rem;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: rgba(255, 255, 255, 0.7);
  display: grid;
  gap: 0.3rem;
  max-height: 220px;
  overflow-y: auto;
}

.member-upload__list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.32rem 0.4rem;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  font-size: 0.88rem;
  color: #24344f;
}

.member-upload__list-info {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.member-upload__list-name {
  font-weight: 600;
  color: #0b1220;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 36ch;
}

.member-upload__list-size {
  font-size: 0.78rem;
  color: #5d6a7f;
}

.member-upload__list-remove {
  border: 0;
  background: rgba(180, 35, 24, 0.1);
  color: #b42318;
  border-radius: 999px;
  width: 26px;
  height: 26px;
  font-size: 1.1rem;
  line-height: 1;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}

.member-upload__list-remove:hover,
.member-upload__list-remove:focus {
  background: rgba(180, 35, 24, 0.2);
}

.member-upload__list-more {
  font-style: italic;
  color: #5d6a7f;
  padding: 0.2rem 0.4rem;
}

.member-upload__actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.member-upload__clear {
  background: transparent;
  border-color: rgba(15, 63, 151, 0.28);
  color: #0f3f97;
}

.member-upload__clear:hover,
.member-upload__clear:focus {
  background: rgba(15, 63, 151, 0.08);
}

.member-upload__message {
  margin: 0;
  min-height: 1.2rem;
}

.asset-list .asset-item {
  box-shadow: 0 8px 20px rgba(2, 6, 23, 0.04);
}

.admin-panel {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 18px 45px rgba(2, 6, 23, 0.08);
  border-radius: 16px;
  padding: 1rem;
}

.admin-panel h2 {
  margin-top: 0;
  margin-bottom: 0.35rem;
}

.admin-intro {
  margin-top: 0;
  margin-bottom: 1rem;
  color: #4b5563;
  line-height: 1.5;
}

.admin-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
}

.admin-form {
  display: grid;
  gap: 0.5rem;
  flex: 1;
}

.panel {
  display: flex;
  flex-direction: column;
}

.panel h3 {
  margin-bottom: 0.35rem;
}

.admin-form > button[type='submit'] {
  margin-top: auto;
}

.admin-form label {
  font-weight: 600;
  color: #0b1220;
  margin-top: 0.05rem;
}

.admin-toggle-btn {
  justify-self: stretch;
  width: 100%;
  border-color: rgba(15, 63, 151, 0.28);
  background: rgba(15, 63, 151, 0.08);
  color: #0f3f97;
}

.admin-toggle-btn + .admin-collapsible-panel {
  margin-top: -0.1rem;
}

.admin-toggle-btn:hover,
.admin-toggle-btn:focus {
  background: rgba(15, 63, 151, 0.14);
  border-color: rgba(15, 63, 151, 0.42);
}

.admin-collapsible-panel {
  display: grid;
  gap: 0.5rem;
  padding: 0.8rem;
  margin-bottom: 0.1rem;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  background: rgba(15, 63, 151, 0.04);
}

.admin-collapsible-panel[hidden] {
  display: none !important;
}

.admin-form input,
.admin-form select,
.admin-form textarea {
  border: 1px solid rgba(15, 23, 42, 0.2);
  border-radius: 10px;
  min-height: 42px;
  padding: 0.55rem 0.65rem;
  font-size: 0.96rem;
  font-family: inherit;
}

.admin-member-select {
  min-height: 120px;
  padding: 0.45rem;
}

.admin-help {
  margin: -0.2rem 0 0.25rem;
  color: #5d6a7f;
  font-size: 0.86rem;
  line-height: 1.45;
}

.selected-members-box {
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 10px;
  background: rgba(15, 63, 151, 0.04);
  padding: 0.5rem 0.6rem;
  display: grid;
  gap: 0.4rem;
}

.selected-members-box__title {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f3f97;
}

.selected-members-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.selected-members-chip {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.18rem 0.52rem;
  font-size: 0.74rem;
  font-weight: 600;
  background: rgba(15, 63, 151, 0.12);
  color: #0f3f97;
}

.available-member-chip {
  border: 1px solid rgba(15, 63, 151, 0.22);
  border-radius: 999px;
  padding: 0.2rem 0.58rem;
  font-size: 0.74rem;
  font-weight: 600;
  color: #0f3f97;
  background: rgba(15, 63, 151, 0.08);
  cursor: pointer;
}

.available-member-chip:hover,
.available-member-chip:focus {
  background: rgba(15, 63, 151, 0.16);
  border-color: rgba(15, 63, 151, 0.38);
}

.upload-selection-summary {
  margin: 0;
  font-size: 0.9rem;
  color: #1f2937;
}

.upload-selection-list {
  margin: 0;
  padding: 0.4rem;
  list-style: none;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 10px;
  background: rgba(15, 63, 151, 0.04);
  display: grid;
  gap: 0.25rem;
}

.upload-selection-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.2rem 0.25rem;
  font-size: 0.86rem;
  color: #24344f;
}

.upload-selection-list li strong {
  color: #0f3f97;
  font-size: 0.82rem;
}

.upload-selection-list__more {
  color: #4b5563;
  font-style: italic;
}

.admin-form textarea {
  min-height: 90px;
  resize: vertical;
}

@media (max-width: 860px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-hero {
    min-height: 220px;
  }

  .auth-card {
    padding: 1.25rem;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ============================================================
   Filutforsker (Windows-lignende) – enkel og tydelig
   ============================================================ */

.explorer-head {
  margin-bottom: 0.9rem;
}

.explorer-title {
  margin: 0;
}

.explorer-hint {
  margin: 0.35rem 0 0;
  color: #4b5563;
  font-size: 1rem;
  line-height: 1.5;
}

.explorer {
  display: grid;
  gap: 1rem;
}

/* Store handlingsknapper med ikon + forklaring */
.explorer-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.7rem;
}

.explorer-action {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-align: left;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 2px solid rgba(15, 63, 151, 0.2);
  background: #ffffff;
  color: #0b1220;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(2, 6, 23, 0.06);
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.explorer-action:hover,
.explorer-action:focus {
  transform: translateY(-2px);
  border-color: rgba(15, 63, 151, 0.55);
  box-shadow: 0 12px 24px rgba(15, 63, 151, 0.14);
}

.explorer-action.is-open {
  border-color: #0f3f97;
  background: rgba(15, 63, 151, 0.06);
}

.explorer-action--primary {
  background: #0f3f97;
  border-color: #0f3f97;
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(15, 63, 151, 0.28);
}

.explorer-action--primary:hover,
.explorer-action--primary:focus {
  background: #0d357f;
  border-color: #0d357f;
}

.explorer-action__icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(15, 63, 151, 0.12);
  color: #0f3f97;
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1;
}

.explorer-action--primary .explorer-action__icon {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.explorer-action__icon[data-icon='upload']::before {
  content: '\2191';
}

.explorer-action__icon[data-icon='download']::before {
  content: '\2193';
}

.explorer-action__icon[data-icon='people']::before {
  content: '\1F465';
}

.explorer-action__text {
  display: grid;
  gap: 0.1rem;
  line-height: 1.2;
}

.explorer-action__text strong {
  font-size: 1.08rem;
}

.explorer-action__text small {
  font-size: 0.86rem;
  opacity: 0.85;
}

/* Adresselinje / brødsmuler */
.explorer-path {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 0.55rem 0.75rem;
  border-radius: 10px;
  border: 1px solid rgba(15, 23, 42, 0.14);
  background: #f4f6fb;
  font-size: 1rem;
}

.explorer-path__crumb {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 0;
  background: transparent;
  color: #0f3f97;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 0.2rem 0.4rem;
  border-radius: 8px;
}

.explorer-path__crumb:hover,
.explorer-path__crumb:focus {
  background: rgba(15, 63, 151, 0.1);
}

.explorer-path__crumb.is-current {
  color: #0b1220;
  cursor: default;
}

.explorer-path__home-icon {
  width: 22px;
  height: 16px;
  border: 2px solid currentColor;
  border-radius: 4px;
  position: relative;
  display: inline-block;
}

.explorer-path__home-icon::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 2px;
  width: 9px;
  height: 6px;
  border: 2px solid currentColor;
  border-bottom: 0;
  border-radius: 3px 3px 0 0;
}

.explorer-path__sep {
  color: #94a3b8;
  font-size: 1.1rem;
  font-weight: 700;
}

.explorer-path__current {
  font-weight: 700;
  color: #0b1220;
}

/* Selve filvinduet */
.explorer-window {
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 14px;
  background: #ffffff;
  padding: 0.9rem;
  min-height: 180px;
}

/* Mappe-rutenett i Windows-stil */
.explorer-folders {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.8rem;
}

.explorer-folder {
  display: grid;
  justify-items: center;
  gap: 0.4rem;
  padding: 1rem 0.6rem;
  border-radius: 12px;
  border: 2px solid transparent;
  background: transparent;
  cursor: pointer;
  text-align: center;
  transition: background-color 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.explorer-folder:hover,
.explorer-folder:focus {
  background: rgba(15, 63, 151, 0.06);
  border-color: rgba(15, 63, 151, 0.3);
  transform: translateY(-2px);
}

/* Klassisk gul mappe-ikon */
.explorer-folder__icon {
  width: 76px;
  height: 58px;
  position: relative;
  filter: drop-shadow(0 6px 8px rgba(2, 6, 23, 0.12));
}

.explorer-folder__icon::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 6px;
  width: 34px;
  height: 12px;
  background: #f4b53f;
  border-radius: 6px 8px 0 0;
}

.explorer-folder__icon::after {
  content: '';
  position: absolute;
  top: 12px;
  left: 0;
  width: 76px;
  height: 46px;
  background: linear-gradient(180deg, #ffd873 0%, #f6b93b 100%);
  border-radius: 8px;
}

.explorer-folder__name {
  font-weight: 700;
  color: #0b1220;
  font-size: 1.02rem;
  word-break: break-word;
}

.explorer-folder__count {
  font-size: 0.88rem;
  color: #5d6a7f;
}

/* Filliste inne i en mappe */
.explorer-files__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.7rem;
}

.explorer-files__back {
  border: 2px solid rgba(15, 63, 151, 0.28);
  background: #ffffff;
  color: #0f3f97;
  font-weight: 700;
  border-radius: 10px;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
  font-size: 1rem;
}

.explorer-files__back:hover,
.explorer-files__back:focus {
  background: rgba(15, 63, 151, 0.08);
}

.explorer-files__download {
  border: 0;
  background: #0f3f97;
  color: #ffffff;
  font-weight: 700;
  border-radius: 10px;
  padding: 0.55rem 0.9rem;
  cursor: pointer;
  font-size: 1rem;
}

.explorer-files__download:hover,
.explorer-files__download:focus {
  background: #0d357f;
}

.explorer-files__title {
  margin: 0 0 0.7rem;
  font-size: 1.1rem;
  color: #0b1220;
}

/* Fil-rader med ikon + tekst */
.asset-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.55rem;
}

.asset-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 12px;
  padding: 0.75rem 0.85rem;
  background: #ffffff;
}

.asset-item__icon {
  flex: 0 0 auto;
  width: 40px;
  height: 50px;
  position: relative;
  border-radius: 5px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
}

.asset-item__icon::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  border-width: 0 12px 12px 0;
  border-style: solid;
  border-color: #cbd5e1 #f4f6fb;
}

.asset-item__icon::after {
  content: attr(data-type);
  position: absolute;
  left: 0;
  bottom: 6px;
  width: 100%;
  text-align: center;
  font-size: 0.5rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #ffffff;
}

.asset-item__icon[data-type='image']::after { content: 'BILDE'; background: #2f9e6b; }
.asset-item__icon[data-type='pdf']::after { content: 'PDF'; background: #c0392b; }
.asset-item__icon[data-type='doc']::after { content: 'DOC'; background: #2f6bd4; }
.asset-item__icon[data-type='sheet']::after { content: 'ARK'; background: #1f8f4e; }
.asset-item__icon[data-type='slides']::after { content: 'PPT'; background: #d1782b; }
.asset-item__icon[data-type='zip']::after { content: 'ZIP'; background: #6b4fb0; }
.asset-item__icon[data-type='file']::after { content: 'FIL'; background: #64748b; }

.asset-item__icon[data-type='image'],
.asset-item__icon[data-type='pdf'],
.asset-item__icon[data-type='doc'],
.asset-item__icon[data-type='sheet'],
.asset-item__icon[data-type='slides'],
.asset-item__icon[data-type='zip'],
.asset-item__icon[data-type='file'] {
  padding-bottom: 4px;
}

.asset-item__body {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  gap: 0.3rem;
}

.asset-item__header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.asset-item__title {
  margin: 0;
  font-weight: 700;
  color: #0b1220;
  font-size: 1.02rem;
  word-break: break-word;
}

.asset-item__meta {
  margin: 0;
  color: #5d6a7f;
  font-size: 0.88rem;
  word-break: break-word;
}

.asset-item__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.15rem;
}

.asset-item__open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 90px;
  padding: 0.5rem 0.9rem;
  border-radius: 10px;
  background: #0f3f97;
  color: #ffffff !important;
  font-weight: 700;
  text-decoration: none;
}

.asset-item__open:hover,
.asset-item__open:focus {
  background: #0d357f;
}

/* Tomt-tilstand */
.explorer-empty {
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 0.6rem;
  padding: 1.6rem 1rem;
}

.explorer-empty__icon {
  width: 88px;
  height: 66px;
  position: relative;
  filter: drop-shadow(0 6px 8px rgba(2, 6, 23, 0.12));
}

.explorer-empty__icon::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 8px;
  width: 40px;
  height: 14px;
  background: #f4b53f;
  border-radius: 6px 8px 0 0;
}

.explorer-empty__icon::after {
  content: '';
  position: absolute;
  top: 14px;
  left: 0;
  width: 88px;
  height: 52px;
  background: linear-gradient(180deg, #ffe6a1 0%, #f6c95b 100%);
  border-radius: 8px;
}

.explorer-empty__title {
  margin: 0;
  color: #0b1220;
  font-size: 1.2rem;
}

.explorer-empty__text {
  margin: 0;
  color: #4b5563;
  max-width: 42ch;
  line-height: 1.5;
}

.explorer-empty__cta {
  margin-top: 0.3rem;
  border: 0;
  background: #0f3f97;
  color: #ffffff;
  font-weight: 700;
  border-radius: 12px;
  padding: 0.75rem 1.4rem;
  font-size: 1.05rem;
  cursor: pointer;
}

.explorer-empty__cta:hover,
.explorer-empty__cta:focus {
  background: #0d357f;
}

/* Skuffer/paneler for personer og opplasting */
.access-sheet,
.upload-sheet {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 14px;
  border: 1px solid rgba(15, 63, 151, 0.18);
  background: #f7f9fd;
}

.access-sheet__head,
.upload-sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

.access-sheet__title,
.upload-sheet__title {
  margin: 0;
  color: #0f3f97;
  font-size: 1.1rem;
}

.access-sheet__close,
.upload-sheet__close {
  border: 1px solid rgba(15, 23, 42, 0.18);
  background: #ffffff;
  color: #24344f;
  font-weight: 700;
  border-radius: 8px;
  padding: 0.4rem 0.7rem;
  cursor: pointer;
}

.access-sheet__close:hover,
.access-sheet__close:focus,
.upload-sheet__close:hover,
.upload-sheet__close:focus {
  background: rgba(15, 23, 42, 0.06);
}

.upload-sheet__hint {
  margin: 0 0 0.8rem;
  color: #4b5563;
  line-height: 1.5;
}

.upload-sheet__form {
  display: grid;
  gap: 0.8rem;
}

.upload-sheet__dropzone {
  position: relative;
  display: grid;
  gap: 0.3rem;
  place-items: center;
  padding: 1.6rem 1rem;
  border-radius: 14px;
  border: 3px dashed rgba(15, 63, 151, 0.38);
  background: #ffffff;
  color: #24344f;
  cursor: pointer;
  transition: background-color 140ms ease, border-color 140ms ease;
}

.upload-sheet__dropzone:hover,
.upload-sheet__dropzone:focus-within {
  background: rgba(15, 63, 151, 0.05);
  border-color: rgba(15, 63, 151, 0.6);
}

.upload-sheet__dropzone.is-dragover {
  background: rgba(15, 63, 151, 0.12);
  border-color: #0f3f97;
}

.upload-sheet__dropzone-icon {
  width: 52px;
  height: 38px;
  border-radius: 8px;
  border: 2px solid #0f3f97;
  background: rgba(15, 63, 151, 0.12);
  position: relative;
}

.upload-sheet__dropzone-icon::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 52%;
  width: 14px;
  height: 14px;
  border-left: 3px solid #0f3f97;
  border-top: 3px solid #0f3f97;
  transform: translate(-50%, -35%) rotate(45deg);
}

.upload-sheet__dropzone-title {
  font-weight: 800;
  color: #0f3f97;
  font-size: 1.1rem;
}

.upload-sheet__dropzone-hint {
  font-size: 0.92rem;
  color: #5d6a7f;
}

.upload-sheet__meta {
  display: grid;
  gap: 0.7rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.upload-sheet__actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.upload-sheet__submit {
  background: #0f3f97;
  color: #ffffff;
  border: 0;
  font-weight: 800;
  font-size: 1.05rem;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  cursor: pointer;
}

.upload-sheet__submit:disabled {
  background: #9aa8c4;
  cursor: not-allowed;
}

.upload-sheet__submit:not(:disabled):hover,
.upload-sheet__submit:not(:disabled):focus {
  background: #0d357f;
}

@media (max-width: 860px) {
  .explorer-actions {
    grid-template-columns: 1fr;
  }

  .explorer-folders {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  }

  .asset-item {
    align-items: flex-start;
  }
}

/* ============================================================
   Enkel prosjektside – laget for brukere med lite erfaring
   ============================================================ */

.back-to-projects {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 48px;
  padding: 0.6rem 1rem;
  border: 2px solid rgba(15, 63, 151, 0.28);
  background: #ffffff;
  color: #0f3f97;
  font-weight: 700;
  font-size: 1.02rem;
  border-radius: 12px;
  cursor: pointer;
  margin-bottom: 1rem;
}

.back-to-projects:hover,
.back-to-projects:focus {
  background: rgba(15, 63, 151, 0.08);
  border-color: rgba(15, 63, 151, 0.5);
}

.project-view__name {
  margin: 0 0 1rem;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  color: #0b1220;
  line-height: 1.15;
  word-break: break-word;
}

.project-view__actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.8rem;
  margin-bottom: 1.1rem;
}

.big-action {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 64px;
  padding: 0.9rem 1.1rem;
  border-radius: 14px;
  border: 2px solid rgba(15, 63, 151, 0.25);
  background: #ffffff;
  color: #0b1220;
  font-size: 1.12rem;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
  box-shadow: 0 6px 16px rgba(2, 6, 23, 0.06);
  transition: transform 140ms ease, border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}

.big-action:hover,
.big-action:focus {
  transform: translateY(-2px);
  border-color: rgba(15, 63, 151, 0.55);
  box-shadow: 0 12px 24px rgba(15, 63, 151, 0.16);
}

.big-action:disabled {
  cursor: default;
  opacity: 0.75;
  transform: none;
  box-shadow: none;
}

.big-action--primary {
  background: #0f3f97;
  border-color: #0f3f97;
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(15, 63, 151, 0.28);
}

.big-action--primary:hover,
.big-action--primary:focus {
  background: #0d357f;
  border-color: #0d357f;
}

.big-action.is-open {
  background: #0d357f;
  border-color: #0d357f;
  color: #ffffff;
}

.big-action__icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(15, 63, 151, 0.12);
  color: #0f3f97;
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1;
}

.big-action--primary .big-action__icon {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.big-action__icon[data-icon='upload']::before { content: '\2191'; }
.big-action__icon[data-icon='download']::before { content: '\2193'; }

.big-action__label {
  flex: 1 1 auto;
  min-width: 0;
}

/* Tilbakemelding etter en handling */
.feedback-banner {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: 12px;
  font-size: 1.02rem;
  font-weight: 600;
  border: 1px solid transparent;
}

.feedback-banner--success {
  background: rgba(16, 122, 87, 0.12);
  color: #0b5c44;
  border-color: rgba(16, 122, 87, 0.3);
}

.feedback-banner--error {
  background: rgba(180, 35, 24, 0.1);
  color: #8f1c14;
  border-color: rgba(180, 35, 24, 0.3);
}

.feedback-banner--info {
  background: rgba(15, 63, 151, 0.1);
  color: #0f3f97;
  border-color: rgba(15, 63, 151, 0.3);
}

/* Filseksjoner */
.file-section {
  margin-top: 1.4rem;
}

.file-section__title {
  margin: 0 0 0.7rem;
  font-size: 1.2rem;
  color: #0b1220;
}

.file-section__count {
  color: #5d6a7f;
  font-weight: 700;
}

.file-section__empty {
  margin: 0;
  padding: 0.9rem 1rem;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.04);
  border: 1px dashed rgba(15, 23, 42, 0.18);
  color: #4b5563;
  font-size: 1rem;
}

.file-cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.7rem;
}

/* Ett filkort */
.file-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 6px 14px rgba(2, 6, 23, 0.05);
}

.file-card__icon {
  flex: 0 0 auto;
  width: 46px;
  height: 58px;
  position: relative;
  border-radius: 6px;
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
}

.file-card__icon::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  border-width: 0 14px 14px 0;
  border-style: solid;
  border-color: #cbd5e1 #f4f6fb;
}

.file-card__icon::after {
  content: 'FIL';
  position: absolute;
  left: 0;
  bottom: 8px;
  width: 100%;
  text-align: center;
  font-size: 0.56rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  color: #ffffff;
}

.file-card__icon[data-type='image']::after { content: 'BILDE'; background: #2f9e6b; }
.file-card__icon[data-type='pdf']::after { content: 'PDF'; background: #c0392b; }
.file-card__icon[data-type='doc']::after { content: 'DOK'; background: #2f6bd4; }
.file-card__icon[data-type='sheet']::after { content: 'ARK'; background: #1f8f4e; }
.file-card__icon[data-type='slides']::after { content: 'PPT'; background: #d1782b; }
.file-card__icon[data-type='zip']::after { content: 'ZIP'; background: #6b4fb0; }
.file-card__icon[data-type='file']::after { content: 'FIL'; background: #64748b; }

.file-card__body {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  gap: 0.25rem;
}

.file-card__name {
  margin: 0;
  font-weight: 700;
  font-size: 1.08rem;
  color: #0b1220;
  word-break: break-word;
}

.file-card__meta {
  margin: 0;
  color: #4b5563;
  font-size: 0.95rem;
}

.file-card__size {
  margin: 0;
  color: #5d6a7f;
  font-size: 0.9rem;
}

.file-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.4rem;
}

.file-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.5rem 1rem;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
}

.file-btn--open {
  background: #ffffff;
  color: #0f3f97;
  border-color: rgba(15, 63, 151, 0.4);
}

.file-btn--open:hover,
.file-btn--open:focus {
  background: rgba(15, 63, 151, 0.08);
}

.file-btn--download {
  background: #0f3f97;
  color: #ffffff;
}

.file-btn--download:hover,
.file-btn--download:focus {
  background: #0d357f;
}

/* Slett skal være mindre fremtredende enn Åpne/Last ned */
.file-btn--delete {
  background: #ffffff;
  color: #8f1c14;
  border-color: rgba(180, 35, 24, 0.35);
  font-weight: 600;
}

.file-btn--delete:hover,
.file-btn--delete:focus {
  background: rgba(180, 35, 24, 0.08);
}

/* Bekreftelsesvindu for sletting */
.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.confirm-modal[hidden] {
  display: none;
}

.confirm-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.5);
}

.confirm-modal__box {
  position: relative;
  z-index: 1;
  width: min(460px, 100%);
  background: #ffffff;
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 24px 55px rgba(2, 6, 23, 0.3);
}

.confirm-modal__title {
  margin: 0 0 0.6rem;
  font-size: 1.25rem;
  color: #0b1220;
}

.confirm-modal__text {
  margin: 0 0 1.2rem;
  color: #4b5563;
  font-size: 1.02rem;
  line-height: 1.5;
  word-break: break-word;
}

.confirm-modal__actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

/* «Behold filen» er det trygge, mest fremtredende valget */
.confirm-modal__keep {
  order: 0;
  min-height: 52px;
  border: 0;
  border-radius: 12px;
  background: #0f3f97;
  color: #ffffff;
  font-size: 1.08rem;
  font-weight: 800;
  cursor: pointer;
}

.confirm-modal__keep:hover,
.confirm-modal__keep:focus {
  background: #0d357f;
}

.confirm-modal__delete {
  order: 1;
  min-height: 48px;
  border: 1px solid rgba(180, 35, 24, 0.4);
  border-radius: 12px;
  background: #ffffff;
  color: #8f1c14;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
}

.confirm-modal__delete:hover,
.confirm-modal__delete:focus {
  background: rgba(180, 35, 24, 0.08);
}

/* Én tydelig visning av gangen: skjul prosjektlista når et prosjekt er åpent */
.dashboard-page.has-open-project .dashboard-grid {
  grid-template-columns: 1fr;
}

.dashboard-page.has-open-project .dashboard-grid > .panel:not(.resource-panel) {
  display: none;
}

@media (max-width: 860px) {
  .project-view__actions {
    grid-template-columns: 1fr;
  }

  .file-card {
    align-items: flex-start;
  }

  .file-btn {
    flex: 1 1 auto;
    justify-content: center;
  }
}
