/* static/css/styles.css */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap");

@layer base {
    html {
        font-family: "Inter", sans-serif;
    }
}

input {
    border: 1px solid #857e7e;
    border-radius: 0.1rem;
    padding: 0 0.5rem;
    margin-top: 0.5rem;
    height: 2.2rem;
    font-size: 1rem;
    width: 100%;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    accent-color: #000000;
}
input[type="checkbox"],
input[type="radio"] {
    width: 1rem !important;
    height: 1rem !important;
    margin: 0 !important;
    accent-color: #000000 !important;
    border-color: #000000 !important;
    cursor: pointer;
}

/* Specifiek voor de container div om alignment te fixen */
.checkbox-container,
.radio-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
} 

input:focus {
    font-size: 1rem;
    border: 2px solid #000000;
    outline: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px white inset !important;
    -webkit-text-fill-color: black !important;
    background-color: white !important;
    font-size: 1rem !important;
}

:root {
    --tw-ring-color: #000000 !important;
}

.button {
    background-color: #000000;
    color: #ffffff;
    border: none;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    padding: 7px 10px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 0.875rem;
}

.button:hover {
    background-color: #333333;
    color: #ffffff;
}

.big-input {
    margin-top: 0.25rem; /* mt-1 */
    padding: 0.25rem; /* p-1 */
    font-size: 1.125rem; /* text-l */
    display: block; /* block */
    width: 100%; /* w-full */
    border: 1px solid #d1d5db; /* border border-gray-300 */
    border-radius: 0.375rem; /* rounded-md */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); /* shadow-sm */
    accent-color: #000000;
}

no-hover:hover {
    background-color: #00000000 !important;
}

h2 {
    color: black;
}

h3 {
    color: black;
}

* {
    font-family:
        "Inter",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        sans-serif;
}

label {
    font-size: 1rem;
    color: #000000;
    display: block;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    padding: 2rem;
    border-radius: 0.5rem;
    width: 100%;
    max-width: 42rem;
    max-height: 90vh;
    overflow-y: auto;
    margin: 1rem;
}

.modal-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: black;
}

.modal-body {
    margin-bottom: 1.5rem;
}

.modal-footer {
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* Enhanced Dialog Header Styles (Shoelace sl-dialog) */
sl-dialog.dialog-enhanced::part(header) {
    display: none;
}

.dialog-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    border-left: 4px solid #000000;
    padding-left: 1rem;
    margin-left: -0.5rem;
    margin-bottom: 1.25rem;
}

.dialog-header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    background-color: rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}

.dialog-header-icon svg {
    width: 20px;
    height: 20px;
    color: #000000;
    stroke: #000000;
}

.dialog-header-text {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.dialog-header-title {
    font-weight: 600;
    font-size: 1.125rem;
    color: #111827;
    line-height: 1.3;
}

.dialog-header-description {
    font-size: 0.875rem;
    font-weight: 400;
    color: #6b7280;
    line-height: 1.4;
}

/* Enhanced List Item Styles (for dialogs) */
.list-item-enhanced {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    background-color: white;
    transition: background-color 0.15s ease;
}

.list-item-enhanced:hover {
    background-color: #f9fafb;
}

.list-item-enhanced:last-child {
    margin-bottom: 0;
}

.list-item-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.list-item-name {
    font-weight: 500;
    color: #111827;
}

.list-item-count {
    font-size: 0.875rem;
    color: #6b7280;
}

.list-item-actions-enhanced {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.list-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 0.375rem;
    background: transparent;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.list-action-btn:hover {
    background-color: #f3f4f6;
}

.list-action-btn svg {
    width: 16px;
    height: 16px;
    color: #6b7280;
}

.list-action-btn:hover svg {
    color: #374151;
}

.list-action-btn.delete:hover {
    background-color: #fee2e2;
}

.list-action-btn.delete svg {
    color: #ef4444;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.card {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    width: 100%;
    padding: 1.5rem;
}

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

.card-title {
    font-size: 1.5rem;
    font-weight: bold;
}

.action-button {
    background-color: black;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: 0.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.action-button:hover {
    background-color: #333;
}

.stepper {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.step-icon {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background-color: #e5e7eb;
    color: #6b7280;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0.5rem;
}

.step.active .step-icon,
.step.completed .step-icon {
    background-color: #4b5563;
    color: white;
}

.step-name {
    font-size: 0.75rem;
    font-weight: 500;
    color: #9ca3af;
    text-align: center;
}

.step.active .step-name,
.step.completed .step-name {
    color: #4b5563;
}

.step-line {
    flex: 1;
    height: 1px;
    background-color: #e5e7eb;
    margin-top: 1.25rem;
}

.step-line.completed {
    background-color: #4b5563;
}

.step-info {
    font-size: 0.75rem;
    color: #4b5563;
    margin-top: 0.5rem;
    text-align: center;
}

.step-info .error {
    color: #ef4444;
    margin-top: 0.25rem;
}

.form-error {
    background-color: #fef2f2;
    border-left: 2px solid #fecaca;
    padding: 0.5rem;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #dc2626;
}

.introjs-tooltip {
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    max-width: 350px;
}

.introjs-button {
    text-shadow: none;
    background-image: none;
    text-align: center;
    font-size: 14px;
    padding: 5px 10px;
    border-radius: 0.25rem;
    border: 1px solid #e5e7eb;
    margin-right: 5px;
    color: #4b5563;
}

.introjs-prevbutton {
    margin-right: 5px;
}

.introjs-nextbutton {
    background-color: #000000 !important;
    color: white !important;
    border: none !important;
}

.introjs-nextbutton:hover, 
.introjs-nextbutton:focus {
    background-color: #333333 !important;
    color: white !important;
    box-shadow: none !important;
}

.introjs-helperLayer {
    background-color: rgba(255, 255, 255, 0.9);
}

/* Reset and override all IntroJS skip button styling */
.introjs-skipbutton {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    color: #666 !important;
    font-size: 16px !important;
    font-weight: bold !important;
    text-decoration: none !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    text-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: 20px !important;
    height: 20px !important;
    line-height: 20px !important;
    text-align: center !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 999999 !important;
    cursor: pointer !important;
    font-family: sans-serif !important;
}

/* Add extra space in tooltip to accommodate the skip button */
.introjs-tooltip {
    padding-top: 10px !important;
}

/* Ensure buttons have consistent styling */
.introjs-button {
    text-shadow: none !important;
    background-image: none !important;
    text-align: center !important;
    font-size: 14px !important;
    padding: 5px 10px !important;
    border-radius: 0.25rem !important;
    border: 1px solid #e5e7eb !important;
    margin-right: 5px !important;
    color: #4b5563 !important;
}

.introjs-prevbutton {
    margin-right: 5px !important;
}

.introjs-nextbutton {
    background-color: #000000 !important;
    color: white !important;
    border: none !important;
}

.introjs-nextbutton:hover, 
.introjs-nextbutton:focus {
    background-color: #333333 !important;
    color: white !important;
    box-shadow: none !important;
}

.introjs-helperLayer {
    background-color: rgba(255, 255, 255, 0.9) !important;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    max-width: 500px;
    width: 100%;
    position: relative;
}

.close-button {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    color: #666;
}

.close-button:hover {
    color: black;
}

.modal-title {
    margin-top: 0;
    margin-bottom: 15px;
}

.modal-footer {
    margin-top: 20px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.rating-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.rating-label {
    cursor: pointer;
}
.rating-input {
    position: absolute;
    left: -9999px;
}
.rating-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background-color: white;
    color: #4b5563;
    font-weight: 500;
    transition: all 0.2s;
}
.rating-input:checked + .rating-button {
    background-color: #000000;
    color: white;
    border-color: #000000;
}
.rating-button:hover {
    background-color: #f3f4f6;
}
.rating-input:checked + .rating-button:hover {
    background-color: #333333;
}
/* Add style for disabled action buttons */
.action-button:disabled {
    background-color: #d1d5db; /* gray-300 */
    color: #6b7280; /* gray-500 */
    cursor: not-allowed;
    opacity: 0.7;
}
.action-button:disabled:hover {
    background-color: #d1d5db; /* Keep the disabled background color on hover */
}
button.action-button.primary,
a.action-button.primary {
    display: inline-flex;
    align-items: center;
    background-color: white;
    color: #374151;
    border: 1px solid #d1d5db;
    padding: 0.25rem 0.75rem;
    text-decoration: none;
}
button.action-button.primary:hover,
a.action-button.primary:hover {
    background-color: #f3f4f6;
    border-color: #9ca3af;
}

.action-button .spinner {
    display: inline-block;
    width: 0.875rem;
    height: 0.875rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

.action-button.button-success {
    background-color: #10b981;
    border-color: #10b981;
    color: white;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.introjs-tooltip.introjs-tooltip-wide {
    max-width: 600px !important;
    min-width: 400px !important;
    width: auto !important;
    white-space: normal;
}


@keyframes enter {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes leave {
    from { transform: translateX(0); opacity: 1; }
    to { transform: translateX(100%); opacity: 0; }
}

.animate-enter {
    animation: enter 0.3s ease-out;
}

.animate-leave {
    animation: leave 0.3s ease-in forwards;
}

/* Custom Company Dropdown Styles */
.company-dropdown-container {
    position: relative;
    display: inline-flex !important; /* Use inline-flex instead of inline-block */
    align-items: center !important; /* Center vertically within container */
    flex-shrink: 0 !important; /* Prevent container from affecting header height */
    height: 36px !important; /* Match button height exactly */
    max-height: 36px !important; /* Force maximum height */
    min-height: 36px !important; /* Force minimum height */
    vertical-align: middle !important;
    margin: 0 !important;
}

.company-dropdown-button {
    width: 200px !important; /* Fixed width for consistency */
    text-align: left;
    border: none !important; /* Remove border to match select styling */
    transition: all 0.2s ease;
    height: 36px !important; /* Smaller height to match select exactly */
    max-height: 36px !important; /* Force maximum height */
    min-height: 36px !important; /* Force minimum height */
    line-height: 20px !important; /* Tighter line height */
    box-sizing: border-box !important;
    white-space: nowrap; /* Prevent text wrapping */
    overflow: hidden; /* Hide overflow text */
    padding: 8px 12px !important; /* Smaller padding */
    font-size: 14px; /* Match select font size */
    margin: 0 !important; /* Remove any default margins */
    vertical-align: middle !important;
}

.company-dropdown-button:hover {
    background-color: #f9fafb;
}

.company-dropdown-button:focus {
    outline: none;
    background-color: #ffffff;
}

.company-dropdown-button .truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0; /* Allow flex child to shrink below content size */
}

.company-dropdown-button svg {
    vertical-align: middle;
}

/* Force header height consistency */
header.h-16 {
    height: 64px !important;
    max-height: 64px !important;
    min-height: 64px !important;
}

header.h-16 > div {
    height: 100% !important;
}

.company-dropdown-menu {
    position: absolute;
    right: 0;
    top: 100%;
    z-index: 50;
    margin-top: 0.5rem;
    width: 16rem;
    background-color: white;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.company-search-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.company-search-input:focus {
    outline: none;
    border-color: #000000;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);
}

.company-list {
    max-height: 16rem;
    overflow-y: auto;
}

.company-item {
    display: block;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: #374151;
    text-decoration: none;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f3f4f6;
}

.company-item:hover,
.company-item.highlighted {
    background-color: #f3f4f6;
    color: #111827;
}

.company-item:last-child {
    border-bottom: none;
}

/* Scrollbar styling for company list */
.company-list::-webkit-scrollbar {
    width: 4px;
}

.company-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
}

.company-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 2px;
}

.company-list::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

.dashboard-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background-color: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dashboard-table thead {
    background-color: #f9fafb;
}

.dashboard-table th {
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #e5e7eb;
}

.dashboard-table tbody tr {
    transition: background-color 0.15s ease;
}

.dashboard-table tbody tr:not(:last-child) {
    border-bottom: 1px solid #9ca3af;
}

.dashboard-table tbody tr:hover {
    background-color: #f9fafb;
}

.dashboard-table tbody tr.changed-row {
    border: 2px solid #60a5fa;
}

.dashboard-table tbody tr.archived-row {
    background-color: #f9fafb;
}

.dashboard-table td {
    padding: 1rem;
    font-size: 0.875rem;
    color: #374151;
    vertical-align: top;
}

.dashboard-table th.text-right,
.dashboard-table td.text-right {
    text-align: right;
}

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

.flex-row {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.flex-row-end {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 0.5rem;
}

.flex-row-end > .dropdown {
    flex-shrink: 0;
}

.flex-row-end > .action-buttons-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
}

@media (max-width: 1300px) {
    .flex-row-end > .action-buttons-group {
        flex-direction: column;
        align-items: flex-end;
    }
}

@media (max-width: 900px) {
    .dashboard-table td {
        padding: 0.5rem;
    }
    .dashboard-table th {
        padding: 0.5rem;
    }
}

@media (max-width: 768px) {
    .dashboard-table td {
        padding: 0.25rem 0.5rem;
    }
    .dashboard-table th {
        padding: 0.25rem 0.5rem;
        font-size: 0.65rem;
    }
    .dashboard-table td {
        font-size: 0.75rem;
    }
    .action-button {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

.relative {
    position: relative;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
    white-space: nowrap;
}

.badge-default {
    background-color: #f3f4f6;
    color: #6b7280;
}

.badge-secondary {
    background-color: #f3f4f6;
    color: #6b7280;
}

.badge-success {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-blue {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-gray {
    background-color: #f3f4f6;
    color: #6b7280;
}

.file-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: #6b7280;
}

.file-icon.pending {
    color: #ef4444;
    animation: pulse-subtle 2s ease-in-out infinite;
}

@keyframes pulse-subtle {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

.tooltip {
    position: absolute;
    z-index: 1000;
    padding: 0.5rem 0.75rem;
    background-color: white;
    color: #1f2937;
    font-size: 0.75rem;
    border-radius: 0.375rem;
    max-width: 20rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.tooltip.show {
    opacity: 1;
}

.tooltip-title {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.tooltip-files {
    max-height: 12rem;
    overflow-y: auto;
}

.tooltip-files::-webkit-scrollbar {
    width: 4px;
}

.tooltip-files::-webkit-scrollbar-track {
    background: #f3f4f6;
}

.tooltip-files::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 2px;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-trigger {
    position: relative;
    background-color: white;
    border: 1px solid #d1d5db;
    padding: 0.375rem 0.5rem;
    border-radius: 0.375rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.dropdown-trigger:hover {
    background-color: #f9fafb;
}

.dropdown-menu {
    position: absolute;
    right: 0;
    margin-top: 0.5rem;
    min-width: 12rem;
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    z-index: 9999;
    display: none;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-menu.dropdown-up {
    bottom: 100%;
    top: auto;
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.dropdown-item {
    display: flex;
    align-items: center;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    color: #374151;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.15s ease;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.dropdown-item:hover {
    background-color: #f3f4f6;
}

.dropdown-item svg {
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.dropdown-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.dropdown-item.disabled:hover {
    background-color: transparent;
}

.period-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin-top: 0.25rem;
}

.last-modified {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
}

.last-modified-time {
    font-size: 0.875rem;
    color: #6b7280;
}

.last-modified-user {
    font-size: 0.75rem;
    color: #9ca3af;
}

footer, [role="contentinfo"] {
    position: relative;
    z-index: 1;
}

.action-notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 16px;
    height: 16px;
    background-color: #ef4444;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    border: 2px solid white;
}

.dropdown-item.important-action::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: #ef4444;
    border-radius: 50%;
    margin-right: 8px;
    flex-shrink: 0;
}

.lock-icon {
    color: #ef4444;
    cursor: help;
    flex-shrink: 0;
}

/* Dual Range Slider - Period Selector */
.dual-range-container {
    position: relative;
    width: 100%;
    height: 50px;
    margin: 20px 0;
    border: none;
    outline: none;
}

.dual-range-track {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    transform: translateY(-50%);
    z-index: 1;
    border: none;
    outline: none;
    box-shadow: none;
}

.dual-range-highlight {
    position: absolute;
    top: 50%;
    height: 4px;
    background: #1f2937;
    border-radius: 2px;
    transform: translateY(-50%);
    pointer-events: none;
    z-index: 2;
    transition: left 0.1s ease, width 0.1s ease;
}

.dual-range-input {
    position: absolute;
    width: 100%;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    -webkit-appearance: none;
    appearance: none;
    background: transparent !important;
    height: 20px;
    margin: 0;
    padding: 0;
    border: none;
    outline: none;
    accent-color: transparent;
}

.dual-range-input:focus {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

.dual-range-input:focus-visible {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

.dual-range-input:active {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

.dual-range-input#range-start {
    z-index: 8;
}

.dual-range-input#range-end {
    z-index: 7;
}

.dual-range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #1f2937;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    margin-top: -6px;
    position: relative;
}

.dual-range-input::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(31, 41, 55, 0.5);
}

.dual-range-input::-webkit-slider-thumb:active {
    transform: scale(1.1);
}

.dual-range-input::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #1f2937;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.dual-range-input::-moz-range-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(31, 41, 55, 0.5);
}

.dual-range-input::-moz-range-thumb:active {
    transform: scale(1.1);
}

.dual-range-input::-webkit-slider-runnable-track {
    width: 100%;
    height: 4px;
    background: transparent !important;
    border: none;
    box-shadow: none;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    color: transparent;
    cursor: pointer;
}

.dual-range-input::-webkit-slider-container {
    background: transparent !important;
    min-block-size: 0;
    overflow: hidden;
}

.dual-range-input::-webkit-progress-value,
.dual-range-input::-webkit-progress-bar {
    display: none !important;
    background: transparent !important;
}

.dual-range-input::-ms-track {
    width: 100%;
    height: 0;
    background: transparent;
    border-color: transparent;
    color: transparent;
}

.dual-range-input::-ms-fill-lower,
.dual-range-input::-ms-fill-upper {
    background: transparent;
}

.dual-range-input::-moz-range-track {
    height: 4px;
    background: transparent;
    border: none;
    box-shadow: none;
    outline: none;
}

.dual-range-input:focus::-webkit-slider-thumb {
    outline: none;
    box-shadow: none;
}

.dual-range-input:focus::-moz-range-thumb {
    outline: none;
    box-shadow: none;
}

.dual-range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
    color: #374151;
    margin-top: 8px;
    padding: 0 4px;
}

.period-shortcut-btn {
    padding: 8px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: white;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.period-shortcut-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.period-shortcut-btn.active {
    background: #1f2937;
    color: white;
    border-color: #1f2937;
}

/* Date Input and Shortcut Buttons */
.date-input-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.date-input {
    width: 150px;
    padding: 0.625rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.date-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.date-shortcut-btn {
    padding: 0.5rem 0.75rem;
    background-color: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    white-space: nowrap;
}

.date-shortcut-btn:hover {
    background-color: #e5e7eb;
    border-color: #9ca3af;
}

.date-shortcut-btn:active {
    background-color: #d1d5db;
}

/* Amount display styles for financial tables */
.amount-declared {
    font-weight: 700;
    color: #111827;
}

.amount-approved {
    font-weight: 500;
    color: #16a34a;
}

.amount-rejected {
    font-weight: 500;
    color: #dc2626;
}

/* Benchmark Comparison Cards */
.benchmark-card {
    background: #f9fafb;
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    text-align: center;
}

.benchmark-card-disabled {
    opacity: 0.6;
}

.benchmark-card-title {
    font-size: 0.75rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.benchmark-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

.benchmark-value-positive {
    color: #16a34a;
}

.benchmark-diff {
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.benchmark-diff-positive {
    color: #16a34a;
}

.benchmark-diff-negative {
    color: #dc2626;
}

.benchmark-error {
    text-align: center;
    padding: 1rem 0;
    color: #dc2626;
}

.benchmark-reference {
    font-size: 0.625rem;
    color: #9ca3af;
}

/* Button variants */
.button-primary {
    background-color: #3b82f6;
    color: white;
}

.button-primary:hover {
    background-color: #2563eb;
}

.button-dark {
    background-color: #111827;
    color: white;
}

.button-dark:hover {
    background-color: #1f2937;
}

.button-secondary {
    background-color: white;
    color: #374151;
    border: 1px solid #d1d5db;
}

.button-secondary:hover {
    background-color: #f3f4f6;
    border-color: #9ca3af;
}

/* CRM dropdown */
.crm-dropdown {
    position: relative;
    display: inline-block;
}

.crm-dropdown-toggle {
    cursor: pointer;
}

.crm-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.25rem;
    min-width: 200px;
    background-color: white;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 50;
}

.crm-dropdown:hover .crm-dropdown-menu,
.crm-dropdown.open .crm-dropdown-menu {
    display: block;
}

.crm-dropdown-item {
    display: block;
    padding: 0.5rem 1rem;
    color: #374151;
    text-decoration: none;
    font-size: 0.875rem;
}

.crm-dropdown-item:hover {
    background-color: #f3f4f6;
}

.crm-dropdown-item:first-child {
    border-radius: 0.375rem 0.375rem 0 0;
}

.crm-dropdown-item:last-child {
    border-radius: 0 0 0.375rem 0.375rem;
}

/* Import dropzone */
.import-dropzone {
    border: 2px dashed #d1d5db;
    border-radius: 0.5rem;
    padding: 2rem;
    text-align: center;
    transition: all 0.2s ease;
}

.import-dropzone.dragover {
    border-color: #3b82f6;
    background-color: #eff6ff;
}

.import-dropzone-icon {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 1rem;
    color: #9ca3af;
}

.import-dropzone-text {
    font-size: 1rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.25rem;
}

.import-dropzone-subtext {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.75rem;
}

.import-dropzone-btn {
    cursor: pointer;
}

.import-dropzone-hint {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 1rem;
}

.import-progress-content {
    text-align: center;
    padding: 2rem;
}

.import-progress-content p {
    margin-top: 1rem;
    color: #374151;
}

.import-result-success {
    background-color: #ecfdf5;
    border: 1px solid #a7f3d0;
    border-radius: 0.5rem;
    padding: 1rem;
    color: #065f46;
}

.import-result-success strong {
    display: block;
    margin-bottom: 0.5rem;
}

.import-result-warning {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: #92400e;
}

.import-result-error {
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 0.5rem;
    padding: 1rem;
    color: #991b1b;
}

.import-result-error strong {
    display: block;
    margin-bottom: 0.5rem;
}

.import-help-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    margin-top: 1rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: #3b82f6;
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.15s;
}

.import-help-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Onboarding dialog styles */
.onboarding-step {
    padding: 0.5rem 0;
}

.onboarding-step-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.onboarding-step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    background: #1f2937;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: 50%;
}

.onboarding-step-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
}

.onboarding-step-description {
    font-size: 0.9375rem;
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.onboarding-image-container {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 0.75rem;
    text-align: center;
}

.onboarding-image {
    max-width: 100%;
    height: auto;
    border-radius: 0.375rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.onboarding-progress {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.onboarding-dot {
    width: 0.5rem;
    height: 0.5rem;
    background: #d1d5db;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
}

.onboarding-dot:hover {
    background: #9ca3af;
}

.onboarding-dot.active {
    background: #3b82f6;
    transform: scale(1.25);
}

/* Portal link status indicators */
.portal-link-badge {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 1.5rem !important;
    height: 1.5rem !important;
    padding: 0 0.375rem !important;
    border-radius: 0.375rem !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
}

.portal-link-opened {
    background-color: #dcfce7 !important;
    color: #16a34a !important;
}

.portal-link-not-opened {
    background-color: #fee2e2 !important;
    color: #dc2626 !important;
}

/* CRM page layout with sidebar */
.crm-page-layout {
    display: flex !important;
    gap: 1.5rem !important;
}

.crm-sidebar {
    width: 280px;
    flex-shrink: 0;
    position: sticky;
    top: 1rem;
    height: fit-content;
}

.crm-sidebar-card {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.crm-sidebar-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.crm-content {
    flex: 1;
    min-width: 0;
}

/* Filter toggle button - hidden on desktop */
.crm-filter-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    background-color: white;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    color: #374151;
    cursor: pointer;
    margin-bottom: 1rem;
}

.crm-filter-toggle:hover {
    background-color: #f3f4f6;
    color: #111827;
}

.crm-filter-toggle svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* Filter close button - hidden on desktop */
.crm-filter-close {
    display: none;
    padding: 0.25rem;
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    border-radius: 0.25rem;
}

.crm-filter-close:hover {
    background-color: #f3f4f6;
    color: #374151;
}

/* Sidebar header with close button */
.crm-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Filter overlay - hidden by default */
.crm-filter-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 40;
}

.crm-filter-overlay.active {
    display: block;
}

/* Breadcrumb row with optional toggle button */
.crm-breadcrumb-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Responsive sidebar - collapse filter first at larger breakpoint */
@media (max-width: 1500px) {
    .crm-filter-toggle {
        display: flex;
    }

    .crm-filter-close {
        display: block;
    }

    .crm-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 300px;
        z-index: 50;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
        background-color: #f9fafb;
        padding: 1rem;
    }

    .crm-sidebar.open {
        transform: translateX(0);
    }

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

    /* Remove most grey padding when sidebar collapses, keep small margin */
    main:has(.crm-container) {
        padding-left: 8px !important;
        padding-right: 8px !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .crm-container {
        padding-left: 0 !important;
        padding-right: 0 !important;
        max-width: 100% !important;
    }

    .crm-breadcrumb-row {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    .crm-content .bg-white.rounded-lg.shadow {
        border-radius: 0.5rem !important;
    }

    /* Hide Laatste controle first when sidebar collapses */
    .crm-hide-lg {
        display: none !important;
    }
}

/* Responsive table - hide columns on medium screens (after sidebar collapsed) */
@media (max-width: 768px) {
    .crm-hide-md {
        display: none !important;
    }
}

/* Responsive table - hide more columns on small screens */
@media (max-width: 576px) {
    .crm-hide-sm {
        display: none !important;
    }

    .crm-table-container {
        margin: 0 -1rem;
        padding: 0 1rem;
    }

    .crm-header-buttons {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .crm-header-buttons .button {
        padding: 0.375rem 0.75rem;
        font-size: 0.75rem;
    }

    .crm-header-buttons .button svg {
        width: 0.875rem;
        height: 0.875rem;
    }

    .crm-page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .crm-page-header h1 {
        font-size: 1.25rem;
    }

    .crm-header-buttons {
        width: 100%;
        justify-content: flex-start;
    }

    .crm-header-buttons .button-text {
        display: none;
    }

    .crm-header-buttons .button {
        padding: 0.5rem;
    }

    .crm-header-buttons .button svg {
        margin-right: 0;
    }
}

/* Responsive table - extra small screens */
@media (max-width: 480px) {
    .crm-hide-xs {
        display: none !important;
    }

    /* Remove grey padding around the card on small screens */
    main:has(.crm-container) {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .crm-container {
        padding-left: 0 !important;
        padding-right: 0 !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
    }

    .crm-breadcrumb-row {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        margin-bottom: 0.5rem !important;
    }

    .crm-page-layout {
        gap: 0 !important;
    }

    .crm-filter-toggle {
        border-radius: 0 !important;
    }

    .crm-content .bg-white.rounded-lg.shadow {
        border-radius: 0 !important;
        box-shadow: none !important;
        padding: 1rem !important;
    }
}

.crm-bulk-action-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.crm-bulk-action-info {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.crm-checkbox {
    width: 1rem;
    height: 1rem;
    cursor: pointer;
}

.crm-content .overflow-x-auto {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #9ca3af #f3f4f6;
}

.crm-content .overflow-x-auto::-webkit-scrollbar {
    height: 8px;
}

.crm-content .overflow-x-auto::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 4px;
}

.crm-content .overflow-x-auto::-webkit-scrollbar-thumb {
    background: #9ca3af;
    border-radius: 4px;
}

.crm-content .overflow-x-auto::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

.crm-filter-section {
    margin-bottom: 1rem;
}

.crm-filter-section:last-child {
    margin-bottom: 0;
}

.crm-filter-header {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0;
    margin-top: 0;
    color: #374151;
}

.crm-filter-header-collapsible {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    user-select: none;
    margin-bottom: 0.25rem;
}

.crm-filter-header-collapsible svg {
    width: 12px;
    height: 12px;
    transition: transform 0.2s;
}

.crm-filter-header-collapsible.expanded svg {
    transform: rotate(90deg);
}

.crm-filter-count {
    font-size: 0.75rem;
    font-weight: 500;
    color: #6366f1;
    margin-left: auto;
}

.crm-filter-settings-btn {
    margin-left: auto;
    padding: 0.125rem;
    background: transparent;
    border: none;
    color: #6b7280;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.25rem;
    flex-shrink: 0;
}

.crm-filter-settings-btn:hover {
    color: #374151;
    background-color: #f3f4f6;
}

.crm-filter-collapsible {
    margin-top: 0;
}

.crm-filter-collapsible.collapsed {
    display: none;
}

.crm-filter-items {
    max-height: 300px;
    overflow-y: auto;
}

.crm-filter-item {
    padding: 0.625rem 0.75rem;
    margin-bottom: 0.375rem;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background-color 0.2s;
    border: 1px solid #e5e7eb;
}

.crm-filter-item:last-child {
    margin-bottom: 0;
}

.crm-filter-item:hover {
    background-color: #f9fafb;
}

.crm-filter-item.active {
    background-color: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.crm-filter-item-title {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.125rem;
}

.crm-filter-item.active .crm-filter-item-title {
    color: white;
}

.crm-filter-item-stats {
    font-size: 0.75rem;
    color: #6b7280;
}

.crm-filter-item.active .crm-filter-item-stats {
    color: rgba(255, 255, 255, 0.9);
}

.crm-filter-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
    display: block;
}

.crm-filter-input {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    margin-top: 0;
}

.crm-filter-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.crm-radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.crm-radio-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.crm-radio-item:hover {
    background-color: #f3f4f6;
}

.crm-radio-item.active {
    background-color: #3b82f6;
    color: white;
}

.crm-radio-item input[type="radio"] {
    width: 1rem;
    height: 1rem;
    margin: 0;
    accent-color: #3b82f6;
}

.crm-radio-item.active input[type="radio"] {
    accent-color: white;
}

.crm-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.crm-checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.5rem;
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background-color 0.15s ease;
}

.crm-checkbox-item:hover {
    background-color: #f3f4f6;
}

.crm-checkbox-item input[type="checkbox"] {
    width: 0.875rem;
    height: 0.875rem;
    margin: 0;
    accent-color: #3b82f6;
    cursor: pointer;
}

.crm-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.crm-action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background-color: white;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.15s ease;
    text-decoration: none;
    width: 100%;
    text-align: left;
}

.crm-action-btn:hover {
    background-color: #f3f4f6;
    border-color: #9ca3af;
}

.crm-action-btn svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

/* Note tooltip in patient list */
.note-tooltip-container {
    position: relative;
    display: inline-block;
}

.note-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1f2937;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.15s ease, visibility 0.15s ease;
    margin-bottom: 0.5rem;
    min-width: 200px;
    max-width: 300px;
    white-space: normal;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.note-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: #1f2937 transparent transparent transparent;
}

.note-tooltip-container:hover .note-tooltip {
    opacity: 1;
    visibility: visible;
}

.note-tooltip-item {
    padding: 0.25rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.note-tooltip-item:last-child {
    border-bottom: none;
}

.note-tooltip-date {
    color: #9ca3af;
    font-size: 0.625rem;
    display: block;
    margin-bottom: 0.125rem;
}

.note-tooltip-content {
    display: block;
    line-height: 1.3;
}

/* ============================================
   Patient Portal Styles
   ============================================ */

.portal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.portal-header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.portal-header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.portal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.portal-unread-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    background-color: #ef4444;
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 9999px;
}

.portal-inbox-indicator {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: default;
}

.portal-inbox-icon {
    width: 1.75rem;
    height: 1.75rem;
    color: #6b7280;
}

.portal-new-badge {
    position: absolute;
    top: -0.375rem;
    right: -0.375rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.125rem;
    height: 1.125rem;
    padding: 0 0.25rem;
    background-color: #ef4444;
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    border-radius: 9999px;
    border: 2px solid white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.portal-logout-link {
    color: #6b7280;
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 0.15s;
}

.portal-logout-link:hover {
    color: #ef4444;
}

.portal-messages-section,
.portal-oproepen-section,
.portal-gegevens-section {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.portal-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 1rem 0;
}

.portal-section-title-warning {
    color: #d97706;
}

.portal-section-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.portal-section-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.portal-section-header-row .portal-section-title {
    margin: 0;
}

.portal-filter-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6b7280;
    cursor: pointer;
    user-select: none;
}

.portal-filter-toggle input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    margin: 0;
    cursor: pointer;
}

.portal-message-read {
    display: none;
}

.portal-messages-list.show-all .portal-message-read {
    display: block;
}

.portal-messages-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.portal-message-card {
    position: relative;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: #f9fafb;
    cursor: pointer;
    transition: all 0.15s;
}

.portal-message-card:hover {
    border-color: #d1d5db;
    background: #f3f4f6;
}

.portal-message-unread {
    background: white;
    border-color: #3b82f6;
    border-left-width: 3px;
}

.portal-message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.portal-message-type {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
}

.portal-message-type-icon {
    width: 0.875rem;
    height: 0.875rem;
}

.portal-message-type-oproep {
    background-color: #fef3c7;
    color: #92400e;
}

.portal-message-type-herinnering {
    background-color: #dbeafe;
    color: #1e40af;
}

.portal-message-type-info {
    background-color: #e5e7eb;
    color: #374151;
}

.portal-message-date {
    font-size: 0.75rem;
    color: #6b7280;
}

.portal-message-subject {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 0.5rem 0;
}

.portal-message-content {
    font-size: 0.875rem;
    color: #4b5563;
    line-height: 1.5;
}

.portal-message-content p {
    margin: 0 0 0.5rem 0;
}

.portal-message-content p:last-child {
    margin-bottom: 0;
}

.portal-message-unread-indicator {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 0.5rem;
    height: 0.5rem;
    background-color: #3b82f6;
    border-radius: 50%;
}

.portal-message-unread-hint {
    font-size: 0.75rem;
    color: #3b82f6;
    margin-top: 0.75rem;
    font-style: italic;
}

.portal-message-reply-section {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.portal-reply-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    color: #374151;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}

.portal-reply-toggle-btn:hover {
    background-color: #e5e7eb;
    border-color: #9ca3af;
}

.portal-reply-icon {
    width: 1rem;
    height: 1rem;
}

.portal-reply-form {
    margin-top: 0.75rem;
}

.portal-reply-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    resize: vertical;
    min-height: 100px;
}

.portal-reply-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.portal-reply-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.portal-reply-cancel-btn {
    padding: 0.5rem 1rem;
    background-color: white;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    color: #374151;
    cursor: pointer;
}

.portal-reply-cancel-btn:hover {
    background-color: #f3f4f6;
}

.portal-reply-send-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: #3b82f6;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    color: white;
    cursor: pointer;
    transition: background-color 0.2s;
}

.portal-reply-send-btn:hover {
    background-color: #2563eb;
}

.portal-reply-send-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.portal-reply-send-icon {
    width: 1rem;
    height: 1rem;
}

.portal-reply-success {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background-color: #d1fae5;
    border-radius: 0.375rem;
    color: #065f46;
    font-size: 0.875rem;
}

.portal-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    color: #6b7280;
}

.portal-empty-icon {
    width: 3rem;
    height: 3rem;
    margin-bottom: 1rem;
    color: #9ca3af;
}

.portal-empty-state p {
    margin: 0;
    font-size: 0.875rem;
}

.portal-oproepen-intro {
    font-size: 0.875rem;
    color: #92400e;
    margin: 0 0 1rem 0;
}

.portal-oproepen-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.portal-oproep-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 0.375rem;
}

.portal-oproep-type {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 0.25rem;
}

.portal-oproep-type-DM { background: #dbeafe; color: #1e40af; }
.portal-oproep-type-COPD { background: #ede9fe; color: #5b21b6; }
.portal-oproep-type-Astma { background: #fef3c7; color: #92400e; }
.portal-oproep-type-OZ { background: #d1fae5; color: #065f46; }
.portal-oproep-type-HVZ { background: #fee2e2; color: #991b1b; }
.portal-oproep-type-VVR { background: #fce7f3; color: #9d174d; }

.portal-oproep-details {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.portal-oproep-naam {
    font-size: 0.875rem;
    font-weight: 500;
    color: #111827;
}

.portal-oproep-info {
    font-size: 0.75rem;
    color: #6b7280;
}

.portal-gegevens-list {
    display: grid;
    gap: 0.75rem;
}

.portal-gegevens-item {
    display: flex;
    flex-direction: column;
}

@media (min-width: 640px) {
    .portal-gegevens-item {
        flex-direction: row;
        align-items: center;
    }
}

.portal-gegevens-item dt {
    color: #6b7280;
    font-size: 0.875rem;
    min-width: 10rem;
}

.portal-gegevens-item dd {
    color: #111827;
    font-weight: 500;
    margin: 0;
}

.portal-gegevens-note {
    margin: 1rem 0 0 0;
    padding: 0.75rem 1rem;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    color: #1e40af;
}

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

.portal-section-header .portal-section-title {
    margin-bottom: 0;
}

.portal-settings-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.5rem 0.75rem;
    background: #f3f4f6;
    color: #374151;
    font-size: 0.875rem;
    border: none;
    border-radius: 0.375rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s;
}

.portal-settings-btn:hover {
    background: #e5e7eb;
    color: #111827;
}

.portal-settings-icon {
    width: 1rem;
    height: 1rem;
}

.portal-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: #6b7280;
    font-size: 0.875rem;
    text-decoration: none;
    transition: color 0.15s;
}

.portal-back-link:hover {
    color: #111827;
}

.portal-back-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.portal-settings-section {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
}

.portal-settings-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 0.5rem 0;
}

.portal-settings-intro {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0 0 1.5rem 0;
}

.portal-settings-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.portal-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.portal-form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.portal-form-input {
    padding: 0.625rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 1rem;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.portal-form-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.portal-form-error {
    font-size: 0.75rem;
    color: #dc2626;
}

.portal-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.portal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.375rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s;
    border: none;
}

.portal-btn-primary {
    background: #3b82f6;
    color: white;
}

.portal-btn-primary:hover {
    background: #2563eb;
}

.portal-btn-secondary {
    background: white;
    color: #374151;
    border: 1px solid #d1d5db;
}

.portal-btn-secondary:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.portal-messages-flash {
    margin-bottom: 1rem;
}

.portal-flash {
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.portal-flash-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.portal-flash-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.portal-flash-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Portal Dialog */
.portal-dialog-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 1rem;
}

.portal-dialog {
    background: white;
    border-radius: 0.5rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.portal-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e5e7eb;
}

.portal-dialog-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
}

.portal-dialog-close {
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: #6b7280;
    border-radius: 0.25rem;
    transition: color 0.15s, background 0.15s;
}

.portal-dialog-close:hover {
    color: #111827;
    background: #f3f4f6;
}

.portal-dialog-body {
    padding: 1.25rem;
}

.portal-dialog-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding-top: 1rem;
    margin-top: 0.5rem;
    border-top: 1px solid #e5e7eb;
}

.portal-form-group {
    margin-bottom: 1rem;
}

.portal-form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.375rem;
}

.portal-form-group .portal-form-input {
    width: 100%;
    box-sizing: border-box;
}

/* CRM Notifications */
.crm-notifications-banner {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.crm-notifications-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.crm-notifications-icon {
    width: 1.25rem;
    height: 1.25rem;
    color: #d97706;
}

.crm-notifications-title {
    font-weight: 600;
    color: #92400e;
    font-size: 0.875rem;
}

.crm-notifications-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.crm-notification-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: white;
    border-radius: 0.375rem;
    border: 1px solid #fcd34d;
}

.crm-notification-content {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.crm-notification-link {
    color: #111827;
    text-decoration: none;
    font-size: 0.875rem;
}

.crm-notification-link:hover {
    color: #3b82f6;
    text-decoration: underline;
}

.crm-notification-time {
    font-size: 0.75rem;
    color: #6b7280;
}

.crm-notification-dismiss {
    background: none;
    border: none;
    padding: 0.25rem;
    cursor: pointer;
    color: #9ca3af;
    border-radius: 0.25rem;
    transition: all 0.15s;
}

.crm-notification-dismiss:hover {
    background: #fef3c7;
    color: #92400e;
}

.crm-notification-dismiss svg {
    width: 1rem;
    height: 1rem;
}

/* Patient Replies Card */
.crm-replies-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    overflow: hidden;
}

.crm-replies-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.15s;
}

.crm-replies-header:hover {
    background: #f9fafb;
}

.crm-replies-icon-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background: #f3f4f6;
    border-radius: 0.375rem;
    flex-shrink: 0;
}

.crm-replies-icon {
    width: 1rem;
    height: 1rem;
    color: #6b7280;
}

.crm-replies-badge {
    position: absolute;
    top: -0.25rem;
    right: -0.25rem;
    min-width: 1rem;
    height: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #3b82f6;
    color: white;
    font-size: 0.625rem;
    font-weight: 600;
    border-radius: 9999px;
    padding: 0 0.25rem;
}

.crm-replies-title {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.crm-replies-title-text {
    font-weight: 500;
    color: #374151;
    font-size: 0.875rem;
}

.crm-replies-subtitle {
    font-size: 0.75rem;
    color: #9ca3af;
}

.crm-replies-list {
    border-top: 1px solid #e5e7eb;
    background: white;
}

.crm-reply-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #e5e7eb;
    transition: background 0.15s;
}

.crm-reply-item:last-child {
    border-bottom: none;
}

.crm-reply-item:hover {
    background: #f9fafb;
}

.crm-reply-content {
    flex: 1;
    min-width: 0;
}

.crm-reply-patient {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.375rem;
}

.crm-reply-patient strong {
    color: #111827;
    font-size: 0.875rem;
}

.crm-reply-time {
    font-size: 0.75rem;
    color: #6b7280;
}

.crm-reply-preview {
    font-size: 0.875rem;
    color: #4b5563;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.crm-reply-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: 1rem;
    flex-shrink: 0;
}

.crm-reply-view-btn,
.crm-reply-dismiss-btn {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 0.375rem;
    transition: all 0.15s;
}

.crm-reply-view-btn {
    color: #3b82f6;
}

.crm-reply-view-btn:hover {
    background: #dbeafe;
    color: #1d4ed8;
}

.crm-reply-dismiss-btn {
    color: #10b981;
}

.crm-reply-dismiss-btn:hover {
    background: #d1fae5;
    color: #059669;
}

.crm-reply-view-btn svg,
.crm-reply-dismiss-btn svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* Settings Toggle Row - for email preference toggles */
.settings-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background-color: #f9fafb;
    border-radius: 0.5rem;
}

.settings-toggle-info {
    display: flex;
    flex-direction: column;
}

.settings-toggle-title {
    font-weight: 500;
    color: #111827;
}

.settings-toggle-description {
    font-size: 0.875rem;
    color: #6b7280;
}
