html {
    scrollbar-gutter: stable;
    scroll-behavior: smooth;
    /* modern CSS */
}

/* CRM page body background - fills entire viewport */
body.crm-page {
    background: #838383 !important;
    margin: 0 !important;
    padding: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh !important;
}

.form-section p {
    margin: 0 5px 0;
}

.btn,
.btn-primary,
.btn-support {
    background-color: #2b16b3 !important;
}

.btn:hover,
.btn-primary:hover,
.btn-support:hover {
    transform: none !important;
}

/* Company Header Section */
.company-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: 0 0 8px 8px;
    margin-bottom: 30px;
    padding: 20px 30px;
}

/* Mobile sticky header */
@media (max-width: 782px) {
    .company-header {
        position: sticky;
        top: 0;
        z-index: 1000;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        margin-bottom: 0;
    }
}

.company-info .company-name {
    margin: 0;
    font-size: 2.2em;
    font-weight: 700;
    font-style: oblique;
    color: #2c3e50;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.company-name a {
    text-decoration: none;
}

.company-name a:hover {
    color: inherit;
}

.company-logo {
    display: flex;
    align-items: center;
}

.logo-image {
    max-height: 60px;
    max-width: 200px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.1));
}

/* Mobile responsive for company header layout */
@media (max-width: 782px) {
    .company-header {
        text-align: center;
        gap: 15px;
        padding: 0 20px;
    }

    .company-info .company-name {
        font-size: 1.8em;
    }

    .logo-image {
        max-height: 50px;
    }
}

.crm-dashboard {
    max-width: 1400px;
    background: #C8C9C9;
    margin: 0px auto;
    padding: 0 20px;
    box-sizing: border-box;
    width: 100%;
    font-size: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.crm-section {
    background: #eff3f5;
    padding: 25px;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #e0e0e0;
}

.crm-section h2 {
    color: #23282d;
    margin: 0 0 20px 0;
    font-size: 1.5em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.client-form-container {
    display: flex;
    width: 100%;
    table-layout: fixed;
    gap: 20px;
    /* border-spacing: 30px 0;
        margin: 0 -30px;
        Compensate for border-spacing on both sides */
}

.form-section {
    display: table-cell;
    vertical-align: top;
    box-sizing: border-box;
    height: 85%;
}

.form-section {
    width: calc(100% - 500px);
    background: #fafafa;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.form-section {
    min-width: 0;
    overflow: hidden;
    box-sizing: border-box;
    /* height: 100%; */
}

.form-section h3 {
    word-wrap: break-word;
    overflow-wrap: break-word;
    margin: 0 0 15px 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.crm-form {
    display: grid;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

/* Button row for submit and cancel buttons */
.form-group:has(#client-form-submit) {
    flex-direction: row;
    gap: 10px;
    align-items: center;
}

.form-group:has(#client-form-submit) #client-form-submit {
    flex: 3;
    border: none;
    border-radius: 4px;
}

.form-group:has(#client-form-submit) .btn-secondary {
    flex: 1;
    text-align: center;
}

/* Fallback for browsers that don't support :has() */
#client-form-submit {
    min-width: 200px;
}

.btn,
.btn-primary {
    padding: 14px 20px;
    font-size: 14px;
}

.form-group label {
    font-weight: bold;
    margin: 0 5px 5px;
}

/* Follow-ups Header Styles */
.follow-ups-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.follow-ups-header .header-actions {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.filter-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 35px;
    height: 37px;
    padding: 8px 12px;
    background: #f0f0f1;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    color: #50575e;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-toggle:hover {
    background: #e0e0e1;
    border-color: #c3c4c7;
}

.filter-toggle.active {
    background: #2b16b3;
    border-color: #2b16b3;
    color: #fff;
}

.filter-toggle .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.hidden-view-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px !important;
    background: #f0f0f1 !important;
    border: 1px solid #dcdcde !important;
    border-radius: 4px !important;
    color: #50575e !important;
    text-decoration: none !important;
    font-size: 14px !important;
    transition: all 0.2s ease !important;
}

.hidden-view-link .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.hidden-view-link:hover {
    background: #dcdcde !important;
    color: #2271b1 !important;
}

.hidden-view-link.active {
    background: #2271b1 !important;
    color: #fff !important;
    border-color: #2271b1 !important;
}

.follow-ups-toggle-wrapper {
    width: 100%;
    margin-bottom: 10px;
}

.follow-ups-toggle {
    display: inline-flex;
    gap: 8px;
    background: #f0f0f1;
    padding: 4px;
    border-radius: 4px;
}

.follow-ups-toggle .button {
    background: transparent;
    border: none;
    padding: 6px 12px;
    border-radius: 3px;
    cursor: pointer;
    color: #50575e;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s ease;
}

.follow-ups-toggle .button:hover {
    background: #dcdcde;
}

.follow-ups-toggle .button.active {
    background: #fff;
    color: #2271b1;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    font-weight: 500;
}

/* Follow-up List Styles */
.follow-up-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 10px;
    max-height: 420px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 10px;
    background: #fff;
}

.follow-up-list .follow-up-item:nth-child(even) {
    background-color: #efefef;
    border-radius: 4px;
}

.follow-up-item {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

.follow-up-item:hover {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border-color: #c3c4c7;
}

.follow-up-item.overdue {
    border-left: 4px solid #d63638;
    padding-left: 16px;
}

.client-info {
    flex: 1;
}

.client-name {
    font-weight: 600;
    color: #1d2327;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.client-name-link {
    color: inherit;
    text-decoration: none;
    font-size: 20px;
    margin-right: 5px;
}

.client-name-link:hover {
    color: #2271b1;
    text-decoration: underline;
}

/* Avatar in follow-up list */
.crm-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
}

.followup-time {
    color: #646970;
    font-size: 13px;
    margin: 10px 4px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Blinking animation for urgent follow-ups */
.followup-time.urgent .dashicons-calendar-alt {
    animation: calendar-blink 1.5s ease-in-out infinite;
    color: #d63638;
}

.dashicons-calendar-alt {
    line-height: 0.8;
}

/* Align h2 elements with dashicons and text on same baseline */
h2 .dashicons,
h2 span,
h2 a {
    vertical-align: baseline;
    line-height: 1;
}

h2 {
    white-space: nowrap;
}

@keyframes calendar-blink {

    0%,
    50% {
        opacity: 1;
        transform: scale(1);
    }

    25% {
        opacity: 0.3;
        transform: scale(1.1);
    }

    75% {
        opacity: 0.7;
        transform: scale(0.95);
    }
}

.days-away {
    color: #50575e;
    font-style: italic;
}

.client-details {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: #50575e;
    margin: 0 4px;
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.detail-item a {
    color: #2271b1;
    text-decoration: none;
}

.detail-item a:hover {
    color: #135e96;
    text-decoration: underline;
}

/* Links repeater sizing */
.link-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.link-row input[type="text"] {
    height: 35px;
    padding: 0 8px;
    width: 15%;
    max-width: 50%;
}

.link-row .url-remove-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex: 1;
}

.link-row input[type="url"] {
    height: 23px;
    padding: 16px 10px;
    flex: 1;
    direction: ltr;
}

.remove-link {
    width: 34px;
    height: 34px;
    padding: 0 !important;
    font-weight: 700;
    line-height: 1;
}

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.5;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge.overdue {
    background-color: #e6d9d8c2;
    color: #d63638;
}

.group-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px 1px;
    margin: 0 8px;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--group-color, #95a5a6);
    background-color: rgb(0 0 0 / 9%);
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    vertical-align: middle;
}

.group-badge:hover {
    background-color: rgba(0, 0, 0, 0.05);
    /* transform: translateY(-1px); */
}

.overdue {
    /* margin-right: 8px; */
}

/* View Button */
.btn.view-btn {
    color: #ffffff !important;
    border: none;
    padding: 7px 40px;
    border-radius: 3px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.btn.view-btn:hover {
    background: #f0f7fc;
    border-color: #0a4b78;
    color: #0a4b78;
}

/* Form Styles */
.form-group input,
.form-group textarea {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus,
textarea:focus,
select:focus,
.ajax-search-box input:focus,
.client-search-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

.form-group select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
    direction: rtl;
    text-align: right;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-left: 2em;
    background-color: white;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: left 10px center;
    background-size: 16px;
}

/* Form row for side-by-side fields */
.form-row {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.form-row .form-group {
    flex: 1;
}

/* Stack form rows on mobile */
@media (max-width: 782px) {
    .form-row {
        flex-direction: column;
    }

    .form-row .form-group {
        width: 100%;
    }
}

/* Lightbulb Tags */
.lightbulb-tags {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 5px;
}

.lightbulb-tag {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 8px;
    border-radius: 8px;
    user-select: none;
    min-width: 50px;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.lightbulb-tag:hover {
    background: rgba(0, 0, 0, 0.05);
}

.lightbulb-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 3px solid #ccc;
    background-color: #f5f5f5;
    transition: all 0.3s ease;
    position: relative;
    box-sizing: border-box;
}

.lightbulb-tag.active .lightbulb-icon {
    /* box-shadow: 0 0 2px currentColor, 0 0 8px currentColor; */
    animation: glow 2s ease-in-out infinite alternate;
}

.lightbulb-tag.active.tag1 .lightbulb-icon {
    background-color: #ffd700;
    border-color: #ffd700;
    color: #ffd700;
}

.lightbulb-tag.active.tag2 .lightbulb-icon {
    background-color: #ff6b35;
    border-color: #ff6b35;
    color: #ff6b35;
}

.lightbulb-tag.active.tag3 .lightbulb-icon {
    background-color: #ff4757;
    border-color: #ff4757;
    color: #ff4757;
}

.lightbulb-tag.active.tag4 .lightbulb-icon {
    background-color: #5352ed;
    border-color: #5352ed;
    color: #5352ed;
}

.lightbulb-tag.active.tag5 .lightbulb-icon {
    background-color: #2ed573;
    border-color: #2ed573;
    color: #2ed573;
}

.tag-label {
    font-size: 11px;
    color: #666;
    margin-top: 4px;
    font-weight: 500;
    text-align: center;
}

.lightbulb-tag.active .tag-label {
    color: #333;
    /* font-weight: 600; */
}

@keyframes glow {
    from {
        text-shadow:
            0 0 5px currentColor,
            0 0 10px currentColor,
            0 0 15px currentColor;
    }

    to {
        text-shadow:
            0 0 10px currentColor,
            0 0 20px currentColor,
            0 0 30px currentColor;
    }
}

/* Click animation */
.lightbulb-tag.clicking {
    transform: scale(0.95);
}

/* City Autocomplete */
.form-group {
    position: relative;
}

.city-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.city-suggestion {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.city-suggestion:hover,
.city-suggestion.highlighted {
    background-color: #f8f9fa;
}

.city-suggestion:last-child {
    border-bottom: none;
}

.city-autocomplete:focus+.city-suggestions {
    display: block;
}

/* Mini lightbulbs in follow-up list */
.mini-lightbulb {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid;
    margin-left: 4px;
    display: inline-block;
    /* animation: mini-glow 3s ease-in-out infinite alternate; */
}

@keyframes mini-glow {
    from {
        box-shadow: 0 0 2px currentColor;
    }

    to {
        box-shadow: 0 0 6px currentColor;
    }
}

.checkbox-wrapper {
    display: inline-flex;
    white-space: nowrap;
    margin-left: 8px;
    font-size: 11px;
}

/* Responsive adjustments */
@media (max-width: 782px) {
    .follow-ups-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .follow-ups-header h2 {
        flex: 1;
    }

    .follow-ups-header .header-actions {
        flex-shrink: 0;
    }

    .hidden-view-link {
        padding: 8px 12px !important;
        font-size: 13px !important;
    }

    .filter-toggle {
        padding: 6px 12px;
        min-width: auto;
    }

    .follow-up-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    /* Wrap client name badges and tags on mobile */
    .client-name {
        flex-wrap: wrap;
        gap: 6px;
    }

    .client-actions {
        width: 100%;
        gap: 8px;
    }

    .btn.view-btn,
    .hidden-toggle {
        margin: 0;
        width: 100%;
        text-align: center;
    }

    .client-details {
        flex-direction: column;
    }

    /* Remove outer padding on mobile */
    .crm-dashboard {
        padding: 0;
    }

    .crm-section {
        padding: 10px;
    }

    #client-form .crm-section {
        padding: 20px;
    }

    /* Ensure form fields take full width */
    .form-group input,
    .form-group textarea {
        width: 100%;
        box-sizing: border-box;
    }

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

    /* Exception for checkboxes and radio buttons */
    .form-group input[type="checkbox"],
    .form-group input[type="radio"] {
        width: auto;
    }

    /* Exception for datetime-local to prevent oversizing */
    .form-group input[type="datetime-local"] {
        width: auto;
        max-width: 100%;
    }

    /* Mobile lightbulb tags */
    .lightbulb-tags {
        justify-content: center;
        gap: 5px;
    }

    .lightbulb-tag {
        padding: 0;
    }

    .lightbulb-icon {
        font-size: 20px;
    }

    /* Mobile: Larger click area for pin toggle while keeping visual size */
    .followup-pin-toggle::after {
        content: "";
        position: absolute;
        top: -8px;
        left: -8px;
        right: -8px;
        bottom: -8px;
        z-index: 1;
    }

    /* Stack link rows so nothing is cut off on the right */
    .link-row {
        flex-direction: column;
        align-items: stretch;
    }

    .link-row input[type="text"] {
        width: 100%;
        max-width: 100%;
        height: 40px;
        margin-bottom: 8px;
    }

    /* Keep URL input and remove button on same row */
    .link-row .url-remove-row {
        display: flex;
        gap: 8px;
        align-items: center;
    }

    .link-row input[type="url"] {
        flex: 1;
        height: 40px;
    }

    .link-row .remove-link {
        width: 40px;
        height: 40px;
        flex-shrink: 0;
    }
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.btn:hover {
    background-color: #336cb9 !important;
}

.btn-secondary {
    background: #666 !important;
    color: white !important;
    border: 1px solid #666 !important;
    padding: 10px 20px;
    border-radius: 3px !important;
    text-decoration: none !important;
    font-size: 14px !important;
    cursor: pointer !important;
    display: inline-block !important;
    transition: all 0.2s ease !important;
}

.btn-secondary:hover {
    background: #444 !important;
    border-color: #444 !important;
}

/* Current avatar styling */
.profile-picture-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.current-avatar-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid #ddd;
    flex-shrink: 0;
}

.profile-picture-row input[type="file"] {
    flex: 1;
}

.notes-sidebar {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 5px;
    border: 1px solid #ddd;
    display: flex;
    flex-direction: column;
    width: 500px;
    /* max-width: 600px; */
    box-sizing: border-box;
    height: 60%;
    /* min-height: 100%; */
}

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

.notes-sidebar h3 {
    margin: 0;
    flex-shrink: 0;
}

/* Notes Toggle Switch */
.notes-toggle-wrapper {
    display: flex;
    align-items: center;
}

.notes-toggle-checkbox {
    display: none;
}

.notes-toggle-container {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    width: fit-content;
    font-size: 11px;
    border: 1px solid #dbdbdb;
    border-radius: 30px;
    background: #f0f0f0;
    color: white;
    cursor: pointer;
    margin: 0;
}

.notes-toggle-container::before {
    content: '';
    position: absolute;
    width: 50%;
    height: 100%;
    right: 0%;
    border-radius: 30px;
    background: #d8d8d8;
    transition: all 0.3s;
}

.notes-toggle-checkbox:checked+.notes-toggle-container::before {
    right: 50%;
}

.notes-toggle-container div {
    padding: 1px 8px;
    text-align: center;
    z-index: 1;
}

.notes-toggle-checkbox:checked+.notes-toggle-container div:first-child {
    color: #d7d7d7;
    transition: color 0.3s;
}

.notes-toggle-checkbox:checked+.notes-toggle-container div:last-child {
    color: white;
    transition: color 0.3s;
}

.notes-toggle-checkbox+.notes-toggle-container div:first-child {
    color: #747474;
    transition: color 0.3s;
}

.notes-toggle-checkbox+.notes-toggle-container div:last-child {
    color: #666b7a;
    transition: color 0.3s;
}

.notes-timeline {
    margin-bottom: 20px;
    flex: 1;
    overflow-y: auto;
    min-height: 100px;
    max-height: 240px;
    /* Fixed maximum height */
    border: 1px solid #e0e0e0;
    padding: 10px;
    border-radius: 3px;
    background: white;
}

.note-entry {
    background: white;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 3px;
    border-left: 4px solid #0073aa;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.note-entry:first-child {
    border-left-color: #75d67e;
}

.note-meta {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.note-content {
    font-size: 14px;
    line-height: 1.5;
    /* white-space: pre-wrap; */
}

#client-form.tab-content.active .new-note-textarea {
    min-height: 100px;
}

.add-note-section {
    border-top: 2px solid #ddd;
    padding-top: 15px;
    flex-shrink: 0;
    /* min-height: 465px; */
}

.add-note-section h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #0073aa;
}

.new-note-textarea {
    width: 100%;
    margin-bottom: 10px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    resize: vertical;
    box-sizing: border-box;
}

.note-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.note-buttons .btn {
    flex: 1;
    border: none;
    border-radius: 4px;
}

.btn-primary {
    background: #0073aa;
    color: white;
}

.btn-primary:hover {
    background: #005a87;
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.note-message {
    padding: 8px 12px;
    border-radius: 3px;
    margin-top: 10px;
    font-size: 14px;
}

.note-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.note-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.archive-note {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 11px;
    line-height: 1.3;
    max-width: 200px;
}

.client-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.hidden-toggle {
    background: #6B6A6C;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 3px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.hidden-toggle:hover {
    background: #ed5cb4;
}

.hidden-toggle.hidden-active {
    background: #28a745;
}

.hidden-toggle.hidden-active:hover {
    background: #218838;
}

.admin-only {
    background: #6c757d;
    border-color: #6c757d;
}

.admin-only:hover {
    background: #5a6268;
    border-color: #545b62;
}

.follow-up-item.hidden {
    /* opacity: 0.6; */
    border-left: 4px solid #6c757d;
}

.follow-up-item.hidden .client-name {
    color: #6c757d;
}

/* .follow-up-item.hidden .client-name::after {
    content: " (מוסתר)";
    font-size: 11px;
    color: #6c757d;
} */

.follow-up-item.hidden.overdue {
    border-left: 4px solid #d63638;
}

.hidden-toggle-form {
    margin-top: 10px;
    padding: 8px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 3px;
}

.hidden-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.hidden-label {
    font-weight: 500;
    color: #856404;
}

.hidden-note {
    display: block;
    margin-top: 5px;
    color: #856404;
    font-size: 11px;
    line-height: 1.3;
}

/* Ensure checkboxes and radio buttons maintain their natural size */
input[type="checkbox"],
input[type="radio"] {
    width: auto !important;
    max-width: none !important;
}

.hidden-date {
    font-size: 12px;
    color: #856404;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.hidden-date .dashicons {
    font-size: 17px;
    margin-right: 4px;
}

.today-list {
    list-style: none;
    margin: 0;
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    background: white;
}

.today-list li {
    padding: 15px;
    margin: 0;
    background: #f9f9f9;
    border-left: 4px solid #0073aa;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.today-list li:last-child {
    border-bottom: none;
}

.client-info {
    flex-grow: 1;
}

.client-name {
    font-weight: bold;
    font-size: 16px;
}

.client-details {
    color: #666;
    font-size: 14px;
    margin-top: 5px;
}

.client-details a {
    color: #0073aa;
    text-decoration: none;
}

.client-details a:hover {
    text-decoration: underline;
    color: #005177;
}

.followup-time {
    color: #0073aa;
    font-weight: bold;
    font-size: 14px;
}

.view-btn {
    padding: 5px 15px;
    font-size: 12px;
}

.tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.tab {
    padding: 10px 20px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
}

.tab.active {
    border-bottom-color: #0073aa;
    background: #f9f9f9;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.notice {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    min-width: 320px;
    max-width: 90%;
    text-align: center;
    padding: 15px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: slideInCenter 0.3s ease forwards;
}

.notice p {
    margin: 0;
    padding: 0;
    line-height: 1.4;
}

@keyframes slideInCenter {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }

    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.notice-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.notice.fade-out {
    opacity: 0;
}

.notice-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.search-box {
    margin-bottom: 20px;
}

.search-box input,
.search-box select,
.ajax-search-box input {
    width: 100%;
    max-width: 400px;
}

.ajax-search-box label {
    margin-bottom: 10px;
    display: block;
    margin-right: 10px;
}

@media (max-width: 782px) {

    .search-box input,
    .search-box select,
    .ajax-search-box input {
        max-width: calc(100vw - 40px);
    }
}

.no-notes {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 20px;
}

.datetime-display {
    font-family: monospace;
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
}

@media (max-width: 1024px) {
    .client-form-container {
        display: flex;
        flex-direction: column-reverse;
        width: 100%;
    }

    #client-form.tab-content.active .client-form-container {
        flex-direction: column;
    }

    .form-section,
    .notes-sidebar {
        display: block;
        width: 100%;
        margin-bottom: 20px;
    }

    .notes-sidebar .avatar-row,
    .notes-sidebar .link-repeater-row {
        display: flex;
        align-items: center;
        margin-bottom: 10px;
    }

    .notes-sidebar .avatar-row img,
    .notes-sidebar .link-repeater-row img {
        width: 30px;
        height: 30px;
        border-radius: 50%;
        margin-right: 10px;
    }
}

.select-wrapper {
    position: relative;
    display: inline-block;
}

.select-wrapper select {
    direction: rtl;
    text-align: right;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-left: 2em;
}

.select-wrapper::after {
    content: "▼";
    position: absolute;
    left: 15px;
    /* RTL → arrow on the left */
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 0.8em;
    color: #333;
}

/* Archive Controls */
.follow-up-controls {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.archive-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
}

.archive-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    /* font-size: 14px; */
    color: #666;
    user-select: none;
    margin-right: 12px;
}

.archive-checkbox input[type="checkbox"] {
    margin: 0;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.archive-checkbox:hover .archive-label {
    color: #333;
}

.archive-checkbox input[type="checkbox"]:checked+.archive-label {
    color: #d63638;
    font-weight: 600;
}

/* Disable follow-up datetime when archived */
.follow-up-controls input[type="datetime-local"]:disabled {
    background-color: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

/* Archive view styling */
.follow-up-item.archived {
    opacity: 0.8;
    border-left: 4px solid #999;
}

.follow-up-item.archived .client-name {
    color: #666;
}

.follow-up-item.archived .followup-time {
    color: #999;
    text-decoration: line-through;
}

@media (max-width: 782px) {
    .follow-up-controls {
        gap: 8px;
    }

    .archive-toggle {
        margin-top: 5px;
    }
}

/* Adjust spacing when followup-time is hidden */
.follow-up-item.archived .client-details {
    margin-top: 8px;
}

/* Archive status indicator */
/* .follow-up-item.archived .client-name::after {
    content: " (ארכיון)";
    font-size: 11px;
    color: #999;
    font-weight: normal;
    font-style: italic;
} */

/* Archive date display */
.archive-date {
    color: #999;
    font-size: 12px;
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 10px 4px;
}

/* Enhanced mini-lightbulb tooltips */
.mini-lightbulb {
    /* cursor: help; */
    position: relative;
}

.mini-lightbulb:hover {
    transform: scale(1.2);
    transition: transform 0.2s ease;
    z-index: 10;
}

/* Custom tooltip styling for mini-lightbulbs */
.mini-lightbulb[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 1000;
    pointer-events: none;
}

.mini-lightbulb[data-tooltip]:hover::before {
    content: "";
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-top-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    pointer-events: none;
}

/* CRM Footer - Sticky to bottom */
.crm-footer {
    /* background: #2c3e50;
  color: #ecf0f1;
  padding: 20px 0;
  margin-top: auto;
  border-top: 3px solid #3498db; */
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    text-align: center;
    padding: 0 20px;
}

.crm-footer p {
    /* margin: 0; */
    font-size: 14px;
    line-height: 1.5;
}

.crm-footer a {
    color: #193547;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.crm-footer a:hover {
    color: #195a86;
}

@media (max-width: 782px) {
    .crm-footer {
        padding: 15px 0;
        margin-top: 20px;
    }

    .crm-footer p {
        font-size: 12px;
    }

    .followup-pin-toggle+* {
        margin-right: 0px !important;
    }
}

/* Main content wrapper to push footer down */
.crm-main-content {
    flex: 1;
}

/* Pinned follow-up styling */
.follow-up-item.pinned-followup {
    border: 1px solid #f39c12;
    /* background-color: #fef9e7;
    border-left: 4px solid #f39c12;
    padding-left: 10px; */
}

.pin-toggle {
    cursor: pointer;
    color: #ccc;
    margin-left: 8px;
    font-size: 14px;
    transition: color 0.2s;
    user-select: none;
    position: relative;
}

.pin-toggle::after {
    content: "";
    position: absolute;
    top: -12px;
    left: -12px;
    right: -12px;
    bottom: -12px;
    z-index: 1;
}

.pin-toggle:hover {
    color: #999;
}

.pin-toggle.pinned {
    color: #e74c3c;
}

.note-entry.pinned {
    background-color: #fef9e7;
    border-left: 3px solid #f39c12;
    padding-left: 10px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.note-entry {
    transition: all 0.3s ease;
}

.note-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.followup-pin-toggle {
    cursor: pointer !important;
    color: #ccc !important;
    margin: 0 6px;
    font-size: 0 !important;
    /* Changed */
    transition: all 0.2s ease !important;
    user-select: none;
    border: 1px solid #ddd !important;
    padding: 0 !important;
    /* Changed */
    border-radius: 50%;
    display: inline-block !important;
    width: 18px;
    height: 18px;
    pointer-events: auto !important;
    position: relative;
    z-index: 10;
    background: none !important;
    vertical-align: middle;
    /* Added */
}

/* Add these new rules */
.followup-pin-toggle::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #FFF;
}

.followup-pin-toggle:hover::before {
    background-color: #d1d1d1;
}

.followup-pin-toggle.pinned::before {
    /* background-color: #e74c3c; */
}

/* More specific selector to override any conflicting styles */
.follow-up-item .client-name .followup-pin-toggle {
    color: #ccc !important;
    background: none !important;
    border: 1px solid #ddd !important;
}

/* Consolidated hover styles for pin toggle */
.followup-pin-toggle:hover,
.follow-up-item .client-name .followup-pin-toggle:hover,
.crm-dashboard .follow-up-item .client-info .client-name .followup-pin-toggle:hover {
    /* color: #999 !important; */
    border-color: #d1d1d1 !important;
    background: white !important;
}

.followup-pin-toggle.pinned,
.follow-up-item .client-name .followup-pin-toggle.pinned {
    color: #e74c3c !important;
    border-color: #e74c3c !important;
    font-weight: bold !important;
}

/* Ensure pin toggle is always visible and clickable */
.followup-pin-toggle {
    opacity: 1 !important;
    visibility: visible !important;
    display: inline-block !important;
}

/* Add a subtle animation to make it more noticeable */
/* .followup-pin-toggle:not(.pinned) {
    animation: subtle-pulse 2s infinite;
} */

@keyframes subtle-pulse {

    0%,
    100% {
        opacity: 0.7;
    }

    50% {
        opacity: 1;
    }
}

/* Ultra-specific selectors to override any possible conflicts */
.crm-dashboard .follow-up-item .client-info .client-name .followup-pin-toggle {
    color: #ccc !important;
    background: #ddd !important;
    /* border: 1px solid #ddd !important; */
    display: inline-block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.crm-dashboard .follow-up-item .client-info .client-name .followup-pin-toggle.pinned {
    /* color: #e74c3c !important;
    border-color: #e74c3c !important; */
    background: #E25B40 !important;
}

/* Force initial visibility on page load */
.followup-pin-toggle {
    display: inline-block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.client-name {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* .followup-pin-toggle + * {
  margin-right: 10px;
} */

@media screen and (max-width: 782px) {

    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="search"],
    input[type="tel"],
    input[type="url"],
    input[type="number"],
    input[type="date"],
    input[type="time"],
    textarea,
    select,
    #client_search_input,
    #create_client_search_input,
    .client-search-input,
    .search-input-container input {
        font-size: 16px;
    }
}

/* Form Loading Overlay */
.form-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.loading-spinner {
    background: white;
    padding: 30px 40px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2b16b3;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-spinner p {
    margin: 0;
    color: #333;
    font-size: 16px;
    font-weight: 500;
}

/* Toast Notifications */
.crm-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 280px;
    max-width: 400px;
    padding: 15px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    opacity: 0;
    transform: translateX(400px);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.crm-toast.show {
    opacity: 1;
    transform: translateX(0);
}

.crm-toast.success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.crm-toast.error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.crm-toast-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.crm-toast-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
}

@media (max-width: 782px) {
    .crm-toast {
        right: 10px;
        left: 10px;
        min-width: auto;
        max-width: none;
    }
}

/* Calendar Loading Indicator */
.calendar-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 20px 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
}

.calendar-loading.active {
    display: block;
}

.calendar-loading .spinner {
    width: 30px;
    height: 30px;
    border-width: 3px;
    margin: 0 auto 10px;
}

.calendar-loading p {
    margin: 0;
    font-size: 14px;
    color: #666;
}

/* Event Detail Modal */
.event-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.event-modal-overlay.active {
    display: flex;
}

.event-modal {
    background: white;
    border-radius: 8px;
    padding: 25px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.event-modal h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 20px;
}

.event-detail-row {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.event-detail-row:last-of-type {
    border-bottom: none;
}

.event-detail-label {
    font-weight: 600;
    color: #666;
    font-size: 13px;
    margin-bottom: 5px;
}

.event-detail-value {
    color: #333;
    font-size: 14px;
}

.event-modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.event-modal-actions button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.event-modal-actions .btn-delete {
    background: #dc3545;
    color: white;
}

.event-modal-actions .btn-delete:hover {
    background: #c82333;
}

.event-modal-actions .btn-close {
    background: #6c757d;
    color: white;
}

.event-modal-actions .btn-close:hover {
    background: #5a6268;
}


/* FullCalendar RTL fixes */
.fc-direction-rtl .fc-daygrid-day-number {
    text-align: right !important;
    padding-right: 8px !important;
}

.fc-direction-rtl .fc-col-header-cell-cushion {
    text-align: right !important;
}

.fc-direction-rtl .fc-timegrid-slot-label-cushion {
    text-align: right !important;
}

.fc-direction-rtl .fc-timegrid-slot-label-frame {
    text-align: right !important;
}

.fc-direction-rtl .fc-event-title {
    text-align: right !important;
}

/* Increase time slot height for better spacing */
.fc-timegrid-slot {
    height: 3em !important;
}

.fc-timegrid-slot-label {
    height: 3em !important;
}

/* Make the calendar taller overall */
.fc-timegrid-body {
    min-height: 600px !important;
}

/* Ensure events scale properly with larger slots */
.fc-timegrid-event {
    font-size: 13px !important;
}

/* Mobile responsive calendar toolbar */
@media (max-width: 782px) {
    .fc-header-toolbar {
        flex-direction: column !important;
        gap: 10px !important;
        padding: 10px !important;
    }

    .fc-toolbar-chunk {
        display: flex !important;
        justify-content: center !important;
        width: 100% !important;
    }

    .fc-toolbar-title {
        font-size: 1.2em !important;
        text-align: center !important;
    }

    .fc-button {
        padding: 6px 10px !important;
        font-size: 13px !important;
    }

    .fc-button-group {
        display: flex !important;
        gap: 4px !important;
    }

    /* Stack calendar view on mobile */
    #crm-google-calendar {
        min-height: 500px !important;
    }

    .fc-timegrid-slot {
        height: 4em !important;
    }

    .fc-timegrid-slot-label {
        height: 2.5em !important;
        font-size: 11px !important;
    }
}


/* Additional RTL fixes */
#crm-google-calendar {
    direction: rtl !important;
}

.fc-daygrid-day-number {
    float: right !important;
    text-align: right !important;
    padding-right: 8px !important;
    padding-left: 0 !important;
}

.fc .fc-daygrid-day-top {
    display: flex !important;
    /* flex-direction: row !important; */
    justify-content: flex-end !important;
}

.fc .fc-daygrid-day-top {
    display: flex !important;
    /* flex-direction: row !important; */
    justify-content: flex-end !important;
}


#crm-google-calendar .fc .fc-daygrid-day-top {
    flex-direction: row !important;
}


/* Client search input styling */
.client-search-input {
    width: 100% !important;
    padding-right: 10px !important;
    font-size: 16px !important;
    min-height: 40px !important;
}

/* Phone normalization button */
.phone-input-wrapper {
    display: flex;
    gap: 8px;
    align-items: center;
}

.phone-input-wrapper input[type="tel"] {
    flex: 1;
}

/* Robust styling to override Astra theme button styles */
button.btn-normalize-phone,
.btn-normalize-phone {
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    font-size: 18px !important;
    transition: all 0.2s ease !important;
    min-width: 37px !important;
    width: 37px !important;
    height: 37px !important;
    padding: 0 !important;
    line-height: 1 !important;
    background: #f0f0f1 !important;
    color: #333 !important;
    font-weight: normal !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

button.btn-normalize-phone:hover:not(.disabled),
.btn-normalize-phone:hover:not(.disabled) {
    background: #d7d7d7 !important;
    border-color: #bbb !important;
    color: #333 !important;
}

button.btn-normalize-phone:active:not(.disabled),
.btn-normalize-phone:active:not(.disabled) {
    transform: scale(0.95) !important;
}

button.btn-normalize-phone.disabled,
.btn-normalize-phone.disabled {
    background: #ccc !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
    color: #666 !important;
}

.phone-normalized {
    animation: phoneNormalizedFlash 0.5s ease;
}

@keyframes phoneNormalizedFlash {

    0%,
    100% {
        background-color: white;
    }

    50% {
        background-color: #d4edda;
    }
}

.field-help {
    display: block;
    margin-top: 4px;
    font-size: 0.8rem;
    color: #666;
    font-style: italic;
}

/* WhatsApp field styling */
#whatsapp_username {
    border-left: 3px solid #25d366;
    direction: ltr;
    text-align: left;
}

#whatsapp_username:focus {
    border-left-color: #128c7e;
    box-shadow: 0 0 0 2px rgba(37, 211, 102, 0.2);
}

/* ===== INLINE STYLES CONVERTED TO CLASSES ===== */

/* Logout and utility links */
.logout-link {
    font-size: 14px;
    color: #666;
    text-decoration: none;
    margin-top: 6px;
    font-weight: normal;
    vertical-align: baseline;
    display: inline-block;
}

.settings-link {
    font-size: 14px;
    color: #666;
    text-decoration: none;
    margin-top: 6px;
    font-weight: normal;
    vertical-align: baseline;
    display: inline-block;
}

.sort-link {
    font-size: 12px;
    color: #666;
    text-decoration: none;
    text-align: center;
    border-radius: 4px;
    border: solid 1px #c8c8c8;
    padding: 4px;
    background: #e2e2e2;
    display: block;
    margin-top: 8px;
}

.hidden-view-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.header-actions {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

@media (max-width: 782px) {
    .hidden-view-wrapper {
        flex-direction: row;
        align-items: flex-end;
        gap: 8px;
    }

    .sort-link {
        margin-top: 0;
        white-space: nowrap;
    }
}

/* Note count display */
.note-count {
    font-size: 0.8em;
    color: #666;
}

/* Profile picture section */
.profile-picture-row {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.avatar-upload-container {
    position: relative;
    display: inline-block;
    cursor: pointer;
}

.current-avatar-img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid #ddd;
}

.upload-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.upload-overlay:hover {
    opacity: 1;
}

.upload-overlay span {
    color: white;
    font-size: 12px;
}

.profile-picture-input {
    display: none;
}

/* Consent and newsletter checkboxes */
.consent-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-item input[type="checkbox"] {
    margin: 0;
}

.checkbox-item-label {
    margin: 0;
    font-weight: normal;
    color: #666;
}

.consent-timestamp {
    font-weight: normal;
    font-size: 13px;
    margin-right: 5px;
    color: #666;
}

/* Form buttons */
.btn-no-border {
    border: none;
    border-radius: 4px;
}

.btn-cancel {
    padding: 12px 20px;
    border: none !important;
}

/* Update confirmation checkbox */
.update-confirmation-label {
    margin-top: 6px;
    display: flex;
    gap: 8px;
    align-items: center;
    font-weight: normal;
}

/* Client metadata display */
.client-created-date {
    opacity: 0.6;
}

.client-archived-date {
    color: #666;
}

.client-hidden-date {
    color: #856404;
    background: #fff3cd;
    padding: 4px 8px;
    border-radius: 3px;
}

/* Note message display */
.note-message-hidden {
    display: none;
}

/* Google Calendar section */
.gcal-section {
    margin-top: 30px;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.gcal-calendar {
    max-width: 100%;
    min-height: 600px;
}

/* Track checkbox wrapper */
.track-checkbox-hidden {
    display: none;
}

/* Webhook settings styles */
.webhook-event-label {
    display: block;
    margin-bottom: 5px;
}

.webhook-help-text {
    margin-top: 10px;
    color: #666;
    font-style: italic;
}

/* Dynamic group badge colors */
.group-badge.group1 {
    --group-color: #95a5a6;
}

.group-badge.group2 {
    --group-color: #3498db;
}

.group-badge.group3 {
    --group-color: #e74c3c;
}

.group-badge.group4 {
    --group-color: #f39c12;
}

/* Dynamic tag colors for mini lightbulbs */
.mini-lightbulb.tag1 {
    background-color: #ffd700;
    border-color: #ffd700;
}

.mini-lightbulb.tag2 {
    background-color: #ff6b35;
    border-color: #ff6b35;
}

.mini-lightbulb.tag3 {
    background-color: #ff4757;
    border-color: #ff4757;
}

.mini-lightbulb.tag4 {
    background-color: #5352ed;
    border-color: #5352ed;
}

.mini-lightbulb.tag5 {
    background-color: #2ed573;
    border-color: #2ed573;
}