.tab-content {
    margin-top: 20px;
}

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

.modal-content {
    background-color: #fefefe;
    margin: 30px auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    position: relative;
    max-height: 85vh;
    overflow-y: auto;
}

.close {
    position: absolute;
    right: 10px;
    top: 5px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #666;
} 

.current-page {
    background-color: #0073aa;
    color: #fff;
    border-color: #0073aa;
    padding: 4px 8px;
    text-decoration: none;
    border-radius: 3px;
    font-weight: 600;
}

.current-page:hover {
    background-color: #005177;
    color: #fff;
    border-color: #005177;
}

/* Filters section */
.smooth-smtp-filters {
    background: #fff;
    padding: 20px;
    border: 1px solid #ccd0d4;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
    margin: 20px 0;
}

.smooth-smtp-filters form {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.smooth-smtp-filters label {
    margin-right: 8px;
    margin-bottom: 0;
}

.smooth-smtp-filters input[type="text"],
.smooth-smtp-filters select {
    padding: 6px 10px;
    border: 1px solid #8c8f94;
    border-radius: 3px;
    height: 32px;
    line-height: 20px;
}

.smooth-smtp-filters input[type="text"]:focus,
.smooth-smtp-filters select:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: 2px solid transparent;
}

/* Bulk actions */
.smooth-smtp-bulk-actions {
    margin: 15px 0;
    padding: 10px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.smooth-smtp-bulk-actions select {
    padding: 6px 24px 6px 10px;
    border: 1px solid #8c8f94;
    border-radius: 3px;
    min-width: 150px;
    height: 32px;
    line-height: 20px;
    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='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 12px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.smooth-smtp-bulk-actions select:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: 2px solid transparent;
}

.smooth-smtp-bulk-actions button {
    height: 32px;
    padding: 0 12px;
}

.smooth-smtp-bulk-actions button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Status badges */
.smooth-smtp-status {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.smooth-smtp-status-success {
    background-color: #00a32a;
    color: #fff;
}

.smooth-smtp-status-failed {
    background-color: #d63638;
    color: #fff;
}

/* Checkbox column */
.check-column {
    width: 2.2em;
    padding: 11px 0 0 3px;
}

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

/* Table improvements */
.wp-list-table th.check-column,
.wp-list-table td.check-column {
    padding-left: 8px;
}

/* Page wrapper spacing */
.wrap h1 {
    margin-bottom: 20px;
}

/* Better spacing for delete all button */
.wrap > p {
    margin-top: 20px;
    padding-top: 15px;
}

/* Pagination */
.smooth-smtp-pagination {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
}

.smooth-smtp-pagination .button.disabled {
    opacity: 0.4;
    pointer-events: none;
}

.smooth-smtp-page-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.smooth-smtp-page-info input[type="number"] {
    padding: 3px 6px;
    border: 1px solid #8c8f94;
    border-radius: 3px;
}

/* Migration notice */
.smooth-smtp-migration-notice {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* Alert channels */
.smooth-smtp-alert-channel {
    background: #fff;
    border: 1px solid #ccd0d4;
    padding: 0 16px 8px;
    margin-bottom: 16px;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
}

.smooth-smtp-channel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0 0;
}

.smooth-smtp-remove-channel {
    font-size: 20px;
    color: #b32d2e;
    cursor: pointer;
    text-decoration: none;
    line-height: 1;
    padding: 0 4px;
}

.smooth-smtp-remove-channel:hover {
    color: #a00;
}

.smooth-smtp-alert-channel hr {
    margin: 0;
}

.smooth-smtp-alert-channel .form-table th {
    width: 120px;
    padding: 10px 10px 10px 0;
}

.smooth-smtp-alert-channel .form-table td {
    padding: 10px 0;
}

/* ── Dashboard ─────────────────────────────────────── */
.smooth-smtp-period-filter {
    margin: 16px 0 24px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.smooth-smtp-stat-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

@media (max-width: 1100px) {
    .smooth-smtp-stat-cards { grid-template-columns: repeat(2, 1fr); }
}

.smooth-smtp-stat-card {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    padding: 24px 20px 20px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    position: relative;
    overflow: hidden;
}

.smooth-smtp-stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--card-accent, #0073aa);
}

.smooth-smtp-stat-card--total  { --card-accent: #0073aa; }
.smooth-smtp-stat-card--sent   { --card-accent: #00a32a; }
.smooth-smtp-stat-card--failed { --card-accent: #d63638; }
.smooth-smtp-stat-card--rate   { --card-accent: var(--rate-color, #dba617); }

.smooth-smtp-stat-icon {
    font-size: 22px;
    line-height: 1;
    margin-bottom: 10px;
    opacity: .7;
}

.smooth-smtp-stat-number {
    font-size: 40px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -1px;
}

.smooth-smtp-stat-label {
    font-size: 11px;
    color: #787c82;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-top: 8px;
    font-weight: 500;
}

.smooth-smtp-rate-bar-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.smooth-smtp-rate-bar-track {
    flex: 1;
    height: 8px;
    background: #f0f0f1;
    border-radius: 4px;
    overflow: hidden;
}

.smooth-smtp-rate-bar {
    height: 100%;
    border-radius: 4px;
    transition: width .3s ease;
}

.smooth-smtp-rate-label {
    font-size: 12px;
    font-weight: 600;
    min-width: 36px;
    text-align: right;
}

.smooth-smtp-breakdown-table td,
.smooth-smtp-breakdown-table th {
    vertical-align: middle;
}

.smooth-smtp-section-title {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #50575e;
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #dcdcde;
}
