/* ==========================================================================
   1) Genel gövde + Tema değişkenleri
   ========================================================================== */

.bot-body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
        sans-serif;
    min-height: 100vh;
    background-color: var(--bg-body);
    color: var(--text-primary);
    overflow-x: hidden;
}

/* DARK THEME -------------------------------------------------------------- */

.bot-body[data-theme="dark"],
body[data-theme="dark"] {
    --bg-body: #020617;
    --bg-elevated: #020617;
    --bg-card: #0b1120;
    --bg-card-soft: #020617;
    --bg-console: #020617;
    --bg-table-header: #020617;
    --bg-table-row-alt: #020617;
    --border-subtle: #111827;
    --border-strong: #1f2937;
    --text-primary: #e5e7eb;
    --text-secondary: #9ca3af;
    --text-soft: #6b7280;
    --accent: #0ea5e9;
    --accent-soft: rgba(56, 189, 248, 0.18);
    --accent-strong: #38bdf8;
    --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.8);
    --shadow-card: 0 12px 30px rgba(15, 23, 42, 0.7);
    --input-bg: #020617;
    --input-border: #1f2937;
    --input-border-focus: #38bdf8;
    --input-placeholder: #6b7280;
}

/* LIGHT THEME ------------------------------------------------------------- */

.bot-body[data-theme="light"],
body[data-theme="light"] {
    --bg-body: #f3f4f6;
    --bg-elevated: #f9fafb;
    --bg-card: #ffffff;
    --bg-card-soft: #f3f4f6;
    --bg-console: #f9fafb;
    --bg-table-header: #e5e7eb;
    --bg-table-row-alt: #f9fafb;
    --border-subtle: #e5e7eb;
    --border-strong: #d1d5db;
    --text-primary: #111827;
    --text-secondary: #4b5563;
    --text-soft: #6b7280;
    --accent: #0ea5e9;
    --accent-soft: rgba(14, 165, 233, 0.15);
    --accent-strong: #0284c7;
    --shadow-soft: 0 18px 40px rgba(15, 23, 42, 0.15);
    --shadow-card: 0 12px 30px rgba(15, 23, 42, 0.12);
    --input-bg: #ffffff;
    --input-border: #d1d5db;
    --input-border-focus: #0ea5e9;
    --input-placeholder: #9ca3af;
}

/* ==========================================================================
   2) Layout & Global
   ========================================================================== */

.container-fluid {
    max-width: 1440px;
}

.bot-body a {
    text-decoration: none;
}

.bot-body .btn,
.bot-modal .btn {
    font-size: 0.8rem;
    border-radius: 999px;
}

.bot-body .btn-sm,
.bot-modal .btn-sm {
    padding: 0.2rem 0.7rem;
}

/* ==========================================================================
   3) Header, üst bar, butonlar
   ========================================================================== */

/* Header Status & Controls - Modern Design */
.bot-header-status {
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid var(--border-subtle);
    background: radial-gradient(
            circle at 0% 0%,
            var(--accent-soft),
            transparent 60%
        ),
        var(--bg-card-soft);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    min-width: 120px;
    justify-content: center;
}

.bot-header-status.connected {
    border-color: rgba(34, 197, 94, 0.4);
    background: radial-gradient(
            circle at 0% 0%,
            rgba(34, 197, 94, 0.15),
            transparent 60%
        ),
        var(--bg-card-soft);
}

.bot-header-status.connected .status-dot {
    background: #22c55e;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.5);
}

.bot-header-status.disconnected {
    border-color: rgba(239, 68, 68, 0.4);
    background: radial-gradient(
            circle at 0% 0%,
            rgba(239, 68, 68, 0.15),
            transparent 60%
        ),
        var(--bg-card-soft);
}

.bot-header-status.disconnected .status-dot {
    background: #ef4444;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

.bot-header-status .status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #9ca3af;
    display: inline-block;
    animation: pulse 2s infinite;
}

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

.bot-header-status .status-text {
    color: var(--text-primary);
    font-weight: 500;
}

.bot-header-wallet {
    padding: 0.5rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    background: radial-gradient(
            circle at 0% 0%,
            rgba(251, 191, 36, 0.15),
            transparent 60%
        ),
        var(--bg-card-soft);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-soft);
    font-size: 0.85rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.bot-header-wallet:hover {
    border-color: rgba(251, 191, 36, 0.4);
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(251, 191, 36, 0.2);
}

/* Light theme için özel ayarlamalar */
.bot-body[data-theme="light"] .bot-header-wallet:hover,
body[data-theme="light"] .bot-header-wallet:hover {
    box-shadow: 0 8px 25px rgba(251, 191, 36, 0.15);
}

.bot-body[data-theme="light"] .bot-header-status.connected,
body[data-theme="light"] .bot-header-status.connected {
    border-color: rgba(34, 197, 94, 0.3);
    background: radial-gradient(
            circle at 0% 0%,
            rgba(34, 197, 94, 0.1),
            transparent 60%
        ),
        var(--bg-card-soft);
}

.bot-body[data-theme="light"] .bot-header-status.disconnected,
body[data-theme="light"] .bot-header-status.disconnected {
    border-color: rgba(239, 68, 68, 0.3);
    background: radial-gradient(
            circle at 0% 0%,
            rgba(239, 68, 68, 0.1),
            transparent 60%
        ),
        var(--bg-card-soft);
}

.bot-body[data-theme="light"] .bot-header-settings:hover,
body[data-theme="light"] .bot-header-settings:hover {
    box-shadow: 0 4px 12px rgba(250, 204, 21, 0.15);
}

.bot-body[data-theme="light"] .bot-header-sound:hover,
body[data-theme="light"] .bot-header-sound:hover {
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.2);
}

.bot-header-wallet .wallet-label {
    font-size: 0.75rem;
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.bot-header-wallet #wallet-total,
.bot-header-wallet #wallet-used {
    color: var(--text-primary);
    font-weight: 600;
}

.bot-header-sound {
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--border-subtle);
    background: var(--bg-card-soft);
    color: var(--text-primary);
    transition: all 0.3s ease;
    position: relative;
}

.bot-header-sound:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(14, 165, 233, 0.3);
}

.bot-header-sound.sound-disabled {
    opacity: 0.6;
}

.bot-header-sound.sound-disabled .fa-bell {
    display: none !important;
    visibility: hidden !important;
}

.bot-header-sound.sound-disabled .sound-disabled-icon {
    display: inline-block !important;
    visibility: visible !important;
    color: #ef4444;
}

.bot-header-sound .fa-bell {
    display: inline-block;
    visibility: visible;
}

.bot-header-sound .sound-disabled-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.85rem;
    color: #ef4444;
    display: none;
    visibility: hidden;
}

.bot-header-settings {
    border: 1px solid var(--border-subtle);
    background: radial-gradient(
            circle at 0% 0%,
            rgba(250, 204, 21, 0.15),
            transparent 60%
        ),
        var(--bg-card-soft);
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.3s ease;
}

.bot-header-settings:hover {
    border-color: rgba(250, 204, 21, 0.4);
    background: radial-gradient(
            circle at 0% 0%,
            rgba(250, 204, 21, 0.25),
            transparent 60%
        ),
        var(--bg-card-soft);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(250, 204, 21, 0.2);
}

.bot-header-toggle {
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
}

.bot-header-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.bot-header-toggle.btn-success {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.4);
}

.bot-header-toggle.btn-success:hover {
    box-shadow: 0 6px 25px rgba(34, 197, 94, 0.5);
}

.bot-header-toggle.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.bot-header-toggle.btn-danger:hover {
    box-shadow: 0 6px 25px rgba(239, 68, 68, 0.5);
}

.wallet-box {
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    background: radial-gradient(
            circle at 0% 0%,
            var(--accent-soft),
            transparent 55%
        ),
        var(--bg-card-soft);
    box-shadow: var(--shadow-soft);
    font-size: 0.85rem;
}

.wallet-box span {
    color: var(--text-secondary);
}

.wallet-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-soft);
}

.wallet-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.wallet-refresh-btn {
    border-radius: 999px;
    border: 1px solid transparent;
    padding: 0.2rem 0.55rem;
    font-size: 0.7rem;
}

/* Üstteki action butonları */

.btn-start-bot {
    background: linear-gradient(90deg, #22c55e, #16a34a);
    border: none;
    color: #ffffff;
    box-shadow: 0 10px 25px rgba(34, 197, 94, 0.35);
}

.btn-start-bot[disabled] {
    opacity: 0.65;
    box-shadow: none;
}

.btn-settings {
    background: #facc15;
    border-color: #facc15;
    color: #1f2937;
}

.btn-symbols {
    background: #0ea5e9;
    border-color: #0ea5e9;
    color: #ffffff;
}

.btn-manual {
    background: #6366f1;
    border-color: #6366f1;
    color: #ffffff;
}

/* ==========================================================================
   4) Kartlar (istatistik kutuları)
   ========================================================================== */

.bot-card {
    background: radial-gradient(
            circle at 0% 0%,
            var(--accent-soft),
            transparent 60%
        ),
        var(--bg-card);
    border-radius: 1rem;
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    box-shadow: var(--shadow-card);
    position: relative;
    overflow: hidden;
}

.bot-card::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(
        to bottom right,
        rgba(148, 163, 184, 0.1),
        transparent 40%
    );
}

.bot-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-soft);
}

.bot-card .fs-5 {
    font-size: 1.1rem !important;
}

/* ==========================================================================
   5) Tabs (Açık / Kapalı / Konsol)
   ========================================================================== */

.bot-tabs {
    border-bottom: 1px solid var(--border-subtle);
}

.bot-tabs .nav-link {
    border-radius: 0;
    border: none;
    color: var(--text-soft);
    font-size: 0.85rem;
    padding: 0.5rem 0.9rem;
    background-color: transparent;
    position: relative;
}

.bot-tabs .nav-link::after {
    content: "";
    position: absolute;
    left: 0.9rem;
    right: 0.9rem;
    bottom: 0;
    height: 2px;
    border-radius: 999px;
    background: transparent;
    transition: background 0.12s ease;
}

.bot-tabs .nav-link:hover {
    color: var(--text-secondary);
}

.bot-tabs .nav-link.active {
    color: var(--text-primary);
    background-color: var(--bg-elevated);
}

.bot-tabs .nav-link.active::after {
    background: linear-gradient(90deg, var(--accent), var(--accent-strong));
}

.bot-tab-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.15rem 0.5rem;
    font-size: 0.72rem;
    background-color: var(--bg-card-soft);
    color: var(--text-secondary);
}

/* ==========================================================================
   6) Tablolar + DataTables
   ========================================================================== */

/* Genel tablo görünümü */

.bot-body table.table,
.bot-modal table.table {
    width: 100%;
    background-color: var(--bg-card);
    color: var(--text-primary);
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-soft);
    font-size: 0.82rem;
}

.bot-body table.table thead tr,
.bot-modal table.table thead tr {
    background-color: var(--bg-table-header);
}

.bot-body table.table thead th,
.bot-modal table.table thead th {
    border-bottom: 1px solid var(--border-subtle);
    border-top: none;
    padding: 0.6rem 0.75rem;
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
}

.bot-body table.table tbody tr,
.bot-modal table.table tbody tr {
    background-color: var(--bg-card);
    transition: background-color 0.12s ease, transform 0.06s ease;
}

.bot-body table.table tbody tr:nth-child(even),
.bot-modal table.table tbody tr:nth-child(even) {
    background-color: var(--bg-table-row-alt);
}

.bot-body table.table tbody tr:hover,
.bot-modal table.table tbody tr:hover {
    background-color: rgba(148, 163, 184, 0.08);
}

.bot-body table.table td,
.bot-modal table.table td {
    vertical-align: middle;
    border-top-color: var(--border-subtle);
    padding: 0.55rem 0.75rem;
}

/* PnL renkleri */

.pnl-positive {
    color: #22c55e !important;
}

.pnl-negative {
    color: #ef4444 !important;
}

/* DataTables - filtre, sayfalama, vb. */

table.dataTable {
    width: 100% !important;
}

.dataTables_wrapper {
    margin-top: 0.4rem;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.dataTables_wrapper .dataTables_filter {
    display: none !important;
}

.dataTables_wrapper .dataTables_length select {
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text-primary);
    border-radius: 999px;
    padding: 0.1rem 1.8rem 0.1rem 0.4rem;
    font-size: 0.78rem;
}

.dataTables_wrapper .dataTables_info {
    padding-top: 0.25rem !important;
}

.dataTables_wrapper .dataTables_paginate {
    margin-top: 0.25rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    border-radius: 999px;
    border: 1px solid transparent;
    margin: 0 2px;
    padding: 0.15rem 0.6rem;
    font-size: 0.75rem;
    color: var(--text-secondary) !important;
    background: transparent;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--text-primary) !important;
}

/* Modal içindeki DataTables */

.bot-modal .dataTables_wrapper .dataTables_length select,
.bot-modal .dataTables_wrapper .dataTables_paginate .paginate_button,
.bot-modal .dataTables_wrapper .dataTables_info {
    color: var(--text-secondary);
}

/* ==========================================================================
   7) Form elemanları
   ========================================================================== */

.bot-body .form-control,
.bot-body .form-select,
.bot-modal .form-control,
.bot-modal .form-select {
    background-color: var(--input-bg);
    border-color: var(--input-border);
    color: var(--text-primary);
    font-size: 0.82rem;
}

.bot-body .form-control::placeholder,
.bot-modal .form-control::placeholder {
    color: var(--input-placeholder);
}

.bot-body .form-control:focus,
.bot-body .form-select:focus,
.bot-modal .form-control:focus,
.bot-modal .form-select:focus {
    background-color: var(--input-bg);
    border-color: var(--input-border-focus);
    color: var(--text-primary);
    box-shadow: 0 0 0 1px var(--accent-soft);
}

/* ==========================================================================
   8) Modallar (Bootstrap + özel)
   ========================================================================== */

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

/* Tüm modallar (bot-body içinde) temaya bağlı olsun */

.bot-body .modal-content {
    background-color: var(--bg-card);
    color: var(--text-primary);
    border-radius: 1rem;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-card);
}

.bot-body .modal-header {
    border-bottom-color: var(--border-subtle);
    background: radial-gradient(
        circle at 0% 0%,
        var(--accent-soft),
        transparent 55%
    );
}

.bot-body .modal-footer {
    border-top-color: var(--border-subtle);
    background-color: var(--bg-elevated);
}

.bot-body .modal .form-control,
.bot-body .modal .form-select {
    background-color: var(--input-bg);
    border-color: var(--input-border);
    color: var(--text-primary);
}

.bot-body .modal .form-control::placeholder {
    color: var(--input-placeholder);
}

.bot-body .modal .form-control:focus,
.bot-body .modal .form-select:focus {
    background-color: var(--input-bg);
    border-color: var(--input-border-focus);
    color: var(--text-primary);
    box-shadow: 0 0 0 1px var(--accent-soft);
}

/* Close butonu */

.btn-close-white {
    filter: invert(1);
}

/* ==========================================================================
   9) Konsol alanı
   ========================================================================== */

/* Terminal benzeri console görünümü */
.bot-terminal {
    background: linear-gradient(135deg, #0a0e27 0%, #1a1f3a 100%);
    border: 1px solid var(--border-strong);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.bot-terminal-header {
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid var(--border-strong);
    padding: 0.5rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 600;
}

.bot-terminal-title {
    color: var(--accent-strong);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.bot-terminal-status {
    color: #22c55e;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.bot-terminal-status::before {
    content: "●";
    font-size: 0.5rem;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%,
    100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

.bot-console {
    background-color: #0a0e27;
    padding: 1rem;
    font-family: "Courier New", "Consolas", "Monaco", "Menlo", monospace;
    font-size: 0.8rem;
    line-height: 1.6;
    max-height: 450px;
    overflow-y: auto;
    white-space: pre-wrap;
    color: #e5e7eb;
}

.bot-console::-webkit-scrollbar {
    width: 8px;
}

.bot-console::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.bot-console::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 4px;
}

.bot-console::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

.bot-console-prompt {
    color: var(--accent-strong);
    margin-right: 0.5rem;
    font-weight: bold;
}

.bot-console-time {
    color: #6b7280;
    margin-right: 0.5rem;
}

.bot-console-level {
    font-weight: 600;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    margin-right: 0.5rem;
    font-size: 0.7rem;
    text-transform: uppercase;
}

.bot-console-level-info {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.bot-console-level-trade {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

.bot-console-level-error {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.bot-console-tag {
    color: var(--accent);
    font-weight: 500;
    margin-right: 0.5rem;
}

.bot-console-message {
    color: #e5e7eb;
}

.bot-console-empty {
    color: #6b7280;
    text-align: center;
    padding: 2rem;
    font-style: italic;
}

.bot-console-tabs {
    border-bottom: 2px solid var(--border-subtle);
    margin-bottom: 0;
}

.bot-console-tabs .nav-link {
    color: var(--text-secondary);
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    padding: 0.5rem 1rem;
    transition: all 0.2s;
}

.bot-console-tabs .nav-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    border-bottom-color: var(--border-subtle);
}

.bot-console-tabs .nav-link.active {
    color: var(--accent-strong);
    background: transparent;
    border-bottom-color: var(--accent-strong);
    font-weight: 600;
}

.bot-console-group-header {
    color: var(--accent-strong);
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.5rem 0;
    margin: 0.75rem 0 0.25rem 0;
    border-bottom: 1px solid var(--border-subtle);
    opacity: 0.8;
    letter-spacing: 0.05em;
}

.bot-console-line {
    padding: 0.25rem 0;
    border-left: 2px solid transparent;
    padding-left: 0.5rem;
    margin: 0.1rem 0;
    transition: all 0.2s;
}

.bot-console-line:hover {
    background: rgba(255, 255, 255, 0.03);
    border-left-color: var(--accent);
}

/* ==========================================================================
   10) SweetAlert2 – tema ve tip bazlı stiller
   ========================================================================== */

/* Tüm SweetAlert pencereleri temaya uysun */

.swal2-popup {
    background-color: var(--bg-card) !important;
    color: var(--text-primary) !important;
    border-radius: 1rem !important;
    border: 1px solid var(--border-subtle) !important;
    box-shadow: var(--shadow-card) !important;
    padding-bottom: 1.5rem !important;
}

.swal2-title {
    color: var(--text-primary) !important;
    font-size: 0.95rem !important;
    letter-spacing: 0.02em;
}

.swal2-html-container {
    color: var(--text-secondary) !important;
    font-size: 0.8rem !important;
}

.swal2-actions {
    margin-top: 1.25rem !important;
}

.swal2-confirm,
.swal2-cancel {
    border-radius: 999px !important;
    font-size: 0.8rem !important;
    padding: 0.45rem 1.1rem !important;
}

/* Default confirm – mavi accent */
.swal2-confirm {
    background: linear-gradient(
        90deg,
        var(--accent),
        var(--accent-strong)
    ) !important;
    border: none !important;
    color: #ffffff !important;
}

/* Default cancel – şeffaf */
.swal2-cancel {
    background: transparent !important;
    border: 1px solid var(--border-subtle) !important;
    color: var(--text-primary) !important;
}

/* Tip ikonları */

.swal2-icon.swal2-success {
    border-color: #22c55e !important;
    color: #22c55e !important;
}

.swal2-icon.swal2-error {
    border-color: #ef4444 !important;
    color: #ef4444 !important;
}

.swal2-icon.swal2-warning {
    border-color: #facc15 !important;
    color: #facc15 !important;
}

.swal2-icon.swal2-info {
    border-color: #0ea5e9 !important;
    color: #0ea5e9 !important;
}

/* Senin özel bot swal sınıfların (manual close vb) */

.bot-swal-popup {
    border-radius: 1rem;
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-card);
    padding-bottom: 1.5rem;
}

.bot-swal-title {
    font-size: 0.95rem;
    letter-spacing: 0.02em;
}

.bot-swal-html {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.bot-swal-confirm {
    background: linear-gradient(90deg, #dc2626, #fb923c);
    border: none;
    color: #ffffff;
    padding: 0.45rem 1.1rem;
    border-radius: 999px;
    font-size: 0.8rem;
    margin-left: 0.5rem;
}

.bot-swal-cancel {
    background: transparent;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    padding: 0.45rem 1.1rem;
    font-size: 0.8rem;
}

/* ==========================================================================
   11) Utility / text renkleri
   ========================================================================== */

.text-muted,
.text-secondary {
    color: var(--text-secondary) !important;
}

/* ==========================================================================
   12) Responsive ufak dokunuşlar
   ========================================================================== */

/* ==========================================================================
   Mobile Responsive Styles
   ========================================================================== */

@media (max-width: 768px) {
    /* Container padding azalt */
    .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    /* Row gutter'ı mobilde azalt */
    .row.g-3 {
        --bs-gutter-x: 0.75rem;
        --bs-gutter-y: 0.75rem;
    }

    /* Header Layout - Title yukarıda, kontroller altta */
    .container-fluid > .d-flex:first-child {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 1rem;
        margin-bottom: 1rem !important;
    }

    .bot-title {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .container-fluid > .d-flex:first-child > .d-flex:last-child {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    /* Connection Status - Sadece dot göster */
    .bot-header-status {
        min-width: 40px;
        width: 40px;
        height: 40px;
        padding: 0;
        justify-content: center;
    }

    .bot-header-status .status-text {
        display: none;
    }

    .bot-header-status .status-dot {
        width: 12px;
        height: 12px;
    }

    /* Wallet Box - Sadece icon ve sayılar, label gizle */
    .bot-header-wallet {
        padding: 0.5rem 0.75rem;
        min-width: auto;
    }

    .bot-header-wallet .wallet-label {
        display: none;
    }

    .bot-header-wallet .fa-wallet {
        margin-right: 0.25rem;
    }

    /* Wallet'ta "/" karakterini mobilde gizle */
    .bot-header-wallet .text-muted:not(.wallet-label) {
        display: none;
    }

    /* Wallet değerlerini daha kompakt göster */
    .bot-header-wallet #wallet-total,
    .bot-header-wallet #wallet-used {
        font-size: 0.75rem;
    }

    /* Settings Button - Sadece icon */
    .bot-header-settings span {
        display: none;
    }

    .bot-header-settings {
        width: 40px;
        height: 40px;
        padding: 0;
        justify-content: center;
    }

    /* Bot Toggle - Sadece icon */
    .bot-header-toggle .bot-toggle-text {
        display: none;
    }

    .bot-header-toggle {
        width: 40px;
        height: 40px;
        padding: 0;
        justify-content: center;
    }

    /* Sound Toggle - Zaten sadece icon, değişiklik yok */
    .bot-header-sound {
        width: 40px;
        height: 40px;
    }

    /* Cards */
    .wallet-box {
        font-size: 0.8rem;
    }

    .bot-card {
        margin-bottom: 0.5rem;
    }

    /* Tabs */
    .bot-tabs {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .bot-tabs::-webkit-scrollbar {
        display: none;
    }

    .bot-tabs .nav-link {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
        white-space: nowrap;
    }

    /* Search bar */
    #tab-symbol-search-wrapper {
        max-width: 100% !important;
        width: 100%;
        margin-left: 0 !important;
        margin-top: 0.5rem;
    }

    /* Tab container */
    .d-flex.justify-content-between.align-items-center.mb-2 {
        flex-direction: column;
        align-items: stretch !important;
    }

    /* Tab navigation - Altta şık görünüm */
    .bot-tabs {
        border-bottom: 2px solid var(--border-subtle);
        padding-bottom: 0.5rem;
        margin-bottom: 1rem;
    }

    .bot-tabs .nav-link {
        border-radius: 0.5rem;
        margin-right: 0.25rem;
    }
}

/* Mobile - Tab navigation bottom fixed (opsiyonel) */
@media (max-width: 576px) {
    /* Tab navigation için ek stil */
    .bot-tabs {
        display: flex;
        gap: 0.25rem;
    }

    .bot-tabs .nav-link {
        flex: 1;
        text-align: center;
        font-size: 0.75rem;
        padding: 0.5rem 0.4rem;
    }
}

@media (max-width: 576px) {
    /* Daha küçük ekranlar için ek ayarlamalar */
    .bot-header-status,
    .bot-header-sound,
    .bot-header-settings,
    .bot-header-toggle {
        width: 36px;
        height: 36px;
    }

    .bot-header-wallet {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
    }

    .bot-title-main {
        font-size: 1.5rem;
    }

    .bot-title-brand-text {
        font-size: 0.7rem;
    }

    .bot-title-brandline {
        margin-top: 0.25rem;
    }

    /* Title'ı daha kompakt yap */
    .bot-title {
        line-height: 1.2;
    }

    /* Stat cards - Mobilde tek sütun (her kart tam genişlik) */
    .row.g-3.mb-4 > [class*="col-md-"] {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    /* Tarama Özeti ve Açık Pozisyon PnL Özeti kartları mobilde alt alta */
    .row.g-3.mb-4 > .col-lg-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* TradingView widget - Mobilde kart içinde, padding korunuyor, sadece görsel efektler kaldırılıyor */
    .bot-market-ticker-wrapper {
        padding: 1rem !important;
        background: var(--bg-card) !important;
        border: 1px solid var(--border-subtle) !important;
        box-shadow: var(--shadow-card) !important;
        margin: 0 !important;
        border-radius: 1rem !important;
    }

    .bot-market-ticker-wrapper::after {
        display: none !important;
    }

    .bot-market-ticker-wrapper .d-flex {
        margin-bottom: 0 !important;
        padding: 0;
    }

    .bot-market-ticker-wrapper .bot-market-ticker {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding: 0;
    }

    /* TradingView widget container mobilde tam genişlik */
    .tradingview-widget-container {
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: auto;
        margin: 0 !important;
    }

    /* TradingView iframe mobilde responsive */
    .tradingview-widget-container iframe {
        width: 100% !important;
        max-width: 100% !important;
        min-height: 200px;
    }

    /* TradingView row ve col - Normal row/col davranışı, padding korunuyor */
    .row.g-3.mb-4:has(.bot-market-ticker-wrapper) {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .row.g-3.mb-4 .col-12:has(.bot-market-ticker-wrapper) {
        padding-left: calc(var(--bs-gutter-x, 0.75rem) * 0.5) !important;
        padding-right: calc(var(--bs-gutter-x, 0.75rem) * 0.5) !important;
    }

    .row.g-3.mb-4 .col-12 .bot-market-ticker-wrapper {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
    }

    /* ==================== MODAL MOBİL UYUMLULUK ==================== */

    /* Modal dialog - Mobilde tam genişlik, margin yok */
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }

    .modal-dialog.modal-xl {
        max-width: calc(100% - 1rem);
    }

    /* Modal içeriği */
    .bot-modal {
        margin: 0;
    }

    /* Modal body padding azalt */
    .modal-body {
        padding: 1rem;
    }

    /* Modal header padding azalt */
    .modal-header {
        padding: 1rem;
    }

    /* Modal tabs - Mobilde scroll */
    .bot-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        -ms-overflow-style: none;
        flex-wrap: nowrap;
    }

    .bot-tabs::-webkit-scrollbar {
        display: none;
    }

    .bot-tabs .nav-link {
        white-space: nowrap;
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
    }

    /* Form row'ları mobilde tek sütun */
    .bot-modal .row.g-3 > [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* Risk ayarları - Tüm col-md-3, col-md-4, col-lg-4 tek sütun */
    #risk-settings .row.g-3 > [class*="col-md-"],
    #risk-settings .row.g-3 > [class*="col-lg-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* Tarama ayarları - Tüm col-md tek sütun */
    #scan-settings .row.g-3 > [class*="col-md-"],
    #scan-settings .row.g-3 > [class*="col-lg-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }

    /* EMA fields - Mobilde tek sütun */
    .ema-fields {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    /* Form label'ları */
    .bot-modal .form-label {
        font-size: 0.85rem;
        margin-bottom: 0.5rem;
    }

    /* Form control'ler */
    .bot-modal .form-control,
    .bot-modal .form-select {
        font-size: 0.85rem;
    }

    /* Toggle switch'ler - Daha büyük */
    .bot-modal .form-check.form-switch {
        padding-left: 2.5rem;
    }

    .bot-modal .form-check-input {
        width: 2rem;
        height: 1.25rem;
    }

    /* Butonlar - Mobilde tam genişlik */
    .bot-modal .btn {
        width: 100%;
        margin-top: 0.5rem;
    }

    /* Risk ayarları kaydet butonu */
    #risk-settings .col-md-2.text-end {
        flex: 0 0 100%;
        max-width: 100%;
        text-align: center !important;
    }

    #risk-settings .col-md-2.text-end .btn {
        width: 100%;
    }

    /* Tarama ayarları kaydet butonu */
    #scan-settings .col-12.text-end {
        text-align: center !important;
    }

    #scan-settings .col-12.text-end .btn {
        width: 100%;
    }

    /* Extra timeframe'ler - Mobilde tek sütun */
    .d-flex.flex-wrap.gap-3 {
        flex-direction: column;
        gap: 0.5rem !important;
    }

    /* Sembol filtreleme - Mobilde alt alta */
    .d-flex.flex-wrap.align-items-center.gap-3 {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.75rem !important;
    }

    /* Limit input - Mobilde tam genişlik */
    .form-control.w-auto {
        width: 100% !important;
    }
}

@media (max-width: 576px) {
    /* Daha küçük ekranlar için ek ayarlamalar */
    .modal-dialog {
        margin: 0.25rem;
        max-width: calc(100% - 0.5rem);
    }

    .modal-body {
        padding: 0.75rem;
    }

    .modal-header {
        padding: 0.75rem;
    }

    .bot-modal-title-text {
        font-size: 1rem;
    }

    .bot-tabs .nav-link {
        font-size: 0.7rem;
        padding: 0.4rem 0.6rem;
    }
}

.bot-progress-wrapper {
    position: relative;
    background: var(--bg-elevated);
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    height: 0.9rem;
    display: flex;
    align-items: center;
}

.bot-progress-line {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: calc(var(--progress, 50) * 1%);
    opacity: 0.75;
    transition: width 0.18s ease, opacity 0.18s ease, background 0.18s ease;
}

.bot-progress-pos {
    background: linear-gradient(90deg, #16a34a, #22c55e);
}

.bot-progress-neg {
    background: linear-gradient(90deg, #b91c1c, #f97316);
}

.bot-progress-neutral {
    background: #6b7280; /* gri */
}

.bot-progress-label {
    position: relative;
    z-index: 1;
    font-size: 0.7rem;
    width: 100%;
    text-align: center;
    color: var(--text-primary);
}

.bot-ema-hidden {
    visibility: hidden; /* eleman görünmez ama yer kaplamaya devam eder */
}

/* İstersen mobile’da boşluk kalmasın diye şöyle yapabilirsin: */
@media (max-width: 768px) {
    .bot-ema-hidden {
        display: none; /* küçük ekranda tamamen gizle */
    }
}
.bot-console-line {
    padding: 0.05rem 0.25rem;
}

/* Level bazlı - Terminal görünümü için */
.bot-console-line.bot-log-info {
    border-left-color: rgba(59, 130, 246, 0.3);
}

.bot-console-line.bot-log-trade {
    border-left-color: rgba(34, 197, 94, 0.3);
}

.bot-console-line.bot-log-error {
    border-left-color: rgba(239, 68, 68, 0.5);
    background: rgba(239, 68, 68, 0.05);
}

/* Tag bazlı override’lar */
.bot-log-buy {
    color: #22c55e; /* yeşil */
}

.bot-log-sell {
    color: #f97373; /* kırmızı */
}

.bot-log-dca {
    color: #38bdf8; /* mavi */
}

.bot-log-scan {
    color: #a855f7; /* mor */
}
.bot-log-guard {
    color: #38bdf8; /* açık mavi (sky-400) */
    font-weight: 500;
}
/* ============================================================
   Global tablo loading overlay + indicator tarzı animasyon
   ============================================================ */

.bot-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 2050;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
}

.bot-loading-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.bot-loading-box {
    padding: 1.5rem 2rem;
    border-radius: 1rem;
    background: rgba(15, 23, 42, 0.92);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

/* İnce, geniş bir bant üzerinde küçük barlar → indikatör çizgisi hissi */
.bot-loading-chart {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 5px;
    width: 180px;
    height: 36px;
    padding: 6px 8px;
    border-radius: 10px;
    background: radial-gradient(
            circle at 50% 0,
            rgba(56, 189, 248, 0.2),
            transparent
        ),
        rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.5);
    box-shadow: 0 0 25px rgba(15, 23, 42, 0.9);
}

.bot-loading-bar {
    width: 3px;
    border-radius: 999px;
    background: linear-gradient(to top, #1d4ed8, #0ea5e9, #38bdf8);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.85);
    transform-origin: bottom;
    animation: bot-indicator-pulse 0.9s ease-in-out infinite;
    animation-delay: calc(var(--i) * 0.06s);
}

@keyframes bot-indicator-pulse {
    0% {
        height: 20%;
        opacity: 0.6;
    }
    25% {
        height: 70%;
        opacity: 1;
    }
    50% {
        height: 35%;
        opacity: 0.8;
    }
    75% {
        height: 80%;
        opacity: 1;
    }
    100% {
        height: 30%;
        opacity: 0.7;
    }
}

.bot-loading-text {
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #e5e7eb;
    opacity: 0.9;
}
.cur {
    cursor: pointer;
}
.cur:hover {
    color: #0ea5e9;
}
#open-positions-table th,
#open-positions-table td {
    white-space: nowrap;
}

#open-positions-table .col-date {
    width: 140px !important;
}

#open-positions-table .col-symbol {
    width: 110px !important;
}

#open-positions-table .col-price {
    width: 100px !important;
}

#open-positions-table .col-pnl {
    width: 140px !important;
}

#open-positions-table .col-pnl .progress,
#open-positions-table .col-pnl .pnl-progress {
    width: 90px !important;
    margin: 0 auto;
}

#open-positions-table .col-dca {
    width: 50px !important;
    text-align: center !important;
}
#open-positions-table .col-sms {
    width: 50px !important;
    text-align: center !important;
}
#open-positions-table .col-action {
    width: 50px !important;
    text-align: center !important;
}

#open-positions-table .col-action .btn {
    padding: 2px 6px !important;
    font-size: 0.7rem !important;
}

#symbolsModal .symbols-table-wrapper {
    max-height: 60vh;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    scrollbar-color: #3b4252 #0b1017;
    scrollbar-width: thin;
}

#symbolsModal .symbols-table-wrapper table {
    border-collapse: separate;
    border-spacing: 0;
}

#symbolsModal .symbols-table-wrapper table thead th {
    position: sticky;
    top: 0;
    z-index: 5;
    background-color: #131a23;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
    border-bottom: 1px solid #1f2933;
}

#symbolsModal .symbols-table-wrapper::-webkit-scrollbar {
    width: 8px;
}

#symbolsModal .symbols-table-wrapper::-webkit-scrollbar-track {
    background: #0b1017;
}

#symbolsModal .symbols-table-wrapper::-webkit-scrollbar-thumb {
    background: #3b4252;
    border-radius: 4px;
}

#symbolsModal .symbols-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #4c566a;
}

#dailyPnlModal select.pnl-filter-control,
#dailyPnlModal select.pnl-filter-control option {
    background-color: #15171c;
    color: #ffffff;
}

#dailyPnlModal select.pnl-filter-control option:checked,
#dailyPnlModal select.pnl-filter-control option:hover {
    background-color: #0d6efd;
    color: #ffffff;
}
/* --- Ortak modal başlık stili --- */
.bot-modal-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.05rem;
    letter-spacing: 0.04em;
}

/* Yuvarlak icon “badge” */
.bot-modal-title-icon {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.8), 0 0 14px rgba(0, 0, 0, 0.7);
}

.bot-modal-title-icon i {
    font-size: 0.9rem;
    color: #050711;
}

.bot-modal-title-text {
    background: linear-gradient(
        120deg,
        #f8fbff,
        #87d5ff 35%,
        #6affc8 70%,
        #e4e7ff
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 700;
    text-transform: uppercase;
    text-shadow: 0 0 6px rgba(0, 0, 0, 0.8), 0 0 14px rgba(0, 0, 0, 0.9);
}

#manualModal .bot-modal-title-icon.bot-modal-title-icon--manual {
    background: radial-gradient(
        circle at 30% 0%,
        #5bffb7,
        #00b894 55%,
        #003f3b 100%
    );
    box-shadow: 0 0 10px rgba(0, 255, 180, 0.45),
        0 0 18px rgba(0, 184, 148, 0.5);
}

#settingsModal .bot-modal-title-icon.bot-modal-title-icon--settings {
    background: radial-gradient(
        circle at 30% 0%,
        #e056fd,
        #686de0 60%,
        #130f40 100%
    );
    box-shadow: 0 0 10px rgba(224, 86, 253, 0.5),
        0 0 18px rgba(104, 109, 224, 0.5);
}

#symbolsModal .bot-modal-title-icon.bot-modal-title-icon--symbols {
    background: radial-gradient(
        circle at 30% 0%,
        #ffe66d,
        #f0932b 55%,
        #3b2600 100%
    );
    box-shadow: 0 0 10px rgba(255, 230, 109, 0.55),
        0 0 18px rgba(240, 147, 43, 0.55);
}

/* --- Dashboard üst istatistik kartları --- */
.bot-stat-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.9rem 1rem;
    border-radius: 0.9rem;
    background: radial-gradient(
            circle at 0% 0%,
            rgba(255, 255, 255, 0.06),
            transparent 55%
        ),
        linear-gradient(135deg, #11131a, #1a1d25);
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.65),
        0 0 0 1px rgba(255, 255, 255, 0.03);
    transition: transform 0.18s ease-out, box-shadow 0.18s ease-out,
        border-color 0.18s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.bot-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 35px rgba(0, 0, 0, 0.8), 0 0 18px rgba(0, 195, 255, 0.18);
    border-color: rgba(0, 195, 255, 0.28);
}

/* Icon balonu */
.bot-stat-icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 0 14px rgba(0, 0, 0, 0.9), 0 0 20px rgba(0, 0, 0, 0.8);
}

.bot-stat-icon-wrap i {
    font-size: 1rem;
    color: #050711;
}

/* Kart içi text */
.bot-stat-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
}

.bot-stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.7;
    margin-bottom: 0.15rem;
}

.bot-stat-value {
    font-size: 1.05rem;
    font-weight: 700;
    white-space: nowrap;
}

.bot-stat-icon--pnl {
    background: radial-gradient(
        circle at 30% 0%,
        #7effd4,
        #00d2ff 55%,
        #003459 100%
    );
    box-shadow: 0 0 12px rgba(0, 210, 255, 0.55),
        0 0 24px rgba(0, 255, 190, 0.6);
}

.bot-stat-icon--active {
    background: radial-gradient(
        circle at 30% 0%,
        #ffd86a,
        #ff6b6b 55%,
        #3b0500 100%
    );
    box-shadow: 0 0 12px rgba(255, 107, 107, 0.6),
        0 0 24px rgba(255, 216, 106, 0.55);
}

.bot-stat-icon--trades {
    background: radial-gradient(
        circle at 30% 0%,
        #a29bff,
        #5468ff 55%,
        #17153b 100%
    );
    box-shadow: 0 0 12px rgba(164, 155, 255, 0.6),
        0 0 24px rgba(84, 104, 255, 0.55);
}

.bot-stat-icon--symbols {
    background: radial-gradient(
        circle at 30% 0%,
        #ffeaa7,
        #ff9f43 55%,
        #3b2600 100%
    );
    box-shadow: 0 0 12px rgba(255, 234, 167, 0.6),
        0 0 24px rgba(255, 159, 67, 0.6);
}

@media (max-width: 575.98px) {
    .bot-stat-card {
        justify-content: flex-start;
    }
}

.bot-stat-card {
    padding: 1rem 1.25rem;
    border-radius: 1rem;
    background: radial-gradient(
            circle at 0% 0%,
            rgba(255, 255, 255, 0.1),
            transparent 55%
        ),
        linear-gradient(135deg, #0c1018, #171c26);
    box-shadow: 0 24px 40px rgba(0, 0, 0, 0.85),
        0 0 0 1px rgba(255, 255, 255, 0.04);
}

.bot-stat-card::after {
    content: "";
    position: absolute;
    inset-inline: 10%;
    bottom: 4px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(
        90deg,
        rgba(0, 190, 255, 0),
        rgba(0, 190, 255, 0.45),
        rgba(0, 255, 190, 0)
    );
    opacity: 0;
    transition: opacity 0.18s ease-out, transform 0.18s ease-out;
    transform: translateY(2px);
}

.bot-stat-card:hover::after {
    opacity: 1;
    transform: translateY(0);
}

.bot-stat-value {
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-shadow: 0 0 1px rgba(0, 0, 0, 0.7), 0 0 3px currentColor;
}

.bot-stat-label {
    font-size: 0.7rem;
    opacity: 0.75;
}

.bot-stat-icon-wrap {
    width: 46px;
    height: 46px;
}

.bot-stat-icon-wrap i {
    font-size: 1.15rem;
}

@media (max-width: 575.98px) {
    .bot-stat-value {
        font-size: 1.25rem;
    }
}

.bot-pnl-badge-group {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    position: absolute;
    right: 10px;
    padding: 0.5em 0.4em;
    border-radius: 999px;
    background: radial-gradient(
            circle at 0% 0%,
            rgba(255, 255, 255, 0.14),
            transparent 60%
        ),
        linear-gradient(135deg, #151a24, #202736);
}

/* Tek tek badge'ler */
.bot-pnl-badge {
    font-size: 0.65rem;
    line-height: 1.1;
    font-weight: 500;
    text-transform: uppercase;
    color: #dfe4ff;
}

/* USDT her zaman hafif mute */
.bot-pnl-badge-usdt {
    opacity: 0.75;
}

/* Başlık: küçük ve daha az baskın */
.bot-stat-card--risk .bot-stat-label {
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    opacity: 0.8;
}

/* Ana bilgi satırı (şu an iri ve çirkin olan kısım) */
.bot-stat-card--risk .bot-stat-value {
    font-size: 0.95rem;
    font-weight: 500;
    color: #e5e7eb; /* açık gri */
}

/* Kart içindeki ikon biraz küçülsün */
.bot-stat-card--risk .bot-stat-icon-wrap i {
    font-size: 1rem;
}
.bot-pnl-badge.status-ok {
    background: rgba(22, 163, 74, 0.15);
    color: #4ade80;
    text-shadow: 0 0 6px rgba(74, 222, 128, 0.65); /* hafif glow */
    font-size: 0.65rem;
    font-weight: 600;
}

.bot-pnl-badge.status-risk {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    text-shadow: 0 0 6px rgba(248, 113, 113, 0.55);
    font-size: 0.65rem;
    font-weight: 600;
}

.bot-pnl-badge.status-disabled {
    background: rgba(148, 163, 184, 0.22);
    color: #e5e7eb;
    font-size: 0.65rem;
    font-weight: 600;
}

.bot-pnl-badge.status-unknown {
    background: rgba(75, 85, 99, 0.4);
    color: #e5e7eb;
    font-size: 0.65rem;
    font-weight: 600;
}
/* API kartı ikonu */
.bot-stat-icon--api {
    box-shadow: rgba(56, 189, 248, 0.45) 0 0 12px,
        rgba(59, 130, 246, 0.55) 0 0 24px;
    background: radial-gradient(
        circle at 30% 0%,
        rgb(125, 211, 252),
        rgb(59, 130, 246) 55%,
        rgb(15, 23, 42) 100%
    );
}

/* BTC kartı ikonu */
.bot-stat-icon--btc {
    box-shadow: rgba(248, 171, 0, 0.55) 0 0 12px,
        rgba(234, 88, 12, 0.55) 0 0 24px;
    background: radial-gradient(
        circle at 30% 0%,
        rgb(252, 211, 77),
        rgb(234, 88, 12) 55%,
        rgb(24, 16, 4) 100%
    );
}

/* Volatilite ikonu */
.bot-stat-icon--vol {
    box-shadow: rgba(244, 114, 182, 0.55) 0 0 12px,
        rgba(129, 140, 248, 0.55) 0 0 24px;
    background: radial-gradient(
        circle at 30% 0%,
        rgb(244, 114, 182),
        rgb(129, 140, 248) 55%,
        rgb(30, 27, 75) 100%
    );
}

/* Hacim ikonu */
.bot-stat-icon--volume {
    box-shadow: rgba(45, 212, 191, 0.55) 0 0 12px,
        rgba(56, 189, 248, 0.55) 0 0 24px;
    background: radial-gradient(
        circle at 30% 0%,
        rgb(45, 212, 191),
        rgb(56, 189, 248) 55%,
        rgb(8, 47, 73) 100%
    );
}

/* ==========================================================================
   13) Sağlık durumu tooltip stili
   ========================================================================== */
.tooltip-health .tooltip-inner {
    background: #020617;
    color: #e5e7eb;
    padding: 10px 12px;
    border-radius: 12px;
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.55);
    max-width: 260px;
}

.tooltip-health .tooltip-arrow::before {
    border-top-color: #020617 !important;
}

.health-tooltip {
    font-size: 12px;
    line-height: 1.3;
}

.health-tooltip .metric-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.health-tooltip .metric-row:last-child {
    margin-bottom: 0;
}

.health-tooltip .metric-header {
    justify-content: space-between;
    margin: -4px -4px 8px;
    padding: 6px 10px;
    border-radius: 10px;
    font-weight: 600;
}

.health-tooltip .health-header-success {
    background: rgba(34, 197, 94, 0.18);
    color: #bbf7d0;
}

.health-tooltip .health-header-warning {
    background: #ffc107;
    color: #000;
}

.health-tooltip .health-header-danger {
    background: #dc3545;
    color: #fff;
}

.health-tooltip .metric-label {
    flex: 0 0 80px;
    font-weight: 500;
    color: #9ca3af;
}

.health-tooltip .metric-header .metric-label {
    color: inherit;
}

.health-tooltip .metric-header-text {
    font-weight: 700;
}

.health-tooltip .metric-progress {
    flex: 1 1 auto;
}
.health-tooltip .bot-progress-label {
    font-size: 8px;
}
/* === RISK MODAL ICON (TITLE) ======================================== */

#positionRiskModal .bot-modal-title-icon.bot-modal-title-icon--risk {
    background: radial-gradient(
        circle at 30% 0%,
        #22c55e,
        #ef4444 55%,
        #111827 100%
    );
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.55),
        0 0 18px rgba(239, 68, 68, 0.55);
}

/* === SEMBOL & FİYAT PILL ORTA BAR =================================== */

/* Genel pill (turuncu – SEMBOL için) */
#positionRiskModal .risk-symbol-pill {
    display: inline-flex;
    align-items: center;
    padding: 0 12px 0 0;
    border-radius: 999px;

    background: radial-gradient(
            circle at 0% 50%,
            rgba(251, 191, 36, 0.85),
            rgba(249, 115, 22, 0.35) 35%,
            transparent 70%
        ),
        linear-gradient(135deg, #020617, #020617);

    border: 1px solid rgba(249, 115, 22, 0.9);
    color: #e5f3ff;

    box-shadow: 0 0 14px rgba(249, 115, 22, 0.55),
        0 0 24px rgba(251, 191, 36, 0.4);
}

/* Sembol ikonu */
#positionRiskModal .risk-symbol-pill-icon {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(
        circle at 30% 0%,
        #fbbf24,
        #f97316 55%,
        #3b2600 100%
    );
    box-shadow: 0 0 10px rgba(251, 191, 36, 0.6),
        0 0 18px rgba(249, 115, 22, 0.5);
    margin-left: -1px;
    margin-right: 8px;
}

#positionRiskModal .risk-symbol-pill-icon i {
    font-size: 0.85rem;
    color: #050711;
}

/* Sembol/Fiyat text ortak */
#positionRiskModal .risk-symbol-pill-text {
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* Ortadaki bar – sembol solda, fiyat sağda */
#positionRiskModal .risk-symbol-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

#positionRiskModal .risk-symbol-header > div > .risk-symbol-pill {
    min-height: 32px;
    padding: 0 14px 0 0;
}

/* === FİYAT PILL (STATE'Lİ) ========================================== */

#positionRiskModal .risk-price-pill {
    background: linear-gradient(135deg, #020617, #020617);
    border: 1px solid rgba(148, 163, 184, 0.7);
    box-shadow: 0 0 14px rgba(15, 23, 42, 0.9);
}

#positionRiskModal .risk-price-pill-icon {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: -1px;
    margin-right: 8px;
}

#positionRiskModal .risk-price-pill-text {
    font-size: 0.82rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

#positionRiskModal .risk-price-pill.risk-price-up {
    border-color: rgba(34, 197, 94, 0.9);
    box-shadow: 0 0 14px rgba(34, 197, 94, 0.55),
        0 0 24px rgba(74, 222, 128, 0.4);
    background: radial-gradient(
            circle at 0% 50%,
            rgba(74, 222, 128, 0.85),
            rgba(22, 163, 74, 0.35) 35%,
            transparent 70%
        ),
        linear-gradient(135deg, #020617, #020617);
}

#positionRiskModal .risk-price-pill.risk-price-up .risk-price-pill-icon {
    background: radial-gradient(
        circle at 30% 0%,
        #bbf7d0,
        #22c55e 55%,
        #052e16 100%
    );
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.6),
        0 0 18px rgba(74, 222, 128, 0.5);
}

#positionRiskModal .risk-price-pill.risk-price-down {
    border-color: rgba(248, 113, 113, 0.95);
    box-shadow: 0 0 14px rgba(248, 113, 113, 0.65),
        0 0 24px rgba(220, 38, 38, 0.5);
    background: radial-gradient(
            circle at 0% 50%,
            rgba(248, 113, 113, 0.9),
            rgba(239, 68, 68, 0.4) 35%,
            transparent 70%
        ),
        linear-gradient(135deg, #020617, #020617);
}

#positionRiskModal .risk-price-pill.risk-price-down .risk-price-pill-icon {
    background: radial-gradient(
        circle at 30% 0%,
        #fecaca,
        #ef4444 55%,
        #450a0a 100%
    );
    box-shadow: 0 0 10px rgba(248, 113, 113, 0.6),
        0 0 18px rgba(239, 68, 68, 0.5);
}

#positionRiskModal .risk-price-pill.risk-price-flat {
    border-color: rgba(148, 163, 184, 0.9);
    box-shadow: 0 0 14px rgba(148, 163, 184, 0.55),
        0 0 24px rgba(107, 114, 128, 0.4);
    background: radial-gradient(
            circle at 0% 50%,
            rgba(148, 163, 184, 0.9),
            rgba(75, 85, 99, 0.45) 35%,
            transparent 70%
        ),
        linear-gradient(135deg, #020617, #020617);
}

#positionRiskModal .risk-price-pill.risk-price-flat .risk-price-pill-icon {
    background: radial-gradient(
        circle at 30% 0%,
        #e5e7eb,
        #9ca3af 55%,
        #111827 100%
    );
    box-shadow: 0 0 10px rgba(148, 163, 184, 0.6),
        0 0 18px rgba(107, 114, 128, 0.5);
}

/* Fiyat sayısı yanıp sönme - Binance tarzı (orijinal renk → beyaz → orijinal renk) */
.bot-cell-flash-up {
    animation: botFlashTextUp 1.2s ease-out;
}

.bot-cell-flash-down {
    animation: botFlashTextDown 1.2s ease-out;
}

@keyframes botFlashTextUp {
    0% {
        color: inherit; /* Orijinal renk (yeşil) */
        opacity: 1;
    }
    15% {
        color: #ffffff; /* Beyaz */
        opacity: 1;
    }
    30% {
        color: inherit; /* Orijinal renge dön (yeşil) */
        opacity: 1;
    }
    45% {
        color: #ffffff; /* Beyaz */
        opacity: 1;
    }
    60% {
        color: inherit; /* Orijinal renge dön (yeşil) */
        opacity: 1;
    }
    75% {
        color: #ffffff; /* Beyaz */
        opacity: 1;
    }
    100% {
        color: inherit; /* Orijinal renge dön (yeşil) */
        opacity: 1;
    }
}

@keyframes botFlashTextDown {
    0% {
        color: inherit; /* Orijinal renk (kırmızı) */
        opacity: 1;
    }
    15% {
        color: #ffffff; /* Beyaz */
        opacity: 1;
    }
    30% {
        color: inherit; /* Orijinal renge dön (kırmızı) */
        opacity: 1;
    }
    45% {
        color: #ffffff; /* Beyaz */
        opacity: 1;
    }
    60% {
        color: inherit; /* Orijinal renge dön (kırmızı) */
        opacity: 1;
    }
    75% {
        color: #ffffff; /* Beyaz */
        opacity: 1;
    }
    100% {
        color: inherit; /* Orijinal renge dön (kırmızı) */
        opacity: 1;
    }
}

#wallet-box.wallet-ok {
    border: 1px solid rgba(45, 212, 191, 0.8);
    box-shadow: 0 0 12px rgba(45, 212, 191, 0.25);
    color: #a5f3fc;
}

#wallet-box.wallet-ok .fw-semibold {
    color: #6ee7b7;
}

#wallet-box.wallet-error {
    border: 1px solid rgba(248, 113, 113, 0.8);
    box-shadow: 0 0 12px rgba(248, 113, 113, 0.25);
    color: #fecaca;
}

#wallet-box.wallet-error .fw-semibold {
    color: #fca5a5;
}
.sl-none-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    padding: 2px 10px;
    border-radius: 999px;
    border: 1px solid rgba(248, 250, 252, 0.08); /* hafif çizgi */
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fca5a5; /* soft kırmızı/pembe */
    background: rgba(15, 23, 42, 0.9); /* koyu arka plan, tabloyla uyumlu */
}

/* - X - efekti için önce/sonra çizgiler */
.sl-none-pill::before,
.sl-none-pill::after {
    content: "—";
    font-weight: 400;
    opacity: 0.6;
    margin: 0 4px;
}
/* Settings modal yükseklik + scroll */
#settingsModal .modal-dialog {
    max-height: calc(100vh - 3rem);
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

/* Settings modal mobil uyumluluk */
@media (max-width: 768px) {
    #settingsModal .modal-dialog {
        max-height: calc(100vh - 1rem);
        margin-top: 0.5rem;
        margin-bottom: 0.5rem;
        max-width: calc(100% - 1rem);
    }

    #settingsModal .modal-body {
        max-height: calc(100vh - 120px);
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    #settingsModal .modal-dialog {
        max-height: calc(100vh - 0.5rem);
        margin-top: 0.25rem;
        margin-bottom: 0.25rem;
        max-width: calc(100% - 0.5rem);
    }

    #settingsModal .modal-body {
        max-height: calc(100vh - 100px);
        padding: 0.75rem;
    }
}

#settingsModal .modal-body {
    max-height: calc(100vh - 180px);
    overflow-y: auto;

    /* Firefox */
    scrollbar-width: thin;
    scrollbar-color: #6366f1 rgba(255, 255, 255, 0.06);
}

/* WebKit (Chrome, Edge, Safari) */
#settingsModal .modal-body::-webkit-scrollbar {
    width: 6px;
}

#settingsModal .modal-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04); /* koyu track */
    border-radius: 999px;
}

#settingsModal .modal-body::-webkit-scrollbar-thumb {
    background: #4f46e5;
    border-radius: 999px;
}

#settingsModal .modal-body::-webkit-scrollbar-thumb:hover {
    background: #6366f1;
}
.mini-chart-wrapper {
    height: 22px;
    position: relative;
}

.symbol-sparkline {
    width: 100%;
    height: 100%;
}

/* Sparkline Loading Skeleton */
.sparkline-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card-soft);
    border-radius: 4px;
    z-index: 1;
    overflow: hidden;
}

.sparkline-loading::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    transform: translateY(-50%);
    background: linear-gradient(
        90deg,
        transparent 0%,
        var(--border-subtle) 25%,
        var(--accent) 50%,
        var(--border-subtle) 75%,
        transparent 100%
    );
    background-size: 200% 100%;
    animation: sparkline-loading 1.5s ease-in-out infinite;
    border-radius: 2px;
}

/* Alternatif: Dalga efekti için ekstra animasyon */
.sparkline-loading::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(14, 165, 233, 0.1),
        transparent
    );
    animation: sparkline-sweep 2s ease-in-out infinite;
}

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

@keyframes sparkline-sweep {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.sparkline-loading.hidden {
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
#symbolsModal {
    overflow: hidden;
}
.symbols-table-wrapper {
    min-height: 200px;
    position: relative;
    perspective: 800px;
}

.symbols-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(
        circle at top,
        rgba(0, 0, 0, 0.25),
        rgba(0, 0, 0, 0.65)
    );
    z-index: 20;
}

.btc-loading-gif {
    max-width: 120px;
    height: auto;
}
.bot-title {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    line-height: 1.1;
}

.bot-title-brandline {
    margin-top: 0.25rem;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    align-self: flex-end;
    margin-right: 12px;
}
.bot-title-main {
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    background: linear-gradient(
        90deg,
        #fff3cf 0%,
        #f5d27a 35%,
        #e1a84f 65%,
        #f4dc9a 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 1px 2px rgba(120, 80, 20, 0.35);
}
.bot-title-logo {
    width: 18px;
    height: 18px;
    object-fit: contain;
    margin-right: 0.35rem;
    animation: coin-spin 3s linear infinite;
    transform-origin: center center;
}

.bot-title-brand-text {
    font-weight: 700;
    color: #f3ba2f;
}

@keyframes coin-spin {
    0% {
        transform: rotateY(0deg);
    }
    50% {
        transform: rotateY(180deg);
    }
    100% {
        transform: rotateY(360deg);
    }
}

/* ==========================================================================
   14) Connection Status Indicator
   ========================================================================== */
.connection-indicator {
    border: 1px solid var(--border-subtle);
    background: var(--bg-card-soft);
    font-size: 0.75rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.connection-indicator.connected {
    border-color: rgba(34, 197, 94, 0.5);
    background: rgba(34, 197, 94, 0.1);
    color: #4ade80;
}

.connection-indicator.disconnected {
    border-color: rgba(239, 68, 68, 0.5);
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
}

.connection-indicator.connecting {
    border-color: rgba(250, 204, 21, 0.5);
    background: rgba(250, 204, 21, 0.1);
    color: #facc15;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    transition: all 0.3s ease;
}

.status-dot.connected {
    background: #22c55e;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.6);
    animation: pulse-green 2s ease-in-out infinite;
}

.status-dot.disconnected {
    background: #ef4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
    animation: pulse-red 2s ease-in-out infinite;
}

.status-dot.connecting {
    background: #facc15;
    box-shadow: 0 0 8px rgba(250, 204, 21, 0.6);
    animation: pulse-yellow 1s ease-in-out infinite;
}

@keyframes pulse-green {
    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.2);
    }
}

@keyframes pulse-red {
    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.2);
    }
}

@keyframes pulse-yellow {
    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.6;
        transform: scale(1.3);
    }
}

/* ==========================================================================
   15) Skeleton Loading
   ========================================================================== */
.skeleton-row {
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

.skeleton-line {
    height: 20px;
    background: linear-gradient(
        90deg,
        var(--bg-card) 0%,
        rgba(148, 163, 184, 0.2) 50%,
        var(--bg-card) 100%
    );
    background-size: 200% 100%;
    border-radius: 4px;
    margin: 8px 0;
}

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

/* ==========================================================================
   Market Condition & Strategy Recommendation Widget Styles
   ========================================================================== */

/* Sarı badge içindeki textleri daha görünür yap */
.badge.bg-warning.text-dark {
    color: #000000 !important;
    font-weight: 600;
}

/* Strategy recommendation card içindeki layout */
#strategy-recommendation-widget #recommended-strategy-content .d-flex {
    align-items: flex-start;
}

/* Önerilen Ayarlar bölümünün sağa yaslanması ve uzamaması */
#strategy-recommendation-widget .small[style*="min-width"] {
    flex-shrink: 0;
    max-width: 200px;
}
