:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --text-primary: #212529;
    --text-secondary: #6c757d;
    --border-color: #dee2e6;
    --card-bg: #ffffff;
    --navbar-bg: #343a40;
    --navbar-text: #ffffff;
    --table-header-bg: #343a40;
    --table-header-text: #ffffff;
    --input-bg: #ffffff;
    --input-border: #ced4da;
    --shadow-color: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --text-primary: #ffffff;
    --text-secondary: #b3b3b3;
    --border-color: #404040;
    --card-bg: #2d2d2d;
    --navbar-bg: #000000;
    --navbar-text: #ffffff;
    --table-header-bg: #404040;
    --table-header-text: #ffffff;
    --input-bg: #404040;
    --input-border: #666666;
    --shadow-color: rgba(255, 255, 255, 0.1);
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color 0.3s ease, color 0.3s ease;
}

.navbar {
    background-color: var(--navbar-bg) !important;
}

.navbar-brand, .navbar-nav .nav-link {
    color: var(--navbar-text) !important;
}

.card {
    background-color: var(--card-bg);
    border-color: var(--border-color);
    box-shadow: 0 4px 6px var(--shadow-color);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.table {
    background-color: var(--card-bg);
    color: var(--text-primary);
}

.table th {
    background-color: var(--table-header-bg);
    color: var(--table-header-text);
    border-color: var(--border-color);
}

.table td {
    border-color: var(--border-color);
    color: var(--text-primary);
}

.form-control {
    background-color: var(--input-bg);
    border-color: var(--input-border);
    color: var(--text-primary);
}

.form-control:focus {
    background-color: var(--input-bg);
    border-color: #007bff;
    color: var(--text-primary);
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.form-label {
    color: var(--text-primary);
}

.btn-outline-secondary {
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-outline-secondary:hover {
    background-color: var(--border-color);
    color: var(--text-primary);
}

#themeToggle {
    background: none;
    border: none;
    color: var(--navbar-text);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.25rem;
    transition: background-color 0.3s ease;
}

#themeToggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
}

.table-responsive {
    overflow-x: auto;
    max-width: 100%;
}

.table th {
    white-space: nowrap;
}

.table td:empty {
    opacity: 0.5;
}

.table td {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.form-label {
    font-weight: 500;
}

textarea.form-control {
    min-height: 120px;
}
pre {
    white-space: pre-wrap;
    word-wrap: break-word;
}

.action-buttons .btn {
    margin-right: 5px;
}

.card {
    height: 100%;
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.card:hover {
    box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15);
}

.nav-tabs .nav-link {
    font-weight: 500;
}

.active-table {
    border-left: 5px solid #007bff;
    padding-left: 10px;
}
.test-sender-card {
    transition: none;
}

.test-sender-card:hover {
    transform: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Добавьте эти стили в конец файла */
.btn-success {
    background-color: #28a745;
    border-color: #28a745;
}

.btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

.table .action-buttons .btn {
    margin-right: 3px;
    margin-bottom: 3px;
}

.table .action-buttons {
    min-width: 180px; 
}

@media (max-width: 768px) {
    .table .action-buttons {
        display: flex;
        flex-wrap: wrap;
    }
}

.test-result-container {
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.1);
    margin-top: 20px;
}

.test-result-header {
    padding: 12px 15px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.test-result-success {
    background-color: rgba(40, 167, 69, 0.1);
}

.test-result-error {
    background-color: rgba(220, 53, 69, 0.1);
}

.test-result-body {
    padding: 15px;
    max-height: 400px;
    overflow-y: auto;
}

.test-result-body pre {
    background-color: rgba(0,0,0,0.03);
    padding: 15px;
    border-radius: 4px;
    margin: 0;
}

.field-group {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 8px;
    background-color: rgba(0,0,0,0.02);
}

.field-group-title {
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0,0,0,0.1);
    font-weight: 600;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

.loading-indicator {
    animation: pulse 1.5s infinite ease-in-out;
}

.email-list {
    margin-top: 5px;
}

.email-badge {
    display: inline-block;
    background-color: #f0f8ff;
    color: #0d6efd;
    border: 1px solid #0d6efd;
    border-radius: 3px;
    padding: 2px 8px;
    margin-right: 5px;
    margin-bottom: 5px;
    font-size: 0.8em;
}

.email-tag {
    padding: 0.3em 0.6em;
    font-size: 0.75em;
    background-color: rgba(13, 110, 253, 0.1);
    border-radius: 4px;
    margin-right: 0.5em;
    display: inline-block;
    margin-bottom: 0.5em;
}

.search-highlight {
    background-color: rgba(255, 238, 88, 0.3);
    padding: 0 2px;
    border-radius: 3px;
}

.search-results-card {
    margin-bottom: 20px;
    border-left: 5px solid #0d6efd;
}

.search-results-card .card-header {
    font-weight: 500;
}

.search-count {
    font-size: 1.1em;
    margin-bottom: 15px;
}

.search-count .badge {
    font-size: 1em;
    vertical-align: middle;
}

.floating-save-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.floating-save-button .btn {
    padding: 12px 24px;
    font-weight: 500;
}