/*style.css*/

@import './notifications.css');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

.header {
    background: white;
    padding: 1rem 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}


.main {
    padding: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}



.label {
    font-weight: 500;
    color: #666;
}

.value {
    font-weight: 600;
}


.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
}


.status-badge.running {
    background: #c6f6d5;
    color: #22543d;
    border: 1px solid #9ae6b4;
}

.status-badge.stopped {
    background: #fed7d7;
    color: #c53030;
    border: 1px solid #feb2b2;
}

.status-badge.starting {
    background: #feebcb;
    color: #744210;
    border: 1px solid #fbd38d;
}

.profit { color: #28a745; }
.loss { color: #dc3545; }
/*
.bot-actions {
    display: flex;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}*/

.bot-actions {
    display: flex;
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.action-buttons-right {
    display: flex;
    gap: 8px;
}








.btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.btn-primary { background: #007bff; color: white; }
.btn-secondary { background: #6c757d; color: white; }
.btn-danger { background: #dc3545; color: white; }
.btn-info { background: #17a2b8; color: white; }
.btn-sm { padding: 0.25rem 0.5rem; font-size: 0.8rem; }

.empty-state {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 8px;
    grid-column: 1 / -1;
}

.bot-form {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 0 auto;
}

.form-section {
    margin-bottom: 2rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

.form-description {
    display: block;
    font-size: 0.8rem;
    color: #666;
    margin-top: 0.25rem;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 4px;
    border: 1px solid #f5c6cb;
}

.form-group textarea {
    min-height: 80px;
    resize: vertical;
}

.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
}

.form-group label.checkbox-label {
    display: flex;
    align-items: center;
    font-weight: normal;
}


input:invalid {
    border-color: #dc3545;
}

input:valid {
    border-color: #28a745;
}

.validation-message {
    color: #dc3545;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: none;
}

.form-group.error input {
    border-color: #dc3545;
}

.form-group.error .validation-message {
    display: block;
}

/* Стили для disabled состояния */
input:disabled {
    background-color: #f8f9fa;
    opacity: 0.6;
    cursor: not-allowed;
}


/* static/style.css */
input.invalid, select.invalid, textarea.invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

input.valid, select.valid, textarea.valid {
    border-color: #28a745;
}

.validation-message {
    color: #dc3545;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: none;
}

.form-group:has(.invalid) .validation-message {
    display: block;
}

/* Стили для числовых полей */
input[type="number"] {
    -moz-appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}


/* static/style.css */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: #f5f5f5;
}

.auth-form {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;

    display: flex;
    flex-direction: column;
    align-items: flex-center; /* ← Важно! */
    gap: 0.5rem;
}

.auth-content{
    display: grid;
    flex-direction: column;
    align-items: flex-center; /* ← Важно! */
}

.auth-form h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #333;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    border: 1px solid #f5c6cb;
}

.alert {
    padding: 1rem;
    border-radius: 4px;
    margin: 1rem 0;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;

    display: flex;
    flex-direction: column;
    align-items: flex-start; /* ← Важно! */
    gap: 5px;
    padding: 20px;
    border-radius: 12px;
}

.alert-warning .btn {
    margin-top: 15px;
}

.empty-state {
    text-align: center;
    padding: 2rem;
    color: #666;
}
/*
.create-bot-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}*/


/* === Providers Page Styles === */
.create-bot-container,
.providers-container {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    gap: 2rem;
}

.add-provider-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e1e5e9;
}

.add-provider-card h2 {
    margin-bottom: 1.5rem;
    color: #2d3748;
    font-size: 1.5rem;
}

.provider-form {
    display: grid;
    gap: 1.5rem;
}

.btn-full {
    width: 100%;
    padding: 0.75rem;
    font-size: 1.1rem;
}

.form-help {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.8rem;
    color: #718096;
}

/* Providers List */
.providers-list h2 {
    margin-bottom: 1.5rem;
    color: #2d3748;
    font-size: 1.5rem;
}

.providers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.provider-card {
    display: grid;
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e1e5e9;
    transition: all 0.3s ease;
    animation: slideIn 0.3s ease-out;
    align-items: flex-start;
    flex-direction: column;
}


.provider-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.provider-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.provider-icon {
    font-size: 2rem;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    color: white;
}

.provider-info h3 {
    margin: 0;
    color: #2d3748;
    font-size: 1.2rem;
    text-transform: capitalize;
}

.provider-date {
    margin: 0;
    color: #718096;
    font-size: 0.9rem;
}

.provider-status {
    margin: 1rem 0;
}

.status-connected {
    background: #c6f6d5;
    color: #22543d;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.provider-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
}

.btn-outline {
    background: transparent;
    border: 2px solid #e2e8f0;
    color: #4a5568;
}

.btn-outline:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    background: white;
    border-radius: 12px;
    border: 2px dashed #e2e8f0;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    margin: 0 0 0.5rem 0;
    color: #4a5568;
}

.empty-state p {
    margin: 0;
    color: #718096;
}

/* Form Improvements */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    color: #4a5568;
    font-size: 0.9rem;
}

.form-group input,
.form-group select {
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}


/* Animation for new provider */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}



.provider-icon svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}


.no-providers-warning {
    text-align: center;
    padding: 3rem 2rem;
    background: white;
    border-radius: 12px;
    border: 2px dashed #e2e8f0;
}

.warning-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.7;
}

.no-providers-warning h2 {
    margin: 0 0 1rem 0;
    color: #2d3748;
}

.no-providers-warning p {
    margin: 0 0 2rem 0;
    color: #718096;
    font-size: 1.1rem;
}

.bot-create-form {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.form-section {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #f7fafc;
}

.form-section:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.form-section h2 {
    margin-bottom: 1.5rem;
    color: #2d3748;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-section h2::before {
    content: "⚙️";
    font-size: 1.2rem;
}

.section-help {
    color: #718096;
    margin: -1rem 0 1.5rem 0;
    font-style: italic;
}

/* Стили для выбора провайдера */
.provider-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
}

.provider-badge {
    padding: 0.2rem 0.5rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.provider-badge.bybit { background: #0052ff; color: white; }
.provider-badge.binance { background: #f0b90b; color: black; }
.provider-badge.kucoin { background: #23af91; color: white; }
.provider-badge.okx { background: #000; color: white; }
.provider-badge.gateio { background: #2855ac; color: white; }


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

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

.notification {
    animation: slideIn 0.3s ease-out;
}

.notification.slide-out {
    animation: slideOut 0.3s ease-in;
}

/* Стиль для автоматически выбранного провайдера */
.provider-select option[selected] {
    font-weight: bold;
    background-color: #e6fffa;
    color: #234e52;
}

/* Подсветка выбранного option */
.provider-select option:checked {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Иконка для автоматического выбора */
.auto-selected {
    position: relative;
}

.auto-selected::after {
    content: "⚡";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8em;
}

.provider-selection-info {
    margin-bottom: 1rem;
}

.info-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: #e6fffa;
    border: 1px solid #81e6d9;
    border-radius: 6px;
    color: #234e52;
    font-size: 0.9rem;
}

.badge-icon {
    font-size: 1.1rem;
}

.provider-select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
}

.provider-select:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.exchange-info {
    background: #f7fafc;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 4px solid #4299e1;
}

.exchange-info h4 {
    margin: 0 0 0.5rem 0;
    color: #2d3748;
}

.exchange-info p {
    margin: 0;
    color: #718096;
}

.exchange-field {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.exchange-field:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

/* Анимация появления полей */
#exchangeFields {
    transition: all 0.3s ease;
}

#exchangeFields .form-group {
    animation: slideDown 0.3s ease;
}

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



.provider-card.deleting {
    opacity: 0;
    transform: translateX(100%);
}

/* Стиль для кнопки удаления */
.btn-danger {
    background: #e53e3e;
    color: white;
    border: none;
}

.btn-danger:hover {
    background: #c53030;
    transform: scale(1.05);
}

.btn-danger:disabled {
    background: #a0aec0;
    cursor: not-allowed;
    transform: none;
}

.bots-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}




/* Информация о боте */
.bot-info {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
    margin-bottom: 1.5rem;
}



.bot-symbol {
    font-weight: 600;
    color: #4a5568;
    text-align: center;
}

/* Метрики бота */
.bot-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.metric {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    background: #f7fafc;
    border-radius: 8px;
}

.metric .label {
    font-weight: 600;
    color: #4a5568;
}

.metric .value {
    font-weight: 700;
    color: #2d3748;
}

.metric .value.pnl.positive {
    color: #38a169;
}

.metric .value.pnl.negative {
    color: #e53e3e;
}

/* Конфигурация бота */
.bot-config {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f7fafc;
    border-radius: 8px;
}




.btn-toggle {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-toggle:hover {
    transform: scale(1.05);
}

.btn-toggle:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-danger {
    background: #e53e3e;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-danger:hover:not(:disabled) {
    background: #c53030;
    transform: scale(1.05);
}

.btn-danger:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}




.bot-avatar {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}


.bot-title h3 {
    margin: 0 0 0.4rem 0;
    color: #1a202c;
    font-size: 1.2rem;
    font-weight: 700;
}

.bot-meta {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}




.section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    color: #2d3748;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.section-title::before {
    content: "⚙️";
    font-size: 1rem;
}




/* Empty State */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-radius: 16px;
    border: 2px dashed #cbd5e0;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    margin: 0 0 0.5rem 0;
    color: #2d3748;
    font-size: 1.5rem;
}

.empty-state p {
    margin: 0 0 2rem 0;
    color: #718096;
    font-size: 1.1rem;
}


/* Loading skeleton */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}





.bot-info-primary {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.bot-avatar {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}




.bot-info-secondary {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}













.action-btn {
    padding: 0.6rem 1.2rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 100px;
    justify-content: center;
}


.action-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}



.btn-edit {
    background: #718096;
    color: white;
}

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

.btn-start {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
}

.btn-stop {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    color: white;
}


.action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-radius: 16px;
    border: 2px dashed #cbd5e0;
    width: 100%;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state h3 {
    margin: 0 0 0.5rem 0;
    color: #2d3748;
    font-size: 1.5rem;
}

.empty-state p {
    margin: 0 0 2rem 0;
    color: #718096;
    font-size: 1.1rem;
}






.bot-info-primary {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex: 1;
    min-width: 0;
}

.bot-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    flex-shrink: 0;
}

/* Header Section - Компактный заголовок */
/*
.bot-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-center;
    margin-top: 0rem;
    margin-bottom: 1rem;
    gap: 1rem;
}

*/
.bot-header {
    display: flex;
    margin-top: 0rem;
    margin-bottom: 1rem;
    gap: 1rem;
    grid-template-columns: 1fr 1fr;
    justify-content: space-between;
}



.bot-title {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    display: flex;
    align-items: flex-start;
    flex-shrink: 0;
    justify-content: space-between;
}

.bot-status {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    display: flex;
    align-items: flex-end;
    flex-shrink: 0;
    justify-content: space-between;
}



.config-section,
.metrics-section {
    background: #f7fafc;
    padding: 1rem;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}





.section-title::before {
    font-size: 0.9rem;
}



.metrics-section .section-title::before {
    content: "📊";
}













/* Empty State */
.empty-state {
    text-align: center;
    padding: 2rem 1.5rem;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    border-radius: 12px;
    border: 2px dashed #cbd5e0;
    width: 100%;
}

.empty-icon {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
    opacity: 0.5;
}

.empty-state h3 {
    margin: 0 0 0.4rem 0;
    color: #2d3748;
    font-size: 1.3rem;
}

.empty-state p {
    margin: 0 0 1.5rem 0;
    color: #718096;
    font-size: 1rem;
}







.bot-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
}

.bot-card.running::before {
    background: linear-gradient(90deg, #48bb78 0%, #38a169 100%);
}

.bot-card.stopped::before {
    background: linear-gradient(90deg, #f56565 0%, #e53e3e 100%);
}

.bot-card.starting::before {
    background: linear-gradient(90deg, #ed8936 0%, #dd6b20 100%);
}


.bot-info-left {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex: 1;
    min-width: 0;
}

.bot-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    flex-shrink: 0;
}


.bot-name {
    margin: 0 0 0.4rem 0;
    color: #1a202c;
    font-size: 1.1rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}



/* Статус в правом верхнем углу */
.bot-info-right {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}



.section-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.8rem;
    color: #2d3748;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.section-title::before {
    font-size: 0.9rem;
}





.config-label {
    font-size: 0.6rem;
    color: #718096;
    font-weight: 500;
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.metric-label {
    font-size: 0.6rem;
    color: #718096;
    font-weight: 500;
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}


.config-value {
    font-size: 0.85rem;
    font-weight: 500;
    color: #2d3748;
    margin-bottom: 0.0rem;
    line-height: 1.2;
    word-break: break-word;
}

.metric-value {
    font-size: 0.85rem;
    font-weight: 500;
    color: #2d3748;
    margin-bottom: 0.0rem;
    line-height: 1.2;
    word-break: break-word;
}









.bot-info-right {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    margin-left: auto;               /* ← ВАЖНО: выталкивает элемент вправо */
    order: 2;                        /* ← Гарантирует что будет последним */
}

.bot-info-left {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    order: 1;                        /* ← Гарантирует что будет первым */
}
/*
.bots-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}*/
.bots-grid {
    display: grid;
    flex-direction: column;
    align-items: center;
    grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
    gap: 2rem;
    margin-top: 1.0rem;
}

.bot-card {
    background: white;
    border-radius: 12px;
    padding: 1.2rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
    width: 100%;
}

.bot-card.running {
    border-left: 4px solid #38a169;
}

.bot-card.stopped {
    border-left: 4px solid #e53e3e;
}

.bot-card.starting {
    border-left: 4px solid #d69e2e;
}



.bot-info-left {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    flex: 1;
}

.bot-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
    flex-shrink: 0;
}



.bot-name {
    margin: 0 0 0.3rem 0;
    color: #1a202c;
    font-size: 1.1rem;
    font-weight: 600;
}



.bot-type {
    background: #667eea;
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

.bot-provider {
    background: #edf2f7;
    color: #4a5568;
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
}
.bot-created {
    background: #edf2f7;
    color: #4a5568;
    padding: 0.2rem 0.6rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 500;
}

/* Status badge on right */
.bot-info-right {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}



/* Horizontal content layout */
/*
.bot-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 0.5rem;
}*/

.bot-content {
    display: grid;
    gap: 1.2rem;
    margin-bottom: 0.5rem;
    justify-content:  stretch ;
}



.section-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.8rem;
    color: #2d3748;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
}






.config-item {
    background: white;
    padding: 0.3rem 0.5rem 0.3rem 0.5rem;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
}


.metric-item {
    background: white;
    padding: 0.3rem 0.5rem 0.3rem 0.5rem;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    text-align: center;
    transition: all 0.2s ease;
}

.config-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}


.metric-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.6rem;
}


.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.6rem;
}

/* Subtle version */
.metric-item.positive {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-left: 4px solid #16a34a;
}

.metric-item.negative {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 4px solid #dc2626;
}

.metric-item.neutral {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-left: 4px solid #0ea5e9;
}

.metric-item.positive .config-value {
    color: #15803d;
    font-weight: 600;
}

.metric-item.negative .config-value {
    color: #b91c1c;
    font-weight: 600;
}

.metric-item.neutral .config-value {
    color: #0369a1;
    font-weight: 600;
}



.metric-value.positive {
    color: #38a169;
}

.metric-value.negative {
    color: #e53e3e;
}







.bot-info-right {
    margin-left: auto !important;
    order: 2 !important;
}

.bot-info-left {
    order: 1 !important;
}
/*
.user-menu a{
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
}*/

.user-menu span {
    font-size: 1.1em;
    font-weight: 600;
    color: white;
    padding: 8px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background: #667eea;
    border-radius: 25px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    margin-left: 0.5rem;
    margin-right: 0.5rem;
}


.user-menu {
    display: flex;
    align-items: stretch; /* ← Выравнивание по вертикали по центру */
    gap: 5px;
    height: 100%; /* Занимает всю высоту header */
}
/*
.btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;

    font-weight: 500;
    transition: all 0.2s;
}*/

.config-edit {

background: none;
 border: none;
    cursor: pointer;
    transition: all 0.2s ease;

}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 1.0rem;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
}
/*
.btn-primary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}*/
/*
.btn-secondary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}*/

.btn-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}
/* Анимация иконок при наведении */
.btn:hover .btn-icon {
    transform: scale(1.1);
    transition: transform 0.2s ease;
}

.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    margin: 10% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease;
    overflow: hidden;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
}

.modal-header h3 {
    margin: 0;
    color: #dc2626;
    font-size: 1.5em;
}

.modal-message {
    margin: 0;
    color: #404040;
    font-size: 1.0em;
}
/*
.modal-additional {
    display: flex;
    align-items: center;
    margin: 10px 0;
}*/


.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6b7280;
    padding: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.modal-body {
    padding: 24px;
    text-align: center;
}

.warning-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.warning-text {
    color: #ef4444;
    font-weight: 500;
    margin-top: 12px;
    font-size: 0.95em;
}

.modal-footer {
    display: flex;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid #e5e7eb;
    justify-content: flex-end;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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


.menu-toggle {
    background: none;
    border: none;
    color: #000; /* чёрный цвет */
    font-size: 28px;
    cursor: pointer;
    margin-right: 0px;
    margin-left: 10px;
    padding: 0px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle:hover {
    opacity: 0.7;
    transform: scale(1.1);
}

/* Панель */
.side-panel {
    position: fixed;
    top: 0;
    right: -280px; /* скрыта по умолчанию */
    width: 280px;
    height: 100%;
    background-color: #1e1e2f;
    color: #fff;
    box-shadow: 3px 0 10px rgba(0,0,0,0.3);
    transition: right 0.3s ease;
    z-index: 1000;
    padding: 20px;
}

.side-panel.open {
    right: 0;
}

.side-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
}

.side-panel-menu {
    display: grid;
    list-style: none;
    padding: 0;
    margin-top: 30px;
    gap: 1rem;
}
/*
.side-panel-menu li {
    margin: 15px 0;
}*/
/*
.side-panel-menu a {
    color: #fff;
    text-decoration: none;
    font-size: 18px;
}

.side-panel-menu a:hover {
    text-decoration: underline;
}*/

.checkbox-group {
    display: flex;
    align-items: center;
    margin: 10px 0;
    flex-direction: column;
    gap: 0.5rem;
}

/* Основная структура */
.styled-checkbox {
    position: relative;
    display: flex;
    align-items: center;
    font-size: 1.1rem; /* крупнее текст */
    cursor: pointer;
    user-select: none;
}

/* Скрываем стандартный чекбокс */
.styled-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

/* Наш кастомный квадрат */
.styled-checkbox .checkmark {
    width: 22px;
    height: 22px;
    background-color: #f0f0f0;
    border: 2px solid #444;
    border-radius: 6px;
    margin-right: 10px;
    transition: all 0.2s ease;
}

/* Галочка при выборе */
.styled-checkbox input[type="checkbox"]:checked + .checkmark {
    background-color: #007bff;
    border-color: #007bff;
}

.styled-checkbox input[type="checkbox"]:checked + .checkmark::after {
    content: "✔";
    position: absolute;
    left: 5px;
    top: 1px;
    font-size: 16px;
    color: white;
}

/* Подпись */
.checkbox-label {
    color: #222;
    font-weight: 500;
}

/* Эффект при наведении */
.styled-checkbox:hover .checkmark {
    background-color: #e8e8e8;
}

@media (max-width: 768px) {


    .header h1 {
        font-size: 1.5rem; /* Можно чуть уменьшить заголовок */
    }

    .bots-grid {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    }

/*
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200vh;
    background-color: #f5f5f5;
}

    .auth-form {
        background: white;
        padding: 2rem;
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);


    }*/

}