:root {
/*    --my-purple: #8e50b3;*/
    --my-purple: #8E6885;
    --my-brown: #6e5a5d;
    --my-green: #94b49f;
    --my-gray: #f1f1f3;
    --accent-green: #38DD6B;
    --pickup-card-brown: #bad6c2; /* #7d9182 a green*/
    ;
    /* --my-purple: #8e50b3; */
}

/* Basic Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
/*    font-family: "Georgia", serif;*/
    line-height: 1.1;
    color: #333;
    background-color: #f8f5f2;
    overflow-x: hidden;
}

/* Header Styles */
header {
/* background-color: #94b49f; */
    color: #fff;
    text-align: center;
    padding: 0;
    margin-bottom: 0.5rem;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

.header-content h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.header-content h2 {
    font-size: 1.5rem;
    font-weight: 400;
    color: #fcf8e8;
    margin-bottom: 1.5rem;
}

/* Navigation Styles */
.main-nav {
/*    background-color: var(--my-brown);*/
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.2rem, 0;
}
/* Navigation Content Wrapper */
.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
}

/* Logo/Brand Title Styling */
.brand-title {
    display: flex;
    align-items: center;
    margin-right: 2rem;
    flex-shrink: 0; /* Prevent logo from shrinking */
}

.brand-title img {
    height: 50px;
    width: auto;
    background-color: whitesmoke;
    border-radius: 8px;
    padding: 0.2rem;
}
/* Navigation List */
.main-nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
    margin-left: auto; /* Push nav items to the right */
    margin-right: auto;
}

.main-nav li {
    margin: 0;
}

.nav-link {
    display: block;
    font-size: 1.2rem;
    font-family: sans-serif;
    color: black;
    text-decoration: none;
    padding: 0.8rem 1rem;
    transition: background-color 0.3s ease;
}

.nav-header {
    display: none;
}
.logo {
    font-size: 1.7rem;
    font-weight: 700;
    font-style: italic;
    color: var(--my-brown);
    text-decoration: none;
}
.non-mobile-display-none {
    display: none;
}

/* Cell phone specific styles */
@media (max-width: 768px) {

    .main-nav {
        flex-direction: column;
        padding: 0;
    }

    .main-nav li {
        border: 3px solid var(--my-brown);
        border-radius: 8px;
        margin: 0.3rem 0;
        justify-content: center;
    }
    .main-nav ul.open {
        display: flex; /* Show when hamburger is clicked */
        margin: auto;
    }
    .hamburger {
        display: inline-flex;
        justify-content: space-between;
        align-items: center;
        font-size: 1.8rem;
        background: none;
        width: 100%;
        /*        color: var(--my-brown);*/
        border: 3px solid var(--my-brown);
        border-radius: 8px;
        padding: 0.2rem 0.5rem;
        cursor: pointer;
    }

    .main-nav ul {
        flex-direction: column;
        display: none;
        /*        width: 100%;*/
        /*        background-color: var(--my-brown);*/
    }

    .nav-header {
        display: inline-flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 0.2rem;
    }
    .nav-content {
        flex-direction: column;
        width: 100%;
        padding: 1rem;
    }

    .brand-title {
        display: inline;
        margin-right: 0;
        align-self: center;
    }

    .nav-link {
        padding: 0.5rem 1rem;
        font-size: 1.2rem;
        text-align: center;
    }

    .header-content h1 {
        font-size: 2rem;
    }

    .header-content h2 {
        font-size: 1.2rem;
    }

    .nav-link.logout {
        width: 100%;
        text-align: center;
    }

    .action-buttons {
        margin: auto;
        align-items: start;
    }

    .header-content h1 {
        font-size: 1.8rem;
        margin-bottom: 0;
        font-weight: 500;
    }

    .header {
        padding: 0.5rem 0;
        font-size: 1.8rem;
    }
    .remove-on-mobile {
        display: none;
    }
    .non-mobile-display-none {
        display: flex;
    }

}

/* Main Content */
main {
/* max-width: 98%; */
    margin: 0 auto;
    padding: 0 .4rem;
}

.intro {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: #fcf8e8;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.intro h3 {
    color: #76549a;
    margin-bottom: 1rem;
    font-size: 1.75rem;
}

.intro p {
    color: #555;
    max-width: 800px;
    margin: 0 auto;
}

/* Table Styles */
.data-container {
    overflow-x: auto;
    margin-bottom: 2rem;

    /* background-color: #ffffff; */
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    padding: 0.2rem;
}

.table-actions {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
}

/* .action-buttons {
    display: flex;
    gap: 0.5rem;
} */

#customer-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

#customer-table th,
#customer-table td {
    padding: 0.2rem;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

#customer-table th {
    font-size: 12px;
    color: darkred;
    background-color: #ecb390;
    color: #fff;
    font-weight: 600;
}

#customer-table tr:nth-child(even) {
    background-color: #f9f5eb;
}

#customer-table tr:hover {
    background-color: #f0e6d2;
}

/* Button Styles */
.action-button {
    background-color: white;
    margin: 0.1rem 0.1rem;
    color: black;
    border: 3px solid var(--my-brown);
    border-radius: 8px;
    padding: 0.5rem 1rem;

    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
}

.action-button:hover {
    background-color: var(--my-green);
    color: white;
    border-color: var(--my-green);

}

.print-button {
    background-color: #94b49f;
}

.print-button:hover {
    background-color: #7a9683;
}

.table-btn {
    padding: 0.25rem 0.5rem;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.edit-btn {
    background-color: #94b49f;
    color: white;
}

.edit-btn:hover {
    background-color: #7a9683;
}

.delete-btn {
    background-color: #ecb390;
    color: white;
}

.delete-btn:hover {
    background-color: #d89b7b;
}

.cancel-button {
    background-color: #999;
}

.cancel-button:hover {
    background-color: #777;
}

/* Form Styles */
.customer-form {
    padding: 0.2rem;
}

.customer-form h3 {
    margin-bottom: 1.5rem;
    color: #76549a;
}

.form-group {
    margin-bottom: 0.2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
}

.form-group textarea {
    height: 100px;
    resize: vertical;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
}

.checkbox-group input {
    width: auto;
    margin-right: 0.5rem;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
    min-width: 150px;
}

.form-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 20px;
    border-radius: 8px;
    width: 80%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #76549a;
}

/* Footer Styles */
footer {
    background-color: #94b49f;
    color: #fff;
    text-align: center;
    padding: 1.5rem 0;
    margin-top: 2rem;
}

/* Print styles */
@media print {

    header,
    .action-buttons,
    footer,
    .intro {
        display: none;
    }

    body,
    main,
    .data-container {
        background: #ffffff;
        color: #000;
        margin: 0;
        padding: 0;
        box-shadow: none;
    }

    #customer-table th {
        background-color: #eee !important;
        color: #333 !important;
    }

    #customer-table tr:nth-child(even) {
        background-color: #f9f9f9 !important;
    }

    main {
        max-width: 100%;
    }

    @page {
    margin: 1cm;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .header-content h1 {
        font-size: 2rem;
    }

    .header-content h2 {
        font-size: 1.25rem;
    }

    .table-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .form-row {
        flex-direction: column;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
}

.pickup-range-selector {
    background-color: var(--my-green);
    padding: 0.2rem 0.2rem;
    border: outset 2px;
    border-radius: 5px;
    border-color: var(--my-brown);
    color: white;
    font-size: 1.2rem;
}

.pickup-range-selector select {
    font-size: 1.2rem;
}

.customer-card {
    background: white;
    /* border-radius: 8px; */
    margin-bottom: 0.4rem;
    /*box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);*/
    /*  transition: transform 0.2s ease, box-shadow 0.2s ease;  */
}

.customer-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.customer-header {
/*    max-width: fit-content;*/
/*    background-color: var(--my-gray);*/
    background-color: #f6f6f6;
    /*color: white;*/
    /*padding: 0.4rem;*/
    /* border-radius: 4px 4px 0 0; */
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.customer-number {
    background-color: #dbe5db;
    border-radius: 5px;
    width: 1.4rem;
    height: 1.4rem;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    font-size: 0.8rem;
}

.customer-name {
    flex: 1;
    padding: 0 0.4rem;
}

.customer-name h3 {
    margin: 0;
    font-size: 1.1rem;
}

.customer-checkbox {
    display: flex;
    align-items: center;
}
.last-date {
    font-size: 0.8rem;
    font-color: black;
}
.large-checkbox {
/*position: fixed;
margin-top: 1.2rem;
  margin-left: -4rem;
  */
    margin-right: 2rem;
    accent-color: #9dc7e7;

    width: 1.8rem;
    height: 1.8rem;
    cursor: pointer;

    border: 1.5rem solid;
    border-radius: 15px;

}

.large-checkbox input[type="checkbox"] {

    border-radius: 50%;
    /* Create rounded corners */
    border: 2px solid black;
    /* Optional: Add a border */
}

.large-checkbox:checked {
    background-color: #4CAF50;
    border-color: #4CAF50;
}

.customer-details {
    padding: 0 0.2rem;
}

.detail-item {
    display: flex;
    align-items: center;
    /* padding: 0.2rem 0; */
    border-bottom: 1px solid #f0f0f0;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-item.comments {
/*   flex-direction: column; */
/* align-items: flex-start; */
}

.detail-item.comments .value {
    width: 100%;
    /*  background-color: #f9f5eb;*/
    padding: 0.2rem;
    border-radius: 4px;
    font-style: italic;
}

.label {
    font-weight: 400;
    color: #76549a;

}

.value {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 1rem;
    font-weight: 500;
}

.highlight-yes {
    background-color: #94b49f;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.highlight-no {
    background-color: #ccc;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

.results-count {
    text-align: center;
    padding: 1rem;
    background-color: #fcf8e8;
    margin: 1rem;
    border-radius: 8px;
    font-weight: 600;
    color: #76549a;
}
.customers-container {
/*    display: grid;*/
/*    grid-template-columns: repeat(3, 1fr);*/
/*    gap: 0.5rem;*/
/* Adjust gap for better spacing */

    margin-bottom: 1rem;
    margin-top: 1rem;

    /*    max-width: 1200px;*/
    background-color: white;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    /*    align-content: center;*/
    /*    border: 2px solid var(--my-green);*/
    /*    border-radius: 8px;*/
    padding: 2rem;
}
@media print {
    .customers-container {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        background-color: white;
        margin: auto;
        padding: 0;
        width: 100%;
        max-height: none;
        /*        page-break-inside: avoid;*/
    }
    .custom-header {
        max-width: min-content;
    }
    .table-actions {
        display: none;
    }
    .letter-range-buttons {
        display: none;
    }
}

/*.customers-container {*/
/*    display: inline-flex;*/
/*    flex-direction: column;*/
/*    flex-wrap: wrap;*/
/*    align-content: center;*/
/*    border: 2px solid var(--my-green);*/
/*    border-radius: 8px;*/
/*    padding: 1rem;*/
/*    *//* Remove max-height and any width constraints */
/*}*/
/* Mobile optimizations */
@media (max-width: 768px) {
    .customers-container {
        max-width: 100%;
        max-height: none;
        display: flex;
        flex-direction: column;
        flex-wrap: no-wrap;
        align-content: center;
        /*    border: 2px solid var(--my-green);*/
        /*    border-radius: 8px;*/
        padding: 0.5rem;
    }

    .customer-header {
        padding: 0.2rem;
    }
    .customer-name h3 {
        font-size: 1rem;
    }

    .detail-item {
        padding: 0.2rem 0;
        gap: 0.5rem;
    }

    .label {
        min-width: 80px;
        font-size: 0.9rem;
    }

    .value {
        font-size: 0.8rem;
    }
}
.button-dimmed {
    background-color: #ccc;
    color: #666;
    cursor: not-allowed;
    pointer-events: none;
    opacity: 0.6;
}

/* DIMMING EFFECT STYLES */
.customers-container.dimmed {
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(2px);
}

.customers-container.dimmed::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    pointer-events: none;
    z-index: 1;
}

.customers-container.dimmed .customer-card {
    filter: brightness(0.3) contrast(0.8);
    pointer-events: none;
}

.customers-container.dimmed .customer-card.selected {
    filter: brightness(1) contrast(1);
    pointer-events: auto;
    position: relative;
    z-index: 2;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    transform: scale(1.02);
}

.number-display {
    background: linear-gradient(145deg,
    #809a80,
    #80ae80);
    /* Gradient for depth */
    color: #fbf0e2;
    width: 1.5rem;
    /* Adjust width as needed */
    height: 1.7rem;
    /* Adjust height as needed */
    border-radius: 25%;
    display: flex;
    justify-content: center;
    align-items: start;
    font-size: 1.2rem;
    font-weight: bold;

    /* Strong 3D effect */
    box-shadow: 3px 3px 6px rgba(0, 0, 0, 0.4),
    inset -2px -2px 4px rgba(0, 0, 0, 0.3),
    inset 2px 2px 4px rgba(255, 255, 255, 0.2);
    border: none;
}

.dashboard-container {
    max-width: 1200px;
    margin: 0 auto;
}

.header {
    font-size: 1rem;
    text-align: center;
    margin-bottom: 1.2rem;
    background-color: var(--my-brown);
    color: white;
    padding: 1rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.stat-title {
    font-size: 1rem;
    color: #76549a;
    font-weight: 600;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-number {
    font-size: 3rem;
    font-weight: bold;
    color: #94b49f;
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.stat-description {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

.loading {
    color: #94b49f;
    font-style: italic;
}

.error {
    color: #e74c3c;
    font-weight: bold;
}

.refresh-btn {
    background-color: #76549a;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: background-color 0.3s ease;
}

.refresh-btn:hover {
    background-color: #634481;
}

.last-updated {
    text-align: center;
    color: #666;
    font-size: 0.9rem;
    margin-top: 1rem;
}

.auto-refresh {
    text-align: center;
    margin-bottom: 1rem;
}

.auto-refresh label {
    color: #76549a;
    font-weight: 600;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}


.pickup-button {
    position: relative;
    background: linear-gradient(145deg, #4CAF50, #45a049);
    border: none;
    border-radius: 12px;
    padding: 12px 40px 12px 20px;
    color: white;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    box-shadow:
    0 4px 15px rgba(76, 175, 80, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    min-width: 120px;
}

.pickup-button:hover {
    background: linear-gradient(145deg, #5CBF60, #4CAF50);
    transform: translateY(-2px);
    box-shadow:
    0 6px 20px rgba(76, 175, 80, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.pickup-button:active {
    transform: translateY(0);
    box-shadow:
    0 2px 10px rgba(76, 175, 80, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.pickup-button .emoji {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
}
.pickup-card-color {
    background-color: var(--pickup-card-brown);
}

@media (max-width: 768px) {
    .table-actions {
        flex-direction: column;
    }

    .table-actions>.action-button {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .table-actions .button-row {
        display: flex;
        gap: 0.5rem;
        width: 100%;
    }

    .table-actions .button-row .action-button {
    /*        flex: 1;*/
        margin-bottom: 0;
    }
    .action-button {
        margin: 0;
        padding: 0.5rem 0.2rem;

    }
}

.char-counter {
    font-size: 0.8em;
    color: #666;
    margin-top: 5px;
}

.char-counter.warning {
    color: #ff4444;
}

tr.htmx-swapping td {
    background-color: red;
    opacity: 0;
    transition: opacity 1s ease-out;
}

td {
    border-bottom: 2px solid #dbb;
}



/* Report Controls */
.report-controls {
    background-color: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
}

.report-controls .form-row {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    justify-content: center;
}

.report-controls .form-group {
    flex: 0 1 200px;
}

.report-controls select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    background-color: white;
}

.report-controls select:focus {
    outline: none;
    border-color: var(--my-brown);
}

/* Report Preview */
.report-preview {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    padding: 2rem;
    min-height: 200px;
}

.report-preview-content h3 {
    color: var(--my-brown);
    margin-bottom: 1.5rem;
    text-align: center;
}

.preview-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.preview-item {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem;
    background-color: #f9f5eb;
    border-radius: 4px;
    border-left: 4px solid var(--my-green);
}

.preview-item .label {
    font-weight: 600;
    color: var(--my-brown);
}

.preview-item .value {
    font-weight: bold;
    color: #333;
}

/* Loading state for report preview */
.report-preview.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    color: #999;
    font-style: italic;
}

/* Report actions responsive */
@media (max-width: 768px) {
    .report-controls .form-row {
        flex-direction: column;
        gap: 1rem;
    }

    .report-controls .form-group {
        flex: 1;
        width: 100%;
    }

    .preview-stats {
        grid-template-columns: 1fr;
    }
}

/*********************** Customer Management Styles ******************/
.customer-management-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

.management-header {
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
}

.management-header h2 {
    color: var(--my-brown);
    margin-bottom: 1rem;
}

/* Search Container */
.search-container {
    margin-bottom: 1rem;
}

.search-container form {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 200px;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.search-input:focus {
    outline: none;
    border-color: var(--my-brown);
}

.clear-search {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #666;
    text-decoration: none;
}

.clear-search:hover {
    color: var(--my-brown);
}

.results-info {
    color: #666;
    font-size: 0.9rem;
}

/* Customer List */
.customer-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.customer-card-management {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.3s ease;
}

.customer-card-management:hover {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.customer-info {
    padding: 0.1rem 1rem;
}

.customer-name-section {
    display: flex;
    justify-content: space-between;
    align-items: center;

}

.customer-name-section h3 {
    margin: 0;
    color: black;
    font-size: 1.1rem;
}

.customer-id {
    color: #999;
    font-size: 0.85rem;
}

.customer-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.detail-item {
    display: flex;
    align-items: center;
    gap: 0.9rem;
}

.detail-item.comments-item {
    grid-column: 1 / -1;
}

.detail-item .label {
    font-weight: 600;
    color: #666;
    font-size: 0.9rem;
}

.detail-item .value {
    color: var(--my-brown);
    padding: 0.1rem 0rem;
}

/* Badges */
.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.veteran-badge {
    background-color: #e3f2fd;
    color: #1976d2;
}

.forms-badge {
    background-color: #fff3e0;
    color: #f57c00;
}

/* Customer Actions */
.customer-actions {
    display: flex;
    gap: 0.5rem;
    padding: 0.1rem 1.5rem;
    background-color: #f9f9f9;
    border-top: 1px solid #eee;
}

.customer-actions button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.edit-btn {
    background-color: var(--my-green);
    color: white;
}

.edit-btn:hover {
    background-color: #7a9683;
}

.delete-btn {
    background-color: #ecb390;
    color: white;
}

.delete-btn:hover {
    background-color: #d89b7b;
}

/* Edit Mode */
.customer-card-management.edit-mode {
    background-color: #f9f5eb;
}

.edit-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    padding: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    margin-top: 0.5rem;
    /*    margin-bottom: 0.25rem;*/
    font-weight: 600;
    color: var(--my-brown);
    font-size: 1.2rem;
}

.form-group input,
.form-group textarea {
    margin: 0.4rem;
    padding: 0.5rem;
    border: 3px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--my-brown);
}

.checkbox-group label {
    display: flex;
    align-items: center;
    font-weight: normal;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    margin-right: 0.5rem;
}

.edit-actions {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background-color: #eee;
    border-top: 1px solid #ddd;
}

.save-btn {
    background-color: var(--my-brown);
    color: white;
    padding: 0.5rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.save-btn:hover {
    background-color: #634481;
}

.cancel-btn {
    background-color: #999;
    color: white;
    padding: 0.5rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.cancel-btn:hover {
    background-color: #777;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding: 1rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.pagination-btn,
.page-number {
    padding: 0.5rem 0.75rem;
    border: 1px solid #ddd;
    background-color: white;
    color: var(--my-brown);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-btn:hover,
.page-number:hover {
    background-color: var(--my-brown);
    color: white;
    border-color: var(--my-brown);
}

.page-number.active {
    background-color: var(--my-brown);
    color: white;
    border-color: var(--my-brown);
}

.page-numbers {
    display: flex;
    gap: 0.25rem;
}

.page-dots {
    padding: 0 0.5rem;
    color: #999;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .customer-management-container {
        padding: 0.5rem;
    }

    .management-header {
        padding: 1rem;
    }

    .search-container form {
        flex-direction: column;
    }

    .search-input {
        width: 100%;
    }

    .customer-name-section {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .customer-details-grid {
        grid-template-columns: 1fr;
    }

    .customer-actions {
        flex-wrap: wrap;
    }

    .customer-actions button {
        flex: 1;
        min-width: 100px;
    }

    .edit-form-grid {
        grid-template-columns: 1fr;
    }

    .pagination {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .page-numbers {
        order: 2;
        width: 100%;
        justify-content: center;
        margin: 0.5rem 0;
    }

    .range-btn {
        font-size: .8rem;
        /*        background: linear-gradient(135deg, var(--my-green), var(--my-gray));*/

        /*border: 2px solid #dee2e6;*/
        border-radius: 8px;
        padding: 0.5rem;
        font-weight: 500;
        /*        min-width: 70px;*/
    }
}

/* Loading states */
.htmx-request .customer-card-management {
    opacity: 0.6;
}

.htmx-swapping {
    opacity: 0;
    transition: opacity 0.3s ease-out;
}

/* Authentication Page Styles */
.nav-tabs {
    background: white;
    display: flex;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-tab {
    background: none;
    border: none;
    padding: 1.5rem 3rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    font-family: inherit;
}

.nav-tab.active {
    color: var(--primary-purple);
    border-bottom-color: var(--accent-green);
    background: var(--warm-cream);
}

.nav-tab:hover {
    color: var(--primary-purple);
    background: var(--warm-cream);
}

.main-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.4rem;
}

.form-container {
    margin: auto;
    background: white;
    padding: 1rem;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    width: 100%;
    /*    width: auto;*/
    /*    max-width: none;*/
    max-width: 500px;
    overflow: hidden;
}

.form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--accent-green), var(--primary-purple));
}

.page {
    display: none;
    animation: fadeIn 0.5s ease-in;
}

.page.active {
    display: block;
}

.form-title {
    font-size: 2rem;
    color: var(--primary-purple);
    text-align: center;
    margin-bottom: 0.5rem;
}

.form-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: 1rem;
}

.required {
    color: #e74c3c;
}

.error-message {
    color: #e74c3c;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    display: none;
}

.error-message.show {
    display: block;
}

.household-section {
    background: var(--warm-cream);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.age-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
    margin-top: 1rem;
}

.age-input input {
    text-align: center;
    background: white;
}

.total-display {
    text-align: center;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border: 2px solid var(--accent-green);

}

.total-display .total-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-purple);
}

.btn {
    width: 100%;
    padding: 1rem 2rem;
    /*  border: none; */
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: inherit;
}

.btn-primary {
/*    background: linear-gradient(135deg, var(--my-green), var(--my-brown)); */
    background: var(--my-green);
    color: white;
    box-shadow: 0 8px 25px rgba(148, 180, 159, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(148, 180, 159, 0.6);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-purple);
    border: 2px solid var(--primary-purple);
    margin-top: 1rem;
}

.btn-secondary:hover {
    background: var(--primary-purple);
    color: white;
}

.message {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 600;
    display: none;
}

.message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message.show {
    display: block;
}

.form-links {
    text-align: center;
    margin-top: 1.5rem;
}

.back-home {
/*    position: absolute;*/
    display: block;
    top: 0.5rem;
    left: 1rem;
    /*    background: var(--my-brown);*/
    background: whitesmoke;
    color: black;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    padding: 0.5rem 0.5rem;
    border-radius: 20px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
}

.back-home:hover {
    background: rgba(163,239,147,1);
    transform: translateX(-3px);
}

.loading {
    position: relative;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--accent-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
/************  New Customer Form Styles *************/
.error-message {
    color: #e74c3c;
    font-size: 0.9rem;
    margin-top: 0.25rem;
    display: none;
}

.success-message {
    background-color: var(--my-gray);
    color: #155724;
    padding: 1.5rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    border: 1px solid #c3e6cb;
    display: none;
    text-align: center;
}

.success-actions {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.countdown {
    font-weight: bold;
    color: #155724;
}
.total-household-field input {
    width: fit-content;
    margin: 0.5rem auto;
    text-align: center;
    background-color: var(--my-gray);
    cursor: not-allowed;
}
.h3headingNewCustomer {
    font-size: 1.2rem;
    font-style: italic;
    text-align: center;
    color: var(--my-brown);
    margin: 1rem auto;
    /*    background-color: var(--my-green);  */
}
.customer-card.success-state {
    background: #d4edda;
    border-color: #28a745;
    animation: successPulse 0.5s ease-in-out;
}
/* Animations */
@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}
.filter-controls {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.letter-range-buttons {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.range-btn {
    font-size: 1rem;
    /*    background: linear-gradient(135deg, var(--my-green), var(--my-gray));*/
    /*border: 2px solid #dee2e6;*/
    border-radius: 8px;
    padding: 0.5rem 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.range-btn:hover {
    background: linear-gradient(135deg, var(--my-green), #f1f3f4);
    border-color: var(--accent-green);
    transform: translateY(-2px);
}

.range-btn.active {
    background: linear-gradient(135deg, var(--my-green), #7a9683);
    color: white;
    border-color: var(--accent-green);
    box-shadow: 0 4px 12px rgba(148, 180, 159, 0.4);
}
/* Make letter-range-buttons sticky on mobile */
@media (max-width: 768px) {
    body {
        overflow-x: visible; /* Allow sticky positioning to work */
    }

    /* Ensure the data-container doesn't interfere with sticky positioning */
    .data-container {
        overflow-x: visible;
        overflow-y: visible;
    }
    .letter-range-buttons {
        position: sticky;
        top: 0;
        z-index: 100;
        background-color: white;
        padding: 1rem 0.5rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        margin-bottom: 0;
    }

    /* Optional: Add some margin to the content below to prevent overlap */
    .letter-range-buttons + * {
        margin-top: 1rem;
    }

    /* If the buttons are inside .filter-controls, make the whole container sticky */
    .filter-controls {
        position: fixed !important; /* Use fixed instead of sticky for better mobile support */
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        margin-bottom: 0;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        border-radius: 0; /* Remove border radius when fixed */
    }
}