/************* Dashboard CSS (v3.9.12 – Progress Mobile Padding) ********/
/* VERSION: 3.9.12                                                       */
/* LAST UPDATED: 2025-11-27                                              */
/* CHANGES: Progress wrapper mobile padding now 0.5rem on all sides     */
/*                                                                       */
/*************************************************************************/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Lato', sans-serif;
    background-color: #fff;
    color: #333;
    line-height: 1.6;
}

/************* Dashboard Header *************/

.admin-header {
    background: white;
    border-bottom: 1px solid #e9ecef;
    padding: 1.5rem 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 0.3s ease;
}

/* Hide header only when login screen is showing */
#login[style*="display: block"] ~ * .admin-header,
body:has(#login[style*="display: block"]) .admin-header {
    display: none;
}

.admin-header.client-mode {
    background: #e2edf7;
    border-bottom: 1px solid #d0dce8;
}

.admin-header.lead-mode {
    background: #275db2;
    border-bottom: 1px solid #1e4a8f;
}

.header-content {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 1rem;
}

.firm-identity {
    display: flex;
    align-items: center;
    justify-self: start;
}

.header-logo {
    height: 1.5rem;
    width: auto;
    display: block;
}

.brand {
    font-size: 1.2rem;
    font-weight: 700;
    color: #275db2;
    text-align: center;
    justify-self: center;
    transition: color 0.3s ease;
}

.admin-header.client-mode .brand {
    color: #275db2;
}

.admin-header.lead-mode .brand {
    color: white;
}

/************* Loading Animation *************/

/* Loading spinner animation */
#selectedClientName.loading::after {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-left: 15px;
  border: 3px solid #e9ecef;
  border-top-color: #275db2;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: middle;
}

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

/************* Three-Dot Menu *************/

.menu-container {
    position: absolute;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 200;
}

.menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background-color 0.2s;
    display: none;
}

.menu-toggle:hover {
    background-color: #f0f0f0;
}

.menu-toggle .dot {
    width: 4px;
    height: 4px;
    background-color: #666;
    border-radius: 50%;
    display: block;
    transition: background-color 0.3s ease;
}

.admin-header.client-mode .menu-toggle .dot {
    background-color: #666;
}

.admin-header.lead-mode .menu-toggle .dot {
    background-color: white;
}

.menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.menu-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu-item {
    display: block;
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    font-size: 0.95rem;
    color: #333;
    transition: background-color 0.2s;
    border-radius: 8px;
}

.menu-item:hover {
    background-color: #f8f9fa;
}

.menu-item#logoutBtn {
    color: #dc3545;
}

.menu-item#logoutBtn:hover {
    background-color: #fff5f5;
}

/************* Login Screen *************/

#login {
    max-width: 400px;
    margin: 10vh auto;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Hide header when on login screen */
body:has(#login[style*="display: block"]) .admin-header {
    display: none;
}

#login h2 {
    margin-bottom: 1.5rem;
    text-align: center;
    color: #333;
    font-weight: 600;
}

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

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

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: #007bff;
}

.btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s;
    width: 100%;
}

.btn:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

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

.btn-primary {
    background: #007bff;
}

#status {
    margin-top: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

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

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

/************* Dashboard Portal Layout *************/

#portal {
    display: none;
    min-height: calc(100vh - 80px);
}

.admin-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Desktop: Three columns below progress - 1:1:2 ratio */
@media (min-width: 1350px) {
    .client-and-files-wrapper {
        display: grid;
        grid-template-columns: 1fr 1fr 2fr;
        gap: 2rem;
    }

    .client-sidebar {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }

    .contact-info-column {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }

    .admin-main {
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }
}

/* Mobile/Tablet: Everything stacks */
@media (max-width: 1350px) {
    .admin-container {
        padding: 1rem;
        gap: 1.5rem;
    }

    .client-and-files-wrapper {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }

    .client-sidebar {
        width: 100%;
        order: 999;
    }

    .contact-info-column {
        width: 100%;
    }

    .admin-main {
        width: 100%;
    }
}

/************* Client Sidebar *************/

.client-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Desktop only: sticky positioning and max-height */
@media (min-width: 1350px) {
    .client-sidebar {
        max-height: calc(100vh - 140px);
        position: sticky;
        top: 100px;
    }
}

/* Mobile: no sticky, full height */
@media (max-width: 1350px) {
    .client-sidebar {
        position: relative;
        max-height: 600px;
    }
}

/************* Contact Info Section *************/

.contact-info-section {
    margin-bottom: 1.5rem;
}

.contact-info-content {
    font-size: 0.9rem;
    line-height: 1.6;
}

.contact-info-item {
    margin-bottom: 0.5rem;
    color: #555;
}

.contact-info-item strong {
    display: inline-block;
    min-width: 60px;
    color: #333;
    font-weight: 600;
}

.contact-info-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #275db2;
    margin-bottom: 0.75rem;
}

.contact-info-person {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
}

.contact-info-email {
    color: #275db2;
    text-decoration: none;
}

.contact-info-email:hover {
    text-decoration: underline;
}

/************* Activity Feed *************/

.activity-card {
}

.activity-list {
    display: flex;
    flex-direction: column;
}

.activity-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e9ecef;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: inherit;
}

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

.activity-item:hover {
    background: #f8f9fa;
    margin: 0 -0.5rem;
    padding: 0.75rem 0.5rem;
}

.activity-item.empty {
    cursor: default;
    color: #666;
}

.activity-item.empty:hover {
    background: transparent;
    margin: 0;
    padding: 0.75rem 0;
}

.activity-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.icon-payment {
    background: #dbf0d3;
}

.icon-payment svg {
    color: #6ec250;
}

.icon-contract {
    background: #e3f6fa;
}

.icon-contract svg {
    color: #43c4e0;
}

.icon-documents {
    background: #e1d3ff;
}

.icon-documents svg {
    color: #8850ff;
}

.icon-hub {
    background: #43c4e0;
}

.icon-hub svg {
    color: #ffffff;
}

.icon-default {
    background: #f0f0f0;
}

.icon-default svg {
    color: #666;
}

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

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

.activity-type {
    font-size: 0.9rem;
    color: #000;
}

.activity-date {
    font-size: 0.75rem;
    color: #888;
    white-space: nowrap;
}

.activity-detail {
    font-size: 0.85rem;
    color: #888;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
/************* Client List Styles *************/

.client-list-section {
    background: white;
    border-radius: 10px;
    border: 1px solid #E0E0E0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex: 1;
}

/************* Client List Section *************/

.client-list-section {
    background: white;
    border-radius: 10px;
    border: 1px solid #E0E0E0;
    overflow: hidden;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    border-bottom: 1px solid #e9ecef;
}

.sidebar-header h2 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
}

.client-list-tabs {
    display: flex;
    gap: 0;
}

.client-list-tab {
    flex: 1;
    padding: 1rem;
    background: white;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    color: #666;
    transition: all 0.2s;
}

.client-list-tab:first-child {
    border-radius: 0;
}

.client-list-tab:last-child {
    border-radius: 0;
}

.client-list-tab:hover {
    background: #e9ecef;
    color: #333;
}

#clientsTab.active {
    color: #275db2;
    background-color: #e2edf7;
    border-radius: 6px 6px 0 0;
}

#leadsTab.active {
    color: white;
    background-color: #275db2;
    border-radius: 6px 6px 0 0;
}

.client-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0;
}

.client-item {
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: background-color 0.2s;
    border-left: 3px solid transparent;
    position: relative;
}

.client-item:hover {
    background: #f8f9fa;
}

.client-item.active {
    border-left-color: #275db2;
}

.client-name {
    font-weight: 500;
    color: #333;
}

/************* Write Note Button *************/

.write-note-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    padding: 0;
    background-color: #43c4e0;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    opacity: 0;
    transition: opacity 0.2s, background-color 0.2s;
}

.client-item:hover .write-note-btn {
    opacity: 1;
}

.write-note-btn:hover {
    background-color: #3ab0cc;
}

/* Mobile: Always show write note button */
@media (max-width: 600px) {
    .write-note-btn {
        opacity: 1;
    }
}

/************* Main Content Area *************/

.admin-main {
    flex: 1;
    min-width: 0;
}

.content-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    border: 1px solid #E0E0E0;
}

.progress-card {
    background: transparent;
    border: none;
    padding: 0;
    margin-bottom: 0;
}

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

.content-card h2 {
    font-size: 1.2rem;
    letter-spacing: 0.05rem;
    font-weight: 600;
    color: #333;
}

#selectedClientName {
    font-size: 2rem;
    text-transform: uppercase;
}

/************* Activity Feed *************/

.activity-list {
    display: flex;
    flex-direction: column;
}

.activity-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e9ecef;
    gap: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: inherit;
}

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

.activity-item:hover {
    background: #f8f9fa;
    margin: 0 -0.5rem;
    padding: 0.75rem 0.5rem;
}

.activity-item.empty {
    cursor: default;
    color: #666;
}

.activity-item.empty:hover {
    background: transparent;
    margin: 0;
    padding: 0.75rem 0;
}

.activity-icon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.icon-payment {
    background: #dbf0d3;
}

.icon-payment svg {
    color: #6ec250;
}

.icon-contract {
    background: #e3f6fa;
}

.icon-contract svg {
    color: #43c4e0;
}

.icon-documents {
    background: #e1d3ff;
}

.icon-documents svg {
    color: #8850ff;
}

.icon-hub {
    background: #43c4e0;
}

.icon-hub svg {
    color: #ffffff;
}

.icon-default {
    background: #f0f0f0;
}

.icon-default svg {
    color: #666;
}

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

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

.activity-type {
    font-size: 0.9rem;
    color: #000;
}

.activity-date {
    font-size: 0.75rem;
    color: #888;
    white-space: nowrap;
}

.activity-detail {
    font-size: 0.85rem;
    color: #888;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/************* Save Button *************/

.btn-save {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 400;
    font-family: 'Lato', sans-serif;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 80px;
}

.btn-save:disabled {
    background: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
}

.btn-save.unsaved {
    background: #ff325a;
    color: white;
}

.btn-save.unsaved:hover {
    background: #ff0032;
}

.btn-save.saved {
    background: #6ec250;
    color: white;
}

/************* Client Notes Section *************/

.client-notes-card {
    margin-bottom: 1.5rem;
}

.client-notes-wrapper {
    padding: 0;
}

/************* Follow-Up Section *************/

.follow-up-section {
    margin-bottom: 15px;
}

.follow-up-checkbox-label {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
    user-select: none;
}

.follow-up-checkbox-label input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
    width: 18px;
    height: 18px;
}

.follow-up-checkbox-label span {
    font-weight: 500;
    color: #333;
    font-size: 0.95rem;
}

.follow-up-dates {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.follow-up-date-field label {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 4px;
    font-weight: 500;
}

.follow-up-date-field input[type="date"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: 'Lato', sans-serif;
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.follow-up-date-field input[type="date"]:focus {
    outline: none;
    border-color: #43c4e0;
    box-shadow: 0 0 0 3px rgba(67, 196, 224, 0.1);
}

.follow-up-date-field input[type="date"]:disabled {
    background-color: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
}

/* Mobile responsive for follow-up dates */
@media (max-width: 600px) {
    .follow-up-dates {
        grid-template-columns: 1fr;
    }
}

/************* Client Notes Textarea *************/

#clientNotesField {
    width: 100%;
    padding: 1rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    font-family: 'Lato', sans-serif;
    font-size: 0.95rem;
    line-height: 1.5;
    resize: vertical;
    min-height: 120px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#clientNotesField:focus {
    outline: none;
    border-color: #43c4e0;
    box-shadow: 0 0 0 3px rgba(67, 196, 224, 0.1);
}

#clientNotesField:disabled {
    background-color: #f8f9fa;
    color: #6c757d;
}

/* Save button for client notes */
#saveClientNotesBtn {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 400;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 80px;
}

#saveClientNotesBtn:disabled {
    background: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
}

#saveClientNotesBtn.unsaved {
    background: #ff325a;
    color: white;
}

#saveClientNotesBtn.unsaved:hover {
    background: #ff0032;
}

#saveClientNotesBtn.saved {
    background: #6ec250;
    color: white;
}

/************* Progress Editor *************/

.progress-editor {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Desktop: Horizontal layout */
@media (min-width: 1350px) {
    .progress-editor {
        display: flex;
        flex-direction: row;
        gap: 6px;
        align-items: flex-start;
        width: 100%;
    }

    .progress-phase {
        display: flex;
        flex-direction: column;
        min-width: 0;
        flex: 0 1 auto;
    }

    .progress-phase-header {
        background: #333;
        color: white;
        padding: 0.3rem 0.5rem;
        font-weight: 600;
        font-size: 0.8rem;
        border-radius: 6px 6px 0 0;
        margin: 0;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .progress-milestones {
        display: flex;
        flex-direction: row;
        padding: 6px;
        gap: 6px;
        flex-wrap: nowrap;
        justify-content: flex-start;
        align-items: flex-start;
    }

    .progress-milestone {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 0;
        gap: 6px;
        min-width: fit-content;
        flex: 0 0 auto;
    }

    .progress-milestone-name {
        font-size: 0.85rem;
        color: #000;
        font-weight: 500;
        background: transparent;
        padding: 0;
        border-radius: 0;
        text-align: center;
        white-space: nowrap;
    }

    .status-dropdown {
        min-width: 120px;
    }
}

/* Tablet/Mobile: Vertical layout (same as client portal) */
@media (max-width: 1350px) {
    .progress-editor {
        display: flex;
        flex-direction: column;
        gap: 0;
    }

    .progress-phase {
        display: flex;
        flex-direction: column;
    }

    .progress-phase-header {
        background: #333;
        color: white;
        padding: 0.3rem 1rem;
        font-weight: 600;
        font-size: 0.8rem;
        border-radius: 6px;
        margin-bottom: 0;
        text-align: center;
        margin-left: 6px;
        margin-right: 6px;
    }

    .progress-milestones {
        display: flex;
        flex-direction: column;
        padding: 6px 0;
        gap: 6px;
    }

    .progress-milestone {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 6px;
        gap: 6px;
        flex-direction: row;
    }

    .progress-milestone-name {
        font-size: 0.85rem;
        color: #000;
        font-weight: 500;
        background: #f2f2f2;
        padding: 0.5rem 1rem;
        border-radius: 6px;
        flex: 1;
    }

    .status-dropdown {
        width: 140px;
        padding-top: 0.75rem !important;
        padding-bottom: 0.75rem !important;
    }

    .lead-date-input {
        width: 140px;
        max-width: 140px;
    }

    .lead-currency-wrapper {
        max-width: 140px !important;
    }

    .lead-status-dropdown {
        width: 140px;
        min-width: 140px;
    }

    .lead-checkbox-wrapper {
        min-width: 140px !important;
        justify-content: center;
    }
}

/************* Status Dropdown *************/

.status-dropdown {
    padding: 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 400;
    min-width: 120px;
    text-align: center;
    border: none;
    cursor: pointer;
    appearance: none;
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
    padding-right: 2.5rem;
    font-family: 'Lato', sans-serif;
}

/* Dropdown arrow */
.status-dropdown {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='white' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}

/* Status Colors */
.status-dropdown.pending {
    background-color: #f2f2f2;
    color: #6c757d;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236c757d' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}

.status-dropdown.waiting {
    background-color: #ffa800;
    color: white;
}

.status-dropdown.started,
.status-dropdown.milestones,
.status-dropdown.percentage {
    background-color: #43c4e0;
    color: white;
}

.status-dropdown.complete,
.status-dropdown.received,
.status-dropdown.sent,
.status-dropdown.paid,
.status-dropdown.delivered {
    background-color: #6ec250;
    color: white;
}

/************* Progress Bar Styles (for percentages) *************/

.progress-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 120px;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background-color 0.2s;
}

/* Mobile: Reduce padding for progress wrapper */
@media (max-width: 1350px) {
    .progress-wrapper {
        padding: 0.5rem 0.5rem;
    }
}

.progress-wrapper:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.progress-wrapper.editing {
    background-color: transparent;
    padding: 0;
}

.progress-bar-container {
    flex: 1;
    height: 24px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    min-width: 80px;
}

.progress-bar-boxes {
    display: flex;
    height: 100%;
    width: 100%;
}

.progress-box {
    flex: 1;
    border-right: 2px solid white;
    transition: background-color 0.3s ease;
}

.progress-box:last-child {
    border-right: none;
}

.progress-box.filled {
    background: #43c4e0;
}

.progress-box.filled.complete {
    background: #6ec250;
}

.progress-box.empty {
    background: #e9ecef;
}

.progress-percentage {
    font-size: 0.85rem;
    font-weight: 500;
    color: #333;
    min-width: 35px;
    text-align: center;
}

/* Hide select when showing progress visualization */
.progress-wrapper select {
    display: none;
}

.progress-wrapper.editing select {
    display: block;
}

.progress-wrapper.editing .progress-bar-container,
.progress-wrapper.editing .progress-percentage {
    display: none;
}

/************* Lead Progress Inputs *************/

.lead-date-input {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 400;
    max-width: 140px;
    text-align: left;
    border: none;
    cursor: pointer;
    font-family: 'Lato', sans-serif;
    transition: all 0.2s;
}

/* Style calendar icon */
.lead-date-input::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.6;
    filter: none;
}

.lead-date-input.date-filled::-webkit-calendar-picker-indicator {
    filter: invert(1);
    opacity: 0.8;
}

.lead-date-input::-webkit-inner-spin-button,
.lead-date-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.lead-date-input.date-empty {
    background-color: #f2f2f2;
    color: #6c757d;
}

.lead-date-input.date-filled {
    background-color: #6ec250;
    color: white;
}

.lead-checkbox-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    max-width: 100px;
}

.lead-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.lead-checkbox:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.lead-checkbox-label {
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    transition: all 0.2s;
}

.lead-checkbox-label.checked {
    background-color: #6ec250;
    color: white;
}

.lead-checkbox-label.unchecked {
    background-color: #f2f2f2;
    color: #6c757d;
}

.lead-currency-wrapper {
    display: flex;
    align-items: center;
    border-radius: 6px;
    overflow: hidden;
    transition: all 0.2s;
    max-width: 130px;
}

.lead-currency-wrapper.currency-empty {
    background-color: #f2f2f2;
}

.lead-currency-wrapper.currency-filled {
    background-color: #6ec250;
}

.lead-currency-symbol {
    padding-left: 0.75rem;
    font-size: 0.9rem;
    font-weight: 500;
    pointer-events: none;
}

.lead-currency-wrapper.currency-empty .lead-currency-symbol {
    color: #6c757d;
}

.lead-currency-wrapper.currency-filled .lead-currency-symbol {
    color: white;
}

.lead-currency-input {
    padding: 0.75rem 0.75rem 0.75rem 0.25rem;
    border-radius: 0;
    font-size: 0.9rem;
    font-weight: 400;
    width: 100%;
    text-align: center;
    border: none;
    background: transparent;
    font-family: 'Lato', sans-serif;
    transition: all 0.2s;
}

.lead-currency-wrapper.currency-empty .lead-currency-input {
    color: #6c757d;
}

.lead-currency-wrapper.currency-filled .lead-currency-input {
    color: white;
}

.lead-currency-input:focus {
    outline: none;
}

.lead-currency-input::placeholder {
    color: #999;
}

/* Hide number spinners */
.lead-currency-input::-webkit-inner-spin-button,
.lead-currency-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.lead-currency-input[type="number"] {
    -moz-appearance: textfield;
}

.lead-status-dropdown {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 400;
    min-width: 120px;
    text-align: center;
    border: none;
    cursor: pointer;
    appearance: none;
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
    padding-right: 2.5rem;
    font-family: 'Lato', sans-serif;
    transition: all 0.2s;
}

/* Dropdown arrow for lead status */
.lead-status-dropdown {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='white' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}

.lead-status-dropdown.pending {
    background-color: #f2f2f2;
    color: #6c757d;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236c757d' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}

.lead-status-dropdown.red-status {
    background-color: #dc3545;
    color: white;
}

.lead-status-dropdown.waiting {
    background-color: #ffa800;
    color: white;
}

.lead-status-dropdown.blue-status {
    background-color: #43c4e0;
    color: white;
}

.lead-status-dropdown.complete {
    background-color: #6ec250;
    color: white;
}

/************* Note Modal Styles *************/

.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 10% auto;
    padding: 30px;
    border: 1px solid #e0e0e0;
    width: 500px;
    max-width: 90%;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

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

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 20px;
    margin-top: -5px;
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
}

#noteClientInfo {
    margin-bottom: 20px;
    color: #666;
    font-size: 14px;
}

#noteClientInfo strong {
    color: #333;
}

#noteTitle, 
#noteDescription {
    width: 100%;
    padding: 12px;
    margin: 10px 0;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    box-sizing: border-box;
}

#noteTitle:focus,
#noteDescription:focus {
    outline: none;
    border-color: #43c4e0;
    box-shadow: 0 0 0 2px rgba(67, 196, 224, 0.1);
}

#noteDescription {
    resize: vertical;
    min-height: 120px;
}

.modal-buttons {
    margin-top: 25px;
    text-align: right;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.modal .btn-primary, 
.modal .btn-secondary {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    width: auto;
}

.modal .btn-primary {
    background-color: #43c4e0;
    color: white;
}

.modal .btn-primary:hover:not(:disabled) {
    background-color: #3ab0cc;
    transform: none;
}

.modal .btn-primary:disabled {
    background-color: #a0a0a0;
    cursor: not-allowed;
}

.modal .btn-secondary {
    background-color: #f2f2f2;
    color: #333;
}

.modal .btn-secondary:hover {
    background-color: #e8e8e8;
    transform: none;
}

/* Mobile Responsive for Modal */
@media (max-width: 600px) {
    .modal-content {
        width: 95%;
        margin: 20px auto;
        padding: 20px;
    }
}

/************* File List *************/

.file-list {
    display: flex;
    flex-direction: column;
}

.file-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    padding: 0.5rem;
    background: #ffffff;
    border-bottom: 1px solid #e9ecef;
    transition: all 0.2s;
    text-decoration: none;
    color: inherit;
}

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

.file-item:hover {
    background: #f8f9fa;
}

.file-icon-img {
    width: 32px;
    height: 40px;
    margin-right: 1rem;
    flex-shrink: 0;
}

.file-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/************* Notes Section *************/

.notes-card {
    margin-top: 1.5rem;
}

.btn-add-note {
    padding: 0.5rem 1rem;
    background: #43c4e0;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.btn-add-note:hover {
    background: #3ab0cc;
}

.notes-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 400px;
    overflow-y: auto;
}

.note-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1rem;
    transition: box-shadow 0.2s;
}

.note-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

.note-title {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.note-date {
    font-size: 0.85rem;
    color: #666;
}

.note-status {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
}

.note-status.complete {
    background: #6ec250;
    color: white;
}

.note-status.pending {
    background: #ffa800;
    color: white;
}

.note-description {
    color: #555;
    font-size: 0.9rem;
    line-height: 1.5;
    white-space: pre-wrap;
}

/************* Error Notification *************/

.error-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #dc3545;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 1000;
    max-width: 350px;
}

.error-notification.show {
    transform: translateX(0);
}

.error-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.error-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    margin-left: 1rem;
    opacity: 0.8;
}

.error-close:hover {
    opacity: 1;
}

/************* Professional Footer *************/

.professional-footer {
    background: #0a1d3f;
    color: white;
    margin-top: 3rem;
    padding: 2rem 0;
}

.footer-content {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 2rem;
    text-align: center;
}

.footer-logo {
    height: 40px;
    width: auto;
    margin-bottom: 0;
}

.footer-divider {
    width: 60px;
    height: 2px;
    background: rgba(255,255,255,0.3);
    margin: 1rem auto;
}

.footer-firm {
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.footer-contact {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 0;
    opacity: 0.9;
}

.footer-contact a {
    color: white;
    text-decoration: none;
}

.footer-contact a:hover {
    text-decoration: underline;
}
