

.position-management-container {
    background: rgba(75, 45, 85, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.2);
    margin-top: 35px;
    padding-top: 15px;
}

.position-management-container:hover {
    border-color: rgba(212, 175, 55, 0.4);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.1);
}

.position-management-container .strategy-section-header {
    color: #d4af37;
}

.add-position-section {
    background: rgba(212, 175, 55, 0.05);
    border: 1px solid rgba(212, 175, 55, 0.15);
}

.add-position-initial {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.positions-list {
    margin-top: 15px;
}

.add-position-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: 2px dashed rgba(212, 175, 55, 0.4);
    border-radius: 6px;
    color: #d4af37;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.add-position-btn:hover:not(:disabled) {
    background: rgba(212, 175, 55, 0.1);
    border-color: rgba(212, 175, 55, 0.6);
    border-style: solid;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
    transform: translateY(-1px);
}

.add-position-btn:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(212, 175, 55, 0.3);
}

.add-position-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: rgba(80, 80, 80, 0.2);
    border-color: rgba(100, 100, 100, 0.3);
    color: #666;
}

.add-position-btn:disabled:hover {
    transform: none;
    box-shadow: none;
    border-style: dashed;
}

.add-position-icon {
    font-size: 16px;
    font-weight: bold;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.add-position-btn:hover:not(:disabled) .add-position-icon {
    background: rgba(212, 175, 55, 0.3);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
}

.add-position-btn:disabled .add-position-icon {
    background: rgba(100, 100, 100, 0.2);
}

.position-form {
    animation: expandForm 0.3s ease-out;
    overflow: hidden;
}

@keyframes expandForm {
    from {
        opacity: 0;
        max-height: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        max-height: 600px;
        transform: translateY(0);
    }
}

.form-group {
    margin-bottom: 12px;
}

.form-label {
    color: #d4af37;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-input {
    background: rgba(25, 22, 28, 0.9);
    border: 1px solid #d4af37;
    border-radius: 4px;
    color: #d4af37;
    font-size: 10px;
    font-weight: 500;
    padding: 6px 8px;
    width: 100%;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #d4af37;
    background: rgba(30, 25, 32, 0.9);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}

.form-input:hover {
    background: rgba(30, 25, 32, 0.8);
    border-color: #d4af37;
}

.form-input:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: rgba(15, 20, 25, 0.4);
    border-color: rgba(255, 107, 53, 0.1);
    color: rgba(255, 107, 53, 0.3);
}

.form-input:invalid {
    border-color: #f44336;
    box-shadow: 0 0 6px rgba(244, 67, 54, 0.3);
}

.form-input::placeholder {
    color: rgba(212, 175, 55, 0.4);
    font-style: italic;
}

.risk-percentage-input {
    background: rgba(25, 22, 28, 0.9);
    border: 2px solid #d4af37;
    color: #d4af37;
    font-weight: 600;
    text-align: center;
}

.risk-percentage-input:focus {
    outline: none;
    border-color: #d4af37;
    background: rgba(30, 25, 32, 0.9);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.risk-percentage-input:hover {
    background: rgba(30, 25, 32, 0.8);
    border-color: #d4af37;
}

.risk-percentage-input::placeholder {
    color: rgba(212, 175, 55, 0.6);
    font-weight: 500;
}

.position-form input[type="number"]::-webkit-outer-spin-button,
.position-form input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.position-form input[type="number"] {
    -moz-appearance: textfield;
}

.form-checkbox {
    width: 14px;
    height: 14px;
    margin-right: 8px;
    appearance: none;
    border: 2px solid rgba(212, 175, 55, 0.4);
    border-radius: 3px;
    background: rgba(75, 45, 85, 0.3);
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.form-checkbox:checked {
    border-color: #d4af37;
    background: #d4af37;
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.4);
}

.form-checkbox:checked::after {
    content: '✓';
    position: absolute;
    top: -2px;
    left: 1px;
    color: #1a1a1a;
    font-size: 12px;
    font-weight: bold;
}

.form-checkbox:hover {
    border-color: rgba(212, 175, 55, 0.7);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.2);
}

.execution-options {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.execution-option {
    display: flex;
    align-items: center;
}

.execution-option input[type="radio"] {
    width: 12px;
    height: 12px;
    margin-right: 8px;
    appearance: none;
    border: 2px solid rgba(212, 175, 55, 0.4);
    border-radius: 50%;
    background: rgba(75, 45, 85, 0.3);
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.execution-option input[type="radio"]:checked {
    border-color: #d4af37;
    background: radial-gradient(circle, #d4af37 30%, rgba(75, 45, 85, 0.3) 40%);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
}

.execution-option-label {
    font-size: 10px;
    color: #e8d5e8;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    cursor: pointer;
    font-weight: 500;
    padding: 4px 6px;
    border-radius: 3px;
    background: rgba(30, 25, 32, 0.3);
}

.execution-option-label:hover {
    background: rgba(30, 25, 32, 0.5);
    color: #f0e6f0;
}

.execution-price-input {
    background: rgba(25, 22, 28, 0.9);
    border: 1px solid #d4af37;
    border-radius: 3px;
    color: #d4af37;
    font-size: 9px;
    font-weight: 500;
    padding: 3px 6px;
    width: 70px;
    text-align: center;
    transition: all 0.3s ease;
    margin-left: 10px;
}

.execution-price-input:enabled:focus {
    outline: none;
    border-color: #d4af37;
    background: rgba(30, 25, 32, 0.9);
    box-shadow: 0 0 6px rgba(255, 107, 53, 0.2);
}

.execution-price-input:enabled:hover {
    background: rgba(30, 25, 32, 0.8);
    border-color: #d4af37;
}

.execution-price-input:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    background: rgba(15, 20, 25, 0.4);
    border-color: rgba(255, 107, 53, 0.1);
    color: rgba(255, 107, 53, 0.3);
}

.risk-helper-text {
    font-size: 8px;
    color: rgba(212, 175, 55, 0.7);
    margin-top: 3px;
    text-align: center;
    font-style: italic;
}

.required-indicator {
    color: #ff6b35;
    font-size: 7px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-left: 4px;
    opacity: 0.8;
}

.risk-display {
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 6px;
    padding: 10px;
    margin-top: 12px;
}

.risk-display .risk-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.risk-display .risk-row:last-child {
    margin-bottom: 0;
}

.risk-display .risk-label {
    font-size: 9px;
    font-weight: 500;
    color: #e0e0e0;
    opacity: 0.9;
}

.risk-display .risk-value {
    font-size: 10px;
    font-weight: 600;
    color: #d4af37; 
}

.risk-warning {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    margin-bottom: 12px;
    border-radius: 4px;
    border: 1px solid;
    background: rgba(30, 25, 32, 0.8);
    animation: warningPulse 2s ease-in-out infinite;
}

@keyframes warningPulse {
    0%, 100% { opacity: 0.9; }
    50% { opacity: 1; }
}

.warning-icon {
    font-size: 12px;
    flex-shrink: 0;
}

.warning-text {
    font-size: 9px;
    font-weight: 500;
    line-height: 1.2;
}

.form-actions {
    display: flex;
    gap: 8px !important;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid rgba(212, 175, 55, 0.2);
}

.btn-base {
    flex: 1;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: transparent;
}

.cancel-position-btn {
    flex: 1;
    padding: 8px 6px !important;
    border-radius: 4px;
    font-size: 9px !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px !important;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 0 !important;
    line-height: 1.2 !important; 
    word-wrap: break-word; 
    text-align: center;
    min-height: 32px; 
    background: rgba(255, 107, 53, 0.15); 
    border: 1px solid rgba(255, 107, 53, 0.6); 
    color: #ff6b35;
}

.cancel-position-btn:hover {
    background: rgba(255, 107, 53, 0.25); 
    border-color: #ff6b35;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
    transform: translateY(-1px); 
}

.cancel-position-btn:active {
    transform: translateY(0);
    background: rgba(255, 107, 53, 0.3);
}

.create-position-btn {
    flex: 1;
    padding: 8px 6px !important;
    border-radius: 4px;
    font-size: 9px !important;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px !important;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 0 !important;
    line-height: 1.2 !important; 
    word-wrap: break-word; 
    text-align: center;
    min-height: 32px; 
    border: 1px solid rgba(212, 175, 55, 0.4);
    color: #d4af37;
}

.create-position-btn:hover:not(:disabled) {
    background: rgba(212, 175, 55, 0.1);
    border-color: #d4af37;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.2);
}

.create-position-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: rgba(80, 80, 80, 0.3);
    border-color: rgba(100, 100, 100, 0.4);
    color: #666;
    pointer-events: none;
}

.create-position-btn.button-blocked {
    background: rgba(244, 67, 54, 0.2);
    border-color: #f44336;
    color: #f44336;
    cursor: not-allowed;
    opacity: 0.8;
}

.create-position-btn.button-blocked:hover {
    background: rgba(244, 67, 54, 0.2);
    border-color: #f44336;
    box-shadow: none;
    transform: none;
}

.create-position-btn.button-ready {
    background: rgba(76, 175, 80, 0.1);
    border-color: #4CAF50;
    color: #4CAF50;
    cursor: pointer;
    animation: readyGlow 2s ease-in-out infinite;
}

@keyframes readyGlow {
    0%, 100% { box-shadow: 0 2px 8px rgba(76, 175, 80, 0.2); }
    50% { box-shadow: 0 4px 16px rgba(76, 175, 80, 0.4); }
}

.create-position-btn.button-ready:hover {
    background: rgba(76, 175, 80, 0.2);
    border-color: #4CAF50;
    box-shadow: 0 4px 20px rgba(76, 175, 80, 0.5);
    transform: translateY(-1px);
}

.position-container {
    background: rgba(75, 45, 85, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 6px;
    margin-bottom: 12px;
    padding: 12px;
    animation: slideInPosition 0.3s ease-out;
}

@keyframes slideInPosition {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideOutPosition {
    from {
        opacity: 1;
        transform: translateY(0);
        max-height: 200px;
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
        max-height: 0;
        margin-bottom: 0;
        padding-top: 0;
        padding-bottom: 0;
    }
}

.position-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.position-title {
    color: #d4af37;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.position-status {
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 3px;
    text-transform: uppercase;
    font-weight: 600;
}

.position-status.pending {
    background: rgba(255, 107, 53, 0.2);
    color: #ff6b35;
    border: 1px solid rgba(255, 107, 53, 0.3);
}

.position-status.open {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
    border: 1px solid rgba(76, 175, 80, 0.3);
}

.position-status.closed {
    background: rgba(158, 158, 158, 0.2);
    color: #9e9e9e;
    border: 1px solid rgba(158, 158, 158, 0.3);
}

.position-status.cancelled {
    background: rgba(158, 158, 158, 0.2);
    color: #9e9e9e;
    border: 1px solid rgba(158, 158, 158, 0.3);
}

.position-details {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 10px;
}

.position-row {
    display: flex;
    justify-content: space-between;
    color: #e0e0e0;
}

.position-label {
    opacity: 0.8;
}

.position-value {
    color: #d4af37;
    font-weight: 600;
}

.position-details .position-row:nth-child(2) .position-value {
    
    color: #fe752b;
    font-weight: 700;
}

.position-details .position-row:nth-child(3) .position-value {
    
    color: #d4af37;
    font-weight: 600;
    font-family: monospace;
}

.current-pnl-row {
    background: rgba(212, 175, 55, 0.06);
    padding: 6px 8px;
    border-radius: 4px;
    border: 1px solid rgba(212, 175, 55, 0.2);
    margin: 4px 0;
    order: 2; 
    margin-top: 8px;
    margin-bottom: 8px;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: space-between;
    align-items: center; 
    min-height: 20px; 
}

.current-pnl-row .position-label {
    color: #d4af37;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 9px;
    line-height: 1.2; 
    margin: 0; 
}

.current-pnl-value {
    font-weight: 700;
    font-size: 11px;
    font-family: monospace;
    text-shadow: 0 0 8px currentColor;
    transition: all 0.3s ease;
    border-radius: 3px;
    padding: 2px 6px;
    line-height: 1.2; 
    margin: 0; 
    display: flex;
    align-items: center; 
}

.current-pnl-value.profit {
    color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
    border: 1px solid rgba(76, 175, 80, 0.3);
    box-shadow: 0 0 10px rgba(76, 175, 80, 0.2);
}

.current-pnl-value.loss {
    color: #f44336;
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.3);
    box-shadow: 0 0 10px rgba(244, 67, 54, 0.2);
}

.current-pnl-row:hover {
    background: rgba(212, 175, 55, 0.12);
    border-color: rgba(212, 175, 55, 0.4);
    cursor: default;
}

@keyframes pnlUpdate {
    0% {
        transform: scale(1);
        box-shadow: 0 0 10px currentColor;
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 20px currentColor;
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    }
}

.position-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.close-position-btn,
.remove-position-btn {
    flex: 1;
    background: transparent;
    border: 1px solid rgba(255, 107, 53, 0.4);
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.close-position-btn {
    color: #ff6b35;
}

.close-position-btn:hover {
    background: rgba(255, 107, 53, 0.1);
    border-color: #ff6b35;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.2);
}

.close-position-btn:active {
    background: rgba(255, 107, 53, 0.2);
    transform: translateY(1px);
}

.remove-position-btn {
    color: #fa3939;
}

.remove-position-btn:hover:not(:disabled) {
    background: rgba(255, 107, 53, 0.1);
    border-color: #fa3939;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.2);
}

.remove-position-btn:disabled {
    opacity: 0.5;
    cursor: default;
    background: rgba(80, 80, 80, 0.3);
    border-color: rgba(100, 100, 100, 0.4);
    color: #666;
    pointer-events: none;
}

.strategy-frozen .position-management-container {
    opacity: 0.2;
    filter: grayscale(100%) contrast(0.5) brightness(0.4);
    pointer-events: none;
    cursor: not-allowed;
    position: relative;
}

.strategy-frozen .position-management-container::after {
    content: '🔒';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 30px;
    color: rgba(255, 255, 255, 0.8);
    z-index: 1000;
    pointer-events: none;
    text-shadow: 3px 3px 10px rgba(0, 0, 0, 1);
    animation: lockBlink 1.5s ease-in-out infinite;
}

@keyframes lockBlink {
    0%, 50%, 100% { 
        opacity: 0.8; 
        transform: translate(-50%, -50%) scale(1); 
    }
    25%, 75% { 
        opacity: 1; 
        transform: translate(-50%, -50%) scale(1.1); 
    }
}

@media (max-width: 400px) {
    .add-position-btn {
        padding: 10px 14px;
        font-size: 11px;
    }
    
    .add-position-icon {
        width: 18px;
        height: 18px;
        font-size: 14px;
    }
    
    .form-label {
        font-size: 8px;
    }
    
    .execution-option-label {
        font-size: 9px;
    }
    
    .execution-price-input {
        width: 60px;
        font-size: 8px;
    }
    
    .form-input {
        font-size: 9px;
        padding: 5px 7px;
    }
    
    .risk-percentage-input {
        font-size: 11px;
        padding: 7px;
    }
    
    .risk-helper-text {
        font-size: 7px;
    }
    
    .required-indicator {
        font-size: 6px;
    }
    
    .risk-display {
        padding: 8px;
    }
    
    .risk-display .risk-label {
        font-size: 8px;
    }
    
    .risk-display .risk-value {
        font-size: 9px;
    }
    
    .warning-text {
        font-size: 8px;
    }
    
    .cancel-position-btn,
    .create-position-btn {
        font-size: 9px;
        padding: 7px 10px;
    }
    
    .current-pnl-row {
        padding: 4px 6px;
        margin: 3px 0;
    }
    
    .current-pnl-row .position-label {
        font-size: 8px;
    }
    
    .current-pnl-value {
        font-size: 10px;
        padding: 1px 4px;
    }
    
    .strategy-frozen .position-management-container::after {
        font-size: 24px;
    }
}

.modify-position-btn {
    flex: 1;
    background: transparent;
    border: 1px solid rgba(212, 175, 55, 0.6);
    color: #d4af37;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.modify-position-btn:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: #d4af37;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.2);
    transform: translateY(-1px);
}

.modify-position-btn:active {
    background: rgba(212, 175, 55, 0.2);
    transform: translateY(0);
}

.modify-position-form {
    background: rgba(27, 16, 31, 0.3);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 6px;
    padding: 12px;
    margin-top: 10px;
    animation: expandModifyForm 0.3s ease-out;
}

@keyframes expandModifyForm {
    from {
        opacity: 0;
        max-height: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        max-height: 300px;
        transform: translateY(0);
    }
}

.modify-form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
}

.modify-form-title {
    color: #d4af37;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.close-modify-form-btn {
    background: transparent;
    border: 1px solid rgba(255, 107, 53, 0.4);
    color: #ff6b35;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-modify-form-btn:hover {
    background: rgba(255, 107, 53, 0.1);
    border-color: #ff6b35;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.2);
}

.modify-form-group {
    margin-bottom: 12px;
}

.modify-form-label {
    color: #d4af37;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    display: block;
}

.modify-form-input {
    background: rgba(25, 22, 28, 0.9);
    border: 1px solid #d4af37;
    border-radius: 4px;
    color: #d4af37;
    font-size: 10px;
    font-weight: 500;
    padding: 6px 8px;
    width: 100%;
    transition: all 0.3s ease;
}

.modify-form-input:focus {
    outline: none;
    border-color: #d4af37;
    background: rgba(30, 25, 32, 0.9);
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}

.modify-form-input:hover {
    background: rgba(30, 25, 32, 0.8);
    border-color: #d4af37;
    box-shadow: 0 0 10px rgba(27, 16, 31, 0.3);
}

.modify-form-input::placeholder {
    color: rgba(212, 175, 55, 0.4);
    font-style: italic;
}

.entry-price-group {
    border-top: 1px solid rgba(212, 175, 55, 0.2);
    padding-top: 8px;
    margin-top: 8px;
}

.current-entry-info {
    font-size: 8px;
    color: rgba(212, 175, 55, 0.7);
    margin-top: 3px;
    font-style: italic;
}

.apply-modify-btn {
    width: 100%;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid #d4af37;
    color: #d4af37;
    padding: 8px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    margin-top: 8px;
    box-shadow: 0 0 12px rgba(27, 16, 31, 0.3);
}

.apply-modify-btn:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: #d4af37;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3), 0 0 16px rgba(35, 21, 40, 0.7);
    transform: translateY(-1px);
}

.apply-modify-btn:active {
    background: rgba(212, 175, 55, 0.3);
    transform: translateY(0);
    box-shadow: 0 0 8px rgba(27, 16, 31, 0.3);
}

.position-actions {
    display: flex;
    gap: 6px;
    margin-top: 12px;
}

.position-actions .modify-position-btn,
.position-actions .close-position-btn,
.position-actions .remove-position-btn {
    flex: 1;
    min-width: 0; 
}

.modify-risk-display {
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 6px;
    padding: 10px;
    margin: 12px 0;
    box-shadow: 0 0 8px rgba(27, 16, 31, 0.3);
}

.modify-risk-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.modify-risk-row:last-child {
    margin-bottom: 0;
}

.modify-risk-label {
    font-size: 9px;
    font-weight: 500;
    color: #e0e0e0;
    opacity: 0.9;
}

.modify-risk-value {
    font-size: 10px;
    font-weight: 600;
    color: #d4af37;
}

.current-tp-info,
.current-sl-info {
    font-size: 8px;
    color: rgba(212, 175, 55, 0.7);
    margin-top: 3px;
    font-style: italic;
}

.tp-row.tp-active {
    background: rgba(212, 175, 55, 0.04) !important;
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 4px;
    padding: 6px 8px;
    margin: 4px 0;
}

.tp-row.tp-active .position-label {
    color: #d4af37 !important;
    font-weight: 500 !important;
}

.tp-row.tp-active .position-value {
    color: #d4af37 !important;
    font-weight: 600 !important;
}

.apply-modify-btn.apply-btn-frozen {
    opacity: 0.4;
    cursor: not-allowed !important;
    background: rgba(80, 80, 80, 0.3) !important;
    border-color: rgba(100, 100, 100, 0.4) !important;
    color: #666 !important;
    pointer-events: none;
    filter: grayscale(100%);
    transition: all 0.3s ease;
}

.apply-modify-btn.apply-btn-frozen:hover {
    background: rgba(80, 80, 80, 0.3) !important;
    border-color: rgba(100, 100, 100, 0.4) !important;
    box-shadow: none !important;
    transform: none !important;
}

.modify-disclaimer {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid #f44336;
    border-radius: 4px;
    padding: 8px 12px;
    margin: 8px 0;
    color: #f44336;
    font-size: 9px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    animation: disclaimerSlide 0.3s ease-out;
}

.disclaimer-icon {
    font-size: 12px;
    flex-shrink: 0;
}

.disclaimer-text {
    line-height: 1.3;
}

@keyframes disclaimerSlide {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 400px) {
    .modify-disclaimer {
        font-size: 8px;
        padding: 6px 10px;
    }
    
    .disclaimer-icon {
        font-size: 10px;
    }
}

@media (max-width: 400px) {
    .modify-form-title {
        font-size: 10px;
    }
    
    .close-modify-form-btn {
        width: 20px;
        height: 20px;
        font-size: 12px;
    }
    
    .modify-form-label {
        font-size: 8px;
    }
    
    .modify-form-input {
        font-size: 9px;
        padding: 5px 7px;
        box-shadow: 0 0 6px rgba(75, 45, 85, 0.3);
    }
    
    .modify-form-input:focus {
        box-shadow: 0 0 12px rgba(75, 45, 85, 0.6), 0 0 6px rgba(212, 175, 55, 0.3);
    }
    
    .modify-form-input:hover {
        box-shadow: 0 0 8px rgba(75, 45, 85, 0.4);
    }
    
    .apply-modify-btn {
        font-size: 9px;
        padding: 7px 10px;
        box-shadow: 0 0 10px rgba(75, 45, 85, 0.4);
    }
    
    .apply-modify-btn:hover {
        box-shadow: 0 2px 6px rgba(212, 175, 55, 0.2), 0 0 12px rgba(75, 45, 85, 0.6);
    }
    
    .modify-position-btn {
        font-size: 8px;
        padding: 6px 8px;
        box-shadow: 0 0 6px rgba(75, 45, 85, 0.3);
    }
    
    .modify-position-btn:hover {
        box-shadow: 0 2px 8px rgba(75, 45, 85, 0.5), 0 0 6px rgba(212, 175, 55, 0.2);
    }
    
    .modify-risk-display {
        box-shadow: 0 0 6px rgba(75, 45, 85, 0.2);
    }
    
    .modify-risk-value {
        text-shadow: 0 0 4px rgba(75, 45, 85, 0.3);
    }
}

.position-value {
    transition: color 0.5s ease;
}

.risk-high {
    color: #f44336 !important;
    text-shadow: 0 0 8px rgba(244, 67, 54, 0.3);
}

.risk-medium {
    color: #fe752b !important;
}

.risk-low {
    color: #4CAF50 !important;
    text-shadow: 0 0 8px rgba(76, 175, 80, 0.3);
}

@keyframes riskGlowPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.risk-glow-pulse {
    animation: riskGlowPulse 1s ease-in-out 3;
}

.risk-glow-increase {
    color: #f44336 !important;
    text-shadow: 
        0 0 8px #f44336,
        0 0 12px #f44336,
        0 0 16px #f44336;
    font-weight: 600;
    transition: all 0.3s ease-in-out;
}

.risk-glow-decrease {
    color: #4CAF50 !important;
    text-shadow: 
        0 0 8px #4CAF50,
        0 0 12px #4CAF50,
        0 0 16px #4CAF50;
    font-weight: 600;
    transition: all 0.3s ease-in-out;
}

.position-value {
    transition: all 0.3s ease-in-out;
}

.disclaimer-pulse {
    animation: disclaimerPulse 1s ease-in-out;
}

@keyframes disclaimerPulse {
    0% { 
        transform: scale(1);
        border-color: #f44336;
    }
    50% { 
        transform: scale(1.02);
        border-color: #ff1744;
        box-shadow: 0 0 15px rgba(244, 67, 54, 0.4);
    }
    100% { 
        transform: scale(1);
        border-color: #f44336;
    }
}

.modify-disclaimer {
    background: rgba(244, 67, 54, 0.15);
    border: 1px solid #f44336;
    border-radius: 4px;
    padding: 10px 12px;
    margin: 10px 0;
    color: #f44336;
    font-size: 9px;
    font-weight: 600;
    display: none;
    align-items: center;
    gap: 8px;
    animation: disclaimerSlide 0.3s ease-out;
    line-height: 1.4;
}

.disclaimer-icon {
    font-size: 14px;
    flex-shrink: 0;
    filter: drop-shadow(0 0 4px rgba(244, 67, 54, 0.6));
}

.disclaimer-text {
    flex: 1;
    text-shadow: 0 0 4px rgba(244, 67, 54, 0.3);
}

@keyframes disclaimerSlide {
    from {
        opacity: 0;
        transform: translateY(-5px);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 50px;
    }
}

@container (max-width: 219px) {

    .add-position-btn,
    .position-form,
    .add-position-section,
    .position-actions,
    .modify-position-form,
    .modify-disclaimer {
        display: none !important;
    }

    .position-management-container {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        text-align: center !important;
    }

    .position-management-container .strategy-section-header {
        font-size: 12px !important;
        font-weight: 700 !important;
        color: #d4af37 !important;
        text-align: center !important;
        margin: 0 auto 12px auto !important;
        margin-left: -5px !important;  
        text-transform: uppercase !important;
        letter-spacing: 0.5px !important;
        width: 100% !important;
        display: block !important;
        padding: 0 !important;
    }

    .positions-list:empty .empty-positions-message,
    .positions-list:not(:has(.position-container)) .empty-positions-message {
        display: block !important;
        font-size: 11px !important;
        color: #999 !important;
        font-style: italic !important;
        padding: 15px 0 !important;
        text-align: center !important;
        width: 100% !important;
        margin: 0 auto !important;
    }

    .positions-list:has(.position-container) .empty-positions-message {
        display: none !important;
    }

    .positions-list {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        text-align: center !important;
    }

    .position-container {
        background: rgba(75, 45, 85, 0.15) !important;
        border: 1px solid rgba(212, 175, 55, 0.35) !important;
        border-radius: 6px !important;
        padding: 10px 8px !important;
        margin: 0 auto 8px auto !important;
        pointer-events: none !important;
        max-width: 90% !important;  
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
    }

    .position-header {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 5px !important;
        margin-bottom: 10px !important;
    }
    
    .position-title {
        font-size: 12px !important;
        font-weight: 700 !important;
        color: #d4af37 !important;
    }
    
    .position-status {
        font-size: 9px !important;
        padding: 3px 8px !important;
    }

    .position-details .position-row {
        display: none !important;
    }

    .position-details .current-pnl-row {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 4px !important;
        padding: 4px !important;
        margin: 4px auto !important;
        background: rgba(212, 175, 55, 0.08) !important;
        border: 1px solid rgba(212, 175, 55, 0.3) !important;
        border-radius: 4px !important;
        width: calc(100% - 12px) !important; 
        max-width: 100% !important;
        min-width: unset !important;
        box-sizing: border-box !important;
    }

    .current-pnl-row .position-label {
        font-size: 8px !important;
        font-weight: 700 !important;
        color: #d4af37 !important;
        white-space: normal !important;
        max-width: 60px !important;
        line-height: 1.2 !important;
        text-align: center !important;
    }

    .current-pnl-value {
        font-size: 13px !important;
        font-weight: 700 !important;
        padding: 2px 6px !important;
        white-space: nowrap !important;
    }

    .position-details .pnl-row {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 4px !important;
        padding: 6px !important;
        margin: 6px auto !important;
        background: rgba(212, 175, 55, 0.08) !important;
        border: 1px solid rgba(212, 175, 55, 0.3) !important;
        border-radius: 4px !important;
        width: calc(100% - 12px) !important; 
        max-width: 100% !important;
        min-width: unset !important;
        box-sizing: border-box !important;
    }

    .pnl-row .position-label {
        font-size: 8px !important;
        font-weight: 700 !important;
        color: #d4af37 !important;
        white-space: normal !important;
        max-width: 60px !important;
        line-height: 1.2 !important;
        text-align: center !important;
    }

    .pnl-row .position-value {
        font-size: 13px !important;
        font-weight: 700 !important;
        padding: 2px 6px !important;
        white-space: nowrap !important;
    }
}

@container (max-width: 180px) {
    .position-container {
        padding: 8px 6px !important;
        margin: 0 auto 6px auto !important;
    }
    
    .position-header {
        gap: 4px !important;
        margin-bottom: 8px !important;
    }
    
    .position-title {
        font-size: 10px !important;
    }
    
    .position-status {
        font-size: 8px !important;
        padding: 2px 6px !important;
    }
    
    .current-pnl-row,
    .pnl-row {
        gap: 3px !important;
        padding: 5px 6px !important;
        margin: 5px 0 !important;
    }
    
    .current-pnl-row .position-label,
    .pnl-row .position-label {
        font-size: 8px !important;
    }
    
    .current-pnl-value,
    .pnl-row .position-value {
        font-size: 13px !important;
        padding: 2px 6px !important;
    }
}

@media (min-width: 600px) {
    .position-management-container {
        transform: scale(1.02);
        transform-origin: top center;
    }
}

@media (min-width: 700px) {
    .position-management-container {
        transform: scale(1.04);
        transform-origin: top center;
    }
}

@container (max-width: 219px) {
    
    .position-management-container .strategy-section-header {
        font-size: 11px !important;
        font-weight: 600 !important;
        letter-spacing: 0.4px !important;
        margin-bottom: 10px !important;
    }
}

.position-management-container {
    max-width: calc(100% - 10px) !important;
    width: calc(100% - 10px);
    box-sizing: border-box;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 600px) {
    .position-management-container {
        max-width: calc(98% - 10px) !important;
        transform: scale(1.02);
        transform-origin: top center;
    }
}

@media (min-width: 700px) {
    .position-management-container {
        max-width: calc(96% - 10px) !important;
        transform: scale(1.04);
        transform-origin: top center;
    }
}

