html {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

*, *::before, *::after {
    box-sizing: inherit;
}

body {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #050505;
    color: #c5c6c7;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.app-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
}

.content {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 1.5rem;
    box-sizing: border-box;
}

.content:has(.trading-terminal-container) {
    padding: 0 !important;
    margin: 0 !important;
    height: calc(100vh - 60px) !important;
    max-height: calc(100vh - 60px) !important;
    min-height: calc(100vh - 60px) !important;
    overflow: visible !important;
    display: flex;
    flex-direction: column;
    flex: 1;
    background: #050505 !important;
    z-index: 1;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1.5rem;
    background: #030303;
    border-bottom: 1px solid #ff4d8a33;
    flex-wrap: wrap;
    gap: 0.5rem;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.navbar-logo {
    color: #ff80cc;
    text-decoration: none;
    font-weight: 600;
    letter-spacing: 0.04em;
}

.navbar-right {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.language-selector {
    position: relative;
}

.language-form {
    margin: 0;
    padding: 0;
}

.language-select {
    padding: 0.4rem 0.75rem;
    background: #030303;
    border: 1px solid #ff4d8a33;
    border-radius: 4px;
    color: #c5c6c7;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23c5c6c7' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 12px;
    padding-right: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.language-select:hover {
    border-color: #ff80cc;
    background-color: #030303;
    box-shadow: 0 2px 8px rgba(255, 128, 204, 0.2);
}

.language-select:focus {
    outline: none;
    border-color: #ff80cc;
    background-color: #030303;
    box-shadow: 0 0 0 2px rgba(255, 128, 204, 0.1);
}

.language-select option {
    background: #050505;
    color: #c5c6c7;
}

.navbar-right a {
    color: #c5c6c7;
    margin-left: 0;
    text-decoration: none;
    font-size: 0.95rem;
    white-space: nowrap;
}

.navbar-right a:hover {
    color: #ff80cc;
}

.messages {
    margin-bottom: 1rem;
}

.message {
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    margin-bottom: 0.4rem;
    font-size: 0.9rem;
}

.message.success {
    background-color: #1b5e2055;
    border: 1px solid #2ecc71aa;
}

.message.error {
    background-color: #5e1b1b55;
    border: 1px solid #e74c3caa;
}

.auth-container,
.profile-container,
.screener-container,
.symbol-detail-container,
.alerts-container,
.trading-terminal-container {
    background-color: #050505;
}

.screener-container h1 {
    color: #ff80cc;
    font-weight: 600;
}

.symbol-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.symbol-detail-header h1 {
    margin: 0;
}

.trading-terminal-btn {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    white-space: nowrap;
}

.auth-form, .profile-card {
    background: #030303;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    box-sizing: border-box;
}

.form-field {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
}

.form-field label {
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
    color: #c5c6c7;
}

.form-field input,
.form-field select,
.form-field textarea {
    padding: 0.6rem 0.75rem;
    border-radius: 6px;
    border: 1px solid #ff4d8a33;
    background: #050505;
    color: #c5c6c7;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: #ff80cc;
    box-shadow: 0 0 0 2px rgba(255, 128, 204, 0.1);
}

.form-field select {
    cursor: pointer;
}

.form-field select option {
    background: #050505;
    color: #c5c6c7;
}

.field-errors {
    color: #e74c3c;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

.btn-primary,
.btn-secondary {
    border-radius: 4px;
    border: none;
    padding: 0.5rem 1.2rem;
    cursor: pointer;
    font-size: 0.95rem;
}

.btn-primary {
    background-color: #ff4d8a;
    color: #0b0c10;
}

.btn-primary:hover {
    background-color: #ff80cc;
}

.btn-secondary {
    background-color: #030303;
    color: #c5c6c7;
    border: 1px solid #ff4d8a55;
}

.btn-secondary:hover {
    border-color: #ff80cc;
}

.market-type-toggle {
    display: inline-flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.5rem;
    background: #030303;
    border-radius: 6px;
    border: 1px solid #ff4d8a33;
    position: relative;
    z-index: 10000 !important;
}

.market-type-btn {
    padding: 0.5rem 1rem;
    text-align: center;
    color: #c5c6c7;
    cursor: pointer !important;
    user-select: none;
    background: #050505;
    border: 1px solid #ff4d8a33;
    border-radius: 4px;
    transition: all 0.2s;
    font-size: 0.9rem;
    min-width: 100px;
    position: relative;
    z-index: 10001 !important;
    pointer-events: auto !important;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.market-type-btn:hover {
    border-color: #ff4d8a;
    color: #ff80cc;
}

.market-type-btn.active {
    background: #ff4d8a;
    border-color: #ff80cc;
    color: #0b0c10;
    font-weight: 500;
}

.screener-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
    width: 100%;
}

.screener-filters input,
.screener-filters button {
    flex: 1 1 auto;
    min-width: 120px;
    box-sizing: border-box;
}

.screener-filters input {
    padding: 0.45rem 0.6rem;
    border-radius: 4px;
    border: 1px solid #ff4d8a33;
    background: #050505;
    color: #c5c6c7;
}

.screener-table-container {
    margin-top: 0.5rem;
    border-radius: 8px;
    border: 1px solid #ff4d8a33;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
}

.screener-table-scrollbar-top {
    overflow-x: auto;
    overflow-y: hidden;
    height: 17px;
    border-bottom: 1px solid #ff4d8a33;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

.scrollbar-spacer {
    height: 1px;
    min-width: 100%;
}

.screener-table-wrapper {
    overflow-x: auto; /* Allow horizontal scroll when needed */
    overflow-y: auto; /* Enable vertical scroll for sticky header to work */
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    max-height: 80vh;
    width: 100%;
}

.screener-table {
    width: 100%;
    min-width: 800px; /* Minimum width to ensure readability */
    border-collapse: separate;
    border-spacing: 0;
    background: #050505;
    white-space: nowrap; /* Prevent text wrapping in cells */
    table-layout: auto; /* Allow columns to size based on content */
    border: 1px solid #ff4d8a33;
}

.screener-table th,
.screener-table td {
    padding: 0.35rem 0.5rem;
    font-size: 0.8rem;
    text-align: right;
    white-space: nowrap; /* Prevent text wrapping */
    border-right: 1px solid #ff4d8a33;
    border-bottom: 1px solid #ff4d8a33;
}

.screener-table th:last-child,
.screener-table td:last-child {
    border-right: none;
}

.screener-table tbody tr:last-child td {
    border-bottom: none;
}

.screener-table th:first-child,
.screener-table td:first-child {
    text-align: left;
    width: 180px !important;
    min-width: 180px !important;
    max-width: 180px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.screener-table thead {
    background: #050505;
    position: sticky;
    top: 0;
    z-index: 10;
}

.screener-table thead th {
    background: #050505;
    border-bottom: 2px solid #ff4d8a33;
    font-weight: 600;
    color: #c5c6c7;
    position: sticky;
    top: 0;
    z-index: 11; /* Higher z-index than thead to ensure visibility */
    box-shadow: 0 2px 2px -1px rgba(255, 77, 138, 0.1); /* Subtle shadow for depth */
}

.screener-table th a {
    color: #c5c6c7;
    text-decoration: none;
}

.screener-table th a:hover {
    color: #ff80cc;
}

/* Style for symbol links in table body */
.screener-table td a {
    color: #ff80cc;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-block;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    background: rgba(255, 128, 204, 0.1);
}

.screener-table td a:hover {
    color: #ff4d8a;
    background: rgba(255, 128, 204, 0.2);
    transform: translateY(-1px);
}

.screener-table th.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
}

.screener-table th.sortable:hover {
    background: #0f1419;
    color: #ff80cc;
}

.screener-table th.sortable::after {
    content: " ↕";
    opacity: 0.5;
    font-size: 0.8em;
}

.screener-table tbody tr:nth-child(odd) {
    background: #050505;
}

.screener-table tbody tr:nth-child(even) {
    background: #050505;
}

.screener-table tbody tr:hover {
    background: #030303;
}

.empty-row {
    text-align: center !important;
    color: #7f8c8d;
}

.value-up {
    color: #2ecc71;
    font-weight: 500;
}

.value-down {
    color: #e74c3c;
    font-weight: 500;
}

/* Timestamp highlighting */
.ts-fresh {
    color: #2ecc71;
    font-weight: 500;
}

.ts-stale {
    color: #e74c3c;
    font-weight: 500;
}

/* Favorite star styles */
.symbol-cell {
    position: relative;
    padding-right: 1.5rem !important; /* Место для звездочки */
}

.symbol-cell > a {
    display: inline-block;
    max-width: calc(100% - 1.5rem);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

.favorite-star {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 1.2rem;
    color: #666;
    user-select: none;
    transition: all 0.2s;
    line-height: 1;
    z-index: 1;
}

.favorite-star:hover {
    color: #ff80cc;
    transform: scale(1.2);
}

.favorite-star.active {
    color: #ff80cc;
}

.favorite-star.active:hover {
    color: #ff4d8a;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    font-size: 0.9rem;
    flex-wrap: wrap;
    width: 100%;
}

.pagination a {
    color: #ff80cc;
    text-decoration: none;
}

.pagination a:hover {
    text-decoration: underline;
}

.symbol-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    width: 100%;
}

.symbol-summary .metric {
    background: #030303;
    padding: 0.75rem;
    border-radius: 6px;
}

.symbol-summary .label {
    display: block;
    font-size: 0.75rem;
    color: #7f8c8d;
    margin-bottom: 0.2rem;
}

.symbol-summary .value {
    font-size: 1rem;
}

.symbol-chart {
    margin-bottom: 1.5rem;
}

.alert-form-container {
    max-width: 600px;
    margin: 0 auto;
}

.alert-form {
    max-width: 100%;
}

.alert-info-box {
    background: #1a2332;
    border: 1px solid #ff4d8a44;
    border-radius: 6px;
    padding: 1rem;
    margin: 1.5rem 0;
}

.alert-info-box .chart-note {
    margin: 0;
    color: #c5c6c7;
    font-size: 0.9rem;
    line-height: 1.5;
}

.alert-info-box .chart-note strong {
    color: #ff80cc;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.form-actions .btn-primary,
.form-actions .btn-secondary {
    flex: 1;
}

.field-help {
    color: #888;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.chart-note {
    font-size: 0.8rem;
    color: #7f8c8d;
    margin-top: 0.5rem;
}

.screener-settings {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    overflow-y: auto;
}

.screener-settings.open {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.screener-settings-inner {
    background: #030303;
    border-radius: 8px;
    padding: 1rem;
    max-width: 650px;
    width: auto;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.5);
    margin: 0;
    box-sizing: border-box;
}

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

.settings-header h2 {
    margin: 0;
    color: #c5c6c7;
}

.close-settings {
    background: none;
    border: none;
    color: #c5c6c7;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-settings:hover {
    color: #ff80cc;
}

.settings-columns {
    margin-bottom: 1.5rem;
}

.settings-category {
    margin-bottom: 1.5rem;
}

.settings-category strong {
    display: block;
    color: #c5c6c7;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.settings-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    width: 100%;
    margin-bottom: 0.5rem; /* Отступ между рядами для Vdelta и Volume */
}

/* Убираем отступ у последнего ряда в категории */
.settings-category .settings-buttons:last-child {
    margin-bottom: 0;
}

.settings-button {
    display: inline-block;
    flex: 0 0 auto;
    min-width: 90px;
    white-space: nowrap;
    padding: 0.35rem 0.7rem;
    background: #050505;
    border: 1px solid #ff4d8a33;
    border-radius: 4px;
    color: #c5c6c7;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.settings-button:hover {
    border-color: #ff4d8a;
}

.settings-button.selected {
    background: #ff4d8a;
    border-color: #ff80cc;
    color: #0b0c10;
}

.settings-footer {
    border-top: 1px solid #ff4d8a33;
    padding-top: 1rem;
}

.settings-reset {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.settings-reset span {
    color: #c5c6c7;
    font-size: 0.9rem;
}

/* Force hide hidden columns */
.hidden-column,
[hidden="true"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Custom scrollbar styling for top scrollbar only */
.screener-table-scrollbar-top::-webkit-scrollbar {
    height: 8px;
}

.screener-table-scrollbar-top::-webkit-scrollbar-track {
    background: #050505;
    border-radius: 4px;
}

.screener-table-scrollbar-top::-webkit-scrollbar-thumb {
    background: #ff4d8a;
    border-radius: 4px;
}

.screener-table-scrollbar-top::-webkit-scrollbar-thumb:hover {
    background: #ff80cc;
}

/* Firefox scrollbar styling for top scrollbar */
.screener-table-scrollbar-top {
    scrollbar-width: thin;
    scrollbar-color: #ff4d8a #0b0c10;
}

/* Style scrollbar for bottom wrapper (visible on mobile) */
.screener-table-wrapper::-webkit-scrollbar {
    height: 8px;
}

.screener-table-wrapper::-webkit-scrollbar-track {
    background: #050505;
    border-radius: 4px;
}

.screener-table-wrapper::-webkit-scrollbar-thumb {
    background: #ff4d8a;
    border-radius: 4px;
}

.screener-table-wrapper::-webkit-scrollbar-thumb:hover {
    background: #ff80cc;
}

.screener-table-wrapper {
    scrollbar-width: thin;
    scrollbar-color: #ff4d8a #0b0c10;
}

/* Hide bottom scrollbar on desktop, show on mobile */
@media (min-width: 769px) {
    .screener-table-wrapper::-webkit-scrollbar {
        display: none;
    }
    
    .screener-table-wrapper {
        -ms-overflow-style: none;  /* IE and Edge */
        scrollbar-width: none;  /* Firefox */
    }
}

@media (max-width: 1200px) {
    .screener-table {
        min-width: 1000px;
    }
}

@media (max-width: 992px) {
    .content {
        padding: 1rem;
    }
    
    .navbar {
        padding: 0.6rem 1rem;
    }
    
    .navbar-logo {
        font-size: 1rem;
    }
    
    .navbar-right a {
        font-size: 0.85rem;
    }
    
    .screener-table {
        min-width: 900px;
    }
    
    .screener-table th,
    .screener-table td {
        font-size: 0.8rem;
        padding: 0.4rem 0.5rem;
    }
    
    .screener-filters input,
    .screener-filters button {
        min-width: 100px;
        font-size: 0.85rem;
    }
    
    .symbol-summary {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 0.5rem;
    }
    
    .auth-form, .profile-card {
        padding: 1rem;
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 0.75rem 1rem;
    }
    
    .navbar-logo {
        font-size: 0.95rem;
    }
    
    .navbar-right {
        width: 100%;
        justify-content: flex-start;
    }
    
    .navbar-right a {
        font-size: 0.8rem;
    }

    .content {
        padding: 0.75rem;
    }
    
    .screener-container h1,
    .symbol-detail-container h1 {
        font-size: 1.5rem;
    }
    
    .screener-table-container {
        margin-top: 0.25rem;
    }
    
    .screener-table-scrollbar-top {
        height: 12px;
    }

    .screener-table {
        min-width: 700px;
    }

    .screener-table th,
    .screener-table td {
        font-size: 0.75rem;
        padding: 0.35rem 0.4rem;
    }
    
    .screener-table td a {
        padding: 0.15rem 0.3rem;
        font-size: 0.7rem;
    }
    
    .screener-filters {
        flex-direction: column;
    }
    
    .screener-filters input,
    .screener-filters button {
        width: 100%;
        min-width: 100%;
    }
    
    .symbol-summary {
        grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
        gap: 0.5rem;
    }
    
    .symbol-summary .metric {
        padding: 0.5rem;
    }
    
    .symbol-summary .label {
        font-size: 0.7rem;
    }
    
    .symbol-summary .value {
        font-size: 0.9rem;
    }
    
    .pagination {
        font-size: 0.8rem;
        gap: 0.5rem;
    }
    
    .pagination a {
        padding: 0.4rem 0.6rem;
    }

    .screener-settings.open {
        padding: 0.5rem;
    }

    .screener-settings-inner {
        padding: 0.75rem;
        width: calc(100% - 1rem);
        max-width: calc(100vw - 1rem);
        margin: 0 0.5rem;
        max-height: 85vh;
    }
    
    .settings-buttons {
        gap: 0.4rem;
    }
    
    .settings-button {
        min-width: 80px;
        font-size: 0.8rem;
        padding: 0.35rem 0.6rem;
    }
    
    .auth-form, .profile-card {
        padding: 1rem;
        margin: 0;
    }
    
    .form-field input,
    .form-field textarea,
    .form-field select {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .content {
        padding: 0.5rem;
    }
    
    .navbar {
        padding: 0.5rem 0.75rem;
    }
    
    .navbar-logo {
        font-size: 0.9rem;
    }
    
    .navbar-right a {
        font-size: 0.75rem;
    }
    
    .screener-container h1,
    .symbol-detail-container h1 {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }
    
    .screener-table {
        min-width: 600px;
    }
    
    .screener-table th,
    .screener-table td {
        font-size: 0.7rem;
        padding: 0.3rem 0.35rem;
    }
    
    .screener-table td a {
        padding: 0.1rem 0.25rem;
        font-size: 0.65rem;
    }
    
    .screener-filters input,
    .screener-filters button {
        font-size: 0.8rem;
        padding: 0.4rem 0.5rem;
    }
    
    .symbol-summary {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 0.4rem;
    }
    
    .symbol-summary .metric {
        padding: 0.4rem;
    }
    
    .symbol-summary .label {
        font-size: 0.65rem;
    }
    
    .symbol-summary .value {
        font-size: 0.85rem;
    }
    
    .pagination {
        font-size: 0.75rem;
        gap: 0.4rem;
    }
    
    .pagination a {
        padding: 0.3rem 0.5rem;
    }
    
    .screener-settings-inner {
        padding: 0.75rem;
    }
    
    .settings-header h2 {
        font-size: 1.1rem;
    }
    
    .settings-button {
        min-width: 70px;
        font-size: 0.75rem;
        padding: 0.3rem 0.5rem;
    }
    
    .auth-form, .profile-card {
        padding: 0.75rem;
    }
    
    .form-field {
        margin-bottom: 0.75rem;
    }
    
    .form-field label {
        font-size: 0.85rem;
    }
    
    .form-field input,
    .form-field textarea,
    .form-field select {
        font-size: 0.85rem;
        padding: 0.4rem 0.5rem;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 0.4rem 1rem;
        font-size: 0.85rem;
        width: 100%;
    }
}



.alerts-container {
    padding: 1.5rem;
    max-width: 1400px;
    margin: 0 auto;
}

.alerts-header {
    margin-bottom: 1.5rem;
}

.alerts-header h1 {
    color: #ff80cc;
    margin-bottom: 1rem;
}

.alerts-filter-form {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.alerts-filter-form input,
.alerts-filter-form select {
    padding: 0.5rem 0.75rem;
    background: #030303;
    border: 1px solid #ff4d8a33;
    border-radius: 4px;
    color: #c5c6c7;
    font-size: 0.9rem;
}

.alerts-filter-form input:focus,
.alerts-filter-form select:focus {
    outline: none;
    border-color: #ff80cc;
}

.alerts-table-container {
    overflow-x: auto;
    background: #030303;
    border-radius: 8px;
    border: 1px solid #ff4d8a33;
}

.alerts-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.alerts-table th {
    background: #050505;
    color: #ff80cc;
    padding: 0.75rem;
    text-align: left;
    border-bottom: 2px solid #ff4d8a66;
    font-weight: 600;
}

.alerts-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #ff4d8a33;
    color: #c5c6c7;
}

.alerts-table tbody tr:hover {
    background: #151a20;
}

.alerts-table tbody tr.alert-inactive {
    opacity: 0.6;
}

.alert-status {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
}

.alert-status.alert-active {
    background: #2ecc7133;
    color: #2ecc71;
}

.alert-status.alert-inactive-status {
    background: #7f8c8d33;
    color: #7f8c8d;
}

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

.btn-small {
    padding: 0.35rem 0.7rem;
    font-size: 0.85rem;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-small.btn-success {
    background: #2ecc71;
    color: #0b0c10;
}

.btn-small.btn-success:hover {
    background: #27ae60;
}

.btn-small.btn-warning {
    background: #f39c12;
    color: #0b0c10;
}

.btn-small.btn-warning:hover {
    background: #e67e22;
}

.btn-small.btn-danger {
    background: #e74c3c;
    color: #fff;
}

.btn-small.btn-danger:hover {
    background: #c0392b;
}

.empty-state {
    text-align: center;
    padding: 3rem;
    color: #7f8c8d;
}

.empty-state p {
    margin: 0.5rem 0;
}

.trading-terminal-container {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box;
    height: 100% !important;
    min-height: 100% !important;
    max-height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden;
    flex: 1 1 auto !important;
}

.trading-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0;
    padding: 0.75rem 1rem;
    background: #030303;
    border-radius: 0;
    border: none;
    border-bottom: 1px solid #ff4d8a33;
    flex-shrink: 0;
}

.trading-header-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.trading-stats-inline {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
    margin-left: auto;
}

.stat-item-inline {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.stat-item-inline .stat-label {
    color: #888;
    font-size: 0.85rem;
}

.stat-item-inline .stat-value {
    color: #c5c6c7;
    font-size: 0.85rem;
    font-weight: 600;
}

.stat-item-inline .stat-value.positive,
.stat-item-inline .stat-value.value-up {
    color: #2ecc71;
}

.stat-item-inline .stat-value.negative,
.stat-item-inline .stat-value.value-down {
    color: #e74c3c;
}

.btn-small {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

/* Модальное окно настройки статистики */
.stats-config-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.stats-config-content {
    background: #030303;
    border-radius: 8px;
    padding: 0;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

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

.stats-config-header h2 {
    margin: 0;
    color: #c5c6c7;
    font-size: 1.25rem;
}

.close-modal-btn {
    background: none;
    border: none;
    color: #c5c6c7;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.2s;
}

.close-modal-btn:hover {
    background: #ff4d8a33;
}

.stats-config-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.stat-config-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

.stat-config-row select {
    flex: 1;
    padding: 0.5rem;
    background: #050505;
    border: 1px solid #ff4d8a33;
    border-radius: 4px;
    color: #c5c6c7;
    font-size: 0.9rem;
}

.stat-config-row select:focus {
    outline: none;
    border-color: #ff80cc;
}

.stat-config-row .remove-stat-btn {
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background 0.2s;
}

.stat-config-row .remove-stat-btn:hover {
    background: #c0392b;
}

.stats-config-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.5rem;
    border-top: 1px solid #ff4d8a33;
}

.stat-item-inline .stat-value.positive {
    color: #2ecc71;
}

.stat-item-inline .stat-value.negative {
    color: #e74c3c;
}

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

.symbol-selector-container {
    position: relative;
    display: inline-block;
}

.symbol-search-input {
    padding: 0.5rem 1rem;
    background: #030303;
    border: 1px solid #ff4d8a33;
    border-radius: 4px;
    color: #c5c6c7;
    font-size: 1rem;
    min-width: 200px;
    transition: border-color 0.2s;
}

.symbol-search-input:focus {
    outline: none;
    border-color: #ff80cc;
}

.symbol-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #030303;
    border: 1px solid #ff4d8a33;
    border-radius: 4px;
    margin-top: 0.25rem;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.symbol-dropdown-item {
    padding: 0.75rem 1rem;
    color: #c5c6c7;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid #ff4d8a11;
}

.symbol-dropdown-item:last-child {
    border-bottom: none;
}

.symbol-dropdown-item:hover {
    background: #151a20;
    color: #ff80cc;
}

.trading-symbol-info h1 {
    margin: 0;
    color: #ff80cc;
    font-size: 1.5rem;
}

.market-type-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.market-type-badge.futures {
    background: #ff4d8a33;
    color: #ff80cc;
    border: 1px solid #ff4d8a;
}

.market-type-badge.spot {
    background: #2ecc7133;
    color: #2ecc71;
    border: 1px solid #2ecc71;
}

.price-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.current-price {
    font-size: 1.2rem;
    font-weight: 600;
    color: #c5c6c7;
}

.price-change {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
}

.price-change.positive {
    background: #2ecc7133;
    color: #2ecc71;
}

.price-change.negative {
    background: #e74c3c33;
    color: #e74c3c;
}

.trading-controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.timeframe-selector {
    display: flex;
    gap: 0.5rem;
    background: #050505;
    padding: 0.25rem;
    border-radius: 6px;
    border: 1px solid #ff4d8a33;
}

.timeframe-btn {
    padding: 0.5rem 1rem;
    background: transparent;
    border: none;
    color: #c5c6c7;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.timeframe-btn:hover {
    background: #030303;
    color: #ff80cc;
}

.timeframe-btn.active {
    background: #ff4d8a;
    color: #0b0c10;
    font-weight: 600;
}

.indicator-selector {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.indicator-select {
    padding: 0.5rem 0.75rem;
    background: #050505;
    border: 1px solid #ff4d8a33;
    border-radius: 4px;
    color: #c5c6c7;
    font-size: 0.9rem;
    cursor: pointer;
}

.indicator-select:focus {
    outline: none;
    border-color: #ff80cc;
}

.trading-chart-container {
    position: relative !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #030303 !important;
    border-radius: 0;
    border: none;
    overflow: visible !important;
    flex: 1 1 auto !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: calc(100vh - 150px) !important;
    height: calc(100vh - 150px) !important;
    max-height: none !important;
    z-index: 1 !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.tradingview-widget-container {
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    max-height: 100% !important;
    position: relative !important;
    flex: 1 1 auto !important;
    overflow: visible !important;
    z-index: 10 !important;
    background: transparent !important;
}

.tradingview-widget {
    width: 100% !important;
    height: 100% !important;
    position: relative !important;
    z-index: 10 !important;
}


@media (max-width: 768px) {
    .alerts-table {
        font-size: 0.8rem;
    }
    
    .alerts-table th,
    .alerts-table td {
        padding: 0.5rem;
    }
    
    .alert-actions {
        flex-direction: column;
    }
    
    .btn-small {
        width: 100%;
    }
    
    .trading-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .trading-controls {
        flex-direction: column;
    }
    
    .timeframe-selector {
        flex-wrap: wrap;
    }
    
    .tradingview-widget-container {
        height: calc(100vh - 80px);
        min-height: 250px;
    }
    
    .symbol-detail-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .trading-terminal-btn {
        width: 100%;
    }
}

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

.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
}

.status-badge.status-success {
    background: #2ecc7133;
    color: #2ecc71;
}

.status-badge.status-warning {
    background: #f39c1233;
    color: #f39c12;
}

.status-badge.status-pending {
    background: #3498db33;
    color: #3498db;
}

.profile-alert {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 6px;
    border-left: 4px solid;
}

.profile-alert.alert-warning {
    background: #f39c1233;
    border-color: #f39c12;
    color: #f39c12;
}

.profile-alert.alert-info {
    background: #3498db33;
    border-color: #3498db;
    color: #3498db;
}

.profile-alert.alert-success {
    background: #2ecc7133;
    border-color: #2ecc71;
    color: #2ecc71;
}

.profile-alert p {
    margin: 0;
    font-size: 0.9rem;
}
