/* Tilpasset CSS for Norova CRM */

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

*,
*::before,
*::after {
    min-width: 0;
}

img,
svg,
video,
canvas {
    max-width: 100%;
}

.app-shell,
.app-main {
    min-width: 0;
}

.app-main {
    overflow-x: clip;
}

.card,
.modal-content,
.dropdown-menu,
.alert,
.list-group-item {
    overflow-wrap: anywhere;
}

.btn,
.badge,
.page-link,
.input-group-text {
    white-space: normal;
}

.btn i,
.badge i,
.page-link i,
.input-group-text i {
    flex: 0 0 auto;
}

.table-responsive,
.crm-table-wrap,
.overflow-auto {
    max-width: 100%;
}

.table-responsive table,
.crm-table-wrap table,
.overflow-auto table {
    min-width: max-content;
}

.pagination {
    flex-wrap: wrap;
    gap: 0.25rem;
}

/* Høyrejuster navbar-lenker i kollapset hamburgermeny */
@media (max-width: 991px) {
    .navbar-collapse .navbar-nav {
        text-align: right;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        width: auto;
        margin-right: 15px;
        background-color: #f8f9fa;
    }
    .navbar-nav .nav-item {
        display: inline-block;
        margin-left: 10px;
        margin-bottom: 10px;
    }
    .navbar-nav .nav-link {
        padding-right: 15px;
        text-align: right;
    }
}

/* Styling for autentiseringsmaler og generelle sider */
.auth-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
}

.auth-card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background-color: #ffffff;
    padding: 30px;
    transition: box-shadow 0.2s ease-in-out;
}

.auth-card:hover {
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.12);
}

.auth-card h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

.auth-card h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #333;
    text-align: center;
}

.auth-card .form-label {
    font-weight: 500;
    color: #555;
}

.auth-card .form-control {
    border-radius: 5px !important;
    border: 1px solid #ced4da !important;
    padding: 10px !important;
    transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    background-color: #f9f9f9;
}

.auth-card .form-control:focus {
    border-color: #007bff !important;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.3) !important;
    outline: none !important;
}

.auth-card .form-control[readonly] {
    background-color: #e9ecef;
    opacity: 1;
}

.auth-card .btn-primary {
    width: 100%;
    padding: 12px;
    border-radius: 5px;
    background-color: #007bff;
    border: none;
    font-size: 1.1rem;
    color: #ffffff !important;
    transition: background-color 0.2s ease-in-out;
}

.auth-card .btn-primary:hover {
    background-color: #0056b3;
}

.auth-card .btn-secondary {
    padding: 10px 20px;
    border-radius: 5px;
    background-color: #6c757d;
    border: none;
    font-size: 1rem;
    color: #ffffff !important;
    transition: background-color 0.2s ease-in-out;
}

.auth-card .btn-secondary:hover {
    background-color: #5a6268;
}

.auth-card .btn-danger {
    padding: 10px 20px;
    border-radius: 5px;
    background-color: #dc3545;
    border: none;
    font-size: 1rem;
    color: #ffffff !important;
    transition: background-color 0.2s ease-in-out;
}

.auth-card .btn-danger:hover {
    background-color: #c82333;
}

.auth-card .btn-warning {
    padding: 10px 20px;
    border-radius: 5px;
    background-color: #ffc107;
    border: none;
    font-size: 1rem;
    color: #212529 !important;
    transition: background-color 0.2s ease-in-out;
}

.auth-card .btn-warning:hover {
    background-color: #e0a800;
}

.auth-card .alert-danger {
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.auth-card .alert-success {
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.auth-card .links {
    margin-top: 15px;
    text-align: center;
    font-size: 0.9rem;
}

.auth-card .links a {
    color: #007bff;
    text-decoration: none;
}

.auth-card .links a:hover {
    text-decoration: underline;
}

.auth-card .links .btn-primary {
    display: inline-block !important;
    width: auto !important;
    padding: 10px 20px !important;
    background-color: #007bff !important;
    color: #ffffff !important;
    border: none !important;
    font-size: 1rem !important;
    line-height: normal !important;
}

/* Forbedret tekstformatering i auth-card */
.auth-card p {
    font-size: 1rem;
    line-height: 1.6;
    color: #555;
}

.auth-card .lead {
    font-size: 1.1rem;
    font-weight: 500;
    color: #333;
}

.auth-card ul.list-unstyled li {
    font-size: 1rem;
    line-height: 1.6;
    color: #555;
}

.auth-card ul.list-unstyled li strong {
    color: #333;
}

/* CRM list/detail surfaces */
.crm-page-header {
    align-items: flex-start;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
}

.crm-page-header .btn {
    white-space: nowrap;
}

.card-header,
.card-body,
.modal-body {
    min-width: 0;
}

.crm-stat-card,
.crm-action-card,
.crm-table-card,
.profile-section-card,
.home-focus {
    border-radius: 8px;
}

.crm-stat-card {
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 10px rgba(16, 24, 40, 0.06);
}

.crm-stat-card .card-body {
    min-height: 8rem;
}

.crm-stat-icon {
    align-items: center;
    background: #eaf3ff;
    border-radius: 8px;
    color: #0d6efd;
    display: inline-flex;
    height: 2.35rem;
    justify-content: center;
    margin-bottom: 0.75rem;
    width: 2.35rem;
}

.crm-action-card {
    border: 1px solid #e9ecef !important;
}

.crm-table-card {
    border-radius: 8px;
    overflow: hidden;
}

.crm-search-form {
    width: min(100%, 430px);
}

.crm-table-wrap {
    max-height: 560px;
    overflow-y: auto;
}

.crm-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    color: #495057;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
    white-space: nowrap;
}

.crm-table tbody tr {
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
}

.crm-table tbody tr:hover {
    background: #f8fbff;
}

.crm-form-card {
    border-radius: 8px;
}

.crm-form-section,
.crm-form-side,
.brreg-lookup-panel {
    background: #fff;
    border: 1px solid #e9eef5;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(16, 24, 40, 0.05);
}

.crm-form-section {
    padding: 1.25rem;
}

.crm-form-side {
    padding: 1.25rem;
    position: sticky;
    top: 1rem;
}

.brreg-lookup-panel {
    background: #f8fbff;
    padding: 1rem;
}

.contact-form-card .form-label {
    color: #334155;
    font-weight: 600;
}

.contact-form-card .form-control,
.contact-form-card .form-select {
    border-color: #dbe3ef;
    border-radius: 6px;
    padding: 0.7rem 0.85rem;
}

.contact-form-card textarea.form-control {
    min-height: 9rem;
}

.contact-form-card .form-check {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    display: flex;
    gap: 0.5rem;
    min-height: 2.5rem;
    padding: 0.5rem 0.75rem 0.5rem 2.2rem;
}

.contact-form-card .form-check-input {
    margin-left: -1.45rem;
}

.crm-visibility-grid {
    display: grid;
    gap: 0.55rem;
}

.min-w-0 {
    min-width: 0;
}

@media (max-width: 1199.98px) {
    .crm-form-side {
        position: static;
    }
}

.contact-form-logo {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    height: 48px;
    padding: 0.45rem;
    width: 48px;
}

.contact-info-panel {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
}

.contact-info-icon {
    align-items: center;
    background: #eaf3ff;
    border-radius: 8px;
    color: #0d6efd;
    display: inline-flex;
    height: 2.5rem;
    justify-content: center;
    margin-bottom: 1rem;
    width: 2.5rem;
}

.contact-info-list {
    display: grid;
    gap: 1rem;
}

.contact-info-list > div {
    border-top: 1px solid #e5e7eb;
    padding-top: 1rem;
}

.contact-info-label {
    color: #475569;
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0;
    margin-bottom: 0.2rem;
    text-transform: uppercase;
}

.crm-table td,
.crm-table th {
    padding: 0.85rem 0.9rem;
    vertical-align: middle;
}

.crm-table td {
    overflow-wrap: anywhere;
}

.crm-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 0.75rem;
}

.crm-detail-field {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 0.85rem;
    background: #fff;
}

.crm-detail-label {
    color: #6c757d;
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    text-transform: uppercase;
}

.crm-timeline {
    border-left: 2px solid #e9ecef;
    margin-left: 1rem;
    padding-left: 1.4rem;
}

.crm-timeline-item {
    position: relative;
}

.crm-timeline-item + .crm-timeline-item {
    margin-top: 1.25rem;
}

.crm-timeline-icon {
    align-items: center;
    border-radius: 50%;
    display: flex;
    height: 2rem;
    justify-content: center;
    left: -2.45rem;
    position: absolute;
    top: 0;
    width: 2rem;
}

.interaction-form-page {
    max-width: 1180px;
}

.interaction-form-card .form-label {
    color: #334155;
    font-weight: 600;
}

.interaction-form-card .form-control,
.interaction-form-card .form-select,
.interaction-form-card .input-group .btn {
    border-color: #dbe3ef;
    border-radius: 6px;
}

.interaction-form-card .form-control,
.interaction-form-card .form-select {
    padding: 0.7rem 0.85rem;
}

.interaction-form-card textarea.form-control {
    min-height: 10rem;
    resize: vertical;
}

.crm-datetime-group .crm-datetime-input {
    border-bottom-right-radius: 0;
    border-top-right-radius: 0;
}

.crm-datetime-group .crm-datetime-button {
    align-items: center;
    border-bottom-left-radius: 0;
    border-top-left-radius: 0;
    display: inline-flex;
    justify-content: center;
    min-width: 3rem;
}

.crm-datetime-input {
    min-height: 2.9rem;
}

.interaction-check {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.9rem 0.9rem 0.9rem 2.75rem;
}

.interaction-readonly-meta {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 1rem;
    padding: 0.85rem 1rem;
}

.interaction-readonly-meta span {
    color: #475569;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.interaction-readonly-meta input {
    min-width: 14rem;
}

.interaction-context {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.8rem 1rem;
}

.interaction-context-icon {
    align-items: center;
    background: #eaf3ff;
    border-radius: 8px;
    color: #0d6efd;
    display: inline-flex;
    height: 2.35rem;
    justify-content: center;
    width: 2.35rem;
}

.interaction-context-label {
    color: #64748b;
    display: block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}

.crm-empty-state {
    color: #6c757d;
    padding: 3rem 1rem;
    text-align: center;
}

.crm-empty-state > i {
    color: #0d6efd;
    display: block;
    font-size: 2.4rem;
    margin-bottom: 0.75rem;
}

.analytics-page .display-6 {
    letter-spacing: 0;
}

.analytics-action-icon {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    display: inline-flex;
    flex: 0 0 2.25rem;
    height: 2.25rem;
    justify-content: center;
    width: 2.25rem;
}

.analytics-progress {
    height: 0.55rem;
}

.today-focus-card {
    color: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.today-focus-card:hover,
.today-focus-card:focus {
    box-shadow: 0 0.75rem 1.5rem rgba(15, 23, 42, 0.08);
    transform: translateY(-2px);
}

.today-action-row {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.today-row-actions {
    align-items: center;
    display: inline-flex;
    flex: 0 0 auto;
    gap: 0.35rem;
}

.today-row-actions .btn {
    align-items: center;
    display: inline-flex;
    height: 2rem;
    justify-content: center;
    padding: 0;
    width: 2rem;
}

.home-focus .list-group-item {
    padding-bottom: 0.9rem;
    padding-top: 0.9rem;
}

.min-w-0 {
    min-width: 0;
}

.profile-card,
.profile-section-card {
    box-shadow: 0 2px 12px rgba(16, 24, 40, 0.07);
}

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

.profile-avatar-wrap {
    margin-bottom: 1.5rem;
    text-align: center;
}

.profile-avatar {
    aspect-ratio: 1 / 1;
    border: 4px solid #f1f5f9;
    border-radius: 50%;
    height: 9rem;
    object-fit: cover;
    width: 9rem;
}

.profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.profile-actions .btn {
    flex: 1 1 12rem;
}

.profile-button-group {
    flex-wrap: wrap;
}

.profile-section-card h2,
.profile-section-card h3 {
    text-align: left;
}

.newsletter-preview {
    background: #ffffff;
}

.newsletter-preview-header {
    border-bottom: 1px solid #eef2f7;
    padding: 2rem;
}

.newsletter-preview-header h2 {
    font-size: 1.8rem;
    margin-bottom: 0.75rem;
}

.newsletter-preview-header p {
    color: #6c757d;
    margin-bottom: 0;
}

.newsletter-preview-hero {
    display: block;
    max-height: 360px;
    object-fit: cover;
    width: 100%;
}

.newsletter-preview-body {
    padding: 2rem;
}

.newsletter-preview-body img {
    max-width: 100%;
    height: auto;
}

.newsletter-preview-footer {
    background: #f8fafc;
    border-top: 1px solid #eef2f7;
    color: #6c757d;
    font-size: 0.9rem;
    padding: 1rem 2rem;
}

.home-hero-image {
    max-width: min(100%, 600px);
}

.home-widget-card,
.home-widget-row {
    border-radius: 8px;
}

.home-widget-title {
    color: #1f2937;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
}

.dashboard-widget-grid > [class*="col-"] {
    display: flex;
}

.dashboard-widget-tile {
    align-items: center;
    color: #1f2937;
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 0.8rem;
    justify-content: center;
    min-height: 9.25rem;
    padding: 1.25rem;
    position: relative;
    text-decoration: none;
    width: 100%;
}

.dashboard-widget-tile:hover,
.dashboard-widget-tile:focus {
    color: #0d6efd;
    outline: none;
    text-decoration: none;
}

.dashboard-widget-tile:focus-visible {
    box-shadow: 0 0 0 0.22rem rgba(13, 110, 253, 0.2);
}

.dashboard-widget-tile .feature-icon {
    margin-bottom: 0;
}

.dashboard-widget-tile h3 {
    color: inherit;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.25;
    margin: 0;
}

.dashboard-widget-meta,
.dashboard-widget-submeta {
    color: #6c757d;
    line-height: 1.2;
    text-align: center;
}

.dashboard-widget-meta {
    font-size: 0.86rem;
    font-weight: 700;
}

.dashboard-widget-submeta {
    font-size: 0.74rem;
    max-width: 100%;
}

.dashboard-widget-action {
    border: 1px solid currentColor;
    border-radius: 999px;
    color: #0d6efd;
    display: inline-flex;
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1;
    padding: 0.42rem 0.85rem;
}

.dashboard-widget-tile:hover .dashboard-widget-action,
.dashboard-widget-tile:focus .dashboard-widget-action {
    background: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
}

.dashboard-team-widget {
    gap: 0.55rem;
}

.dashboard-widget-badge {
    align-items: center;
    background: #dc3545;
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 700;
    height: 1.55rem;
    justify-content: center;
    min-width: 1.55rem;
    padding: 0 0.4rem;
    position: absolute;
    right: 0.75rem;
    top: 0.75rem;
}

.dashboard-widget-tile.coming-soon {
    color: #6c757d;
    opacity: 0.58;
    pointer-events: none;
}

.dashboard-widget-tile.coming-soon::after {
    background-color: #ffc107;
    border-radius: 999px;
    color: #212529;
    content: "Kommer snart";
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.5rem;
    position: absolute;
    right: 0.65rem;
    top: 0.65rem;
}

.team-summary-grid > [class*="col-"] {
    display: flex;
}

.team-stat,
.team-section,
.team-form-panel,
.team-member-card {
    border-radius: 8px;
}

.team-stat {
    align-items: center;
    background: #fff;
    border: 1px solid rgba(13, 110, 253, 0.12);
    box-shadow: 0 0.5rem 1.25rem rgba(15, 23, 42, 0.06);
    display: flex;
    flex: 1 1 auto;
    gap: 0.85rem;
    min-width: 0;
    padding: 1rem;
}

.team-stat-icon {
    align-items: center;
    border-radius: 8px;
    display: inline-flex;
    flex: 0 0 2.6rem;
    font-size: 1.25rem;
    height: 2.6rem;
    justify-content: center;
    width: 2.6rem;
}

.team-stat-value {
    color: #1f2937;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1;
}

.team-stat-label {
    color: #6c757d;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.25;
}

.team-section {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 0.75rem 1.75rem rgba(15, 23, 42, 0.06);
    padding: 1.25rem;
}

.team-section-header {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.team-member-list {
    display: grid;
    gap: 0.85rem;
}

.team-member-card {
    align-items: flex-start;
    border: 1px solid rgba(15, 23, 42, 0.08);
    display: grid;
    gap: 0.85rem;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 1rem;
}

.team-member-card.pending {
    background: #fffaf0;
}

.team-member-card.owner {
    background: #f8fafc;
    margin-bottom: 0.85rem;
}

.team-member-main {
    align-items: flex-start;
    display: flex;
    gap: 0.85rem;
    min-width: 0;
}

.team-avatar {
    align-items: center;
    background: #e7f1ff;
    border-radius: 8px;
    color: #0d6efd;
    display: inline-flex;
    flex: 0 0 2.65rem;
    font-weight: 800;
    height: 2.65rem;
    justify-content: center;
    width: 2.65rem;
}

.team-avatar.pending {
    background: #fff3cd;
    color: #7a5700;
}

.team-avatar.owner {
    background: #111827;
    color: #fff;
}

.team-member-copy {
    min-width: 0;
}

.team-member-copy h3 {
    color: #1f2937;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.25;
    margin: 0 0 0.2rem;
    overflow-wrap: anywhere;
}

.team-member-email {
    color: #6c757d;
    font-size: 0.86rem;
    overflow-wrap: anywhere;
}

.team-member-meta {
    align-items: center;
    color: #6c757d;
    display: flex;
    flex-wrap: wrap;
    font-size: 0.78rem;
    gap: 0.4rem;
    margin-top: 0.5rem;
}

.team-permission-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.55rem;
}

.team-permission-list span {
    background: #f1f5f9;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 999px;
    color: #475569;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.2;
    padding: 0.25rem 0.55rem;
}

.team-share-option {
    align-items: center;
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    gap: 0.45rem;
    max-width: 100%;
    padding: 0.45rem 0.65rem;
}

.team-share-option span {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
}

.team-audit-filters {
    align-items: end;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: minmax(180px, 1.4fr) minmax(160px, 1fr) minmax(150px, 1fr) minmax(130px, 0.7fr) minmax(130px, 0.7fr) auto;
}

.team-audit-filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.team-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: flex-end;
}

.team-actions form {
    display: inline-flex;
}

.team-edit {
    grid-column: 1 / -1;
    min-width: 0;
    padding-top: 0.3rem;
}

.audit-event-list {
    display: grid;
    gap: 0.75rem;
}

.audit-event {
    align-items: flex-start;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 8px;
    display: flex;
    gap: 0.8rem;
    min-width: 0;
    padding: 0.9rem;
}

.audit-event-icon {
    align-items: center;
    background: #e7f1ff;
    border-radius: 8px;
    color: #0d6efd;
    display: inline-flex;
    flex: 0 0 2.4rem;
    height: 2.4rem;
    justify-content: center;
    width: 2.4rem;
}

.audit-event-copy {
    min-width: 0;
}

.audit-event-title {
    color: #1f2937;
    font-weight: 800;
    overflow-wrap: anywhere;
}

.audit-event-meta {
    color: #6c757d;
    display: flex;
    flex-wrap: wrap;
    font-size: 0.78rem;
    gap: 0.35rem 0.7rem;
    margin-top: 0.25rem;
}

.invite-accept-card {
    max-width: 34rem;
}

.admin-stat-card .crm-stat-icon {
    margin-bottom: 0.6rem;
}

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

.admin-shortcut {
    align-items: center;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    color: inherit;
    display: flex;
    gap: 0.75rem;
    min-height: 5rem;
    padding: 0.9rem;
    text-decoration: none;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.admin-shortcut:hover,
.admin-shortcut:focus {
    background: #f8fbff;
    border-color: #cfe2ff;
    color: inherit;
}

.admin-shortcut-icon {
    align-items: center;
    background: #eaf3ff;
    border-radius: 8px;
    color: #0d6efd;
    display: inline-flex;
    flex: 0 0 2.35rem;
    height: 2.35rem;
    justify-content: center;
    width: 2.35rem;
}

.admin-mini-stat {
    background: #f8fafc;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 0.9rem;
}

.admin-mini-stat span,
.admin-mini-stat strong {
    display: block;
}

.admin-mini-stat span {
    color: #6c757d;
    font-size: 0.82rem;
}

.admin-mini-stat strong {
    font-size: 1.55rem;
}

.doc-page .card,
.doc-page .alert,
.doc-page .modal-content {
    border-radius: 8px;
}

.doc-search-form {
    width: min(100%, 430px);
}

.doc-page .table {
    min-width: 720px;
}

.doc-page .btn {
    white-space: nowrap;
}

.doc-page .list-group-item {
    gap: 0.75rem;
}

@media (max-width: 767px) {
    h1,
    .h1 {
        font-size: 1.75rem;
    }

    h2,
    .h2 {
        font-size: 1.45rem;
    }

    h3,
    .h3 {
        font-size: 1.25rem;
    }

    .crm-page-header {
        flex-direction: column;
    }

    .crm-page-header .btn,
    .crm-page-header > .d-flex {
        width: 100%;
    }

    .crm-page-header > .d-flex .btn {
        flex: 1 1 10rem;
    }

    .team-section,
    .team-form-panel {
        padding: 1rem;
    }

    .team-section-header,
    .team-member-card {
        grid-template-columns: 1fr;
    }

    .team-section-header {
        align-items: stretch;
        flex-direction: column;
    }

    .team-member-card {
        display: grid;
    }

    .team-actions {
        justify-content: flex-start;
    }

    .team-actions .btn {
        min-width: 2.55rem;
    }

    .team-audit-filters {
        grid-template-columns: 1fr;
    }

    .team-audit-filter-actions .btn {
        flex: 1 1 9rem;
    }

    .app-main {
        padding-left: 0.85rem !important;
        padding-right: 0.85rem !important;
    }

    .crm-table-wrap {
        max-height: none;
    }

    .crm-table td,
    .crm-table th {
        padding: 0.7rem;
    }

    .card-header {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .card-body {
        padding: 1rem;
    }

    .d-flex.justify-content-between,
    .d-flex.justify-content-end,
    .modal-footer {
        flex-wrap: wrap;
    }

    form.d-flex:not(.keep-inline),
    .input-group:not(.keep-inline) {
        flex-wrap: wrap;
    }

    form.d-flex:not(.keep-inline) > .form-control,
    form.d-flex:not(.keep-inline) > .form-select,
    form.d-flex:not(.keep-inline) > .btn,
    form.d-flex:not(.keep-inline) > input[type="file"],
    .input-group:not(.keep-inline) > .form-control,
    .input-group:not(.keep-inline) > .form-select,
    .input-group:not(.keep-inline) > .btn,
    .input-group:not(.keep-inline) > .input-group-text {
        border-radius: 0.375rem !important;
        flex: 1 1 100%;
        width: 100%;
    }

    .btn {
        align-items: center;
        display: inline-flex;
        justify-content: center;
        min-height: 2.45rem;
    }

    .btn-sm {
        min-height: 2.1rem;
    }

    .display-6 {
        font-size: 1.85rem;
    }

    .profile-button-group,
    .profile-button-group .btn {
        width: 100%;
    }

    main.flex-grow-1 {
        margin-left: 0 !important;
        padding-bottom: 5.5rem !important;
    }

    .container {
        max-width: 100%;
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .container-fluid {
        padding-left: 0.85rem;
        padding-right: 0.85rem;
    }

    .auth-card {
        padding: 1.15rem;
    }

    .auth-card h2 {
        font-size: 1.45rem;
    }

    .auth-card h3 {
        font-size: 1.2rem;
    }

    .home-hero h1 {
        font-size: 1.8rem;
    }

    .home-hero .logo-inline {
        height: 3.2rem;
    }

    .home-public-container {
        padding-top: 1.5rem !important;
    }

    .home-hero {
        margin-bottom: 2rem !important;
    }

    .home-hero-image {
        max-width: min(78vw, 280px);
        margin-bottom: 1rem !important;
    }

    .home-hero .d-flex.align-items-center.justify-content-center {
        flex-direction: column;
        gap: 0.35rem;
    }

    .home-hero .lead {
        font-size: 1rem;
    }

    .home-hero-actions {
        display: grid;
        gap: 0.65rem;
        margin-bottom: 2rem !important;
    }

    .home-hero-actions .btn {
        margin: 0 !important;
        width: 100%;
    }

    .features,
    .testimonials,
    .why-choose-us {
        margin-bottom: 2rem !important;
    }

    .features .auth-card,
    .testimonials .auth-card {
        padding: 1rem;
    }

    .features h2,
    .testimonials h2,
    .why-choose-us h2 {
        font-size: 1.35rem;
    }

    .features h3,
    .why-choose-us h4 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .features p,
    .testimonials p,
    .why-choose-us p {
        font-size: 0.95rem;
        line-height: 1.45;
    }

    .dashboard-page {
        padding-top: 1.5rem !important;
    }

    .dashboard-section {
        margin-bottom: 2rem !important;
    }

    .dashboard-section h2 {
        font-size: 1.25rem;
    }

    .dashboard-widget-tile {
        min-height: 7.8rem;
        padding: 1rem 0.7rem;
    }

    .dashboard-widget-tile h3 {
        font-size: 0.92rem;
    }

    .dashboard-widget-meta {
        font-size: 0.8rem;
    }

    .dashboard-widget-submeta {
        font-size: 0.68rem;
    }

    .dashboard-widget-action {
        font-size: 0.78rem;
        padding: 0.38rem 0.72rem;
    }

    .dashboard-widget-tile.coming-soon::after {
        position: static;
    }

    .dashboard-widget-badge {
        right: 0.45rem;
        top: 0.45rem;
    }

    .today-action-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .today-row-actions {
        flex-wrap: wrap;
    }

    .newsletter-widget .card-body {
        max-height: none !important;
    }

    .newsletter-entry {
        padding: 1rem !important;
    }

    .newsletter-entry img {
        height: auto !important;
        max-width: 100% !important;
    }

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

    .admin-shortcut {
        min-height: 0;
    }

    .doc-page h2 {
        font-size: 1.45rem;
    }

    .doc-page h5 {
        font-size: 1rem;
    }

    .doc-page .card-body {
        padding: 1rem !important;
    }

    .doc-folder-header,
    .doc-search-form,
    .doc-search-form .input-group,
    .doc-page .btn,
    .doc-page .modal-footer .btn {
        width: 100%;
    }

    .doc-page .btn,
    .crm-page-header .btn,
    .pricing-card .btn {
        white-space: normal;
    }

    .doc-input-group {
        display: grid;
        gap: 0.5rem;
    }

    .doc-input-group > .form-control,
    .doc-input-group > .form-select,
    .doc-input-group > .btn {
        border-radius: 0.375rem !important;
        width: 100%;
    }

    .table-responsive,
    .crm-table-wrap {
        -webkit-overflow-scrolling: touch;
    }

    footer .container p:first-child {
        display: flex;
        flex-wrap: wrap;
        gap: 0.4rem 0.75rem;
        justify-content: center;
    }

    footer .container p:first-child a {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .cookie-popup {
        bottom: 0.75rem;
        left: 0.75rem;
        padding: 1rem;
        right: 0.75rem;
    }

    .cookie-popup-buttons {
        display: grid;
        gap: 0.5rem;
    }

    .cookie-popup .btn-primary,
    .cookie-popup .btn {
        width: 100%;
    }
}

@media (max-width: 991px) {
    .navbar .container {
        align-items: flex-start;
        gap: 0.5rem;
    }

    .navbar-collapse {
        width: 100%;
    }

    .navbar-collapse .navbar-nav {
        align-items: stretch;
        background-color: transparent;
        margin-right: 0;
        padding-top: 0.75rem;
        text-align: left;
        width: 100%;
    }

    .navbar-nav .nav-item {
        display: block;
        margin: 0;
    }

    .navbar-nav .nav-link {
        border-radius: 6px;
        padding: 0.65rem 0.75rem;
        text-align: left;
    }

    .navbar-light .navbar-nav .admin-nav-link {
        margin-left: 0;
    }

    .username-display {
        flex: 1 1 auto;
        font-size: 0.9rem;
        margin-left: 0;
        max-width: min(42vw, 13rem);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .username-display .badge {
        display: none;
    }
}

@media (max-width: 430px) {
    .dashboard-widget-grid > [class*="col-"] {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    .dashboard-widget-tile {
        min-height: 6.4rem;
    }
}

/* Scrollbar for databehandlingslogg */
.auth-card .data-log-container {
    max-height: 200px; /* Fast høyde for å begrense området */
    overflow-y: auto; /* Legger til vertikal scrollbar */
    padding-right: 10px; /* For å unngå overlapp med scrollbar */
}

/* Styling for scrollbar (valgfritt, for å matche designet) */
.auth-card .data-log-container::-webkit-scrollbar {
    width: 8px;
}

.auth-card .data-log-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.auth-card .data-log-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.auth-card .data-log-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Styling for ikoner i Funksjoner-seksjonen */
.feature-icon {
    font-size: 1.5rem;
    color: #007bff;
    transition: color 0.2s ease-in-out;
}

.auth-card ul.list-unstyled li:hover .feature-icon {
    color: #0056b3;
}

/* Styling for det norske flagget */
.norwegian-flag {
    font-size: 1.2rem;
    vertical-align: middle;
    margin-left: 5px;
}


@keyframes fadeIn {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Bevarte stiler fra din opprinnelige CSS */
.navbar-light .navbar-nav .nav-link {
    color: #000000;
}
.navbar-light .navbar-nav .nav-link:hover {
    color: #555555;
    background-color: rgba(0, 0, 0, 0.05);
}
.navbar-brand {
    color: #000000;
}
.navbar-brand:hover {
    color: #555555;
}
.navbar-brand img {
    height: 40px;
    margin-right: 10px;
}
.navbar {
    background-color: #f8f9fa;
}
.username-display {
    color: #6c757d;
    font-weight: bold;
    margin-left: 10px;
}

.navbar-light .navbar-nav .admin-nav-link {
    background: #0f766e;
    border-radius: 6px;
    color: #ffffff;
    font-weight: 700;
    margin-left: 0.25rem;
    padding-left: 0.85rem;
    padding-right: 0.85rem;
}

.navbar-light .navbar-nav .admin-nav-link:hover,
.navbar-light .navbar-nav .admin-nav-link:focus {
    background: #115e59;
    color: #ffffff;
}

.navbar-identity {
    flex: 1 1 auto;
    min-width: 0;
}

.notification-menu {
    width: min(320px, calc(100vw - 2rem));
}

.cta-footer {
    background: rgba(255, 255, 255, 0.9); /* Semi-transparent white */
    border-top: 1px solid #e0e0e0;
    position: relative;
    z-index: 1;
    width: 100%; /* Ensure full width */
    max-width: 1440px; /* Increase max width for a longer footer */
    margin: 0 auto; /* Center the footer */
    padding-left: 20px; /* Optional: add horizontal padding */
    padding-right: 20px;
}

.logo-inline {
    height: 5em; /* Match the font size of the <h1> */
    vertical-align: middle; /* Align with the text */
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex-grow: 1;
}

main.with-sidebar {
    margin-left: 60px;
}

footer {
    flex-shrink: 0;
}

@media (max-width: 576px) {
    .pricing-toggle .btn {
        padding: 0.5rem 0.9rem;
        font-size: 1rem;
    }
}

.pricing-toggle .btn {
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    font-weight: bold;
}

.pricing-toggle .btn.active {
    background-color: #007bff;
    color: white;
}

.pricing-card {
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.pricing-card:hover {
    transform: translateY(-5px);
}

.pricing-card.popular {
    background-color: #007bff;
    color: white;
}

.pricing-card.popular .card-header,
.pricing-card.popular .btn {
    background-color: white;
    color: #007bff;
}

.pricing-card.popular .text-muted {
    color: #e0e0e0 !important;
}

.pricing-card .card-header {
    border-bottom: none;
    padding: 1rem;
    position: relative;
}

.pricing-card .card-header .badge {
    position: absolute;
    top: -10px;
    right: 10px;
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
}

.pricing-card .card-body {
    padding: 2rem;
}

.pricing-card h4 {
    font-size: 2.5rem;
    font-weight: bold;
}

.pricing-card .text-muted {
    font-size: 0.9rem;
}

.pricing-card ul {
    text-align: left;
    padding-left: 1.5rem;
    margin: 1rem 0;
}

.pricing-card .btn {
    padding: 0.75rem 2rem;
    border-radius: 25px;
    font-weight: bold;
}

.pricing-card.recommended-plan {
    border: 2px solid #198754;
}

.pricing-card .card-body {
    min-height: 31rem;
}

@media (max-width: 767px) {
    .pricing-card .card-body {
        min-height: 0;
    }

    .pricing-card .card-header .badge {
        position: static;
        white-space: normal;
    }

    .billing-price-box {
        min-width: 0;
        width: 100%;
    }
}

.pricing-upgrade-band {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}

.billing-price-box {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    min-width: 12rem;
    padding: 0.85rem 1rem;
}

.billing-price-box span,
.billing-price-box small,
.billing-price-box strong {
    display: block;
}

.billing-price-box span,
.billing-price-box small {
    color: #6c757d;
}

.billing-price-box strong {
    font-size: 1.15rem;
}

.billing-feature-item {
    align-items: flex-start;
    background: #f8fafc;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    display: flex;
    gap: 0.6rem;
    height: 100%;
    padding: 0.8rem;
}

.billing-upgrade-card {
    border: 1px solid #bbf7d0;
}

.table th, .table td {
    vertical-align: middle;
}

.table i.bi-check-circle {
    font-size: 1.2rem;
}

section {
    margin-bottom: 3rem;
}

/* Styling for cookie popup */
.cookie-popup {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: #fff;
    border: 1px solid #ccc;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1056; /* Høyere enn Bootstrap modal (1055) */
    max-width: 500px;
    text-align: center;
}
.cookie-popup-content {
    text-align: center;
}
.cookie-popup-buttons {
    margin-top: 15px;
}
.cookie-popup p {
    margin-bottom: 15px;
    font-size: 1rem;
    color: #333;
}
.cookie-popup a {
    color: #007bff;
    text-decoration: none;
}
.cookie-popup a:hover {
    text-decoration: underline;
}
.cookie-popup .btn-primary {
    width: auto;
    padding: 10px 20px;
}
.fade-in {
    animation: fadeIn 0.5s ease-in forwards;
}
@keyframes fadeInPopup {
    0% { opacity: 0; transform: translateY(20px); }
    100% { opacity: 1; transform: translateY(0); }
}
.fade-in-popup {
    animation: fadeInPopup 0.4s ease-in-out forwards;
}
