.table-dashboard {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    /* margin-bottom: 2rem; */
    overflow: hidden;
    padding: 1rem;
}

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

.table-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.table-setup {
    font-size: 0.9rem;
    color: #64748b;
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.table-actions .export-btn {
    /* display: inline-flex; */
    display: none;
    /* Hide export button for now */
    align-items: center;
    gap: 0.45rem;
    padding: 0.5rem 0.75rem;
}

.table-actions .export-btn i {
    width: 18px;
    height: 18px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: #0f172a;
    color: white;
    border: none;
}

.btn-outline-primary {
    background-color: transparent;
    color: #0f172a;
    border: 1px solid #cbd5e1;
}

.btn-icon {
    padding: 0.25rem;
    border: none;
    background: transparent;
    color: #64748b;
    border-radius: 4px;
}

.btn-icon:hover {
    background-color: #f1f5f9;
    color: #0f172a;
}

/* Search Bar */
.search-bar {
    position: relative;
    width: 300px;
}

.search-bar input {
    width: 100%;
    padding: 0.75rem 1rem;
    padding-right: 3rem;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 0.875rem;
    transition: all 0.2s;
    background-color: #f8fafc;
}

.search-bar input:focus {
    outline: none;
    border-color: #94a3b8;
    box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.1);
    background-color: #fff;
}

.search-button {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: #64748b;
    cursor: pointer;
    transition: color 0.2s;
}

.search-button:hover {
    color: #0f172a;
}

/* Table styling with sticky header */
.table-wrapper {
    overflow-x: auto;
    /* height: calc(100vh - 450px); */
    max-height: 53vh;
    position: relative;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    white-space: nowrap;
}

.table thead {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #f8fafc;
}

/* Remove all borders and separators */
.table td,
.table th {
    border: none;
    padding: 0.93rem;
}

/* Remove any existing separator lines */
.table tr::after,
.table td::after,
.table th::after {
    display: none;
}

/* Ensure no borders on the last row */
.table tr:last-child td {
    border-bottom: none;
}

/* Add subtle hover effect for rows to help with visual separation */
.table-row:hover {
    background-color: #f8fafc;
}

.info-icon {
    width: 16px;
    height: 16px;
    color: #94a3b8;
    margin-left: 4px;
    vertical-align: middle;
}

.table-row {
    cursor: pointer;
    transition: background-color 0.2s;
}

/* Status Badge */
.status-badge {
    display: inline-flex;
    padding: 0.25rem 2rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-badge.active {
    background-color: #ecfdf5;
    color: #059669;
}

.status-badge.inactive {
    background-color: #f1f5f9;
    color: #64748b;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .4s;
    border-radius: 34px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.toggle-slider {
    background-color: #059669;
}

input:checked+.toggle-slider:before {
    transform: translateX(16px);
}

/* No results styling */
.no-results-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem 0;
    color: #94a3b8;
}

.no-results-content i {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.no-results-content .btn {
    margin-top: 1rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .table-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .table-actions {
        width: 100%;
    }

    .search-bar {
        width: 100%;
    }
}

.center-content {
    text-align: center;
}

.status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.icon-success {
    color: #059669;
    width: 20px;
    height: 20px;
}

.icon-danger {
    color: #e11d48;
    width: 20px;
    height: 20px;
}

/* Checkbox column */
.checkbox-column {
    width: 40px;
    text-align: center;
}

/* Custom checkbox styling */
.checkbox-container {
    display: block;
    position: relative;
    padding-left: 25px;
    cursor: pointer;
    user-select: none;
    height: 20px;
    width: 20px;
    margin: 0 auto;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 18px;
    width: 18px;
    background-color: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 3px;
    transition: all 0.2s;
}

.checkbox-container:hover input~.checkmark {
    background-color: #e2e8f0;
}

.checkbox-container input:checked~.checkmark {
    background-color: #0f172a;
    border-color: #0f172a;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked~.checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 6px;
    top: 1px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Action buttons */
.table-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Disabled button styles */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Search bar positioning */
.search-bar {
    margin-left: 0.5rem;
}

/* Responsive adjustments for the new layout */
@media (max-width: 992px) {
    .table-actions {
        flex-wrap: wrap;
    }

    .search-bar {
        order: -1;
        margin-left: 0;
        margin-bottom: 0.75rem;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .table-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .table-actions {
        width: 100%;
    }
}

/* Add the separator line for headers that doesn't touch both ends */
.table thead th::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 1rem;
    right: 1rem;
    height: 1px;
    background-color: #e2e8f0;
}

/* Empty state container */
.empty-state-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    background-color: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    text-align: center;
    min-height: 200px;
}

.empty-state-container i {
    color: #94a3b8;
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
}

.empty-state-container p {
    color: #64748b;
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.empty-state-container .btn {
    margin-top: 0.5rem;
}

.export-range-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 0.5rem;
}

.export-range-form .form-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.export-range-form label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #475569;
}

.export-range-form input[type="date"] {
    padding: 0.7rem 0.9rem;
    border: 1px solid #d9dfe7;
    border-radius: 10px;
    font-size: 0.95rem;
    color: #0f172a;
    background-color: #fff;
}

.export-range-form input[type="date"]:focus {
    border-color: #3b82f6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Name server styling */
.name-server-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.name-server-item {
    display: inline-block;
    font-size: 0.8125rem;
    color: #475569;
    background-color: #f8fafc;
    border-radius: 4px;
    padding: 2px 6px;
    max-width: fit-content;
}

/* Filter bar styling */
.filter-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.6rem !important;
    padding: 0.75rem 1rem;
    background-color: #f8fafc;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.filter-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #64748b;
    font-weight: 500;
    font-size: 0.875rem;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    flex-grow: 1;
}

/* Filter group styling with separators */
.filter-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    position: relative;
    padding-right: 1rem;
    margin-right: 0.5rem;
}

/* Add subtle separator line after each filter group */
.filter-group:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 24px;
    /* Adjust height as needed */
    width: 1px;
    background-color: #e2e8f0;
    /* Light gray color matching the design system */
}

/* Ensure the clear filters button doesn't get a separator */
.filter-buttons>div:last-child {
    padding-right: 0;
    margin-right: 0;
}

.filter-buttons>div:last-child::after {
    display: none;
}

.filter-group-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
}

.filter-btn {
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    background-color: #fff;
    color: #64748b;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn:hover {
    background-color: #f1f5f9;
    color: #334155;
}

.filter-btn.active {
    background-color: #313d59;
    color: #fff;
    border-color: #313d59;
}

.clear-filters-btn {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    background-color: #fff;
    color: #ef4444;
    border: 1px solid #fecaca;
    cursor: pointer;
    transition: all 0.2s;
}

.clear-filters-btn:hover {
    background-color: #fef2f2;
}

.clear-filters-btn i {
    width: 14px;
    height: 14px;
}

/* Filter count badge - positioned in the top-right corner of the clear filters button */
.filter-count-badge {
    position: absolute;
    top: -7px;
    right: -17px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    background-color: #0f172a;
    color: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    z-index: 1;
}

/* Responsive adjustments for filter bar */
@media (max-width: 992px) {
    .filter-bar {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-buttons {
        width: 100%;
    }

    .filter-group {
        margin-bottom: 0.5rem;
    }

    .clear-filters-btn {
        margin-top: 0.5rem;
        align-self: flex-start;
    }
}

/* Add animation for filter changes */
.table-row {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.table-row.filtered-out {
    display: none;
}

.table-row.filtered-in {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Filter count badge - standalone positioning */
.filter-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 21px;
    height: 21px;
    padding: 0 6px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    background-color: #0f172a;
    color: #fff;
    margin-right: 0.5rem;
}

/* Make sure the filter bar has proper alignment for the badge */
.filter-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding: 0.75rem 1rem;
    background-color: #f8fafc;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

/* Selection counter styling */
.selection-counter {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.selection-counter.active {
    transform: translateX(-50%) translateY(0);
}

.selection-counter-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background-color: #313d59;
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.selection-count {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background-color: #ffffff;
    color: #0f172a;
    border-radius: 50%;
    font-weight: 600;
    font-size: 0.875rem;
}

.selection-text {
    font-size: 0.875rem;
    font-weight: 500;
}


/* Selection counter badge in filter bar */
.selection-counter-badge {
    display: flex;
    align-items: center;
    padding: 0.375rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
    background-color: #313d59;
    color: #fff;
    cursor: pointer;
    transition: all 0.2s;
    margin-right: 0.5rem;
    animation: fadeIn 0.3s ease;
}

.selection-counter-badge:hover {
    background-color: #1e293b;
}

.selection-counter-badge span {
    white-space: nowrap;
}

/* Make sure the filter bar has proper alignment for the badges */
.filter-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding: 0.75rem 1rem;
    background-color: #f8fafc;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

/* Action column styling */
.action-column {
    width: 80px;
    text-align: center;
    padding: 0.5rem !important;
}

.action-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    padding: 8px;
    /* border: 1px solid #e2e8f0; */
    border-radius: 27px;
    border: none;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Action icon sizing */
.action-btn .action-icon {
    width: 20px !important;
    height: 20px !important;
    stroke-width: 2px !important;
}

/* Hover states */
.action-btn:hover:not(.disabled) {
    background-color: #f1f5f9;
    color: #0f172a;
}

.action-btn.delete-btn:hover:not(.disabled) {
    background-color: #fef2f2;
    color: #ef4444;
    border-color: #fecaca;
}

/* Disabled state */
.action-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Loading state for action buttons */
.action-btn.loading {
    pointer-events: none;
    position: relative;
    background-color: #f1f5f9 !important;
    color: #3b82f6 !important;
}

.action-btn.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 35px;
    height: 35px;
    margin-top: -17.5px;
    margin-left: -17.5px;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1;
}

.action-btn.loading .action-icon {
    opacity: 0.3;
}

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

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

/* Tooltip for disabled buttons */
.action-btn.disabled::after {
    content: "Action not available";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.5rem;
    background-color: #1e293b;
    color: white;
    font-size: 0.75rem;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.action-btn.disabled:hover::after {
    opacity: 1;
}

.filter-actions-group {
    display: flex;
    align-items: center;
    gap: 5rem;
    /* Adjust as needed */
}

/* Transaction type and mailbox email alignment */
.transaction-type,
.mailbox-email {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.transaction-type svg,
.mailbox-email svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6e829e;
}

.transaction-type span,
.mailbox-email span {
    display: flex;
    align-items: center;
    line-height: 1.5;
}