/* Grunnoppsett */
html {
    overflow-y: scroll; /* Alltid vis vertikal scrollbar */
}
body {
    background: #f5f6fa;
    font-family: 'Roboto', Arial, sans-serif;
    color: #222;
    margin: 0;
    padding: 0;
}

a {
    color: #e67e22;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.dashboard-container {
    display: flex;
    margin-top: 64px; /* Plass til header */
    min-height: calc(100vh - 64px);
}

/* Header */
.dashboard-header {
    background: #fff;
    box-shadow: 0 2px 8px rgba(60,60,60,0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    height: 64px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.logo {
    font-weight: bold;
    font-size: 1.3em;
    color: #1976d2;
    letter-spacing: 1px;
}

.header-center {
    font-size: 1.1em;
    color: #444;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-actions .icon {
    margin-left: 18px;
    font-size: 1.3em;
    color: #1976d2;
    text-decoration: none;
    transition: color 0.2s;
}
.header-actions .icon:hover {
    color: #1565c0;
}

/* Sidebar */
.sidebar {
    background: #fff;
    box-shadow: 2px 0 8px rgba(60,60,60,0.04);
    width: 200px;
    min-height: 100vh;
    padding-top: 24px;
    position: fixed;
    left: 0;
    top: 64px;
    bottom: 0;
    z-index: 1000;
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar li {
    margin-bottom: 8px;
}

.sidebar a {
    display: flex;
    align-items: center;
    padding: 12px 24px;
    color: #222;
    text-decoration: none;
    border-radius: 0 24px 24px 0;
    transition: background 0.2s, color 0.2s;
    font-weight: 500;
    font-size: 1.05em;
    gap: 12px;
}
.sidebar a:hover,
.sidebar a.active {
    background: #e3f2fd;
    color: #1976d2;
}


/* Main content */
.main-content {
    margin-left: 200px; /* Samme bredde som .sidebar */
    padding: 32px 24px;
    flex: 1;
    background: #f5f6fa;
}

.module, .profile-password-container, .settings-screen-item {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(60,60,60,0.06);
    padding: 24px;
    margin-bottom: 24px;
}

/* Footer */
.dashboard-footer {
    grid-area: footer;
    background-color: #e67e22; /* Mørkere oransje */
    color: white;
    text-align: center;
    padding: 0.5rem;
    font-size: 0.9rem;
}

/* Universell box-sizing for mer forutsigbar layout */
*,
*:before,
*:after {
    box-sizing: border-box;
}

/* Styling for innloggingsboks */
.login-page {
  margin: 0;
  font-family: Arial, sans-serif;
  background: linear-gradient(to bottom, #a78bfa, #7dd3fc, #f9f5ff);
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

body.login-page {
        background: #f5f6fa;
}

.login-container {
    max-width: 400px;
    margin: 48px auto 0 auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(60,60,60,0.10);
    padding: 32px 28px 24px 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Mobilvennlig: mindre toppmargin og padding, sentrer vertikalt */
@media (max-width: 600px) {
    body.login-page {
        min-height: 100vh;
        display: block; /* Endret fra flex til block */
        /* Fjern justify-content: center; */
    }
    .login-container {
        margin-top: 24px; /* Juster denne for ønsket avstand fra toppen */
        padding: 20px 8px 16px 8px;
        box-shadow: 0 1px 6px rgba(60,60,60,0.10);
        max-width: 400px; /* Behold bredde */
    }
}

.login-avatar {
    width: 64px;
    height: 64px;
    background: #e3f2fd;
    border-radius: 50%;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1976d2;
    box-shadow: 0 2px 8px rgba(60,60,60,0.08);
    user-select: none;
}

.login-input-group {
    display: flex;
    align-items: center;
    margin: 15px 0;
    background: #eee;
    border-radius: 5px;
    overflow: hidden;
}

.login-input-group i {
    background: #333;
    color: white;
    padding: 12px;
    width: 40px;
    text-align: center;
}

.login-input-group input {
    border: none;
    padding: 10px;
    flex: 1;
    font-size: 16px;
    outline: none;
}

.login-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    margin-top: 10px;
}

.login-options a {
    color: #007bff;
    text-decoration: none;
}

.login-options a:hover {
    text-decoration: underline;
}

.login-checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.login-checkbox-container input {
    display: none;
}

.login-checkmark {
  width: 24px;
  height: 24px;
  background-color: #333;
  border-radius: 4px;
  position: relative;
  margin-right: 8px;
}

.login-checkmark::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 12px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: translate(-50%, -50%) rotate(45deg);
}

.login-checkmark::after {
  display: none;
}
.login-checkmark.checked::after {
  display: block;
}

.login-checkbox-container input:checked + .login-checkmark::after {
    display: block;
}

.login-btn {
    margin-top: 20px;
    background: #333;
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
}

.login-btn:hover {
    background: #555;
}

.login-register-link {
    text-align: center;
    margin-top: 18px;
    font-size: 1em;
}

.login-register-link a {
    color: #1976d2;
    text-decoration: none;
    font-weight: 500;
}

.login-register-link a:hover {
    text-decoration: underline;
}

.login-success {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e8f5e9;
    color: #388e3c;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 18px;
    text-align: center;
    border: 1px solid #c8e6c9;
    font-weight: 500;
    font-size: 1em;
    max-width: 340px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 1px 4px rgba(60,60,60,0.06);
}

.login-error {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffebee;
    color: #d32f2f;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 18px;
    text-align: center;
    border: 1px solid #ffcdd2;
    font-weight: 500;
    font-size: 1em;
    max-width: 340px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 1px 4px rgba(60,60,60,0.06);
}

/* Profilmodulen */
.profile-page {
    font-family: 'Arial', sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

.profile-module {
    width: 100%; /* Sett bredden til 100% */
    padding: 20px; /* Ekstra padding hvis ønskelig */
    background-color: #ffffff;
    border: 1px solid #dddddd;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.profile-container {
    display: flex;
    flex-direction: column;
}

.profile-info {
    display: flex;
    flex-direction: column; /* Plasserer elementer i en kolonne */
}

.profile-info-item {
    display: grid; /* Bruker grid for å lage kolonner */
    grid-template-columns: auto auto 1fr; /* Justerer kolonnene: ikon, label og verdi */
    align-items: center; /* Vertikal justering av innholdet */
    margin-bottom: 10px; /* Avstand mellom elementene */
}

.profile-info-item .icon {
    margin-right: 10px; /* Avstand mellom ikonet og labelen */
    font-size: 1.5rem; /* Størrelse på ikonet */
}

.profile-info-item .label {
    font-weight: bold; /* Fet tekst for labelen */
}

.profile-module h3 {
    margin-bottom: 10px;
}

.profile-password-container {
    width: 400px;
    background-color: #f9f9f9;
    padding: 15px;
    border: 1px solid #dddddd;
    border-radius: 5px;
}

.profile-form-group {
    margin-bottom: 15px;
}

.profile-form-group label {
    display: block;
    margin-bottom: 5px;
}

.profile-password-container input[type="password"],
.profile-password-container input[type="text"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #cccccc;
    border-radius: 4px;
}

.profile-btn {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    background-color: #007bff; /* Primærfarge */
    color: #ffffff;
    cursor: pointer;
    transition: background-color 0.3s;
}

.profile-btn:hover {
    background-color: #0056b3; /* Mørkere nyanse på hover */
}

.profile-side-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(25, 118, 210, 0.08);
    border: 1px solid #e0e0e0; /* Gir en synlig boks */
    padding: 24px 20px;
}

.info-item {
    margin-bottom: 15px; /* Plass mellom info-elementer */
}

.info-item strong {
    color: #555; /* Mørkere grå for fet tekst */
}

.password-container {
    display: flex;  /* Organiserer skjemaet vertikalt */
    flex-direction: column; /* Elementene stables vertikalt */
    gap: 15px; /* Plass mellom feltene */
    background-color: #f9f9f9; /* Lett bakgrunnsfarge */
    border: 1px solid #ccc; /* Grå kant */
    border-radius: 8px; /* Runde kanter */
    padding: 20px; /* Plass innvendig */
    margin: 20px 0; /* Plass over og under */
    box-shadow: 0 2px 10px rgba(0,0,0,0.1); /* Lett skygge */
}


/* Skjermliste styling */
.settings-screen-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 32px;
}

.settings-screen-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(60,60,60,0.08);
    padding: 20px 28px;
    transition: box-shadow 0.2s;
}

.settings-screen-card:hover {
    box-shadow: 0 4px 16px rgba(60,60,60,0.14);
}

.settings-screen-info {
    display: flex;
    align-items: center;
    font-size: 1.1em;
    color: #222;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.settings-screen-info:not(:has(.screen-status)) {
    flex-direction: row;
    align-items: center;
    gap: 0;
}

.settings-screen-org {
    color: #888;
    font-size: 0.95em;
    margin-top: 2px;
}

.settings-screen-name {
    font-weight: 500;
}

.screen-status {
    font-size: 0.85em;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 500;
}

.screen-status.status-online {
    background: #e8f5e8;
    color: #2e7d32;
}

.screen-status.status-recent {
    background: #fff3e0;
    color: #f57c00;
}

.screen-status.status-offline {
    background: #ffebee;
    color: #c62828;
}

.screen-status.status-never {
    background: #f5f5f5;
    color: #666;
}

.settings-screen-name {
    font-weight: 500;
    letter-spacing: 0.5px;
}

.settings-screen-action {
    display: flex;
    align-items: center;
    gap: 18px;
}

/* Vise søppelbøtte ved hover */
.settings-screen-item:hover .settings-delete-icon {
    color: #e74c3c;  /* Rød ved hover for tydelighet */
}

/* Stil for skjerminformasjon */
.settings-screen-info {
    flex-grow: 1; /* Får info til å bruke tilgjengelig plass */
    font-size: 1.2em; /* Større tekst */
    font-weight: bold; /* Fet skrift */
}

/* Switch styling for aktivering/deaktivering */
.settings-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.settings-switch input {
    opacity: 0; /* Gjør input usynlig */
    width: 0;
    height: 0;
}

.settings-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc; /* Grå bakgrunn for slider */
    transition: .4s;
    border-radius: 34px; /* Runde kanter på slider */
}

.settings-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px; /* Plass til venstre */
    bottom: 4px; /* Plass til bunnen */
    background-color: white; /* Hvit bakgrunn*/
    transition: .4s;
    border-radius: 50%; /* Runde kanter på slideres formattered element */
    box-shadow: 0 1px 3px rgba(60,60,60,0.18);
}

input:checked + .settings-slider {
    background-color: #1976d2; /* Material blå */
}

input:checked + .settings-slider:before {
    transform: translateX(26px); /* Flytter slideren til høyre */
}

.settings-delete-icon {
    cursor: pointer;
    margin-right: 10px;
    display: inline; /* Alltid synlig */
    color: #bbb;     /* Svak grå farge */
    opacity: 0.6;    /* Gjør den enda svakere */
    transition: color 0.2s, opacity 0.2s;
}

.settings-delete-icon .material-icons {
    color: #757575;
    font-size: 1.5em;
    transition: color 0.2s;
    cursor: pointer;
    vertical-align: middle;
}
.settings-delete-icon:hover .material-icons {
    color: #d32f2f;
}

.settings-delete-icon i {
    color: #757575;
    transition: color 0.2s;
    cursor: pointer;
}
.settings-delete-icon:hover i {
    color: #d32f2f;
}

.settings-main-title {
    font-size: 2rem;
    font-weight: 500;
    color: #212121;
    margin-bottom: 24px;
    letter-spacing: 0.5px;
}

.settings-sub-title {
    font-size: 1.25rem;
    font-weight: 500;
    color: #1976d2;
    margin-top: 32px;
    margin-bottom: 16px;
    letter-spacing: 0.2px;
}

/* Modal styling */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}
.modal-box {
    background: #fff;
    padding: 32px 24px 20px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(60,60,60,0.18);
    text-align: center;
    min-width: 320px;
    max-width: 90vw;
}

.modal-box p {
    font-size: 1.15em;
    color: #222;
    margin-bottom: 28px;
    font-weight: 500;
}

.modal-box button {
    min-width: 100px;
    padding: 10px 0;
    border: none;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 500;
    margin: 0 8px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

#modalConfirm {
    background: #e53935;
    color: #fff;
}

#modalConfirm:hover {
    background: #b71c1c;
}

#modalCancel {
    background: transparent;
    color: #1976d2;
}

#modalCancel:hover {
    background: #e3f2fd;
}
/* Profilmeny styling */
.profile-menu-container {
    position: relative;
    display: inline-block;
}

#profileMenuBtn {
    position: relative; /* eller absolute/fixed hvis det passer bedre */
    z-index: 1200; /* høyere enn overlays og .profile-menu-container */
}

.profile-initials {
    width: 40px;
    height: 40px;
    background: #1976d2;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 1.1em;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(60,60,60,0.08);
    transition: background 0.2s;
    user-select: none;
}

.profile-initials:hover {
    background: #1565c0;
}

.profile-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 48px;
    background: #fff;
    min-width: 160px;
    box-shadow: 0 4px 16px rgba(60,60,60,0.14);
    border-radius: 8px;
    z-index: 2000;
    padding: 8px 0;
}

.profile-dropdown a {
    display: block;
    padding: 10px 20px;
    color: #222;
    text-decoration: none;
    font-size: 1em;
    transition: background 0.2s;
}

.profile-dropdown a:hover {
    background: #e3f2fd;
    color: #1976d2;
}

.profile-card {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(60,60,60,0.08);
    padding: 24px 32px;
    margin-bottom: 32px;
    gap: 32px;
    max-width: 480px;
}

.profile-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #e3f0fd;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    font-weight: 500;
    color: #1976d2;
    margin: 0 auto 16px auto;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.08);
    /* Fjern evt. padding hvis det finnes */
    padding: 0;
}

.profile-card-info {
    flex: 1;
}

.profile-card-row {
    display: flex;
    align-items: center;
    font-size: 1.1em;
    margin-bottom: 10px;
    color: #333;
    gap: 10px;
}

.profile-card-row i {
    color: #1976d2;
    min-width: 22px;
    text-align: center;
}

/* Material form styling */
.material-form {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(60,60,60,0.06);
    padding: 24px 32px;
    margin-bottom: 32px;
    max-width: 480px; /* Legg til denne linjen */
}

.material-form-group {
    position: relative;
    margin-bottom: 28px;
}

.material-form-group input[type="text"],
.material-form-group input[type="email"],
.material-form-group input[type="password"] {
    width: 100%;
    padding: 14px 12px 14px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fafbfc;
    font-size: 1em;
    outline: none;
    transition: border-color 0.2s;
}

.material-form-group textarea {
    width: 100%;
    padding: 14px 12px 14px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fafbfc;
    font-size: 1em;
    outline: none;
    transition: border-color 0.2s;
    resize: vertical;
    min-height: 120px; /* eller ønsket høyde */
    box-sizing: border-box;
}

.material-form-group input:focus,
.material-form-group textarea:focus {
    border-color: #1976d2;
    background: #fff;
}

.material-form-group label {
    position: absolute;
    left: 14px;
    top: 14px;
    color: #888;
    background: transparent;
    font-size: 1em;
    pointer-events: none;
    transition: 0.2s;
}

.material-form-group input:focus + label,
.material-form-group input:not(:placeholder-shown) + label,
.material-form-group textarea:focus + label,
.material-form-group textarea:not(:placeholder-shown) + label {
    top: -10px;
    left: 10px;
    font-size: 0.85em;
    color: #1976d2;
    background: #fff;
    padding: 0 4px;
}


.material-form-group select {
    width: 100%;
    padding: 14px 12px 14px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #fafbfc;
    font-size: 1em;
    outline: none;
    transition: border-color 0.2s;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.material-form-group select:focus {
    border-color: #1976d2;
    background: #fff;
}

.profile-main-title {
    font-size: 2rem;
    font-weight: 500;
    color: #212121;
    margin-bottom: 24px;
    letter-spacing: 0.5px;
}

.profile-sub-title {
    font-size: 1.25rem;
    font-weight: 500;
    color: #1976d2;
    margin-top: 32px;
    margin-bottom: 16px;
    letter-spacing: 0.2px;
}

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    width: 36px;
    height: 36px;
    cursor: pointer;
    margin-right: 16px;
}
.hamburger span {
    display: block;
    height: 4px;
    width: 26px;
    background: #1976d2;
    margin: 4px 0;
    border-radius: 2px;
    transition: 0.3s;
}

@media (max-width: 900px) {
    .sidebar {
        position: fixed;
        left: -220px;
        top: 64px;
        width: 200px;
        height: calc(100vh - 64px);
        background: #fff;
        box-shadow: 2px 0 8px rgba(60,60,60,0.08);
        transition: left 0.3s;
        z-index: 2001;
    }
    .sidebar.open {
        left: 0;
    }
    .dashboard-container {
        margin-left: 0;
    }
    .main-content {
        margin-left: 0;
    }
    .hamburger {
        display: flex;
    }
    .admin-user-list, .material-table {
        width: 100%;
        overflow-x: auto;
        display: block;
    }
    .material-table table {
        min-width: 600px;
        width: 100%;
    }
    .material-form {
        max-width: 100%;
        padding: 16px 6px;
    }
}

@media (max-width: 600px) {
    .dashboard-header {
        flex-direction: row;
        padding: 0 8px;
    }
    .main-content {
        padding: 16px 4px;
    }
}

/* Admin styles */
.admin-main-title {
    font-size: 2rem;
    font-weight: 500;
    color: #212121;
    margin-bottom: 24px;
}
.admin-sub-title {
    font-size: 1.25rem;
    font-weight: 500;
    color: #1976d2;
    margin-top: 32px;
    margin-bottom: 16px;
}
.material-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(60,60,60,0.06);
    margin-bottom: 32px;
    overflow: hidden;
}
.material-table th, .material-table td {
    padding: 14px 12px;
    text-align: left;
}
.material-table th {
    background: #f5f6fa;
    color: #1976d2;
    font-weight: 500;
    font-size: 1em;
}
.material-table tr {
    border-bottom: 1px solid #eee;
}
.material-table tr:last-child {
    border-bottom: none;
}
.admin-btn {
    background: #1976d2;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 7px 16px;
    margin-right: 6px;
    font-size: 0.95em;
    cursor: pointer;
    transition: background 0.2s;
}
.admin-btn:hover {
    background: #1565c0;
}
.admin-btn-danger {
    background: #e53935;
}
.admin-btn-danger:hover {
    background: #b71c1c;
}
.admin-btn-success,
.admin-btn-danger {
    min-width: 100px; /* eller ønsket bredde */
    text-align: center;
    display: inline-block;
}
.material-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 1em;
    user-select: none;
    gap: 8px;
    position: relative;
}

.material-checkbox input[type="checkbox"] {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.material-checkbox .checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #1976d2;
    border-radius: 3px;
    background: #fff;
    display: inline-block;
    position: relative;
    transition: background 0.2s, border-color 0.2s;
}

.material-checkbox input[type="checkbox"]:checked + .checkmark {
    background: #1976d2;
    border-color: #1976d2;
}

.material-checkbox .checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.material-checkbox input[type="checkbox"]:checked + .checkmark:after {
    display: block;
}

.material-checkbox .checkmark:after {
    left: 5px;
    top: 1px;
    width: 6px;
    height: 12px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
    content: "";
}

.forgot-link {
    color: #1976d2;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.98em;
    transition: color 0.2s;
}

.forgot-link:hover {
    text-decoration: underline;
    color: #1565c0;
}

.settings-switch input:focus + .settings-slider {
    box-shadow: 0 0 0 3px #90caf9;
}
.material-table th:nth-child(3),
.material-table td:nth-child(3) {
    width: 120px;      /* Juster etter behov */
    min-width: 100px;
    max-width: 160px;
    text-align: left;
    white-space: nowrap;
}
.superadmin-table th,
.superadmin-table td {
    width: auto;
    min-width: 120px;
    text-align: left;
    white-space: nowrap;
}
.superadmin-table th:nth-child(1),
.superadmin-table td:nth-child(1) { width: 20%; }
.superadmin-table th:nth-child(2),
.superadmin-table td:nth-child(2) { width: 25%; }
.superadmin-table th:nth-child(3),
.superadmin-table td:nth-child(3) { width: 20%; }
.superadmin-table th:nth-child(4),
.superadmin-table td:nth-child(4) { width:15%; }
.superadmin-table th:nth-child(5),
.superadmin-table td:nth-child(5) { width: 20%; }

#addUserDialog {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.3);
    z-index: 9999; /* Høyere enn alt annet */
    align-items: center;
    justify-content: center;
}

.m13-btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 1em;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    text-decoration: none;
}

.m3-btn-filled {
    background: #1976d2;
    color: white;
}

.m3-btn-filled:hover {
    background: #1565c0;
}

.m3-btn-tonal {
    background: transparent;
    color: #1976d2;
    border: 1px solid #1976d2;
}

.m3-btn-tonal:hover {
    background: #e3f2fd;
}

.org-switcher {
    font-family: 'Roboto', Arial, sans-serif;
    font-size: 1em;
    padding: 10px 36px 10px 12px;
    border: 1.5px solid #1976d2;
    border-radius: 6px;
    background: #fff url('data:image/svg+xml;utf8,<svg fill="gray" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>') no-repeat right 12px center/24px 24px;
    color: #222;
    outline: none;
    transition: border-color 0.2s;
    min-width: 180px;
    margin-left: 16px;
}
.org-switcher:focus {
    border-color: #1565c0;
    box-shadow: 0 0 0 2px #1976d233;
}

/* Skjul org-switcher i header på mobil */
@media (max-width: 700px) {
    .header-actions > form {
        display: none !important;
    }
    .profile-dropdown .org-switcher {
        display: block !important;
        margin: 12px 0;
        width: 100%;
    }
}
/* Vis org-switcher i header på desktop, skjul i dropdown */
@media (min-width: 701px) {
    .profile-dropdown .org-switcher {
        display: none !important;
    }
}

/* Material 3 Tabs */
.m3-tabs {
    display: flex;
    gap: 2px;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 24px;
    background: #fff;
}

.m3-tab {
    background: none;
    border: none;
    border-radius: 12px 12px 0 0;
    padding: 12px 28px 10px 28px;
    font-size: 1.08em;
    font-weight: 500;
    color: #1976d2;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    outline: none;
    position: relative;
}

.m3-tab.active {
    background: #e3f0fd;
    color: #1565c0;
    border-bottom: 2.5px solid #1976d2;
    z-index: 1;
}

.m3-tab:not(.active):hover {
    background: #f5faff;
    color: #1976d2;
}

/* Legg i styles.css */
.overview-stats-row {
    display: flex;
    gap: 24px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}
.overview-stat-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(25,118,210,0.08);
    padding: 24px 32px;
    min-width: 160px;
    flex: 1 1 0;
    text-align: center;
}
.overview-stat-title {
    color: #1976d2;
    font-size: 1.1em;
    margin-bottom: 8px;
}
.overview-stat-value {
    font-size: 2.2em;
    font-weight: 600;
    color: #222;
}
.overview-activity-list {
    margin: 0 0 24px 0;
    padding: 0 0 0 18px;
    color: #444;
}
.overview-alerts {
    margin-top: 18px;
}
.overview-alert {
    background: #fff3cd;
    color: #856404;
    border-radius: 8px;
    padding: 12px 18px;
    margin-bottom: 8px;
    border: 1px solid #ffeeba;
}

.material-form-group input[type="text"][name="org_name"] {
    width: 100%;
    min-width: 220px;
    max-width: 100%;
    font-size: 1.2em;
    font-weight: 500;
    letter-spacing: 0.01em;
    overflow-wrap: break-word;
}

.material-alert {
    border-radius: 12px;
    padding: 14px 18px;
    margin-top: 12px;
    font-size: 1.05em;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(25,118,210,0.08);
    font-weight: 500;
}
.material-alert-success {
    background: #e8f5e9;
    color: #388e3c;
    border: 1px solid #b2dfdb;
}
.material-alert-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.m3-tooltip {
  position: relative;
  cursor: pointer;
}
.m3-tooltip:hover .m3-tooltip-text {
  visibility: visible;
  opacity: 1;
}
.m3-tooltip-text {
  display: none;
  position: fixed;
  z-index: 9999;
  max-width: 420px;
  background: #fff;
  color: #222;
  border-radius: 10px;
  border: 1.5px solid #b6c2d2;
  box-shadow: 0 2px 12px rgba(25,118,210,0.10);
  padding: 14px 18px;
  font-size: 1.08em;
  line-height: 1.5;
  white-space: pre-line;
  word-break: break-word;
  pointer-events: none;
}

.m3-select {
    width: 100%;
    padding: 12px 16px;
    border-radius: 12px;
    border: 1.5px solid #bbb;
    background: #fff;
    font-size: 1.08em;
    color: #222;
    outline: none;
    transition: border-color 0.2s;
    margin-bottom: 16px;
    box-shadow: 0 1px 2px rgba(25, 118, 210, 0.03);
}
.m3-select:focus {
    border-color: #1976d2;
    box-shadow: 0 0 0 2px #1976d233;
}

.superadmin-tabs {
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.06);
    border-radius: 8px 8px 0 0;
}

.admin-tab-active {
    background: #388e3c !important;
    color: #fff !important;
    border: 1px solid #388e3c !important;
    box-shadow: 0 2px 8px rgba(56,142,60,0.08);
}

.admin-tabs .m3-tab {
    color: #388e3c !important;
    background: none;
    border: none;
    transition: background 0.2s, color 0.2s;
}
.admin-tabs .m3-tab.admin-tab-active,
.admin-tabs .m3-tab.active {
    background: #388e3c !important;
    color: #fff !important;
    border-radius: 6px 6px 0 0;
    border: 1px solid #388e3c !important;
}

.user-count-badge {
  background: #e3eafc;
  color: #1976d2;
  font-weight: 600;
  font-size: 0.98em;
  border-radius: 999px;
  min-width: 28px;
  padding: 2px 10px;
  display: inline-block;
  text-align: center;
  margin-left: 8px;
  vertical-align: middle;
}
/* Legg gjerne i egen CSS-fil hvis du har */
.superadmin-btn-deactivate {
    background: #e53935 !important;
    color: #fff !important;
}
.superadmin-btn-activate {
    background: #43a047 !important;
    color: #fff !important;
}

.superadmin-topnav a {
    color: #1976d2;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 6px;
    transition: background 0.15s;
}
.superadmin-topnav a.active,
.superadmin-topnav a:hover {
    background: #e3e7f0;
    color: #1976d2;
}

.admin-topnav a {
    color: #388e3c;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 6px;
    transition: background 0.15s;
}
.admin-topnav a.active,
.admin-topnav a:hover {
    background: #e3e7f0;
    color: #388e3c;
}

.add-display-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-end;
    background: #f8fafc;
    border-radius: 10px;
    padding: 18px 18px 12px 18px;
    margin-bottom: 22px;
    box-shadow: 0 2px 8px rgba(60,60,60,0.06);
}
.add-display-bar label {
    font-size: 0.97em;
    color: #333;
    margin-bottom: 4px;
    display: block;
    font-weight: 500;
}
.add-display-bar input[type="text"],
.add-display-bar select {
    width: 220px;
    padding: 7px 10px;
    border-radius: 6px;
    border: 1px solid #bfc7d1;
    font-size: 1em;
    background: #fff;
    margin-bottom: 0;
}
.add-display-bar select {
    min-width: 160px;
}
.add-display-bar .add-btn {
    background: #1976d2;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 28px;
    font-size: 1.08em;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
    margin-top: 0;
}
.add-display-bar .add-btn:hover {
    background: #1252a2;
}
@media (max-width: 700px) {
    .add-display-bar {
        flex-direction: column;
        align-items: stretch;
        padding: 14px 8px 8px 8px;
    }
    .add-display-bar input[type="text"],
    .add-display-bar select {
        width: 100%;
        min-width: 0;
    }
}
/* superorg: Material 3-inspirert organisasjonsvisning */
.superorg-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(60,60,60,0.08);
    margin-bottom: 22px;
    padding: 0;
    overflow: hidden;
}
.superorg-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid #e0e0e0;
    background: #f8fafc;
}
.superorg-title {
    font-size: 1.15em;
    font-weight: 600;
    color: #1976d2;
    display: flex;
    align-items: center;
    gap: 10px;
}
.superorg-user-count {
    background: #1976d2;
    color: #fff;
    border-radius: 12px;
    padding: 2px 12px;
    font-size: 0.98em;
    margin-left: 10px;
}
.superorg-actions button {
    background: none;
    border: none;
    cursor: pointer;
    margin-left: 8px;
    font-size: 1.2em;
    padding: 6px;
    border-radius: 6px;
    transition: background 0.15s;
}
.superorg-actions button:hover {
    background: #e3eafc;
}
.superorg-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
}
.superorg-table th, .superorg-table td {
    padding: 10px 12px;
    text-align: left;
}
.superorg-table th {
    background: #f5f5f5;
    color: #1976d2;
    font-weight: 600;
    border-bottom: 2px solid #e0e0e0;
}
.superorg-table tr:not(:last-child) td {
    border-bottom: 1px solid #eee;
}
.superorg-user-status {
    font-weight: 500;
    color: #388e3c;
}
.superorg-user-status.inactive {
    color: #b71c1c;
}
/* Legg til i din CSS-blokk */
.superorg-table th:nth-child(1),
.superorg-table td:nth-child(1) { width: 22%; min-width: 120px; }
.superorg-table th:nth-child(2),
.superorg-table td:nth-child(2) { width: 28%; min-width: 160px; }
.superorg-table th:nth-child(3),
.superorg-table td:nth-child(3) { width: 14%; min-width: 80px; }
.superorg-table th:nth-child(4),
.superorg-table td:nth-child(4) { width: 14%; min-width: 80px; }
.superorg-table th:nth-child(5),
.superorg-table td:nth-child(5) { width: 22%; min-width: 120px; }

.superorg-table th:last-child,
.superorg-table td:last-child {
    text-align: right;
    white-space: nowrap;
}
.superorg-action-btn {
    min-width: 110px;
    max-width: 140px;
    width: 110px;
    text-align: center;
    display: inline-block;
    margin-left: 6px;
}
.delete-user-btn {
    margin-left: 6px;
}
.superorg-title button.add-user-btn,
.superorg-title button.delete-org-btn {
    background: none;
    border: none;
    cursor: pointer;
    margin-left: 8px;
    font-size: 1.2em;
    padding: 6px;
    border-radius: 6px;
    transition: background 0.15s;
    vertical-align: middle;
}
.superorg-title button.add-user-btn:hover {
    background: #e3eafc;
}
.superorg-title button.delete-org-btn:hover {
    background: #fdeaea;
}
.superorg-users {
    transition: all 0.2s;
}
.superorg-card.open .superorg-users {
    display: block;
}
.superorg-header {
    cursor: pointer;
    user-select: none;
}

.profile-section {
    width: 95%;
    margin: 0 auto 36px auto;
    padding: 32px 28px 24px 28px;
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 2px 16px rgba(60,60,60,0.08);
}
.profile-section h2 {
    margin-top: 0;
    font-size: 1.35em;
    font-weight: 600;
    color: #1976d2;
    letter-spacing: 0.01em;
}
.profile-section form > div {
    margin-bottom: 18px;
}
.profile-section label {
    font-weight: 500;
    color: #333;
}
.profile-section input[type="text"],
.profile-section input[type="email"],
.profile-section input[type="password"] {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1.5px solid #b5c9d3;
    font-size: 1em;
    margin-top: 4px;
}
.profile-section button {
    padding: 10px 26px;
    border-radius: 8px;
    border: none;
    font-size: 1em;
    font-weight: 500;
    background: #1976d2;
    color: #fff;
    cursor: pointer;
}
.profile-section .danger {
    background: #e53935;
    color: #fff;
}
.m3-tooltip {
    position: fixed;
    z-index: 99999;
    background: #fff;
    color: #222;
    font-size: 1.08em;
    padding: 18px 28px;
    border-radius: 14px;
    box-shadow: 0 4px 24px rgba(25,118,210,0.13);
    border: 1.5px solid #1976d2;
    max-width: 420px;
    min-width: 180px;
    pointer-events: none;
    transition: opacity 0.15s;
    opacity: 0;
    white-space: pre-line;
}
.session-list { gap: 18px; }
.session-card { transition: box-shadow 0.15s; }
.session-card:hover { box-shadow: 0 4px 18px rgba(25,118,210,0.13); }
.logout-session-btn:hover { background: #b71c1c; }

/* Material 3-inspirert select */
.m3-select-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
    margin-bottom: 16px;
}
.m3-select {
    width: 100%;
    padding: 14px 16px 14px 12px;
    border: 1.5px solid #c7d0dd;
    border-radius: 12px;
    background: #f8fafc;
    font-size: 1.08em;
    color: #222;
    outline: none;
    transition: border-color 0.2s;
    appearance: none;
    box-shadow: none;
}
.m3-select:focus {
    border-color: #1976d2;
    background: #fff;
}
.m3-label {
    font-size: 1.04em;
    font-weight: 500;
    color: #1976d2;
    margin-bottom: 4px;
    display: block;
}

/* Material 3-inspirert textarea */
.m3-textarea {
    width: 100%;
    min-height: 70px;
    border: 1.5px solid #c7d0dd;
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 1.08em;
    background: #f8fafc;
    color: #222;
    outline: none;
    resize: vertical;
    margin-bottom: 16px;
    transition: border-color 0.2s, background 0.2s;
}
.m3-textarea:focus {
    border-color: #1976d2;
    background: #fff;
}

/* Material 3-inspirert knapp */
.m13-btn {
    background: #1976d2;
    color: #fff;
    border: none;
    border-radius: 24px;
    padding: 12px 32px;
    font-size: 1.08em;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(25,118,210,0.08);
    transition: background 0.2s, box-shadow 0.2s;
}
.m3-btn:hover, .m3-btn:focus {
    background: #1251a3;
    box-shadow: 0 4px 16px rgba(25,118,210,0.14);
}

.m3-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    background: #1976d2;
    color: #fff;
    border: none;
    border-radius: 4px; /* Material 3 standard */
    font-size: 1.08em;
    font-weight: 500;
    font-family: inherit;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(25,118,210,0.08);
    transition: background 0.2s, box-shadow 0.2s, color 0.2s;
    outline: none;
    letter-spacing: 0.03em;
}

.status-dot {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 3px;
    margin-right: 10px;
    vertical-align: middle;
}

.status-badge {
    font-size: 0.97em;
    display: inline-block;
    border-radius: 20px;
    padding: 4px 16px;
    font-weight: 500;
    letter-spacing: 0.02em;
    background: #e3eafc;
    color: #1976d2;
    border: 1.5px solid #1976d2;
}
.status-badge[data-status="in_progress"] {
    background: #fffbe7;
    color: #fbc02d;
    border-color: #fbc02d;
}
.status-badge[data-status="avventer_svar"] {
    background: #fff3e0;
    color: #ffa726;
    border-color: #ffa726;
}
.status-badge[data-status="closed"] {
    background: #e8f5e9;
    color: #388e3c;
    border-color: #388e3c;
}


.m3-attachment { 
    background: #e8f5e9; 
    border-radius: 8px; 
    padding: 10px 14px;
    margin-top: 8px; 
    display: flex; 
    align-items: center; 
}
        .ticket-container { max-width: 700px; margin: 40px auto; background: #fff; border-radius: 16px; box-shadow: 0 4px 24px rgba(0,0,0,0.10); padding: 32px; }
        .ticket-header { font-weight: 500; font-size: 1.2em; margin-bottom: 6px; }
        .ticket-meta { color: #666; font-size: 0.97em; margin-bottom: 8px; }
        .ticket-message { margin-bottom: 18px; }
        .admin-reply-form textarea { width: 100%; min-height: 60px; border-radius: 8px; border: 1px solid #bbb; padding: 8px; margin-bottom: 8px; }
        .admin-reply-form button { background: #1976d2; color: #fff; border: none; border-radius: 8px; padding: 8px 18px; cursor: pointer; }
        .admin-reply { background: #e3f2fd; border-radius: 8px; padding: 10px 14px; margin-top: 8px; color: #1976d2; }
        .success-msg { background: #d4edda; color: #155724; padding: 10px 18px; border-radius: 8px; margin-bottom: 18px; }
        .error-msg { background: #f8d7da; color: #721c24; padding: 10px 18px; border-radius: 8px; margin-bottom: 18px; }
        .admin-note { background: #fff3cd; border-radius: 8px; padding: 10px 14px; margin-top: 8px; color: #856404; }
        .m3-attachment-icon { font-size: 1.2em; color: #388e3c; margin-right: 8px; }
        .m3-attachment-link { color: #1976d2; text-decoration: none; }

        .support-list-container { max-width: 1100px; margin: 40px auto; background: #fff; border-radius: 16px; box-shadow: 0 4px 24px rgba(0,0,0,0.10); padding: 32px; }
        .support-list-table { width: 100%; border-collapse: collapse; }
        .support-list-table th, .support-list-table td { padding: 12px 10px; border-bottom: 1px solid #eee; }
        .support-list-table th { background: #f1f3f6; text-align: left; }
        .support-list-table tr:hover { background: #e3f2fd; cursor: pointer; }
        .support-link { color: inherit; text-decoration: none; display: block; }
        .support-link:hover { text-decoration: underline; }
        
#attachment-dialog-bg {
    position: fixed;
    z-index: 9999;
    left: 0; top: 0; right: 0; bottom: 0;
    background: rgba(33, 33, 33, 0.32);
    display: none;
    align-items: center;
    justify-content: center;
}
#attachment-dialog {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(25,118,210,0.18);
    padding: 32px 24px 24px 24px;
    min-width: 340px;
    max-width: 90vw;
    max-height: 90vh;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}
#attachment-content {
    max-width: 600px;
    max-height: 70vh;
    overflow: auto;
    margin-top: 12px;
}
#attachment-dialog img, #attachment-dialog iframe {
    max-width: 100%;
    max-height: 60vh;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(25,118,210,0.08);
}

* {
  pointer-events: auto !important;
}
                                                                                                               
.m13-btn {
    background: #1976d2;
    color: #fff;
    border: none;
    border-radius: 24px 0 0 24px;
    padding: 12px 28px;
    font-size: 1.08em;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    outline: none;
}
.m3-btn.split-arrow {
    border-radius: 0 24px 24px 0;
    border-left: 1px solid #c7d0dd;
    padding: 0 18px;
    min-width: 40px;
    background: #0b7a36;
    color: #fff;
    font-size: 1.2em;
    height: 48px; /* Samme høyde som hovedknappen */
    display: flex;
    align-items: center;
}
.split-dropdown {
    position: relative;
}
.split-dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 110%;
    background: #fff;
    min-width: 200px;
    box-shadow: 0 4px 16px rgba(25,118,210,0.14);
    border-radius: 12px;
    z-index: 1000;
    overflow: hidden;
}
.split-dropdown-content.open {
    display: block;
}
.split-dropdown-item {
    padding: 12px 18px;
    cursor: pointer;
    color: #1976d2;
    font-weight: 500;
    transition: background 0.15s;
}
.split-dropdown-item:hover {
    background: #e3f2fd;
}
.split-button-group {
    display: inline-flex;
    position: relative;
    margin-bottom: 16px;
}

.msg-line {
    margin-bottom: 10px;
    color: #222;
    background: none;
    padding: 0;
    border-radius: 0;
}
.msg-status {
    text-align: center;
    color: #888;
    margin: 12px 0;
    font-style: italic;
}
.msg-meta {
    font-weight: 500;
    color: #1976d2;
}

/* Ny CSS for meldingsvisning */
.msg {
    width: 100%;
    max-width: 600px;
    margin: 0 auto 20px auto; /* Luft mellom alle meldinger */
    padding: 14px 20px;
    border-radius: 12px;
    box-sizing: border-box;
    word-break: break-word;
    background: #f1f1f1;
    color: #333;
    display: block;
}

.msg-admin {
    background: #e3f2fd;
    color: #1976d2;
}

.msg-user {
    background: #f1f1f1;
    color: #333;
}

.msg-status {
    background: #fff9c4; /* Gul bakgrunn */
    color: #856404;
    text-align: center;
    font-style: italic;
    font-weight: 500;
}

.msg-meta {
    font-size: 0.95em;
    color: #888;
    margin-bottom: 4px;
}

.msg-body {
    white-space: pre-line;
}
.m3-btn-file {
    border-radius: 24px 0 0 24px;
    margin-right: -1px;
}

.m3-btn-group .m3-btn:last-child {
    border-radius: 0 24px 24px 0;
}
.m3-btn-row {
    display: flex;
    width: 100%;
    gap: 12px;
}


.m3-btn-full {
    flex: 1 1 0;
    border-radius: 0;
    height: 48px;
    background: #1976d2;
    color: #fff;
    border: none;
    font-size: 1.08em;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, box-shadow 0.2s;
}

.m3-btn-full:active,
.m3-btn-full:focus {
    background: #125ea2;
}

.support-badge {
    display: inline-block;
    min-width: 22px;
    padding: 2px 7px;
    background: #e53935;
    color: #fff;
    border-radius: 12px;
    font-size: 0.95em;
    font-weight: 600;
    vertical-align: middle;
    margin-left: 6px;
    text-align: center;
}
.m3-file-list {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.m3-file-item {
    display: flex;
    align-items: center;
    background: #f6f8fa;
    border-radius: 16px;
    padding: 10px 16px;
    box-shadow: 0 1px 4px rgba(25,118,210,0.06);
    font-size: 1em;
    transition: box-shadow 0.2s;
}
.m3-file-link {
    color: #1976d2;           /* Material 3 primærblå */
    font-weight: 500;
    font-family: inherit;      /* Bruk samme font som resten av siden */
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s;
}
.m3-file-link:hover {
    color: #125ea2;           /* En mørkere blå ved hover */
}
.m3-file-item:hover {
    box-shadow: 0 2px 8px rgba(25,118,210,0.12);
}
.m3-file-icon {
    margin-right: 12px;
    display: flex;
    align-items: center;
}
.m3-file-name {
    flex: 1;
    color: #1976d2;
    font-weight: 500;
    word-break: break-all;
}
.m3-file-remove {
    background: none;
    border: none;
    color: #e53935;
    font-size: 1.5em;
    cursor: pointer;
    margin-left: 8px;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}
.m3-file-remove:hover {
    background: #ffeaea;
}
.m3-dialog-bg {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(33, 33, 33, 0.25);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.m3-dialog {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(25, 118, 210, 0.12);
    padding: 32px 28px 24px 28px;
    max-width: 360px;
    width: 100%;
    text-align: center;
}
.m3-dialog-title {
    font-size: 1.25em;
    font-weight: 600;
    margin-bottom: 12px;
    color: #1976d2;
}
.m3-dialog-content p {
    margin: 12px 0;
}
.upload-form-group {
    margin-bottom: 18px;
}

.upload-screen-selector {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.upload-screen-item {
    display: flex;
    align-items: center;
}

.upload-screen-item input[type="checkbox"] {
    accent-color: #1976d2;
    margin-right: 12px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.upload-screen-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 14px;
    border-radius: 8px;
    background: #f6f8fa;
    transition: background 0.2s, box-shadow 0.2s;
    min-width: 160px;
    font-size: 1em;
    font-weight: 500;
    box-shadow: 0 1px 4px rgba(25,118,210,0.06);
}

.upload-screen-label:hover,
.upload-screen-item input[type="checkbox"]:focus + .upload-screen-label {
    background: #e3f0fd;
    box-shadow: 0 2px 8px rgba(25,118,210,0.12);
}

.upload-screen-icon {
    margin-right: 10px;
    font-size: 1.2em;
}

.upload-screen-name {
    color: #1976d2;
    font-weight: 500;
}

.upload-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 24px;
    background: #1976d2;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1.08em;
    font-weight: 500;
    font-family: inherit;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(25,118,210,0.08);
    transition: background 0.2s, box-shadow 0.2s, color 0.2s;
    outline: none;
    letter-spacing: 0.03em;
}

.upload-btn-filled:hover,
.upload-btn-filled:focus {
    background: #1565c0;
}

.upload-filename-display {
    margin-top: 6px;
    color: #1976d2;
    font-size: 0.98em;
    font-weight: 500;
}

.upload-label {
    font-size: 1em;
    font-weight: 500;
    color: #1976d2;
    margin-bottom: 4px;
    display: block;
}

/* Legg til i dashboard/admin css */
.screen-code-badge {
    display: inline-block;
    background: #e3e8ff;
    color: #2a3990;
    font-weight: bold;
    font-size: 1.2em;
    border-radius: 12px;
    padding: 2px 10px;
    margin-left: 8px;
    letter-spacing: 1px;
    box-shadow: 0 1px 3px rgba(60,60,120,0.07);
}

.screen-code-badge.clickable {
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
}

.screen-code-badge.clickable:hover {
    background: #d1d9ff;
    color: #1a2d80;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(60,60,120,0.15);
}