* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: #fff;
    color: #111827;
    padding: 20px;
}

.logo-container {
    display: flex;
    align-items: flex-start;
    margin-bottom: 4rem;
    position: relative;
}

.text-logo {
    display: flex;
    flex-direction: column;
    font-family: 'yellowtail', sans-serif;
    line-height: 1;
}


.text-logo .line1 {
    font-size: 18px;
    color: #4b4646;
    font-weight: bolder;
    margin-bottom: 5px;
    letter-spacing: 1px;
}

.text-logo .line2 {
    font-size: 18px;
    color: #605b5b;
    font-weight: lighter;
    letter-spacing: 1px;
    margin-right: 10px;
    white-space: nowrap;
}

.kommune-logo {
    width: 20px;
    height: auto;
    margin-left: -35px;
    margin-top: 23px;
    position: relative;
}

body[data-municipality="1"] .kommune-logo {
    margin-left: -35px;
}

/* For Jevnaker */
body[data-municipality="2"] .kommune-logo {
    margin-left: -30px;
}

/* For Hole */
body[data-municipality="3"] .kommune-logo {
    margin-left: -79px; /* Reduced space for Hole */
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6B7280;
    margin-bottom: 16px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.add-button {
    background-color: #007AFF;
    color: rgb(249, 249, 249);
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #E5E7EB;
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.stat-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.icon-wrapper {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blue-icon { background-color: #EEF2FF; }
.red-icon { background-color: #FEE2E2; }
.yellow-icon { background-color: #FEF3C7; }
.green-icon { background-color: #D1FAE5; }

.search-section {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.search-bar {
    flex: 1;
    position: relative;
    max-width: 900px;
}

.search-input {
    width: 100%;
    padding: 12px 16px 12px 40px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    font-size: 14px;
}


.filter-select, .type-select {
    padding: 12px 16px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    background: white;
    color: #374151;
    font-size: 14px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7280' d='M3 5l3 3 3-3'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    min-width: 120px;
}

.filter-select:focus, .type-select:focus {
    outline: none;
    border-color: #2563EB;
    box-shadow: 0 0 0 1px #2563EB;
}

.table-container {
    background: white;
    border-radius: 16px;
    border: 1px solid #E5E7EB;
    overflow: hidden;
}



table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 16px;
    font-size: 12px;
    font-weight: 600;
    color: #6B7280;
    text-transform: uppercase;
    background: #F9FAFB;
}

td {
    padding: 16px;
    border-top: 1px solid #E5E7EB;
    color: #374151;
}

.plan-name {
    display: flex;
    align-items: center;
    gap: 12px;
}

.doc-icon {
    width: 32px;
    height: 32px;
    background: #EEF2FF;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.type-badge {
    background: #F3F4F6;
    padding: 4px 8px;
    border-radius: 16px;
    font-size: 12px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.status-red { background-color: #EF4444; }
.status-yellow { background-color: #F59E0B; }
.status-green { background-color: #10B981; }

.action-button {
    background: none;
    border: none;
    cursor: pointer;
    color: #6B7280;
    padding: 4px;
    transition: all 0.2s ease;
}

/* Edit button - brighter blue hover */
.action-button.edit-button:hover img {
    filter: brightness(0) saturate(100%) invert(37%) sepia(98%) saturate(1785%) hue-rotate(197deg) brightness(105%) contrast(107%);
}

/* Delete button - brighter red hover */
.action-button.delete-button:hover img {
    filter: brightness(0) saturate(100%) invert(14%) sepia(95%) saturate(7161%) hue-rotate(359deg) brightness(98%) contrast(115%);
}

/* Eye off icon - brighter red hover */
.action-button img[src*="Eye off"]:hover {
    filter: brightness(0) saturate(100%) invert(14%) sepia(95%) saturate(7161%) hue-rotate(359deg) brightness(98%) contrast(115%);
}

/* Eye icon - brighter green hover */
.action-button img[src*="Eye"]:not([src*="off"]):hover {
    filter: brightness(0) saturate(100%) invert(58%) sepia(87%) saturate(473%) hue-rotate(93deg) brightness(97%) contrast(107%);
}

.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-top: 1px solid #E5E7EB;
    color: #6B7280;
    font-size: 14px;
}

.page-buttons {
    display: flex;
    gap: 8px;
}

.page-button {
    padding: 8px 16px;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    background: white;
    color: #374151;
    cursor: pointer;
}

.sidebar {
    width: 250px;
    background-color: white;
    height: 100vh;
    padding: 20px;
    border-right: 1px solid #E5E7EB;
    position: fixed;
}

.sidebar-title {
    font-size: 14px;
    color: #111827;
    margin-bottom: 24px;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 8px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 10px;
    text-decoration: none;
    color: #1f1e1c;
    border-radius: 8px;
    gap: 12px;
    transition: all 0.2s ease;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background-color: #d3e4f5;
    color: #007AFF;
}

.sidebar-menu .icon {
    width: 20px;
    height: 20px;
    display: inline-block;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: filter 0.2s ease;
}


.sidebar-menu li:nth-child(1) .icon {
    background-image: url('../logo/test.png');
}

.sidebar-menu li:nth-child(2) .icon {
    background-image: url('../logo/userLogo.png');
}

.sidebar-menu li:nth-child(3) .icon {
    background-image: url('../logo/Logout1.png');
}


.sidebar-menu a:hover .icon,
.sidebar-menu a.active .icon {
    filter: brightness(0) saturate(100%) invert(31%) sepia(98%) saturate(1843%) hue-rotate(199deg) brightness(97%) contrast(107%);
}

.main-content {
    margin-left: 250px;
    padding: 20px;
    flex: 1;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #6B7280;
}

.status-cell {
    text-align: left;
    vertical-align: center;
}

.status-dot {
    display: center;
    width: 16px;
    height: 16px;
    margin-left: 10px;
}

.status-red {
    background-color: #FE4747;
}

.status-yellow {
    background-color: #F2EA54;
}

.status-green {
    background-color: #5ECF6B;
}

.icon-size {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto; /* Enable scrolling for tall content */
}

.modal.active {
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Changed from center to allow scrolling */
    padding: 20px; /* Add padding for small screens */
}

.modal-content {
    background-color: white;
    width: 100%; /* Full width on small screens */
    max-width: 500px; /* Maximum width on larger screens */
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin: 40px auto; /* Center and add some space at the top */
    overflow-y: auto; /* Allow scrolling within the modal if needed */
    max-height: 90vh; /* Maximum height relative to viewport */
}

.modal-content h2 {
    font-size: 20px;
    margin: 0 0 24px 0;
    padding-top: 8px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group:first-of-type {
    margin-top: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 14px;
    color: #111827;
}

.form-group input, .form-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    height: 40px;
    box-sizing: border-box;
}

.button-group {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 32px;
}

.button-group button {
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
}

.cancel-btn {
    background-color: #f5f5f5;
    border: none;
}

.submit-btn {
    background-color: #007AFF;
    color: white;
    border: none;
}

.arsak-dropdown {
    position: relative;
    width: 100%;
}

.arsak-input {
    width: 100%;
    padding: 8px 16px;
    border: 1px solid #919395;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    background: white;
    height: 40px;
    box-sizing: border-box;
}

.arsak-input:hover {
    border-color: #707070;
}

.arsak-options {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    background: white;
    border: 1px solid #919395;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-top: 4px;
    z-index: 1001;
}

.arsak-options::-webkit-scrollbar {
    width: 8px;
}

.arsak-options::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.arsak-options::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.arsak-options::-webkit-scrollbar-thumb:hover {
    background: #707070;
}

.options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
}

.arsak-option {
    padding: 10px 12px;
    cursor: pointer;
    white-space: normal;
    line-height: 1.4;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
}

.arsak-option:last-child {
    border-bottom: none;
}

.arsak-option:hover {
    background-color: #e8f0fe;
}

.arsak-option.selected {
    background-color: #e8f0fe;
}

.arsak-option input[type="checkbox"] {
    margin-right: 8px;
    width: 16px;
    height: 16px;
    border: 1px solid #d1d5db;
    border-radius: 3px;
}

.arsak-input-wrapper {
    position: relative;
}

.arsak-input-wrapper::after {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    width: 5px;
    height: 5px;
    border: solid #6b7280;
    border-width: 0 2px 2px 0;
    transform: translateY(-75%) rotate(45deg);
    pointer-events: none;
}

.dropdown-container {
    position: relative;
    width: 100%;
}

.dropdown-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    background: white;
    height: 40px;
    box-sizing: border-box;
}

.input-wrapper {
    position: relative;
}

.input-wrapper::after {
    content: '';
    position: absolute;
    right: 16px;
    top: 50%;
    width: 5px;
    height: 5px;
    border: solid #6b7280;
    border-width: 0 2px 2px 0;
    transform: translateY(-75%) rotate(45deg);
    pointer-events: none;
}

.dropdown-options {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    background: white;
    border: 1px solid #919395;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin-top: 4px;
    z-index: 1001;
}

.dropdown-options::-webkit-scrollbar {
    width: 8px;
}

.dropdown-options::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.dropdown-options::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.dropdown-options::-webkit-scrollbar-thumb:hover {
    background: #707070;
}

.option {
    padding: 10px 12px;
    cursor: pointer;
    white-space: normal;
    line-height: 1.4;
    border-bottom: 1px solid #f0f0f0;
}

.option:last-child {
    border-bottom: none;
}

.option:hover {
    background-color: #e8f0fe;
}

/* For date inputs */
input[type="date"] {
    position: relative;
    padding-right: 40px;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    margin: 0;
}

/* Media queries for different screen sizes */
@media (max-width: 768px) {
    .modal-content {
        max-width: 95%;
        padding: 20px;
    }

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

@media (max-width: 480px) {
    .modal-content {
        padding: 16px;
        margin: 20px 10px;
    }

    .button-group {
        flex-direction: column-reverse;
        gap: 8px;
    }

    .button-group button {
        width: 100%;
    }

    .form-group label {
        font-size: 13px;
    }
}



.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

/* New header buttons container */
.header-buttons {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Style for the new update date button */
.update-date-button {
    background-color: #007AFF;
    color: white;
    border: none;
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.update-date-button:hover {
    background-color: #0056CC;
}

.update-date-button:active {
    background-color: #0056CC;
}

/* Update existing add-button to work in flex container */
.add-button {
    background-color: #007AFF;
    color: rgb(249, 249, 249);
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s ease;
}

.add-button:hover {
    background-color: #0056CC;
}

/* Responsive design for smaller screens */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .header-buttons {
        justify-content: space-between;
        width: 100%;
    }

    .update-date-button,
    .add-button {
        flex: 1;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .header-buttons {
        flex-direction: column;
        gap: 8px;
    }

    .update-date-button,
    .add-button {
        width: 100%;
    }
}

/* Style for last update date display (optional) */
.last-update-date {
    font-size: 12px;
    color: #1e5bd4;
    margin-top: 4px;
}


/*drag and drop */

.plan-row.dragging {
    opacity: 0.5;
    background-color: #f9fafb;
}

.page-button.drag-hover {
    background-color: #f3f4f6;
    transition: background-color 0.2s ease;
}

.plan-row {
    transition: border-color 0.2s ease;
}
/* Add this to your PlanStyring.css file */

#dynamicFieldContainer {
    transition: opacity 0.3s ease;
}

#dynamicFieldContainer.disabled {
    opacity: 0.5;
}

#dynamicField {
    width: 100%;
    padding: 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    margin-top: 4px;
}

#dynamicField:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgb(30, 91, 212);
    outline: none;
}

#dynamicField::placeholder {
    color: #9ca3af;
}

#dynamicFieldLabel {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #1e5bd4;
}


.tooltip {
    position: fixed;
    background-color: #3b82f6;
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.4;
    max-width: 350px;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    word-wrap: break-word;
}

.tooltip.show {
    opacity: 1;
    visibility: visible;
}

/* Tooltip arrow pointing up (when tooltip is above element)
.tooltip::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #3b82f6;
}
*/


/* Tooltip arrow pointing down (when tooltip is below element) */
.tooltip.below::before {
    top: auto;
    bottom: -8px;
    border-bottom: none;
    border-top: 8px solid #1f2937;
}

/* Enhance arsak options to show they have tooltips */
.arsak-option[data-tooltip] {
    position: relative;
}

.arsak-option[data-tooltip]:hover {
    background-color: #e8f0fe;
    transition: background-color 0.2s ease;
}

/* Add a subtle indicator for tooltips */
.arsak-option[data-tooltip]::after {
    content: '?';
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    background-color: #3b82f6;
    color: white;
    border-radius: 50%;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    font-weight: bold;
}

.arsak-option[data-tooltip]:hover::after {
    opacity: 1;
}

/* Mobile responsive tooltip */
@media (max-width: 768px) {
    .tooltip {
        max-width: 280px;
        font-size: 13px;
        padding: 10px 14px;
    }
}

@media (max-width: 480px) {
    .tooltip {
        max-width: 250px;
        font-size: 12px;
        padding: 8px 12px;
    }

    .arsak-option[data-tooltip]::after {
        width: 14px;
        height: 14px;
        font-size: 9px;
    }
}