/* Rivox AI - Управление Metrica ID - Единая стилистика с основным сайтом */

@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');

/* === ОСНОВА === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -webkit-text-size-adjust: none;
    -moz-text-size-adjust: none;
    -ms-text-size-adjust: none;
    text-rendering: optimizeLegibility;
}

html {
    font-size: 62.5%; /* 1rem = 10px */
}

body {
    position: relative;
    font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-optical-sizing: auto;
    -webkit-font-smoothing: subpixel-antialiased !important;
    font-style: normal;
    font-weight: 400;
    background: #f4f4f4;
    color: #1a1a1a;
    line-height: 1.6;
    font-size: 1.6rem;
}

body ::selection {
    color: #1a1a1a;
    background-color: #d6ff2f;
}

/* === ОСНОВНЫЕ СТИЛИ === */
.container {
    width: 100%;
    max-width: none; /* 🚀 Убираем ограничение ширины */
    margin: 0 auto;
    padding: 0 3rem; /* 🚀 Уменьшаем боковые отступы */
}

@media (max-width: 576px) {
    .container {
        padding: 0 15px;
    }
}

/* === ЗАГОЛОВОК === */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    padding: 3rem 4rem; /* 🚀 Уменьшили отступы */
    margin-bottom: 4rem;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

@media (max-width: 576px) {
    .header {
        padding: 30px 20px;
        border-radius: 20px;
        margin-bottom: 30px;
    }
}

.header-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 0;
}

@media (max-width: 576px) {
    .header-logo {
        gap: 15px;
    }
}

.logo {
    width: 6rem;
    height: 6rem;
    border-radius: 12px;
    /* 🎨 Убрали box-shadow чтобы убрать обводку вокруг логотипа */
    object-fit: contain;
}

@media (max-width: 576px) {
    .logo {
        width: 40px;
        height: 40px;
        border-radius: 8px;
    }
}

.header-text {
    text-align: left;
}

.header h1 {
    font-size: 3.2rem;
    color: #1a1a1a;
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.2;
}

@media (max-width: 576px) {
    .header h1 {
        font-size: 24px;
        margin-bottom: 8px;
    }
}

.subtitle {
    color: #888;
    font-size: 1.8rem;
    margin-bottom: 0;
    font-weight: 400;
}

@media (max-width: 576px) {
    .subtitle {
        font-size: 14px;
    }
}



/* === МОДАЛЬНЫЕ ОКНА === */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 30px;
    width: 90%;
    max-width: 800px; /* 🚀 Увеличили максимальную ширину с 500px */
    max-height: 90vh; /* 🚀 Максимальная высота 90% экрана */
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    animation: modalSlideIn 0.3s ease-out;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* === СТРУКТУРА МОДАЛЬНОГО ОКНА === */

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3rem 4rem 2rem 4rem;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0; /* Заголовок не сжимается */
}

.modal-header h2 {
    margin: 0;
    color: #1a1a1a;
    font-size: 2.4rem;
    font-weight: 700;
}

.close {
    color: #999;
    float: right;
    font-size: 2.8rem;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    line-height: 1;
    transition: color 0.3s ease;
}

.close:hover,
.close:focus {
    color: #666;
    text-decoration: none;
}

.modal-body {
    padding: 2rem 4rem;
    overflow-y: auto; /* 🚀 Добавляем скролл */
    flex: 1; /* Занимает оставшееся место */
    max-height: calc(90vh - 200px); /* Учитываем заголовок и подвал */
}

.modal-footer {
    display: flex;
    gap: 1.5rem;
    justify-content: flex-end;
    padding: 2rem 4rem 3rem 4rem;
    border-top: 1px solid #e2e8f0;
    flex-shrink: 0; /* Подвал не сжимается */
    background: #f8f9fa;
    border-radius: 0 0 30px 30px;
}

@media (max-width: 576px) {
    .modal-content {
        border-radius: 20px;
        margin: 2% auto;
        max-height: 95vh;
    }
    
    .modal-header {
        padding: 2rem 2rem 1.5rem 2rem;
    }
    
    .modal-header h2 {
        font-size: 2rem;
    }
    
    .modal-body {
        padding: 1.5rem 2rem;
        max-height: calc(95vh - 150px);
    }
    
    .modal-footer {
        padding: 1.5rem 2rem 2rem 2rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .close {
        font-size: 2.4rem;
    }
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Стили для заголовков модальных окон теперь в .modal-header h2 */

/* === СТАТИСТИКА === */
.stats-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

@media (max-width: 576px) {
    .stats-panel {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin-bottom: 30px;
    }
}

.stat-item {
    background: white;
    padding: 3rem 2.5rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

@media (max-width: 576px) {
    .stat-item {
        padding: 20px 15px;
        border-radius: 12px;
    }
}

.stat-label {
    display: block;
    font-size: 1.4rem;
    color: #888;
    margin-bottom: 1rem;
    font-weight: 500;
}

@media (max-width: 576px) {
    .stat-label {
        font-size: 12px;
        margin-bottom: 8px;
    }
}

.stat-value {
    display: block;
    font-size: 3.2rem;
    font-weight: 800;
    color: #6b2cff;
    line-height: 1;
}

@media (max-width: 576px) {
    .stat-value {
        font-size: 24px;
    }
}

/* === СЕКЦИИ === */
.section {
    background: white;
    border-radius: 30px;
    padding: 3rem 4rem; /* 🚀 Уменьшили внутренние отступы */
    margin-bottom: 4rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

@media (max-width: 576px) {
    .section {
        padding: 30px 20px;
        border-radius: 20px;
        margin-bottom: 30px;
    }
}

.section h2 {
    color: #1a1a1a;
    margin-bottom: 3rem;
    font-size: 2.8rem;
    font-weight: 700;
    line-height: 1.3;
}

@media (max-width: 576px) {
    .section h2 {
        font-size: 22px;
        margin-bottom: 20px;
    }
}

/* === ТАБЛИЦА === */
.table-container {
    overflow-x: auto;
    border-radius: 15px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    min-width: 100%; /* 🚀 Используем всю доступную ширину */
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 15px;
    overflow: hidden;
}

th {
    background: linear-gradient(135deg, #6b2cff, #8b44ff);
    color: white;
    padding: 2rem 1.5rem;
    text-align: left;
    font-weight: 600;
    font-size: 1.4rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (max-width: 576px) {
    th {
        padding: 15px 10px;
        font-size: 12px;
    }
}

td {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
    font-size: 1.5rem;
}

@media (max-width: 576px) {
    td {
        padding: 15px 10px;
        font-size: 13px;
    }
}

tr:hover {
    background: #f9fafb;
}

.counter-ids {
    font-family: 'Monaco', 'Menlo', monospace;
    background: #f4f4f4;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 1.3rem;
    color: #6b2cff;
    font-weight: 500;
}

.multiple-counters {
    background: #e8f5d0;
    color: #2d5016;
}

.empty-state {
    text-align: center;
    padding: 8rem 2rem;
    color: #888;
    font-size: 1.8rem;
}

@media (max-width: 576px) {
    .empty-state {
        padding: 60px 20px;
        font-size: 16px;
    }
}

/* === ФОРМЫ === */
.client-form {
    max-width: none; /* 🚀 Убираем ограничение ширины формы */
    width: 100%; /* 🚀 Используем всю доступную ширину */
}

.form-group {
    margin-bottom: 3rem;
}

@media (max-width: 576px) {
    .form-group {
        margin-bottom: 20px;
    }
}

label {
    display: block;
    margin-bottom: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    font-size: 1.6rem;
}

@media (max-width: 576px) {
    label {
        font-size: 14px;
        margin-bottom: 8px;
    }
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="password"],
input[type="date"],
input[type="datetime-local"] {
    width: 100%;
    padding: 1.5rem 2rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1.6rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: white;
    font-family: inherit;
}

/* Убираем стрелочки у number input */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

/* === CLIENT TOKEN INPUT === */
.client-token-input {
    display: flex;
    align-items: center;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: white;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.client-token-input:focus-within {
    border-color: #6b2cff;
    box-shadow: 0 0 0 3px rgba(107, 44, 255, 0.1);
}

.token-prefix {
    background: #f4f4f4;
    color: #888;
    padding: 1.5rem 1.2rem;
    font-size: 1.6rem;
    font-weight: 600;
    border-right: 1px solid #e2e8f0;
    white-space: nowrap;
    user-select: none;
}

.client-token-input input[type="text"] {
    border: none;
    border-radius: 0;
    flex: 1;
    background: transparent;
    margin: 0;
    padding: 1.5rem 2rem;
}

.client-token-input input[type="text"]:focus {
    outline: none;
    border: none;
    box-shadow: none;
}

@media (max-width: 576px) {
    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="url"],
    input[type="number"],
    input[type="password"],
    input[type="date"],
    input[type="datetime-local"] {
        padding: 12px 16px;
        font-size: 14px;
        border-radius: 8px;
    }

    .client-token-input {
        border-radius: 8px;
    }

    .token-prefix {
        padding: 12px 10px;
        font-size: 14px;
    }

    .client-token-input input[type="text"] {
        padding: 12px 16px;
        font-size: 14px;
    }
}

input:focus {
    outline: none;
    border-color: #6b2cff;
    box-shadow: 0 0 0 3px rgba(107, 44, 255, 0.1);
}

/* Стили для заблокированных полей */
input:disabled,
input[disabled] {
    background: #f8f9fa !important;
    color: #6c757d !important;
    border-color: #e9ecef !important;
    cursor: not-allowed !important;
    opacity: 0.7;
}

input:disabled::placeholder,
input[disabled]::placeholder {
    color: #adb5bd !important;
}

.help-text {
    display: block;
    margin-top: 8px;
    font-size: 1.3rem;
    color: #888;
    font-style: italic;
    line-height: 1.4;
}

@media (max-width: 576px) {
    .help-text {
        font-size: 12px;
        margin-top: 5px;
    }
}

/* === РАДИО ГРУППЫ === */
.radio-group {
    display: flex;
    gap: 3rem;
    margin-top: 1rem;
}

@media (max-width: 576px) {
    .radio-group {
        gap: 20px;
        flex-direction: column;
    }
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
    font-size: 1.6rem;
    color: #1a1a1a;
}

@media (max-width: 576px) {
    .radio-label {
        font-size: 14px;
    }
}

.radio-label input[type="radio"] {
    margin-right: 1rem;
    width: auto;
    transform: scale(1.2);
    accent-color: #6b2cff;
}

/* === МНОЖЕСТВЕННЫЕ СЧЕТЧИКИ === */
.counter-id-row {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 576px) {
    .counter-id-row {
        gap: 10px;
        margin-bottom: 10px;
    }
}

.counter-id-input {
    flex: 1;
}

.remove-counter-btn {
    background: white;
    color: #888;
    border: 2px solid #e2e8f0;
    padding: 1.2rem 1.6rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.4rem;
    font-weight: 600;
    transition: all 0.3s ease;
    min-width: auto;
}

.remove-counter-btn:hover {
    background: #f9fafb;
    border-color: #cbd5e0;
    color: #e53e3e;
    transform: scale(1.05);
}

@media (max-width: 576px) {
    .remove-counter-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
}

.add-counter-btn {
    background: #6b2cff;
    color: white;
    border: none;
    padding: 1.4rem 2.4rem;
    border-radius: 60px;
    cursor: pointer;
    font-size: 1.6rem;
    font-weight: 600;
    margin-top: 1.5rem;
    transition: all 0.3s ease;
}

.add-counter-btn:hover {
    background: #5320c9;
    transform: scale(1.02);
}

@media (max-width: 576px) {
    .add-counter-btn {
        padding: 12px 20px;
        font-size: 14px;
        margin-top: 10px;
    }
}

/* === КНОПКИ === */
.form-actions {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 4rem;
    align-items: center;
}

@media (max-width: 576px) {
    .form-actions {
        gap: 10px;
        margin-top: 30px;
    }
}

button {
    padding: 1.6rem 3.2rem;
    border: none;
    border-radius: 60px;
    font-size: 1.6rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: none;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

@media (max-width: 576px) {
    button {
        padding: 12px 24px;
        font-size: 14px;
    }
}

.save-btn {
    background: #d6ff2f;
    color: #1a1a1a;
}

.save-btn:hover {
    background: #c5f01e;
    transform: scale(1.02);
}

.cancel-btn {
    background: #f4f4f4;
    color: #888;
}

.cancel-btn:hover {
    background: #e5e5e5;
    color: #1a1a1a;
}

.refresh-btn {
    background: #6b2cff;
    color: white;
}

.refresh-btn:hover {
    background: #5320c9;
    transform: scale(1.02);
}

.delete-btn {
    background: #e53e3e;
    color: white;
}

.delete-btn:hover {
    background: #c53030;
    transform: scale(1.02);
}

.edit-btn {
    background: #f4f4f4;
    color: #1a1a1a;
    border: 1px solid #e2e8f0;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 1rem;
}

.edit-btn:hover {
    background: #e5e5e5;
    border-color: #cbd5e0;
    transform: scale(1.05);
}

@media (max-width: 576px) {
    .edit-btn {
        padding: 8px 16px;
        font-size: 12px;
        margin-right: 8px;
    }
}

.delete-client-btn {
    background: #ef4444;
    color: white;
    border: 1px solid #dc2626;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.delete-client-btn:hover {
    background: #dc2626;
    border-color: #b91c1c;
    transform: scale(1.05);
}

@media (max-width: 576px) {
    .delete-client-btn {
        padding: 8px 16px;
        font-size: 12px;
    }
}

/* === УВЕДОМЛЕНИЯ === */
#notifications {
    position: fixed;
    top: 2rem;
    right: 2rem;
    z-index: 1001;
    max-width: 400px;
}

@media (max-width: 576px) {
    #notifications {
        top: 15px;
        right: 15px;
        left: 15px;
        max-width: none;
    }
}

.notification {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    border-left: 4px solid #d6ff2f;
    animation: slideInRight 0.3s ease-out;
}

.notification.error {
    border-left-color: #e53e3e;
}

.notification.warning {
    border-left-color: #ed8936;
}

.notification.success {
    border-left-color: #d6ff2f;
}

@media (max-width: 576px) {
    .notification {
        padding: 15px;
        border-radius: 12px;
        margin-bottom: 10px;
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.notification-title {
    font-weight: 700;
    margin-bottom: 8px;
    color: #1a1a1a;
    font-size: 1.5rem;
}

@media (max-width: 576px) {
    .notification-title {
        font-size: 14px;
        margin-bottom: 5px;
    }
}

.notification-message {
    color: #888;
    font-size: 1.4rem;
    line-height: 1.5;
}

@media (max-width: 576px) {
    .notification-message {
        font-size: 13px;
    }
}

/* === МОДАЛЬНЫЕ ДЕЙСТВИЯ === */
.modal-actions {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-top: 3rem;
}

@media (max-width: 576px) {
    .modal-actions {
        gap: 15px;
        margin-top: 20px;
    }
}

.warning {
    color: #ed8936;
    font-style: italic;
    text-align: center;
    font-size: 1.5rem;
    margin: 1.5rem 0;
}

.info {
    color: #6b2cff;
    font-style: italic;
    text-align: center;
    font-size: 1.5rem;
    margin: 1.5rem 0;
}

@media (max-width: 576px) {
    .warning {
        font-size: 14px;
        margin: 10px 0;
    }
    
    .info {
        font-size: 14px;
        margin: 10px 0;
    }
}

/* === ОШИБКИ === */
.error-message {
    color: #e53e3e;
    font-size: 1.4rem;
    margin-top: 1.5rem;
    padding: 1.2rem 1.6rem;
    background: #fed7d7;
    border-radius: 8px;
    border-left: 3px solid #e53e3e;
    display: none;
}

@media (max-width: 576px) {
    .error-message {
        font-size: 13px;
        margin-top: 10px;
        padding: 10px 12px;
    }
}

/* === ЗАГРУЗКА === */
.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.hidden {
    display: none !important;
}

.spinner {
    border: 3px solid #f4f4f4;
    border-top: 3px solid #6b2cff;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

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

/* === СПЕЦИАЛЬНЫЕ МЕДИА ЗАПРОСЫ === */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .stats-panel {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .radio-group {
        flex-direction: column;
        gap: 15px;
    }
    
    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .form-actions button {
        width: 100%;
        margin-bottom: 10px;
    }
    
    th, td {
        padding: 10px 8px;
        font-size: 12px;
    }
    
    .header h1 {
        font-size: 20px;
    }
}

/* === ДОПОЛНИТЕЛЬНЫЕ ЭФФЕКТЫ === */
.section, .stat-item {
    transition: all 0.3s ease;
}

.section:hover {
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.12);
}

/* === КРАСИВЫЕ СКРОЛЛБАРЫ === */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f4f4f4;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #6b2cff, #5320c9);
    border-radius: 4px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #5320c9, #4318b0);
}

/* Специальные скроллбары для модальных окон */
.modal-body::-webkit-scrollbar {
    width: 6px;
}

.modal-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #6b2cff, #8b44ff);
    border-radius: 3px;
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #5a24d9, #7139e6);
}

/* ========================================= */
/* СТИЛИ ДЛЯ ТАБОВ И КОНФИГУРАЦИЙ */
/* ========================================= */

/* === НАВИГАЦИОННЫЕ ТАБЫ === */
.tabs-container {
    margin: 3rem 0;
}

.tabs {
    display: flex;
    background: white;
    border-radius: 15px;
    padding: 1rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    gap: 1rem;
}

.tab-btn {
    flex: 1;
    padding: 1.6rem 2.4rem;
    border: none;
    border-radius: 12px;
    font-size: 1.6rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f4f4f4;
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
}

.tab-btn:hover {
    background: #e5e5e5;
    color: #1a1a1a;
    transform: translateY(-2px);
}

.tab-btn.active {
    background: #6b2cff;
    color: white;
    box-shadow: 0 4px 16px rgba(107, 44, 255, 0.3);
}

@media (max-width: 576px) {
    .tabs {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.8rem;
    }
    
    .tab-btn {
        padding: 1.2rem 1.6rem;
        font-size: 1.4rem;
    }
}

/* === КОНТЕНТ ТАБОВ === */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.tab-content.active {
    display: block;
}

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

/* === ЗАГОЛОВОК КОНФИГУРАЦИЙ === */
.configs-header {
    text-align: center;
    margin-bottom: 3rem;
}

.configs-header h2 {
    color: #1a1a1a;
    font-size: 3.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.tab-description {
    color: #888;
    font-size: 1.6rem;
    line-height: 1.5;
}

@media (max-width: 576px) {
    .configs-header h2 {
        font-size: 2.4rem;
    }
    
    .tab-description {
        font-size: 1.4rem;
    }
}

/* === ЗАГОЛОВОК СЕКЦИИ === */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap; /* 🔘 Добавили flex-wrap для кнопок */
    gap: 1rem; /* 🔘 Добавили gap между элементами */
}

.section-header h3 {
    color: #1a1a1a;
    font-size: 2.4rem;
    font-weight: 600;
    margin: 0;
}

@media (max-width: 576px) {
    .section-header {
        flex-direction: column;
        gap: 1.5rem;
        align-items: stretch;
    }
    
    .section-header h3 {
        font-size: 2rem;
        text-align: center;
    }
    
    /* 🔘 Группа кнопок на мобильном */
    .section-header > div {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    
    .section-header > div button {
        width: 100%;
    }
}

/* === ТАБЛИЦА КОНФИГУРАЦИЙ === */
.configs-table-container {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    min-width: 100%; /* 🚀 Используем всю доступную ширину */
}

.configs-table {
    width: 100%;
    border-collapse: collapse;
}

.configs-table th {
    background: linear-gradient(135deg, #6b2cff, #8b44ff);
    color: white;
    padding: 2rem 1.5rem;
    text-align: left;
    font-weight: 600;
    font-size: 1.4rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.configs-table td {
    padding: 2rem;
    border-bottom: 1px solid #e2e8f0;
    font-size: 1.5rem;
}

.configs-table tr:hover {
    background: #f9fafb;
}

@media (max-width: 576px) {
    .configs-table th,
    .configs-table td {
        padding: 1.2rem 0.8rem;
        font-size: 1.3rem;
    }
}

/* === СТАТУС КОНФИГУРАЦИЙ === */
.config-status {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    font-size: 1.3rem;
    font-weight: 600;
}

.config-status.exists {
    background: #d4edda;
    color: #155724;
}

.config-status.missing {
    background: #f8d7da;
    color: #721c24;
}

.config-info {
    font-size: 1.2rem;
    color: #888;
    margin-top: 0.4rem;
}

.config-mode {
    font-size: 1.1rem;
    color: #6b2cff;
    font-weight: 600;
    margin-top: 0.4rem;
    padding: 0.2rem 0.6rem;
    background: rgba(107, 44, 255, 0.1);
    border-radius: 4px;
    display: inline-block;
}

/* === КНОПКИ ДЕЙСТВИЙ === */
.btn-primary {
    background: #6b2cff;
    color: white;
    border: none;
    padding: 1.2rem 2.4rem;
    border-radius: 10px;
    font-size: 1.4rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
}

.btn-primary:hover {
    background: #5320c9;
    transform: scale(1.02);
}

.btn-secondary {
    background: #f4f4f4;
    color: #1a1a1a;
    border: 2px solid #e2e8f0;
    padding: 1.2rem 2.4rem;
    border-radius: 10px;
    font-size: 1.4rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #e5e5e5;
    border-color: #cbd5e0;
}

.btn-small {
    padding: 0.8rem 1.6rem;
    font-size: 1.2rem;
    border-radius: 8px;
}

@media (max-width: 576px) {
    .btn-primary,
    .btn-secondary {
        padding: 1rem 1.6rem;
        font-size: 1.2rem;
        width: 100%;
        justify-content: center;
    }
}

/* === ФОРМА КОНФИГУРАЦИИ === */
.config-form {
    background: white;
    border-radius: 15px;
    padding: 3rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    width: 100%; /* 🚀 Используем всю доступную ширину */
    max-width: none; /* 🚀 Убираем ограничения по ширине */
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 576px) {
    .config-form {
        padding: 2rem 1.5rem;
    }
}

/* === JSON РЕДАКТОР === */
.json-editor {
    width: 100%;
    padding: 2rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-family: 'Monaco', 'Consolas', 'Ubuntu Mono', monospace;
    font-size: 1.4rem;
    line-height: 1.6;
    background: #f9fafb;
    resize: vertical;
    min-height: 300px;
    transition: border-color 0.3s ease;
}

.json-editor:focus {
    outline: none;
    border-color: #6b2cff;
    box-shadow: 0 0 0 3px rgba(107, 44, 255, 0.1);
    background: white;
}

.json-editor.error {
    border-color: #e53e3e;
    background: #fed7d7;
}

.json-editor.valid {
    border-color: #38a169;
    background: #f0fff4;
}

@media (max-width: 576px) {
    .json-editor {
        padding: 1.5rem;
        font-size: 1.2rem;
        min-height: 250px;
    }
}

/* === SELECT СТИЛИ === */
select {
    width: 100%;
    padding: 1.5rem 2rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1.6rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

select:focus {
    outline: none;
    border-color: #6b2cff;
    box-shadow: 0 0 0 3px rgba(107, 44, 255, 0.1);
}

@media (max-width: 576px) {
    select {
        padding: 1.2rem 1.6rem;
        font-size: 1.4rem;
    }
}

/* === АНИМАЦИИ И ПЕРЕХОДЫ === */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === КОНФИГУРАЦИОННЫЙ CLIENT TOKEN INPUT === */
.config-client-token-input {
    display: flex;
    align-items: center;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: white;
    overflow: hidden;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.config-client-token-input:focus-within {
    border-color: #6b2cff;
    box-shadow: 0 0 0 3px rgba(107, 44, 255, 0.1);
}

.config-token-prefix {
    background: #f4f4f4;
    color: #888;
    padding: 1.5rem 1rem 1.5rem 2rem;
    font-size: 1.6rem;
    font-weight: 600;
    border-right: 1px solid #e2e8f0;
    white-space: nowrap;
}

.config-client-token-input input {
    flex: 1;
    padding: 1.5rem 2rem 1.5rem 1rem !important;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    font-size: 1.6rem;
}

.config-client-token-input input:focus {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

@media (max-width: 576px) {
    .config-token-prefix {
        padding: 1.2rem 0.8rem 1.2rem 1.6rem;
        font-size: 1.4rem;
    }
    
    .config-client-token-input input {
        padding: 1.2rem 1.6rem 1.2rem 0.8rem !important;
        font-size: 1.4rem;
    }
}

/* === УЛУЧШЕННЫЕ КНОПКИ ДЕЙСТВИЙ В ТАБЛИЦЕ === */
.actions-cell {
    padding: 1.5rem !important;
    min-width: 450px;
    width: 450px;
}

.config-actions-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.config-action-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.config-action-label {
    font-weight: 600;
    font-size: 1.3rem;
    color: #1a1a1a;
    min-width: 60px;
}

.config-action-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.btn-create-config {
    background: #6b2cff;
    color: white;
    border: none;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-create-config:hover {
    background: #5320c9;
    transform: scale(1.05);
}

.btn-edit-config {
    background: #f4f4f4;
    color: #1a1a1a;
    border: 1px solid #e2e8f0;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-edit-config:hover {
    background: #e5e5e5;
    border-color: #cbd5e0;
}

.btn-delete-config {
    background: #fed7d7;
    color: #e53e3e;
    border: 1px solid #feb2b2;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-delete-config:hover {
    background: #e53e3e;
    color: white;
    border-color: #e53e3e;
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .actions-cell {
        padding: 1rem !important;
        min-width: auto;
    }
    
    .config-actions-container {
        gap: 0.8rem;
    }
    
    .config-action-group {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
        padding: 0.6rem;
    }
    
    .config-action-label {
        text-align: center;
        min-width: auto;
        font-size: 1.2rem;
    }
    
    .config-action-buttons {
        justify-content: center;
    }
    
    .btn-create-config,
    .btn-edit-config,
    .btn-delete-config {
        padding: 0.5rem 1rem;
        font-size: 1.1rem;
    }
}

/* === АДАПТИВНОСТЬ === */
@media (max-width: 480px) {
    .tabs-container {
        margin: 2rem 0;
    }
    
    .configs-header {
        margin-bottom: 2rem;
    }
    
    .section-header h3 {
        font-size: 1.8rem;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .form-actions button {
        width: 100%;
    }
}

/* ========================================= */
/* СТИЛИ ДЛЯ ВЕРСИОНИРОВАНИЯ */
/* ========================================= */

/* Кнопка истории в таблице конфигураций */
.btn-history-config {
    background: #f4f4f4;
    color: #1a1a1a;
    border: 1px solid #e2e8f0;
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-history-config:hover {
    background: #e5e5e5;
    border-color: #cbd5e0;
    transform: scale(1.05);
}

/* Большие модальные окна для версий */
.modal-content.large {
    max-width: 90rem;
    width: 95%;
    margin: 3% auto;
    padding: 0;
    border-radius: 20px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 2rem 3rem;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 2.2rem;
    font-weight: 700;
    color: #1a1a1a;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2.4rem;
    color: #6c757d;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: #dc3545;
}

.modal-body {
    padding: 3rem;
    overflow-y: auto;
    flex: 1;
}

/* Таблица истории версий */
.version-history-container {
    overflow-x: auto;
}

.version-history-table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.version-history-table th {
    background: #1a1a1a;
    color: white;
    padding: 1.5rem 1.2rem;
    text-align: left;
    font-weight: 600;
    font-size: 1.4rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.version-history-table td {
    padding: 1.5rem 1.2rem;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
    font-size: 1.4rem;
}

.version-history-table tr:hover {
    background: #f9fafb;
}

.current-version {
    background: rgba(107, 44, 255, 0.05);
    border-left: 4px solid #6b2cff;
}

.current-version:hover {
    background: rgba(107, 44, 255, 0.08);
}

/* Действия с версиями */
.version-actions {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.btn-view-version {
    background: linear-gradient(135deg, #36d1dc, #5b86e5);
    color: white;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 7rem;
}

.btn-view-version:hover {
    background: linear-gradient(135deg, #2bb8c4, #4a74d1);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(54, 209, 220, 0.3);
}

.btn-restore-version {
    background: linear-gradient(135deg, #11998e, #38ef7d);
    color: white;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 9rem;
}

.btn-restore-version:hover {
    background: linear-gradient(135deg, #0e8579, #32d470);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(17, 153, 142, 0.3);
}

.btn-delete-version {
    background: linear-gradient(135deg, #ff6b6b, #ee5a52);
    color: white;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 7rem;
}

.btn-delete-version:hover {
    background: linear-gradient(135deg, #ff5252, #e53e3e);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

/* Модальное окно просмотра содержимого версии */
.version-info {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    border: 1px solid #e9ecef;
}

.version-info div {
    margin-bottom: 1rem;
    font-size: 1.4rem;
}

.version-info div:last-child {
    margin-bottom: 0;
}

.version-content-container h4 {
    margin-bottom: 1.5rem;
    color: #1a1a1a;
    font-size: 1.8rem;
    font-weight: 600;
}

.version-content-text {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 2rem;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    font-size: 1.3rem;
    line-height: 1.5;
    color: #495057;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 40rem;
    overflow-y: auto;
}

/* Адаптивные стили для версионирования */
@media (max-width: 768px) {
    .modal-content.large {
        width: 98%;
        margin: 2% auto;
        max-height: 95vh;
    }
    
    .modal-header {
        padding: 1.5rem 2rem;
    }
    
    .modal-header h2 {
        font-size: 1.8rem;
    }
    
    .modal-body {
        padding: 2rem;
    }
    
    .version-history-table th,
    .version-history-table td {
        padding: 1rem 0.8rem;
        font-size: 1.2rem;
    }
    
    .version-actions {
        flex-direction: column;
        gap: 0.4rem;
    }
    
    .btn-view-version,
    .btn-restore-version,
    .btn-delete-version,
    .btn-history-config {
        width: 100%;
        font-size: 1.1rem;
        padding: 0.8rem;
        min-width: auto;
    }
    
    .version-content-text {
        font-size: 1.2rem;
        padding: 1.5rem;
    }
    
    .version-info {
        padding: 1.5rem;
    }
}

@media (max-width: 576px) {
    .modal-content.large {
        border-radius: 15px;
    }
    
    .modal-header {
        padding: 1.5rem;
    }
    
    .modal-header h2 {
        font-size: 1.6rem;
    }
    
    .modal-body {
        padding: 1.5rem;
    }
    
    .version-history-table th,
    .version-history-table td {
        padding: 0.8rem 0.6rem;
        font-size: 1.1rem;
    }
    
    .version-content-text {
        font-size: 1.1rem;
        padding: 1.2rem;
        max-height: 30rem;
    }
    
    .version-info {
        padding: 1.2rem;
        font-size: 1.3rem;
    }
    
    .close-btn {
        font-size: 2rem;
    }
}

/* ========================================
   CLIENT MANAGEMENT STYLES
   ======================================== */

/* Широкий контейнер для управления клиентами */
.clients-section {
    max-width: none;
    width: 100%;
}

.clients-header {
    text-align: center;
    margin-bottom: 4rem;
}

.clients-header h2 {
    font-size: 3.2rem;
    color: #1a1a1a;
    margin-bottom: 1rem;
    font-weight: 700;
}

.clients-stats-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

/* Панель поиска и фильтрации */
.clients-search-panel {
    margin-bottom: 2rem;
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
}

.search-input {
    width: 100%;
    padding: 1.2rem 1.5rem;
    padding-right: 4rem;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1.4rem;
    transition: all 0.3s ease;
    background: white;
}

.search-input:focus {
    outline: none;
    border-color: #6b2cff;
    box-shadow: 0 0 0 3px rgba(107, 44, 255, 0.1);
}

.search-input::placeholder {
    color: #a0aec0;
    font-style: italic;
}

.btn-clear-search {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #a0aec0;
    font-size: 1.6rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

.btn-clear-search.visible {
    opacity: 1;
    visibility: visible;
}

.btn-clear-search:hover {
    background: #f7fafc;
    color: #e53e3e;
}

.search-results-info {
    margin-top: 1rem;
    text-align: center;
    color: #666;
    font-size: 1.3rem;
}

.search-results-info .highlight {
    color: #6b2cff;
    font-weight: 600;
}

@media (max-width: 768px) {
    .clients-stats-panel {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .clients-search-panel {
        padding: 1.5rem;
    }
    
    .search-input {
        padding: 1rem 1.2rem;
        padding-right: 3.5rem;
        font-size: 1.3rem;
    }
    
    .search-results-info {
        font-size: 1.2rem;
    }
}

/* Широкая таблица клиентов */
.clients-table-wrapper {
    width: 100%;
    margin: 0 -2rem; /* Компенсируем внутренние отступы */
    padding: 0 2rem;
    overflow-x: auto;
}

.clients-table-container {
    min-width: 2400px; /* 🚀 Увеличиваем минимальную ширину для максимального использования экрана */
    overflow-x: auto;
    border-radius: 15px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    background: white;
}

.clients-management-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    font-size: 1.3rem;
}

.clients-management-table th {
    background: linear-gradient(135deg, #6b2cff, #8b44ff);
    color: white;
    padding: 1.5rem 1rem;
    text-align: left;
    font-weight: 600;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.clients-management-table td {
    padding: 1.2rem 1rem;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
    font-size: 1.2rem;
    white-space: nowrap;
}

.clients-management-table tr:hover {
    background: #f9fafb;
}

/* 🚀 Расширенные стили для столбцов - максимальное использование экрана */
.col-token { width: 160px; } /* Увеличено с 120px */
.col-domain { width: 220px; } /* Увеличено с 180px */
.col-install-date { width: 150px; } /* Увеличено с 120px */
.col-counter { width: 140px; } /* Увеличено с 100px */
.col-active { width: 100px; text-align: center; } /* Увеличено с 80px */
.col-goals { width: 100px; text-align: center; } /* Увеличено с 80px */
.col-goal-methods { width: 200px; } /* Новая колонка способов получения целей */
.col-goal-type { width: 200px; } /* Увеличено с 150px */
.col-metrica-goals { width: 160px; } /* Увеличено с 120px */
.col-csv { width: 120px; text-align: center; } /* Увеличено с 100px */
.col-config { width: 100px; text-align: center; } /* Увеличено с 80px */
.col-direct-date { width: 150px; } /* Увеличено с 120px */
.col-contacts { width: 120px; text-align: center; } /* Увеличено с 100px */
.col-actions { width: 200px; text-align: center; } /* Увеличено с 150px */

/* Цветные индикаторы */
.status-indicator {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    min-width: 60px;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-inactive {
    background: #f8d7da;
    color: #721c24;
}

.status-yes {
    background: #d1ecf1;
    color: #0c5460;
}

.status-no {
    background: #f5c6cb;
    color: #721c24;
}

/* 🔘 Унифицированные кнопки во всех табах */
.table-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    margin: 2px;
    font-weight: 500;
}

.btn-contacts {
    background: #6b2cff;
    color: white;
}

.btn-contacts:hover {
    background: #5a24d9;
}

/* 🔄 Унифицированная кнопка "Редактировать" */
.btn-edit-client,
.edit-btn,
.btn-edit-config {
    background: #e3f2fd !important;
    color: #1976d2 !important;
    border: 1px solid #bbdefb !important;
}

.btn-edit-client:hover,
.edit-btn:hover,
.btn-edit-config:hover {
    background: #bbdefb !important;
    color: #0d47a1 !important;
    border-color: #90caf9 !important;
}

/* 🗑️ Унифицированная кнопка "Удалить" */
.btn-delete-client,
.delete-btn,
.delete-client-btn,
.btn-delete-config {
    background: #ffebee !important;
    color: #d32f2f !important;
    border: 1px solid #ffcdd2 !important;
}

.btn-delete-client:hover,
.delete-btn:hover,
.delete-client-btn:hover,
.btn-delete-config:hover {
    background: #ffcdd2 !important;
    color: #b71c1c !important;
    border-color: #ef9a9a !important;
}

/* Текстовые данные в таблице */
.client-token {
    font-family: 'Monaco', 'Menlo', monospace;
    background: #f4f4f4;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 1.1rem;
    color: #6b2cff;
    font-weight: 500;
}

.client-domain {
    color: #2d5016;
    font-weight: 500;
}

.client-counter {
    font-family: 'Monaco', 'Menlo', monospace;
    color: #6b2cff;
    font-weight: 500;
}

.goal-type-badge {
    background: #e8f5d0;
    color: #2d5016;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 500;
}

.csv-count {
    background: #fff3cd;
    color: #856404;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
}

/* Модальные окна для клиентов */
.modal-content.extra-large {
    max-width: 95vw; /* 🚀 Увеличили с 90vw */
    width: 1400px; /* 🚀 Увеличили с 1200px */
    margin: 3% auto; /* 🚀 Уменьшили отступ сверху */
}

.contacts-form .form-group {
    margin-bottom: 2rem;
}

.client-edit-form {
    max-width: none;
}

/* Табы в форме редактирования */
.form-tabs {
    display: flex;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 3rem;
}

.form-tab-btn {
    background: linear-gradient(145deg, #f8f9fa, #e9ecef);
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1.2rem 2.4rem;
    margin-right: 1rem;
    margin-bottom: 0.5rem;
    color: #495057;
    font-size: 1.4rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-transform: none;
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.form-tab-btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

.form-tab-btn:hover:before {
    left: 100%;
}

.form-tab-btn.active {
    background: linear-gradient(135deg, #6b2cff, #8b44ff);
    color: white;
    border-color: #6b2cff;
    box-shadow: 0 4px 16px rgba(107, 44, 255, 0.3);
    transform: translateY(-2px);
}

.form-tab-btn:hover {
    background: linear-gradient(145deg, #e9ecef, #f8f9fa);
    border-color: #6b2cff;
    color: #6b2cff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.form-tab-content {
    display: none;
}

.form-tab-content.active {
    display: block;
}

/* Список данных клиента */
.client-data-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 2rem;
}

.client-data-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-left: 4px solid #6b2cff;
}

.client-data-item:last-child {
    margin-bottom: 0;
}

.client-data-title {
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 0.5rem;
}

.client-data-details {
    font-size: 1.3rem;
    color: #666;
    line-height: 1.6;
}

/* Чекбоксы */
.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 1.6rem;
    font-weight: 500;
    color: #1a1a1a;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 4px;
    margin-right: 1rem;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #6b2cff;
    border-color: #6b2cff;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: -2px;
    left: 3px;
    color: white;
    font-size: 14px;
    font-weight: bold;
}

/* 🚀 Responsive для широкой таблицы клиентов */
@media (max-width: 1600px) {
    .clients-table-container {
        min-width: 2200px; /* Остается широкой даже на средних экранах */
    }
    
    .clients-management-table th,
    .clients-management-table td {
        padding: 1rem 0.8rem;
        font-size: 1.1rem;
    }
}

@media (max-width: 1200px) {
    .clients-table-container {
        min-width: 2000px; /* Чуть меньше для ноутбуков */
    }
}

@media (max-width: 768px) {
    .clients-table-wrapper {
        margin: 0 -1rem;
        padding: 0 1rem;
    }
    
    .clients-table-container {
        min-width: 1800px; /* Для планшетов остается широкой */
    }
    
    .clients-management-table th,
    .clients-management-table td {
        padding: 0.8rem 0.6rem;
        font-size: 1rem;
    }
    
    .table-btn {
        padding: 4px 8px;
        font-size: 1rem;
    }
    
    .modal-content.extra-large {
        width: 95vw;
        margin: 2% auto;
    }
    
    .form-tabs {
        flex-wrap: wrap;
    }
    
    .form-tab-btn {
        padding: 1rem 1.5rem;
        font-size: 1.2rem;
    }
}

/* Загрузка и пустое состояние */
.clients-loading {
    text-align: center;
    padding: 4rem;
    color: #666;
    font-size: 1.6rem;
}

.clients-loading .spinner {
    margin: 0 auto 2rem;
}

/* Анимации */
@keyframes clientRowFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.clients-management-table tbody tr {
    animation: clientRowFadeIn 0.3s ease-out;
}

/* Улучшения для мобильных устройств */
@media (max-width: 576px) {
    .clients-header h2 {
        font-size: 2.4rem;
    }
    
    .clients-stats-panel {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .clients-management-table {
        font-size: 1rem;
    }
    
    .table-btn {
        display: block;
        margin: 2px 0;
        width: 100%;
    }
}

/* === СТИЛИ ДЛЯ РЕДАКТИРОВАНИЯ ЭЛЕМЕНТОВ === */

.editable-item {
    position: relative;
    transition: all 0.3s ease;
    border-left: 4px solid #6b2cff !important;
}

.editable-item:hover {
    background: #f8f9fa !important;
    transform: translateX(2px);
}

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

.item-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-edit-item, 
.btn-delete-item {
    background: none;
    border: 1px solid transparent;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-edit-item {
    color: #1976d2;
    border-color: #1976d2;
}

.btn-edit-item:hover {
    background: #e3f2fd;
    transform: scale(1.1);
}

.btn-delete-item {
    color: #d32f2f;
    border-color: #d32f2f;
}

.btn-delete-item:hover {
    background: #ffebee;
    transform: scale(1.1);
}

textarea {
    width: 100%;
    padding: 1.5rem 2rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 1.6rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: white;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
}

textarea:focus {
    outline: none;
    border-color: #6b2cff;
    box-shadow: 0 0 0 3px rgba(107, 44, 255, 0.1);
}

select {
    appearance: none; /* Убираем стандартную стрелочку браузера */
    -webkit-appearance: none; /* Для Safari */
    -moz-appearance: none; /* Для Firefox */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.help-text {
    display: block;
    margin-top: 0.5rem;
    font-size: 1.3rem;
    color: #6b7280;
    font-style: italic;
}

@media (max-width: 576px) {
    .item-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .item-actions {
        align-self: flex-end;
    }
    
    .btn-edit-item, 
    .btn-delete-item {
        width: 28px;
        height: 28px;
        font-size: 1rem;
    }
    
    textarea {
        padding: 12px 16px;
        font-size: 14px;
        border-radius: 8px;
    }
}

/* ========================================
   CLIENT TOKEN INPUT STYLES (Yandex Metrica style)
   ======================================== */

/* Client Token Input - как в Yandex Metrica */
.client-token-input {
    display: flex;
    align-items: center;
    border: 2px solid #ddd;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    transition: all 0.3s ease;
}

.client-token-input:focus-within {
    border-color: #8B5CF6;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}

.token-prefix {
    background: linear-gradient(135deg, #8B5CF6, #A855F7);
    color: white;
    padding: 15px 16px;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
    border-right: 1px solid rgba(139, 92, 246, 0.2);
    white-space: nowrap;
    user-select: none;
}

.client-token-input input {
    border: none !important;
    outline: none !important;
    padding: 15px 16px !important;
    flex: 1;
    font-size: 14px;
    font-weight: 500;
    background: transparent !important;
    box-shadow: none !important;
}

.client-token-input input:focus {
    box-shadow: none !important;
    border: none !important;
}

/* Адаптивные стили для Client Token Input */
@media (max-width: 576px) {
    .client-token-input {
        border-radius: 8px;
    }
    
    .token-prefix {
        padding: 12px 14px;
        font-size: 13px;
    }
    
    .client-token-input input {
        padding: 12px 14px !important;
        font-size: 13px;
    }
}

/* === ВИЗУАЛЬНЫЕ КНОПКИ ТИПОВ ЦЕЛЕЙ === */
.goal-type-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

@media (max-width: 768px) {
    .goal-type-selector {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }
}

@media (max-width: 576px) {
    .goal-type-selector {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
}

.goal-type-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-height: 90px;
}

.goal-type-option:hover {
    border-color: #6b2cff;
    background: rgba(107, 44, 255, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(107, 44, 255, 0.15);
}

.goal-type-option.selected {
    border-color: #6b2cff;
    background: linear-gradient(135deg, #6b2cff, #8b44ff);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(107, 44, 255, 0.3);
}

.goal-type-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    transition: transform 0.3s ease;
}

.goal-type-option:hover .goal-type-icon {
    transform: scale(1.1);
}

.goal-type-text {
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.2;
}

.goal-type-option.selected .goal-type-text {
    color: white;
}

@media (max-width: 576px) {
    .goal-type-option {
        padding: 1.2rem 0.8rem;
        min-height: 80px;
    }
    
    .goal-type-icon {
        font-size: 1.8rem;
        margin-bottom: 0.4rem;
    }
    
    .goal-type-text {
        font-size: 1.2rem;
    }
}

/* ========================================
   🔐 КРАСИВАЯ СТРАНИЦА ВХОДА В СИСТЕМУ
   ======================================== */

.auth-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 10000;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
}

/* Анимированный фон */
.auth-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        #667eea 0%, 
        #764ba2 25%, 
        #6b2cff 50%, 
        #8b44ff 75%, 
        #a855f7 100%
    );
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.auth-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 40% 40%, rgba(255, 255, 255, 0.05) 0%, transparent 50%);
    animation: gradientPulse 8s ease-in-out infinite alternate;
}

@keyframes gradientPulse {
    0% { opacity: 1; }
    100% { opacity: 0.7; }
}

/* Анимированные частицы */
.auth-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    animation: particleFloat 20s linear infinite;
}

.particle:nth-child(1) {
    left: 20%;
    animation-delay: 0s;
    animation-duration: 15s;
}

.particle:nth-child(2) {
    left: 40%;
    animation-delay: -5s;
    animation-duration: 18s;
}

.particle:nth-child(3) {
    left: 60%;
    animation-delay: -10s;
    animation-duration: 22s;
}

.particle:nth-child(4) {
    left: 80%;
    animation-delay: -15s;
    animation-duration: 25s;
}

.particle:nth-child(5) {
    left: 10%;
    animation-delay: -20s;
    animation-duration: 12s;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) translateX(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(-100px) rotate(360deg);
        opacity: 0;
    }
}

/* Контейнер страницы входа */
.auth-container {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.auth-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 4rem;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    max-width: 450px;
    width: 100%;
    text-align: center;
    animation: authSlideIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes authSlideIn {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(40px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Логотип и заголовок */
.auth-logo {
    margin-bottom: 3rem;
}

.auth-logo-img {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    margin-bottom: 1.5rem;
    animation: logoFloat 3s ease-in-out infinite alternate;
}

@keyframes logoFloat {
    from { transform: translateY(0px); }
    to { transform: translateY(-10px); }
}

.auth-title {
    font-size: 3.2rem;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0 0 0.8rem 0;
    background: linear-gradient(135deg, #6b2cff, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.auth-subtitle {
    font-size: 1.6rem;
    color: #666;
    margin: 0;
    font-weight: 500;
}

/* Форма входа */
.auth-form-container {
    margin-top: 3rem;
}

.auth-form-header h2 {
    font-size: 2.4rem;
    color: #1a1a1a;
    margin: 0 0 0.8rem 0;
    font-weight: 700;
}

.auth-form-header p {
    font-size: 1.5rem;
    color: #666;
    margin: 0 0 2.5rem 0;
    line-height: 1.5;
}

.auth-form {
    margin-top: 2rem;
}

.auth-input-group {
    margin-bottom: 2rem;
}

.auth-input-container {
    position: relative;
}

.auth-input-container input {
    width: 100%;
    padding: 1.8rem 2rem;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    font-size: 1.6rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    outline: none;
}

.auth-input-container input:focus {
    border-color: #6b2cff;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 
        0 8px 30px rgba(107, 44, 255, 0.15),
        0 0 0 4px rgba(107, 44, 255, 0.1);
    transform: translateY(-2px);
}

.auth-input-container input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

/* Кнопка входа */
.auth-btn {
    position: relative;
    width: 100%;
    padding: 1.8rem 3rem;
    background: linear-gradient(135deg, #6b2cff 0%, #8b44ff 50%, #a855f7 100%);
    border: none;
    border-radius: 16px;
    color: white;
    font-size: 1.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 8px 30px rgba(107, 44, 255, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
    overflow: hidden;
    text-transform: none;
    letter-spacing: 0.5px;
}

.auth-btn:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 12px 40px rgba(107, 44, 255, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg, #5a1fff 0%, #7a3eff 50%, #9945f7 100%);
}

.auth-btn:active {
    transform: translateY(-1px);
    box-shadow: 
        0 6px 25px rgba(107, 44, 255, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1);
}

.auth-btn-text {
    position: relative;
    z-index: 2;
}

.auth-btn-ripple {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-btn:hover .auth-btn-ripple {
    left: 100%;
}

/* Сообщение об ошибке */
.auth-error {
    margin-top: 2rem;
    padding: 1.5rem 2rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    color: #dc2626;
    font-size: 1.4rem;
    font-weight: 500;
    text-align: center;
    backdrop-filter: blur(10px);
    animation: errorShake 0.5s ease-in-out;
    display: none;
}

.auth-error.show {
    display: block;
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Адаптивные стили */
@media (max-width: 768px) {
    .auth-container {
        padding: 1.5rem;
    }
    
    .auth-content {
        padding: 3rem 2.5rem;
        border-radius: 20px;
    }
    
    .auth-logo-img {
        width: 70px;
        height: 70px;
    }
    
    .auth-title {
        font-size: 2.8rem;
    }
    
    .auth-subtitle {
        font-size: 1.4rem;
    }
    
    .auth-form-header h2 {
        font-size: 2.2rem;
    }
    
    .auth-form-header p {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .auth-container {
        padding: 1rem;
    }
    
    .auth-content {
        padding: 2.5rem 2rem;
        border-radius: 16px;
    }
    
    .auth-logo-img {
        width: 60px;
        height: 60px;
    }
    
    .auth-title {
        font-size: 2.4rem;
    }
    
    .auth-subtitle {
        font-size: 1.3rem;
    }
    
    .auth-form-header h2 {
        font-size: 2rem;
    }
    
    .auth-form-header p {
        font-size: 1.3rem;
    }
    
    .auth-input-container input {
        padding: 1.6rem 1.8rem;
        font-size: 1.5rem;
    }
    
    .auth-btn {
        padding: 1.6rem 2.5rem;
        font-size: 1.6rem;
    }
}

/* Анимация исчезновения страницы входа */
.auth-screen.fade-out {
    animation: authFadeOut 0.5s ease-in-out forwards;
}

@keyframes authFadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }
    to {
        opacity: 0;
        transform: scale(1.05);
    }
}

/* ========================================
   CLIENT CONFIGURATIONS STYLES
   ======================================== */

/* Стили для конфигураций клиентов */
.client-configs-table-container {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-top: 2rem;
}

.client-configs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1.4rem;
}

.client-configs-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.client-configs-table th {
    padding: 1.8rem 1.5rem;
    font-weight: 600;
    text-align: left;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.client-configs-table td {
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
    vertical-align: middle;
}

.client-configs-table tbody tr:hover {
    background-color: #f8fafc;
    transform: translateY(-1px);
    transition: all 0.2s ease;
}

.campaigns-count {
    background: #D6FF2F;
    color: #1a1a1a;
    padding: 0.4rem 0.8rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.2rem;
}

/* Форма конфигурации клиента */
.client-config-form {
    background: white;
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    margin-top: 2rem;
}

.client-config-token-input {
    display: flex;
    align-items: center;
    background: #f8fafc;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.client-config-token-input:focus-within {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.client-config-token-prefix {
    background: #667eea;
    color: white;
    padding: 1.2rem 1.5rem;
    font-weight: 600;
    font-size: 1.4rem;
}

.client-config-token-input input {
    border: none;
    background: transparent;
    padding: 1.2rem 1.5rem;
    font-size: 1.4rem;
    flex: 1;
    outline: none;
}

/* Секция кампаний */
.campaigns-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #e5e7eb;
}

.campaigns-list {
    margin-top: 2rem;
}

.campaign-item {
    background: #f8fafc;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}

.campaign-item:hover {
    border-color: #667eea;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.1);
}

.campaign-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
}

.campaign-header h5 {
    color: #667eea;
    font-size: 1.8rem;
    font-weight: 600;
    margin: 0;
}

.btn-remove-campaign {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.6rem 1rem;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-remove-campaign:hover {
    background: #dc2626;
    transform: scale(1.05);
}

.campaign-fields {
    display: grid;
    gap: 1.5rem;
}

/* Детали конфигурации клиента */
.client-config-details {
    background: white;
    padding: 3rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.client-config-info {
    display: grid;
    gap: 3rem;
}

.info-section h4 {
    color: #667eea;
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 1rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.info-grid div {
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    font-size: 1.4rem;
}

.campaigns-details {
    display: grid;
    gap: 2rem;
}

.campaign-detail {
    background: #f8fafc;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 2rem;
}

.campaign-detail h5 {
    color: #667eea;
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 1rem;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 0.5rem;
}

.campaign-info {
    display: grid;
    gap: 0.8rem;
}

.campaign-info div {
    font-size: 1.3rem;
}

.campaign-info strong {
    color: #374151;
    font-weight: 600;
}

.campaign-info code {
    background: #e5e7eb;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
}

/* Статусы для health check */
.status-healthy {
    color: #10b981 !important;
}

.status-unhealthy {
    color: #ef4444 !important;
}

.status-error {
    color: #f59e0b !important;
}

/* Кнопки действий в таблице - в стиле Client Management */
.client-configs-table .actions {
    white-space: nowrap;
}

.client-configs-table .btn-view,
.client-configs-table .btn-edit,
.client-configs-table .btn-delete {
    padding: 0.4rem 0.8rem;
    margin: 0 0.2rem;
    border: none;
    border-radius: 6px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.client-configs-table .btn-view,
.client-configs-table .btn-edit,
.client-configs-table .btn-delete {
    background: #f3f4f6;
    color: #374151;
}

.client-configs-table .btn-view:hover,
.client-configs-table .btn-edit:hover,
.client-configs-table .btn-delete:hover {
    background: #e5e7eb;
    color: #111827;
}

/* Адаптивные стили для конфигураций клиентов */
@media (max-width: 768px) {
    .client-configs-table {
        font-size: 1.2rem;
    }
    
    .client-configs-table th,
    .client-configs-table td {
        padding: 1rem 0.8rem;
    }
    
    .client-config-form {
        padding: 2rem;
    }
    
    .campaign-item {
        padding: 1.5rem;
    }
    
    .campaign-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .client-config-details {
        padding: 2rem;
    }
}