/* Dark Mode Color Scheme */
:root {
    --bg-primary: #0f172a;
    --bg-secondary: #1e293b;
    --bg-card: #1e293b;
    --bg-hover: #334155;
    
    --text-primary: #f1f5f9;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    
    --accent-primary: #3b82f6;
    --accent-success: #10b981;
    --accent-danger: #ef4444;
    --accent-warning: #f59e0b;
    
    --border-color: #334155;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
}

.login-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 48px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
}

.login-title {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.login-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 14px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.form-input {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.2s;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.btn-login {
    background: linear-gradient(135deg, var(--accent-primary) 0%, #2563eb 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.3);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(59, 130, 246, 0.4);
}

.error-message {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--accent-danger);
    color: var(--accent-danger);
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
}

/* Dashboard */
.dashboard-container {
    min-height: 100vh;
    background: var(--bg-primary);
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.dashboard-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 20px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-info {
    color: var(--text-secondary);
    font-size: 14px;
}

.dashboard-content {
    padding: 32px;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 32px !important;
    padding-right: 32px !important;
}

/* Navigation */
.dashboard-navigation {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 0 32px;
    display: flex;
    gap: 8px;
}

.nav-link {
    display: inline-block;
    padding: 16px 24px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.nav-link.active {
    color: var(--accent-primary);
    border-bottom-color: var(--accent-primary);
}

/* Position Calculator */
.position-calculator-container {
    max-width: 100%;
    margin: 0 auto;
}

.calculator-header {
    margin-bottom: 32px;
    text-align: center;
}

.calculator-header h1 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.calculator-description {
    color: var(--text-secondary);
    font-size: 16px;
}

.calculator-controls {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.control-label {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 16px;
    min-width: 140px;
}

.position-select {
    background: #0a0e1a;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 14px 20px;
    color: #ffffff;
    font-size: 18px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.position-select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    background: #0d1117;
}

.entries-table-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 24px;
    overflow-x: auto;
}

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

.entries-table thead {
    background: var(--bg-secondary);
}

.entries-table th {
    padding: 16px 20px;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 16px;
    border-bottom: 2px solid var(--border-color);
}

.entries-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
}

.entry-row {
    transition: background 0.2s;
}

.entry-row:hover {
    background: var(--bg-hover);
}

.entry-number {
    font-weight: 600;
    color: var(--text-secondary);
    width: 60px;
    text-align: center;
    font-size: 16px;
}

.entry-input {
    width: 100%;
    background: #0a0e1a;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 14px 16px;
    color: #ffffff;
    font-size: 18px;
    font-weight: 500;
    transition: all 0.2s;
}

.entry-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    background: #0d1117;
}

.entry-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.average-price-cell {
    text-align: center;
}

.average-price-value {
    font-weight: 600;
    color: var(--accent-primary);
    font-size: 18px;
    font-family: 'Courier New', monospace;
}

.entry-actions-cell {
    text-align: center;
    white-space: nowrap;
}

.btn-add-entry,
.btn-add-entry-inline,
.btn-remove-entry {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 16px;
    color: var(--text-primary);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s;
    margin: 0 4px;
    min-width: 44px;
    min-height: 44px;
}

.btn-add-entry {
    background: var(--accent-primary);
    color: white;
    border: none;
    padding: 16px 32px;
    font-weight: 600;
    font-size: 18px;
}

.btn-add-entry:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.3);
}

.btn-add-entry-inline:hover {
    background: var(--accent-success);
    color: white;
    border-color: var(--accent-success);
}

.btn-remove-entry:hover {
    background: var(--accent-danger);
    color: white;
    border-color: var(--accent-danger);
}

.entries-actions {
    margin-top: 24px;
    text-align: center;
}

.calculator-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.summary-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 28px;
    text-align: center;
}

.summary-label {
    color: var(--text-secondary);
    font-size: 16px;
    margin-bottom: 12px;
}

.summary-value {
    color: var(--text-primary);
    font-size: 32px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
}

/* Hedgebotpositions */
.hedgebotpositions-container {
    max-width: 100%;
    margin: 48px auto 0;
}

.hedgebotpositions-header {
    margin-bottom: 32px;
    text-align: center;
}

.hedgebotpositions-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.hedgebotpositions-description {
    color: var(--text-secondary);
    font-size: 16px;
}

.hedgebotpositions-setup {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 24px;
}

.setup-section {
    margin-bottom: 32px;
}

.setup-section:last-child {
    margin-bottom: 0;
}

.setup-section h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
}

.setup-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.setup-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.setup-field label {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.setup-input {
    background: #0a0e1a;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 14px 16px;
    color: #ffffff;
    font-size: 18px;
    font-weight: 500;
    transition: all 0.2s;
}

.setup-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    background: #0d1117;
}

.setup-input:read-only {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: not-allowed;
}

.btn-load-positions {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.btn-load-positions:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.4);
}

.btn-load-positions:disabled {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.burns-table-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    overflow-x: visible;
}

.burns-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 18px;
}

.burns-table thead {
    background: var(--bg-secondary);
}

.burns-table th {
    padding: 16px 12px;
    text-align: left;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 22px;
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

.burns-table td {
    padding: 16px 12px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    font-family: 'Courier New', monospace;
    font-size: 21px;
}

.burn-row:hover {
    background: var(--bg-hover);
}

.burn-number {
    font-weight: 600;
    color: var(--accent-primary);
    text-align: center;
}

.profit-value {
    color: var(--accent-success);
    font-weight: 600;
}

.burn-coins,
.burn-usdt {
    color: var(--accent-warning);
    font-weight: 600;
}

.rebuy-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    margin-top: 24px;
}

.rebuy-container h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
}

.rebuy-setup {
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.rebuy-setup .rebuy-field {
    display: flex;
    align-items: center;
    gap: 16px;
}

.rebuy-setup .rebuy-field label {
    min-width: 180px;
}

.rebuy-input {
    background: #0a0e1a;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 14px 16px;
    color: #ffffff;
    font-size: 18px;
    font-weight: 500;
    transition: all 0.2s;
    flex: 1;
    max-width: 300px;
}

.rebuy-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
    background: #0d1117;
}

.rebuy-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.rebuy-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.rebuy-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.rebuy-field label {
    color: var(--text-secondary);
    font-size: 16px;
    font-weight: 500;
}

.rebuy-value {
    color: var(--accent-primary);
    font-size: 24px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
}

/* Services Status */
.services-status-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
}

.services-status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.services-status-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.services-status-badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
}

.services-status-ok {
    background: rgba(16, 185, 129, 0.2);
    color: var(--accent-success);
    border: 1px solid var(--accent-success);
}

.services-status-error {
    background: rgba(239, 68, 68, 0.2);
    color: var(--accent-danger);
    border: 1px solid var(--accent-danger);
}

.services-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.service-status-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 15px;
    transition: all 0.3s ease;
}

.service-status-card.service-active {
    border-left: 4px solid var(--accent-success);
}

.service-status-card.service-inactive {
    border-left: 4px solid var(--accent-danger);
}

.service-status-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.service-status-description {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.service-status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
}

.service-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.service-dot-active {
    background: var(--accent-success);
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.5);
}

.service-dot-inactive {
    background: var(--accent-danger);
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

.service-status-text {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

.service-status-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.btn-service-start,
.btn-service-stop,
.btn-service-restart {
    flex: 1;
    min-width: 100px;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.btn-service-start {
    background: linear-gradient(135deg, var(--accent-success) 0%, #059669 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.btn-service-start:hover:not(:disabled) {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.4);
}

.btn-service-stop {
    background: linear-gradient(135deg, var(--accent-danger) 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
}

.btn-service-stop:hover:not(:disabled) {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.4);
}

.btn-service-restart {
    background: linear-gradient(135deg, var(--accent-success) 0%, #059669 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
}

.btn-service-restart:hover:not(:disabled) {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.4);
}

.btn-service-start:disabled,
.btn-service-stop:disabled,
.btn-service-restart:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

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

/* Bot Selector */
.bot-selector-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding: 15px;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.bot-selector-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.bot-selector {
    flex: 1;
    max-width: 300px;
    padding: 12px 16px;
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.bot-selector:hover {
    border-color: var(--accent-primary);
    background: var(--card-bg);
}

.bot-selector:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Style dropdown options for dark mode */
.bot-selector option {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 10px;
    border: none;
}

.bot-selector option:hover {
    background: var(--bg-hover);
}

.bot-selector option:checked {
    background: var(--accent-primary);
    color: white;
}

.no-bot-message {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    font-size: 18px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
}

.bots-table {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.table-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    font-size: 18px;
}

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

.table th {
    padding: 16px;
    text-align: left;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 14px;
    border-bottom: 1px solid var(--border-color);
}

.table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: top;
}

.table tr:hover {
    background: var(--bg-hover);
}

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

.status-running {
    background: rgba(16, 185, 129, 0.2);
    color: var(--accent-success);
}

.status-stopped {
    background: rgba(239, 68, 68, 0.2);
    color: var(--accent-danger);
}

.cycle-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    height: 130px;
    width: 100%;
    max-width: 220px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.cycle-progress-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cycle-progress {
    width: 100%;
    height: 20px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.cycle-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #f97316, #ef4444);
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(249, 115, 22, 0.5);
}

.cycle-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.cycle-burn-count {
    font-size: 14px;
    color: var(--accent-warning);
    font-weight: 700;
}

.cycle-rebuy-badge {
    font-size: 12px;
    color: var(--accent-success);
    font-weight: 700;
    background: rgba(34, 197, 94, 0.2);
    padding: 4px 8px;
    border-radius: 4px;
}

.cycle-next-burn {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
}

.cycle-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 200px;
    align-items: center;
}

.burns-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 200px;
    align-items: center;
}

.config-column {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 150px;
    align-items: center;
}

.action-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 130px;
    width: 100%;
    max-width: 220px;
    margin-left: auto;
    margin-right: auto;
}

.action-card-start {
    border-left: 3px solid var(--accent-success);
}

.action-card-stop {
    border-left: 3px solid var(--accent-danger);
}

.action-card-restart {
    border-left: 3px solid var(--accent-success);
}

/* Buttons */
.btn-start {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
    min-width: 120px;
    width: 100%;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-start:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
}

.btn-start:active {
    transform: translateY(0);
}

.btn-stop {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
    min-width: 120px;
    width: 100%;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-stop:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 4px 8px rgba(239, 68, 68, 0.4);
    transform: translateY(-1px);
}

.btn-stop:active {
    transform: translateY(0);
}

.btn-restart {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
    min-width: 120px;
    width: 100%;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-restart:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.4);
    transform: translateY(-1px);
}

.btn-restart:active {
    transform: translateY(0);
}

.btn-alert {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-right: 10px;
}

.btn-alert:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-logout {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}

.btn-logout:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.bot-type-badge {
    margin-left: 8px;
    padding: 2px 8px;
    color: white;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: 600;
}

.bot-type-badge.bot-type-long {
    background: #3b82f6;
}

.bot-type-badge.bot-type-short {
    background: #ef4444;
}

.symbol-badge {
    font-weight: 700;
    color: var(--accent-primary);
    font-size: 16px;
}

/* Position Info */
.position-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 200px;
    align-items: center;
}

.position-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    height: 130px;
    width: 100%;
    max-width: 220px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.position-long {
    border-left: 3px solid var(--accent-success);
}

.position-short {
    border-left: 3px solid var(--accent-danger);
}

.position-header {
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 8px;
    text-transform: uppercase;
}

.position-header-long {
    color: var(--accent-success);
}

.position-header-short {
    color: var(--accent-danger);
}

.position-size-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 6px;
}

.position-size-coins {
    font-size: 22px;
    font-weight: 700;
}

.position-size-coins-long {
    color: var(--accent-success);
}

.position-size-coins-short {
    color: var(--accent-danger);
}

.position-size-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.position-value-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 8px;
    padding: 6px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 4px;
}

.position-value-usdt {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent-primary);
}

.position-value-label {
    font-size: 13px;
    color: var(--accent-primary);
    font-weight: 600;
}

.position-entry-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-top: 6px;
    border-top: 1px solid var(--border-color);
}

.position-entry-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

.position-entry-value {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
}

.position-price-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px;
    background: rgba(245, 158, 11, 0.1);
    border-radius: 4px;
    margin-top: 4px;
}

.position-price-label {
    font-size: 12px;
    color: var(--accent-warning);
    font-weight: 600;
}

.position-price-value {
    font-size: 14px;
    color: var(--accent-warning);
    font-weight: 700;
}

/* Status Cell */
.status-cell {
    vertical-align: top;
    padding: 12px;
    text-align: center;
    position: relative;
}

.status-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    position: relative;
}

/* Price and Spread Container */
.price-spread-container {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: calc(200% + 24px);
    margin-top: 12px;
    margin-left: calc(-100% - 12px);
    align-items: center;
    box-sizing: border-box;
    position: relative;
}

.price-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80px;
    width: 100%;
    box-sizing: border-box;
}

.price-header {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.price-value {
    font-size: 18px;
    color: var(--accent-warning);
    font-weight: 700;
}

.spread-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80px;
    width: 100%;
    box-sizing: border-box;
}

.spread-header {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.spread-value {
    font-size: 18px;
    color: var(--accent-primary);
    font-weight: 700;
}

/* Orders Info */
.orders-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 200px;
    align-items: center;
}

.order-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    height: 130px;
    width: 100%;
    max-width: 220px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.order-long {
    border-left: 3px solid var(--accent-success);
}

.order-short {
    border-left: 3px solid var(--accent-danger);
}

.order-header {
    font-weight: 700;
    font-size: 13px;
    color: var(--text-primary);
    margin-bottom: 8px;
    text-transform: uppercase;
}

.order-header-long {
    color: var(--accent-success);
}

.order-header-short {
    color: var(--accent-danger);
}

.order-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 0;
    gap: 8px;
}

.order-label {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 12px;
    min-width: 35px;
}

.order-status {
    font-size: 13px;
    font-weight: 600;
    text-align: right;
}

.order-set {
    color: var(--accent-success);
}

.order-not-set {
    color: var(--accent-danger);
}

/* Burns Card */
.burns-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    height: 130px;
    width: 100%;
    max-width: 220px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    justify-content: space-between;
}

.burns-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.burns-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
}

.burns-value {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 700;
}

.burns-profit {
    color: var(--accent-success);
}

.burns-next-burn-coins {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.burns-next-burn-usdt {
    font-size: 20px;
    font-weight: 700;
    color: #4A9EFF;
}

.burns-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.burns-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 600;
}

.burns-value {
    font-size: 14px;
    color: var(--text-primary);
    font-weight: 700;
}

.burns-profit {
    color: var(--accent-success);
}

/* Config Button */
.btn-config {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.3);
}

.btn-config:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
    box-shadow: 0 4px 8px rgba(99, 102, 241, 0.4);
    transform: translateY(-1px);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--bg-card);
    margin: 5% auto;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.modal-close {
    color: var(--text-secondary);
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.modal-close:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 24px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

.btn-save {
    background: linear-gradient(135deg, var(--accent-primary) 0%, #2563eb 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(59, 130, 246, 0.3);
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(59, 130, 246, 0.4);
}

.btn-cancel {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-cancel:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* === HARD FIX: Remove positions section from any grid context === */

.hedge-positions-container,
.positions-section,
.positions-vertical,
#controlPanelContainer,
#positionsContent {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    grid-column: 1 / -1 !important;
}

/* Reset any grid inheritance inside the positions section */
.positions-section * {
    grid-column: auto !important;
}

.positions-wrapper-full {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    grid-column: 1 / -1 !important;
}

