:root {
    --dash-primary-green: #3d7a57;
    --dash-light-green: #eaf4ee;
    --dash-background-green: #f6f9f7;
    --dash-text-dark: #2c3e50;
    --dash-text-light: #5a6a79;
    --dash-border-color: #eef2f5;
    --dash-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Modal buttons styling */
.modal-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: flex-end;
}

.modal-buttons .button {
    padding: 10px 20px !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    border: none !important;
    text-decoration: none !important;
}

.modal-buttons .cancel-logout {
    background-color: #f8f9fa !important;
    color: #6c757d !important;
    border: 1px solid #dee2e6 !important;
}

.modal-buttons .cancel-logout:hover {
    background-color: #e9ecef !important;
    color: #495057 !important;
}

.modal-buttons .confirm-logout {
    background-color: var(--dash-primary-green) !important;
    color: white !important;
}

.modal-buttons .confirm-logout:hover {
    background-color: #2d5a42 !important;
}

/* Logout button loading spinner */
.logout-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: logout-spin 1s ease-in-out infinite;
    margin-right: 5px;
}

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

/* Disabled state for logout button */
.modal-buttons .confirm-logout:disabled {
    opacity: 0.7 !important;
    cursor: not-allowed !important;
    background-color: var(--dash-primary-green) !important;
}
.woocommerce-MyAccount-navigation, .woocommerce-MyAccount-content > p:first-of-type {
    display: none;
}
a.woocommerce-button.button.view {
    display: none;
}
.custom-dashboard-container {
    font-family: var(--dash-font-family);
    color: var(--dash-text-dark);
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}
.dash-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 25px;
    padding: 10px 5px;
}
.dash-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    color: var(--dash-text-dark);
}
.dash-header .last-order-date {
    font-size: .9rem;
    color: var(--dash-text-light);
}
.dash-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 25px;
}
.dash-nav-btn {
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: .95rem;
    transition: all .3s ease;
    border: none;
    cursor: pointer;
}
.dash-nav-btn.active {
    background-color: var(--dash-primary-green);
    color: #fff;
}
.dash-nav-btn.inactive {
    background-color: var(--dash-light-green);
    color: var(--dash-primary-green);
}
.dash-nav-btn.inactive:hover {
    background-color: #dbe9e3;
}
.dash-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}
.dash-card {
    background-color: #fff;
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--dash-border-color);
    box-shadow: 0 4px 12px rgba(0,0,0,.04);
    position: relative;
}
.dash-card .card-title {
    font-size: .9rem;
    color: var(--dash-text-light);
    margin: 0 0 8px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.dash-card .card-value {
    font-size: 2.2rem;
    font-weight: 600;
    margin: 0;
    color: var(--dash-text-dark);
}
.dash-card .card-value-small {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    color: var(--dash-text-dark);
}
.dash-card.highlight {
    background-color: var(--dash-background-green);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.highlight .card-content {
    display: flex;
    flex-direction: column;
}
.highlight .card-icon {
    font-size: 2rem;
    color: var(--dash-primary-green);
}
.main-content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}
.main-content-grid .dash-card.large-card {
    grid-column: 1 / 2;
}
.main-content-grid .dash-card.sidebar-card {
    grid-column: 2 / 3;
}
.chart-container {
    width: 100%;
    height: auto;
}
.chart-container svg {
    width: 100%;
    height: auto;
}
.popular-products-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}
.popular-products-table th, .popular-products-table td {
    text-align: left;
    padding: 12px 0;
    border-bottom: 1px solid var(--dash-border-color);
    font-size: .95rem;
}
.popular-products-table th {
    color: var(--dash-text-light);
    font-weight: 500;
}
.popular-products-table tr:last-child td {
    border-bottom: none;
}
.popular-products-table td:last-child {
    text-align: right;
    font-weight: 600;
}
.recent-orders-list {
    list-style: none;
    padding: 0;
    margin: 15px 0 0 0;
}
.recent-orders-list li {
    padding: 8px 0;
    font-size: .95rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    line-height: 1.5;
}
.recent-orders-list a {
    text-decoration: none;
    color: var(--dash-primary-green);
    font-weight: 600;
    cursor: pointer;
}
.stats-filter {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: var(--dash-background-green);
    border: 1px solid var(--dash-light-green);
    border-radius: 6px;
    padding: 4px 24px 4px 10px;
    font-size: .8rem;
    font-weight: 500;
    color: var(--dash-text-light);
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%233d7a57' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 6px center;
    background-size: 12px;
    transition: border-color .2s ease;
}
.stats-filter:hover {
    border-color: var(--dash-primary-green);
}
.stats-filter:focus {
    outline: none;
    border-color: var(--dash-primary-green);
    box-shadow: 0 0 0 2px rgba(61,122,87,.2);
}
.card-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    font-size: 1.5rem;
    color: var(--dash-primary-green);
}
.order-details-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(44,62,80,.6);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    padding: 20px;
}
.modal-content {
    background: #fff;
    border-radius: 12px;
    padding: 25px 30px;
    width: 100%;
    max-width: 800px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,.1);
    max-height: 90vh;
    overflow-y: auto;
}
.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    font-weight: 300;
    color: var(--dash-text-light);
    cursor: pointer;
    line-height: 1;
    transition: color .2s ease;
}
.modal-close:hover {
    color: var(--dash-text-dark);
}
.modal-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--dash-border-color);
}
.modal-header h2 {
    font-size: 1.5rem;
    color: var(--dash-text-dark);
    margin: 0;
}
.modal-body .card-loader {
    position: relative;
    transform: none;
    top: auto;
    left: auto;
    text-align: center;
    padding: 40px 0;
    display: block;
}
.modal-body .woocommerce {
    padding-top: 10px;
}
.modal-body table {
    width: 100%!important;
}
.modal-body .woocommerce-customer-details address {
    border: none;
    padding: 0;
}
.recommended-products-grid {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
}
.recommended-product-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    border-radius: 8px;
    background-color: var(--dash-background-green);
    transition: background-color .3s ease;
    text-decoration: none;
}
.recommended-product-card:hover {
    background-color: var(--dash-light-green);
}
.recommended-product-image {
    flex-shrink: 0;
}
.recommended-product-image img {
    width: 50px;
    height: 50px;
    border-radius: 6px;
    object-fit: cover;
    border: 1px solid var(--dash-border-color);
}
.recommended-product-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.recommended-product-title {
    font-weight: 600;
    font-size: .95rem;
    color: var(--dash-text-dark);
    text-decoration: none;
    line-height: 1.3;
    margin: 0 0 4px 0;
    transition: color .2s ease;
}
.recommended-product-card:hover .recommended-product-title {
    color: var(--dash-primary-green);
}
.recommended-product-price {
    font-size: .9rem;
    color: var(--dash-text-light);
    font-weight: 500;
}
.dash-tab-content {
    background-color: #fff;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid var(--dash-border-color);
    box-shadow: 0 4px 12px rgba(0,0,0,.04);
}
#dashboard-content {
    background: none;
    padding: 0;
    border: none;
    box-shadow: none;
}
.dash-tab-content h2 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 20px;
    color: var(--dash-text-dark);
}
.dash-tab-content p {
    font-size: 1rem;
    color: var(--dash-text-light);
    line-height: 1.6;
    max-width: 700px;
}
.dash-tab-content form .form-row, .dash-tab-content form p {
    margin-bottom: 15px;
}
.dash-tab-content form label {
    font-weight: 600;
    font-size: .9rem;
    display: block;
    margin-bottom: 6px;
    color: var(--dash-text-dark);
}
.dash-tab-content form input[type="text"], .dash-tab-content form input[type="email"], .dash-tab-content form input[type="password"], .dash-tab-content form input[type="tel"], .dash-tab-content form textarea, .dash-tab-content .input-text {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px 15px;
    width: 100%;
    font-size: .95rem;
    transition: border-color .3s ease, box-shadow .3s ease;
}
.dash-tab-content form input:focus, .dash-tab-content form textarea:focus {
    outline: none;
    border-color: var(--dash-primary-green);
    box-shadow: 0 0 0 3px rgba(61,122,87,.15);
}
.dash-tab-content form .button, .dash-tab-content form button[type="submit"] {
    background-color: var(--dash-primary-green) !important;
    color: #fff !important;
    padding: 12px 30px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    border: none !important;
    cursor: pointer;
    transition: background-color .3s ease;
    line-height: 1.5 !important;
    height: auto !important;
}
.dash-tab-content form .button:hover, .dash-tab-content form button[type="submit"]:hover {
    background-color: #316347 !important;
}
.dash-tab-content .woocommerce-address-fields .form-row {
    display: block;
    width: 100%;
}
.dash-tab-content .woocommerce-form-row--wide {
    clear: both;
}
.dash-tab-content fieldset {
    border: none;
    padding: 0;
    margin: 0 0 20px 0;
}
.dash-tab-content fieldset legend {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--dash-border-color);
    width: 100%;
}
#support-form-response .woocommerce-message, #support-form-response .woocommerce-error {
    margin: 15px 0 0 0;
    padding: 15px;
    border-radius: 8px;
    color: var(--dash-text-dark);
}
#support-form-response .woocommerce-message {
    border-left: 4px solid var(--dash-primary-green);
    background-color: var(--dash-light-green);
}
#support-form-response .woocommerce-error {
    border-left: 4px solid #e2401c;
    background-color: #fbeae5;
}

/* --- START OF ADDED/MODIFIED STYLES --- */

/* Modal Order Details Styling */
.modal-body .woocommerce-order-details,
.modal-body .woocommerce-customer-details {
    margin-bottom: 25px;
}

.modal-body h2 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--dash-text-dark);
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--dash-border-color);
}

.modal-body .shop_table {
    width: 100%;
    border-collapse: collapse;
    font-size: .95rem;
    border: 1px solid var(--dash-border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: none;
}

.modal-body .shop_table th,
.modal-body .shop_table td {
    text-align: left;
    padding: 12px 15px;
    border: none;
    border-bottom: 1px solid var(--dash-border-color);
    background: none;
    vertical-align: middle;
}

.modal-body .shop_table thead th {
    background-color: var(--dash-background-green);
    color: var(--dash-text-dark);
    font-weight: 600;
}

.modal-body .shop_table tbody tr:last-child td {
    border-bottom: none;
}

.modal-body .shop_table .wc-item-meta {
    margin-top: 8px;
    padding-left: 0;
    list-style: none;
}

.modal-body .shop_table .wc-item-meta li {
    display: block;
    font-size: 0.9em;
    color: var(--dash-text-light);
    line-height: 1.5;
}

.modal-body .shop_table .wc-item-meta p {
    margin: 0;
}

.modal-body .shop_table .wc-item-meta strong {
    color: var(--dash-text-dark);
    font-weight: 500;
    margin-right: 5px;
}

.modal-body .shop_table tfoot td,
.modal-body .shop_table tfoot th {
    font-weight: 600;
    border-top: 2px solid var(--dash-primary-green);
    color: var(--dash-text-dark);
}

.modal-body .woocommerce-customer-details address {
    border: 1px solid var(--dash-border-color);
    padding: 15px;
    border-radius: 8px;
    background: var(--dash-background-green);
    line-height: 1.6;
    margin: 0;
}

.modal-body .woocommerce-customer-details h2 {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 10px;
}

/* Invoices Tab Styling */
#orders-content .woocommerce-orders-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    border: 1px solid var(--dash-border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: none;
}

#orders-content .woocommerce-orders-table th, 
#orders-content .woocommerce-orders-table td {
    text-align: left;
    padding: 15px;
    border-bottom: 1px solid var(--dash-border-color);
    font-size: .95rem;
    background: #fff;
    vertical-align: middle;
}

#orders-content .woocommerce-orders-table th {
    color: var(--dash-text-dark);
    font-weight: 600;
    background-color: var(--dash-background-green);
}

#orders-content .woocommerce-orders-table tr:last-child td {
    border-bottom: none;
}

#orders-content .woocommerce-orders-table__cell-order-number a {
    text-decoration: none;
    color: var(--dash-text-dark);
    font-weight: 600;
}

#orders-content .woocommerce-orders-table__cell-actions .woocommerce-button.view {
    display: none !important;
}

/* Address & Account Forms Styling */
.dash-tab-content h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--dash-text-dark);
}

.dash-tab-content form .woocommerce-address-fields__field-wrapper {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 20px;
}

.dash-tab-content form .form-row {
    margin-bottom: 15px;
}

.dash-tab-content form .form-row-first,
.dash-tab-content form .form-row-last {
    width: 100%;
    float: none;
    clear: none;
}

.dash-tab-content form .form-row-wide {
    grid-column: 1 / -1;
}

.dash-tab-content form select,
.dash-tab-content .select2-container .select2-selection--single {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 12px 15px;
    width: 100%;
    font-size: .95rem;
    transition: border-color .3s ease, box-shadow .3s ease;
    height: 47px !important;
    box-sizing: border-box;
}

.dash-tab-content .select2-container--default .select2-selection--single {
    padding: 6px 15px;
}

.dash-tab-content form select:focus,
.dash-tab-content .select2-container .select2-selection--single:focus {
    outline: none;
    border-color: var(--dash-primary-green);
    box-shadow: 0 0 0 3px rgba(61,122,87,.15);
}

.dash-tab-content .select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 45px !important;
    right: 5px !important;
}

.dash-tab-content .woocommerce-password-strength {
    margin: 5px 0 15px;
    text-align: right;
    font-size: 0.85rem;
}

.dash-tab-content .woocommerce-password-hint {
    margin: 5px 0 0;
    font-size: 0.85rem;
    color: var(--dash-text-light);
}

.account-leaf-image {
    width: 64px;
    height: 64px;
}

/* --- Chart Tooltip Styles --- */
.chart-tooltip {
    position: absolute;
    display: none;
    background-color: #333;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 999;
    pointer-events: none; /* Zorgt ervoor dat de tooltip de muis-events niet blokkeert */
    white-space: nowrap;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.chart-container .chart-dot {
    cursor: pointer;
    transition: r 0.2s ease-in-out;
}

.chart-container .chart-dot:hover {
    r: 6; /* Maakt het puntje groter bij hover voor betere feedback */
}

.chart-container {
    position: relative; /* Essentieel voor de positionering van de tooltip */
}


/* --- END OF ADDED/MODIFIED STYLES --- */

@media (max-width: 992px) {
    .main-content-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 768px) {
    .dash-tab-content form .woocommerce-address-fields__field-wrapper {
        grid-template-columns: 1fr;
        gap: 0;
    }
}
@media (max-width: 600px) {
    .dash-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .modal-content {
        padding: 20px;
    }
    .dash-tab-content {
        padding: 20px;
    }
}